From d123ca35bb3ec4982af44aeb1ffffa8a3569a21b Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期五, 25 七月 2025 13:25:22 +0800 Subject: [PATCH] 代码提交 --- pages/QC/LLJ/ScanCode.vue | 87 ++++++++++++++++++++++++++++--------------- 1 files changed, 57 insertions(+), 30 deletions(-) diff --git a/pages/QC/LLJ/ScanCode.vue b/pages/QC/LLJ/ScanCode.vue index e869a76..cb3e460 100644 --- a/pages/QC/LLJ/ScanCode.vue +++ b/pages/QC/LLJ/ScanCode.vue @@ -2,14 +2,14 @@ <view class="container"> <!-- 涓诲唴瀹瑰尯 --> <!-- <view class="scan-container"> --> - <text class="main-title">鏉ユ枡鎵爜妫�楠�</text> - <text class="subtitle">璇峰鍑嗙墿鏂欐潯鐮侊紝淇濇寔10-15cm璺濈</text> - <!-- 鎵弿妗� --> - <view class="scan-box" @click="startScan"> - <view class="scan-line" :style="{top: linePosition + '%'}"></view> - </view> - <!-- 鎵嬪姩杈撳叆 --> - <!-- <button class="manual-input" @click="showManualInput">鎵嬪姩杈撳叆鏉$爜</button> --> + <text class="main-title">鏉ユ枡鎵爜妫�楠�</text> + <text class="subtitle">璇峰鍑嗙墿鏂欐潯鐮侊紝淇濇寔10-15cm璺濈</text> + <!-- 鎵弿妗� --> + <view class="scan-box" @click="startScan"> + <view class="scan-line" :style="{top: linePosition + '%'}"></view> + </view> + <!-- 鎵嬪姩杈撳叆 --> + <!-- <button class="manual-input" @click="showManualInput">鎵嬪姩杈撳叆鏉$爜</button> --> <!-- </view> --> <!-- 鎵嬪姩杈撳叆寮圭獥 --> <!-- <uni-popup ref="inputPopup" type="dialog"> @@ -18,7 +18,7 @@ </uni-popup> --> </view> </template> - + <script> export default { data() { @@ -62,36 +62,63 @@ data: { Barcode: code } - }).then(ress => { - if (ress.data.tbBillList.length > 0) { + }).then(ress => { + if (ress.status == 0) { + if (ress.data.tbBillList.length > 0) { - if (ress.data.tbBillList[0].fsubmit === 1) { + if (ress.data.tbBillList[0].fsubmit === 1) { - uni.navigateTo({ - url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data - .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] - .releaseNo + - '¤t=B' - }) + uni.navigateTo({ + url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data + .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] + .releaseNo + + '¤t=B' + }) + } else { + uni.navigateTo({ + url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data + .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] + .releaseNo + + '¤t=A' + }) + + + // uni.showModal({ + // title: '寮�濮嬫楠�', + // content: '寮�濮嬫楠屽皢璁板綍褰撳墠鏃堕棿涓哄紑濮嬫楠屾椂闂达紝纭畾寮�濮嬶紵', + // success: function(res) { + // if (res.confirm) { + // uni.navigateTo({ + // url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data + // .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] + // .releaseNo + + // '¤t=A' + // }) + // } else { + + // } + // } + // }) + } + } else { - - uni.navigateTo({ - url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data - .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] - .releaseNo + - '¤t=A' + uni.showModal({ + title: '鎵爜閿欒', + content: '鏈煡璇㈠埌鏉$爜銆�' + code + '銆戠浉鍏冲崟鎹唴瀹�', + showCancel: false }) + //showScanError('鎻愮ず锛氭湭鏌ヨ鍒版潯鐮併��' + res.result + '銆戠浉鍏冲崟鎹唴瀹�') + //this.msg = '鎻愮ず锛氭湭鏌ヨ鍒版潯鐮併��' + res.result + '銆戠浉鍏冲崟鎹唴瀹�' } - } else { + console.log(ress.data.message); uni.showModal({ - title: '鎵爜閿欒', - content: '鏈煡璇㈠埌鏉$爜銆�' + code + '銆戠浉鍏冲崟鎹唴瀹�', + title: '鎻愮ず', + content: ress.message, showCancel: false }) - //showScanError('鎻愮ず锛氭湭鏌ヨ鍒版潯鐮併��' + res.result + '銆戠浉鍏冲崟鎹唴瀹�') - //this.msg = '鎻愮ず锛氭湭鏌ヨ鍒版潯鐮併��' + res.result + '銆戠浉鍏冲崟鎹唴瀹�' } + }) }, @@ -102,7 +129,7 @@ // 纭鎵嬪姩杈撳叆 confirmManualInput(value) { - + this.handleScanResult(value) }, -- Gitblit v1.9.3