zs 1 éve
szülő
commit
6837c60008
1 módosított fájl, 339 hozzáadás és 338 törlés
  1. 339 338
      pagesMy/dough/info.vue

+ 339 - 338
pagesMy/dough/info.vue

@@ -1,338 +1,339 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="zero">
-				<scroll-view scroll-y="true" class="scroll-view">
-					<view class="list-scroll-view">
-						<view class="one">
-							<view class="one_1">
-								<text class="iconfont icon-dingweixiao"></text>
-							</view>
-							<view class="one_2">
-								<view class="name">
-									<text>{{info.address.name}}</text>
-									<text>{{info.address.phone}}</text>
-								</view>
-								<view class="address">
-									<text>{{info.address.province}}</text>
-									<text>{{info.address.city}}</text>
-									<text>{{info.address.area}}</text>
-									<text>{{info.address.address}}</text>
-								</view>
-							</view>
-						</view>
-						<view class="two">
-							<view class="two_0">
-								<text>{{info.zhStatus||'未识别'}}</text>
-							</view>
-							<view class="two_1">
-								<view class="list">
-									<view class="list_1">
-										<text class="iconfont icon-shangdian"></text>
-										<text>{{info.shop.name}}</text>
-									</view>
-									<view class="list_2">
-										<view class="goods">
-											<view class="goods_1">
-												<view class="url">
-													<image class="image" v-if="info.spec.file&&info.spec.file.length>0"
-														:src="info.spec.file&&info.spec.file.length>0?info.spec.file[0].url:''"
-														mode=""></image>
-													<image class="image" v-else
-														:src="info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''"
-														mode=""></image>
-												</view>
-												<view class="goodsname">
-													{{info.goods.name}}
-													<view class="specs">
-														{{info.spec.name}}
-													</view>
-												</view>
-												<view class="goodsother">
-													<view class="price">
-														¥{{info.spec.price||0}}
-													</view>
-													<view class="num">
-														×{{info.num}}
-													</view>
-												</view>
-											</view>
-										</view>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="thr">
-							<view class="thr_1" v-for="(item,index) in info.total_detail" :key="index">
-								<text>{{item.zh}}</text>
-								<text>¥{{item.money}}</text>
-							</view>
-							<view class="thr_1">
-								<text>实付金额</text>
-								<text>¥{{info.goods_total}}</text>
-							</view>
-						</view>
-						<view class="four">
-							<view class="four_1">
-								<text>订单号</text>
-								<text>{{info.no}}</text>
-							</view>
-							<view class="four_1">
-								<text>订单状态</text>
-								<text>{{info.zhStatus||'未识别'}}</text>
-							</view>
-							<view class="four_1">
-								<text>下单时间</text>
-								<text>{{info.buy_time}}</text>
-							</view>
-							<view class="four_1">
-								<text>订单备注</text>
-								<text>{{info.remarks}}</text>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-			<view class="zero_1">
-				<text>合计:</text>
-				<text>¥{{info.goods_total}}</text>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				id: '',
-				info: {},
-				// 售后状态
-				statusList: [],
-			};
-		},
-		onLoad: async function(e) {
-			const that = this;
-			that.$set(that, `id`, e.id || '');
-			await that.searchOther();
-			await that.search()
-		},
-		methods: {
-			// 查询详情
-			async search() {
-				const that = this;
-				uni.showLoading({
-					title: '加载中'
-				});
-				let res = await that.$api(`/groupOrder/userView/${that.id}`, 'GET', {},
-					'group');
-				if (res.errcode == '0') {
-					let status = that.statusList.find(i => i.value == res.data.status)
-					if (status) res.data.zhStatus = status.label;
-					// 运费总数和商品总数相加
-					let total = 0;
-					for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
-					res.data.goods_total = total
-					that.$set(that, `info`, res.data);
-					uni.hideLoading();
-				}
-			},
-			// 查询其他信息
-			async searchOther() {
-				const that = this;
-				let res;
-				// 查询状态
-				res = await that.$api(`/dictData`, 'GET', {
-					code: 'order_process'
-				})
-				if (res.errcode == '0') that.$set(that, `statusList`, res.data);
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
-		background-color: #f5f5f5;
-
-		.zero {
-			position: relative;
-			flex-grow: 1;
-
-			.one {
-				background-color: #fff;
-				margin: 0 0 2vw 0;
-				display: flex;
-				justify-content: space-between;
-				padding: 2vw;
-				border-bottom: 2px dashed var(--fFB1Color);
-
-				.one_1 {
-					width: 8vw;
-					text-align: center;
-					padding: 3vw 0 0;
-				}
-
-				.one_2 {
-					width: 86vw;
-
-					.name {
-						font-size: 16px;
-						margin: 0 0 1vw 0;
-
-						text {
-							padding: 0 0 0 2vw;
-						}
-					}
-
-					.address {
-						font-size: 14px;
-						color: #858585;
-
-						text {
-							padding: 0 0 0 2vw;
-						}
-					}
-				}
-			}
-
-			.two {
-				background-color: #fff;
-				margin: 0 0 2vw 0;
-				padding: 2vw;
-
-				.two_0 {
-					text-align: right;
-					color: var(--fFB1Color);
-				}
-
-				.two_1 {
-					display: flex;
-					flex-direction: column;
-
-					.list {
-						margin: 0 0 1vw 0;
-
-						.list_1 {
-							font-size: 16px;
-							margin: 0 0 1vw 0;
-
-							text:last-child {
-								padding: 0 0 0 2vw;
-							}
-						}
-
-						.list_2 {
-							display: flex;
-							flex-direction: column;
-
-							.goods {
-								border-bottom: 1px dashed #f1f1f1;
-								padding: 2vw 0;
-
-								.goods_1 {
-									display: flex;
-
-									.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);
-										}
-
-										.other {
-											display: flex;
-											padding: 1vw 0 0 0;
-										}
-									}
-
-									.goodsother {
-										width: 15vw;
-										text-align: right;
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			.thr {
-				background-color: #fff;
-				margin: 0 0 2vw 0;
-				padding: 0 2vw;
-
-				.thr_1 {
-					margin: 2vw 0;
-					font-size: 15px;
-					display: flex;
-					justify-content: space-between;
-				}
-
-				.thr_1:last-child {
-					text:last-child {
-						color: var(--fFB1Color);
-					}
-				}
-			}
-
-			.four {
-				background-color: #fff;
-				margin: 0 0 2vw 0;
-				padding: 0 2vw;
-
-				.four_1 {
-					margin: 2vw 0;
-					font-size: 15px;
-					display: flex;
-					justify-content: space-between;
-				}
-			}
-		}
-
-		.zero_1 {
-			background-color: white;
-			width: 96vw;
-			padding: 4vw 2vw;
-			font-size: 16px;
-
-			text:last-child {
-				color: var(--fFB1Color);
-				padding: 0 0 0 2vw;
-			}
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			flex-direction: column;
-		}
-	}
-</style>
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="zero">
+				<scroll-view scroll-y="true" class="scroll-view">
+					<view class="list-scroll-view">
+						<view class="one">
+							<view class="one_1">
+								<text class="iconfont icon-dingweixiao"></text>
+							</view>
+							<view class="one_2" v-if="info.address">
+								<view class="name">
+									<text>{{info.address.name}}</text>
+									<text>{{info.address.phone}}</text>
+								</view>
+								<view class="address">
+									<text>{{info.address.province}}</text>
+									<text>{{info.address.city}}</text>
+									<text>{{info.address.area}}</text>
+									<text>{{info.address.address}}</text>
+								</view>
+							</view>
+						</view>
+						<view class="two">
+							<view class="two_0">
+								<text>{{info.zhStatus||'未识别'}}</text>
+							</view>
+							<view class="two_1">
+								<view class="list">
+									<view class="list_1">
+										<text class="iconfont icon-shangdian"></text>
+										<text v-if="info.shop">{{info.shop.name}}</text>
+									</view>
+									<view class="list_2">
+										<view class="goods">
+											<view class="goods_1">
+												<view class="url">
+													<image class="image"
+														v-if="info.spec&&info.spec.file&&info.spec.file.length>0"
+														:src="info.spec.file&&info.spec.file.length>0?info.spec.file[0].url:''"
+														mode=""></image>
+													<image class="image" v-else
+														:src="info.goods&&info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''"
+														mode=""></image>
+												</view>
+												<view class="goodsname">
+													{{info.goods.name}}
+													<view class="specs">
+														{{info.spec.name}}
+													</view>
+												</view>
+												<view class="goodsother">
+													<view class="price">
+														¥{{info.spec.price||0}}
+													</view>
+													<view class="num">
+														×{{info.num}}
+													</view>
+												</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="thr">
+							<view class="thr_1" v-for="(item,index) in info.total_detail" :key="index">
+								<text>{{item.zh}}</text>
+								<text>¥{{item.money}}</text>
+							</view>
+							<view class="thr_1">
+								<text>实付金额</text>
+								<text>¥{{info.goods_total}}</text>
+							</view>
+						</view>
+						<view class="four">
+							<view class="four_1">
+								<text>订单号</text>
+								<text>{{info.no}}</text>
+							</view>
+							<view class="four_1">
+								<text>订单状态</text>
+								<text>{{info.zhStatus||'未识别'}}</text>
+							</view>
+							<view class="four_1">
+								<text>下单时间</text>
+								<text>{{info.buy_time}}</text>
+							</view>
+							<view class="four_1">
+								<text>订单备注</text>
+								<text>{{info.remarks}}</text>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view class="zero_1">
+				<text>合计:</text>
+				<text>¥{{info.goods_total}}</text>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: '',
+				info: {},
+				// 售后状态
+				statusList: [],
+			};
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.$set(that, `id`, e.id || '');
+			await that.searchOther();
+			await that.search()
+		},
+		methods: {
+			// 查询详情
+			async search() {
+				const that = this;
+				uni.showLoading({
+					title: '加载中'
+				});
+				let res = await that.$api(`/groupOrder/userView/${that.id}`, 'GET', {},
+					'group');
+				if (res.errcode == '0') {
+					let status = that.statusList.find(i => i.value == res.data.status)
+					if (status) res.data.zhStatus = status.label;
+					// 运费总数和商品总数相加
+					let total = 0;
+					for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
+					res.data.goods_total = total
+					that.$set(that, `info`, res.data);
+					uni.hideLoading();
+				}
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				// 查询状态
+				res = await that.$api(`/dictData`, 'GET', {
+					code: 'order_process'
+				})
+				if (res.errcode == '0') that.$set(that, `statusList`, res.data);
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+		background-color: #f5f5f5;
+
+		.zero {
+			position: relative;
+			flex-grow: 1;
+
+			.one {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				display: flex;
+				justify-content: space-between;
+				padding: 2vw;
+				border-bottom: 2px dashed var(--fFB1Color);
+
+				.one_1 {
+					width: 8vw;
+					text-align: center;
+					padding: 3vw 0 0;
+				}
+
+				.one_2 {
+					width: 86vw;
+
+					.name {
+						font-size: 16px;
+						margin: 0 0 1vw 0;
+
+						text {
+							padding: 0 0 0 2vw;
+						}
+					}
+
+					.address {
+						font-size: 14px;
+						color: #858585;
+
+						text {
+							padding: 0 0 0 2vw;
+						}
+					}
+				}
+			}
+
+			.two {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				padding: 2vw;
+
+				.two_0 {
+					text-align: right;
+					color: var(--fFB1Color);
+				}
+
+				.two_1 {
+					display: flex;
+					flex-direction: column;
+
+					.list {
+						margin: 0 0 1vw 0;
+
+						.list_1 {
+							font-size: 16px;
+							margin: 0 0 1vw 0;
+
+							text:last-child {
+								padding: 0 0 0 2vw;
+							}
+						}
+
+						.list_2 {
+							display: flex;
+							flex-direction: column;
+
+							.goods {
+								border-bottom: 1px dashed #f1f1f1;
+								padding: 2vw 0;
+
+								.goods_1 {
+									display: flex;
+
+									.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);
+										}
+
+										.other {
+											display: flex;
+											padding: 1vw 0 0 0;
+										}
+									}
+
+									.goodsother {
+										width: 15vw;
+										text-align: right;
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+
+			.thr {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				padding: 0 2vw;
+
+				.thr_1 {
+					margin: 2vw 0;
+					font-size: 15px;
+					display: flex;
+					justify-content: space-between;
+				}
+
+				.thr_1:last-child {
+					text:last-child {
+						color: var(--fFB1Color);
+					}
+				}
+			}
+
+			.four {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				padding: 0 2vw;
+
+				.four_1 {
+					margin: 2vw 0;
+					font-size: 15px;
+					display: flex;
+					justify-content: space-between;
+				}
+			}
+		}
+
+		.zero_1 {
+			background-color: white;
+			width: 96vw;
+			padding: 4vw 2vw;
+			font-size: 16px;
+
+			text:last-child {
+				color: var(--fFB1Color);
+				padding: 0 0 0 2vw;
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+</style>