From 26e2791a019cf7e081f9f549b6120fabe892a330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 12 Jul 2024 16:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionplan/productionMain/index.vue | 120 +++++++++++------- .../productionMainAssemble/index.vue | 120 +++++++++++++----- .../productionMainAssembleSparePart/index.vue | 120 +++++++++++++----- .../productionMainPredictSparePart/index.vue | 120 +++++++++++++----- 4 files changed, 336 insertions(+), 144 deletions(-) diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 59b0c44c0..44ab714e5 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -332,29 +332,39 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.submit(row.masterId).then((res) => { if (res.status == '6') { // 生成备料计划 - tableObject.loading = true + // tableObject.loading = true ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() - }).catch(err => { - tableObject.loading = false - console.log(err) - }) - // 生成收货申请 - tableObject.loading = true - ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { - // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } - message.success(t('common.updateSuccess')) - tableObject.loading = false - getList() + // message.success(t('common.updateSuccess')) + // tableObject.loading = false + // getList() }).catch(err => { tableObject.loading = false console.log(err) @@ -398,23 +408,33 @@ const buttonTableClick = async (val, row) => { }) // 生成备料计划 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) - }) - // 生成收货申请 - tableObject.loading = true - await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } }) @@ -590,25 +610,35 @@ const submitForm = async (formType, submitData) => { tableObject.loading = true ProductionMainApi.generatePreparetoissue(res.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() - }).catch(err => { - tableObject.loading = false - console.log(err) - }) - // 生成收货申请 - tableObject.loading = true - ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { - // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } }) - message.success(t('common.createSuccess')) + // message.success(t('common.createSuccess')) } else { await ProductionMainApi.updateProductionMain(data) message.success(t('common.updateSuccess')) diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index de3c21983..8d0024968 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -324,29 +324,39 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.submit(row.masterId).then((res) => { if (res.status == '6') { // 生成备料计划 - tableObject.loading = true + // tableObject.loading = true ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() - }).catch(err => { - tableObject.loading = false - console.log(err) - }) - // 生成收货申请 - tableObject.loading = true - ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { - // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } - message.success(t('common.updateSuccess')) - tableObject.loading = false - getList() + // message.success(t('common.updateSuccess')) + // tableObject.loading = false + // getList() }).catch(err => { tableObject.loading = false console.log(err) @@ -390,23 +400,33 @@ const buttonTableClick = async (val, row) => { }) // 生成备料计划 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) - }) - // 生成收货申请 - tableObject.loading = true - await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } }) @@ -574,8 +594,42 @@ const submitForm = async (formType, submitData) => { try { if (formType === 'create') { data.subList = tableData.value // 拼接子表数据参数 - await ProductionMainApi.createProductionMain(data) - message.success(t('common.createSuccess')) + await ProductionMainApi.createProductionMain(data).then((res) => { + // console.log(565,res) + if (res.status == '6') { + // 生成备料计划 + tableObject.loading = true + ProductionMainApi.generatePreparetoissue(res.number).then(() => { + // message.success(t('common.createSuccess')) + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + }).catch(err => { + // tableObject.loading = false + console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + }) + } + }) + // message.success(t('common.createSuccess')) } else { await ProductionMainApi.updateProductionMain(data) message.success(t('common.updateSuccess')) diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index cd26ba054..0efe6c81c 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -324,29 +324,39 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.submit(row.masterId).then((res) => { if (res.status == '6') { // 生成备料计划 - tableObject.loading = true + // tableObject.loading = true ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() - }).catch(err => { - tableObject.loading = false - console.log(err) - }) - // 生成收货申请 - tableObject.loading = true - ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { - // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } - message.success(t('common.updateSuccess')) - tableObject.loading = false - getList() + // message.success(t('common.updateSuccess')) + // tableObject.loading = false + // getList() }).catch(err => { tableObject.loading = false console.log(err) @@ -390,23 +400,33 @@ const buttonTableClick = async (val, row) => { }) // 生成备料计划 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) - }) - // 生成收货申请 - tableObject.loading = true - await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } }) @@ -573,8 +593,42 @@ const submitForm = async (formType, submitData) => { try { if (formType === 'create') { data.subList = tableData.value // 拼接子表数据参数 - await ProductionMainApi.createProductionMain(data) - message.success(t('common.createSuccess')) + await ProductionMainApi.createProductionMain(data).then((res) => { + // console.log(565,res) + if (res.status == '6') { + // 生成备料计划 + tableObject.loading = true + ProductionMainApi.generatePreparetoissue(res.number).then(() => { + // message.success(t('common.createSuccess')) + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + }).catch(err => { + // tableObject.loading = false + console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + }) + } + }) + // message.success(t('common.createSuccess')) } else { await ProductionMainApi.updateProductionMain(data) message.success(t('common.updateSuccess')) diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 60a8f1605..0700a5685 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -324,29 +324,39 @@ const buttonTableClick = async (val, row) => { await ProductionMainApi.submit(row.masterId).then((res) => { if (res.status == '6') { // 生成备料计划 - tableObject.loading = true + // tableObject.loading = true ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() - }).catch(err => { - tableObject.loading = false - console.log(err) - }) - // 生成收货申请 - tableObject.loading = true - ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { - // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } - message.success(t('common.updateSuccess')) - tableObject.loading = false - getList() + // message.success(t('common.updateSuccess')) + // tableObject.loading = false + // getList() }).catch(err => { tableObject.loading = false console.log(err) @@ -390,23 +400,33 @@ const buttonTableClick = async (val, row) => { }) // 生成备料计划 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) - }) - // 生成收货申请 - tableObject.loading = true - await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + ProductionMainApi.generatePreparetoissue(row.number).then(() => { // message.success(t('common.createSuccess')) - tableObject.loading = false - getList() + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }).catch(err => { - tableObject.loading = false + // tableObject.loading = false console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) }) } }) @@ -574,8 +594,42 @@ const submitForm = async (formType, submitData) => { try { if (formType === 'create') { data.subList = tableData.value // 拼接子表数据参数 - await ProductionMainApi.createProductionMain(data) - message.success(t('common.createSuccess')) + await ProductionMainApi.createProductionMain(data).then((res) => { + // console.log(565,res) + if (res.status == '6') { + // 生成备料计划 + tableObject.loading = true + ProductionMainApi.generatePreparetoissue(res.number).then(() => { + // message.success(t('common.createSuccess')) + // tableObject.loading = false + // getList() + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + }).catch(err => { + // tableObject.loading = false + console.log(err) + // 生成收货申请 + // tableObject.loading = true + ProductionMainApi.generateProductreceiptRequest(res.number).then(() => { + message.success(t('common.createSuccess')) + tableObject.loading = false + getList() + }).catch(err => { + tableObject.loading = false + console.log(err) + }) + }) + } + }) + // message.success(t('common.createSuccess')) } else { await ProductionMainApi.updateProductionMain(data) message.success(t('common.updateSuccess'))