From 9faeba0b7e07e5f3598237ece68d5fcafd5e1291 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Sun, 4 Feb 2024 16:35:51 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=AB=E6=8F=8F=E6=89=98=E7=A0=81=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/request2.js | 10 ++ common/style/new_style.css | 11 ++ common/style/pdabasic.css | 2 +- mycomponents/container/container.vue | 24 ++++ mycomponents/qty/stdPackQty.vue | 6 +- mycomponents/recommend/recommend.vue | 7 + mycomponents/scan/winScanPackAndCont.vue | 134 ++++++++++++++++++ .../coms/comReceiptDetailCard.vue | 3 +- .../coms/comReceiptJobCard.vue | 4 +- pages/purchaseReceipt/job/receiptDetail.vue | 108 +++++++++----- pages/query/container.vue | 24 ++-- 11 files changed, 283 insertions(+), 50 deletions(-) create mode 100644 mycomponents/container/container.vue create mode 100644 mycomponents/scan/winScanPackAndCont.vue diff --git a/api/request2.js b/api/request2.js index 4bdd9c61..f525bb05 100644 --- a/api/request2.js +++ b/api/request2.js @@ -109,6 +109,16 @@ export function getWarehouseCodeList(pageNo,pageSize) { }); } +//获取产品标签信息inventorylabel +export function getInventoryLabel (code){ + + return request({ + url: baseApi + "/api/pda/label/inventorylabel/by-code?code="+code, + method: "get", + data: {}, + }); +} + /** * 获取消息列表 * @param {*} diff --git a/common/style/new_style.css b/common/style/new_style.css index 0ff8e4ab..83a2cd46 100644 --- a/common/style/new_style.css +++ b/common/style/new_style.css @@ -2089,6 +2089,17 @@ button::after { padding: 5px; } +.card_container { + color: #0076F6; + padding: 5px; +} + + +.card_container_content { + font-size: 32rpx; + padding: 5px; +} + .card_business { color: #F1A532; padding: 5px; diff --git a/common/style/pdabasic.css b/common/style/pdabasic.css index 7b7f368a..d3b92cec 100644 --- a/common/style/pdabasic.css +++ b/common/style/pdabasic.css @@ -733,7 +733,7 @@ page { .page-header .header_item { /* padding-left: 10rpx; */ padding: 5rpx 10rpx; - font-size:15px ; + font-size:32rpx ; } .page-header .header_job_top { diff --git a/mycomponents/container/container.vue b/mycomponents/container/container.vue new file mode 100644 index 00000000..cf510da1 --- /dev/null +++ b/mycomponents/container/container.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/mycomponents/qty/stdPackQty.vue b/mycomponents/qty/stdPackQty.vue index 45202997..7ab4cf07 100644 --- a/mycomponents/qty/stdPackQty.vue +++ b/mycomponents/qty/stdPackQty.vue @@ -1,14 +1,14 @@ + + diff --git a/pages/purchaseReceipt/coms/comReceiptDetailCard.vue b/pages/purchaseReceipt/coms/comReceiptDetailCard.vue index 558edb41..72bb2983 100644 --- a/pages/purchaseReceipt/coms/comReceiptDetailCard.vue +++ b/pages/purchaseReceipt/coms/comReceiptDetailCard.vue @@ -6,7 +6,7 @@ - + @@ -14,6 +14,7 @@ + diff --git a/pages/purchaseReceipt/coms/comReceiptJobCard.vue b/pages/purchaseReceipt/coms/comReceiptJobCard.vue index 1465fafb..8c8ddfd2 100644 --- a/pages/purchaseReceipt/coms/comReceiptJobCard.vue +++ b/pages/purchaseReceipt/coms/comReceiptJobCard.vue @@ -1,11 +1,11 @@ @@ -75,7 +77,7 @@ import winScanButton from '@/mycomponents/scan/winScanButton.vue' - import winScanPack from '@/mycomponents/scan/winScanPack.vue' + import winScanPackAndCont from '@/mycomponents/scan/winScanPackAndCont.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import comMessage from '@/mycomponents/common/comMessage.vue' import comReceiptDetailCard from '@/pages/purchaseReceipt/coms/comReceiptDetailCard.vue' @@ -85,7 +87,7 @@ name: 'receipt_detail', components: { winScanButton, - winScanPack, + winScanPackAndCont, comReceiptDetailCard, requiredLocation, comMessage, @@ -101,10 +103,11 @@ detailSource: [], //绑定在页面上的数据源 toLocationTypeList: [], toLocationCode: '', + jobToLocationCode: "", toLocationInfo: {}, businessTypeInfo: {}, managementList: [], - jobStatus:"" + jobStatus: "" }; }, onLoad(option) { @@ -130,7 +133,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.jobStatus=="2") { + if (this.jobStatus == "2") { //取消承接任务 cancleTakePurchaseReceiptJob(this.id).then(res => { uni.navigateBack(); @@ -186,8 +189,10 @@ that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes); // that.jobContent.toLocationTypeList = that.toLocationTypeList; that.subList = res.data.subList; + that.subList[0].containerNumber = "CN-00000001"; + that.subList[1].containerNumber = "CN-00000001"; that.jobStatus = res.data.status - that.toLocationCode = that.subList[0].toLocationCode + that.jobToLocationCode = that.subList[0].toLocationCode that.detailSource = getDataSource(that.subList) } else { that.showMessage('列表数据为0'); @@ -203,30 +208,57 @@ getScanResult(result) { try { - var packingNumber = result.label.packingNumber; - var batch = result.label.batch; - var qty = result.label.qty; var itemCode = result.label.itemCode; var detail = this.detailSource.find(r => r.itemCode == itemCode); if (detail == undefined) { - this.showMessage("物料号【" + itemCode + "】不在列表中") - } else { - var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); - if (itemDetail == undefined) { - this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") + this.showErrorMessage("物料号【" + itemCode + "】不在列表中") + return; + } + if (result.label.labelType == "ContainerLabel") { + var containerNumber = result.label.container; + var itemDetail = detail.subList.filter(r => r.containerNumber == containerNumber); + if (itemDetail.length == 0) { + this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】不在列表中") } else { - if (itemDetail.scaned) { - this.showMessage("箱码【" + packingNumber + "】已经扫描") + if (itemDetail[0].scaned) { + this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】已经扫描") } else { - itemDetail.scaned = true; + itemDetail.forEach(item => { + item.scaned = true; + item.handleQty = item.qty; + item.toLocationCode = this.toLocationCode; + }) this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 - itemDetail.handleQty = Number(result.label.qty); - itemDetail.toLocationCode = this.toLocationCode; - itemDetail.labelQty = Number(result.label.qty); calcHandleQty(this.detailSource); this.continueScan() this.$forceUpdate() - var list = this.detailSource[0].subList; + } + } + } else if (result.label.labelType == "PurchaseLabel") { + var packingNumber = result.label.packingNumber; + var batch = result.label.batch; + var qty = result.label.qty; + var detail = this.detailSource.find(r => r.itemCode == itemCode); + if (detail == undefined) { + this.showMessage("物料号【" + itemCode + "】不在列表中") + } else { + var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == + batch); + if (itemDetail == undefined) { + this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") + } else { + if (itemDetail.scaned) { + this.showMessage("箱码【" + packingNumber + "】已经扫描") + } else { + itemDetail.scaned = true; + this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 + itemDetail.handleQty = Number(result.label.qty); + itemDetail.toLocationCode = this.toLocationCode; + itemDetail.labelQty = Number(result.label.qty); + calcHandleQty(this.detailSource); + this.continueScan() + this.$forceUpdate() + } } } } @@ -252,14 +284,24 @@ }, scanLocationCode(location, code) { - this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { - this.toLocationCode = code - this.detailSource.forEach(item => { - item.subList.forEach(detail => { - detail.toLocationCode = code - }) - }) - }) + if(this.jobContent.allowModifyLocation == 'TRUE'){ + this.toLocationCode = code; + }else { + if(code==this.jobToLocationCode){ + this.toLocationCode =code; + }else { + this.showErrorMessage("任务设置中不允许修改库位,扫描的库位【"+code+"】与推荐的库位【"+this.jobToLocationCode+"】不一致") + } + } + + // this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + // this.toLocationCode = code + // this.detailSource.forEach(item => { + // item.subList.forEach(detail => { + // detail.toLocationCode = code + // }) + // }) + // }) }, commit() { @@ -317,7 +359,7 @@ if (res.data) { this.showCommitSuccessMessage("提交成功
生成采购收货记录
" + res.data) } else { - this.showErrorMessage("提交失败[" + res.msg+"]") + this.showErrorMessage("提交失败[" + res.msg + "]") } }).catch(error => { uni.hideLoading() diff --git a/pages/query/container.vue b/pages/query/container.vue index defebb34..c0d5a2c6 100644 --- a/pages/query/container.vue +++ b/pages/query/container.vue @@ -7,7 +7,7 @@