shish il y a 1 an
Parent
commit
d61a6d524a
2 fichiers modifiés avec 81 ajouts et 19 suppressions
  1. 71 9
      ghsApp/src/admin/billing/affirm.vue
  2. 10 10
      ghsApp/src/admin/order/statBook.vue

+ 71 - 9
ghsApp/src/admin/billing/affirm.vue

@@ -198,17 +198,32 @@
 
 
           <tui-list-cell class="line-cell" :arrow="true">
           <tui-list-cell class="line-cell" :arrow="true">
             <div class="tui-title">开单人</div>
             <div class="tui-title">开单人</div>
-            <picker mode="selector" :value="form.getStaffId" :range="staffList" range-key="name" @change="kdChange" class="tui-input" >
-              <input v-model="form.getStaffId" name="getStaffId" type="text" hidden />
-              <div style="padding:6upx 0 6upx 0;" v-if="form.getStaffName!=''">{{form.getStaffName}}</div>
-              <div v-else style="padding:6upx 0 6upx 0;color:#CCCCCC;">请选择</div>
-            </picker>
+            <view class="uni-input" v-if="form.getStaffId==0" style="color:#CCCCCC;width:400upx;" @click="changeStaff()">请选择</view>
+            <view class="uni-input" v-else @click="changeStaff()" style="width:400upx;">{{ form.getStaffName ? form.getStaffName : '请选择' }}</view>
           </tui-list-cell>
           </tui-list-cell>
 
 
+          <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+            <view style="max-height:80vh;overflow: scroll;">
+              <view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
+              <view style="display:flex;padding:20upx;height:auto;justify-content: flex-start;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+                <view v-for="(item, index) in staffList" :key="index" style="margin-bottom:20upx;margin-left:3upx;">
+                  <button
+                    class="admin-button-com staff-btn"
+                    @click.stop="getCurrentStaff(item)"
+                    :class="{'selected': form.getStaffId === item.id}"
+                  >
+                    {{ item.name }}
+                  </button>
+                </view>
+              </view>
+              <view style="text-align:center;padding:10upx 0 10upx 0;"><button class="admin-button-com big blue" @click="cancelCurrentStaff()">取消选择</button></view>
+            </view>
+          </uni-popup>
+
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 						<view class="tui-title">账单日期</view>
 						<view class="tui-title">账单日期</view>
-            <view class="uni-input" v-if="form.historyDate==''" style="color:#CCCCCC;" @click="bindHistoryDateChange">请选择,默认当天</view>
-            <view class="uni-input" @click="bindHistoryDateChange">{{form.historyDate}}</view>
+            <view class="uni-input" v-if="form.historyDate==''" style="color:#CCCCCC;width:400upx;" @click="bindHistoryDateChange">请选择,默认当天</view>
+            <view class="uni-input" @click="bindHistoryDateChange" v-else style="width:400upx;">{{form.historyDate}}</view>
 					</tui-list-cell>
 					</tui-list-cell>
 
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
@@ -339,6 +354,7 @@ export default {
         payWay:0,
         payWay:0,
         needPrint:1,//订单生成时打印订单1需要2不需要
         needPrint:1,//订单生成时打印订单1需要2不需要
         hasPay:0,
         hasPay:0,
+        getStaffId:0,
         getStaffName:'',
         getStaffName:'',
         dealPrice:0,
         dealPrice:0,
         wlName:''
         wlName:''
@@ -355,7 +371,8 @@ export default {
       calc:'add',
       calc:'add',
       diffPriceList:[],
       diffPriceList:[],
       currentShop:{default:0},
       currentShop:{default:0},
-      book:0
+      book:0,
+      selectStaff: { id: '', name: '' },
     };
     };
   },
   },
   onLoad (option) {
   onLoad (option) {
@@ -420,6 +437,12 @@ export default {
       this.form.needPrint = 2
       this.form.needPrint = 2
     }
     }
 
 
+    // 同步selectStaff和form
+    if(this.form.getStaffId && this.form.getStaffName) {
+      this.selectStaff.id = this.form.getStaffId
+      this.selectStaff.name = this.form.getStaffName
+    }
+
 	},
 	},
 	onUnload(){
 	onUnload(){
 			uni.removeStorageSync('newClient')
 			uni.removeStorageSync('newClient')
@@ -671,7 +694,24 @@ export default {
     },
     },
     pageToItemList() {
     pageToItemList() {
       this.$util.pageTo({url: '/admin/billing/index2?customId='+this.option.customId,type:2})
       this.$util.pageTo({url: '/admin/billing/index2?customId='+this.option.customId,type:2})
-    }
+    },
+    changeStaff() {
+      this.$refs.staffRef.open('center')
+    },
+    getCurrentStaff(item) {
+      this.form.getStaffId = item.id
+      this.form.getStaffName = item.name
+      this.selectStaff.id = item.id
+      this.selectStaff.name = item.name
+      this.$refs.staffRef.close()
+    },
+    cancelCurrentStaff() {
+      this.form.getStaffId = 0
+      this.form.getStaffName = ''
+      this.selectStaff.id = ''
+      this.selectStaff.name = ''
+      this.$refs.staffRef.close()
+    },
   }
   }
 };
 };
 </script>
 </script>
@@ -944,4 +984,26 @@ export default {
 .normal-price{
 .normal-price{
   color:#c1acac;
   color:#c1acac;
 }
 }
+.staff-btn {
+  min-width: 160upx;
+  padding: 0 27upx;
+  height: 80upx;
+  font-size: 40upx;
+  font-weight: bold;
+  margin: 8upx 8upx 0 0;
+  border-radius: 16upx;
+  background: #f0f2f6;
+  color: #333;
+  border: 2upx solid #e0e0e0;
+  transition: none;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.staff-btn.selected,
+.staff-btn:active {
+  background: #f0f2f6;
+  color: #333;
+  border-color: #e0e0e0;
+}
 </style>
 </style>

+ 10 - 10
ghsApp/src/admin/order/statBook.vue

@@ -55,7 +55,7 @@
 		</view>
 		</view>
 
 
 		<uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
 		<uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
-			<view style="max-height:90vh;overflow: scroll;">
+			<view style="max-height:80vh;overflow: scroll;">
 				<view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
 				<view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
 				<view style="display:flex;padding:20upx;height:auto;justify-content: flex-start;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 				<view style="display:flex;padding:20upx;height:auto;justify-content: flex-start;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 					<view v-for="(item, index) in staffData" :key="index" style="margin-bottom:20upx;margin-left:3upx;">
 					<view v-for="(item, index) in staffData" :key="index" style="margin-bottom:20upx;margin-left:3upx;">
@@ -361,25 +361,25 @@ export default {
 	}
 	}
 }
 }
 .staff-btn {
 .staff-btn {
-	min-width: 120upx;
-	padding: 0 20upx;
-	height: 60upx;
-	font-size: 30upx;
+	min-width: 160upx;
+	padding: 0 27upx;
+	height: 80upx;
+	font-size: 40upx;
 	font-weight: bold;
 	font-weight: bold;
 	margin: 8upx 8upx 0 0;
 	margin: 8upx 8upx 0 0;
-	border-radius: 12upx;
+	border-radius: 16upx;
 	background: #f0f2f6;
 	background: #f0f2f6;
 	color: #333;
 	color: #333;
 	border: 2upx solid #e0e0e0;
 	border: 2upx solid #e0e0e0;
-	transition: background 0.2s, color 0.2s;
+	transition: none;
 	display: flex;
 	display: flex;
 	align-items: center;
 	align-items: center;
 	justify-content: center;
 	justify-content: center;
 }
 }
 .staff-btn.selected,
 .staff-btn.selected,
 .staff-btn:active {
 .staff-btn:active {
-	background: #409eff;
-	color: #fff;
-	border-color: #409eff;
+	background: #f0f2f6;
+	color: #333;
+	border-color: #e0e0e0;
 }
 }
 </style>
 </style>