Authored by 沈志敏

fix bug

... ... @@ -52,6 +52,7 @@
'use strict';
const $ = require('jquery');
const tip = require('common/tip');
const Modal = require('common/modal');
module.exports = {
data() {
... ... @@ -99,6 +100,8 @@
* @param type refundType 1为退货,2为换货
*/
cancelApply(id, type) {
Modal.confirm('', '取消后不能恢复,确认取消吗?', function() {
this.hide();
$.ajax({
url: '/me/return/' + (Number(type) === 2 ? 'exchange' : 'refund') + '/cancel-apply',
type: 'post',
... ... @@ -114,6 +117,7 @@
}).fail(() => {
tip('操作失敗');
});
});
}
}
};
... ...
... ... @@ -73,8 +73,8 @@
<p>(现金:&yen;{{detail.returnAmountTotal}} - YOHO币:{{detail.returnYohoCoin}} - 优惠券:{{detail.returnCouponAmount}})</p>
</div>
<div class="exchange-type">
<a href="" class="primary">退款方式<span class="right">{{detail.returnAmountModeName}}</span>
</a>
<span href="" class="primary">退款方式<span class="right">{{detail.returnAmountModeName}}</span>
</span>
<div class="amount-modeinfo" v-if="detail.returnAmountModeInfo && detail.returnAmountModeInfo.length">
<p v-if="detail.returnAmountModeInfo[0].bankName">银行 <span>{{detail.returnAmountModeInfo[0].bankName}}</span></p>
<p v-if="detail.returnAmountModeInfo[0].bankCard">卡号 <span>{{detail.returnAmountModeInfo[0].bankCard}}</span></p>
... ... @@ -91,8 +91,7 @@
<p>{{detail.province}}&nbsp;{{detail.city}}&nbsp;{{detail.county}} <br>{{detail.address}}</p>
</div>
<div class="exchange-type">
<a href="" class="primary">换货方式<span class="right">{{detail.deliveryTpyeName}}</span>
</a>
<span class="primary">换货方式<span class="right">{{detail.deliveryTpyeName}}</span></span>
</div>
</div>
<div class="exchange-order">
... ... @@ -111,6 +110,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const Modal = require('common/modal');
module.exports = {
props: ['applyid', 'type'],
... ... @@ -123,33 +123,34 @@
},
methods: {
cancel() {
if (!this.id) {
return false;
}
let id = this.id;
let url = '';
if (!id) {
return false;
}
if (this.type === 'refund') {
url = '/me/return/refund/cancel-apply';
} else if (this.type === 'exchange') {
url = '/me/return/exchange/cancel-apply';
}
Modal.confirm('', '取消后不能恢复,确认取消吗?', function() {
this.hide();
$.ajax({
method: 'POST',
url: url,
data: {
id: this.id,
id: id,
}
}).then(data => {
if (data.code === 200) {
interceptClick.intercept('/me/return');
} else if (data.code === 400) {
tip(data.message);
} else {
tip('取消失败');
tip(data.message);
}
});
});
}
},
created() {
... ...