From a3ffaec9c9a81626c34989c7026988cc07b3c3d3 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期二, 16 九月 2025 13:54:24 +0800 Subject: [PATCH] # --- pages/order/orderPakin2.vue | 35 ++++++++++++++++++++--------------- 1 files changed, 20 insertions(+), 15 deletions(-) diff --git a/pages/order/orderPakin2.vue b/pages/order/orderPakin2.vue index d372459..2c5705e 100644 --- a/pages/order/orderPakin2.vue +++ b/pages/order/orderPakin2.vue @@ -77,7 +77,7 @@ <!-- 搴曢儴鎿嶄綔鎸夐挳 --> <view class="buttom"> <button size="mini" @click="reset('warn')">閲嶇疆</button> - <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button> + <button size="mini" type="primary" @click="combConfirm('warn')" :disabled="isDisabled">缁勬墭</button> </view> <!-- 寮圭獥 --> <!-- 淇敼鏁伴噺 --> @@ -169,14 +169,14 @@ matFocus: false, matData: '', removeNum: 0, + isDisabled:false } }, onLoad() { let that = this const eventChannel = this.getOpenerEventChannel(); - eventChannel.on('orderItem', function(data) { - console.log(data.item) + eventChannel.on('orderItem', function(data) { that.orderNo = data.item.orderNo that.checkMat(data.item) }); @@ -210,16 +210,7 @@ barcodeInput() { // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� setTimeout(() => { - var len = this.barcode.length - if (len >= 9 && len <=8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } + var len = this.barcode.length this.focuss() }, 200) }, @@ -331,6 +322,7 @@ }, checkMat(mat) { mat.review = "鏈鏍�" + mat.anfme = mat.enableQty var len = this.dataList.length var add = true ,sameItem = false for (var i = 0; i < len; i++) { @@ -416,9 +408,9 @@ combClose() { this.$refs.combConfirm.close() }, - comb() { - uni.vibrateShort(); + comb() { let that = this; + that.isDisabled = true if (that.orderNo === '') { this.messageText = "璇疯緭鍏ヨ鍗曟潯鐮�" this.messageToggle('error') @@ -479,6 +471,13 @@ that.messageText = res.msg that.messageToggle('error') } + }, + fail: () => { + that.messageText = "鎺ュ彛瓒呮椂" + that.messageToggle('error') + }, + complete: () => { + that.isDisabled = false } }); }, @@ -566,4 +565,10 @@ text-align: center; box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); } + .list:first-child { + margin-top: 420rpx; + } + .list:last-child { + margin-bottom: 120rpx; + } </style> -- Gitblit v1.9.1