shish 4 лет назад
Родитель
Сommit
4db1d83818
2 измененных файлов с 12 добавлено и 5 удалено
  1. 9 5
      hdPad/src/pages/home/cash.vue
  2. 3 0
      hdPad/src/pages/home/components/customerList.vue

+ 9 - 5
hdPad/src/pages/home/cash.vue

@@ -6,9 +6,9 @@
 		<loginComponent></loginComponent>
 		<loginComponent></loginComponent>
 	</template>
 	</template>
 	<template v-else>
 	<template v-else>
-		<template v-if="chooseCustomer">
+		<template v-if="hasChooseCustomer == false">
 			<!-- 客户列表 -->
 			<!-- 客户列表 -->
-			<customerList @selectCustomer="selectCustomer"> </customerList>
+			<customerList @selectCustomer="selectCustomer" @cancelChooseCustomer="cancelChooseCustomer"> </customerList>
 		</template>
 		</template>
 		<template v-else>
 		<template v-else>
 			<view class="app-casher-area">
 			<view class="app-casher-area">
@@ -62,7 +62,7 @@ export default {
 			customId:0,
 			customId:0,
             currentJobType:'bill',
             currentJobType:'bill',
             currentJobId:0,
             currentJobId:0,
-			chooseCustomer:false
+			hasChooseCustomer:true
 		}
 		}
 	},
 	},
 	computed: {
 	computed: {
@@ -98,14 +98,18 @@ export default {
 			this.currentProperty = property
 			this.currentProperty = property
 		},
 		},
 		resetCustomer(){
 		resetCustomer(){
-			this.chooseCustomer = true
+			this.hasChooseCustomer = false
 		},
 		},
 		selectCustomer(info){
 		selectCustomer(info){
 			this.customId = info.id ? parseInt(info.id) : 0
 			this.customId = info.id ? parseInt(info.id) : 0
 			this.currentJobId = this.customId
 			this.currentJobId = this.customId
+			this.hasChooseCustomer = true
 		},
 		},
-		init() {
+		cancelChooseCustomer(){
+			this.hasChooseCustomer = true
 		},
 		},
+		init() {
+		}
 	}
 	}
 };
 };
 </script>
 </script>

+ 3 - 0
hdPad/src/pages/home/components/customerList.vue

@@ -44,6 +44,9 @@ export default {
     changSearch(val){
     changSearch(val){
       this.init()
       this.init()
     },
     },
+    cancel(){
+      this.$emit('cancelChooseCustomer')
+    },
     searchCustomer() {
     searchCustomer() {
       customList({ name: this.searchUser }).then(res=>{
       customList({ name: this.searchUser }).then(res=>{
         if(res.code == 1){
         if(res.code == 1){