From 42084bb341c60fbfbf9052148463dd9bf8e4caaf Mon Sep 17 00:00:00 2001 From: zouyanyan <254651820@qq.com> Date: Mon, 23 Mar 2026 17:03:22 +0800 Subject: [PATCH] upbug0323 --- components/easy-scancode/easy-scancode.vue | 13 +- components/psDetail.vue | 149 +++++++++++---------- pages/pallet/ck.vue | 21 +-- pages/pallet/yz.vue | 7 +- 4 files changed, 105 insertions(+), 85 deletions(-) diff --git a/components/easy-scancode/easy-scancode.vue b/components/easy-scancode/easy-scancode.vue index 1aa6e90..7e141ab 100644 --- a/components/easy-scancode/easy-scancode.vue +++ b/components/easy-scancode/easy-scancode.vue @@ -95,9 +95,9 @@ export default { that.html5QrCode = new Html5Qrcode("reader"); let windowInfo = uni.getWindowInfo(); - console.log(windowInfo); - const width = windowInfo.windowWidth?windowInfo.windowWidth:375; - const height = windowInfo.windowHeight?windowInfo.windowHeight:720; + // console.log(windowInfo); + const width = windowInfo&&windowInfo.windowWidth?windowInfo.windowWidth:375; + const height = windowInfo&&windowInfo.windowHeight?windowInfo.windowHeight:720; // 横屏 const aspectRatio = width / height; @@ -134,6 +134,11 @@ export default { facingMode: "environment", aspectRatio: width < 600 ? mobileAspectRatio : aspectRatio, }, + autofocus:true, //自动对焦 但使用的时候没有体会到 + colorDark: '#0000ff', //加深二维码黑色部分的颜色提高识别度 + colorLight: '#ffffff',//这个应该是提高非黑即白部分的亮度 提高识别度 + visualFeedback:true, //开启视觉反馈 没有体会到 + halfSample:true,//缩小二维码提高识别精度吧 }, (decodedText, decodedResult) => { // 当码被读取时执行操作 @@ -182,6 +187,8 @@ export default { top: 50%; left: 0; transform: translateY(-50%); + width: 100vw; + height: 100vh; } .scan-tip-overlay { diff --git a/components/psDetail.vue b/components/psDetail.vue index 6824c51..5c823d5 100644 --- a/components/psDetail.vue +++ b/components/psDetail.vue @@ -221,146 +221,148 @@ {{ item.groupDesc }} ({{ item.qty?parseFloat(item.qty).toFixed(2):'0.00'}}) - - {{ item.assemcode }} ({{ item.qty?parseFloat(item.qty).toFixed(2):'0.00' }}) - - + + + {{ row.assemcode }} ({{ row.qty?parseFloat(row.qty).toFixed(2):'0.00' }}) + - + 工程编号: - {{ item.project }} + {{ row.project }} 安装托盘表号: - {{ item.instno }} + {{ row.instno }} 制作图号: - {{ item.dwgno }} + {{ row.dwgno }} 规格: - {{ item.spec }} + {{ row.spec }} 材质: - {{ item.grd }} + {{ row.grd }} 数量: - {{ item.qty }} + {{ row.qty }} 重量: - {{ item.weight }} + {{ row.weight }} 表面处理: - {{ item.treatment }} + {{ row.treatment }} 涂装代码: - {{ item.paintcode }} + {{ row.paintcode }} 修改类型: - {{ item.modifyType }} + {{ row.modifyType }} 修改卡号: - {{ item.modifyKh }} + {{ row.modifyKh }} 修改通知单号: - {{ item.modifyDwgno }} + {{ row.modifyDwgno }} 修改日期: - {{ item.modifyDate }} + {{ row.modifyDate }} 制作单位: - {{ item.manuDept }} + {{ row.manuDept }} 处理单位: - {{ item.treatDept }} + {{ row.treatDept }} 工装托盘编号: - {{ item.palletNo }} + {{ row.palletNo }} 配送车辆: - {{ item.deliveryCar }} + {{ row.deliveryCar }} 需求日期: - {{ item.requireRate }} + {{ row.requireRate }} 需求单位: - {{ retType(item.requireDepartCode,2) }} + {{ retType(row.requireDepartCode,2) }} 配送地址: - {{ item.requireAddress }} + {{ row.requireAddress }} 接收人员: - {{ item.requireName }} + {{ row.requireName }} 接收人员电话: - {{ item.requirePhone }} + {{ row.requirePhone }} - + + + @@ -451,44 +453,50 @@ palletNo: this.pallet.palletNo }); if(res.success){ - if(res.data) + if(res.data&&res.data.length>0) { - this.pallet["instdetailList"]=res.data; - // this.pallet["instdetailList"]=[{ - // "id": "b0ce28eb-cf71-466f-952f-17b7663c29f2", - // "project": "T300K-106", - // "instno": "9201FP12010MV", - // "dwgno": "9201MP12MVM", - // "section": "9201", - // "assemcode": "40-CW02-L3S-05", - // "spec": "21.3*2.11", - // "grd": "A312 TP316", - // "qty": "1.000000", - // "weight": "0.6500", - // "treatment": "钝化", - // "status": "配送出库", - // "statusDate": "2026/01/07", - // "manuDept": "九作业区", - // "treatDept": "永合机电", - // "deliverDept": "集配组", - // "palletNo": "", - // "deliveryCar": "284", - // "deliveryDate": "2026/01/07", - // "deliveryRemark": "协商 (刘文禄 2026/01/06)", - // "requireDate": "2026/01/05", - // "requireDepartCode": "P30000", - // "requireAddress": "分段二部装焊厂房(钢加配送)", - // "requireName": "郝名远", - // "requirePhone": "13500795290", - // "groupDesc": "T300K-106 9201FP12010MV", - // "uniStr": "T300K-106 9201FP12010MV 40-CW02-L3S-05\n21.3*2.11 A312 TP316 1.000000" - // }] + this.pallet["instdetailList"]=[]; + res.data.forEach(cell=>{ + var findx = -1; + findx = this.pallet["instdetailList"].findIndex(item => item.groupDesc === cell.groupDesc); + if(findx<0){ + var add = { + ...cell, + items:[cell], + }; + this.pallet["instdetailList"].push(add); + this.$forceUpdate(); + } + else { + this.pallet["instdetailList"][findx].items.push(cell); + this.$forceUpdate(); + } + }); + + this.pallet["instdetailList"].forEach((cell,idx)=>{ + cell["qty"]=this.getQty(cell.items); + this.$forceUpdate(); + }); + + // this.pallet["instdetailList"]=res.data; this.$forceUpdate(); } } } }, + getQty(items){ + var num=0 + if (items&&items.length>0) { + items.forEach(cell=>{ + num=num+1.0*(cell.qty?cell.qty:0); + }); + return num.toFixed(2); + } + else{ + return 0; + } + }, toggleDetail(index) { if (this.expandedIndex === index) { this.expandedIndex = null; @@ -719,6 +727,7 @@ padding: 12rpx; border-radius: 10rpx; border: 1rpx solid #007aff; + background: #e2eefa; } .item-title { display: flex; diff --git a/pages/pallet/ck.vue b/pages/pallet/ck.vue index 5484bdd..4e12547 100644 --- a/pages/pallet/ck.vue +++ b/pages/pallet/ck.vue @@ -310,15 +310,18 @@ if(res.data){ this.ifsm = false; this.trayInfo=res.data; - if(this.trayInfo.loadId){ - console.log(1) - // 查询托盘明细 - this.getYpDetail() - } - else{ - // this.open() // 打开基本详情 - this.openPalletDetail(); // 基本详情 - } + + // 基本详情 全部弹框查询 + this.openPalletDetail(); + + // if(this.trayInfo.loadId){ + // // 查询托盘明细 + // this.getYpDetail() + // } + // else{ + // // this.open() // 打开基本详情 + // this.openPalletDetail(); // 基本详情 + // } } else{ this.ifsm = true; diff --git a/pages/pallet/yz.vue b/pages/pallet/yz.vue index eecd451..f728049 100644 --- a/pages/pallet/yz.vue +++ b/pages/pallet/yz.vue @@ -66,12 +66,13 @@ - - + + +