From 7eb8afbac2b3b6c66c5282521547a57f04a1b684 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期五, 19 八月 2022 14:25:27 +0800 Subject: [PATCH] # --- pages/basics/pakin.vue | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue index 3544f34..f68a897 100644 --- a/pages/basics/pakin.vue +++ b/pages/basics/pakin.vue @@ -99,7 +99,7 @@ </view> <view class="changeBox"> <view class="num-box"> - <uni-number-box v-model="counts" :min="0" :max="99999" color="#747474" /> + <uni-number-box :value="count" :max="99999" color="#747474" @change="changeValue" /> </view> </view> <view class="revise-box-buttom"> @@ -274,7 +274,7 @@ }, success: function(res) { // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('acceptDataFromOpenerPage', {baseIP:that.baseIP, basePORT:that.basePORT }) + res.eventChannel.emit('matData', {baseIP:that.baseIP, basePORT:that.basePORT }) }, }); @@ -324,9 +324,8 @@ var len = this.matList.length var add = true for (var i = 0; i < len; i++) { - console.log(mat.matnr === this.matList[i].matnr); - if (mat.matnr === this.matList[i].matnr) { - this.matList[i].anfme += mat.anfme + if (mat.matNo === this.matList[i].matNo) { + this.matList[i].count += mat.count this.$forceUpdate() // 寮哄埗鍒锋柊 add = false } @@ -366,17 +365,21 @@ }, revise(index) { this.rowNum = index + this.count = this.matList[this.rowNum].count this.$refs.revise.open() }, changeCount(e) { }, + changeValue(value) { + this.count = value + }, // 纭缁勬墭鏁伴噺 confirm() { - this.matList[this.rowNum].count = this.counts - this.$forceUpdate() // 寮哄埗鍒锋柊 + this.matList[this.rowNum].count = this.count this.$refs.revise.close() + this.$forceUpdate() // 寮哄埗鍒锋柊 }, // 鍒楄〃鍙嶉�� reChecked() { -- Gitblit v1.9.1