From 5df158f54eb0c7e0e0ba79eb172aaba42735a221 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期六, 26 二月 2022 17:59:48 +0800
Subject: [PATCH] #
---
pages/basics/combPro.vue | 37 +++++++++++++++++++++++++++++++------
1 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/pages/basics/combPro.vue b/pages/basics/combPro.vue
index 1908e82..bd16c60 100644
--- a/pages/basics/combPro.vue
+++ b/pages/basics/combPro.vue
@@ -11,7 +11,7 @@
</view>
</form>
<view class="margin-top">
- <uni-table ref="table" border stripe emptyText="鏆傛棤鏇村鏁版嵁" rowKey="">
+ <uni-table ref="table" border stripe emptyText="鏆傛棤鏇村鏁版嵁" type="selection" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center" width="90">鏁伴噺</uni-th>
<uni-th align="center" width="90">浜у搧浠e彿</uni-th>
@@ -37,6 +37,9 @@
</uni-table>
</view>
<view>
+ <button class ="delTable" @click="delTable">鎵归噺鍒犻櫎</button>
+ </view>
+ <view>
<button class="cu-btn bg-yellow pda-btn" @click="comb()">缁� 鎵�</button>
<button class="cu-btn bg-grey pda-btn" @click="reset">閲� 缃�</button>
</view>
@@ -53,7 +56,6 @@
placeholder="璇疯緭鍏ョ粍鎵樻暟閲�" @confirm="dialogInputConfirm">
<uni-number-box :min="minCount" :max="maxCount" v-model="value" />
</uni-popup-dialog>
-
</uni-popup>
</view>
</view>
@@ -69,12 +71,13 @@
type: '',
msgType: '',
messageText: '',
- minCount:1,
+ minCount:0,
maxCount:1,
rowNum:'',
value:'',
couChange:true,
baseIP:'',
+ selectArr : [],
}
@@ -84,6 +87,22 @@
this.baseIP = UIP
},
methods: {
+ // 澶氶��
+ selectionChange(e) {
+ // 鑾峰彇閫変腑鐘舵��
+ console.log(e.detail.index)
+ this.selectedIndexs = e.detail.index
+ },
+ //鎵归噺鍒犻櫎
+ delTable() {
+ //瀹炵幇鍏ㄩ�夊垹闄ゅ拰澶氶�夊垹闄�
+ let len = this.selectedIndexs.length
+ for (let i = 0; i < len; i++) {
+ this.matData.splice(this.selectedIndexs[i],1)
+ }
+ this.selectedIndexs = ''
+
+ },
reset:function() {
this.billNo = '';
this.code = '';
@@ -119,7 +138,6 @@
},
method: 'POST',
success(res){
- console.log(res)
if(res.data.code === 200){
if(res.data.data != null){
that.addTableData(res.data.data)
@@ -155,7 +173,7 @@
this.$refs.inputDialog.open()
this.maxCount = item.count
this.rowNum = index
- this.value = this.maxCount
+ this.value = this.minCount
},
// 淇敼鏁伴噺寮圭獥
dialogInputConfirm() {
@@ -220,5 +238,12 @@
</script>
<style>
-
+ .delTable {
+ margin-left:0;
+ margin-right: auto;
+ width: 200rpx;
+ height: 80rpx;
+ font-size: 30upx;
+ font-weight: bold;
+ }
</style>
--
Gitblit v1.9.1