From ffbf023869b73dd342463f516d34fe9b069e1cbb Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期四, 21 七月 2022 15:15:22 +0800 Subject: [PATCH] # --- pages/basics/pakin.vue | 77 ++++++++++++++------------------------ 1 files changed, 28 insertions(+), 49 deletions(-) diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue index b1fb132..3985088 100644 --- a/pages/basics/pakin.vue +++ b/pages/basics/pakin.vue @@ -87,7 +87,8 @@ <!-- 寮圭獥 --> <!-- 淇敼鏁伴噺 --> - <uni-popup ref="revise" background-color="#fff" @change="change"> + + <uni-popup ref="revise" background-color="#fff"> <view class="revise-box"> <view class="revise-box-top"> <view class="color-block-blue"></view> @@ -126,6 +127,7 @@ matList:[], result: '', enableQty:'', + count:'', counts:'', minCount:0, maxCount:'', @@ -210,12 +212,6 @@ }, remove(item,index) { this.matList.splice(index,1) - - // for (var i = 0; i < this.matList.length; i++) { - // if (this.matList[i].checked == true) { - // this.matList.splice(i,1) - // } - // } this.checkList(); uni.vibrateShort(); }, @@ -329,58 +325,41 @@ this.$refs.goodsSearch.open(type) }, checkbox: function (e) { - var items = this.matList, - values = e.detail.value; - for (var i = 0, lenI = items.length; i < lenI; ++i) { - const item = items[i] - item.id = item.id + '' - if(values.indexOf(item.id) >= 0){ - this.$set(item,'checked',true) - }else{ - this.$set(item,'checked',false) - } - } - if (values.length == items.length) { - this.check = true - this.checkText = "鍙栨秷鍏ㄩ��" - } else { - this.check = false - this.checkText = "鍏ㄩ��" - } - uni.vibrateShort(); + // var items = this.matList, + // values = e.detail.value; + // for (var i = 0, lenI = items.length; i < lenI; ++i) { + // const item = items[i] + // item.id = item.id + '' + // if(values.indexOf(item.id) >= 0){ + // this.$set(item,'checked',true) + // }else{ + // this.$set(item,'checked',false) + // } + // } + // if (values.length == items.length) { + // this.check = true + // this.checkText = "鍙栨秷鍏ㄩ��" + // } else { + // this.check = false + // this.checkText = "鍏ㄩ��" + // } + // uni.vibrateShort(); }, revise(index) { - this.rowNum = index - this.$refs.revise.open() - - // this.matList[this.rowNum].count = this.count - // this.eject() - // var maxCount = this.item.maxCount - // if (maxCount == undefined ) { - // this.matList[index]["maxCount"] = item.enableQty - // } - // this.enableQty = item.enableQty - // this.count = this.minCount - // this.maxCount = item.maxCount - + }, + changeCount(e) { }, - eject() { - // this.type = type - // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦� uni-popup 缁勪欢涓婄粦瀹� type灞炴�� - this.$refs.revise.open() - }, - // 纭缁勬墭鏁伴噺 confirm() { - this.matList[this.rowNum].count = this.counts - this.matList = this.matList - console.log(this.counts) - console.log(this.matList[this.rowNum].count) + console.log(this.counts ) + this.matList[this.rowNum].count = this.counts this.$refs.revise.close() + + }, // 鍒楄〃鍙嶉�� reChecked() { -- Gitblit v1.9.1