|
@ -67,7 +67,6 @@ |
|
|
:apiUpdate="RepleinshRequestDetailApi.updateRepleinshRequestDetail" |
|
|
:apiUpdate="RepleinshRequestDetailApi.updateRepleinshRequestDetail" |
|
|
:apiPage="RepleinshRequestDetailApi.getRepleinshRequestDetailPage" |
|
|
:apiPage="RepleinshRequestDetailApi.getRepleinshRequestDetailPage" |
|
|
:apiDelete="RepleinshRequestDetailApi.deleteRepleinshRequestDetail" |
|
|
:apiDelete="RepleinshRequestDetailApi.deleteRepleinshRequestDetail" |
|
|
:Echo="Echo" |
|
|
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
@ -104,21 +103,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
//row['poLine'] = val[0]['poLine'] |
|
|
|
|
|
//row['batch'] = val[0]['toBatch'] |
|
|
|
|
|
//row['altBatch'] = val[0]['altBatch'] |
|
|
|
|
|
//row['itemCode'] = val[0]['itemCode'] |
|
|
|
|
|
//row['itemName'] = val[0]['itemName'] |
|
|
|
|
|
//row['itemDesc1'] = val[0]['itemDesc1'] |
|
|
|
|
|
//row['itemDesc2'] = val[0]['itemDesc2'] |
|
|
|
|
|
//row['projectCode'] = val[0]['projectCode'] |
|
|
|
|
|
//row['qty'] = val[0]['qty'] |
|
|
|
|
|
//row['uom'] = val[0]['uom'] |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
//setV['ppNumber'] = val[0]['ppNumber'] |
|
|
|
|
|
//setV['supplierCode'] = val[0]['supplierCode'] |
|
|
|
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -132,10 +119,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 子表新增的时候选择表格之后需要会显得字段 |
|
|
|
|
|
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] |
|
|
|
|
|
const Echo = [] |
|
|
|
|
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
getListApi: RepleinshRequestMainApi.getRepleinshRequestMainPage // 分页接口 |
|
|
getListApi: RepleinshRequestMainApi.getRepleinshRequestMainPage // 分页接口 |
|
|
}) |
|
|
}) |
|
@ -145,7 +128,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:repleinsh-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:repleinsh-request-main:create'}), // 新增 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:repleinsh-request-main:import'}), // 导入 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:repleinsh-request-main:import'}), // 导入 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:repleinsh-request-main:export'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:repleinsh-request-main:export'}), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
@ -189,13 +172,14 @@ const isShowMainButton = (row,val) => { |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 |
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:repleinsh-request-main:close'}), // 关闭 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:repleinsh-request-main:reAdd'}), // 重新添加 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:repleinsh-request-main:submit'}), // 提交审批 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:repleinsh-request-main:refused'}), // 驳回 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:repleinsh-request-main:handle'}), // 审批通过 |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:repleinsh-request-main:update'}), // 编辑 |
|
|
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:repleinsh-request-main:update'}), // 处理 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:repleinsh-request-main:delete'}), // 删除 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:repleinsh-request-main:update'}), // 编辑 |
|
|
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:repleinsh-request-main:delete'}), // 删除 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -204,15 +188,51 @@ const butttondata = (row) => { |
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
|
|
RepleinshRequestMainApi.close(row.id).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
|
|
RepleinshRequestMainApi.reAdd(row.id).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
|
|
RepleinshRequestMainApi.submit(row.id).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
|
|
RepleinshRequestMainApi.refused(row.id).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
RepleinshRequestMainApi.agree(row.id).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
|
|
RepleinshRequestMainApi.handle(row.id).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
@ -255,7 +275,7 @@ const handleExport = async () => { |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
exportLoading.value = true |
|
|
exportLoading.value = true |
|
|
const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(setSearchParams) |
|
|
const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(setSearchParams) |
|
|
download.excel(data, '补料申请主.xlsx') |
|
|
download.excel(data, '补料申请.xlsx') |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
@ -308,7 +328,7 @@ const handleImport = () => { |
|
|
// 导入附件弹窗所需的参数 |
|
|
// 导入附件弹窗所需的参数 |
|
|
const importTemplateData = reactive({ |
|
|
const importTemplateData = reactive({ |
|
|
templateUrl: '', |
|
|
templateUrl: '', |
|
|
templateTitle: '补料申请主导入模版.xlsx' |
|
|
templateTitle: '补料申请导入模版.xlsx' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
// 导入成功之后 |
|
|