|
|
@@ -3,7 +3,7 @@
|
|
|
<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="beginSettle">结算</view>
|
|
|
<view class="active" @click="clearItemFn">清空</view>
|
|
|
<view class="active" @click="cancelKdFn">返回</view>
|
|
|
|
|
|
@@ -36,7 +36,7 @@
|
|
|
<!-- 开单选花材输入数量和金额 -->
|
|
|
<uni-popup ref="selectNumPriceRef" background-color="#fff" type="center" :animation="false">
|
|
|
<selectNumPrice @confirmAddItemModel="confirmAddItemModel" :customData.sync="customData"
|
|
|
- @addToClear="addToClear" @cancelKdSelectNumPrice="addItemModelHidden"></selectNumPrice>
|
|
|
+ @cancelKdSelectNumPrice="addItemModelHidden"></selectNumPrice>
|
|
|
</uni-popup>
|
|
|
|
|
|
</view>
|
|
|
@@ -114,32 +114,6 @@ export default {
|
|
|
this.$util.hitVoice()
|
|
|
this.$emit('cancelKdFn')
|
|
|
},
|
|
|
- addToClear(){
|
|
|
- let params = {
|
|
|
- hasPay: 0,
|
|
|
- payWay:0,
|
|
|
- needPrint:2,
|
|
|
- freight: '',
|
|
|
- groupName:'',
|
|
|
- remark:'',
|
|
|
- sendCost:0,
|
|
|
- modifyPrice:0,
|
|
|
- getStaffName:''
|
|
|
- }
|
|
|
- if(this.$util.isEmpty(this.selectList)){
|
|
|
- this.$msg('请选择商品')
|
|
|
- return false
|
|
|
- }
|
|
|
- let price = 0
|
|
|
- for (const ele of this.selectList) {
|
|
|
- let currentPrice = Number(ele.currentNum) * Number(ele.unitPrice)
|
|
|
- currentPrice = currentPrice.toFixed(2)
|
|
|
- price = Number(currentPrice) + Number(price)
|
|
|
- price = price.toFixed(2)
|
|
|
- }
|
|
|
- params.modifyPrice = price
|
|
|
- this.settleCommit(params)
|
|
|
- },
|
|
|
cancelSelectPrice(){
|
|
|
this.$refs.gatheringRef.close()
|
|
|
},
|
|
|
@@ -207,6 +181,10 @@ export default {
|
|
|
createOrder({...params,product:JSON.stringify(productList),isCashier:1,customId:this.customId}).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.actPrice ? Number(res.data.actPrice) : 0
|
|
|
@@ -291,7 +269,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- goSettleCommit(){
|
|
|
+ beginSettle(){
|
|
|
this.$util.hitVoice()
|
|
|
if(this.$util.isEmpty(this.selectList)) {
|
|
|
this.$msg('请选择结算花材')
|