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

+ 1 - 1
ghsApp/src/admin/billing/affirm.vue

@@ -216,7 +216,7 @@ export default {
       autoLoad: false,
       isBilling: true,
       staffList:[],
-			payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
+			payWayList:[{name:"客服微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
 			payWayindex:0,
       form: {
         shopId: "",

+ 2 - 2
hdPad/src/pages/home/components/leftGroup.vue

@@ -10,7 +10,7 @@
                         </view>
                         <image class="flower-image" :src="item.cover"></image>
                     </view>
-                    <view class="item-price-num"> <view>¥{{parseFloat(item.price)}}</view> <view>{{item.num}}次</view> <view>组合开单</view>  <view><text @click.stop="delCombination(item.id)" class="del">删除</text></view> </view>
+                    <view class="item-price-num"> <view>¥{{parseFloat(item.price)}}</view> <view>{{item.num}}次</view> <view>快捷开单</view>  <view><text @click.stop="delCombination(item.id)" class="del">删除</text></view> </view>
                 </view>
             </view>
         </scroll-view>
@@ -90,7 +90,7 @@ export default {
         },
 		settleCommit(params){
 			uni.showLoading({mask:true})
-			createOrder({...params,groupId:this.groupInfo.id}).then(res=>{
+			createOrder({...params,groupId:this.groupInfo.id,isCashier:1}).then(res=>{
 				uni.hideLoading()
 				if(res.code == 1){
 					if(res.data.status == 1){

+ 60 - 19
hdPad/src/pages/home/components/settlePop.vue

@@ -46,31 +46,41 @@
 
             <view class="input-list">
                 <text>商品金额</text>
-                <text><text>{{allPrice}}</text></text>
+                <text><text>{{allPrice}}</text></text>
             </view>
 
             <view class="input-list" @click.stop="changeCheck(1)">
                 <text style="color:green;">运费</text>
-                <text><text :class="{selected:checkType == 1}">{{form.sendCost}}</text></text>
+                <text><text :class="{selected:checkType == 1}">{{form.sendCost}}</text></text>
             </view>
             <view class="input-list" @click.stop="changeCheck(2)">
                 <text style="color:green;">包装资材费</text>
-                <text><text :class="{selected:checkType == 2}">{{form.labourCost}}</text></text>
+                <text><text :class="{selected:checkType == 2}">{{form.labourCost}}</text></text>
             </view>
             <view class="input-list">
                 <text>总金额</text>
-                <text><text>{{totalPrice}}</text></text>
+                <text><text>{{totalPrice}}</text></text>
             </view>
 
-            <view class="input-list">
+            <view class="input-list" @click.stop="changeCheck(0)">
+                <text style="color:green;">应付金额</text>
+                <text style="font-size: 10upx;color:green;" v-if="diffPrice > 0">优惠¥<text>{{diffPrice}}</text></text>
+                <text><text :class="{selected:checkType == 0}">{{form.modifyPrice}}</text></text>
+            </view>
+
+            <view class="input-list" @click.stop="changeCheck(3)">
                 <text style="color:green;">收现金</text>
-                <text>¥<text>30</text></text>
+                <text><text :class="{selected:checkType == 3}">{{form.cash}}</text></text>
             </view>
 
-            <view class="input-list input-bottom" @click.stop="changeCheck(0)">
-                <text style="color:green;">应付金额</text>
-                <text style="font-size: 10upx;color:green;" v-if="diffPrice > 0">优惠¥<text>{{diffPrice}}</text></text>
-                <text>¥<text :class="{selected:checkType == 0}">{{form.modifyPrice}}</text></text>
+            <view class="input-list" v-if="Number(zl)>0">
+                <text>找零</text>
+                <text><text>{{zl}}</text></text>
+            </view>
+
+            <view class="input-list" v-if="Number(zl)<0">
+                <text>还差</text>
+                <text><text>{{-zl}}</text></text>
             </view>
 
             <view class="keyboard-body_box"> <VKeyboard ref="keyboard" :digital="true" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel"> </VKeyboard> </view>
@@ -102,11 +112,12 @@ export default {
                 labourCost:0,
                 modifyPrice:0,
                 getStaffId:0,
-                getStaffName:''
+                getStaffName:'',
+                cash:0
             },
             proceeds: '0',
             hasPayList:[ { name:'扫码', id:0, }, { name:'其它', id:1, }],
-            payWayList:[ { name:'客服微信', id:0 }, { name:'支付宝', id:1 }, { name:'现金', id:4 }, { name:'银行卡', id:5 },{name:'其它',id:9} ],
+            payWayList:[ { name:'客服微信', id:0 }, { name:'支付宝', id:1 },{name:'其它',id:9} ],
             currentInputType:'proceeds',
             totalMoney: 0,
             needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
@@ -145,6 +156,14 @@ export default {
             let price = Number(this.totalPrice) - Number(this.form.modifyPrice)
             price = parseFloat(price.toFixed(2))
             return price
+        },
+        zl(){
+            let price = 0
+            if(Number(this.form.cash) > 0 && Number(this.form.modifyPrice) > 0){
+                price = Number(this.form.cash) - Number(this.form.modifyPrice)
+                price = parseFloat(price.toFixed(2))
+            }
+            return Number(price)
         }
     },
     watch:{
@@ -179,15 +198,19 @@ export default {
     },
     methods: {
         changeNeedPrint(val){
+            this.$util.hitVoice()
             this.form.needPrint = val
         },
         changePayWay(val){
+            this.$util.hitVoice()
             this.form.payWay = val
         },
         changeHasPay(val){
+            this.$util.hitVoice()
             this.form.hasPay = val
         },
         changeCheck(val){
+            this.$util.hitVoice()
             this.checkType = val
             this.fillType = val
         },
@@ -221,6 +244,14 @@ export default {
                             this.form.labourCost = this.form.labourCost.substring(0, this.form.labourCost.length - 1)   
                         }
                     }
+                }else if(this.fillType == 3){
+                    if(this.checkType == 3){
+                        this.form.cash = ''
+                    }else{
+                        if (this.form.cash.length > 0) {
+                            this.form.cash = this.form.cash.substring(0, this.form.cash.length - 1)   
+                        }
+                    }
                 }else{
 
                 }
@@ -243,6 +274,12 @@ export default {
                     }else {
                         this.form.labourCost += e.char
                     }
+                }else if(this.fillType == 3){
+                    if(this.$util.isEmpty(this.form.cash) || this.checkType == 3) {
+                        this.form.cash = e.char
+                    }else {
+                        this.form.cash += e.char
+                    }
                 }else{
 
                 }
@@ -254,6 +291,10 @@ export default {
             this.$refs.keyboard.activate();
         },
         enter() {
+            if( Number(this.form.modifyPrice)> Number(this.totalPrice)){
+                this.$msg('应付金额不能大于总金额')
+                return false
+            }
             this.$emit('settleCommit',this.form)
         },
         cancel(){
@@ -303,13 +344,13 @@ export default {
                 flex-wrap: wrap;
                 padding: 6upx 0;
                 & > view {
-                    width: 85upx;
-                    height: 30upx;
+                    width: 80upx;
+                    height: 25upx;
                     text-align: center;
-                    line-height: 30upx;
-                    font-size: 12upx;
+                    line-height: 25upx;
+                    font-size: 10upx;
                     border: 1px solid #eee;
-                    margin: 0 5upx 5upx 0;
+                    margin: 0 3upx 3upx 0;
                     color: #333333;
                     border-radius: 3upx;
                     &.active {
@@ -331,8 +372,8 @@ export default {
         flex-direction: column;
         & .input-list{
             border-bottom: 1upx solid #ebedf0;
-            height:35upx;
-            font-size: 14upx;
+            height:30upx;
+            font-size: 11upx;
             display:flex;
             align-items: center;
             justify-content:space-between;