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

+ 1 - 0
hdPad/src/pages.json

@@ -3,6 +3,7 @@
 		{"path": "pages/home/cash","style": {"navigationBarTitleText": "收银"}},
 		{"path": "pages/home/order","style": {"navigationBarTitleText": "订单"}},
 		{"path": "pages/home/mt","style": {"navigationBarTitleText": "美团单"}},
+		{"path": "pages/home/sh","style": {"navigationBarTitleText": "散花"}},
 		{"path": "pages/home/work","style": {"navigationBarTitleText": "门店单"}},
 		{"path": "pages/home/modify","style": {"navigationBarTitleText": "修改"}},
 		{"path": "pages/home/make","style": {"navigationBarTitleText": "制作"}},

+ 1 - 0
hdPad/src/pages/home/components/nav.vue

@@ -29,6 +29,7 @@ export default {
       nav: [
         { name: "开单", page: "/pages/home/cash",flag:'casher' },
         { name: "订单", page: "/pages/home/order",flag:'order' },
+        { name: "散花", page: "/pages/home/sh",flag:'sh' },
         { name: "美团单", page: "/pages/home/mt",flag:'mt' },
         { name: "门店单", page: "/pages/home/work",flag:'work' },
         { name: "预制作", page: "/pages/home/make",flag:'selItem' },

+ 6 - 2
hdPad/src/pages/home/components/workList.vue

@@ -55,7 +55,11 @@ export default {
         mt: {
 			type: String,
 			default: 'no'
-		}
+		},
+        sh:{
+            type:Number,
+            default:0
+        }
     },
     data(){
         return {
@@ -163,7 +167,7 @@ export default {
             }
         },
         getWorkInfoList(type=0){
-            let params = {page: 1,pageSize:50,status:this.status,sn:this.sn,thirdSn:this.thirdSn,isCashier:1}
+            let params = {page: 1,pageSize:50,status:this.status,sn:this.sn,thirdSn:this.thirdSn,isCashier:1,sh:this.sh}
             if(this.mt == 'yes'){
                 params = {...params,fromType:4}
             }

+ 89 - 0
hdPad/src/pages/home/sh.vue

@@ -0,0 +1,89 @@
+<template>
+<view>
+    <view>
+        <view class="app-casher-area">
+            <view class="nav-left">
+                <casherNav navType="sh"></casherNav>
+            </view>
+            <view class="work-list">
+                <workList ref="workListRef" @getOrderInfo="getOrderInfo" sh="1"></workList>
+            </view>
+            <view class="work-info">
+                <workInfo ref="workInfoRef" :selectOrderId="selectOrderId" @calcFn="calcFn" @finishNotice="finishNotice"></workInfo>
+            </view>
+        </view>
+    </view>
+</view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import productMins from "@/mixins/product";
+import casherNav from './components/nav.vue'
+import workList from './components/workList.vue'
+import workInfo from './components/workInfo.vue'
+export default {
+	name: "work",
+	components: {casherNav,workList,workInfo},
+	mixins: [productMins],
+	data() {
+		return {
+			currentJobType:'modify',
+			currentJobId:0,
+			selectOrderId:0,
+			modifyInfo:{hasModify:0}
+		}
+	},
+	computed: {
+		...mapGetters(["getLoginInfo"])
+	},
+	onShow() {
+		if(this.modifyInfo.hasModify && this.modifyInfo.hasModify == 1){
+			this.$refs.workInfoRef.getOrderDetail(this.selectOrderId)
+		}
+		// #ifdef APP-PLUS
+		this.listenScanItem()
+		// #endif
+	},
+	onHide(){
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+	},
+	onUnload() {
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+	},
+	methods: {
+		finishNotice(){
+			this.$refs.workListRef.refreshList()
+		},
+		calcFn(val){
+			this.calc = val
+		},
+		getOrderInfo(item){
+			this.selectOrderId = Number(item.id)
+			this.currentJobId = Number(item.id)
+			this.$refs.workInfoRef.getOrderDetail(this.selectOrderId)
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.app-casher-area {
+	display: flex;
+	height: 100vh;
+	& .nav-left {
+		flex: 5;
+		background-color: rgba(72, 91, 107, 1);
+	}
+	& .work-list {
+		flex: 32;
+	}
+    & .work-info{
+        flex: 89;
+    }
+}
+</style>