|
@@ -20,7 +20,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list_2">
|
|
|
- <image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''" mode="">
|
|
|
+ <image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''"
|
|
|
+ mode="">
|
|
|
</image>
|
|
|
<view class="other">
|
|
|
<view class="name">
|
|
@@ -29,7 +30,7 @@
|
|
|
<view class="other_1">
|
|
|
商品规格:<text>{{item.goods.name||'暂无'}}</text>
|
|
|
</view>
|
|
|
- <view class="other_1" v-if="item.type!='2'">
|
|
|
+ <view class="other_1" v-if="item.type!='3'">
|
|
|
退款:<text>¥{{item.money||0}}</text>
|
|
|
</view>
|
|
|
<view class="other_1">
|
|
@@ -38,13 +39,19 @@
|
|
|
<view class="other_1">
|
|
|
售后描述:<text>{{item.desc||'暂无'}}</text>
|
|
|
</view>
|
|
|
+ <view class="other_1">
|
|
|
+ 售后类型:<text>{{item.zhStatus||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
<view class="other_1">
|
|
|
售后处理人:<text>{{item.deal_person.name||'暂无'}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
- <button v-if="item.status=='0'||item.status=='1'" type="default" size="mini" @tap.stop="toCancel(item)">取消售后</button>
|
|
|
+ <button v-if="item.status=='0'" type="default" size="mini"
|
|
|
+ @tap.stop="toCancel(item)">取消售后</button>
|
|
|
+ <button v-if="item.type!='1'&&item.status=='-2'||item.status=='-3'"
|
|
|
+ type="default" size="mini" @tap.stop="toMaintain(item)">维护单号</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="is_bottom" v-if="is_bottom">
|
|
@@ -70,41 +77,20 @@
|
|
|
// 系统设置
|
|
|
config: {},
|
|
|
user: {},
|
|
|
- list: [],
|
|
|
+ // 售后类型
|
|
|
typeList: [],
|
|
|
+ // 售后状态
|
|
|
+ statusList: [],
|
|
|
+ tabs: {
|
|
|
+ active: '0',
|
|
|
+ menu: []
|
|
|
+ },
|
|
|
+ type: '1',
|
|
|
+ list: [],
|
|
|
total: 0,
|
|
|
skip: 0,
|
|
|
limit: 10,
|
|
|
page: 0,
|
|
|
- tabs: {
|
|
|
- active: '0',
|
|
|
- menu: [{
|
|
|
- title: '申请售后',
|
|
|
- active: '0'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '正在处理退款',
|
|
|
- active: '1'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已退款',
|
|
|
- active: '-1'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已退货',
|
|
|
- active: '-2'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '正在处理换货',
|
|
|
- active: '3'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已换货',
|
|
|
- active: '-3'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- status: '0',
|
|
|
// 数据是否触底
|
|
|
is_bottom: false,
|
|
|
scrollTop: 0,
|
|
@@ -160,16 +146,18 @@
|
|
|
async search() {
|
|
|
const that = this;
|
|
|
let user = that.user;
|
|
|
- let status = that.status;
|
|
|
+ let type = that.type;
|
|
|
const arr = await that.$api(`/afterSale`, 'GET', {
|
|
|
customer: user._id,
|
|
|
- status: that.status,
|
|
|
+ type: that.type,
|
|
|
});
|
|
|
if (arr.errcode == '0') {
|
|
|
let list = [...that.list, ...arr.data];
|
|
|
for (let val of list) {
|
|
|
let type = that.typeList.find(i => i.value == val.type)
|
|
|
if (type) val.zhType = type.label;
|
|
|
+ let status = that.statusList.find(i => i.value == val.status)
|
|
|
+ if (status) val.zhStatus = status.label;
|
|
|
val.url = val?.goods?.goods?.file;
|
|
|
}
|
|
|
that.$set(that, `list`, list)
|
|
@@ -189,6 +177,19 @@
|
|
|
});
|
|
|
if (res.errcode == '0') {
|
|
|
that.$set(that, `typeList`, res.data)
|
|
|
+ var menu = res.data.map((item) => {
|
|
|
+ return {
|
|
|
+ title: item.label,
|
|
|
+ active: item.value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ that.$set(that.tabs, `menu`, menu)
|
|
|
+ }
|
|
|
+ res = await that.$api(`/dictData`, 'GET', {
|
|
|
+ code: "afterSale_status"
|
|
|
+ });
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ that.$set(that, `statusList`, res.data)
|
|
|
}
|
|
|
},
|
|
|
// 分页
|
|
@@ -220,7 +221,7 @@
|
|
|
tabsChange(e) {
|
|
|
const that = this;
|
|
|
that.$set(that.tabs, `active`, e.active)
|
|
|
- that.$set(that, `status`, e.active);
|
|
|
+ that.$set(that, `type`, e.active);
|
|
|
that.clearPage();
|
|
|
that.search()
|
|
|
},
|
|
@@ -230,18 +231,24 @@
|
|
|
url: `/pagesMy/order/info?id=${item.order_detail._id}&status=${item.order_detail.status}`
|
|
|
})
|
|
|
},
|
|
|
+ // 维护单号
|
|
|
+ toMaintain(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesMy/order/detail?id=${item._id}`
|
|
|
+ })
|
|
|
+ },
|
|
|
// 取消售后
|
|
|
toCancel(e) {
|
|
|
const that = this;
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
- content: '确定删除售后申请吗?',
|
|
|
+ content: '确定取消售后申请吗?',
|
|
|
success: async function(res) {
|
|
|
if (res.confirm) {
|
|
|
const arr = await that.$api(`/afterSale/${e._id}`, 'DELETE');
|
|
|
if (arr.errcode == '0') {
|
|
|
uni.showToast({
|
|
|
- title: '删除售后成功',
|
|
|
+ title: '取消售后成功',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
that.clearPage();
|
|
@@ -277,7 +284,6 @@
|
|
|
height: 100vh;
|
|
|
|
|
|
.one {
|
|
|
- // border-bottom: 1px solid var(--f85Color);
|
|
|
padding: 2vw;
|
|
|
|
|
|
input {
|