From eabfdea3f6f37bdcc63d79dccd062210d345d5c2 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期一, 20 三月 2023 08:43:08 +0800 Subject: [PATCH] # --- pages/pakin/pakin.vue | 84 +++++++++++++++++++++--------------------- 1 files changed, 42 insertions(+), 42 deletions(-) diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue index 98008f9..56b9ec9 100644 --- a/pages/pakin/pakin.vue +++ b/pages/pakin/pakin.vue @@ -9,7 +9,7 @@ <view class="code-decs">鐗╂枡鐮�:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆"> <view class="item-right"> - <text style="text-align: right;">鎻愬彇+</text> + <text style="text-align: right;color: #409EFF;">鎻愬彇+</text> <uni-icons type="right" color="#c1c1c1"></uni-icons> </view> </view> @@ -47,7 +47,7 @@ </view> <view class="list-right"> <uni-icons type="compose" color="#c1c1c1" size="24" @click="revise(item,i)"></uni-icons> - <uni-icons type="trash" color="#c1c1c1" size="24" @click="remove(item,i)"></uni-icons> + <uni-icons type="trash" color="#c1c1c1" size="24" @click="remove(item,i,'warn')"></uni-icons> </view> </view> </scroll-view> @@ -58,45 +58,34 @@ </view> <!-- 寮圭獥 --> <!-- 淇敼鏁伴噺 --> - <!-- <uni-popup ref="revise" background-color="#fff"> - <view class="revise-box "> - <view class="" style="position: relative;left: 50px;margin-bottom: 20px;"> - <text style="display: inline-block;float: left;width: 60px;">鍚堝悓鍙凤細</text> - <input type="text" style="width: 100px;border-bottom: 1px solid #9e9e9e;" v-model="dataList.batch"> - </view> - <view class="changeBox"> - <view class="num-box"> - <text style="display: inline-block;float: left;width: 60px;">鏁伴噺锛�</text> - <uni-number-box :value="count" :max="9999" color="#747474" @change="changeValue"/> - </view> - </view> - <view class="revise-box-buttom"> - <view> - <button class="cu-btn bg-blue" @click="confirm()">纭</button> - </view> - </view> - </view> - </uni-popup> --> <view> <uni-popup ref="revise" type="dialog"> <view class="popup"> <!-- 鏍囬 --> - <view class="title">閰� 缃�</view> + <view class="title">淇敼</view> <view class="popup-item"> <view class="popup-item-left">鍚堝悓鍙�:</view> - <view class="popup-item-right"><input type="text"></view> + <view class="popup-item-right"><input type="text" v-model="batch"></view> </view> <view class="popup-item"> <view class="popup-item-left">鏁伴噺:</view> <view class="popup-item-right" style="border: none;justify-content: center;"> - <uni-number-box :value="dataList.concat" :max="9999" color="#747474" @change="changeValue"/> + <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue"/> </view> </view> <view class="btn"> <view class="btn-left" @click="close">鍙栨秷</view> - <view class="btn-right">纭</view> + <view class="btn-right" @click="confirm()">纭</view> </view> </view> + </uni-popup> + </view> + <!-- 鍒犻櫎纭 --> + <view> + <!-- 鎻愮ず绐楃ず渚� --> + <uni-popup ref="alertDialog" type="dialog"> + <uni-popup-dialog :type="msgType" title="閫氱煡" content="鏄惁鍒犻櫎褰撳墠鍟嗗搧!" @confirm="removeConfirm" + @close="removeClose"></uni-popup-dialog> </uni-popup> </view> </view> @@ -106,7 +95,9 @@ export default { data() { return { - dataList: [{ + dataList: + [ + { matnr: "whycq19950222222-232321111", maktx: "wusuowei", specs: "涓�", @@ -150,9 +141,10 @@ anfme: "12" } ], - count: '', + count: 0, rowNum: '', - + batch: '', + msgType: 'success', } }, onLoad() { @@ -161,30 +153,38 @@ methods: { revise(item,i) { this.count = this.dataList[i].anfme - // var maxCount = this.matList[index].maxCount - // if (maxCount == undefined ) { - // this.matList[index]["maxCount"] = item.enableQty - // } - // this.enableQty = item.enableQty - // this.count = this.minCount - // this.maxCount = item.maxCount + this.batch = this.dataList[i].batch this.rowNum = i this.eject() }, eject(type) { this.type = type - // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦� uni-popup 缁勪欢涓婄粦瀹� type灞炴�� this.$refs.revise.open(type) }, // 鍒楄〃鍒犻櫎鎸夐挳 - remove(item,index) { - this.dataList.splice(index,1) + remove(item,i,type) { + this.msgType = type + this.$refs.alertDialog.open(i) + }, + // 纭鍒犻櫎 + removeConfirm(i) { + this.dataList.splice(i,1) + }, + // 鍙栨秷鍒犻櫎 + removeClose() { + this.$refs.alertDialog.close() }, confirm() { - this.dataList[this.rowNum].anfme = this.dataList.count - this.dataList[this.rowNum].batch = this.dataList.batch + this.dataList[this.rowNum].anfme = this.count + this.dataList[this.rowNum].batch = this.batch this.$refs.revise.close() this.$forceUpdate() // 寮哄埗鍒锋柊 + }, + close() { + this.$refs.revise.close() + }, + changeValue(value) { + this.count = value }, } } @@ -197,7 +197,7 @@ position: fixed; min-height: 200rpx; background-color: #FFF; - z-index: 999; + z-index: 10; } .item { display: flex; @@ -231,7 +231,7 @@ background-color: white; position: fixed; margin-top: 200rpx; - z-index: 998; + z-index: 9; /* border-top: 1px solid #DCDFE6; */ text-align: center; box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.5); -- Gitblit v1.9.1