shish 4 лет назад
Родитель
Сommit
ab5f26542a

+ 11 - 5
hdPad/src/admin/home/workbench.vue

@@ -1,6 +1,8 @@
 <template>
 <view>
-	<template v-if="isLogin == false">
+	<template v-if="isLogin == 2">
+	</template>
+	<template v-else-if="isLogin == 0">
 		<loginComponent></loginComponent>
 	</template>
 	<template v-else>
@@ -56,7 +58,7 @@ export default {
 			currenSelectShop:{},
 			selectItem: {},
 			selectItemUser:{},
-			isLogin:false,
+			isLogin:2,
 			customId:0,
             selectJobType:'bill',
             selectJobId:0,
@@ -75,15 +77,19 @@ export default {
 	},
 	mounted() {
 		if(this.$util.isEmpty(this.getLoginInfo.admin) || this.getLoginInfo.admin.currentShopId == 0){
-			this.isLogin = false
+			this.isLogin = 0
+		}else{
+			this.isLogin = 1
 		}
 	},
 	watch:{
 		getLoginInfo: {
 			handler(newValue) {
 				if(this.$util.isEmpty(newValue.admin) == false && newValue.admin.currentShopId > 0){
-					this.isLogin = true
-				}				
+					this.isLogin = 1
+				}else{
+					this.isLogin = 0
+				}			
 			}
 		}
 	},

+ 123 - 8
hdPad/src/admin/work/components/order-info.vue

@@ -3,15 +3,46 @@
         <view class="work-detail">
         </view>
         <view class="operate-area">
-          <view @click="changeProperty(1)">花材</view>
-          <view @click="changeProperty(0)">成品</view>
-          <view @click="logout">退出</view>
-          <view @click="resetCustomer">选客户</view>
-          <view @click="clearItemFn">清空花材</view>
-          <view @click="breakage">报损</view>
-          <view @click="gosettleCommit">结算 </view>
+          <view>花材</view>
+          <view>成品</view>
         </view>
         <view class="work-item-detail">
+          <view class="flex-space right-detail-title">
+            商品信息
+          </view>
+          <view class="module-com content-box">
+            <view class="commodity-view">
+              <view class="commodity-list">
+
+                <view v-for="(s, idx) in detailInfo.product" :key="idx" class="commodity-item" >
+                  <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})" />
+                  <view class="item-info">
+
+                    <view class="info-line">
+                      <text class="item-name">{{ s.name }}</text>
+                      <text class="item-price">
+                        <text class="unit"></text>
+                        <text class="price">
+                          <text>11233</text>
+                          <text></text>
+                        </text>
+                      </text>
+                    </view>
+
+                    <view class="info-line">
+                      <text class="item-type"></text>
+                      <text class="item-count">12</text>
+                    </view>
+                  </view>
+                </view>
+
+              </view>
+              <view class="summary-bar">
+                <view class="operate-view" ></view>
+                <view class="describe-view"> 共5种,共 <text>2扎</text> <text>3支</text> ,合计 ¥<text class="price">30</text> </view>
+              </view>
+            </view>
+          </view>
         </view>
     </view>
 </template>
@@ -19,6 +50,7 @@
 export default {
   data() {
     return {
+      detailInfo:{product:[{id:0,cover:'https://www.baidu.com/img/flexible/logo/pc/result.png',name:'aa',xhUnitName:'扎',xhUnitPrice:20,xhNum:2},{id:0,cover:'https://www.baidu.com/img/flexible/logo/pc/result.png',name:'aa',xhUnitName:'扎',xhUnitPrice:20,xhNum:2}],book:0,stockChange:1}
     }
   }
 }
@@ -56,7 +88,90 @@ export default {
 	& .work-item-detail {
 		flex: 40;
 		height: 100%;
-    background-color:red;
+    & .right-detail-title{
+      font-size:12upx;
+    }
+    & .commodity-view {
+      flex: 40;
+      display: flex;
+      flex-direction: column;
+      .commodity-list {
+        padding: 20upx;
+        .commodity-item {
+          display: flex;
+          margin-bottom: 20upx;
+          .item-icon {
+            flex-shrink: 0;
+            width: 50upx;
+            height: 50upx;
+          }
+          .item-info {
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            flex: 1;
+            margin-left: 20upx;
+            .info-line {
+              margin-bottom: 10upx;
+              display: flex;
+              justify-content: space-between;
+              align-items: flex-end;
+              .item-name {
+                font-size:12upx;
+                color: black;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+              }
+              .item-price {
+                color: #333;
+                font-size: 15upx;
+                .price {
+                  font-size: 15upx;
+                }
+              }
+              .item-type {
+                color: #999;
+                font-size: 15upx;
+              }
+              .item-count {
+                color: #666;
+                font-size: 11upx;
+              }
+            }
+          }
+        }
+      }
+      .summary-bar {
+        padding: 0 10upx;
+        height: 30upx;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        border-top: 1upx solid #eeeeee;
+        .operate-view {
+          display: flex;
+          align-items: center;
+          color: #3385ff;
+          font-size: 12upx;
+          .iconfont {
+            margin-right: 20upx;
+            font-size: 10upx;
+          }
+        }
+        .describe-view {
+          display: flex;
+          align-items: center;
+          color: #333;
+          font-size: 12upx;
+          .price {
+            font-weight: bold;
+            font-size: 11upx;
+          }
+        }
+      }
+    }
+
 	}
 }
 </style>

+ 9 - 10
hdPad/src/components/casher-nav.vue

@@ -1,16 +1,19 @@
 <template>
     <view class="nav-left">
-        <view class="item-list"> 收银 </view>
-        <view class="item-list"> 工单 </view>
-        <view class="item-list"> 制作 </view>
-        <view class="item-list"> 选品制作 </view>
+        <view class="item-list" v-for="(s,idx) in nav" @tap="goTo(s)" :key="idx">{{s.name}}</view>
     </view>
 </template>
 <script>
 export default {
   data() {
     return {
+        nav:[{name:'收银',page:'/admin/home/workbench'},{name:'工单',page:'/admin/work/index'},{name:'制作',page:''},{name:'选品制作',page:''}]
     }
+  },
+  methods:{
+      goTo(item){
+        this.$util.pageTo({ url: item.page, type:2 })
+      }
   }
 }
 </script>
@@ -23,14 +26,10 @@ export default {
         margin-top: 23upx;
     }
     & .item-list {
-        font-size: 11upx;
+        font-size: 10upx;
         text-align: center;
         padding: 15upx 0;
-        color:#333333;
-    }
-    .selected{
-        background-color: #599981;
-        color: #FFFFFF;
+        color:white;
     }
 }
 </style>