shish 3 tahun lalu
induk
melakukan
51eb968df0

+ 2 - 1
ghsPad/src/pages.json

@@ -9,7 +9,8 @@
 		{"path": "pages/home/make","style": {"navigationBarTitleText": "制作"}},
 		{"path": "pages/home/waste","style": {"navigationBarTitleText": "选花材"}},
 		{"path": "pages/home/selectMake","style": {"navigationBarTitleText": "选款"}},
-		{"path": "pages/home/blue","style": {"navigationBarTitleText": "连接标签机"}}
+		{"path": "pages/home/blue","style": {"navigationBarTitleText": "连接标签机"}},
+		{"path": "pages/home/retail","style": {"navigationBarTitleText": "去零售"}}
 	],
 	"subPackages": [],
 	"globalStyle": {

+ 33 - 36
ghsPad/src/pages/home/cash.vue

@@ -1,47 +1,44 @@
 <template>
 <view>
-	<template v-if="isLogin == 2">
-	</template>
-	<template v-else-if="isLogin == 0">
+	<template v-if="isLogin == 0">
 		<loginComponent></loginComponent>
 	</template>
 	<template v-else>
 
-<template v-if="customId == 0">
-
-        <view class="custom-app-casher-area">
-            <view class="nav-left">
-                <navComponent navType="casher"></navComponent>
-            </view>
-			<view class="select-custom">
-				<customerList @selectCustomer="selectCustomer" @cancelChooseCustomer="cancelSelect"> </customerList>
+		<block v-if="customId == 0">
+			<view class="custom-app-casher-area">
+				<view class="nav-left">
+					<navComponent navType="casher"></navComponent>
+				</view>
+				<view class="select-custom">
+					<customerList @selectCustomer="selectCustomer" @cancelChooseCustomer="cancelSelect"> </customerList>
+				</view>
 			</view>
-        </view>
-</template>
-<template v-else>
+		</block>
+		<block v-else>
 
-		<view class="item-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 class="item-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" ref="rightItemRef" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </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" @clearAll="clearAll"
+					:customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @cancelKdFn="cancelKdFn" @rightItemRefresh="rightItemRefresh"></consoleButton>
+				</view>
 			</view>
-			<!-- 分类和花材图片 -->
-			<view class="all-item-area">
-				<rightGoods v-if="currentProperty == 0" ref="rightItemRef" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </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" @clearAll="clearAll"
-				:customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @cancelKdFn="cancelKdFn" @rightItemRefresh="rightItemRefresh"></consoleButton>
-			</view>
-		</view>
 
-</template>
+		</block>
 
 	</template>
 
@@ -66,7 +63,7 @@ import productMins from "@/mixins/product";
 import customerList from './components/customerList.vue'
 export default {
 	name: "cash",
-	components: { customerList,rightItem,consoleButton,  loginComponent, leftArea,leftGroup, rightGoods,navComponent},
+	components: { customerList,rightItem,consoleButton,loginComponent, leftArea,leftGroup, rightGoods,navComponent},
 	mixins: [autoUpdateApp,productMins],
 	data() {
 		return {
@@ -196,7 +193,7 @@ export default {
 		background-color: rgba(72, 91, 107, 1);
 	}
     & .select-custom{
-        flex: 121;
+        flex: 119;
     }
 }
 

+ 8 - 39
ghsPad/src/pages/home/components/nav.vue

@@ -28,12 +28,12 @@ export default {
   data() {
     return {
       nav: [
-        { name: "收银", page: "/pages/home/selectCustom",flag:'casher' },
-        { name: "关闭", page: "/pages/home/close",flag:'close' },
-        { name: "退出", page: "/pages/home/logout",flag:'logout' },
-        { name: "零售", page: "/pages/home/waste",flag:'retail' },
-        //{ name: "损耗", page: "/pages/home/waste",flag:'waste' },
-        //{ name: "订单", page: "/pages/home/order",flag:'order' }
+        { name: "收银", page: "/pages/home/cash",flag:'casher'},
+        { name: "关闭", page: "/pages/home/close",flag:'close'},
+        { name: "退出", page: "/pages/home/logout",flag:'logout'},
+        { name: "零售", page: "/pages/home/retail",flag:'retail'}
+        //{ name: "订单", page: "/pages/home/order",flag:'order'},
+        //{ name: "损耗", page: "/pages/home/waste",flag:'waste'},
       ],
       device:''
     };
@@ -63,35 +63,6 @@ export default {
           uni.$emit('listenGetScanCode',{code:hasScanCode})
           uni.removeStorageSync('hasScanCode')
         }
-    },
-    openRetail(){
-      let type = uni.getSystemInfoSync().platform
-      if(type == 'android'){
-          if (plus.runtime.isApplicationExist({pname: 'huahuibao.hzgsy'})) {
-              let senddata = {}
-              //调用第三方app
-              plus.runtime.launchApplication({
-                      pname: "huahuibao.hzgsy",
-                      extra: senddata
-                  },
-                  (e)=> {
-                      uni.showToast({ title: "打开失败", icon: "none" })
-                  },
-              );
-          } else {
-              uni.showModal({
-                title: '提示',
-                content: '没有安装,请先下载安装',
-                success: function (res){
-                  if (res.confirm){ 
-                    plus.runtime.openURL('http://www.wixhb.com/main/app')
-                  }
-                }
-              })
-          }
-      }else{
-        this.$msg('暂不支持打开')
-      }
     },
 		getScan(item){
       let hasScanCode = uni.getStorageSync('hasScanCode')
@@ -109,9 +80,7 @@ export default {
     goTo(item) {
       let that = this
       this.$util.hitVoice();
-      if(item.flag == 'retail'){
-        this.openRetail()
-      }else if(item.flag == 'close'){
+      if(item.flag == 'close'){
         // #ifdef APP-PLUS
         let type = uni.getSystemInfoSync().platform
         switch(type){
@@ -140,7 +109,7 @@ export default {
           }
         })
       }else{
-        this.$util.pageTo({ url: item.page, type: 2 });
+        that.$util.pageTo({ url: item.page, type: 2 })
       }
     },
   },

+ 83 - 0
ghsPad/src/pages/home/retail.vue

@@ -0,0 +1,83 @@
+<template>
+<view>
+    <view>
+        <view class="app-casher-area">
+            <view class="nav-left">
+                <casherNav navType="retail"></casherNav>
+            </view>
+            <view class="work-list">
+                
+            </view>
+            <view class="work-info">
+                
+            </view>
+        </view>
+    </view>
+</view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import casherNav from './components/nav.vue'
+export default {
+	name: "work",
+	components: {casherNav},
+	mixins: [],
+	data() {
+		return {
+		}
+	},
+	computed: {
+		...mapGetters(["getLoginInfo"])
+	},
+	methods: {
+		init(){
+			this.openRetail()
+		},
+		openRetail(){
+			let type = uni.getSystemInfoSync().platform
+			if(type == 'android'){
+				if (plus.runtime.isApplicationExist({pname: 'huahuibao.hzgsy'})) {
+					let senddata = {}
+					//调用第三方app
+					plus.runtime.launchApplication({
+							pname: "huahuibao.hzgsy",
+							extra: senddata
+						},
+						(e)=> {
+							uni.showToast({ title: "打开失败", icon: "none" })
+						},
+					);
+				} else {
+					uni.showModal({
+						title: '提示',
+						content: '没有安装,请先下载安装',
+						success: function (res){
+						if (res.confirm){ 
+							plus.runtime.openURL('http://www.wixhb.com/main/app')
+						}
+						}
+					})
+				}
+			}else{
+				this.$msg('暂不支持打开')
+			}
+		},
+	}
+};
+</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>