Commit c7542061 by wangzhihui

售后详情

1 parent fa60aac2
...@@ -82,48 +82,6 @@ module.exports = { ...@@ -82,48 +82,6 @@ module.exports = {
}) })
}, },
/**活动详情 */
getActivityDetail(id) {
return api.fetch('scrm.api.shopmall.weapp.activity.detail', {
id
})
},
/** 根据商品ID获取商品 */
getGoodsDetail(id) {
return api.fetch('scrm.api.shopmall.weapp.goods.getById.HMD', {
id,
viewAmount: true
})
},
/** 获取商品关联优惠券列表 */
getGoodscouponList(data) {
return api.fetch('scrm.api.coupon.seahorse.knife.goods.list', data)
},
/** 领取商品详情优惠券 */
getCoupon(data) {
return api.fetch('scrm.api.coupon.customer.receive', data)
},
/**根据规格值组合获取规格组合库存及零售价 */
getGoodsSpecificationExtra(data) {
return api.post({
method: `scrm.api.shopmall.weapp.goods.getGoodsSpecificationExtra`,
...data
})
},
/** 小程序端根据优惠券id查询可使用商品列表(分页) */
getCouponGoodsPage(data) {
data.pageSize = 8
return api.post({
method: 'scrm.app.shopmall.coupon.goods.page',
...data
})
},
//取消付款 //取消付款
cancelPay(orderCode) { cancelPay(orderCode) {
return api.fetch('scrm.api.shopmall.weapp.order.cancelPay', { return api.fetch('scrm.api.shopmall.weapp.order.cancelPay', {
...@@ -134,7 +92,7 @@ module.exports = { ...@@ -134,7 +92,7 @@ module.exports = {
afterSale(data) { afterSale(data) {
return api.fetch('scrm.api.shopmall.points.afterSales.add', data) return api.fetch('scrm.api.shopmall.points.afterSales.add', data)
}, },
/** 申请售后-云中鹤申请售后 */ /** 申请售后-云中鹤申请售后 */
afterSalesPlatform(data) { afterSalesPlatform(data) {
return api.fetch('scrm.api.shopmall.platform.afterSales.add', data) return api.fetch('scrm.api.shopmall.platform.afterSales.add', data)
}, },
...@@ -144,62 +102,53 @@ module.exports = { ...@@ -144,62 +102,53 @@ module.exports = {
orderCode orderCode
}) })
}, },
/** 为售后添加退货快递信息 */ /** 售后寄回商品填写快递信息 */
addDelivery(data) { addDelivery(data) {
return api.post({ return api.post({
method: `scrm.api.shopmall.weapp.orderRefund.addDelivery`, method: `scrm.api.shopmall.platform.sendBack.goods`,
...data ...data
}) })
}, },
/**云中鹤查看物流列表(售后寄回)*/
requestSubscribeMessage() { queryExpressList(data={}){
return api.fetch('scrm.api.shopmall.weapp.order.listSubscribeMsgTemplateIds') return api.post({
}, method: 'scrm.api.shopmall.platform.query.expressList',
...data
/** 确认收货 */ })
confirmReceipt(orderCode) { },
return api.post({ /** 云中鹤-售后订单详情*/
method: `scrm.api.shopmall.weapp.order.confirmReceipt`, platformSaleDetail(data) {
orderCode
})
},
/**分类列表
*
*/
getMerchantClassify(data) {
return api.post({ return api.post({
method: `scrm.api.shopmall.classify.page.curMerchant`, method: 'scrm.api.shopmall.platform.afterSales.detail',
pageSize: 9999,
currentPage: 1,
...data ...data
}) })
}, },
/**分类商品 */ /**自营-售后订单详情 */
getMerchantClassifyGoods(data) { afterSaleDetail(data) {
return api.post({ return api.post({
method: `scrm.api.shopmall.classify.getById`, method: 'scrm.api.shopmall.points.afterSales.detail',
pageSize: 10,
currentPage: 1,
...data ...data
}) })
}, },
/** 获取活动分享链接 */ /** 确认收货 */
getActivitylink(id) { confirmReceipt(orderCode) {
return api.post({
method: 'scrm.api.shopmall.activity.get.shared',
id
})
},
/** 获取商品分享链接 */
getGoodslink(id) {
return api.post({ return api.post({
method: 'scrm.api.shopmall.goods.get.shared', method: `scrm.api.shopmall.weapp.order.confirmReceipt`,
id orderCode
}) })
}, },
/**平台商城接口---取消售后 */
platformEditSale(data) {
return api.post({
method: 'scrm.api.shopmall.platform.afterSales.cancel',
...data
})
},
/** 查看物流轨迹 */ /** 查看物流轨迹 */
queryLogistics(data) { queryLogistics(data) {
return api.post({ return api.post({
......
...@@ -53,4 +53,12 @@ image { ...@@ -53,4 +53,12 @@ image {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #1B233D; color: #1B233D;
}
.express-box{
height:1200rpx;
}
.express-box .weui-actionsheet__menu{
height:calc(100% - 100rpx);
overflow-y: auto;
} }
\ No newline at end of file \ No newline at end of file
...@@ -132,7 +132,7 @@ export const ORDER_STATUS = { ...@@ -132,7 +132,7 @@ export const ORDER_STATUS = {
image: "aftermarket", image: "aftermarket",
status: OrderStatusEnum.AFTER_SALE, status: OrderStatusEnum.AFTER_SALE,
index: 5, // 查询订单列表TAB高亮的索引 index: 5, // 查询订单列表TAB高亮的索引
requestType: 3, // 查询订单列表TAB查询参数 requestType: 0, // 查询订单列表TAB查询参数
buttons: null, buttons: null,
type: OrderStatusTypes.MY_ORDER, //我的 页面 我的订单 显示的项目 type: OrderStatusTypes.MY_ORDER, //我的 页面 我的订单 显示的项目
}, },
...@@ -263,50 +263,69 @@ export const RefundReason = [{ ...@@ -263,50 +263,69 @@ export const RefundReason = [{
value: 1016, value: 1016,
}, },
]; ];
export const RefundReasonKeyList = {
1001: "商品无货",
1002: "发货时间问题",
1003: "不想要了/不喜欢",
1004: "商品信息填写错误",
1005: "地址信息填写错误",
1006: "商品降价",
1007: "其他",
1008: "尺码不合适",
1009: "无理由退货",
1010: "发票问题",
1011: "商品与页面描述不符",
1012: "发错货",
1013: "质量问题",
1014: "买错尺码/颜色/型号",
1015: "商品缺少或破损",
1016: "买错了"
};
export const RefundStatus = [{
status: 1, export const RefundStatus = [{
title: "待处理", status: 1,
tips: "等待平台处理", title: "待处理",
image: "mine/order/wait.png", tips: "等待平台处理",
}, image: "status/loading.png",
{ },
status: 2, {
title: "待发货", status: 2,
tips: "等待平台处理", title: "待发货",
image: "mine/order/wait.png", tips: "等待平台处理",
}, image: "status/loading.png",
{ },
status: 3, {
title: "待确认收到退货", status: 3,
tips: "等待平台处理", title: "待确认收到退货",
image: "mine/order/wait.png", tips: "等待平台处理",
}, image: "status/loading.png",
{ },
status: 4, {
title: "退款中", status: 4,
tips: "等待平台处理", title: "退款中",
image: "mine/order/wait.png", tips: "等待平台处理",
}, image: "status/loading.png",
{ },
status: 5, {
title: "已退款", status: 5,
tips: "钱款已退回至原账户", title: "已退款",
image: "mine/order/success.png", tips: "钱款已退回至原账户",
}, image: "status/success.png",
{ },
status: 6, {
title: "退款失败", status: 6,
tips: "您可以尝试再次提交退款申请", title: "退款失败",
image: "mine/order/error.png", tips: "您可以尝试再次提交退款申请",
}, image: "status/fail.png",
{ },
status: 7, {
title: "审核不通过", status: 7,
tips: "您可以尝试再次提交退款申请", title: "审核不通过",
image: "mine/order/error.png", tips: "您可以尝试再次提交退款申请",
}, image: "status/fail.png",
]; },
];
export const ExpressList = [{ export const ExpressList = [{
value: 0, value: 0,
...@@ -344,27 +363,30 @@ export const ExpressList = [{ ...@@ -344,27 +363,30 @@ export const ExpressList = [{
export const AfterSaleObj = [{ export const AfterSaleObj = [{
title: "退款原因", title: "退款原因",
key: "refundPrice", key: "returnReasonType",
enum: RefundReasonKeyList
}, },
{ {
title: "退款金额", title: "退款金额",
key: "refundPrice", key: "refundPoints",
unit: '积分'
}, },
{ {
title: "退款数量", title: "退款数量",
key: "goodsNumber", key: "applyQty",
unit: '件'
}, },
{ {
title: "售后编号", title: "售后编号",
key: "orderCode", key: "tparReturnOrderCode",
}, },
{ {
title: "申请时间", title: "申请时间",
key: "time", key: "createdDate",
}, },
{ {
title: "申请描述", title: "申请描述",
key: "remark", key: "returnContent",
}, },
]; ];
...@@ -374,7 +396,7 @@ export const AddressInfo = [{ ...@@ -374,7 +396,7 @@ export const AddressInfo = [{
}, },
{ {
title: "收货人", title: "收货人",
key: "name", key: "receiver",
}, },
{ {
title: "联系电话", title: "联系电话",
......
...@@ -7,84 +7,116 @@ Page({ ...@@ -7,84 +7,116 @@ Page({
express_no: "", express_no: "",
}, },
// Mock数据用于页面展示 // Mock数据用于页面展示
orderInfo: { orderInfo: {}
refundStatus: 1, // 1:待处理
orderClassify: 1,
orderSource: 5,
orderStatus: 9,
activityBigImg: "https://picsum.photos/200/200",
activityName: "洗车服务券",
orderGoods: [
{
id: "106",
goodsImage: "https://picsum.photos/200/200",
goodsName: "洗车服务券",
specificationData: "1次洗车服务",
retailPrice: "299",
activityPrice: null,
goodsNumber: 1,
warrantyDate: "2024-09-01 11:30:00",
},
],
refundType: 1, // 1:我要退款退货
goodsName: ["商品名称1", "商品名称2"],
refundPrice: "1000积分",
time: "2023-05-20 12:00:00",
remark: "商品质量有问题,申请退款退货",
orderCode: "2023052012000001",
deliveryCompany: "顺丰快递",
goodsNumber: 1,
deliveryNumber: "SF1234567890",
imgUrls: [
"https://picsum.photos/200/200",
"https://picsum.photos/200/200",
"https://picsum.photos/200/200",
],
createdDate: "2023-05-20T12:00:00",
},
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.getOrderRefundDetail(options.orderCode) wx.p.router.getRouterParams(options).then(params => {
}, if (params) {
this.setData({
...params
})
this.getOrderAfterSaleDetail(params.subOrderCode)
}
getOrderRefundDetail(orderCode) { })
},
submitlogistics() {
this.getOrderAfterSaleDetail()
},
getOrderAfterSaleDetail() {
wx.p.wxApi.showLoading("加载中..."); wx.p.wxApi.showLoading("加载中...");
wx.p.api.shopmallApi.getOrderRefundDetail(orderCode).then((data) => { let {
goodsSource,
tparReturnOrderCode,
subOrderCode
} = this.data,
Methods = goodsSource == 2 ? 'afterSaleDetail' : 'platformSaleDetail'
wx.p.api.shopmallApi[Methods]({
subOrderCode,
tparReturnOrderCode
}).then((res) => {
wx.hideLoading(); wx.hideLoading();
if (data.refundStatus == 2 && data.refundType == 1) { let status = 0
wx.p.router.redirectTo( if (res.returnOrderStatus == 1000 || res.returnOrderStatus == 1002 || res.returnOrderStatus == 1001 || res.returnOrderStatus == 1004 || (res.returnOrderStatus == 1003 && res.outRefundType == 2)) {
"/packageMine/pages/order/afterSale_step_three/afterSale_step_three", status = 0
data } else if (res.returnOrderStatus == 1003 && res.outRefundType == 0) {
); status = 1
return; } else if (res.returnOrderStatus == 1005 || (res.returnOrderStatus == 1003 && res.outRefundType == 3) || (res.returnOrderStatus == 1003 && res.outRefundType == 1)) {
status = 2
} }
data.time = new Date(data.createdDate).format("yyyy-MM-dd hh:mm:ss"); let str = ''
if (res.sendbackAddressModel) {
const {
sendbackAddressModel
} = res
str = `${sendbackAddressModel.provinceName}${sendbackAddressModel.cityName}${sendbackAddressModel.countyName}${sendbackAddressModel.address}`
}
res.addressInfo = str
this.setData({ this.setData({
orderInfo: data, orderInfo: res,
status,
}); });
}); });
}, },
confirm() { confirm() {
let { orderInfo } = this.data; const {
console.log(orderInfo); status,
wx.p.router.go(
"/packageMine/pages/order/afterSale_step_two/afterSale_step_two",
orderInfo orderInfo
); } = this.data
}, if (status == 0) {
this.cancelSaleApply()
} else if (status == 2) {
wx.p.router.go(
"/packageMine/pages/order/afterSale_step_two/afterSale_step_two",
orderInfo
)
}
},
/**撤销申请 */
cancelSaleApply() {
const {
orderInfo
} = this.data
let para = {
tparReturnOrderCode: orderInfo.tparReturnOrderCode
}
wx.showModal({
title: '提示',
content: `请确认是否撤销申请`,
confirmColor: '#F13C3D'
}).then((res) => {
if (res.confirm) {
wx.p.wxApi.showLoading('提交中')
const URLNAME = 'platformEditSale'
wx.p.api.shopmallApi[URLNAME](para).then(res => {
wx.hideLoading();
if (res) {
wx.p.wxApi.showToast('撤销成功')
wx.p.router.back()
}
})
}
}).catch(() => {
wx.p.wxApi.showToast('已取消')
})
},
previewImage(e) { previewImage(e) {
let params = e.detail; // 从组件传递的数据 let params = e.detail; // 从组件传递的数据
wx.p.wxApi.previewImage(params); wx.p.wxApi.previewImage(params);
}, },
onExpressNoInput(e) { onExpressNoInput(e) {
const { value } = e.detail; const {
value
} = e.detail;
this.setData({ this.setData({
"order.express_no": value, "order.express_no": value,
}); });
...@@ -94,4 +126,4 @@ Page({ ...@@ -94,4 +126,4 @@ Page({
// 提交物流信息的处理逻辑 // 提交物流信息的处理逻辑
console.log("提交物流信息"); console.log("提交物流信息");
}, },
}); });
\ No newline at end of file \ No newline at end of file
<block wx:if="{{orderInfo}}"> <block wx:if="{{orderInfo}}">
<view class="layout isFullSucreen"> <view class="layout isFullSucreen">
<!-- 退款状态组件 --> <!-- 退款状态组件 -->
<refund-status refundStatus="{{orderInfo.refundStatus}}"></refund-status> <refund-status refundStatus="{{status}}"></refund-status>
<!-- 退货地址和物流信息组件 --> <!-- 退货地址和物流信息组件 -->
<return-address-box /> <block wx:if="{{orderInfo.returnType==1001}}">
<return-address-box order-info="{{orderInfo}}" bindsubmitlogistics="submitlogistics"/>
</block>
<!-- 售后信息组件 --> <!-- 售后信息组件 -->
<after-sale-info-box order-info="{{orderInfo}}"></after-sale-info-box> <after-sale-info-box order-info="{{orderInfo}}"></after-sale-info-box>
<!-- 重新提交按钮组件 --> <!-- 重新提交按钮组件 -->
<re-submit-button wx:if="{{orderInfo.refundStatus >5}}" bindresubmit="confirm"></re-submit-button> <re-submit-button wx:if="{{status!=1}}" bindresubmit="confirm" status="{{status}}"></re-submit-button>
</view> </view>
</block> </block>
\ No newline at end of file \ No newline at end of file
<view class="box"> <view class="box">
<view class="text-box"> <view class="text-box">
<view class="title">售后信息</view> <view class="title">售后信息</view>
<content item="{{orderInfo}}" /> <content item="{{orderInfo.orderGoods}}" />
<block wx:for="{{afterSaleObj}}" wx:key="index"> <block wx:for="{{afterSaleObj}}" wx:key="index">
<view class="item"> <view class="item">
<view class="label">{{item.title}}:</view> <view class="label">{{item.title}}:</view>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<text>{{i}};</text> <text>{{i}};</text>
</block> </block>
</block> </block>
<block wx:else>{{orderInfo[item.key] || ''}}</block> <block wx:else>{{orderInfo[item.key] || ''}}<text>{{item.unit}}</text></block>
</view> </view>
</view> </view>
</block> </block>
......
Component({ Component({
properties: {
status: {
type: String,
value: ""
},
},
methods: { methods: {
onReSubmit() { onReSubmit() {
this.triggerEvent('resubmit'); this.triggerEvent('resubmit');
......
<view class="default-btn" bindtap="onReSubmit">重新提交</view>
\ No newline at end of file \ No newline at end of file
<view class="default-btn" bindtap="onReSubmit"> {{status==2?'重新申请':'撤销申请'}}</view>
\ No newline at end of file \ No newline at end of file
<Status image="{{refund.image}}" title="{{refund.title}}" tips="{{refund.tips}}"/>
\ No newline at end of file \ No newline at end of file
<view class="status-box">
<Status image="{{refund.image}}" title="{{refund.title}}" tips="{{refund.tips}}"/>
</view>
.status-box{
margin:10rpx 16rpx 42rpx 0;
}
\ No newline at end of file \ No newline at end of file
import { ExpressList, AddressInfo } from "~/constants/mine.js"; import {
ExpressList,
AddressInfo
} from "~/constants/mine.js";
Component({ Component({
properties: {}, properties: {
orderInfo: {
type: Object,
value: {},
observer(n) {
console.log('退货物流')
}
},
},
data: { data: {
isShowExpressSelector: false, isShowExpressSelector: false,
expressList: Object.freeze(ExpressList), express: {
expressName: '',
expressNo: ''
},
expressList: ExpressList,
address: Object.freeze(AddressInfo), address: Object.freeze(AddressInfo),
addressObject: { addressInfo: {
name: "张三", name: "张三",
phone: "12345678901", phone: "12345678901",
address: "广东省深圳市南山区", address: "广东省深圳市南山区",
}, },
}, },
attached() {
this.queryExpressList()
},
methods: { methods: {
queryExpressList() {
wx.p.api.shopmallApi.queryExpressList().then(res => {
let arr = []
if (res) {
arr = res.map(el => {
return {
text: el.expressName,
value: el.expressCode
}
})
}
this.setData({
expressList: arr || []
})
})
},
onShowExpressSelector() { onShowExpressSelector() {
this.setData({ this.setData({
isShowExpressSelector: true, isShowExpressSelector: true,
...@@ -21,20 +55,51 @@ Component({ ...@@ -21,20 +55,51 @@ Component({
}, },
onSubmitLogistics() { onSubmitLogistics() {
this.triggerEvent("submitlogistics"); const {
}, express,
orderInfo
} = this.data
let para = {
tparReturnOrderCode: orderInfo.tparReturnOrderCode,
expressCode: express.expressCode,
expressName: express.expressName,
expressNo: express.expressNo,
}
wx.p.wxApi.showLoading('提交中')
wx.p.api.shopmallApi.addDelivery(para).then(res => {
wx.p.wxApi.hideLoading();
if (res) {
wx.p.wxApi.showToast('提交成功')
this.triggerEvent("submitlogistics");
}
})
},
onExpressNoInput(e) {
this.setData({
'express.expressNo': e.detail.value
})
},
onSelectExpress(e) { onSelectExpress(e) {
this.setData({ this.setData({
isShowExpressSelector: false, isShowExpressSelector: false,
}); });
const { expressList } = this.data; const {
expressList
} = this.data;
const expressListUpdated = expressList.map((item) => { const expressListUpdated = expressList.map((item) => {
if (item.value == e.detail.value) { if (item.value == e.detail.value) {
item.type = "warn"; item.type = "warn";
console.log(item)
this.setData({ this.setData({
express: item, express: {
...this.data.express,
expressName: item.text,
expressCode: item.value,
},
}); });
} else { } else {
item.type = ""; item.type = "";
...@@ -47,4 +112,4 @@ Component({ ...@@ -47,4 +112,4 @@ Component({
}); });
}, },
}, },
}); });
\ No newline at end of file \ No newline at end of file
...@@ -8,31 +8,52 @@ ...@@ -8,31 +8,52 @@
<view class="item"> <view class="item">
<view class="label">{{item.title}}:</view> <view class="label">{{item.title}}:</view>
<view class="value"> <view class="value">
<view>{{addressObject[item.key]}}</view> <view>{{orderInfo.addressInfo[item.key]||'-'}}</view>
</view> </view>
</view> </view>
</block> </block>
<view class="title">请填写退货物流</view> <!-- 判断是否有快递单号 -->
<view class="form"> <block wx:if="{{!orderInfo.expressNo}}">
<view class="item"> <view class="title">请填写退货物流</view>
<view class="label">物流公司:</view> <view class="form">
<view class="value icon" bindtap="onShowExpressSelector"> <view class="item">
<view>{{express.text||'请选择'}}</view> <view class="label">物流公司:</view>
<mp-icon icon="arrow" color="#B1B1B3" size="12"></mp-icon> <view class="value icon" bindtap="onShowExpressSelector">
<view>{{express.expressName||'请选择'}}</view>
<mp-icon icon="arrow" color="#B1B1B3" size="12"></mp-icon>
</view>
</view> </view>
</view> <view class="item">
<view class="item"> <view class="label">快递单号:</view>
<view class="label">快递单号:</view> <view class="value">
<view class="value"> <input type="text" value="{{express.expressNo}}" placeholder="请输入" placeholder-style="color: #999999;" bindinput="onExpressNoInput" />
<input type="text" value="{{expressNo}}" placeholder="请输入" placeholder-style="color: #999999;" bindinput="onExpressNoInput" /> </view>
</view> </view>
</view> </view>
<view class="btn-box">
<view class="btn submit-btn" bindtap="onSubmitLogistics">提交物流</view>
</view>
</block>
</view>
</view>
<view class="text-box already-box" wx:if="{{orderInfo.expressNo}}">
<view class="title">退货物流</view>
<view class="form" >
<view class="item">
<view class="label">物流公司:</view>
<view class="value icon">
<view>{{orderInfo.expressName}}</view>
</view>
</view> </view>
<view class="btn-box"> <view class="item">
<view class="btn submit-btn" bindtap="onSubmitLogistics">提交物流</view> <view class="label">快递单号:</view>
<view class="value">
<view>{{orderInfo.expressNo}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<mp-actionSheet bindactiontap="onSelectExpress" show="{{isShowExpressSelector}}" actions="{{expressList}}" title="选择快递公司" > <mp-actionSheet bindactiontap="onSelectExpress" show="{{isShowExpressSelector}}" actions="{{expressList}}" ext-class="express-box" title="选择快递公司">
</mp-actionSheet> </mp-actionSheet>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.text-box { .text-box {
padding: 32rpx 24rpx; padding: 32rpx 24rpx;
border-bottom: 2rpx solid #eff0f2; /* border-bottom: 2rpx solid #eff0f2; */
} }
.text-box .title { .text-box .title {
...@@ -103,4 +103,12 @@ ...@@ -103,4 +103,12 @@
border-color: var(--btnColor); border-color: var(--btnColor);
color: var(--btnColor); color: var(--btnColor);
font-weight: 500; font-weight: 500;
}
.already-box {
padding:24rpx 32rpx;
box-sizing: border-box;
background: #fff;
border-radius: 16rpx;
margin-bottom:24rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -211,9 +211,9 @@ Component({ ...@@ -211,9 +211,9 @@ Component({
wx.p.router.go( wx.p.router.go(
"/packageMine/pages/order/afterSale_step_two/afterSale_step_two", { "/packageMine/pages/order/afterSale_step_two/afterSale_step_two", {
subOrderCode, subOrderCode,
refundPoints:redeemPoints, refundPoints: redeemPoints,
goodsSource, goodsSource,
applyQty: sellQty||applyQty, applyQty: sellQty || applyQty,
} }
); );
}, },
...@@ -314,14 +314,19 @@ Component({ ...@@ -314,14 +314,19 @@ Component({
// 售后详情 // 售后详情
onAfterSaleDetail(e) { onAfterSaleDetail(e) {
console.log(e)
let url = "/packageMine/pages/order/afterSaleDetail/afterSaleDetail"; let url = "/packageMine/pages/order/afterSaleDetail/afterSaleDetail";
let { let {
item: { item: {
orderCode subOrderCode,
goodsSource,
tparReturnOrderCode
}, },
} = e.currentTarget.dataset; } = e.currentTarget.dataset;
wx.p.router.go(url, { wx.p.router.go(url, {
orderCode, subOrderCode,
goodsSource,
tparReturnOrderCode
}); });
}, },
}, },
......
...@@ -141,7 +141,8 @@ Page({ ...@@ -141,7 +141,8 @@ Page({
let { let {
requestType, requestType,
pageNum, pageNum,
keyword keyword,
tabIndex
} = this.data; } = this.data;
let obj = { let obj = {
requestType, requestType,
...@@ -151,8 +152,8 @@ Page({ ...@@ -151,8 +152,8 @@ Page({
keyword = keyword.replace(/\ /g, ""); keyword = keyword.replace(/\ /g, "");
if (keyword.length) obj.keyword = keyword; if (keyword.length) obj.keyword = keyword;
} }
// requestType==3:退货/售后
let Method = requestType == 3 ? 'getSalesOrderList' : 'getOrderList'; let Method = tabIndex == 5 ? 'getSalesOrderList' : 'getOrderList';
let list = []; let list = [];
wx.p.api.mineApi[Method](obj).then((data) => { wx.p.api.mineApi[Method](obj).then((data) => {
wx.hideLoading(); wx.hideLoading();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!