shish 11 mesi fa
parent
commit
4543750a84

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

@@ -295,9 +295,13 @@ export default {
 			uni.showLoading({mask:false})
 			let product = this.selectList.map(i=>({ productId:i.id, unitType: i.unitType||0, num: i.currentNum, property: i.property, unitPrice: i.unitPrice }))
 			//isCashier=1时收银台播放 总金额139元,请扫码付款
-			createOrder({...params,product:JSON.stringify(product),isCashier:1,customId:this.customId}).then(res=>{
+			createOrder({...params,product:JSON.stringify(product),isCashier:1,customId:this.customId,version:2}).then(res=>{
 				uni.hideLoading()
 				if(res.code == 1){
+					if(res.data.diff && !this.$util.isEmpty(res.data.diff)){
+						this.$refs.settlePop.diffConfirm(res.data.diff)
+						return false
+					}
 					if(res.data.status == 1){
 						this.orderId = res.data.id
 						this.price = res.data.mainPay ? Number(res.data.mainPay) : 0

+ 32 - 1
hdPad/src/pages/home/components/settlePop.vue

@@ -105,6 +105,20 @@
 
         </view>
 
+        <uni-popup ref="diffRef" background-color="#fff" type="center" :animation="false">
+            <view style="padding:10upx ;width:80vw;height:100vh;font-size:22upx;overflow-y:scroll;padding-bottom:86upx;">
+                <view v-for="(diff, diffIndex) in diffData" :key="diffIndex">
+                    <view>{{diff.name}} <text style="margin-left:20upx;">售价:¥{{diff.price?parseFloat(diff.price):0}}</text><text style="margin-left:30upx;">开单价:¥{{diff.kdPrice?parseFloat(diff.kdPrice):0}}</text></view>
+                </view>
+                <view style="margin-top:20upx;">以上开单价和售价不一样,请确认是否提交?</view>
+                <view style="text-align:center;margin-top:20upx;position:fixed;bottom:0upx;background-color:white;width:78vw;">
+                <button class="admin-button-com middle" @click="cancelDiff" style="margin-right:20upx;">取消</button>
+                <button class="admin-button-com middle blue" @click="confirmDiff">确认</button>
+                </view>
+            </view>
+        </uni-popup>
+
+
     </view>
 </template>
 <script>
@@ -134,7 +148,8 @@ export default {
                 getStaffName:'',
                 shopAdminId:0,
                 shopAdminName:'',
-                cash:0
+                cash:0,
+                dealPrice:0
             },
             proceeds: '0',
             hasPayList:[ { name:'扫码', id:0, },{ name:'赊账', id:2, },{ name:'线下', id:1, }],
@@ -144,6 +159,7 @@ export default {
             needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
             getStaffList:[],
             shopAdminIdList:[],
+            diffData:[],
             discountList:[{name:'1折',value:0.1},{name:'2折',value:0.2},{name:'3折',value:0.3},{name:'4折',value:0.4},{name:'5折',value:0.5},{name:'6折',value:0.6},{name:'7折',value:0.7},{name:'8折',value:0.8},{name:'9折',value:0.9},{name:'不打折',value:1}],
             discountValue:0,
             showDiscount:false
@@ -203,6 +219,7 @@ export default {
                     this.form.remark = ''
                     this.form.sendCost = 0
                     this.form.labourCost = 0
+                    this.form.dealPrice = 0
                 }
             },
             immediate:true
@@ -237,6 +254,19 @@ export default {
         })
     },
     methods: {
+        confirmDiff(){
+            this.form.dealPrice = 1
+            this.$refs.diffRef.close()
+            this.enter()
+        },
+        cancelDiff(){
+            this.form.dealPrice = 0
+            this.$refs.diffRef.close()
+        },
+        diffConfirm(data){
+            this.diffData = data
+            this.$refs.diffRef.open('center')
+        },
         viewDiscount(){
             this.showDiscount = true
         },
@@ -447,6 +477,7 @@ export default {
         padding: 5upx 10upx 10upx 10upx;
         display: flex;
         flex-direction: column;
+        z-index:29;
         & .input-list{
             border-bottom: 1upx solid #ebedf0;
             height:30upx;

+ 1 - 0
hdPad/src/pages/home/components/toPay.vue

@@ -143,6 +143,7 @@ export default {
                     that.$msg('已取消')
                 }
             })
+            this.$refs.cancelPaymentRef.close()
             //有可能订单已经是取消的状态了,再点取消就直接关闭页面,所以可以不用考虑取消动作是否成功才关闭页面
             that.$emit('cancelPay')
         }