确认收货订单添加CompleteAudit接口请求
This commit is contained in:
parent
a17c94939a
commit
5da41e927e
@ -111,3 +111,7 @@ export function cancelLocalOrder(data) {
|
||||
export function localOrderList(data) {
|
||||
return request.post('localStore/localOrderList', data)
|
||||
}
|
||||
|
||||
export function completeAudit(data) {
|
||||
return request.post('gh/CompleteAudit', data)
|
||||
}
|
||||
|
||||
@ -412,4 +412,4 @@ export function getScheme() {
|
||||
|
||||
export function distributionPay(data) {
|
||||
return request.post("pay/distributionPay", data)
|
||||
}
|
||||
}
|
||||
@ -741,6 +741,7 @@
|
||||
|
||||
applyDistribute(params).then((res) => {
|
||||
if (res.code == 1) {
|
||||
const id = res.data.id
|
||||
gh({
|
||||
money,
|
||||
partner_id: partner.id,
|
||||
@ -754,7 +755,9 @@
|
||||
signType: result.data.signType,
|
||||
timeStamp: result.data.timeStamp,
|
||||
}
|
||||
this.handleWechatPay(pay, result.data.alog_id);
|
||||
const alog_id = result.data.alog_id
|
||||
|
||||
this.handleWechatPay(pay, alog_id, id);
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -762,21 +765,22 @@
|
||||
},
|
||||
|
||||
// 微信支付
|
||||
handleWechatPay(data, alog_id) {
|
||||
handleWechatPay(data, alog_id, id) {
|
||||
wxpay(data).then(res => {
|
||||
console.log('res=', res)
|
||||
this.handPayResult(res, alog_id)
|
||||
this.handPayResult(res, alog_id, id)
|
||||
}).catch(err => {
|
||||
console.log('err=', err)
|
||||
})
|
||||
},
|
||||
|
||||
// 支付后处理
|
||||
handPayResult(result, alog_id) {
|
||||
handPayResult(result, alog_id, id) {
|
||||
if (result === 'success') {
|
||||
this.successPopup = true
|
||||
checkReturn({
|
||||
alog_id
|
||||
alog_id,
|
||||
id
|
||||
})
|
||||
} else if (result === 'fail') {
|
||||
this.cancelPopup = true
|
||||
|
||||
@ -36,6 +36,16 @@
|
||||
<text class="sm info-color">消费订单金额:</text>
|
||||
<text class="sm money-color">¥{{item.order_price}}</text>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<text class="sm info-color">提现金额:</text>
|
||||
<text class="sm money-color">¥{{item.withdrawal_amount}}</text>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<text class="sm info-color">可使用金额:</text>
|
||||
<text class="sm money-color">¥{{item.available_amount}}</text>
|
||||
</view>
|
||||
<!-- <view style="margin-left: 40rpx;">
|
||||
<text class="sm info-color">商家最高补贴:</text>
|
||||
<text class="sm money-color">¥{{item.subsidy_price}}</text>
|
||||
|
||||
@ -47,7 +47,3 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
</view>
|
||||
<view v-if="item.take_btn" class="m-l-20">
|
||||
<button size="sm" class="btn plain br60 primary red" hover-class="none"
|
||||
@tap.stop="comfirmOrder(item.id)">确认收货</button>
|
||||
@tap.stop="comfirmOrder(item.id, item.shop.id)">确认收货</button>
|
||||
</view>
|
||||
</view>
|
||||
</router-link>
|
||||
@ -113,7 +113,8 @@
|
||||
getOrderList,
|
||||
cancelOrder,
|
||||
delOrder,
|
||||
confirmOrder
|
||||
confirmOrder,
|
||||
completeAudit
|
||||
} from '@/api/order';
|
||||
|
||||
export default {
|
||||
@ -172,7 +173,7 @@
|
||||
title: '提交中',
|
||||
mask: true
|
||||
})
|
||||
const { type, orderId } = this
|
||||
const { type, orderId, shopId } = this
|
||||
let res = null
|
||||
switch (type) {
|
||||
case 0:
|
||||
@ -185,6 +186,13 @@
|
||||
|
||||
case 2:
|
||||
res = await confirmOrder(orderId);
|
||||
if (shopId == 17) {
|
||||
completeAudit({
|
||||
id: orderId,
|
||||
type: 1
|
||||
})
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -211,8 +219,9 @@
|
||||
});
|
||||
},
|
||||
|
||||
comfirmOrder(id) {
|
||||
comfirmOrder(id, shopId) {
|
||||
this.orderId = id
|
||||
this.shopId = shopId
|
||||
this.type = 2
|
||||
this.$nextTick(() => {
|
||||
this.dialogOpen();
|
||||
|
||||
@ -218,7 +218,8 @@
|
||||
handPayResult(result, data) {
|
||||
if (result === 'success' && this.shopId == 17) {
|
||||
checkReturn({
|
||||
alog_id: data.alog_id
|
||||
alog_id: data.alog_id,
|
||||
type: 1
|
||||
})
|
||||
}
|
||||
// 页面出栈
|
||||
|
||||
Loading…
Reference in New Issue
Block a user