diff --git a/src/views/qms/inspectionJob/addForm.vue b/src/views/qms/inspectionJob/addForm.vue index 754a80d8f..f608b5740 100644 --- a/src/views/qms/inspectionJob/addForm.vue +++ b/src/views/qms/inspectionJob/addForm.vue @@ -465,7 +465,7 @@ 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 b562f868a..29cb1a855 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -329,29 +329,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) @@ -395,23 +405,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) + }) }) } }) @@ -579,8 +599,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 9b81d1f8f..e774525ac 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -328,29 +328,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) @@ -394,23 +404,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) + }) }) } }) @@ -577,8 +597,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 b909f6175..51facfdb9 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -328,29 +328,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) @@ -394,23 +404,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) + }) }) } }) @@ -578,8 +598,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'))