From a4ae440dfc1d6bbaffeb6429fc90a22ded1c0684 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 11 Jul 2024 09:47:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=80=89=E4=B8=8D=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventoryinitial/inventoryinitRequestMain/index.vue | 4 +++- .../productreceipt/productreceiptRequestMain/index.vue | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue index 391bc45ec..79694b38a 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue @@ -136,10 +136,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // 入库存包装规格 row[formField] = val[0][searchField] row['balancePackUnit'] = val[0]['packUnit'] + }else{ + row[formField] = val[0][searchField] } } else { const setV = {} - + setV[formField] = val[0][searchField] //setV['supplierCode'] = val[0]['supplierCode'] formRef.setValues(setV) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index c3a97d551..46c2e7a7b 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -235,6 +235,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow[formField] = item[searchField] tableData.value.push(newRow) }) + }else{ + row[formField] = val[0][searchField] } } else { From 75ffc33aebbfafc7f193673c52368211e406da8c 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, 11 Jul 2024 09:49:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92=20?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=A4=87=E6=96=99=E8=AE=A1=E5=88=92=E5=92=8C?= =?UTF-8?q?=E5=88=B6=E5=93=81=E6=94=B6=E8=B4=A7=E6=8B=86=E5=88=86=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productionMain/index.ts | 10 ++++-- .../productionplan/productionMain/index.vue | 31 ++++++++++++++++--- .../productionMain/productionMain.data.ts | 2 +- .../productionMainAssemble/index.vue | 28 +++++++++++++++-- .../productionMainAssemble.data.ts | 2 +- .../productionMainAssembleSparePart/index.vue | 28 +++++++++++++++-- .../productionMainAssembleSparePart.data.ts | 2 +- .../productionMainPredictSparePart/index.vue | 28 +++++++++++++++-- .../productionMainPredictSparePart.data.ts | 2 +- 9 files changed, 113 insertions(+), 20 deletions(-) diff --git a/src/api/wms/productionMain/index.ts b/src/api/wms/productionMain/index.ts index 9e4fed120..0086aa58e 100644 --- a/src/api/wms/productionMain/index.ts +++ b/src/api/wms/productionMain/index.ts @@ -179,11 +179,15 @@ export const resetting = (id) => { return request.put({ url: '/wms/production-main/resetting?id=' + id }) } -// 创建备料计划/制品收货申请 -export const generateRequest = (number) => { - return request.post({ url: '/wms/production-main/generateRequest?number=' + number }) +// 创建备料计划 +export const generatePreparetoissue = (number) => { + return request.post({ url: '/wms/production-main/generatePreparetoissue?number=' + number }) } +// 创建制品收货申请 +export const generateProductreceiptRequest = (number) => { + return request.post({ url: '/wms/production-main/generateProductreceiptRequest?number=' + number }) +} diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 2f6dfc3bf..17b8a3676 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -253,7 +253,7 @@ const butttondata = (row,$index) => { defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), // 删除 { - label: '生成备料计划/收货申请', + label: '生成备料计划', name: 'scbljh', hide: isShowMainButton(row,['6']), type: 'primary', @@ -262,6 +262,16 @@ const butttondata = (row,$index) => { link: true, // 文本展现按钮 color: '' }, + { + label: '生成收货申请', + name: 'scshsq', + hide: isShowMainButton(row,['6']), + type: 'primary', + icon: 'Select', + hasPermi:'wms:production-main:publish', + link: true, // 文本展现按钮 + color: '' + }, ] } @@ -364,9 +374,21 @@ const buttonTableClick = async (val, row) => { }) } else if(val == 'scbljh') { if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') - await message.confirm('确认要生成备料计划/收货申请吗?') + await message.confirm('确认要生成备料计划吗?') + tableObject.loading = true + await ProductionMainApi.generatePreparetoissue(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + } else if(val == 'scshsq') { + if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + await message.confirm('确认要生成收货申请吗?') tableObject.loading = true - await ProductionMainApi.generateRequest(row.number).then(() => { + await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false getList() @@ -374,7 +396,8 @@ const buttonTableClick = async (val, row) => { tableObject.loading = false console.log(err) }) - } else if (val == 'edit') { // 编辑 + } + if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.masterId) diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index d3f6e0e3e..bf0dee7de 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -558,7 +558,7 @@ export const ProductionMain = useCrudSchemas(reactive([ isDetail: false, isForm: false , table: { - width: 220, + width: 260, fixed: 'right' }, } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index 4d196be98..9547ad2f5 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -246,7 +246,7 @@ const butttondata = (row,$index) => { defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), // 删除 { - label: '生成备料计划/收货申请', + label: '生成备料计划', name: 'scbljh', hide: isShowMainButton(row,['6']), type: 'primary', @@ -255,6 +255,16 @@ const butttondata = (row,$index) => { link: true, // 文本展现按钮 color: '' }, + { + label: '生成收货申请', + name: 'scshsq', + hide: isShowMainButton(row,['6']), + type: 'primary', + icon: 'Select', + hasPermi:'wms:production-main:publish', + link: true, // 文本展现按钮 + color: '' + }, ] } @@ -357,9 +367,21 @@ const buttonTableClick = async (val, row) => { }) } else if(val == 'scbljh') { if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') - await message.confirm('确认要生成备料计划/收货申请吗?') + await message.confirm('确认要生成备料计划吗?') + tableObject.loading = true + await ProductionMainApi.generatePreparetoissue(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + } else if(val == 'scshsq') { + if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + await message.confirm('确认要生成收货申请吗?') tableObject.loading = true - await ProductionMainApi.generateRequest(row.number).then(() => { + await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false getList() diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index 4bf309088..aec2ca5bf 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -557,7 +557,7 @@ export const ProductionMain = useCrudSchemas(reactive([ isDetail: false, isForm: false , table: { - width: 220, + width: 260, fixed: 'right' }, } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 0592934c1..09206440d 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -246,7 +246,7 @@ const butttondata = (row,$index) => { defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), // 删除 { - label: '生成备料计划/收货申请', + label: '生成备料计划', name: 'scbljh', hide: isShowMainButton(row,['6']), type: 'primary', @@ -255,6 +255,16 @@ const butttondata = (row,$index) => { link: true, // 文本展现按钮 color: '' }, + { + label: '生成收货申请', + name: 'scshsq', + hide: isShowMainButton(row,['6']), + type: 'primary', + icon: 'Select', + hasPermi:'wms:production-main:publish', + link: true, // 文本展现按钮 + color: '' + }, ] } @@ -357,9 +367,21 @@ const buttonTableClick = async (val, row) => { }) } else if(val == 'scbljh') { if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') - await message.confirm('确认要生成备料计划/收货申请吗?') + await message.confirm('确认要生成备料计划吗?') + tableObject.loading = true + await ProductionMainApi.generatePreparetoissue(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + } else if(val == 'scshsq') { + if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + await message.confirm('确认要生成收货申请吗?') tableObject.loading = true - await ProductionMainApi.generateRequest(row.number).then(() => { + await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false getList() diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index 47e9efe15..4955f8006 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -549,7 +549,7 @@ export const ProductionMain = useCrudSchemas(reactive([ isDetail: false, isForm: false , table: { - width: 220, + width: 260, fixed: 'right' }, } diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index a4d22853c..13bbfbac3 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -246,7 +246,7 @@ const butttondata = (row,$index) => { defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), // 删除 { - label: '生成备料计划/收货申请', + label: '生成备料计划', name: 'scbljh', hide: isShowMainButton(row,['6']), type: 'primary', @@ -255,6 +255,16 @@ const butttondata = (row,$index) => { link: true, // 文本展现按钮 color: '' }, + { + label: '生成收货申请', + name: 'scshsq', + hide: isShowMainButton(row,['6']), + type: 'primary', + icon: 'Select', + hasPermi:'wms:production-main:publish', + link: true, // 文本展现按钮 + color: '' + }, ] } @@ -357,9 +367,21 @@ const buttonTableClick = async (val, row) => { }) } else if(val == 'scbljh') { if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') - await message.confirm('确认要生成备料计划/收货申请吗?') + await message.confirm('确认要生成备料计划吗?') + tableObject.loading = true + await ProductionMainApi.generatePreparetoissue(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + } else if(val == 'scshsq') { + if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + await message.confirm('确认要生成收货申请吗?') tableObject.loading = true - await ProductionMainApi.generateRequest(row.number).then(() => { + await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { message.success(t('common.createSuccess')) tableObject.loading = false getList() diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index 5b2907265..1f985f00b 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -550,7 +550,7 @@ export const ProductionMain = useCrudSchemas(reactive([ isDetail: false, isForm: false , table: { - width: 220, + width: 260, fixed: 'right' }, }