shish 3 лет назад
Родитель
Сommit
e782268e8d
1 измененных файлов с 19 добавлено и 5 удалено
  1. 19 5
      hdPad/src/pages/home/components/console.vue

+ 19 - 5
hdPad/src/pages/home/components/console.vue

@@ -2,16 +2,16 @@
 <view class="button-area">
 	<view class="active" @click="calcFn">{{calc == 'add' ? '+' : '-'}}</view>
 	<view class="active" @click="changeProperty">{{property==1 ? '花材' : '商品'}}</view>
+	<view class="active" @click="openBox">开箱</view>
 	 <view class="active" 
  style="background-color:orange;color:white;border-color:orange;position:fixed;left:135upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:16upx;" 
- @click="goSettleCommit">结算 </view>
-
+ @click="goSettleCommit">结算</view>
 	 <view class="active" 
  style="position:fixed;left:36upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:13upx;" 
- @click="selectCustom()">选客</view>
+ @click="gatheringFn()">收款</view>
 	<view class="active" @click="breakFn">拆散</view>
     <view class="active" @click="toWastage">报损</view>
-	<view class="active" style="background-color:orange;color:white;border-color:orange;height:50upx;line-height:30upx;font-size:14upx;" @click="gatheringFn()">收款</view>
+	<view class="active" @click="selectCustom()">选客</view>
     <view class="active" @click="clearItemFn">清空</view>
 	<view class="active" @click="logoutFn">退出</view>
 	<view class="active" @click="closeFn">关闭</view>
@@ -68,6 +68,7 @@ import {goodsWastage} from '@/api/wastage'
 import productMins from "@/mixins/product"
 import selectPrice from './selectPrice'
 import selectNumPrice from './selectNumPrice'
+let sunmiCashboxPlugin = uni.requireNativePlugin('Tellsea-SunmiCashboxPlugin')
 export default {
     name:'console',
 	mixins: [productMins],
@@ -356,6 +357,19 @@ export default {
 			this.$util.hitVoice()
 			this.$refs.clearItemRef.open()
 		},
+		openBox(){
+			sunmiCashboxPlugin.connect((e) => {
+				let res = JSON.parse(e)
+				if (res.code == 200) {
+					sunmiCashboxPlugin.openDrawer((e) => {
+						let res = JSON.parse(e)
+						if (res.code == 200) {
+							//that.$msg(res.msg)
+						}
+					});
+				}
+			})
+		},
 		//确认清空花材
 		confirmClearItem(){
 			this.$util.hitVoice()
@@ -394,7 +408,7 @@ export default {
         text-align: center;
         padding: 10upx 0;
         color: #666666;
-        margin-bottom: 10upx;
+        margin-bottom: 8upx;
         font-size: 10upx;
         text-align: center;
     }