diff --git a/src/api/wms/countJobMain/index.ts b/src/api/wms/countJobMain/index.ts index 6e2b5845b..d5624f636 100644 --- a/src/api/wms/countJobMain/index.ts +++ b/src/api/wms/countJobMain/index.ts @@ -91,6 +91,12 @@ export const importTemplate = () => { export const closeCountJobMain = (id: number) => { return request.put({ url: '/wms/count-job-main/close?id=' + id }) } + +// 完成盘点任务主 +export const doneCountJobMain = (id: number) => { + //更换一下完成接口 + return request.put({ url: '/wms/count-job-main/close?id=' + id }) +} // 承接盘点任务主 export const acceptCountJobMain = (id: number) => { return request.put({ url: '/wms/count-job-main/accept?id=' + id }) diff --git a/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts b/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts index 9c0fe1ba0..921fb99b5 100644 --- a/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts +++ b/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts @@ -512,7 +512,7 @@ export const CountJobMain = useCrudSchemas(reactive([ isDetail: false, isForm: false, table: { - width: 220, + width: 250, fixed: 'right' }, } diff --git a/src/views/wms/countManage/count/countJobMain/index.vue b/src/views/wms/countManage/count/countJobMain/index.vue index ecfb80699..690575907 100644 --- a/src/views/wms/countManage/count/countJobMain/index.vue +++ b/src/views/wms/countManage/count/countJobMain/index.vue @@ -215,6 +215,15 @@ const butttondata = (row,$index) => { hasPermi: '' // wms:count-job-main:importCountJob }, defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + { + label: '完成', + name: 'done', + hide: isShowMainButton(row,[]), + type: 'success', + color: '', + link: true, //文本展现按钮 + hasPermi: '' // wms:count-job-main:importCountJob + }, // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } @@ -237,7 +246,10 @@ const buttonTableClick = async (val, row) => { handleExportCountJob(row.id,row.number) } else if( val == 'importCountJob'){ // 导入 handleImport(row.id) + } else if( val == 'done'){ // 完成 + handleDone(row.id) } + } /** 关闭按钮操作 */ @@ -249,6 +261,18 @@ const handleClose = async (id: number) => { await getList() } catch {} } +// 完成 +const handleDone = async (id: number) => { + try { + await message.confirm('确认完成吗?') + await CountJobMainApi.doneCountJobMain(id) + await getList() + } catch { + + } +} + + // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */