shish 4 anni fa
parent
commit
9030a667e1

+ 11 - 7
ghsPad/src/admin/home/components/customer-list.vue

@@ -33,19 +33,23 @@ export default {
 	};
 	};
   },
   },
   mounted() {
   mounted() {
-	  this.init()
+	  this.searchCustomer()
     this.activeKeyboard();
     this.activeKeyboard();
   },
   },
   methods: {
   methods: {
     selectCustomer(info){
     selectCustomer(info){
+      this.$util.hitRemind()
       this.$emit('selectCustomer',info)
       this.$emit('selectCustomer',info)
     },
     },
     changSearch(val){
     changSearch(val){
       this.init()
       this.init()
     },
     },
-    async init() {
-      let { data:{list} } = await customList({ name: this.searchUser })
-      this.list = list
+    searchCustomer() {
+      customList({ name: this.searchUser }).then(res=>{
+        if(res.code == 1){
+          this.list = res.data.list
+        }
+      })
     },
     },
     activeKeyboard() {
     activeKeyboard() {
       this.$refs.keyboard.activate()
       this.$refs.keyboard.activate()
@@ -56,9 +60,9 @@ export default {
       } else {
       } else {
         this.searchUser += e.char;
         this.searchUser += e.char;
       }
       }
+      this.searchCustomer()
     },
     },
     enter() {
     enter() {
-		  this.init()
     },
     },
     cancel(){
     cancel(){
     }
     }
@@ -87,7 +91,7 @@ export default {
     overflow-y: scroll;
     overflow-y: scroll;
     & .userList-item_box {
     & .userList-item_box {
       margin: 0 5upx 5upx 0;
       margin: 0 5upx 5upx 0;
-      width: 80upx;
+      width: 90upx;
       height: 60upx;
       height: 60upx;
       border: 1px solid #cccccc;
       border: 1px solid #cccccc;
       padding: 3upx;
       padding: 3upx;
@@ -134,4 +138,4 @@ export default {
 		color: #CCCCCC!important;
 		color: #CCCCCC!important;
 	}
 	}
 }
 }
-</style>
+</style>

+ 3 - 2
ghsPad/src/admin/home/components/leftItem.vue

@@ -2,8 +2,8 @@
     <view class="itemList-box">
     <view class="itemList-box">
         <view class="title">花材列表</view>
         <view class="title">花材列表</view>
         <view class="itemList-item_box">
         <view class="itemList-item_box">
-            <view v-for="item in selectList" :key="item.id" @click="selectCurrentActive(item)" class="show-item_box">
-                <view :class="[ 'item-body_box', selectCurrentActiveItem.id===item.id?'active':'not-active']">
+            <view v-for="item in selectList" :key="item.id" class="show-item_box">
+                <view class="item-body_box not-active">
                     <view class="flower-name_box">
                     <view class="flower-name_box">
                         <view class="current-item-title"><text class="name">{{item.name}}</text><text @click.stop="delItem(item)" class="del">删除</text></view>
                         <view class="current-item-title"><text class="name">{{item.name}}</text><text @click.stop="delItem(item)" class="del">删除</text></view>
                     </view>
                     </view>
@@ -58,6 +58,7 @@ export default {
     },
     },
     methods:{
     methods:{
         delItem(item){
         delItem(item){
+            this.$util.hitRemind()
             item.buyNum = 0
             item.buyNum = 0
             this.replaceItemFn(item,1,'sub')
             this.replaceItemFn(item,1,'sub')
         }
         }

+ 19 - 11
ghsPad/src/admin/home/components/middleButton.vue

@@ -1,11 +1,10 @@
 <template>
 <template>
 <view class="middle-area">
 <view class="middle-area">
 
 
-    <view @click="logout"> 退出 </view>
-    <view @click="selectUser"> 客户 </view>
-    <view @click="clearItemFn"> 清空花材 </view>
-    <view>临时商品</view>
-    <view @click="breakage"> 报损 </view>
+    <view @click="logout">退出</view>
+    <view @click="resetCustomer">选客户</view>
+    <view @click="clearItemFn">清空花材</view>
+    <view @click="breakage">报损</view>
     <view @click="settle">结算 </view>
     <view @click="settle">结算 </view>
 
 
     <!-- 清空花材 -->
     <!-- 清空花材 -->
@@ -50,8 +49,12 @@ export default {
 
 
 	},
 	},
     methods:{
     methods:{
-		//结算创建订单
+		resetCustomer(){
+			this.$util.hitRemind()
+			this.$emit('resetCustomer')
+		},
 		async setCreateOrder(){
 		async setCreateOrder(){
+			this.$util.hitRemind()
 			try {
 			try {
 				let arr = this.itemList.map(i=>({ productId:i.id, unitType: i.unitType, num: i.currentNum, property: i.property, unitPrice: i.currentUnitPrice }))
 				let arr = this.itemList.map(i=>({ productId:i.id, unitType: i.unitType, num: i.currentNum, property: i.property, unitPrice: i.currentUnitPrice }))
 				const {settleId,payId,payUserId,isPrint,proceeds,freight} = this.$refs.settlePop
 				const {settleId,payId,payUserId,isPrint,proceeds,freight} = this.$refs.settlePop
@@ -75,18 +78,19 @@ export default {
 			}
 			}
 		},
 		},
 		cancelPay(){
 		cancelPay(){
+			this.$util.hitRemind()
 			this.$refs.selectPayWayRef.close()
 			this.$refs.selectPayWayRef.close()
 		},
 		},
 		async settleReturn(){
 		async settleReturn(){
+			this.$util.hitRemind()
 			this.setCreateOrder()
 			this.setCreateOrder()
 		},
 		},
-		selectCurrentActive(item){
-				this.selectCurrentActiveItem = item
-		},
 		selectPayWayBack(price){
 		selectPayWayBack(price){
+			this.$util.hitRemind()
 			console.log(price)
 			console.log(price)
 		},
 		},
 		breakage(){
 		breakage(){
+			this.$util.hitRemind()
 			if(this.$util.isEmpty(this.itemList)) {
 			if(this.$util.isEmpty(this.itemList)) {
 				this.$msg('请选择报损花材')
 				this.$msg('请选择报损花材')
 				return false
 				return false
@@ -109,6 +113,7 @@ export default {
 			})
 			})
 		},
 		},
 		settle(){
 		settle(){
+			this.$util.hitRemind()
 			if(this.$util.isEmpty(this.itemList)) {
 			if(this.$util.isEmpty(this.itemList)) {
 				this.$msg('请选择结算花材')
 				this.$msg('请选择结算花材')
 				return false
 				return false
@@ -121,22 +126,25 @@ export default {
 		},
 		},
 		//清空花材弹框
 		//清空花材弹框
 		clearItemFn(){
 		clearItemFn(){
+			this.$util.hitRemind()
 			this.$refs.clearItemRef.open()
 			this.$refs.clearItemRef.open()
 		},
 		},
 		//确认清空花材
 		//确认清空花材
 		confirmClearItem(){
 		confirmClearItem(){
-
+			this.$util.hitRemind()
 		},
 		},
 		confirmLogout(){
 		confirmLogout(){
+			this.$util.hitRemind()
 			uni.clearStorage()
 			uni.clearStorage()
 			this.$store.commit("setLoginInfo", {})
 			this.$store.commit("setLoginInfo", {})
 			plus.runtime.restart()
 			plus.runtime.restart()
 		},
 		},
 		logout(){
 		logout(){
+			this.$util.hitRemind()
 			this.$refs.logoutRef.open()
 			this.$refs.logoutRef.open()
 		},
 		},
 		delSelectItem(){
 		delSelectItem(){
-
+			this.$util.hitRemind()
 		}
 		}
     }
     }
 }
 }

+ 1 - 0
ghsPad/src/admin/home/components/rightItemArea.vue

@@ -84,6 +84,7 @@ export default {
             this.currenTypeShopList = this.arrShop[this.categoryId]
             this.currenTypeShopList = this.arrShop[this.categoryId]
         },
         },
         changeCategory(item){
         changeCategory(item){
+            this.$util.hitRemind()
             if(item.id === this.categoryId){
             if(item.id === this.categoryId){
                 return false
                 return false
             }
             }

+ 6 - 4
ghsPad/src/admin/home/workbench.vue

@@ -6,7 +6,7 @@
 	<view v-else>
 	<view v-else>
 		<view v-if="customId == 0">
 		<view v-if="customId == 0">
 			<!-- 客户列表 -->
 			<!-- 客户列表 -->
-			<customerList @selectCustomer="selectCustomer" @cancelselectCustom="cancelselectCustom"> </customerList>
+			<customerList @selectCustomer="selectCustomer"> </customerList>
 		</view>
 		</view>
 		<view v-else>
 		<view v-else>
 		<view class="app-workbench_box">
 		<view class="app-workbench_box">
@@ -19,7 +19,7 @@
 			</view>
 			</view>
 			<!-- 按钮操作 -->
 			<!-- 按钮操作 -->
 			<view class="open-box">
 			<view class="open-box">
-				<middleButton></middleButton>
+				<middleButton @resetCustomer="resetCustomer"></middleButton>
 			</view>
 			</view>
 			<!-- 分类和花材图片 -->
 			<!-- 分类和花材图片 -->
 			<view class="all-item-area">
 			<view class="all-item-area">
@@ -47,7 +47,6 @@ export default {
 			itemList:[],
 			itemList:[],
 			currenSelectShop:{},
 			currenSelectShop:{},
 			selectItem: {},
 			selectItem: {},
-			selectCurrentActiveItem:{},
 			selectItemUser:{},
 			selectItemUser:{},
 			isLogin:false,
 			isLogin:false,
 			customId:0
 			customId:0
@@ -77,8 +76,11 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
+		resetCustomer(){
+			this.customId = 0
+		},
 		selectCustomer(info){
 		selectCustomer(info){
-			this.customId = info.id
+			this.customId = info.id ? parseInt(info.id) : 0
 		},
 		},
 		init() {
 		init() {
 		},
 		},