From 561ec1b67557d57ae6c1736d8fcbdd048c7bab58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Thu, 7 Dec 2023 13:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productionreturnJobMain/index.ts | 27 +- .../wms/productionreturnRequestMain/index.ts | 2 + .../productionreturnRequestMainNo/index.ts | 51 ++- .../productionreturnJobMain.data.ts | 20 +- .../productionreturnRecordMain.data.ts | 177 +++++------ .../productionreturnRequestMain/index.vue | 19 +- .../productionreturnRequestMainNo/index.vue | 290 ++++++++++++------ 7 files changed, 371 insertions(+), 215 deletions(-) diff --git a/src/api/wms/productionreturnJobMain/index.ts b/src/api/wms/productionreturnJobMain/index.ts index 5fd9ff851..79c2f9605 100644 --- a/src/api/wms/productionreturnJobMain/index.ts +++ b/src/api/wms/productionreturnJobMain/index.ts @@ -73,10 +73,35 @@ export const deleteProductionreturnJobMain = async (id: number) => { // 导出生产退料任务主 Excel export const exportProductionreturnJobMain = async (params) => { - return await request.download({ url: `/wms/productionreturn-job-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productionreturn-job-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productionreturn-job-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productionreturn-job-main/get-import-template' }) +} + +// 承接发料任务 +export const acceptProductionreturnMain = async (id) => { + return await request.put({ url: `/wms/productionreturn-job-main/accept?id=` + id }) +} + +// 放弃发料任务 +export const abandonProductionreturnMain = async (id) => { + return await request.put({ url: `/wms/productionreturn-job-main/abandon?id=` + id }) +} + +// 关闭发料任务 +export const closeProductionreturnMain = async (id) => { + return await request.put({ url: `/wms/productionreturn-job-main/close?id=` + id }) +} + +// 执行发料任务 +export const executeProductionreturnMain = async (data) => { + return await request.put({ url: `/wms/productionreturn-job-main/execute`, data}) } \ No newline at end of file diff --git a/src/api/wms/productionreturnRequestMain/index.ts b/src/api/wms/productionreturnRequestMain/index.ts index 3c93fec0a..e6e47d953 100644 --- a/src/api/wms/productionreturnRequestMain/index.ts +++ b/src/api/wms/productionreturnRequestMain/index.ts @@ -27,6 +27,7 @@ export interface ProductionreturnRequestMainVO { // 查询生产退料申请主列表 export const getProductionreturnRequestMainPage = async (params) => { + params.businessType = 'ReturnToStore' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -58,6 +59,7 @@ export const deleteProductionreturnRequestMain = async (id: number) => { // 导出生产退料申请主 Excel export const exportProductionreturnRequestMain = async (params) => { + params.businessType = 'ReturnToStore' if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/productionreturn-request-main/export-excel-senior`, data }) diff --git a/src/api/wms/productionreturnRequestMainNo/index.ts b/src/api/wms/productionreturnRequestMainNo/index.ts index 634910b28..8f369cd96 100644 --- a/src/api/wms/productionreturnRequestMainNo/index.ts +++ b/src/api/wms/productionreturnRequestMainNo/index.ts @@ -25,8 +25,9 @@ export interface ProductionreturnRequestMainVO { directCreateRecord: string } -// 查询生产退料申请主列表 +// 查询不合格生产退料申请主列表 export const getProductionreturnRequestMainPage = async (params) => { + params.businessType = 'ReturnToHold' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -36,32 +37,68 @@ export const getProductionreturnRequestMainPage = async (params) => { } } -// 查询生产退料申请主详情 +// 查询不合格生产退料申请主详情 export const getProductionreturnRequestMain = async (id: number) => { return await request.get({ url: `/wms/productionreturn-request-main/get?id=` + id }) } -// 新增生产退料申请主 +// 新增不合格生产退料申请主 export const createProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { return await request.post({ url: `/wms/productionreturn-request-main/create`, data }) } -// 修改生产退料申请主 +// 修改不合格生产退料申请主 export const updateProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { return await request.put({ url: `/wms/productionreturn-request-main/update`, data }) } -// 删除生产退料申请主 +// 删除不合格生产退料申请主 export const deleteProductionreturnRequestMain = async (id: number) => { return await request.delete({ url: `/wms/productionreturn-request-main/delete?id=` + id }) } -// 导出生产退料申请主 Excel +// 导出不合格生产退料申请主 Excel export const exportProductionreturnRequestMain = async (params) => { - return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) + params.businessType = 'ReturnToHold' + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productionreturn-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productionreturn-request-main/get-import-template' }) +} + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/handle?id=' + id }) } \ No newline at end of file diff --git a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts index 8ab4a0ead..b13107fc6 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/productionreturnJobMain.data.ts @@ -514,16 +514,16 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ } } }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 120, - fixed: 'right' - }, - } + // { + // label: '操作', + // field: 'action', + // isDetail: false, + // isForm: false, + // table: { + // width: 120, + // fixed: 'right' + // }, + // } ])) //表单校验 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts index 751ebe9ab..184c6d7ec 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/productionreturnRecordMain.data.ts @@ -357,259 +357,244 @@ export const ProductionreturnRecordDetail = useCrudSchemas(reactive { - - isCreateLabel.value = true -} - // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val @@ -137,7 +128,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'itemCode') { // row['packingNumber'] = val[0]['packingNumber'] // row['containerNumber'] = val[0]['containerNumber'] - row['batch'] = val[0]['batch'] + // row['batch'] = val[0]['batch'] row['itemCode'] = val[0]['itemCode'] row['uom'] = val[0]['uom'] row['inventoryStatus'] = val[0]['inventoryStatus'] @@ -408,8 +399,8 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await ProductionreturnRequestMainApi.exportProductionreturnRequestMain(setSearchParams) - download.excel(data, '生产退料申请主.xlsx') + const data = await ProductionreturnRequestMainApi.exportProductionreturnRequestMain(tableObject.params) + download.excel(data, '生产退料合格申请.xlsx') } catch { } finally { exportLoading.value = false @@ -427,7 +418,9 @@ const tableData = ref([]) // 添加明细 const handleAddTable = () => { - tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) + let tfk = JSON.parse(JSON.stringify(tableFormKeys)) + tfk.batch = '000000' + tableData.value.push(tfk) } // 删除明细 const handleDeleteTable = (item, index) => { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index cc2b430d8..b3542a7e8 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -70,19 +70,32 @@ @searchTableSuccessDetail="searchTableSuccessDetail" /> - - + +