|
|
@@ -54,7 +54,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="summary-bar">
|
|
|
- <view class="operate-view" v-if="isScanEnv" @click="pageToItemList()"><text class="iconfont iconzeng"></text>手动添加花材</view>
|
|
|
+ <view class="operate-view" v-if="isScanEnv"><text class="iconfont iconzeng"></text>手动添加花材</view>
|
|
|
<view class="operate-view" v-if="isScanEnv == false"><text> </text></view>
|
|
|
<view class="describe-view">
|
|
|
<text>{{ selectList.length }}种</text>
|
|
|
@@ -584,7 +584,7 @@ export default {
|
|
|
//售后付款单,只能走线下模式
|
|
|
this.form.hasPay = 1
|
|
|
this.form.payWay = this.forwardPayWay
|
|
|
- this.toCommit()
|
|
|
+ this.submitOrder()
|
|
|
},
|
|
|
confirmSubmit(){
|
|
|
if(this.form.forward == 1){
|
|
|
@@ -594,14 +594,14 @@ export default {
|
|
|
//客户余额充值,只能使用余额支付
|
|
|
this.$util.confirmModal({content:'客户余额充足,请使用余额支付'},() => {
|
|
|
this.form.hasPay = 4
|
|
|
- this.toCommit()
|
|
|
+ this.submitOrder()
|
|
|
})
|
|
|
}else{
|
|
|
- this.toCommit()
|
|
|
+ this.submitOrder()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- toCommit() {
|
|
|
+ submitOrder() {
|
|
|
let self = this;
|
|
|
let name = '确认提交'
|
|
|
if(this.form.hasPay == 0){
|
|
|
@@ -649,6 +649,12 @@ export default {
|
|
|
//orderType 开单类型,1商品开单 2花材开单
|
|
|
params = {...params,xj:JSON.stringify(xj),orderType:2}
|
|
|
|
|
|
+ //扣减库存
|
|
|
+ let orderId = this.option.orderId ? this.option.orderId : 0
|
|
|
+ let book = this.option.book ? this.option.book : 0
|
|
|
+ let reduceStock = this.option.reduceStock?this.option.reduceStock:0
|
|
|
+ params = {...params,orderId:orderId,book:book,reduceStock:reduceStock}
|
|
|
+
|
|
|
uni.showLoading({mask:true})
|
|
|
createOrder(params).then((res) => {
|
|
|
uni.hideLoading()
|
|
|
@@ -685,10 +691,10 @@ export default {
|
|
|
gobackEvent () {
|
|
|
let customId = this.option.customId ? this.option.customId : 0
|
|
|
let customName = this.option.customName ? this.option.customName : ''
|
|
|
- this.$util.pageTo({url: '/admin/billing/index2?customId='+customId+'&customName='+customName,type:2})
|
|
|
- },
|
|
|
- pageToItemList() {
|
|
|
- this.$util.pageTo({url: '/admin/billing/index2?customId='+this.option.customId,type:2})
|
|
|
+ let reduceStock = this.option.reduceStock?this.option.reduceStock:0
|
|
|
+ let orderId = this.option.orderId ? this.option.orderId : 0
|
|
|
+ let book = this.option.book ? this.option.book : 0
|
|
|
+ this.$util.pageTo({url: '/admin/billing/index2?customId='+customId+'&customName='+customName+'&orderId='+orderId+'&book='+book+'&reduceStock='+reduceStock,type:2})
|
|
|
}
|
|
|
}
|
|
|
};
|