From 804cde655f49ff8ad8e51ff97476c3d75ece7f90 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 2 Sep 2024 19:55:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=202024/6/20=2013:22:38?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hybrid/html/point.html | 26 +++++++++++--------- src/mycomponents/jobList/jobList.vue | 3 ++- src/mycomponents/scan/winComScan.vue | 1 + src/pages/issue/coms/comScanIssuePack.vue | 7 +++--- src/pages/issue/job/issueDetail.vue | 13 +++++++--- src/pages/issue/job/issueJob.vue | 18 ++++++++------ src/pages/point/index.vue | 2 +- src/pages/purchaseReceipt/job/receiptJob.vue | 2 +- 8 files changed, 44 insertions(+), 28 deletions(-) diff --git a/src/hybrid/html/point.html b/src/hybrid/html/point.html index bd147d80..f71a94e1 100644 --- a/src/hybrid/html/point.html +++ b/src/hybrid/html/point.html @@ -11,12 +11,12 @@ }); - diff --git a/src/mycomponents/jobList/jobList.vue b/src/mycomponents/jobList/jobList.vue index 62820e98..0b54e7ee 100644 --- a/src/mycomponents/jobList/jobList.vue +++ b/src/mycomponents/jobList/jobList.vue @@ -28,6 +28,7 @@ const openList = (listParmas) => { show.value = true } const selectItem = (item, index) => { + show.value = false emit('selectItem', item) } @@ -46,7 +47,7 @@ defineExpose({ .list { width: 80%; - max-height: 80vh; + max-height: 50vh; overflow-y: auto; border-radius: 10px !important; diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue index c483bfe5..4ef3c8a9 100644 --- a/src/mycomponents/scan/winComScan.vue +++ b/src/mycomponents/scan/winComScan.vue @@ -154,6 +154,7 @@ const handelScanMsg = () => { getLabelInfo(content, props.headerType, (callback) => { // uni.hideLoading(); const scanResult = callback + scanResult.scanMessage = content if (scanResult.success) { clear() // that.getfocus();//不能自动获取焦点 diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index 86d9fc8d..bf07eb15 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -105,7 +105,7 @@ onMounted(() => { detailOptions.value = getDetailOption() scanOptions.value = getDetailEditRemoveOption() }) -const openScanPopupForJobSimulate = (content, jobcontentParams) => { +const openScanPopupForJobSimulate = (content, jobcontentParams, scanMessage) => { issueRecord.value = [] dataContent.value = content jobContent.value = jobcontentParams @@ -117,7 +117,7 @@ const openScanPopupForJobSimulate = (content, jobcontentParams) => { if (timer) { clearTimeout(timer) } - comscansimulate.value.vlaue.setItemCodeSimulate(item.copyContent) + comscansimulate.value.vlaue.setItemCodeSimulate(scanMessage) comscansimulate.value.vlaue.clickScanMsg() }, 500) } @@ -464,7 +464,8 @@ const cancle = () => { const emit = defineEmits(['updateData', 'closeScan', 'afterScan']) defineExpose({ openScanPopup, - closeScanPopup + closeScanPopup, + openScanPopupForJobSimulate }) diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index ea82231b..0b365bf0 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -64,7 +64,7 @@ const detailSource = ref([]) // 绑定在页面上的数据源 const detailOptions = ref([]) const scanOptions = ref([]) const jobStatus = ref('') -const scanedPackingNumber = ref('') +const scanMessage = ref('') const scanPopup = ref() const comScanIssuePackRef = ref() const comMessageRef = ref() @@ -73,7 +73,7 @@ const managementList = ref([]) const comIssueDetailCardRef = ref() onLoad((option) => { id.value = option.id - scanedPackingNumber.value = option.scaned + scanMessage.value = option.scanMessage if (id.value != undefined) { // 新建的任务自动接收 if (option.status == '1') { @@ -141,7 +141,10 @@ const getDetail = () => { jobStatus.value = res.data.status subList.value = res.data.subList detailSource.value = getDataSource(detailSource.value, subList.value) - + // 任务中已经扫描,模拟扫描赋值 + if (scanMessage.value) { + openScanPopupSimulate(scanMessage.value) + } setTimeout((r) => { resizeCollapse() }, 100) @@ -305,6 +308,7 @@ const updateData = (record) => { item.handleQty = itemHandleQty } const afterScan = () => { + resizeCollapse() detailSource.value.forEach((detail) => { const s = '' detail.Items.forEach((item) => { @@ -376,6 +380,9 @@ const openScanDetailPopup = () => { // Object.assign(datacontent, this.detailSource); comScanIssuePackRef.value.openScanPopup(detailSource.value, jobContent.value) } +const openScanPopupSimulate = (scanMessage) => { + comScanIssuePackRef.value.openScanPopupForJobSimulate(detailSource.value, jobContent.value, scanMessage) +} const closeScanPopup = () => { updateCommitBtn() } diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue index 247f9f84..d3b468ac 100644 --- a/src/pages/issue/job/issueJob.vue +++ b/src/pages/issue/job/issueJob.vue @@ -12,9 +12,9 @@ - + - + @@ -35,7 +35,7 @@ import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue' -import jobList from '@/mycomponents/jobList/jobList.vue' +import jobListView from '@/mycomponents/jobList/jobList.vue' const { proxy } = getCurrentInstance() const jobList = ref([]) @@ -50,6 +50,7 @@ const status = ref('1,2') // 待处理 、进行中 const detailOptions = ref([]) const detailGiveupOptions = ref([]) const filter = ref() +const scanMessage = ref('') const comMessageRef = ref() const jobInfoPopupRef = ref() const jobListPopupRef = ref() @@ -166,15 +167,15 @@ const getList = (type, fromLocationCode = '', productionLineCode = '') => { }) } -const openJobDetail = (item, packingNumber = '') => { - proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`) +const openJobDetail = (item, scanMessage = '') => { + proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}`) } const selectedItem = (item) => { openJobDetail(item) } const selectItem = (item) => { scanPopup.value.closeScanPopup() - openJobDetail(item, item.packingNumber) + openJobDetail(item, scanMessage.value) } const swipeClick = (index, index1) => { // var text = clearTirmAndWrap(requestList.value[index].options[index].text) @@ -323,6 +324,7 @@ const getScanResult = (result) => { by: 'asc' }) .then((res) => { + scanMessage.value = result.scanMessage const resultList = res.data.list if (resultList.length > 0) { resultList.forEach((item) => { @@ -338,10 +340,10 @@ const getScanResult = (result) => { if (list.length > 1) { jobListRef.value.openList(list) } else { - selectItem(list[0]) + selectItem(list[0], scanMessage) } } else { - showMessage('未查找到任务') + showMessage(`物料号[${result.label.itemCode}]批次[${result.label.batch}]未查找到任务`) } }) .catch((error) => { diff --git a/src/pages/point/index.vue b/src/pages/point/index.vue index 91f5f276..80ac1f2b 100644 --- a/src/pages/point/index.vue +++ b/src/pages/point/index.vue @@ -277,7 +277,7 @@ width: 0px; display: flex; align-items: center; - word-wrap: break-word; + word-break: break-all; } .right { diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue index 3d84fbe6..1e3700c1 100644 --- a/src/pages/purchaseReceipt/job/receiptJob.vue +++ b/src/pages/purchaseReceipt/job/receiptJob.vue @@ -11,7 +11,7 @@ - +