aftersale:调整售后理由的接口
parent
f9253f9e56
commit
e513fff4c0
|
@ -14,12 +14,6 @@ export function getAfterSalePage(data) {
|
||||||
return request.get("app-api/trade/after-sale/page", data);
|
return request.get("app-api/trade/after-sale/page", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAfterSaleReasonList(way) {
|
|
||||||
return request.get("app-api/trade/after-sale/get-reason-list", {
|
|
||||||
way
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createAfterSale(data) {
|
export function createAfterSale(data) {
|
||||||
return request.post("app-api/trade/after-sale/create", data);
|
return request.post("app-api/trade/after-sale/create", data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import * as TradeOrderApi from '@/api/trade/order.js';
|
import * as TradeOrderApi from '@/api/trade/order.js';
|
||||||
import * as AfterSaleApi from '@/api/trade/afterSale.js';
|
import * as AfterSaleApi from '@/api/trade/afterSale.js';
|
||||||
|
import * as TradeConfigApi from '@/api/trade/config.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -94,6 +95,8 @@
|
||||||
reasonIndex: 0, // 选中 reasons 的位置
|
reasonIndex: 0, // 选中 reasons 的位置
|
||||||
|
|
||||||
applyPicUrls: [], // 补充凭证图片
|
applyPicUrls: [], // 补充凭证图片
|
||||||
|
|
||||||
|
tradeConfig: {}, // 交易配置
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin']),
|
computed: mapGetters(['isLogin']),
|
||||||
|
@ -125,11 +128,13 @@
|
||||||
this.orderItemId = parseInt(options.orderItemId);
|
this.orderItemId = parseInt(options.orderItemId);
|
||||||
this.getOrderInfo();
|
this.getOrderInfo();
|
||||||
this.getRefundReason();
|
this.getRefundReason();
|
||||||
|
this.getTradeConfig();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onLoadFun:function() {
|
onLoadFun:function() {
|
||||||
this.getOrderInfo();
|
this.getOrderInfo();
|
||||||
this.getRefundReason();
|
this.getRefundReason();
|
||||||
|
this.getTradeConfig();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 获取订单详情
|
* 获取订单详情
|
||||||
|
@ -147,6 +152,7 @@
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更改售后方式
|
* 更改售后方式
|
||||||
*/
|
*/
|
||||||
|
@ -165,9 +171,11 @@
|
||||||
*/
|
*/
|
||||||
getRefundReason: function() {
|
getRefundReason: function() {
|
||||||
const way = this.getWay();
|
const way = this.getWay();
|
||||||
AfterSaleApi.getAfterSaleReasonList(way).then(res => {
|
if (way === 10) {
|
||||||
this.reasons = res.data;
|
this.reasons = this.tradeConfig.afterSaleRefundReasons || [];
|
||||||
})
|
} else {
|
||||||
|
this.reasons = this.tradeConfig.afterSaleReturnReasons || [];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 选择售后原因
|
* 选择售后原因
|
||||||
|
@ -175,6 +183,13 @@
|
||||||
bindPickerChange: function(e) {
|
bindPickerChange: function(e) {
|
||||||
this.$set(this, 'reasonIndex', e.detail.value);
|
this.$set(this, 'reasonIndex', e.detail.value);
|
||||||
},
|
},
|
||||||
|
getTradeConfig: function () {
|
||||||
|
TradeConfigApi.getTradeConfig().then(res => {
|
||||||
|
this.tradeConfig = res.data || {};
|
||||||
|
this.getRefundReason();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除图片
|
* 删除图片
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue