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 => {