zs há 2 anos atrás
pai
commit
6c277297b4
4 ficheiros alterados com 233 adições e 11 exclusões
  1. 6 0
      pages.json
  2. 4 0
      pagesMy/logistics/index.vue
  3. 12 11
      pagesMy/order/after.vue
  4. 211 0
      pagesMy/order/afterInfo.vue

+ 6 - 0
pages.json

@@ -90,6 +90,12 @@
 						"enablePullDownRefresh": true
 					}
 				},
+				{
+					"path": "order/afterInfo",
+					"style": {
+						"navigationBarTitleText": "售后详情"
+					}
+				},
 				{
 					"path": "order/detail",
 					"style": {

+ 4 - 0
pagesMy/logistics/index.vue

@@ -61,6 +61,8 @@
 					let res;
 					if (that.type == 'integral') {
 						res = await that.$api(`/zrOrder/${that.id}`, `GET`, {}, `integral`)
+					} else if (that.type == 'afterSale') {
+						res = await that.$api(`/afterSale/${that.id}`, `GET`)
 					} else {
 						res = await that.$api(`/orderDetail/${that.id}`, 'GET')
 					}
@@ -80,6 +82,8 @@
 				let res;
 				if (that.type == 'integral') {
 					res = await that.$api(`/zrOrder/sot/${that.info._id}`, `GET`, {}, `integral`);
+				} else if (that.type == 'afterSale') {
+					res = await that.$api(`/afterSale/getTransportInfo/${that.id}`, `GET`)
 				} else {
 					res = await that.$api(`/orderDetail/sot/${that.info._id}`, `GET`);
 				}

+ 12 - 11
pagesMy/order/after.vue

@@ -36,24 +36,20 @@
 											<view class="other_1">
 												申请时间:<text>{{item.apply_time||'暂无'}}</text>
 											</view>
-											<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 type="default" size="mini" @tap.stop="toView(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'"
+										<button v-if="item.type!='1'&&item.status=='2'||item.status=='3'"
 											type="default" size="mini" @tap.stop="toMaintain(item)">维护单号</button>
-										<button v-if="item.type=='3'&&item.status=='-3'&&item.transport.shop_transport_no" type="default" size="mini"
-											@tap.stop="toLogi(item)">查看物流</button>
+										<button
+											v-if="item.type=='3'&&item.status=='-3'&&item.transport.shop_transport_no"
+											type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
 									</view>
 								</view>
 								<view class="is_bottom" v-if="is_bottom">
@@ -227,6 +223,12 @@
 				that.clearPage();
 				that.search()
 			},
+			// 售后详细信息
+			toView(item) {
+				uni.navigateTo({
+					url: `/pagesMy/order/afterInfo?id=${item._id}`
+				})
+			},
 			// 订单详细
 			toInfo(item) {
 				uni.navigateTo({
@@ -242,7 +244,7 @@
 			// 查看物流
 			toLogi(e) {
 				uni.navigateTo({
-					url: `/pagesMy/logistics/index?id=${e.order_detail._id}`
+					url: `/pagesMy/logistics/index?id=${e._id}&type=${'afterSale'}`
 				})
 			},
 			// 取消售后
@@ -339,7 +341,6 @@
 					.list_2 {
 						display: flex;
 						justify-content: space-between;
-						align-items: center;
 
 						.image {
 							width: 25vw;

+ 211 - 0
pagesMy/order/afterInfo.vue

@@ -0,0 +1,211 @@
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="goods">
+				<view class="url">
+					<image class="image"
+						:src="info.goods.goods.file&&info.goods.goods.file.length>0?info.goods.goods.file[0].url:''"
+						mode=""></image>
+				</view>
+				<view class="goodsname">
+					{{info.goods.goods.name}}
+					<view class="specs">
+						{{info.goods.name}}
+					</view>
+				</view>
+				<view class="goodsother">
+					<view v-if="info.order_detail.type=='0'" class="price">
+						¥{{info.goods.sell_money}}
+					</view>
+					<view v-else class="price">
+						¥{{info.goods.group_config.money}}
+					</view>
+					<view class="num">
+						×{{info.goods.buy_num}}
+					</view>
+				</view>
+			</view>
+			<view class="info">
+				<view class="one">
+					<view class="left">售后状态</view>
+					<view class="right">{{info.zhStatus||'暂无'}}</view>
+				</view>
+				<view class="one">
+					<view class="left">售后类型</view>
+					<view class="right">{{info.zhType||'暂无'}}</view>
+				</view>
+				<view class="one">
+					<view class="left">申请时间</view>
+					<view class="right">{{info.apply_time||'暂无'}}</view>
+				</view>
+				<view class="one">
+					<view class="left">售后结束时间</view>
+					<view class="right">{{info.end_time||'暂无'}}</view>
+				</view>
+				<view class="one">
+					<view class="left">售后描述</view>
+					<view class="right">{{info.desc||'暂无'}}</view>
+				</view>
+				<view class="one">
+					<view class="left">申请理由</view>
+					<view class="right">{{info.zhReason||'暂无'}}</view>
+				</view>
+				<view class="one" v-if="info.type!='3'">
+					<view class="left">退款金额</view>
+					<view class="right">¥{{info.money||0}}</view>
+				</view>
+				<view class="one">
+					<view class="left">售后处理人</view>
+					<view class="right">{{info.deal_person.name||'暂无'}}</view>
+				</view>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: '',
+				user: {},
+				info: {},
+				// 售后状态
+				statusList: [],
+				// 售后类型
+				typeList: [],
+				// 申请理由
+				reasonList: [],
+			};
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.$set(that, `id`, e.id || '');
+			await that.searchOther();
+			await that.watchLogin();
+		},
+		methods: {
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "afterSale_status"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `statusList`, res.data)
+				}
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "afterSale_type"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `typeList`, res.data)
+				}
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "afterSale_reason"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `reasonList`, res.data)
+				}
+			},
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: async function(res) {
+						let user = that.$jwt(res.data);
+						if (user) {
+							that.$set(that, `user`, user);
+							if (that.id) {
+								//售后详情
+								let arr = await that.$api(`/afterSale/${that.id}`, 'GET')
+								if (arr.errcode == '0') {
+									console.log(arr.data);
+									let status = that.statusList.find(i => i.value == arr.data.status)
+									if (status) arr.data.zhStatus = status.label;
+									let type = that.typeList.find(i => i.value == arr.data.type)
+									if (type) arr.data.zhType = type.label;
+									let reason = that.reasonList.find(i => i.value == arr.data.reason)
+									if (reason) arr.data.zhReason = reason.label;
+									that.$set(that, `info`, arr.data)
+								}
+							}
+						}
+					},
+					fail: function(err) {
+						uni.navigateTo({
+							url: `/pages/login/index`
+						})
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.goods {
+			display: flex;
+			border-bottom: 1px dashed #f1f1f1;
+			padding: 2vw;
+			width: 96vw;
+
+			.url {
+				width: 20vw;
+
+				.image {
+					width: 100%;
+					height: 20vw;
+					border-radius: 5px;
+
+				}
+			}
+
+			.goodsname {
+				display: flex;
+				flex-direction: column;
+				width: 60vw;
+				padding: 0 2vw;
+				font-size: 16px;
+
+				.specs {
+					color: var(--f85Color);
+					font-size: var(--font12Size);
+				}
+
+			}
+
+			.goodsother {
+				width: 15vw;
+				text-align: right;
+			}
+		}
+
+		.info {
+			padding: 2vw;
+
+			.one {
+				display: flex;
+				justify-content: space-between;
+				padding: 2vw;
+
+				.left {
+					color: #696969;
+					font-size: var(--font14Size);
+				}
+
+				.right {
+					color: #A9A9A9;
+					font-size: var(--font14Size);
+				}
+			}
+		}
+	}
+</style>