shish 4 jaren geleden
bovenliggende
commit
5900a63eec

+ 188 - 219
ghsPad/src/admin/home/components/select-settle.vue

@@ -4,51 +4,27 @@
             <view class="select-item_box">
                 <view class="title">结账方式</view>
                 <view class="item-list_box">
-                    <view 
-                        :key="item.id"
-                        @tap="changeType('settleId',item.id)"
-                        v-for="item in returnWay" 
-                        :class="[settleId===item.id?'active':'']">
-                        {{item.name}}
-                    </view>    
+                    <view :key="item.id" @tap="changeType('settleId',item.id)" v-for="item in returnWay" :class="[settleId===item.id?'active':'']"> {{item.name}} </view>    
                 </view>
             </view>
             <template v-if="settleId!==3">
                 <view class="select-item_box">
                     <view class="title">收款方式</view>
                     <view class="item-list_box">
-                        <view 
-                            :key="item.id"
-                            @tap="changeType('payId',item.id)"
-                            v-for="item in payWay" 
-                            :class="[payId===item.id?'active':'']">
-                            {{item.name}}
-                        </view>  
+                        <view :key="item.id" @tap="changeType('payId',item.id)" v-for="item in payWay" :class="[payId===item.id?'active':'']"> {{item.name}} </view>  
                     </view>
                 </view>
                 <view class="select-item_box">
                     <view class="title">收款人</view>
                     <view class="item-list_box">
-                        <view 
-                            :key="item.id"
-                            @tap="changeType('payUserId',item.id)"
-                            v-for="item in payUser" 
-                            :class="[payUserId===item.id?'active':'']">
-                            {{item.name}}
-                        </view>      
+                        <view :key="item.id" @tap="changeType('payUserId',item.id)" v-for="item in payUser" :class="[payUserId===item.id?'active':'']"> {{item.name}} </view>      
                     </view>
                 </view>
             </template>
             <view class="select-item_box">
                 <view class="title">打印小票</view>
                 <view class="item-list_box">
-                    <view 
-                        :key="item.id"
-                        @tap="changeType('isPrint',item.id)"
-                        v-for="item in printOptions" 
-                        :class="[isPrint===item.id?'active':'']">
-                        {{item.name}}
-                    </view>     
+                    <view :key="item.id" @tap="changeType('isPrint',item.id)" v-for="item in printOptions" :class="[isPrint===item.id?'active':'']"> {{item.name}} </view>     
                 </view>
             </view>
         </view>
@@ -60,215 +36,208 @@
             <AppInputAll v-model="proceeds" title="实收金额" @tap.native="changeEnterType('proceeds')" disabled placeholder="实收金额"></AppInputAll>
             <view class="shop-distoracn">优惠5</view>
             <view class="keyboard-body_box">
-                <VKeyboard
-                    ref="keyboard" 
-                    :digital="true" 
-                    :disorderly="false" 
-                    @typing="typing" 
-                    @enter="enter">
-                </VKeyboard>
+                <VKeyboard ref="keyboard" :digital="true" :disorderly="false" @typing="typing" @enter="enter"> </VKeyboard>
             </view>
         </view>
     </view>
 </template>
-
 <script>
-    import VKeyboard from '@/components/plugin/vKeyboard/VKeyboard.vue'
-    import TuiListCell from "@/components/plugin/list-cell";
-    import AppInputAll from '@/components/app_input_all'
-    export default {
-        name:'selectCustomer',
-        props:{
-            totalShop:{
-                type:Object,
-                default:()=>{}
-            }
+import VKeyboard from '@/components/plugin/vKeyboard/VKeyboard.vue'
+import TuiListCell from "@/components/plugin/list-cell";
+import AppInputAll from '@/components/app_input_all'
+export default {
+    name:'selectCustomer',
+    props:{
+        totalShop:{
+            type:Object,
+            default:()=>{}
+        }
+    },
+    components:{
+        VKeyboard,
+        AppInputAll
+    },
+    computed:{
+    },
+    data() {
+        return {
+            // shopVal: '100',
+            freight: '',
+            settleId: 1,
+            payId:1,
+            payUserId:1,
+            isPrint:1,
+            proceeds: '0',
+            returnWay:[
+                {
+                    name:'扫码付款',
+                    id:0,
+                },
+                {
+                    name:'已付款',
+                    id:1,
+                },
+                {
+                    name:'待付款',
+                    id:2,
+                }
+            ],
+            payWay:[
+                {
+                    name:'微信',
+                    id:0
+                },
+                {
+                    name:'支付宝',
+                    id:1
+                },
+                {
+                    name:'现金',
+                    id:4
+                },
+                    {
+                    name:'银行卡',
+                    id:5
+                }
+            ],
+            payUser:[
+                {
+                    name:'收款码',
+                    id:0   
+                },
+                {
+                    name:'微信客服1',
+                    id:1 
+                },
+                {
+                    name:'微信客服2',
+                    id:2   
+                },{
+                    name:'微信客服3',
+                    id:3  
+                },{
+                    name:'微信客服4',
+                    id:4   
+                }
+            ],
+            currentInputType:'proceeds',
+            totalMoney: 0,
+            printOptions:[
+                {
+                    name:'打印',
+                    id:1
+                },
+                {
+                    name:'不大',
+                    id:2
+                }
+            ]
+        };
+    },
+    mounted() {
+        this.activeKeyboard();
+        this.updateTotal()
+    },
+    methods: {
+        updateTotal(){
+            this.proceeds = this.totalShop.totalPrice
+            this.totalMoney = (+this.totalShop.totalPrice) +  (this.$util.isEmpty(this.freight)?0: +this.freight)
         },
-        components:{
-            VKeyboard,
-            AppInputAll
+        changeEnterType(type){
+            this.currentInputType = type
         },
-        computed:{
+        changeType(key, id){
+            this[key] = id
         },
-        data() {
-			return {
-                // shopVal: '100',
-                freight: '',
-                settleId: 1,
-                payId:1,
-                payUserId:1,
-                isPrint:1,
-                proceeds: '0',
-                returnWay:[
-                    {
-                        name:'扫码付款',
-                        id:0,
-                    },
-                    {
-                        name:'已付款',
-                        id:1,
-                    },
-                    {
-                        name:'待付款',
-                        id:2,
-                    }
-                ],
-                payWay:[
-                    {
-                        name:'微信',
-                        id:0
-                    },
-                    {
-                        name:'支付宝',
-                        id:1
-                    },
-                    {
-                        name:'现金',
-                        id:4
-                    },
-                     {
-                        name:'银行卡',
-                        id:5
-                    }
-                ],
-                payUser:[
-                    {
-                        name:'收款码',
-                        id:0   
-                    },
-                    {
-                        name:'微信客服1',
-                        id:1 
-                    },
-                    {
-                        name:'微信客服2',
-                        id:2   
-                    },{
-                        name:'微信客服3',
-                        id:3  
-                    },{
-                        name:'微信客服4',
-                        id:4   
-                    }
-                ],
-                currentInputType:'proceeds',
-                totalMoney: 0,
-                printOptions:[
-                    {
-                        name:'打印',
-                        id:1
-                    },
-                    {
-                        name:'不大',
-                        id:2
-                    }
-                ]
-			};
-		},
-        mounted() {
-            this.activeKeyboard();
-            this.updateTotal()
+        //键盘方法
+        activeKeyboard() {
+            this.$refs.keyboard.activate();
         },
-        methods: {
-            updateTotal(){
-                this.proceeds = this.totalShop.totalPrice
-                this.totalMoney = (+this.totalShop.totalPrice) +  (this.$util.isEmpty(this.freight)?0: +this.freight)
-            },
-            changeEnterType(type){
-                this.currentInputType = type
-            },
-            changeType(key, id){
-                this[key] = id
-            },
-			//键盘方法
-			activeKeyboard() {
-				this.$refs.keyboard.activate();
-			},
-			typing(e) {
-				if (e.backspace) {
-					if (this[this.currentInputType].length > 0) {
-						this[this.currentInputType] = this[this.currentInputType].substring(0, this[this.currentInputType].length - 1);
-					}
-				}
-				else {
-                    if(this[this.currentInputType]== 0 || this.$util.isEmpty(this[this.currentInputType])) {
-                        this[this.currentInputType] = e.char
-                    }else {
-                        this[this.currentInputType] += e.char;
-                    }
-				}
-                if(this[this.currentInputType] === 'freight') {
-                     this.updateTotal()
-                }  
-			},
-			enter() {
-               this.$emit('settleReturn') 
-			},
-			//键盘方法end
-		},
-        watch:{
-            totalShop(){
-                this.updateTotal()
+        typing(e) {
+            if (e.backspace) {
+                if (this[this.currentInputType].length > 0) {
+                    this[this.currentInputType] = this[this.currentInputType].substring(0, this[this.currentInputType].length - 1);
+                }
+            }
+            else {
+                if(this[this.currentInputType]== 0 || this.$util.isEmpty(this[this.currentInputType])) {
+                    this[this.currentInputType] = e.char
+                }else {
+                    this[this.currentInputType] += e.char;
+                }
             }
+            if(this[this.currentInputType] === 'freight') {
+                    this.updateTotal()
+            }  
+        },
+        enter() {
+            this.$emit('settleReturn') 
+        },
+        //键盘方法end
+    },
+    watch:{
+        totalShop(){
+            this.updateTotal()
         }
     }
+}
 </script>
 
 <style lang="scss" scoped>
-    .app-select_customer {
-        background-color: #ffffff;
-        display: flex;
-        height: 90vh;
-        .select-left {
-            flex: 1;
-            padding: 10rpx;
-            & .select-item_box {
-                & > .title {
-                    font-size: 12rpx;
-                }
-                & .item-list_box {
-                        display: flex;
-                        align-items: center;
-                        justify-content: flex-start;
-                        flex-wrap: wrap;
-                        padding: 8rpx 0;
-                        & > view {
-                            width: 85rpx;
-                            height: 30rpx;
-                            text-align: center;
-                            line-height: 30rpx;
-                            font-size: 12rpx;
-                            border: 1px solid #eee;
-                            margin: 0 5rpx 5rpx 0;
-                            color: #333333;
-                            border-radius: 3rpx;
-                            &.active {
-                                background-color: #468c71;
-                                color: #ffffff;
-                            }
+.app-select_customer {
+    background-color: #ffffff;
+    display: flex;
+    height: 90vh;
+    .select-left {
+        flex: 1;
+        padding: 10rpx;
+        & .select-item_box {
+            & > .title {
+                font-size: 12rpx;
+            }
+            & .item-list_box {
+                    display: flex;
+                    align-items: center;
+                    justify-content: flex-start;
+                    flex-wrap: wrap;
+                    padding: 8rpx 0;
+                    & > view {
+                        width: 85rpx;
+                        height: 30rpx;
+                        text-align: center;
+                        line-height: 30rpx;
+                        font-size: 12rpx;
+                        border: 1px solid #eee;
+                        margin: 0 5rpx 5rpx 0;
+                        color: #333333;
+                        border-radius: 3rpx;
+                        &.active {
+                            background-color: #468c71;
+                            color: #ffffff;
                         }
                     }
-            }
-        }
-        & .line {
-            width: 1px;
-            background-color: #eee;
-        }
-        .select-right {
-            flex: 1;
-            padding: 10rpx;
-            display: flex;
-            flex-direction: column;
-            & .shop-distoracn {
-                text-align: right;
-                font-size: 14rpx;
-                margin-top: 10rpx;
-                color: #008000;
-            }
+                }
         }
-        & .keyboard-body_box {
-            flex: 1;
-            overflow: hidden;
+    }
+    & .line {
+        width: 1px;
+        background-color: #eee;
+    }
+    .select-right {
+        flex: 1;
+        padding: 10rpx;
+        display: flex;
+        flex-direction: column;
+        & .shop-distoracn {
+            text-align: right;
+            font-size: 14rpx;
+            margin-top: 10rpx;
+            color: #008000;
         }
     }
+    & .keyboard-body_box {
+        flex: 1;
+        overflow: hidden;
+    }
+}
 </style>

+ 16 - 60
ghsPad/src/admin/home/components/shopTypeSelect.vue

@@ -1,61 +1,22 @@
 <template>
     <view class="shop-listType_box">
         <view class="shop-type_box">
-            <view
-                v-for="item in shopListType"
-                :key="item.id"
-                :class="[selectTypeId===item.id?'active':'']"
-                @click="changeType(item)"
-            >
-                {{item.name}}
-            </view>
+            <view v-for="item in shopListType" :key="item.id" :class="[selectTypeId===item.id?'active':'']" @click="changeType(item)" > {{item.name}} </view>
         </view>
         <view class="shop-show_box">
-            <view
-                @click="selectItemChange(item)"
-                v-for="item in currenTypeShopList"
-                :key="item.id"
-                class="show-shop_box">
-                <image
-                    class="img"
-                    src="https://file02.16sucai.com/d/file/2014/0829/372edfeb74c3119b666237bd4af92be5.jpg"
-                    mode="scaleToFill"
-                />
+            <view @click="selectItemChange(item)" v-for="item in currenTypeShopList" :key="item.id" class="show-shop_box">
+                <image class="img" :src="item.cover" mode="scaleToFill" ></image>
                 <view class="shop-info_price">
                     <view>
                         <view>{{item.name}}</view>
-                        <view>¥{{item.price}}</view>
+                        <view>¥{{parseFloat(item.price)}}</view>
                     </view>
                 </view>
             </view>
         </view>
         <slot name="footer"></slot>
-        <!-- <view class="shop-footer_box">
-             <view class="btn-breakage">
-                报损
-            </view>
-            <view
-                @click="settle"
-                class="btn-account">
-                结算
-            </view>
-        </view> -->
-        <!-- <uniPopup
-            :show.sync="isShowFllowNum"
-            type="top"
-            maxHeight="90vh">
-								<keyboardSetFlower :selectItem.sync="selectItem"></keyboardSetFlower>
-							</uniPopup> -->
-							<!-- <uniPopup
-																:show.sync="isShowSettle"
-																type="top"
-																maxHeight="90vh"
-																>
-							<selectSettle></selectSettle>
-						</uniPopup> -->
     </view>
 </template>
-
 <script>
     import uniPopup from '@/components/uni-popup'
     import selectSettle from './select-settle.vue'
@@ -74,7 +35,6 @@
                 selectTypeId: '',
                 arrShop:[],
                 currenTypeShopList:[],
-                // isShowFllowNum: false,
                 isShowSettle: false,
                 selectItem:{}
             }
@@ -115,15 +75,6 @@
             },
             selectItemChange(item){
 			    this.$emit('selectItemChange',item)
-                // this.selectItem = {
-                //     ...item,
-                //     currentUnit:item.bigUnit,
-                //     currentUnitPrice:item.property==1?item.bigPrice:item.price,
-                //     currentNum: 0,
-																// 				unitType: 0
-                // }
-																// console.log(33333,this.selectItem)
-                // this.isShowFllowNum = true
             },
             settle(){
                 this.isShowSettle = true
@@ -148,7 +99,7 @@
 				& > view {
 					border:1px solid #e4e4e4;
 					padding: 12rpx 0rpx;
-					font-size: 12px;
+					font-size: 15px;
                     min-width: 75rpx;
                     text-align: center;
 					&.active {
@@ -167,24 +118,29 @@
 				& .show-shop_box {
 					position: relative;
 					width: 18%;
-                    margin-right: 5rpx;
-                    margin-bottom: 5rpx;
+                    margin-right: 8upx;
+                    margin-bottom: 6upx;
 					height: 70rpx;
 					& .img {
 						height: 100%;
 					}
 					.shop-info_price {
 						position: absolute;
-						// height: 25rpx;
-						background-color: rgba(0, 0, 0, 0.2);
+						background-color: rgba(0, 0, 0, 0.5);
 						bottom: 0;
 						width: 100%;
 						font-size: 12rpx;
 						color: #ffffff;
 						& > view {
                             font-size: 12rpx;
-							& > view:nth-child(1) {
-								// margin-bottom: 2rpx;
+                            & > view:nth-child(1) {
+                                overflow: hidden;
+                                text-overflow:ellipsis;
+                                white-space: nowrap;
+                                width:90%;
+							}
+							& > view:nth-child(2) {
+								font-size:10upx;
 							}
 						}
 					}

+ 150 - 222
ghsPad/src/admin/home/workbench.vue

@@ -1,69 +1,35 @@
 <template>
 	<view class="app-workbench_box">
 		<view class="nav-left">
-			<view class="item-list">
-				收银
-			</view>
+			<view class="item-list"> 收银 </view>
 		</view>
 		<view class="shopList-box">
 			<view class="title">商品列表</view>
 			<view class="shopList-item_box">
-				<view
-				v-for="item in shopList"
-				:key="item.id"
-				@click="selectCurrentActive(item)"
-				class="shop-item_box">
-					<view :class="[
-						'shop-body_box',
-					selectCurrentActiveItem.id===item.id?'active':'']">
+				<view v-for="item in shopList" :key="item.id" @click="selectCurrentActive(item)" class="shop-item_box">
+					<view :class="[ 'shop-body_box', selectCurrentActiveItem.id===item.id?'active':'not-active']">
 						<view class="flower-name_box">
 							<view class="name">
 								{{item.name}}
 							</view>
 						</view>
 						<view>
-							<view>{{item.currentUnitPrice}}元/{{item.currentUnit}}</view>
+							<view>{{parseFloat(item.currentUnitPrice)}}元/{{item.currentUnit}}</view>
 							<view>{{item.currentNum}} {{item.currentUnit}}</view>
 							<view>¥{{item.currentNum * item.currentUnitPrice}}</view>
 						</view>
 					</view>
 				</view>
-				<!-- <view class="shop-item_box">
-					<view class="shop-body_box">
-						<view class="flower-name_box">
-							<view class="name">
-								小菊
-							</view>
-						</view>
-						<view>
-							<view>25元/支</view>
-							<view>5支</view>
-							<view>¥108</view>
-						</view>
-					</view>
-				</view> -->
 			</view>
 			<view class="shopList-footer_box">
-				<view>
-					数量:
-					<text style="fontWeight:bold">
-						<!-- 8扎5支 -->
-						{{totalShop.bigUnit}}扎 {{totalShop.smallUnit}}支
-					</text>
-				</view>
-				<view>
-					合计:
-					<text style="color:red">¥{{totalShop.totalPrice}}</text>
-				</view>
+				<view> 数量: <text style="fontWeight:bold"> {{totalShop.bigUnit}}扎 {{totalShop.smallUnit}}支 </text> </view>
+				<view> 合计: <text style="color:red">¥{{totalShop.totalPrice}}</text> </view>
 			</view>
 		</view>
 		<view class="open-box">
 			<view @click="selectUser">
 				客户
 			</view>
-			<!-- <view class="active">
-				扎
-			</view> -->
 			<view @click="deleteShop">
 				删除商品
 			</view>
@@ -77,47 +43,23 @@
 		<view class="shop-list">
 			<shopTypeSelect @selectItemChange="selectItemChange">
 				<view slot="footer" class="shop-footer_box">
-					<view
-					@tap="breakage"
-					class="btn-breakage">
-						报损
-					</view>
-					<view
-						@click="settle"
-						class="btn-account">
-						结算
-					</view>
+					<view @tap="breakage" class="btn-breakage"> 报损 </view>
+					<view @click="settle" class="btn-account"> 结算 </view>
 				</view>
 			</shopTypeSelect>
 		</view>
-		<uniPopup
-		:show.sync="isShowUser"
-		type="top"
-		maxHeight="90vh"
-		>
+		<uniPopup :show.sync="isShowUser" type="top" maxHeight="90vh" >
 			<selectUser @selectUser="selectUserReturn">
 			</selectUser>
 		</uniPopup>
-		<uniPopup
-		     :show.sync="isShowFllowNum"
-		     type="top"
-		     maxHeight="90vh">
+		<uniPopup :show.sync="isShowFllowNum" type="top" maxHeight="90vh">
 			<keyboardSetFlower @enterNum="enterReturn" :selectItem.sync="selectItem"></keyboardSetFlower>
 		</uniPopup>
-		<uniPopup
-			:show.sync="isShowSettle"
-			type="top"
-			maxHeight="90vh"
-			>
+		<uniPopup :show.sync="isShowSettle" type="top" maxHeight="90vh" >
 			<selectSettle @settleReturn="settleReturn" ref="selectSettle" :totalShop="totalShop"></selectSettle>
 		</uniPopup>
-		<uniPopup
-			:show.sync="isShowCollectMoney"
-			type="top"
-			maxHeight="90vh"
-			>
+		<uniPopup :show.sync="isShowCollectMoney" type="top" maxHeight="90vh" >
 			<collectMoney @cancel="isShowCollectMoney=false" @collectMoneyBack="collectMoneyBack"></collectMoney>
-			<!-- <selectSettle @settleReturn="settleReturn" ref="selectSettle" :totalShop="totalShop"></selectSettle> -->
 		</uniPopup>
 		<NotLogin></NotLogin>
 	</view>
@@ -180,40 +122,25 @@ export default {
 	},
 	watch:{
 		shopList(){
-		if(this.$util.isEmpty(this.shopList)) {
-				this.totalShop = {
-						bigUnit: 0,
-						smallUnit:0,
-						totalPrice: 0
-					}
-				}
+			if(this.$util.isEmpty(this.shopList)) {
+				this.totalShop = { bigUnit: 0, smallUnit:0, totalPrice: 0 }
+			}
 			this.totalShop =	this.shopList.reduce((total,val)=>{
-						// 0 大单位 1小单位
-						if(val.unitType === 0) {
-							total.bigUnit = total.bigUnit + (val.currentNum *1)
-						}else {
-							total.smallUnit = total.smallUnit +(1*val.currentNum)
-						}
-							total.totalPrice = total.totalPrice +  (1*val.currentNum) * (val.currentUnitPrice*1)
-						return total
-				},{
-					bigUnit: 0,
-					smallUnit:0,
-					totalPrice: 0
-				})
+				if(val.unitType === 0) {
+					total.bigUnit = total.bigUnit + (val.currentNum *1)
+				}else {
+					total.smallUnit = total.smallUnit +(1*val.currentNum)
+				}
+				total.totalPrice = total.totalPrice +  (1*val.currentNum) * (val.currentUnitPrice*1)
+				return total
+			},{ bigUnit: 0, smallUnit:0, totalPrice: 0 })
 		}
 	},
 	methods: {
-		// 结算创建订单
+		//结算创建订单
 		async setCreateOrder(){
 			try {
-				let arr = this.shopList.map(i=>({
-						productId:i.id,
-						unitType: i.unitType,
-						num: i.currentNum,
-						property: i.property,
-						unitPrice: i.currentUnitPrice
-					}))
+				let arr = this.shopList.map(i=>({ productId:i.id, unitType: i.unitType, num: i.currentNum, property: i.property, unitPrice: i.currentUnitPrice }))
 				const {settleId,payId,payUserId,isPrint,proceeds,freight} = this.$refs.selectSettle
 				await createCreateOrder({
 					customId: this.selectItemUser.id,
@@ -302,11 +229,11 @@ export default {
 				title: '提示',
 				content: '确认退出?',
 				success: function (res) {
-				if (res.confirm) {
-					uni.clearStorage()
-					that.$store.commit("setLoginInfo", {})
-					plus.runtime.restart()
-				}
+					if (res.confirm) {
+						uni.clearStorage()
+						that.$store.commit("setLoginInfo", {})
+						plus.runtime.restart()
+					}
 				}
 			})
 		},
@@ -320,41 +247,39 @@ export default {
 				title: '提示',
 				content: '确认删除?',
 				success: function (res) {
-				if (res.confirm) {
-					let index =	self.shopList.findIndex(i=>self.selectCurrentActiveItem.id === i.id)
-					self.shopList = self.shopList.filter(i=>self.selectCurrentActiveItem.id !== i.id)
-				}
+					if (res.confirm) {
+						let index =	self.shopList.findIndex(i=>self.selectCurrentActiveItem.id === i.id)
+						self.shopList = self.shopList.filter(i=>self.selectCurrentActiveItem.id !== i.id)
+					}
 				}
 			})
 
 		},
 		selectItemChange(item){
-
-					let obj	=	this.shopList.find(i=>i.id===item.id)
-					if(this.$util.isEmpty(obj)) {
-							this.selectItem = {
-							      ...item,
-							      currentUnit:item.bigUnit,
-							      currentUnitPrice:item.property==1?item.bigPrice:item.price,
-							      currentNum: 1,
-													unitType: 0
-							  }
-					}else{
-						this.selectItem = obj
-					}
+			let obj	=	this.shopList.find(i=>i.id===item.id)
+			if(this.$util.isEmpty(obj)) {
+				this.selectItem = {
+					...item,
+					currentUnit:item.bigUnit,
+					currentUnitPrice:item.property==1?item.bigPrice:item.price,
+					currentNum: 1,
+					unitType: 0
+				}
+			}else{
+				this.selectItem = obj
+			}
 		    this.isShowFllowNum = true
 		},
 		enterReturn(item){
 			this.isShowFllowNum = false
-		 let index =	this.shopList.findIndex(i=>i.id===item.id)
+		 	let index =	this.shopList.findIndex(i=>i.id===item.id)
 			console.log(1111,index)
 			console.log(item)
 			if(index >= 0) {
-						this.shopList.splice(index,1,item)
+				this.shopList.splice(index,1,item)
 			}else{
 				this.shopList.push(item)
 			}
-
 		},
 		collectMoneyBack(price){
 			console.log(price)
@@ -363,120 +288,123 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-	.app-workbench_box {
-		display: flex;
-		height: 100vh;
-		& .shop-list {
-			flex: 63;
-			height: 100%;
-			& .shop-footer_box {
+.app-workbench_box {
+	display: flex;
+	height: 100vh;
+	& .shop-list {
+		flex: 63;
+		height: 100%;
+		& .shop-footer_box {
+			height: 40rpx;
+			display: flex;
+			align-items: center;
+			justify-content: flex-end;
+			& > view {
 				height: 40rpx;
+				padding: 5rpx 25rpx;
+				border-radius: 5rpx;
+				font-size: 14rpx;
+				margin: 0 10rpx;
+				vertical-align: middle;
 				display: flex;
 				align-items: center;
-				justify-content: flex-end;
-				& > view {
-					height: 40rpx;
-					padding: 5rpx 25rpx;
-					border-radius: 5rpx;
-					font-size: 14rpx;
-					margin: 0 10rpx;
-					vertical-align: middle;
-					display: flex;
-					align-items: center;
-					&.btn-breakage {
-						background-color: #da9f5a;
-						color: #ffffff;
-					}
-					&.btn-account {
-						background-color: #009966;
-						color: #ffffff;
-					}
+				&.btn-breakage {
+					background-color: #da9f5a;
+					color: #ffffff;
+				}
+				&.btn-account {
+					background-color: #009966;
+					color: #ffffff;
 				}
 			}
 		}
-		& .nav-left {
-			height: 100%;
-			// width: 50rpx;
-			flex: 5;
+	}
+	& .nav-left {
+		height: 100%;
+		// width: 50rpx;
+		flex: 5;
+		background-color: rgba(72, 91, 107, 1);
+		// #599981
+		& .item-list {
+			margin-top: 50rpx;
+			font-size: 16rpx;
+			text-align: center;
+			padding: 15rpx 0;
+			background-color: #599981;
+			color: #FFFFFF;
+		}
+	}
+	& .shopList-box {
+			flex: 25;
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		& .title {
+			padding: 3rpx;
+			font-size: 12rpx;
 			background-color: rgba(72, 91, 107, 1);
-			// #599981
-			& .item-list {
-				margin-top: 50rpx;
-				font-size: 16rpx;
-				text-align: center;
-				padding: 15rpx 0;
-				background-color: #599981;
-				color: #FFFFFF;
-			}
+			color: #FFFFFF;
 		}
-		& .shopList-box {
-				flex: 25;
-			height: 100%;
-			display: flex;
-			flex-direction: column;
-			& .title {
-				padding: 3rpx;
-				font-size: 12rpx;
-				background-color: rgba(72, 91, 107, 1);
-				color: #FFFFFF;
-			}
-			& .shopList-item_box {
-				flex: 1;
-			 border: 1px solid #eee;
-				& .shop-item_box {
+		& .shopList-item_box {
+			flex: 1;
+			border: 1px solid #eee;
+			& .shop-item_box {
+				padding: 5rpx;
+				& .shop-body_box {
 					padding: 5rpx;
-					& .shop-body_box {
-						padding: 5rpx;
-						font-size: 14rpx;
-						&.active {
-							background-color: #f2f8f8;
-						}
-						& .flower-name_box {
-							padding: 0 5rpx;
-							& .name {
-								color: #333333;
-								font-weight: bold;
-							}
-						}
-						& > view:nth-child(2) {
-							display: flex;
-							align-items: center;
-							justify-content: space-between;
-							padding-top: 15rpx;
+					font-size: 14rpx;
+					&.active {
+						background-color: #b2b4b4;
+					}
+					&.not-active {
+						background-color: #e1e4e4;
+					}
+					& .flower-name_box {
+						padding: 0 5rpx;
+						& .name {
+							color: #333333;
+							font-weight: bold;
 						}
 					}
+					& > view:nth-child(2) {
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						padding-top: 15rpx;
+					}
 				}
 			}
-			& .shopList-footer_box {
-				height: 50rpx;
-				border: 1px solid #eee;
-				font-size: 12rpx;
-				display: flex;
-				align-items: center;
-				justify-content: space-around;
-			}
 		}
-		& .open-box {
-			flex: 8;
-			height: 100vh;
+		& .shopList-footer_box {
+			height: 50rpx;
+			border: 1px solid #eee;
+			font-size: 12rpx;
 			display: flex;
-			flex-direction: column;
-			padding: 5rpx;
-			padding-top: 10rpx;
-			& > view {
-				border: 1px solid #eee;
-				text-align: center;
-				padding: 10rpx 0;
-				color: #333333;
-				margin-bottom: 15rpx;
-				font-size: 14rpx;
-				text-align: center;
-				&.active {
-					color: #008000;
-					border-color: #008000;
-					border-radius: 2rpx;
-				}
+			align-items: center;
+			justify-content: space-around;
+		}
+	}
+	& .open-box {
+		flex: 8;
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		padding: 5rpx;
+		padding-top: 10rpx;
+		& > view {
+			border: 1px solid #eee;
+			text-align: center;
+			padding: 10rpx 0;
+			color: #333333;
+			margin-bottom: 15rpx;
+			font-size: 14rpx;
+			text-align: center;
+			&.active {
+				color: #008000;
+				border-color: #008000;
+				border-radius: 2rpx;
 			}
 		}
 	}
-</style>
+}
+</style>

+ 55 - 80
ghsPad/src/components/app-boardSet-flower.vue

@@ -7,23 +7,11 @@
                 <view>
                     <view class="desc">数量</view>
                     <div class="flower-unit_box">
-                        <input
-                            ref="input"
-                            disabled
-                            @tap="changeType('currentNum')"
-                            :key="selectItem.currentNum"
-                            @focus="focusSelect($event)"
-                            type="text"
-                            v-model="selectItem.currentNum">
+                        <input ref="input" disabled @tap="changeType('currentNum')" :key="selectItem.currentNum" @focus="focusSelect($event)" type="text" v-model="selectItem.currentNum">
                         <span>{{selectItem.currentUnit}}</span>
                     </div>
                 </view>
-                <image
-                    @tap="changeUnit"
-                    class="change-unit"
-                    src="https://bpic.51yuansu.com/pic3/cover/03/80/68/5c0607c96e49d_610.jpg"
-                    mode="scaleToFill"
-                />
+                <image @tap="changeUnit" class="change-unit" src="https://bpic.51yuansu.com/pic3/cover/03/80/68/5c0607c96e49d_610.jpg" mode="scaleToFill"></image>
                 <view>
                     <view class="desc">单价</view>
                     <div class="flower-unit_box">
@@ -31,23 +19,13 @@
                     </div>
                 </view>
             </view>
-            <view class="set-residue_box">
-                还剩5扎2支
-            </view>
+            <view class="set-residue_box"> 还剩5扎2支 </view>
         </view>
         <view class="keyboard-body_box">
-         <VKeyboard
-            ref="keyboard"
-            :pointIsShow="false"
-            :digital="true"
-            :disorderly="false"
-            @typing="typing"
-            @enter="enter">
-            </VKeyboard>
+         <VKeyboard ref="keyboard" :pointIsShow="true" :digital="true" :disorderly="false" @typing="typing" @enter="enter"> </VKeyboard>
         </view>
     </view>
 </template>
-
 <script>
     import VKeyboard from '@/components/plugin/vKeyboard/VKeyboard.vue'
     // import keyboardModule from '@/components/keyboard.vue'
@@ -72,7 +50,6 @@
 		mounted(){
             this.activeKeyboard()
             // this.focus()
-
 		},
 		methods: {
             focus() {
@@ -115,69 +92,67 @@
                 this.selectItem.currentUnit = this.selectItem.unitType ===0?this.selectItem.bigUnit:this.selectItem.smallUnit
                 this.selectItem.currentUnitPrice = this.selectItem.unitType ===0?this.selectItem.bigPrice:this.selectItem.smallPrice
                 this.$emit('update:selectItem', this.selectItem)
-
-
 			}
 			//键盘方法end
-				}
+		}
     }
 </script>
-
 <style lang="scss" scoped>
-    .boardset-flowert {
-        background-color: #ffffff;
-        margin: 0 auto;
-        border-radius: 5rpx;
-        padding: 10rpx;
-        // overflow: hidden;
-        overflow-y: auto;
+.boardset-flowert {
+    width:60vh;
+    background-color: #ffffff;
+    margin: 0 auto;
+    border-radius: 5rpx;
+    padding: 10rpx;
+    // overflow: hidden;
+    overflow-y: auto;
+    display: flex;
+    height: 90vh;
+    flex-direction: column;
+    box-sizing: border-box;
+    & .flower-input_box {
+        flex: 1;
+        & .flower-title {
+            text-align: center;
+            color: #333333;
+            font-size: 14rpx;
+        }
+        & .set-residue_box {
+            font-size: 14rpx;
+            color: #666666;
+            margin-top: 10rpx;
+            text-align: left;
+        }
+    }
+    & .flower-open_box {
         display: flex;
-        height: 90vh;
-        flex-direction: column;
-        box-sizing: border-box;
-        & .flower-input_box {
-            flex: 1;
-            & .flower-title {
-                text-align: center;
-                color: #333333;
-                font-size: 14rpx;
+        align-items: center;
+        justify-content: center;
+        & > view {
+            & .desc {
+                font-size: 12rpx;
+                margin-bottom: 8rpx;
             }
-            & .set-residue_box {
-                font-size: 14rpx;
-                color: #666666;
-                margin-top: 10rpx;
-                text-align: left;
-            }
-        }
-        & .flower-open_box {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            & > view {
-                & .desc {
-                    font-size: 12rpx;
-                    margin-bottom: 8rpx;
+            & .flower-unit_box {
+                display: flex;
+                align-items: center;
+                & > input {
+                    flex: 1;
+                    height: 40rpx;
+                    font-size: 14rpx;
+                    border-bottom: 1px solid #eee;
                 }
-                & .flower-unit_box {
-                    display: flex;
-                    align-items: center;
-                    & > input {
-                        flex: 1;
-                        height: 40rpx;
-                        font-size: 14rpx;
-                        border-bottom: 1px solid #eee;
-                    }
-                }
-            }
-            & .change-unit {
-                width: 35rpx;
-                height: 35rpx;
-                padding: 0 7rpx;
             }
         }
-        & .keyboard-body_box {
-            flex: 1;
-            overflow: hidden;
+        & .change-unit {
+            width: 35rpx;
+            height: 35rpx;
+            padding: 0 7rpx;
         }
     }
+    & .keyboard-body_box {
+        flex: 1;
+        overflow: hidden;
+    }
+}
 </style>