From 14cbdc9dc91afe3ade9f1720f573f54f2207ab94 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期一, 23 九月 2024 17:45:14 +0800
Subject: [PATCH] feat:记住密码,合卡功能

---
 subPages/unionCard/unionCard.vue |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 53 insertions(+), 5 deletions(-)

diff --git a/subPages/unionCard/unionCard.vue b/subPages/unionCard/unionCard.vue
index f8e0181..7098743 100644
--- a/subPages/unionCard/unionCard.vue
+++ b/subPages/unionCard/unionCard.vue
@@ -2,12 +2,14 @@
   <view class="warp">
     <view class="table">
 			<uni-table border stripe 
+      type="selection"
+      ref="table1"
+       @selection-change="selectionChange"
 			emptyText="鏆傛棤鏇村鏁版嵁">
 					<uni-tr>
 					    <uni-th align="center">璁㈠崟缂栧彿</uni-th>
 						<uni-th align="center">浜у搧</uni-th>
 					    <uni-th align="center">瀹㈡埛</uni-th>
-              <uni-th align="center">鎿嶄綔</uni-th>
 					</uni-tr>
 					<uni-tr v-for="(item, index) in subDataList" :key="index">
 						<uni-td align="center">
@@ -18,11 +20,19 @@
           <uni-td>
 						<view class="name">{{ item.customerName }}</view>
 					</uni-td>
-          <uni-td align="center">
-            <view><u-button type='primary' text='閫夋嫨'  size='mini' @click="checkOrder(item)"></u-button></view></uni-td>
 				</uni-tr>
 				</uni-table>
+   
 		 </view>
+     <view class="confirm-build">
+			<view class="confirm-build_block">
+				<u-button text="纭鍒涘缓"
+        type="primary"
+					@click="confirmBuild"
+					:loading="buildLoading"
+					:disabled="abledBuild"></u-button>
+			</view>
+		</view>
   </view>
 
 </template>
@@ -33,16 +43,19 @@
         return {
           params:{},
           subDataList:[],
-            
+          checkList:[],
+          tempArr:[],
         }
     },
     onShow(){
 
     },
     onLoad(params){
-        console.log(JSON.parse(params.unionParams) ,'params')
+        console.log(JSON.parse(params.unionParams),params,'params')
         this.params =  JSON.parse(params.unionParams) ;
+        this.tempArr = JSON.parse(params.checkArray)
         this.init();
+        console.log(this.tempArr,'tempArr')
 
     },
     methods: {
@@ -51,6 +64,16 @@
           console.log(res,'resss')
           if(res.data){
             this.subDataList = res.data;
+            this.subDataList.forEach((item,i)=>{
+              this.tempArr.forEach((el,index)=>{
+                if(item.id === el.id){
+                  this.$nextTick(() => {
+                this.$refs.table1.toggleRowSelection(i,true)
+              })
+                }
+              })
+            })
+            
           }
         })
       },
@@ -60,6 +83,15 @@
 					delta: 1
 				})
 
+      },
+      selectionChange(e){
+        console.log(e,'eeee')
+        this.subDataList.forEach((element,i) => {
+          this.checkList.push(this.subDataList[i])
+       });
+      },
+      confirmBuild(){
+        this.checkOrder(this.checkList)
       }
         
     },
@@ -79,5 +111,21 @@
     width: 100%;
     height: calc(100vh - 10vh);
 }
+.confirm-build {
+			width: 100%;
+			height: vww(60);
+			background-color: #ffffff;
+			position: fixed;
+			bottom: 0;
+			box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+			border-radius: 20rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			&_block {
+				width: 94%;
+			}
+		}
 
 </style>
\ No newline at end of file

--
Gitblit v1.9.1