优化注释

This commit is contained in:
lemon橪
2021-05-17 18:19:26 +08:00
parent 4545097a4a
commit 49eb30f265
69 changed files with 972 additions and 2622 deletions

View File

@@ -10,7 +10,7 @@
<view class="seller-name">
<view class="name">{{ order.storeName }}</view>
</view>
<view class="order-sn">订单编号{{ order.sn }}</view>
<view class="order-sn">订单编号:{{order.sn}}</view>
</view>
<!-- 申请记录 选项卡 -->
<view class="seller-info u-flex u-row-between" v-if="current != 0">
@@ -50,11 +50,11 @@
<div v-if="current === 1 || current === 2">
<!-- 申请中 -->
<view class="cannot_apply" v-if="order.serviceType == 'RETURN_GOODS'">退货处理-{{ serviceStatusList[order.serviceStatus] }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'">补发商品-{{ serviceStatusList[order.serviceStatus] }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'RETURN_MONEY'">退款-{{ serviceStatusList[order.serviceStatus] }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'EXCHANGE_GOODS'">换货-{{ serviceStatusList[order.serviceStatus] }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'CANCEL'">取消订单-{{ serviceStatusList[order.serviceStatus] }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'RETURN_GOODS'">退货处理-{{ order.serviceStatus | serviceStatusList }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'">补发商品-{{ order.serviceStatus | serviceStatusList }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'RETURN_MONEY'">退款-{{ order.serviceStatus | serviceStatusList }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'EXCHANGE_GOODS'">换货-{{ order.serviceStatus | serviceStatusList }}</view>
<view class="cannot_apply" v-if="order.serviceType == 'CANCEL'">取消订单-{{ order.serviceStatus | serviceStatusList }}</view>
</div>
<!-- 申请记录 -->
</view>
@@ -74,13 +74,9 @@
" @click="onExpress(order, sku)">
提交物流
</view>
<view @click="afterDetails(order, sku)" v-if="current === 1 || current === 2" class="rebuy-btn">
售后详情
</view>
<!-- 申请记录 -->
<!-- <u-button type="info" size="mini" shape="circle" v-if="current === 2">删除记录</u-button> -->
</view>
</view>
</view>
@@ -103,8 +99,7 @@
<script>
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
import empty from "@/components/empty";
import { getAfterSale, getAfterSaleList } from "@/api/after-sale.js";
import { getAfterSaleList } from "@/api/after-sale.js";
import { getOrderList } from "@/api/order.js";
export default {
@@ -113,20 +108,8 @@ export default {
},
data() {
return {
serviceStatusList: {
APPLY: "申请售后",
PASS: "通过售后",
REFUSE: "拒绝售后",
BUYER_RETURN: "买家退货,待卖家收货",
SELLER_RE_DELIVERY: "商家换货/补发",
SELLER_CONFIRM: "卖家确认收货",
SELLER_TERMINATION: "卖家终止售后",
BUYER_CONFIRM: "买家确认收货",
BUYER_CANCEL: "买家取消售后",
WAIT_REFUND: "等待平台退款",
COMPLETE: "完成售后",
},
list: [
//tab表头
{
name: "售后申请",
},
@@ -137,13 +120,14 @@ export default {
name: "申请记录",
},
],
current: 0,
tipsShow: false,
orderList: [],
current: 0, //当前表头索引
tipsShow: false, //提示开关
orderList: [], //订单集合
params: {
pageNumber: 1,
pageSize: 10,
},
logParams: {
pageNumber: 1,
pageSize: 10,
@@ -159,11 +143,10 @@ export default {
onPullDownRefresh() {
this.change(this.current);
},
watch: {
current(val) {},
},
methods: {
//切换tab页时初始化数据
/**
* 切换tab页时初始化数据
*/
change(index) {
this.current = index;
this.params = {
@@ -187,6 +170,10 @@ export default {
}
uni.stopPullDownRefresh();
},
/**
* 获取订单列表
*/
getOrderList(index) {
uni.showLoading({
title: "加载中",
@@ -207,14 +194,18 @@ export default {
});
},
// 详情
/**
* 售后详情
*/
afterDetails(order) {
uni.navigateTo({
url: "./applyDetail?sn=" + order.sn,
});
},
//申请记录列表
/**
* 申请记录列表
*/
getAfterSaleLogList() {
getAfterSaleList(this.logParams).then((res) => {
let afterSaleLogList = res.data.result.records;
@@ -229,7 +220,7 @@ export default {
price: item.flowPrice,
},
];
console.log(item.orderItems);
});
this.orderList = this.orderList.concat(afterSaleLogList);
@@ -241,7 +232,10 @@ export default {
}
});
},
//申请售后
/**
* 申请售后
*/
applyService(sn, order, sku) {
let data = {
...order,
@@ -254,7 +248,10 @@ export default {
)}`,
});
},
//提交物流信息
/**
* 提交物流信息
*/
onExpress(order, sku) {
sku.storeName = order.storeName;
@@ -265,14 +262,20 @@ export default {
});
},
/**
* 查看详情
*/
onDetail(sku) {
console.log(sku);
if (!this.$u.test.isEmpty(sku.skuId)) {
uni.navigateTo({
url: `/pages/product/goods?id=${sku.skuId}&goodsId=${sku.goodsId}`,
});
}
},
/**
* 底部加载数据
*/
renderDate() {
if (this.current === 0) {
this.params.pageNumber += 1;

View File

@@ -110,7 +110,7 @@ export default {
return {
storage,
list: [{ id: "", localName: "请选择", children: [] }],
action: upload,
action: upload, //图片上传数据
fileList: [],
sn: "",
sku: {},
@@ -165,6 +165,10 @@ export default {
},
};
},
/**
* 判断当前内容并生成数据
*/
onLoad(options) {
let navTitle = "申请售后";
this.form.serviceType = "RETURN_GOODS";
@@ -222,6 +226,8 @@ export default {
showCitySelect() {
this.$refs.cityPicker.show();
},
// 初始化数据
init(sn) {
getAfterSaleInfo(sn).then((response) => {
if (response.data.code == 400) {
@@ -249,7 +255,7 @@ export default {
},
//返回方式
returnSelectConfirm(e) {
console.log(e);
},
//修改申请数量
@@ -258,7 +264,7 @@ export default {
},
//图片上传
onUploaded(lists) {
console.log(lists);
let images = [];
lists.forEach((item) => {
@@ -291,7 +297,10 @@ export default {
}
});
},
// 验证银行卡号
/**
* 验证银行卡号
*/
checkBankno(bankno) {
var lastNum = bankno.substr(bankno.length - 1, 1); //取出最后一位与luhm进行比较
var first15Num = bankno.substr(0, bankno.length - 1); //前15或18位
@@ -355,7 +364,7 @@ export default {
//检测提交参数
handleCheckParams() {
console.log(this.form.accountType);
if (this.$u.test.isEmpty(this.form.reason)) {
this.$refs.uToast.show({ title: "请选择 退款原因", type: "error" });
return false;
@@ -412,27 +421,11 @@ export default {
return true;
},
showOrHide() {
let flag = true;
switch (this.form.serviceType) {
case "CHANGE_GOODS":
flag = false;
break;
case "SUPPLY_AGAIN_GOODS":
flag = false;
break;
default:
flag = true;
break;
}
return flag;
},
},
};
</script>
<style lang="scss">
<style lang="scss" scoped>
page,
.content {
background: $page-color-base;

View File

@@ -16,11 +16,8 @@
</view>
<view class="goods-info">
<view class="goods-title u-line-2">{{ sku.name }}</view>
<view class="goods-price">
<!-- <span v-if="sku.point">{{ sku.subtotal }}+{{ sku.point }}积分</span> -->
<span>{{ sku.price | unitPrice }}</span>
<span class="num">购买数量: {{ sku.num }} </span>
</view>
</view>
@@ -36,7 +33,7 @@
<u-input type="text" input-align="right" value="快递至第三方卖家" />
</u-form-item>
<u-form-item label="快递公司" :label-width="150">
<u-input v-model="form.courier_company" type="select" input-align="right" :select-open="companySelectShow" @click="companySelectShow = true" placeholder="请选择快递公司" />
<u-input v-model="form.courierCompany" type="select" input-align="right" :select-open="companySelectShow" @click="companySelectShow = true" placeholder="请选择快递公司" />
</u-form-item>
<u-form-item label="快递单号" :label-width="150">
<u-input input-align="right" v-model="form.logisticsNo" placeholder="请输入快递单号" />
@@ -48,8 +45,7 @@
</scroll-view>
<view class="submit-view">
<u-button ripple :customStyle="{'background':$lightColor,'color':'#fff' }" shape="circle" @click="onSubmit">提交申请</u-button>
<u-button ripple :customStyle="{'background':$lightColor,'color':'#fff' }" shape="circle" @click="onSubmit">提交申请</u-button>
</view>
</u-form>
<u-select mode="single-column" :list="companyList" v-model="companySelectShow" @confirm="companySelectConfirm"></u-select>
@@ -65,27 +61,21 @@ import { fillShipInfo } from "@/api/after-sale.js";
export default {
data() {
return {
typeValue: 0,
value: "",
type: "textarea",
border: true,
//快递公司 弹出框
companySelectShow: false,
companyList: [],
timeshow: false,
companyList: [], //快递公司集合
timeshow: false, //发货时间
form: {
courier_company: "",
courierCompany: "", //快递公司
logisticsId: "", //快递公司ID
logisticsNo: "", //快递单号
mDeliverTime: "", //发货时间
},
serviceDetail: {},
sku: {},
serviceDetail: {}, //服务详情
sku: {}, //sku信息
};
},
onShow(options) {},
onLoad(options) {
this.sku = JSON.parse(decodeURIComponent(options.sku));
let navTitle = "服务单详情";
uni.setNavigationBarTitle({
@@ -95,12 +85,17 @@ export default {
this.Logistics();
},
methods: {
//快递公司
/**
* 确认快递公司
*/
companySelectConfirm(e) {
this.form.logisticsId = e[0].value;
this.form.courier_company = e[0].label;
this.form.courierCompany = e[0].label;
},
// 获取快递公司
/**
* 获取快递公司
*/
Logistics() {
getLogistics().then((res) => {
if (res.data.success) {
@@ -110,19 +105,26 @@ export default {
label: item.name,
};
});
// this.companyList= res
}
});
},
/**
* 更改时间
*/
onTimeChange(e) {
this.form.mDeliverTime = e.result;
},
/**
* 点击提交
*/
onSubmit() {
uni.showLoading({
title: "加载中",
mask: true,
});
delete this.form.courier_company;
delete this.form.courierCompany;
fillShipInfo(this.serviceDetail.sn, this.form).then((res) => {
uni.hideLoading();
if (res.statusCode === 200) {
@@ -139,15 +141,14 @@ export default {
};
</script>
<style lang="scss">
<style lang="scss" scoped>
page,
.content {
background: $page-color-base;
height: 100%;
}
.mp-iphonex-bottom{
.mp-iphonex-bottom {
overflow: hidden;
}
.after-sales-goods-detail-view {
background-color: #fff;

View File

@@ -9,18 +9,15 @@
</view>
</view>
<view>
<view class="goods-item-view" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn" @click="gotoGoodsDetail(sku.skuId)">
<view class="goods-item-view" :key="index" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn" @click="navigateToGoodsDetail(sku.skuId)">
<view class="goods-img">
<u-image border-radius="6" width="131rpx" height="131rpx" :src="item.image"></u-image>
</view>
<view class="goods-info">
<view class="goods-title u-line-2">{{ item.name }}</view>
<view class="goods-price">
<!-- <span v-if="sku.point">{{ sku.subtotal }}+{{ sku.point }}积分</span> -->
<span v-if="sku.orderItems.length <= 1">{{ sku.flowPrice }}</span>
<span class="num" v-else>购买数量{{item.num}}</span>
<span v-if="sku.orderItems.length <= 1" class="num">购买数量: {{ item.num }}</span>
</view>
</view>
@@ -65,9 +62,8 @@ export default {
},
data() {
return {
sn: "",
applyInfo: {},
sku: {},
sn: "",
sku: {}, //sku
};
},
onLoad(options) {
@@ -77,6 +73,9 @@ export default {
this.sku = newData;
},
methods: {
/**
* 选择退货流程
*/
onSelect(value) {
uni.redirectTo({
url: `./afterSalesDetail?sn=${this.sn}&sku=${encodeURIComponent(
@@ -84,7 +83,11 @@ export default {
)}&value=${value}`,
});
},
gotoGoodsDetail(id) {
/**
* 跳转到商品信息
*/
navigateToGoodsDetail(id) {
uni.navigateTo({
url: `/pages/product/goods?id=${id}&goodsId=${goodsId}`,
});

View File

@@ -1,298 +0,0 @@
<template>
<view>
<view class="cancel-head">
<u-cell-group>
<u-cell-item title="未收货" :arrow="false">
<u-radio-group wrap v-model="rog"><u-radio active-color="#1ABC9C" name="NO" @click="radioChange('NO')"></u-radio></u-radio-group>
</u-cell-item>
<u-cell-item title="已收货" v-if="applyService" :arrow="false">
<u-radio-group wrap v-model="rog"><u-radio active-color="#1ABC9C" name="YES" @click="radioChange('YES')"></u-radio></u-radio-group>
</u-cell-item>
</u-cell-group>
</view>
<view class="cancle-body" v-if="rog === 'NO'">
<view class="cancel-tips">
<view class="tips-header">温馨提示</view>
<view>1. 订单取消后无法恢复;</view>
<view>2. 订单取消后使用的优惠券将不再返还积分可以退回;</view>
<view>3. 订单取消后订单中的赠品要随商品一起返还给商家;</view>
</view>
<u-cell-group>
<u-cell-item title="退款方式" value="原路退回" :arrow="false" v-if="isRetrace"></u-cell-item>
<u-cell-item title="退款方式" value="账号退款" :arrow="false" v-else></u-cell-item>
<u-cell-item title="退款金额" :value="refund_info.refund_price" :arrow="false"></u-cell-item>
<u-cell-item title="取消原因" :value="refund_info.reason" @click="handleShowReason" :arrow="true" arrow-direction="down" required></u-cell-item>
<u-action-sheet :list="reasonSelectActions" v-model="reasonSelectShow" @click="onSelectReason"></u-action-sheet>
<view v-if="!isRetrace">
<u-cell-item title="账户类型" :value="accountTypeText" @click="handleShowAccountType" :arrow="true" arrow-direction="down" required></u-cell-item>
<u-action-sheet :list="accountTypeSelectActions" v-model="accountTypeSelectShow" @click="onSelectAccountType"></u-action-sheet>
<view v-if="refund_info.account_type === 'BANK_TRANSFER'">
<u-field v-model="refund_info.bank_name" required clearable label="银行名称" input-align="right" placeholder="请输入银行名称"></u-field>
<u-field v-model="refund_info.bank_deposit_name" label-width="150" required clearable label="银行开户行" input-align="right" placeholder="请输入银行开户行"></u-field>
<u-field v-model="refund_info.bank_account_name" label-width="150" required clearable label="银行开户名" input-align="right" placeholder="请输入银行开户名"></u-field>
<u-field v-model="refund_info.bank_account_number" required clearable label="银行账号" input-align="right" placeholder="请输入银行账号"></u-field>
</view>
<u-field v-model="refund_info.return_account" required clearable label="退款账号" input-align="right" placeholder="请输入退款账号"></u-field>
</view>
<u-field v-model="refund_info.mobile" required clearable label="联系方式" input-align="right" placeholder="请输入手机号码"></u-field>
</u-cell-group>
<view class="submit-btn">
<u-button shape="circle" class="cancel-btn" @click="handleCancelSubmit">取消</u-button>
<u-button shape="circle" class="main-btn" @click="handleSubmitApply">提交</u-button>
</view>
</view>
<view class="service-body" v-else>
<view class="cancel-tips">
<view class="tips-header">温馨提示</view>
<view>1. 当前订单还未确认收货如果申请售后则订单自动确认收货;</view>
<view>2. 如申请售后使用的优惠券和积分等将不再返还;</view>
<view>3. 订单中的赠品要随申请售后的商品一起返还给商家;</view>
</view>
<view class="submit-btn"><u-button shape="circle" class="main-btn" @click="handleApplyService">申请售后</u-button></view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import Foundation from '@/utils/Foundation.js';
import RegExp from '@/utils/RegExp.js';
import { applyCancelOrder } from '@/api/after-sale.js';
import { confirmReceipt, getOrderDetail } from '@/api/order.js';
export default {
data() {
return {
/** 订单编号 */
order_sn: 0,
/** 订单详细 */
order: '',
/** 是否允许申请售后 */
applyService: false,
/** 是否已收货 */
rog: 'NO',
/** 是否支持原路退款 */
isRetrace: false,
/** 申请取消订单参数 */
refund_info: {
reason: '请选择取消原因',
mobile: '',
account_type: '',
return_account: '',
refund_price: 0.0
},
/** 是否展示取消原因下拉框 */
reasonSelectShow: false,
/** 取消原因下拉框数据 */
reasonSelectActions: [
{ text: '商品无货' },
{ text: '配送时间问题' },
{ text: '不想要了' },
{ text: '商品信息填写错误' },
{ text: '地址信息填写错误' },
{ text: '商品降价' },
{ text: '货物破损已拒签' },
{ text: '订单无物流跟踪记录' },
{ text: '非本人签收' },
{ text: '其他' }
],
/** 账户类型下拉框选中的值 */
accountTypeText: '请选择账户类型',
/** 是否展示账户类型下拉框 */
accountTypeSelectShow: false,
/** 账户类型下拉框数据 */
accountTypeSelectActions: [{ text: '支付宝', value: 'ALIPAY' }, { text: '微信', value: 'WEIXINPAY' }, { text: '银行卡', value: 'BANK_TRANSFER' }]
};
},
onLoad(options) {
this.order_sn = options.sn;
this.GET_OrderCancelDetail();
},
methods: {
// 选中任一radio时由radio-group触发
radioChange(e) {
this.rog = e;
},
/** 展示申请原因上拉框事件绑定 */
handleShowReason() {
this.reasonSelectShow = true;
},
/** 申请原因选中事件绑定 */
onSelectReason(index) {
this.reasonSelectShow = false;
this.refund_info.reason = this.reasonSelectActions[index].text;
},
/** 展示账户类型上拉框事件绑定 */
handleShowAccountType() {
this.accountTypeSelectShow = true;
},
/** 账户类型选中事件绑定 */
onSelectAccountType(index) {
this.accountTypeSelectShow = false;
this.accountTypeText = this.accountTypeSelectActions[index].text;
this.refund_info.account_type = this.accountTypeSelectActions[index].value;
},
/** 跳转至订单列表页面 */
handleCancelSubmit() {
uni.redirectTo({
url: '/pages/order/myOrder?status=0'
});
},
/** 申请售后 */
handleApplyService() {
confirmReceipt(this.order_sn).then(() => {
uni.redirectTo({
url: '/pages/order/afterSales/afterSales'
});
});
},
/** 校验参数 */
handleCheckParams() {
// 取消原因校验
if (!this.refund_info.reason || this.refund_info.reason === '请选择取消原因') {
this.$refs.uToast.show({ title: '请选择取消原因!', type: 'error' });
return false;
}
// 联系方式校验
if (!this.refund_info.mobile || !this.$u.test.mobile(this.refund_info.mobile)) {
this.$refs.uToast.show({ title: '请输入正确格式的手机号码!', type: 'error' });
return false;
}
// 如果不支持原路退款
if (!this.isRetrace) {
// 账户类型校验
if (!this.refund_info.account_type) {
this.$refs.uToast.show({ title: '请选择账户类型!', type: 'error' });
return false;
}
// 如果账户类型不为银行卡
if (this.refund_info.account_type != 'BANK_TRANSFER') {
// 退款账号校验
if (!this.refund_info.return_account) {
this.$refs.uToast.show({ title: '请输入退款账号!', type: 'error' });
return false;
}
} else {
// 银行名称校验
if (!this.refund_info.bank_name) {
this.$refs.uToast.show({ title: '请输入银行名称!', type: 'error' });
return false;
}
// 银行开户行校验
if (!this.refund_info.bank_deposit_name) {
this.$refs.uToast.show({ title: '请输入银行开户行!', type: 'error' });
return false;
}
// 银行开户名校验
if (!this.refund_info.bank_account_name) {
this.$refs.uToast.show({ title: '请输入银行开户名!', type: 'error' });
return false;
}
// 银行账号校验
if (!this.refund_info.bank_account_number) {
this.$refs.uToast.show({ title: '请输入银行账号!', type: 'error' });
return false;
}
}
}
return true;
},
/** 提交取消订单申请 */
handleSubmitApply() {
// 校验参数
if (!this.handleCheckParams()) {
return false;
}
this.refund_info.order_sn = this.order_sn;
applyCancelOrder(this.refund_info).then(() => {
this.$refs.uToast.show({ title: '提交成功!', type: 'success' });
this.handleCancelSubmit();
});
},
/** 获取订单详情信息 */
GET_OrderCancelDetail() {
getOrderDetail(this.order_sn).then(response => {
this.order = response.data;
this.isRetrace = this.order.is_retrace;
this.refund_info.refund_price = Foundation.formatPrice(this.order.order_price);
this.applyService = this.order.order_status === 'SHIPPED' && this.order.ship_status === 'SHIP_YES';
});
}
}
};
</script>
<style lang="scss">
/deep/ .u-cell {
// #ifdef MP-WEIXIN
width: 100vw !important;
overflow: hidden !important;
display: block !important;
// #endif
}
/deep/ .u-cell_title{
// #ifdef MP-WEIXIN
float: left;
// #endif
}
/deep/ .u-cell__value{
// #ifdef MP-WEIXIN
float: right;
// #endif
}
.cancel-head {
display: flex;
justify-content: flex-end;
align-items: flex-end;
}
.submit-btn {
display: flex;
margin-top: 40rpx;
margin-bottom: 40rpx;
text-align: center;
justify-content: center;
align-items: center;
}
.cancel-tips {
display: flex;
flex-direction: column;
padding: 20rpx;
font-size: 22rpx;
font-family: PingFang SC, PingFang SC-Regular;
color: #999999;
view {
margin-top: 6rpx;
}
.tips-header {
color: #ff6262;
font-size: 26rpx;
margin-bottom: 6rpx;
}
}
.main-btn {
width: 40%;
background-color: $light-color;
color: #ffffff;
}
.cancel-btn {
margin-right: 30px;
width: 40%;
border-color: $light-color;
color: $light-color;
}
</style>

View File

@@ -12,11 +12,9 @@
<view class="status-info">
<view class="status-info-box">
<view class="status-val">{{
serviceStatusList[serviceDetail.serviceStatus]
serviceDetail.serviceStatus | serviceStatusList
}}</view>
<!-- <view class="status-tip" v-if="allowable.allow_ship"
>请您尽快将申请售后的商品退还给卖家</view
> -->
<view class="status-tip">{{
serviceDetail.serviceStatus | statusFilter
}}</view>
@@ -35,7 +33,7 @@
</view>
<view class="goods-info">
<view class="info-box">
<view class="goods-item-view" @click="gotoGoodsDetail(serviceDetail)">
<view class="goods-item-view" @click="navgiateToGoodsDetail(serviceDetail)">
<view class="goods-img">
<u-image border-radius="6" width="131rpx" height="131rpx" :src="serviceDetail.goodsImage"></u-image>
</view>
@@ -99,21 +97,21 @@
<view class="detail-item" v-if="serviceDetail.serviceType != 'RETURN_MONEY' && serviceDetail.serviceStatus != 'APPLY'">
<view class="title">收货地址:</view>
<view class="value">
<span v-if="change_info.salesConsigneeAddressPath">{{
change_info.salesConsigneeAddressPath
<span v-if="storeAfterSaleAddress.salesConsigneeAddressPath">{{
storeAfterSaleAddress.salesConsigneeAddressPath
}}</span>
</view>
</view>
<!-- 如果服务类型为退款则不显示 -->
<view class="detail-item" v-if="serviceDetail.serviceType != 'RETURN_MONEY' && serviceDetail.serviceStatus != 'APPLY'">
<view class="title">联系人:</view>
<view class="value">{{ change_info.salesConsigneeName }}</view>
<view class="value">{{ storeAfterSaleAddress.salesConsigneeName }}</view>
</view>
<!-- 如果服务类型为退款则不显示 -->
<view class="detail-item" v-if="serviceDetail.serviceType != 'RETURN_MONEY' && serviceDetail.serviceStatus != 'APPLY'">
<view class="title">联系方式:</view>
<view class="value">{{
change_info.salesConsigneeMobile || "" | secrecyMobile
storeAfterSaleAddress.salesConsigneeMobile || "" | secrecyMobile
}}</view>
</view>
<view v-if="refundShow">
@@ -189,12 +187,6 @@
</view>
</view>
</view>
<!-- <view class="submit-view">
<view>在线客服</view>
<view><u-button type="info" shape="circle" size="mini">撤销申请</u-button></view>
</view> -->
</view>
</template>
@@ -212,51 +204,21 @@ export default {
},
data() {
return {
// 售后单状态
serviceStatusList: {
APPLY: "申请售后",
PASS: "通过售后",
REFUSE: "拒绝售后",
BUYER_RETURN: "买家退货,待卖家收货",
SELLER_RE_DELIVERY: "商家换货/补发",
SELLER_CONFIRM: "卖家确认收货",
SELLER_TERMINATION: "卖家终止售后",
BUYER_CONFIRM: "买家确认收货",
BUYER_CANCEL: "买家取消售后",
WAIT_REFUND: "等待平台退款",
COMPLETE: "完成售后",
},
// 售后类型
serviceTypeList: {
// 售后类型
CANCEL: "取消",
RETURN_GOODS: "退货",
EXCHANGE_GOODS: "换货",
RETURN_MONEY: "退款",
},
orderStatusList: {
UNDELIVERED: "待发货",
UNPAID: "未付款",
PAID: "已付款",
DELIVERED: "已发货",
CANCELLED: "已取消",
COMPLETE: "已完成",
TAKE: "已完成",
},
serviceDetail: {},
logs: [],
allowable: {},
goodsList: [],
change_info: {},
serviceDetail: {},
express_info: {},
imagesList: [],
refundShow: false,
accountShow: false,
bankShow: false,
returnAdressShow: true,
shipInfoShow: false,
sn: "",
serviceDetail: {}, // 售后详情
logs: [], //日志
goodsList: [], //商品列表
storeAfterSaleAddress: {}, //售后地址
refundShow: false, //退款开关
accountShow: false, //账户显示
bankShow: false, //银行显示
sn: "", //订单sn
};
},
onLoad(options) {
@@ -269,6 +231,9 @@ export default {
this.getLog(options.sn);
},
filters: {
/**
* 售后状态信息
*/
statusFilter(val) {
switch (val) {
case "APPLY":
@@ -297,6 +262,10 @@ export default {
return "";
}
},
/**
* 退款信息
*/
refundWayFilter(val) {
switch (val) {
case "OFFLINE":
@@ -309,6 +278,9 @@ export default {
return "";
}
},
/**
* 账户信息
*/
accountTypeFilter(val) {
switch (val) {
case "WEIXINPAY":
@@ -338,18 +310,29 @@ export default {
});
},
/**
* 获取地址信息
*/
getAddress() {
getstoreAfterSaleAddress(this.sn).then((res) => {
if (res.data.success) {
this.change_info = res.data.result;
this.storeAfterSaleAddress = res.data.result;
}
});
},
/**
* 获取日志
*/
getLog(sn) {
getAfterSaleLog(sn).then((res) => {
this.logs = res.data.result;
});
},
/**
* 初始化详情
*/
loadDetail() {
uni.showLoading({
title: "加载中",
@@ -357,9 +340,6 @@ export default {
getServiceDetail(this.sn).then((res) => {
uni.hideLoading();
this.serviceDetail = res.data.result;
this.allowable = this.serviceDetail.allowable;
this.express_info = this.serviceDetail.express_info;
if (this.serviceDetail.serviceType == "RETURN_GOODS") {
this.refundShow = true;
}
@@ -375,11 +355,19 @@ export default {
this.serviceDetail.accountType === "BANK_TRANSFER";
});
},
gotoGoodsDetail(item) {
/**
* 访问商品详情
*/
navgiateToGoodsDetail(item) {
uni.navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
});
},
/**
* 进度
*/
onProgress() {
uni.navigateTo({
url: `./applyProgress?sn=${
@@ -394,7 +382,7 @@ export default {
};
</script>
<style lang="scss">
<style lang="scss" scoped>
page,
.content {
background: $page-color-base;
@@ -457,14 +445,6 @@ page,
color: $main-color;
}
}
.after-num {
margin: 0rpx 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 80rpx;
}
}
.apply-detail-view {
background-color: #f7f7f7;
@@ -487,35 +467,7 @@ page,
}
}
}
.submit-view {
position: fixed;
z-index: 999;
bottom: 0px;
left: 0px;
margin-top: 100rpx;
border: solid 2rpx #f2f2f2;
background-color: #ffffff;
height: 100rpx;
width: 750rpx;
padding: 0rpx 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.addr-title {
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
font-weight: bold;
border-bottom: 2rpx solid #d6d6d6;
}
.addr-info {
padding: 50rpx;
font-size: 26rpx;
font-weight: bold;
}
.log-box-bottom {
height: 120rpx;
flex-direction: column;

View File

@@ -1,141 +1,132 @@
<template>
<view>
<view class="info-view">
<view class="header-title-view">
<view class="title">售后单号:</view>
<view>{{ sn }}</view>
</view>
<view class="header-title-view">
<view class="title">申请时间:</view>
<view>{{ createTime }}</view>
</view>
</view>
<view class="info-view">
<view class="header-title-view">
<view>{{ serviceStatus }}</view>
</view>
</view>
<view class="info-view">
<view>
<u-time-line v-if="list.length != 0">
<u-time-line-item>
<!-- 此处没有自定义左边的内容会默认显示一个点 -->
<template v-slot:content>
<view v-for="(time,index) in list" :key="index">
<view class="u-order-desc">{{time.message}}</view>
<view class="u-order-time">{{time.createTime}}</view>
</view>
</template>
</u-time-line-item>
</u-time-line>
<view v-else>
<u-empty text="暂无审核日志"></u-empty>
</view>
</view>
</view>
</view>
<view>
<view class="info-view">
<view class="header-title-view">
<view class="title">售后单号:</view>
<view>{{ sn }}</view>
</view>
<view class="header-title-view">
<view class="title">申请时间:</view>
<view>{{ createTime }}</view>
</view>
</view>
<view class="info-view">
<view class="header-title-view">
<view>{{ serviceStatus }}</view>
</view>
</view>
<view class="info-view">
<view>
<u-time-line v-if="logList.length != 0">
<u-time-line-item>
<!-- 此处没有自定义左边的内容会默认显示一个点 -->
<template v-slot:content>
<view v-for="(time,index) in logList" :key="index">
<view class="u-order-desc">{{time.message}}</view>
<view class="u-order-time">{{time.createTime}}</view>
</view>
</template>
</u-time-line-item>
</u-time-line>
<view v-else>
<u-empty text="暂无审核日志"></u-empty>
</view>
</view>
</view>
</view>
</template>
<script>
import UEmpty from "@/uview-ui/components/u-empty/u-empty.vue";
export default {
components: {
UEmpty
},
data() {
return {
sn: "",
createTime: "",
list: [],
serviceStatus: "",
};
},
onLoad(options) {
this.sn = options.sn;
this.createTime = decodeURIComponent(options.createTime);
this.serviceStatus = this.statusFilter(options.serviceStatus);
this.list = JSON.parse(decodeURIComponent(options.logs));
console.log(options.logs);
// list.forEach(res => {
// res.log_time_str = this.$u.timeFormat(res.log_time, 'yyyy-mm-dd hh:MM:ss');
// })
// this.list = list;
},
methods: {
statusFilter(val) {
switch (val) {
case "APPLY":
return "售后服务申请成功,等待商家审核";
case "PASS":
return "售后服务申请审核通过";
case "REFUSE":
return "售后服务申请已被商家拒绝,如有疑问请及时联系商家";
case "FULL_COURIER":
return "申请售后的商品已经寄出,等待商家收货";
case "STOCK_IN":
return "商家已将售后商品入库";
case "WAIT_FOR_MANUAL":
return "等待平台进行人工退款";
case "REFUNDING":
return "商家退款中,请您耐心等待";
case "COMPLETED":
return "售后服务已完成,感谢您的支持";
case "ERROR_EXCEPTION":
return "系统生成新订单异常,等待商家手动创建新订单";
case "CLOSED":
return "售后服务已关闭";
case "WAIT_REFUND":
return "等待平台进行退款";
default:
return "";
}
},
},
};
export default {
data() {
return {
sn: "", //sn
createTime: "", //创建时间
logList: [], //日志集合
serviceStatus: "", //订单状态
};
},
onLoad(options) {
this.sn = options.sn;
this.createTime = decodeURIComponent(options.createTime);
this.serviceStatus = this.statusFilter(options.serviceStatus);
this.logList = JSON.parse(decodeURIComponent(options.logs));
},
methods: {
statusFilter(val) {
switch (val) {
case "APPLY":
return "售后服务申请成功,等待商家审核";
case "PASS":
return "售后服务申请审核通过";
case "REFUSE":
return "售后服务申请已被商家拒绝,如有疑问请及时联系商家";
case "FULL_COURIER":
return "申请售后的商品已经寄出,等待商家收货";
case "STOCK_IN":
return "商家已将售后商品入库";
case "WAIT_FOR_MANUAL":
return "等待平台进行人工退款";
case "REFUNDING":
return "商家退款中,请您耐心等待";
case "COMPLETED":
return "售后服务已完成,感谢您的支持";
case "ERROR_EXCEPTION":
return "系统生成新订单异常,等待商家手动创建新订单";
case "CLOSED":
return "售后服务已关闭";
case "WAIT_REFUND":
return "等待平台进行退款";
default:
return "";
}
},
},
};
</script>
<style lang="scss">
page,
.content {
background: $page-color-base;
height: 100%;
}
<style lang="scss" scoped>
page,
.content {
background: $page-color-base;
height: 100%;
}
.u-order-time {
font-size: 24rpx;
color: #999;
margin: 20rpx 0;
}
.u-order-time {
font-size: 24rpx;
color: #999;
margin: 20rpx 0;
}
.info-view {
margin: 20rpx 0;
border-radius: 20rpx;
background-color: #fff;
padding: 30rpx;
.info-view {
margin: 20rpx 0;
border-radius: 20rpx;
background-color: #fff;
padding: 30rpx;
.header-title-view {
display: flex;
flex-direction: row;
align-items: center;
color: #909399;
.header-title-view {
display: flex;
flex-direction: row;
align-items: center;
color: #909399;
.title {
width: 160rpx;
}
}
.title {
width: 160rpx;
}
}
.steps-view {
display: flex;
flex-direction: row;
align-items: center;
color: #909399;
border-bottom: 1px solid $page-color-base;
margin-bottom: 10rpx;
.steps-view {
display: flex;
flex-direction: row;
align-items: center;
color: #909399;
border-bottom: 1px solid $page-color-base;
margin-bottom: 10rpx;
.title {
width: 160rpx;
}
}
}
.title {
width: 160rpx;
}
}
}
</style>

View File

@@ -5,10 +5,10 @@
<view class="success-text">售后申请提交成功</view>
<view class="btn-view">
<view class="btn-item">
<u-button ripple class="btn1" shape="circle" @click="toMenu()">查看记录</u-button>
<u-button ripple class="btn1" shape="circle" @click="navigateToAfterSales()">查看记录</u-button>
</view>
<view class="btn-item">
<u-button ripple class="btn2" shape="circle" @click="toHome()">回到主页</u-button>
<u-button ripple class="btn2" shape="circle" @click="navigateToHome()">回到主页</u-button>
</view>
</view>
</view>
@@ -27,12 +27,19 @@ export default {
return {};
},
methods: {
toMenu() {
/**
* 跳转到售后服务
*/
navigateToAfterSales() {
uni.redirectTo({
url: "/pages/order/afterSales/afterSales",
});
},
toHome() {
/**
* 跳转到首页
*/
navigateToHome() {
uni.switchTab({
url: "/pages/tabbar/home/index",
});
@@ -41,7 +48,7 @@ export default {
};
</script>
<style lang="scss">
<style lang="scss" scoped>
page {
background: $page-color-base;
padding-bottom: 100rpx;

View File

@@ -16,10 +16,8 @@
</view>
<view class="goods-info">
<view class="goods-title u-line-2">{{ sku.goodsName }}</view>
<view class="goods-price">
{{ sku.flowPrice | unitPrice }}
<!-- <span>+{{ '1' }}积分</span> -->
</view>
</view>
<view class="goods-num">
@@ -89,7 +87,7 @@ export default {
skuId: "", //商品skuid
};
},
onLoad(option) {
this.loadData(option.sn);
this.sn = option.sn;

View File

@@ -71,7 +71,7 @@
<!-- 店铺商品信息 -->
<div class="box box2" v-for="(item, index) in orderMessage.cartList" :key="index">
<u-row class="tab1" @click="tostore(item)">
<u-row class="tab1" @click="navigateToStore(item)">
<u-col :offset="0">
<span class="ybname">{{ item.storeName }}</span>
</u-col>
@@ -224,14 +224,6 @@ export default {
shippingText: "LOGISTICS",
shippingFlag: false,
shippingMethod: [
// {
// value: "SELF_PICK_UP",
// label: "自提",
// },
// {
// value: "LOCAL_TOWN_DELIVERY",
// label: "同城配送",
// },
{
value: "LOGISTICS",
label: "物流",
@@ -260,6 +252,10 @@ export default {
};
},
filters: {
/**
* 发票收据类型
*/
receiptType(type) {
switch (type) {
case "VATORDINARY":
@@ -281,8 +277,6 @@ export default {
if (e.from == "backbutton") {
let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].options;
console.log(routes);
routes.forEach((item) => {
if (
item.route == "pages/tabbar/cart/cartList" ||
@@ -309,8 +303,6 @@ export default {
uni.showLoading({
mask: true,
});
// this.checkedshipMethod([this.shippingMethod[2]]);
this.getOrderList();
uni.hideLoading();
if (this.routerVal.way == "PINTUAN") {
@@ -327,9 +319,7 @@ export default {
//发票回调 选择发票之后刷新购物车
async callbackInvoice(val) {
this.invoiceFlag = false;
this.receiptList = val;
if (val) {
let submit = {
way: this.routerVal.way,
@@ -344,29 +334,11 @@ export default {
},
// 跳转到店铺
tostore(val) {
navigateToStore(val) {
uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
// 点击配送方式选择
// checkedshipMethod(val) {
// API_Order.selectedShipMethod({
// shippingMethod: val[0].value,
// way: this.routerVal.way,
// }).then((res) => {
// if (res.data.code == 200) {
// this.shippingText = val[0].value;
// } else {
// uni.showToast({
// title: res.data.message,
// duration: 2000,
// icon: "none",
// });
// }
// });
// },
// 点击跳转地址
clickToAddress() {
this.navigateTo(
@@ -419,12 +391,18 @@ export default {
);
},
/**
* 跳转
*/
navigateTo(url) {
uni.navigateTo({
url,
});
},
/**
* 提交订单准备支付
*/
submit() {
if (!this.address.id) {
uni.showToast({
@@ -457,6 +435,9 @@ export default {
? (submit.parentOrderSn = this.routerVal.parentOrder.orderSn)
: delete submit.parentOrderSn;
/**
* 创建订单
*/
API_Trade.createTrade(submit).then((res) => {
if (res.data.success) {
uni.showToast({
@@ -491,6 +472,9 @@ export default {
this.$u.debounce(this.submit(), 3000);
},
/**
* 微信小程序中直接支付
*/
async pay(sn) {
new LiLiWXPay({
sn: sn,
@@ -499,7 +483,7 @@ export default {
},
/**
* @param id
* 获取用户地址
*/
getUserAddress() {
// 如果没有商品选择地址的话 则选择 默认地址
@@ -509,8 +493,6 @@ export default {
","
);
this.address = res.data.result;
console.log(this.address);
}
});
},

View File

@@ -142,7 +142,7 @@ export default {
this.invoiceHeader[0].active = true;
this.goodsType[0].active = true;
}
console.log(this.res);
},
methods: {
handleClickHeader(val, index, arr) {

View File

@@ -3,27 +3,25 @@
<view class="navbar">
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
</view>
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData(tabIndex)">
<!-- 空白页 -->
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
<!-- 订单列表 -->
<view class="seller-view" :key="oderIndex" v-for="(order, oderIndex) in tabItem.orderList">
<!-- 店铺名称 -->
<view class="seller-info u-flex u-row-between">
<view class="seller-name" @click="tostore(order)">
<view class="seller-name" @click="navigateToStore(order)">
<view class="name">{{ order.storeName }}</view>
</view>
<view class="order-sn">{{
orderStatusList[order.orderStatus]
order.orderStatus | orderStatusList
}}</view>
</view>
<view>
<view>
<view class="goods-item-view" @click="onDetail(order.sn)">
<view class="goods-item-view" @click="navigateToOrderDetail(order.sn)">
<view class="goods-img" v-for="(goods, goodsIndex) in order.orderItems" :key="goodsIndex">
<u-image border-radius="6" width="100%" height="100%" :src="goods.image"></u-image>
</view>
@@ -31,7 +29,6 @@
<view v-if="order.orderItems.length <= 1" class="goods-title u-line-2">{{ order.groupName }}</view>
<view v-if="order.orderItems.length <= 1" class="goods-price">
{{ order.flowPrice | unitPrice }}
<!-- <span v-if="order.point">+{{ order.point }}积分</span> -->
</view>
</view>
<view v-if="order.orderItems.length <= 1" class="goods-num">
@@ -41,53 +38,31 @@
</view>
<view class="btn-view u-flex u-row-between">
<view class="description">
<!-- 全部 -->
<!-- 等待付款 -->
<text v-if="order.payStatus === 'PAID'">已付金额</text>
<text v-else>应付金额</text>
<text class="price">{{ order.flowPrice | unitPrice }}</text>
<!-- 等待发货 || 等待收货 || 交易完成 || 交易关闭 -->
<!-- <text>已付金额</text>
<text class="price">12.00</text> -->
</view>
<view>
<!-- 全部 -->
<u-button ripple class="pay-btn" shape="circle" size="mini" v-if="order.allowOperationVO.pay" @click="waitPay(order)">立即付款</u-button>
<u-button ripple class="pay-btn" shape="circle" size="mini" v-if="order.allowOperationVO.pay" @click="waitPay(order)">立即付款</u-button>
<!-- 取消订单 -->
<u-button ripple class="cancel-btn" shape="circle" size="mini" v-if="order.allowOperationVO.cancel" @click="onCancel(order.sn)">
取消订单
</u-button>
<!-- 等待收货 -->
<u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="order.allowOperationVO.showLogistics" @click="onLogistics(order)">
<u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="order.allowOperationVO.showLogistics" @click="navigateToLogistics(order)">
查看物流
</u-button>
<u-button ripple :customStyle="{'background':$lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
<u-button ripple :customStyle="{'background':$lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
确认收货
</u-button>
<!-- 交易完成 未评价 -->
<!-- <u-button
shape="circle"
class="rebuy-btn"
size="mini"
v-if="order.orderStatus == 'COMPLETE'"
@click="onComment(order.sn)"
>
评价商品
</u-button> -->
<u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="
order.orderStatus === 'CANCELLED' ||
order.orderStatus === 'COMPLETE'
" @click="reBuy(order)">
再次购买
</u-button>
<!-- 交易完成 未追评 -->
<!-- <u-button class="u-margin-left-15" size="mini"> 追加评价</u-button>
<u-button class="u-margin-left-15" size="mini"> 再次购买</u-button> -->
<!-- 交易关闭 -->
<!-- <u-button class="u-margin-left-15" size="mini"> 取消订单</u-button>
<u-button class="u-margin-left-15" size="mini"> 重新购买</u-button> -->
</view>
</view>
</view>
@@ -136,17 +111,9 @@ export default {
},
data() {
return {
tabCurrentIndex: 0,
orderStatusList: {
UNDELIVERED: "待发货",
UNPAID: "未付款",
PAID: "已付款",
DELIVERED: "已发货",
CANCELLED: "已取消",
COMPLETED: "已完成",
TAKE: "已完成",
},
tabCurrentIndex: 0, //导航栏索引
navList: [
//导航栏list
{
state: 0,
text: "全部",
@@ -190,13 +157,14 @@ export default {
pageNumber: 1,
},
],
status: "",
status: "", //接收导航栏状态
params: {
pageNumber: 1,
pageSize: 10,
tag: "ALL",
},
orderStatus: [
//订单状态
{
orderStatus: "ALL", //全部
},
@@ -216,14 +184,17 @@ export default {
orderStatus: "CANCELLED", //已取消
},
],
cancelShow: false,
orderSn: "",
cancelShow: false, //是否显示取消
orderSn: "", //ordersn
reason: "", //取消原因
cancelList: "",
rogShow: false,
cancelList: "", //取消列表
rogShow: false, //显示是否收货
};
},
/**
* 跳转到个人中心
*/
onBackPress(e) {
if (e.from == "backbutton") {
uni.reLaunch({
@@ -232,9 +203,8 @@ export default {
return true; //阻止默认返回行为
}
},
onPullDownRefresh(){
this.loadData(this.status)
// uni.stopPullDownRefresh();
onPullDownRefresh() {
this.loadData(this.status);
},
onLoad(options) {
@@ -251,6 +221,7 @@ export default {
},
watch: {
/**监听更改请求数据 */
tabCurrentIndex(val) {
this.params.tag = this.orderStatus[val].orderStatus;
//切换标签页将所有的页数都重置为1
@@ -264,13 +235,15 @@ export default {
},
methods: {
// 店铺详情
tostore(val) {
navigateToStore(val) {
uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
//取消订单
/**
* 取消订单
*/
onCancel(sn) {
this.orderSn = sn;
this.cancelShow = true;
@@ -284,34 +257,51 @@ export default {
uni.hideLoading();
});
},
/**
* 初始化数据
*/
initData(index) {
this.navList[index].pageNumber = 1;
this.navList[index].loadStatus = "more";
this.navList[index].orderList = [];
this.loadData(index);
},
/**
* 等待支付
*/
waitPay(val) {
this.$u.debounce(this.pay(val), 3000)
this.$u.debounce(this.pay(val), 3000);
},
pay(val){
if(val.sn){
/**
* 支付
*/
pay(val) {
if (val.sn) {
// #ifdef MP-WEIXIN
new LiLiWXPay({sn:val.sn,price:val.flowPrice,orderType:'ORDER'}).pay()
new LiLiWXPay({
sn: val.sn,
price: val.flowPrice,
orderType: "ORDER",
}).pay();
// #endif
// #ifndef MP-WEIXIN
uni.navigateTo({
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
})
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
});
// #endif
}
},
//获取订单列表
/**
* 获取订单列表
*/
loadData(index) {
this.params.pageNumber = this.navList[index].pageNumber;
getOrderList(this.params).then((res) => {
uni.stopPullDownRefresh()
uni.stopPullDownRefresh();
if (!res.data.success) {
this.navList[index].loadStatus = "noMore";
return false;
@@ -392,17 +382,26 @@ export default {
stateTipColor,
};
},
onDetail(sn) {
/**
* 跳转到订单详情
*/
navigateToOrderDetail(sn) {
uni.navigateTo({
url: "./orderDetail?sn=" + sn,
});
},
//选择取消原因
/**
* 选择取消原因
*/
reasonChange(reason) {
this.reason = reason;
},
//提交取消订单(未付款)
/**
* 提交取消订单(未付款)
*/
submitCancel() {
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
if (res.statusCode == 200) {
@@ -414,24 +413,28 @@ export default {
this.initData(0);
this.cancelShow = false;
}
else{
} else {
uni.showToast({
title: res.data.message,
duration: 2000,
icon: "none",
});
this.cancelShow = false
this.cancelShow = false;
}
});
},
//确认收货
/**
* 确认收货显示
*/
onRog(sn) {
this.orderSn = sn;
this.rogShow = true;
//
},
/**
* 点击确认收货
*/
confirmRog() {
confirmReceipt(this.orderSn).then((res) => {
if (res.data.code == 200) {
@@ -445,28 +448,43 @@ export default {
}
});
},
//评价商品
/**
* 评价商品
*/
onComment(sn) {
uni.navigateTo({
url: "./evaluate/myEvaluate",
});
},
/**
* 重新购买
*/
reBuy(order) {
uni.navigateTo({
url: "/pages/product/goods?id=" + order.groupSkuId + "&goodsId="+ order.goodsId,
url:
"/pages/product/goods?id=" +
order.groupSkuId +
"&goodsId=" +
order.goodsId,
});
},
//查看物流
onLogistics(order) {
/**
* 查看物流
*/
navigateToLogistics(order) {
uni.navigateTo({
url: "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
url:
"/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
});
},
},
};
</script>
<style lang="scss">
<style lang="scss" scoped>
page,
.content {
background: $page-color-base;
@@ -521,138 +539,6 @@ page,
height: auto;
}
/* load-more */
.uni-load-more {
display: flex;
flex-direction: row;
height: 80rpx;
align-items: center;
justify-content: center;
}
.uni-load-more__text {
font-size: 28rpx;
color: #999;
}
.uni-load-more__img {
height: 24px;
width: 24px;
margin-right: 10px;
}
.uni-load-more__img > view {
position: absolute;
}
.uni-load-more__img > view view {
width: 6px;
height: 2px;
border-top-left-radius: 1px;
border-bottom-left-radius: 1px;
background: #999;
position: absolute;
opacity: 0.2;
transform-origin: 50%;
animation: load 1.56s ease infinite;
}
.uni-load-more__img > view view:nth-child(1) {
transform: rotate(90deg);
top: 2px;
left: 9px;
}
.uni-load-more__img > view view:nth-child(2) {
transform: rotate(180deg);
top: 11px;
right: 0;
}
.uni-load-more__img > view view:nth-child(3) {
transform: rotate(270deg);
bottom: 2px;
left: 9px;
}
.uni-load-more__img > view view:nth-child(4) {
top: 11px;
left: 0;
}
.load1,
.load2,
.load3 {
height: 24px;
width: 24px;
}
.load2 {
transform: rotate(30deg);
}
.load3 {
transform: rotate(60deg);
}
.load1 view:nth-child(1) {
animation-delay: 0s;
}
.load2 view:nth-child(1) {
animation-delay: 0.13s;
}
.load3 view:nth-child(1) {
animation-delay: 0.26s;
}
.load1 view:nth-child(2) {
animation-delay: 0.39s;
}
.load2 view:nth-child(2) {
animation-delay: 0.52s;
}
.load3 view:nth-child(2) {
animation-delay: 0.65s;
}
.load1 view:nth-child(3) {
animation-delay: 0.78s;
}
.load2 view:nth-child(3) {
animation-delay: 0.91s;
}
.load3 view:nth-child(3) {
animation-delay: 1.04s;
}
.load1 view:nth-child(4) {
animation-delay: 1.17s;
}
.load2 view:nth-child(4) {
animation-delay: 1.3s;
}
.load3 view:nth-child(4) {
animation-delay: 1.43s;
}
@-webkit-keyframes load {
0% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
.seller-view {
border-radius: 20rpx;
background-color: #fff;

View File

@@ -359,7 +359,7 @@ export default {
* 投诉
*/
complaint(sku) {
console.log(sku);
uni.navigateTo({
url:
"/pages/order/complain/complain?sn=" +
@@ -378,7 +378,7 @@ export default {
},
// 去支付
toPay(val) {
console.log(val);
val.sn
? uni.navigateTo({
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
@@ -411,12 +411,7 @@ export default {
this.cancelShow = true;
},
//取消订单
toCancel(sn) {
uni.navigateTo({
url: "/pages/order/afterSales/applyCancel?sn=" + sn,
});
}, //提交取消订单(未付款)
//提交取消订单(未付款)
submitCancel() {
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
if (res.data.success) {