From ee8d706cb062de034cc2550d6c7d0a34da0257b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Thu, 31 Oct 2024 09:51:56 +0800 Subject: [PATCH] =?UTF-8?q?page/productionReturn/job=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=208/8-10/25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/holdToReturnDetail.vue | 456 +++++++++++++++++ .../productionReturn/job/holdToReturnJob.vue | 308 ++++++++++++ .../productionReturn/job/okToReturnDetail.vue | 457 ++++++++++++++++++ .../productionReturn/job/okToReturnJob.vue | 289 +++++++++++ .../productionReturn/job/returnDetail.vue | 76 +-- 5 files changed, 1551 insertions(+), 35 deletions(-) create mode 100644 src/pages/productionReturn/job/holdToReturnDetail.vue create mode 100644 src/pages/productionReturn/job/holdToReturnJob.vue create mode 100644 src/pages/productionReturn/job/okToReturnDetail.vue create mode 100644 src/pages/productionReturn/job/okToReturnJob.vue diff --git a/src/pages/productionReturn/job/holdToReturnDetail.vue b/src/pages/productionReturn/job/holdToReturnDetail.vue new file mode 100644 index 00000000..6cdc8c58 --- /dev/null +++ b/src/pages/productionReturn/job/holdToReturnDetail.vue @@ -0,0 +1,456 @@ + + + + + \ No newline at end of file diff --git a/src/pages/productionReturn/job/holdToReturnJob.vue b/src/pages/productionReturn/job/holdToReturnJob.vue new file mode 100644 index 00000000..078047e9 --- /dev/null +++ b/src/pages/productionReturn/job/holdToReturnJob.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/pages/productionReturn/job/okToReturnDetail.vue b/src/pages/productionReturn/job/okToReturnDetail.vue new file mode 100644 index 00000000..83a2bba1 --- /dev/null +++ b/src/pages/productionReturn/job/okToReturnDetail.vue @@ -0,0 +1,457 @@ + + + + + \ No newline at end of file diff --git a/src/pages/productionReturn/job/okToReturnJob.vue b/src/pages/productionReturn/job/okToReturnJob.vue new file mode 100644 index 00000000..de4aae01 --- /dev/null +++ b/src/pages/productionReturn/job/okToReturnJob.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/src/pages/productionReturn/job/returnDetail.vue b/src/pages/productionReturn/job/returnDetail.vue index 9a4b16f7..c47a2f52 100644 --- a/src/pages/productionReturn/job/returnDetail.vue +++ b/src/pages/productionReturn/job/returnDetail.vue @@ -60,8 +60,8 @@ import jobTop from '@/mycomponents/job/jobTop.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' import workStation from '@/mycomponents/workStation/workStation.vue' import { useCountStore } from '@/store' -// 获取自定义的store const store = useCountStore() + const { proxy } = getCurrentInstance() const id = ref('') const scanCount = ref(0) @@ -189,7 +189,7 @@ const openScanPopup = () => { } const getScanResult = (result) => { try { - const { packingNumber } = result.label.package + const { packingNumber } = result.label.packingNumber const { batch } = result.label const { qty } = result.label const { itemCode } = result.label @@ -232,40 +232,46 @@ const commit = () => { showErrorMessage('扫描数为0,请先扫描') return } - // 提交的数量和任务数量不一致提示 - let str = '' - detailSource.value.forEach((item) => { - item.subList.forEach(cur => { - if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` - } - }) - }) - if (str) { - str += ',是否确认提交?' - comMessageRef.value.showQuestionMessage1(str, 'red', res => { - if (res) { - submitJob() - } - }); - } else { - submitJob() - } - // // 扫描数量和任务数量相等,直接提交 - // if (scanCount.value == subList.value.length) { + // // 提交的数量和任务数量不一致提示 + // let str = '' + // detailSource.value.forEach((item) => { + // item.subList.forEach(cur => { + // if (cur.qty != cur.handleQty) { + // str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + // } + // }) + // }) + // if (str) { + // str += ',是否确认提交?' + // comMessageRef.value.showQuestionMessage1(str, 'red', res => { + // if (res) { + // submitJob() + // } + // }); + // } else { // submitJob() - // } else if (scanCount.value < subList.value.length) { - // // 扫描数量小于任务数量,判断是否允许部分提交 - // if (jobContent.value.allowPartialComplete == 'TRUE') { - // // 提交 - // submitJob() - // } else { - // // 不允许部分提交,提示 - // comMessageRef.value.showErrorMessage('请完成扫描后,再进行提交
' + `已经扫描[${scanCount.value}]箱总共[${subList.value.length}]箱`, (res) => { - // openScanPopup() - // }) - // } // } + // 扫描数量和任务数量相等,直接提交 + if (scanCount.value == subList.value.length) { + submitJob() + } else if (scanCount.value < subList.value.length) { + // 扫描数量小于任务数量,判断是否允许部分提交 + if (jobContent.value.allowPartialComplete == 'TRUE') { + // 提交 + comMessageRef.value.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + submitJob() + } + }) + } else { + // 不允许部分提交,提示 + comMessageRef.value.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + openScanPopup(); + } + }); + } + } } const submitJob = () => { @@ -287,7 +293,7 @@ const submitJob = () => { .then((res) => { uni.hideLoading() if (res.data) { - showCommitSuccessMessage(`提交成功
生成生产退料记录:${res.data}`) + showCommitSuccessMessage(`提交成功\n生成生产退料记录:${res.data}`) } else { showErrorMessage(`提交失败[${res.msg}]`) }