فهرست منبع

工单布局初版

shish 4 سال پیش
والد
کامیت
4c91727193

+ 29 - 36
hdPad/src/admin/home/workbench.vue

@@ -1,35 +1,35 @@
 <template>
 <view>
-	<view v-if="isLogin == false">
+	<template v-if="isLogin == false">
 		<loginComponent></loginComponent>
-	</view>
-	<view v-else>
-		<view v-if="chooseCustomer">
+	</template>
+	<template v-else>
+		<template v-if="chooseCustomer">
 			<!-- 客户列表 -->
 			<customerList @selectCustomer="selectCustomer"> </customerList>
-		</view>
-		<view v-else>
-		<view class="app-workbench_box">
-			<view class="nav-left">
-				<view class="item-list"> 收银 </view>
+		</template>
+		<template v-else>
+			<view class="app-casher-area">
+				<view class="nav-left">
+					<casherNav></casherNav>
+				</view>
+				<!-- 已选花材列表 -->
+				<view class="itemList-box">
+					<leftItem v-if="!$util.isEmpty(selectList)" :customId.sync="customId"></leftItem>
+					<leftGroup v-else :customId.sync="customId"></leftGroup>
+				</view>
+				<!-- 按钮操作 -->
+				<view class="open-box">
+					<middleButton @resetCustomer="resetCustomer" :customId.sync="customId" @changeProperty="changeProperty"></middleButton>
+				</view>
+				<!-- 分类和花材图片 -->
+				<view class="all-item-area">
+					<rightGoodsArea v-if="currentProperty == 0" :customId.sync="customId"> </rightGoodsArea>
+					<rightItemArea v-else :customId.sync="customId"> </rightItemArea>
+				</view>
 			</view>
-			<!-- 已选花材列表 -->
-			<view class="itemList-box">
-				<leftItem v-if="!$util.isEmpty(selectList)" :customId.sync="customId"></leftItem>
-				<leftGroup v-else :customId.sync="customId"></leftGroup>
-			</view>
-			<!-- 按钮操作 -->
-			<view class="open-box">
-				<middleButton @resetCustomer="resetCustomer" :customId.sync="customId" @changeProperty="changeProperty"></middleButton>
-			</view>
-			<!-- 分类和花材图片 -->
-			<view class="all-item-area">
-				<rightGoodsArea v-if="currentProperty == 0" :customId.sync="customId"> </rightGoodsArea>
-				<rightItemArea v-else :customId.sync="customId"> </rightItemArea>
-			</view>
-		</view>
-		</view>
-	</view>
+		</template>
+	</template>
 </view>
 </template>
 <script>
@@ -41,11 +41,12 @@ import middleButton from './components/middleButton.vue'
 import customerList from './components/customer-list.vue'
 import leftItem from './components/leftItem.vue'
 import leftGroup from './components/leftGroup.vue'
+import casherNav from '@/components/casher-nav.vue'
 import loginComponent from './login.vue'
 import productMins from "@/mixins/product";
 export default {
 	name: "workbench",
-	components: { rightItemArea,middleButton,  loginComponent, leftItem,leftGroup, customerList, rightGoodsArea },
+	components: { rightItemArea,middleButton,  loginComponent, leftItem,leftGroup, customerList, rightGoodsArea,casherNav },
 	mixins: [autoUpdateApp,productMins],
 	data() {
 		return {
@@ -103,7 +104,7 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.app-workbench_box {
+.app-casher-area {
 	display: flex;
 	height: 100vh;
 	& .all-item-area {
@@ -114,14 +115,6 @@ export default {
 		height: 100%;
 		flex: 5;
 		background-color: rgba(72, 91, 107, 1);
-		& .item-list {
-			margin-top: 23upx;
-			font-size: 16upx;
-			text-align: center;
-			padding: 15upx 0;
-			background-color: #599981;
-			color: #FFFFFF;
-		}
 	}
 	& .itemList-box {
 		flex: 25;

+ 143 - 0
hdPad/src/admin/work/components/order-list.vue

@@ -0,0 +1,143 @@
+<template>
+    <view class="itemList-box">
+        <view class="title">花材列表</view>
+        <view class="itemList-item_box">
+            <view v-for="item in selectList" :key="item.id" class="show-item_box">
+                <view class="item-body_box not-active">
+                    <view class="flower-name_box">
+                        <view class="current-item-title"><text class="name">{{item.name}}</text><text @click.stop="delItem(item)" class="del">删除</text></view>
+                    </view>
+                    <view class="item-price-num">
+                        <template v-if="item.property && item.property == 1">
+                            <view v-if="item.unitType == 0">{{parseFloat(item.bigPrice)}}元/{{item.bigUnit}}</view>
+                            <view v-else>{{parseFloat(item.smallPrice)}}元/{{item.smallUnit}}</view>
+                            <view>{{item.buyNum}} {{item.unitType == 0 ? item.bigUnit : item.smallUnit}}</view>
+                        </template>
+                        <template v-else>
+                            <view>{{parseFloat(item.unitPrice)}}/份</view>
+                            <view>{{item.buyNum}}份</view>
+                        </template>
+                        <view>¥{{parseFloat((item.buyNum * item.unitPrice).toFixed(2))}}</view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class="itemList-footer_box">
+            <view> 数量
+                <text style="margin-left:5upx;">
+                    <text v-if="Number(allCount.bigNum)>0">{{allCount.bigNum}}扎</text>
+                    <text v-if="Number(allCount.smallNum)>0">{{allCount.smallNum}}支</text>
+                </text>
+            </view>
+            <view> 合计 <text style="margin-left:5upx;">¥{{allPrice}}</text> </view>
+        </view>
+    </view>
+</template>
+<script>
+import productMins from "@/mixins/product";
+export default {
+    name:'leftItem',
+    components:{},
+	mixins: [productMins],
+	props: {
+		customId: {
+			type: Number,
+			default: 0
+		}
+    },
+    data(){
+        return {
+            totalShop:{ bigUnit: 0, smallUnit:0, totalPrice: 0 },
+            itemList:[],
+            selectJobType:'bill',
+            selectJobId:0
+        }
+    },
+    created(){
+    },
+    watch:{
+        customId:{
+            handler(newCustomId){
+                this.selectJobId = newCustomId
+            },
+            immediate:true
+        }
+    },
+    methods:{
+        delItem(item){
+            this.$util.hitRemind()
+            item.buyNum = 0
+            this.replaceItemFn(item,1,'sub')
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.itemList-box {
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    & .title {
+        padding: 3upx;
+        font-size: 12upx;
+        background-color: rgba(72, 91, 107, 1);
+        color: #FFFFFF;
+    }
+    & .itemList-item_box {
+        overflow-y: auto;
+        flex: 1;
+        border: 1px solid #eee;
+        & .show-item_box {
+            padding: 2upx;
+            & .item-body_box {
+                border-radius: 2upx;
+                padding: 2upx;
+                font-size: 14upx;
+                color:#666666;
+                &.active {
+                    background-color: #d4d6d6;
+                }
+                &.not-active {
+                    background-color: #e7e9e9;
+                }
+                .item-price-num{
+                    color:#afaeae;
+                    font-size:10upx;
+                }
+                & .flower-name_box {
+                    padding: 0 5upx;
+                    .current-item-title {
+                        .name{
+                            color: #333333;
+                            font-weight: bold;
+                            overflow: hidden;
+                            text-overflow:ellipsis;
+                            white-space: nowrap;
+                            width:50upx;
+                        }
+                        .del{
+                            color:orange;
+                            font-size:12upx;
+                            float:right;
+                        }
+                    }
+                }
+                & > view:nth-child(2) {
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+                    padding-top: 15upx;
+                }
+            }
+        }
+    }
+    & .itemList-footer_box {
+        height: 20upx;
+        border: 1px solid #eee;
+        font-size: 10upx;
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+    }
+}
+</style>

+ 71 - 0
hdPad/src/admin/work/index.vue

@@ -0,0 +1,71 @@
+<template>
+<view>
+    <view>
+        <view class="app-casher-area">
+            <view class="nav-left">
+                <casherNav></casherNav>
+            </view>
+            <view class="work-order-list">
+                <orderList></orderList>
+            </view>
+            <view class="work-detail" style="background:blue;">
+            </view>
+            <view class="operate-area" style="background:yellow;">
+
+            </view>
+            <view class="work-item-detail" style="background:red;">
+
+            </view>
+        </view>
+    </view>
+</view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import productMins from "@/mixins/product";
+import casherNav from '@/components/casher-nav.vue'
+import orderList from './components/order-list.vue'
+export default {
+	name: "workIndex",
+	components: {casherNav,orderList},
+	mixins: [productMins],
+	data() {
+		return {
+		}
+	},
+	computed: {
+		...mapGetters(["getLoginInfo"])
+	},
+	onLoad() {
+		this.initDataFromStorage()
+	},
+	methods: {
+	}
+};
+</script>
+<style lang="scss" scoped>
+.app-casher-area {
+	display: flex;
+	height: 100vh;
+	& .nav-left {
+		height: 100%;
+		flex: 5;
+		background-color: rgba(72, 91, 107, 1);
+	}
+	& .work-order-list {
+		flex: 32;
+		height: 100%;
+	}
+    & .work-detail{
+        flex: 40;
+    }
+	& .operate-area {
+		flex: 9;
+		height: 100vh;
+	}
+	& .work-item-detail {
+		flex: 40;
+		height: 100%;
+	}
+}
+</style>

+ 36 - 0
hdPad/src/components/casher-nav.vue

@@ -0,0 +1,36 @@
+<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>
+</template>
+<script>
+export default {
+  data() {
+    return {
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.nav-left {
+    height: 100%;
+    flex: 5;
+    background-color: rgba(72, 91, 107, 1);
+    view:first-child{
+        margin-top: 23upx;
+    }
+    & .item-list {
+        font-size: 11upx;
+        text-align: center;
+        padding: 15upx 0;
+        color:#333333;
+    }
+    .selected{
+        background-color: #599981;
+        color: #FFFFFF;
+    }
+}
+</style>

+ 6 - 0
hdPad/src/pages.json

@@ -16,6 +16,12 @@
 		{"path": "common/success","style": {"navigationBarBackgroundColor": "#ffffff","navigationBarTextStyle": "black"}}
 	],
 	"subPackages": [
+		{
+			"root": "admin/work",
+			"pages": [
+				{"path": "index","style": {"navigationBarTitleText": "工单"}}
+			]
+		},
 		{
 			"root": "admin/tools",
 			"pages": [