shish 3 лет назад
Родитель
Сommit
e903516ad2

+ 1 - 1
ghsPad/src/pages.json

@@ -1,6 +1,6 @@
 {
 	"pages": [
-		{"path": "pages/home/selectCustom","style": {"navigationBarTitleText": "选客户"}},
+		{"path": "pages/home/cash","style": {"navigationBarTitleText": "选客户"}},
 		{"path": "pages/home/order","style": {"navigationBarTitleText": "订单"}},
 		{"path": "pages/home/mt","style": {"navigationBarTitleText": "美团单"}},
 		{"path": "pages/home/sh","style": {"navigationBarTitleText": "散花"}},

+ 45 - 5
ghsPad/src/pages/home/cash.vue

@@ -7,9 +7,22 @@
 	</template>
 	<template v-else>
 
-		<view class="app-casher-area">
+<template v-if="customId == 0">
+
+        <view class="custom-app-casher-area">
+            <view class="nav-left">
+                <casherNav navType="casher"></casherNav>
+            </view>
+			<view class="select-custom">
+				<customerList @selectCustomer="selectCustomer" @cancelChooseCustomer="cancelSelect"> </customerList>
+			</view>
+        </view>
+</template>
+<template v-else>
+
+		<view class="item-app-casher-area">
 			<view class="nav-left">
-				<navComponent navType="casher" :showMenu="false"></navComponent>
+				<navComponent navType="casher"></navComponent>
 			</view>
 			<!-- 已选花材列表 -->
 			<view class="itemList-box">
@@ -24,10 +37,12 @@
 			<!-- 按钮操作 -->
 			<view class="open-box">
 				<consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" @clearAll="clearAll"
-				:customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @rightItemRefresh="rightItemRefresh"></consoleButton>
+				:customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @cancelKdFn="cancelKdFn" @rightItemRefresh="rightItemRefresh"></consoleButton>
 			</view>
 		</view>
 
+</template>
+
 	</template>
 
     <uni-popup ref="refrshRef" type="dialog">
@@ -48,9 +63,10 @@ import navComponent from './components/nav.vue'
 import loginComponent from './login.vue'
 import { checkRefresh } from '@/api/item'
 import productMins from "@/mixins/product";
+import customerList from './components/customerList.vue'
 export default {
 	name: "cash",
-	components: { rightItem,consoleButton,  loginComponent, leftArea,leftGroup, rightGoods,navComponent},
+	components: { customerList,rightItem,consoleButton,  loginComponent, leftArea,leftGroup, rightGoods,navComponent},
 	mixins: [autoUpdateApp,productMins],
 	data() {
 		return {
@@ -107,6 +123,18 @@ export default {
 		}
 	},
 	methods: {
+		cancelKdFn(){
+			this.customId = 0
+			this.customName = ''
+		},
+		cancelSelect(){
+			this.customId = 0
+			this.customName = ''
+		},
+		selectCustomer(info){
+			this.customId = Number(info.id)
+			this.customName = info.name
+		},
 		clearAll(){
 			this.customId = 0
 			this.customName = ''
@@ -143,7 +171,7 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.app-casher-area {
+.item-app-casher-area {
 	display: flex;
 	height: 100vh;
 	& .all-item-area {
@@ -160,4 +188,16 @@ export default {
 		flex: 8;
 	}
 }
+.custom-app-casher-area {
+	display: flex;
+	height: 100vh;
+	& .nav-left {
+		flex: 5;
+		background-color: rgba(72, 91, 107, 1);
+	}
+    & .select-custom{
+        flex: 121;
+    }
+}
+
 </style>

+ 3 - 3
ghsPad/src/pages/home/components/cashConsole.vue

@@ -5,7 +5,7 @@
  style="background-color:orange;color:white;border-color:orange;position:fixed;left:135upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:16upx;" 
  @click="goSettleCommit">结算</view>
     <view class="active" @click="clearItemFn">清空</view>
-	<view class="active" @click="closeFn">取消</view>
+	<view class="active" @click="cancelKdFn">取消</view>
 
 	<view v-if="Number(customId)>0" style="position:fixed;left:32upx;bottom:66upx;width:189upx;height:20upx;line-height:5upx;font-size:13upx;background-color:white;color:#3385FF;font-weight:bold;border:none;">{{customName}}</view>
 
@@ -110,9 +110,9 @@ export default {
 		// #endif
 	},
     methods:{
-		closeFn(){
+		cancelKdFn(){
 			this.$util.hitVoice()
-			uni.navigateBack()
+			this.$emit('cancelKdFn')
 		},
         addToClear(){
 			let params = {