From 0ec30d4e53d1c72bf774053867b393102d348ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Tue, 12 Nov 2024 10:50:37 +0800 Subject: [PATCH] =?UTF-8?q?issue=E6=96=87=E4=BB=B6=E8=BF=81=E7=A7=BB=20Vue?= =?UTF-8?q?2=E5=8D=87=E7=BA=A7Vue3=2010/25-11/8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deliver/job/deliverDetailBatch.vue | 3 +- .../issue/coms/comIssueDetailCardBatch.vue | 111 ++- src/pages/issue/coms/comScanIssuePack.vue | 25 +- src/pages/issue/job/issueDetail.vue | 11 +- src/pages/issue/job/issueDetailBatch.vue | 785 ++++++++++++++++++ src/pages/issue/job/issueJob.vue | 42 +- 6 files changed, 886 insertions(+), 91 deletions(-) create mode 100644 src/pages/issue/job/issueDetailBatch.vue diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index 516879fb..9d70e51c 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -220,7 +220,8 @@ const getScanResult = (result, managementTypeParams)=> { if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ setDataBatch(result) }else{ - setData(result) + //TODO 无该用法 + // setData(result) } } const setDataBatch = (result)=> { diff --git a/src/pages/issue/coms/comIssueDetailCardBatch.vue b/src/pages/issue/coms/comIssueDetailCardBatch.vue index e5a3855e..38a973fa 100644 --- a/src/pages/issue/coms/comIssueDetailCardBatch.vue +++ b/src/pages/issue/coms/comIssueDetailCardBatch.vue @@ -1,71 +1,55 @@ + + \ No newline at end of file diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue index 0a734666..00ad7868 100644 --- a/src/pages/issue/job/issueJob.vue +++ b/src/pages/issue/job/issueJob.vue @@ -17,7 +17,7 @@ - + @@ -30,7 +30,9 @@ import { ref, getCurrentInstance, nextTick } from 'vue' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { cancleTakeIssueJob, getIssueJobList, getIssueJobByProductionline, closeTakeIssueJob } from '@/api/request2.js' import { goHome, updateTitle } from '@/common/basic.js' - +import { + getManagementPrecisions +} from '@/common/balance.js'; import { getDetailOption, getDetailGiveupOption, getDetailCloseOption } from '@/common/array.js' import { getBusinessType @@ -83,6 +85,9 @@ const fromAreaCode = ref('') const toAreaCode = ref('') const timer = ref(null) const productionLineCode = ref('') +const manageModel = import.meta.env.VITE_MANAGE_MODEL +const managementList = ref([]) +const managementType = ref('') onShow(() => { setTimeout(()=>{ getList('refresh') @@ -187,6 +192,9 @@ const getList = (type) => { uni.hideLoading() if (type === 'refresh') { uni.stopPullDownRefresh() + if(manageModel!='BY_BATCH'){ + openScanPopup() + } } const { list } = res.data @@ -293,7 +301,7 @@ const setQueryParam = ()=>{ return filterParams; } const openJobDetail = (item, scanMessage = '') => { - getJobInfoByNumber(item.number, scanMessage) + getJobInfoByNumber(item, scanMessage) } const showItemList = (itemList)=> { jobListPopupRef.value.openPopup(itemList); @@ -382,7 +390,7 @@ const closeJob = (id) => { showMessage(error) }) } -const getJobInfoByNumber = (number, scanMessageMes)=>{ +const getJobInfoByNumber = (item, scanMessageMes)=>{ uni.showLoading({ title: "加载中....", mask: true @@ -396,7 +404,7 @@ const getJobInfoByNumber = (number, scanMessageMes)=>{ filters.push({ column: "number", action: "==", - value: number + value: item.number }) var params = { @@ -422,11 +430,25 @@ const getJobInfoByNumber = (number, scanMessageMes)=>{ }); return; } - uni.navigateTo({ - url: './issueDetail?id=' + result.masterId + '&status=' + result.status + - '&scanMessage=' + - scanMessageMes + '&title=' + title.value - }); + getManagementPrecisions([item.itemCode], item.fromLocationCode, res => { + if (res.success) { + managementList.value = res.list; + managementType.value = managementList.value && managementList.value[0] && managementList.value[0].ManagementPrecision + if (managementType.value == 'BY_BATCH' || managementType.value == 'BY_QUANTITY') { + uni.navigateTo({ + url: './issueDetailBatch?id=' + result.masterId + '&status=' + result.status + + '&scanMessage=' + + scanMessageMes + '&title=' + title.value + }); + } else { + uni.navigateTo({ + url: './issueDetail?id=' + result.masterId + '&status=' + result.status + + '&scanMessage=' + + scanMessageMes + '&title=' + title.value + }); + } + } + }) scanMessage.value = "" } }).catch(error => {