|
|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<view class="button-area">
|
|
|
<view class="active" @click="calcFn">{{calc == 'add' ? '+' : '-'}}</view>
|
|
|
- <!-- <view class="active" @click="resetCustomer">选客</view> -->
|
|
|
<view class="active" @click="changeProperty">{{property==1 ? '花材' : '商品'}}</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;"
|
|
|
@@ -178,12 +177,12 @@ export default {
|
|
|
if(res.code == 1){
|
|
|
if(res.data.status == 1){
|
|
|
this.$refs.toPayRef.open('center')
|
|
|
+ this.$refs.gatheringRef.close()
|
|
|
+ this.orderId = res.data.id
|
|
|
+ this.price = res.data.mainPay ? Number(res.data.mainPay) : 0
|
|
|
}else{
|
|
|
uni.showToast({title: '操作成功' })
|
|
|
}
|
|
|
- this.$refs.gatheringRef.close()
|
|
|
- this.orderId = res.data.id
|
|
|
- this.price = res.data.mainPay ? Number(res.data.mainPay) : 0
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -195,6 +194,8 @@ export default {
|
|
|
this.$util.hitVoice()
|
|
|
this.$refs.toPayRef.close()
|
|
|
this.removeFromSaveDirect()
|
|
|
+ this.customId =0
|
|
|
+ this.customName=''
|
|
|
//继续监听花材扫码
|
|
|
this.listenScanItem()
|
|
|
//开单完成之后更新花材库存
|
|
|
@@ -207,10 +208,6 @@ export default {
|
|
|
this.property = this.property == 1 ? 0 : 1
|
|
|
this.$emit('changeProperty',this.property)
|
|
|
},
|
|
|
- resetCustomer(){
|
|
|
- this.$util.hitVoice()
|
|
|
- this.$emit('resetCustomer')
|
|
|
- },
|
|
|
settleCommit(params){
|
|
|
if(this.$util.isEmpty(this.selectList)) {
|
|
|
this.$msg('请选择商品')
|
|
|
@@ -219,7 +216,7 @@ export default {
|
|
|
uni.showLoading({mask:true})
|
|
|
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}).then(res=>{
|
|
|
+ createOrder({...params,product:JSON.stringify(product),isCashier:1,customId:this.customId}).then(res=>{
|
|
|
uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
|
if(res.data.status == 1){
|
|
|
@@ -228,6 +225,8 @@ export default {
|
|
|
this.$refs.toPayRef.open('center')
|
|
|
}else{
|
|
|
this.removeFromSaveDirect()
|
|
|
+ this.customId = 0
|
|
|
+ this.customName = ''
|
|
|
//开单完成之后更新花材库存
|
|
|
this.$emit('rightItemRefresh')
|
|
|
uni.showToast({ title: '操作成功', duration: 1000 })
|
|
|
@@ -324,6 +323,8 @@ export default {
|
|
|
confirmClearItem(){
|
|
|
this.$util.hitVoice()
|
|
|
this.removeFromSaveDirect()
|
|
|
+ this.customId = 0
|
|
|
+ this.customName = ''
|
|
|
},
|
|
|
confirmLogout(){
|
|
|
this.$util.hitVoice()
|