shish 3 ani în urmă
părinte
comite
c84a9a298a

+ 2 - 0
hdPad/src/components/vKeyboard/VKeyboard.vue

@@ -129,7 +129,9 @@ export default {
 			this.$emit('enter');
 		},
 		cancel(){
+			console.log('can')
 			this.$util.hitVoice()
+			console.log('can1')
 			this.$emit('cancel')
 		},
 		//激活键盘

+ 1 - 0
hdPad/src/pages.json

@@ -6,6 +6,7 @@
 		{"path": "pages/home/work","style": {"navigationBarTitleText": "门店单"}},
 		{"path": "pages/home/modify","style": {"navigationBarTitleText": "修改"}},
 		{"path": "pages/home/make","style": {"navigationBarTitleText": "制作"}},
+		{"path": "pages/home/selectCustom","style": {"navigationBarTitleText": "选客户"}},
 		{"path": "pages/home/selectMake","style": {"navigationBarTitleText": "选款"}},
 		{"path": "pages/home/blue","style": {"navigationBarTitleText": "连接标签机"}}
 	],

+ 31 - 29
hdPad/src/pages/home/cash.vue

@@ -6,32 +6,28 @@
 		<loginComponent></loginComponent>
 	</template>
 	<template v-else>
-		<template v-if="hasChooseCustomer == false">
-			<!-- 客户列表 -->
-			<customerList @selectCustomer="selectCustomer" @cancelChooseCustomer="cancelChooseCustomer"> </customerList>
-		</template>
-		<template v-else>
-			<view class="app-casher-area">
-				<view class="nav-left">
-					<navComponent navType="casher"></navComponent>
-				</view>
-				<!-- 已选花材列表 -->
-				<view class="itemList-box">
-					<leftArea v-if="!$util.isEmpty(selectList)" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"></leftArea>
-					<leftGroup v-else :customId.sync="customId"></leftGroup>
-				</view>
-				<!-- 分类和花材图片 -->
-				<view class="all-item-area">
-					<rightGoods v-if="currentProperty == 0" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" :changeFlower="changeFlower"> </rightGoods>
-					<rightItem v-else ref="rightItemRef" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </rightItem>
-				</view>
-				<!-- 按钮操作 -->
-				<view class="open-box">
-					<consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" @resetCustomer="resetCustomer" 
-					:customId.sync="customId" @changeProperty="changeProperty" @rightItemRefresh="rightItemRefresh"></consoleButton>
-				</view>
+
+		<view class="app-casher-area">
+			<view class="nav-left">
+				<navComponent navType="casher"></navComponent>
+			</view>
+			<!-- 已选花材列表 -->
+			<view class="itemList-box">
+				<leftArea v-if="!$util.isEmpty(selectList)" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"></leftArea>
+				<leftGroup v-else :customId.sync="customId"></leftGroup>
+			</view>
+			<!-- 分类和花材图片 -->
+			<view class="all-item-area">
+				<rightGoods v-if="currentProperty == 0" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" :changeFlower="changeFlower"> </rightGoods>
+				<rightItem v-else ref="rightItemRef" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </rightItem>
+			</view>
+			<!-- 按钮操作 -->
+			<view class="open-box">
+				<consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" @resetCustomer="resetCustomer" 
+				:customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @rightItemRefresh="rightItemRefresh"></consoleButton>
 			</view>
-		</template>
+		</view>
+
 	</template>
 
     <uni-popup ref="refrshRef" type="dialog">
@@ -46,7 +42,6 @@ import autoUpdateApp from "@/mixins/autoUpdate";
 import rightItem from './components/rightItem.vue'
 import rightGoods from './components/rightGoods.vue'
 import consoleButton from './components/console.vue'
-import customerList from './components/customerList.vue'
 import leftArea from './components/leftArea.vue'
 import leftGroup from './components/leftGroup.vue'
 import navComponent from './components/nav.vue'
@@ -55,7 +50,7 @@ import { checkRefresh } from '@/api/item'
 import productMins from "@/mixins/product";
 export default {
 	name: "cash",
-	components: { rightItem,consoleButton,  loginComponent, leftArea,leftGroup, customerList, rightGoods,navComponent},
+	components: { rightItem,consoleButton,  loginComponent, leftArea,leftGroup, rightGoods,navComponent},
 	mixins: [autoUpdateApp,productMins],
 	data() {
 		return {
@@ -67,11 +62,13 @@ export default {
 			selectItemUser:{},
 			isLogin:2,
 			customId:0,
+			customName:'',
             currentJobType:'bill',
             currentJobId:0,
 			hasChooseCustomer:true,
 			changeFlower:2,
-			T:null
+			T:null,
+			customerInfo:{hasSelect:0,customId:0,customName:''}
 		}
 	},
 	computed: {
@@ -81,7 +78,12 @@ export default {
 		this.initDataFromStorage()
 
 		this.beginRemind()
-
+	},
+	onShow(){
+		if(this.customerInfo.hasSelect == 1){
+			this.customId = this.customerInfo.customId
+			this.customName = this.customerInfo.customName
+		}
 	},
 	onUnload(){
 		clearInterval(this.T)

+ 15 - 0
hdPad/src/pages/home/components/console.vue

@@ -6,12 +6,19 @@
 	 <view class="active" 
  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" 
+ style="position:fixed;left:36upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:13upx;" 
+ @click="selectCustom()">选客户</view>
+
     <view class="active" @click="toWastage">报损</view>
 	<view class="active" style="background-color:orange;color:white;border-color:orange;height:50upx;line-height:30upx;font-size:14upx;" @click="gatheringFn()">收款</view>
     <view class="active" @click="clearItemFn">清空</view>
 	<view class="active" @click="logoutFn">退出</view>
 	<view class="active" @click="closeFn">关闭</view>
 
+	<view v-if="Number(customId)>0" style="position:fixed;left:32upx;bottom:66upx;width:189upx;height:30upx;line-height:10upx;font-size:13upx;background-color:white;color:#3385FF;font-weight:bold;border:none;">{{customName}}</view>
+
     <!-- 清空 -->
     <uni-popup ref="clearItemRef" type="dialog">
         <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认清空?" @confirm="confirmClearItem"></uni-popup-dialog>
@@ -66,6 +73,10 @@ export default {
 			type: Number,
 			default: 0
 		},
+        customName:{
+            type:String,
+            default:''
+        },
         changeCurrentJobType:{
             type:String,
             default:'bill'
@@ -111,6 +122,10 @@ export default {
 		// #endif
 	},
     methods:{
+		selectCustom(){
+			this.$util.hitVoice()
+			this.$util.pageTo({url:'/pages/home/selectCustom'})
+		},
 		closeFn(){
 			// #ifdef APP-PLUS
 			let that = this

+ 10 - 5
hdPad/src/pages/home/components/customerList.vue

@@ -12,9 +12,9 @@
         </view>
       </view>
     </view>
-    <input disabled class="input-serach_box" v-model="searchUser" type="text" @change="changSearch" placeholder-class="input-placeholder" placeholder="请输入"/>
+    <input disabled class="input-serach_box" style="margin-bottom:5upx;" v-model="searchUser" type="text" @change="changSearch" placeholder-class="input-placeholder" placeholder="请输入"/>
     <view class="keyboard-body_box">
-      <VKeyboard ref="keyboard" :pointIsShow="false" :digital="false" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel" > </VKeyboard>
+      <VKeyboard ref="keyboard" :pointIsShow="false" :digital="false" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancelWrite" > </VKeyboard>
     </view>
   </view>
 </template>
@@ -22,7 +22,7 @@
 import VKeyboard from "@/components/vKeyboard/VKeyboard.vue";
 import { customList } from '@/api/home/index'
 export default {
-  name: "customerList",
+  name: "selectCustom",
   components: { VKeyboard },
 	props: {
   },
@@ -44,7 +44,7 @@ export default {
     changSearch(val){
       this.init()
     },
-    cancel(){
+    cancelWrite(){
       this.$emit('cancelChooseCustomer')
     },
     searchCustomer() {
@@ -94,7 +94,7 @@ export default {
     overflow-y: scroll;
     & .userList-item_box {
       margin: 0 5upx 5upx 0;
-      width: 90upx;
+      width: 100upx;
       height: 60upx;
       border: 1px solid #cccccc;
       padding: 3upx;
@@ -110,6 +110,10 @@ export default {
         & .name {
           color:#666666;
           padding-left: 2upx;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
+          width:75upx;
         }
         & > .img {
           width: 16upx;
@@ -123,6 +127,7 @@ export default {
         display: flex;
         justify-content: space-between;
         align-items: center;
+        margin-top:5upx;
       }
     }
   }

+ 52 - 0
hdPad/src/pages/home/selectCustom.vue

@@ -0,0 +1,52 @@
+<template>
+<view>
+    <customerList @selectCustomer="selectCustomer" @cancelChooseCustomer="cancelSelect"> </customerList>
+</view>
+</template>
+<script>
+import customerList from './components/customerList.vue'
+export default {
+	name: "selectCustom",
+	components: { customerList},
+	mixins: [],
+	data() {
+		return {
+			customId:0,
+		}
+	},
+	methods: {
+		selectCustomer(info){
+			let pages = getCurrentPages();
+			let prevPage = pages[ pages.length - 2 ];
+			prevPage.$vm.customerInfo = {hasSelect:1,customId:info.id,customName:info.name}
+			uni.navigateBack({})
+		},
+		cancelSelect(){
+            console.log('vadadas')
+			let pages = getCurrentPages();
+			let prevPage = pages[ pages.length - 2 ];
+			prevPage.$vm.customerInfo = {hasSelect:0}
+			uni.navigateBack({})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.app-casher-area {
+	display: flex;
+	height: 100vh;
+	& .all-item-area {
+		flex: 76;
+	}
+	& .nav-left {
+		flex: 5;
+		background-color: rgba(72, 91, 107, 1);
+	}
+	& .itemList-box {
+		flex: 30;
+	}
+	& .open-box {
+		flex: 8;
+	}
+}
+</style>