fuwei před 4 roky
rodič
revize
ed37ae3ecf

+ 25 - 34
ghsPad/src/admin/home/components/select-user.vue

@@ -2,9 +2,10 @@
   <view class="app-select_user">
   <view class="app-select_user">
     <view class="title">客户列表</view>
     <view class="title">客户列表</view>
     <view class="app-userList_box">
     <view class="app-userList_box">
-      <view 
-	  	:key="item.id"
-	  	class="userList-item_box" v-for="item in list">
+      <view
+							:key="item.id"
+							@click="selectUser(item)"
+							class="userList-item_box" v-for="item in list">
         <view class="head-box">
         <view class="head-box">
           <image
           <image
             class="img"
             class="img"
@@ -18,31 +19,17 @@
           <view>欠{{item.debtAmount}}</view>
           <view>欠{{item.debtAmount}}</view>
         </view>
         </view>
       </view>
       </view>
-      <!-- <view class="userList-item_box">
-        <view class="head-box">
-          <image
-            class="img"
-            src="../../../static/images/member/bg.png"
-            mode=""
-          ></image>
-          <view class="name">花落谁家</view>
-        </view>
-        <view class="footer-box">
-          <view> 03-07 12:00 </view>
-          <view>欠28755</view>
-        </view>
-      </view> -->
     </view>
     </view>
-	<input 
-		disabled 
-		class="input-serach_box" 
-		v-model="searchUser" 
+	<input
+		disabled
+		class="input-serach_box"
+		v-model="searchUser"
 		type="text"
 		type="text"
 		@change="changSearch"
 		@change="changSearch"
 		placeholder-class="input-placeholder"
 		placeholder-class="input-placeholder"
 		placeholder="搜索客户"/>
 		placeholder="搜索客户"/>
 	 <view class="keyboard-body_box">
 	 <view class="keyboard-body_box">
-		 
+
 		<VKeyboard
 		<VKeyboard
 		ref="keyboard"
 		ref="keyboard"
 		:pointIsShow="false"
 		:pointIsShow="false"
@@ -75,14 +62,18 @@ export default {
     this.activeKeyboard();
     this.activeKeyboard();
   },
   },
   methods: {
   methods: {
+			selectUser(val){
+				this.$emit('selectUser',val)
+			},
 	  changSearch(val){
 	  changSearch(val){
 		  this.init()
 		  this.init()
 	  },
 	  },
 	 async init() {
 	 async init() {
 		 try {
 		 try {
-		let { data } = await customList({
-				name: this.searchUser
-			}) 
+		let { data:{list} } = await customList({
+																								name: this.searchUser
+																							})
+			this.list = list
 		 }catch(err) {
 		 }catch(err) {
 
 
 		 }
 		 }
@@ -92,17 +83,15 @@ export default {
       this.$refs.keyboard.activate();
       this.$refs.keyboard.activate();
     },
     },
     typing(e) {
     typing(e) {
-	  if(e.char === '确定') {
-		  return false
-	  }
-      if (e.backspace) {                                                        
+      if (e.backspace) {
           this.searchUser = this.searchUser.substring(0, this.searchUser.length - 1);
           this.searchUser = this.searchUser.substring(0, this.searchUser.length - 1);
       } else {
       } else {
         this.searchUser += e.char;
         this.searchUser += e.char;
       }
       }
-	  
+
     },
     },
     enter() {
     enter() {
+					 this.init()
       //this.$refs.keyboard.deactivate();
       //this.$refs.keyboard.deactivate();
     },
     },
   },
   },
@@ -124,8 +113,10 @@ export default {
   & .app-userList_box {
   & .app-userList_box {
     padding: 5rpx;
     padding: 5rpx;
     display: flex;
     display: flex;
-    align-items: center;
+    // align-items: center;
     flex-wrap: wrap;
     flex-wrap: wrap;
+				min-height: 140rpx;
+				overflow-y: scroll;
     & .userList-item_box {
     & .userList-item_box {
       margin: 0 5rpx 5rpx 0;
       margin: 0 5rpx 5rpx 0;
       width: 130rpx;
       width: 130rpx;
@@ -159,7 +150,7 @@ export default {
     }
     }
   }
   }
   & .keyboard-body_box {
   & .keyboard-body_box {
-	  flex: 1;
+			flex: 1;
 	  overflow: hidden;
 	  overflow: hidden;
   }
   }
   & .input-serach_box {
   & .input-serach_box {
@@ -167,11 +158,11 @@ export default {
 	  line-height: 28rpx;
 	  line-height: 28rpx;
 	  text-align: center;
 	  text-align: center;
 	  height: 28rpx;
 	  height: 28rpx;
-	  
+
   }
   }
   & .input-placeholder {
   & .input-placeholder {
 		font-size: 18rpx!important;
 		font-size: 18rpx!important;
-		color: #333!important; 
+		color: #333!important;
 	}
 	}
 }
 }
 </style>
 </style>

+ 11 - 4
ghsPad/src/admin/home/components/shopTypeSelect.vue

@@ -44,7 +44,7 @@
             type="top"
             type="top"
             maxHeight="90vh"
             maxHeight="90vh"
 		>
 		>
-			<keyboardSetFlower :selectItem="selectItem"></keyboardSetFlower>
+			<keyboardSetFlower :selectItem.sync="selectItem"></keyboardSetFlower>
 		</uniPopup>
 		</uniPopup>
 		<uniPopup
 		<uniPopup
             :show.sync="isShowSettle"
             :show.sync="isShowSettle"
@@ -82,6 +82,11 @@
         created(){
         created(){
             this.init()
             this.init()
         },
         },
+								watch:{
+										selectItem(){
+											console.log(3333,this.selectItem)
+										}
+								},
         methods:{
         methods:{
            async init(){
            async init(){
                try {
                try {
@@ -112,9 +117,11 @@
                 this.selectItem = {
                 this.selectItem = {
                     ...item,
                     ...item,
                     currentUnit:item.bigUnit,
                     currentUnit:item.bigUnit,
-                    currentUnitPrice: item.bigPrice,
-                    currentNum: 0
+                    currentUnitPrice:item.property==1?item.bigPrice:item.price,
+                    currentNum: 0,
+																				unitType: 0
                 }
                 }
+																console.log(33333,this.selectItem)
                 this.isShowFllowNum = true
                 this.isShowFllowNum = true
             },
             },
             settle(){
             settle(){
@@ -207,4 +214,4 @@
 				}
 				}
 			}
 			}
 		}
 		}
-</style>
+</style>

+ 14 - 3
ghsPad/src/admin/home/workbench.vue

@@ -57,10 +57,10 @@
 			<view class="active">
 			<view class="active">
 			</view>
 			</view>
-			<view>
+			<view @click="deleteShop">
 				删除商品
 				删除商品
 			</view>
 			</view>
-			<view>
+			<view @click="clearShop">
 				清空商品
 				清空商品
 			</view>
 			</view>
 		</view>
 		</view>
@@ -72,7 +72,7 @@
 		type="top"
 		type="top"
 		maxHeight="90vh"
 		maxHeight="90vh"
 		>
 		>
-			<selectUser></selectUser>
+			<selectUser @selectUser="selectUserReturn"></selectUser>
 		</uniPopup>
 		</uniPopup>
 		<NotLogin></NotLogin>
 		<NotLogin></NotLogin>
 	</view>
 	</view>
@@ -96,6 +96,8 @@ export default {
 			isShowFllowNum: false,
 			isShowFllowNum: false,
 			isShowUser: false,
 			isShowUser: false,
 			isShowSettle: false,
 			isShowSettle: false,
+			shopList:[],
+			currenSelectShop:{}
 		};
 		};
 	},
 	},
 	computed: {
 	computed: {
@@ -111,6 +113,9 @@ export default {
 	onShow() {
 	onShow() {
 	},
 	},
 	methods: {
 	methods: {
+		selectUserReturn(val){
+					this.isShowUser = false
+		},
 		init() {
 		init() {
 		},
 		},
 		selectItem(){
 		selectItem(){
@@ -121,6 +126,12 @@ export default {
 		},
 		},
 		settle(){
 		settle(){
 			this.isShowSettle = true
 			this.isShowSettle = true
+		},
+		clearShop(){
+			this.shopList = []
+		},
+		deleteShop(){
+			
 		}
 		}
 	}
 	}
 };
 };

+ 47 - 28
ghsPad/src/components/app-boardSet-flower.vue

@@ -7,15 +7,17 @@
                 <view>
                 <view>
                     <view class="desc">数量</view>
                     <view class="desc">数量</view>
                     <div class="flower-unit_box">
                     <div class="flower-unit_box">
-                        <input 
-                            @tap="activeKeyboard" 
-                            disabled 
-                            type="number" 
+                        <input
+                            disabled
+																												@tap="changeType('currentNum')"
+																												:key="selectItem.currentNum"
+                            type="text"
                             v-model="selectItem.currentNum">
                             v-model="selectItem.currentNum">
                         <span>{{selectItem.currentUnit}}</span>
                         <span>{{selectItem.currentUnit}}</span>
                     </div>
                     </div>
                 </view>
                 </view>
                 <image
                 <image
+																			@tap="changeUnit"
                     class="change-unit"
                     class="change-unit"
                     src="https://bpic.51yuansu.com/pic3/cover/03/80/68/5c0607c96e49d_610.jpg"
                     src="https://bpic.51yuansu.com/pic3/cover/03/80/68/5c0607c96e49d_610.jpg"
                     mode="scaleToFill"
                     mode="scaleToFill"
@@ -23,7 +25,7 @@
                 <view>
                 <view>
                     <view class="desc">单价</view>
                     <view class="desc">单价</view>
                     <div class="flower-unit_box">
                     <div class="flower-unit_box">
-                        <input type="number" v-model="currentPrice">
+                        <input @tap="changeType('currentUnitPrice')" disabled type="text" v-model="selectItem.currentUnitPrice">
                     </div>
                     </div>
                 </view>
                 </view>
             </view>
             </view>
@@ -33,11 +35,11 @@
         </view>
         </view>
         <view class="keyboard-body_box">
         <view class="keyboard-body_box">
          <VKeyboard
          <VKeyboard
-            ref="keyboard" 
-            :pointIsShow="false" 
-            :digital="true" 
-            :disorderly="false" 
-            @typing="typing" 
+            ref="keyboard"
+            :pointIsShow="false"
+            :digital="true"
+            :disorderly="false"
+            @typing="typing"
             @enter="enter">
             @enter="enter">
             </VKeyboard>
             </VKeyboard>
         </view>
         </view>
@@ -60,39 +62,56 @@
             }
             }
         },
         },
         data() {
         data() {
-			return {
-				input: '',//键盘输入
-                currentNum: 0,
-                currentPrice: 0,
-                keyShow: false
-			};
+							return {
+									keyShow: false,
+									enterType:'currentNum',
+							};
 		},
 		},
-        mounted(){
-            this.activeKeyboard()
-        },
-        methods: {
+		mounted(){
+
+					this.activeKeyboard()
+					this.currentUnit = 	this.selectItem.currentUnit
+					this.currentPrice = this.selectItem.currentUnitPrice
+
+
+
+		},
+		methods: {
+			changeType(type){
+					this.enterType = type
+			},
 			//键盘方法
 			//键盘方法
 			activeKeyboard() {
 			activeKeyboard() {
 				this.$refs.keyboard.activate();
 				this.$refs.keyboard.activate();
 			},
 			},
 			typing(e) {
 			typing(e) {
 				if (e.backspace) {
 				if (e.backspace) {
-					if (this.currentNum.length > 0) {
-						this.currentNum = this.currentNum.substring(0, this.currentNum.length - 1);
+					if (this.selectItem[this.enterType].length > 0) {
+						this.selectItem[this.enterType] = this.selectItem[this.enterType].substring(0, this.selectItem[this.enterType].length - 1);
 					}
 					}
 				}else {
 				}else {
-                    if(this.currentNum == 0) {
-                        this.currentNum = e.char
-                    }else {
-                        this.currentNum += e.char;
-                    }
+								if(this.selectItem[this.enterType] == 0|| this.$util.isEmpty(this.selectItem[this.enterType])) {
+												this.selectItem[this.enterType] = e.char
+								}else {
+												this.selectItem[this.enterType] += e.char;
+								}
 				}
 				}
+				this.$emit('update:selectItem', this.selectItem)
 			},
 			},
 			enter() {
 			enter() {
 				//this.$refs.keyboard.deactivate();
 				//this.$refs.keyboard.deactivate();
+			},
+			changeUnit(){
+							
+
+								this.selectItem.unitType = this.selectItem.unitType === 0?1:0
+								this.selectItem.currentUnit = this.selectItem.unitType ===0?this.selectItem.bigUnit:this.selectItem.smallUnit
+									this.$emit('update:selectItem', this.selectItem)
+
+
 			}
 			}
 			//键盘方法end
 			//键盘方法end
-		}
+				}
     }
     }
 </script>
 </script>
 
 

+ 4 - 4
ghsPad/src/components/plugin/vKeyboard/VKeyboard.vue

@@ -38,9 +38,9 @@
 				</view>
 				</view>
 				<view class="enl-letter enl-key-button space" @tap="typing(' ')"><text class="enl-logo">spacebar</text></view>
 				<view class="enl-letter enl-key-button space" @tap="typing(' ')"><text class="enl-logo">spacebar</text></view>
 				<view class="enl-letter enl-key-button swith-key enl-gray" @tap="typingDigit"><i class="iconfont icon-shuzi"></i></view>
 				<view class="enl-letter enl-key-button swith-key enl-gray" @tap="typingDigit"><i class="iconfont icon-shuzi"></i></view>
-				<!-- <view class="enl-letter enl-key-button swith-key enl-gray" @tap="enter">
-					<i class="iconfont icon-huiche"></i>
-				</view> -->
+				<view class="enl-letter enl-key-button swith-key enl-gray" @tap="enter">
+					<text>确定</text>
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -285,7 +285,7 @@
 
 
 				.swith-key {
 				.swith-key {
 					width: 13%;
 					width: 13%;
-					
+
 				}
 				}
 
 
 				.enl-logo {
 				.enl-logo {