Преглед изворни кода

联调订单详情、协商记录详情页;
团餐设置优化获取数据的逻辑;

郭鹏飞 пре 10 месеци
родитељ
комит
c1eb8b3f52

+ 14 - 11
pages/groupMeal/orders/order-blist.vue

@@ -49,14 +49,15 @@
 								<u-icon name="map" color="#2979ff" size="36"></u-icon>
 								<text>导航</text>
 							</view> -->
-							<view :class="['refund-status', `status-${group.orderStatus}`]" v-if="currentStatusTab == 2">
+							<view :class="['refund-status', `refund-status-${group.orderStatus}`]" v-if="0">
 								{{ getRefundStatusText(group.orderStatus) }}
 							</view>
 						</view>
 						<view v-for="(item, si) in group.orderChildren" :key="si" @click="onClick(item)">
 							<view class="pickup-info">
 								<text>取餐号:{{ item.mealNumber }}</text>
-								<text :class="['status', `status-${item.orderStatus}`]">{{ getStatusText(item.orderStatus) }}</text>
+								<text :class="['status', `status-${item.orderStatus}`]" v-if="currentStatusTab != 2">{{ getStatusText(item.orderStatus) }}</text>
+								<text :class="['status', `status-${item.orderStatus}`]" v-if="currentStatusTab == 2">{{ item.orderStatusName }}</text>
 							</view>
 							<view class="order-item">
 								<u-image width="120rpx" height="120rpx" border-radius="12rpx" :src="item.productImage && `${$config.apiUrl}/${item.productImage.split(',')[0]}`" mode="aspectFill"></u-image>
@@ -145,15 +146,17 @@ export default {
 			});
 		},
 		onClick(item) {
-			let params = {
-				packageId: item.packageId,
-				userOrderId: item.userOrderId,
-				hostOrderId: item.hostOrderId,
-			};
-			let str = this.$u.queryParams(params);
-			uni.navigateTo({
-				url: `/pages/groupMeal/orders/order-details${str}`
-			});
+			if (this.currentStatusTab == 2) {
+				let params = {
+					packageId: item.packageId,
+					userOrderId: item.userOrderId,
+					hostOrderId: item.hostOrderId,
+				};
+				let str = this.$u.queryParams(params);
+				uni.navigateTo({
+					url: `/pages/groupMeal/orders/order-details${str}`
+				});
+			}
 		}
 	}
 };

+ 27 - 65
pages/groupMeal/orders/order-details.vue

@@ -5,22 +5,27 @@
 		<view class="content">
 			<view class="status">
 				<view class="status_title">
-					{{ product.state }} <text v-if="product.differenceMinutes > 0">, 剩余</text>
+					{{ product.orderStatusName }} <text v-if="product.differenceMinutes > 0">, 剩余</text>
 					<u-count-down :show-days="false" font-size="36rpx" :timestamp="product.differenceMinutes * 60"
-						v-if="product.differenceMinutes > 0 && product.state == '待支付'" @end="getDetail"></u-count-down>
+						v-if="product.differenceMinutes > 0 && product.fundStatus == '待支付'" @end="getDetail"
+					></u-count-down>
 					<!-- <text>¥{{product.costPrice}}</text> -->
 				</view>
-				<view class="span" v-if="product.state == '待支付'">
-					订单已取消
+				<!-- 退款中 -->
+				<view class="span" v-if="product.fundStatus == 2">
+					商家同意退款,处理时间:{{ product.refundTime }}
 				</view>
-				<view class="span" v-if="product.state == '待使用'">
-					等待客户到店核销
+				<!-- 退款失败 -->
+				<view class="span" v-else-if="product.fundStatus == 3">
+					商家拒绝退款,处理时间:{{ product.refundTime }}
 				</view>
-				<view class="span" v-if="product.state == '已完成'">
-					客户已到店核销
+				<!-- 退款成功 -->
+				<view class="span" v-else-if="product.fundStatus == 1">
+					退款金额于 {{ product.refundTime }} 退回原账户
 				</view>
-				<view class="span" v-if="product.state == '已失效'">
-					该订单已失效
+				<!-- 退款申请 -->
+				<view class="span" v-else>
+					申请时间 {{ product.refundTime }}
 				</view>
 			</view>
 			<view class="refund" @click="onPopupOpen" v-if="product.refundType == 1">
@@ -42,7 +47,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="product" v-if="product.categoryId == categoryId">
+			<view class="product" v-if="0">
 				<view class="title">商品信息</view>
 				<ListExpand :items="product.productsLinkCategorySpecItems">
 					<template v-slot:="{ items }">
@@ -64,7 +69,7 @@
 					</template>
 				</ListExpand>
 
-				<view class="finnal-price" v-if="product.categoryId == categoryId">
+				<view class="finnal-price">
 					<span style="font-size: 22rpx;color: #FD4912;margin-right: 10rpx;">已优惠{{ product.couponPrice
 						}}</span>
 					<span style="font-size: 26rpx;color: #FD4912;">
@@ -100,15 +105,11 @@
 				</view>
 				<view class="data">
 					<text>下单时间:</text>
-					{{ product.buyTime ? product.buyTime : '--' }}
+					{{ product.orderDate ? product.orderDate : '--' }}
 				</view>
 				<view class="data">
 					<text>付款时间:</text>
-					{{ product.payTime ? product.payTime : '--' }}
-				</view>
-				<view class="data">
-					<text>使用时间:</text>
-					{{ product.useTime ? product.useTime : '--' }}
+					{{ product.paymentTime ? product.paymentTime : '--' }}
 				</view>
 			</view>
 		</view>
@@ -149,35 +150,6 @@
 				</view>
 			</view>
 		</u-popup>
-		<!-- <view class="popup" v-if="isShow">
-			<view class="content">
-				<view class="title">
-					<text>退款去向详情</text>
-					<image src="/static/index/cut.png" alt="" @click="onPopupOpen" />
-				</view>
-				<view class="detail">
-					<view class="amount">
-						实退金额
-						<view class="money">
-							<text>¥</text>228.3
-						</view>
-					</view>
-					<view class="text">
-						退款已成功到账
-					</view>
-					<view class="fund">
-						实退金额
-						<text>¥228.3</text>
-					</view>
-					<view class="card">
-						退回(建设银行借记卡8009),退款单号为12523726342632478326483247382
-					</view>
-					<view class="card">
-						2025/12/30 12:20:47
-					</view>
-				</view>
-			</view>
-		</view> -->
 	</view>
 </template>
 
@@ -190,17 +162,7 @@ export default {
 	data() {
 		return {
 			query: {},
-			product: {
-				state: '待支付',
-				differenceMinutes: 1000,
-				refundType: 1,
-				productName: '一次普通洗车兑换服务代金券(限7座以下的轿车使用)',
-				costPrice: 101,
-				orderPrice: 100.55,
-				categoryId: 1945013773786701826,
-				productsLinkCategorySpecItems: [{}, {}, {}, {}, {}]
-			},
-			categoryId: 1945013773786701826,
+			product: {},
 			isShow: false,
 		}
 	},
@@ -216,21 +178,21 @@ export default {
 				}
 			})
 		},
+		// 协商历史
+		goRecord() {
+			let str = this.$u.queryParams(this.query);
+			uni.navigateTo({
+				url: `/pages/groupMeal/orders/refund${str}`
+			});
+		},
 		// 获取退款去向
 		getRefund() {
 			this.$http.get("/app/order/locaOrder/refundDestination?reOrderId=" + this.orderNo).then(res => {
 				if (res.data.code == 200) {
 					console.log(res)
-					// this.list = res.data.result
 				}
 			})
 		},
-		// 协商历史
-		goRecord() {
-			uni.navigateTo({
-				url: '/pages/order/record?orderId=' + this.product.orderId
-			})
-		},
 		// popup
 		onPopupOpen() {
 			this.isShow = true;

+ 300 - 299
pages/groupMeal/orders/refund.vue

@@ -2,65 +2,80 @@
 	<view class="record">
 		<u-navbar title="协商记录" :autoBack="true" :placeholder="true" :border-bottom="true"></u-navbar>
 		<view class="product">
-			<view class="img">
-				<image :src="list.productImage" mode=""></image>
+			<view class="left">
+				<image :src="data.productImage && `${$config.apiUrl}/${data.productImage.split(',')[0]}`" mode=""></image>
 			</view>
-			<view class="name">
-				{{list.productName}}
-				<view class="price">
-					退款金额:{{list.orderPrice}}
+			<view class="right">
+				<view>
+					<view class="name">{{data.packageName}}</view>
+					<view class="desc">{{data.dishName}}</view>
+				</view>
+				<view class="line">
+					<view class="num">1份</view>
+					<view class="price">¥{{data.price}}</view>
 				</view>
 			</view>
 		</view>
 		<view class="history">
-			<view class="client"  v-for="(item, index) in list.afterSaleReasonVo" :key="index">
+			<view class="client">
 				<view class="title">
-					<view class="img" v-if="item.refundType == 0">
-						<image :src="item.userAvatar" alt="" />
-					</view>
-					<view class="img" v-else>
-						<image :src="item.logo" alt="" />
+					<view class="img">
+						<image :src="data.userAvatar" alt="" />
 					</view>
-					<view class="message"  v-if="item.refundType == 0">
-						{{item.nickName}}<br />
-						<span>{{item.createTime}}</span>
-					</view>
-					<view class="message" v-else>
-						{{item.corporateName}}<br />
-						<span>{{item.rejectionTime}}</span>
+					<view class="message">
+						<text>{{data.nickName}}</text>
+						<text class="time">申请售后</text>
 					</view>
 				</view>
-				<!-- 用户提交 -->
-				<view class="" v-if="item.refundType == 0">
+				<view class="">
+					<view class="information">
+						退货数量:1份
+					</view>
 					<view class="information">
-						退货金额:¥ {{item.refundPrice}}
+						退货金额:¥{{data.price}}
 					</view>
 					<view class="information">
-						联系方式:{{item.phone}}
+						联系人:{{data.linkName}}
 					</view>
 					<view class="information">
-						申请原因:{{item.reason}}
+						联系方式:{{data.phone}}
 					</view>
 					<view class="information">
-						补充说明:{{item.reasonReasonExplain}}
+						申请原因:{{data.reason}}
+					</view>
+				</view>
+				<view class="request" v-if="data.fundStatus == 2">
+					<view class="btn" @click="onSubmit(0)">拒绝</view>
+					<view class="btn" @click="onSubmit(1)">同意</view>
+				</view>
+			</view>
+			<view class="client" v-if="data.refuseReason">
+				<view class="title">
+					<view class="message">
+						<text>商家拒绝退款</text>
+						<text class="time">{{ data.refundTime }}</text>
 					</view>
 				</view>
-				<!-- 商家拒绝 -->
-				<view class="" v-if="item.refundType == 1">
-					<view class="information" >
-						拒绝原因:{{item.refuseReason}}
+				<view class="">
+					<view class="information">
+						拒绝原因:{{data.refuseReason}}
 					</view>
 					<view class="information">
-						补充说明:{{item.refuseReasonExplain}}
+						补充说明:{{data.refuseReasonExplain}}
+					</view>
+				</view>
+			</view>
+			<view class="client" v-if="data.fundStatus == 1">
+				<view class="title">
+					<view class="message">
+						<text>商家同意退款</text>
+						<text class="time">{{ data.refundTime }}</text>
 					</view>
 				</view>
-				<!-- 商家同意 -->
-				<!-- <view class="information" v-if="item.refundType == 0">
-					您已同意退货退款,平台会将退款原路退回。
-				</view> -->
-				<view class="request" v-if="item.auditType == 0">
-					<view class="btn" @click="reject(item)">拒绝</view>
-					<view class="btn" @click="agree(item)">同意</view>
+				<view class="">
+					<view class="information">
+						您已同意退货退款,平台会将退款原路退回。
+					</view>
 				</view>
 			</view>
 		</view>
@@ -69,15 +84,14 @@
 			<view class="content">
 				<view class="title">
 					<span>拒绝原因 </span>
-					<image src="/static/index/cut.png" alt="" @click="cutPopup" />
+					<image src="/static/index/cut.png" alt="" @click="onClose" />
 				</view>
 				<view class="popup_title">
 					拒绝原因
 				</view>
-				<view class="item" v-for="(item,index) in reasonList" :key="index" @click="selectReason(item,index)">
+				<view class="item" v-for="(item, index) in reasonList" :key="index" @click="onSelect(item, index)">
 					{{item.text}}
-					<image v-if="item.check" src="/static/product/select.png" mode=""></image>
-					<image v-else src="/static/product/round.png" mode=""></image>
+					<image :src="`/static/product/${item.check ? 'select' : 'round'}.png`" mode=""></image>
 				</view>
 				<view class="popup_title">
 					补充说明(选填)
@@ -87,10 +101,10 @@
 					</view>
 				</view>
 				<view class="submit">
-					<view class="cancel_btn" @click="cutPopup">
+					<view class="cancel_btn" @click="onClose">
 						取消
 					</view>
-					<view class="submit_btn" @click="refusalRefund">
+					<view class="submit_btn" @click="onRefund">
 						确定
 					</view>
 				</view>
@@ -103,17 +117,8 @@
 export default {
 	data() {
 		return {
-			list: {
-				productImage: '/static/banner/banner1.png',
-				productName: 'productName',
-				orderPrice: 'orderPrice',
-				afterSaleReasonVo: [
-					{refundType: 0, auditType: 0, nickName: 'nickName', createTime: 'createTime', corporateName: 'corporateName', rejectionTime: 'rejectionTime'},
-					{refundType: 0, nickName: 'nickName', createTime: 'createTime', corporateName: 'corporateName', rejectionTime: 'rejectionTime'},
-					{refundType: 1, nickName: 'nickName', createTime: 'createTime', corporateName: 'corporateName', rejectionTime: 'rejectionTime'},
-				]
-			},
-			orderNo: '',
+			data: {},
+			query: {},
 			reasonList: [{
 					name: '商品已使用',
 					check: false,
@@ -125,96 +130,86 @@ export default {
 			],
 			isRefuse: false,
 			rejectData: {
-				id: '',
-				reOrderId: '',
 				refuseReason: '',
 				refuseReasonExplain: ''
 			}
 		}
 	},
 	mounted() {
-		// this.getRecord()
-		// this.getCodeList()
+		// 订单状态 0 待支付 1 待成团 2 已成团 3 已出餐 4 已送达 5 已取消 6 售后
 	},
 	onLoad(query) {
-		this.orderNo = query.orderId;
+		this.query = query;
+		this.getData();
+		this.getCodeList();
 	},
 	methods: {
-		//返回
-		back() {
-			uni.navigateBack({
-				delta: 1
+		getData() {
+			this.$http.post("/groupmeal/merchantPackageOrder/refundDetails", this.query).then(res => {
+				if (res.data.code == 200) {
+					this.data = res.data.result;
+				}
 			});
 		},
-		getRecord() {
-			let data = {
-				orderNo: this.orderNo
-			}
-			this.$http.get("/app/order/locaOrder/afterSaleDetails?orderNo=" + this.orderNo).then(res => {
-				if (res.data.code == 200) {
-					this.list = res.data.result
+		getCodeList() {
+			this.$http.get('/sys/api/getManyDictItems?dictCodeList=reason_refusal').then(res => {
+				if (res.statusCode == 200) {
+					this.reasonList = res.data.reason_refusal.map(item => ({
+						...item,
+						check: false
+					}))
 				}
 			})
 		},
-		selectReason(item, index) {
-			console.log(item)
+		// 选择拒绝原因
+		onSelect(item, index) {
 			this.reasonList.forEach(reason => {
 				reason.check = false;
 			});
-			this.reasonList[index].check = true
-			this.rejectData.refuseReason = item.value
-		},
-		cutPopup() {
-			this.isRefuse = false
+			this.reasonList[index].check = true;
+			this.rejectData.refuseReason = item.value;
 		},
-		reject(item) {
-			console.log(item)
-			
-			this.isRefuse = true
-			this.rejectData.id = item.id
-			this.rejectData.reOrderId = item.reOrderId
-		},
-		//提交拒绝
-		refusalRefund() {
-			if(this.rejectData.refuseReason==''){
+		// 拒绝原因
+		onRefund() {
+			if (this.rejectData.refuseReason == '') {
 				uni.showToast({
 					icon: 'none',
 					title: '选择拒绝原因'
-				})
-				return
-			}else{
-				this.$http.post("/app/order/locaOrder/refusalRefund", this.rejectData).then(res => {
+				});
+				return;
+			} else {
+				let params = {
+					...this.query,
+					...this.rejectData
+				}
+				console.log(params)
+				this.$http.post('/groupmeal/merchantPackageOrder/refundRefuse', params).then(res => {
 					if (res.data.code == 200) {
-						console.log(res)
 						uni.showToast({
 							icon: 'none',
 							title: '拒绝成功'
 						})
-						this.isRefuse = false
-						this.getRecord()
-						// this.list = res.data.result
+						this.rejectData = {};
+						this.onClose();
+						this.getData();
 					}
-				})
+				});
 			}
-
 		},
-		getCodeList() {
-			this.$http.get("/sys/api/getManyDictItems?dictCodeList=" + 'reason_refusal').then(res => {
-				if (res.statusCode == 200) {
-					// 
-					res.data.reason_refusal.forEach(item => {
-						item.check = false
-					})
-					this.reasonList = res.data.reason_refusal
-				}
-			})
+		onClose() {
+			this.isRefuse = false;
 		},
-		// 同意退款
-		agree(item){
-			let data = {
-				reOrderId:this.orderNo
+		// 操作
+		onSubmit(k) {
+			if (!k) {
+				this.isRefuse = true;
+				// this.rejectData.reOrderId = this.data.orderId;
+				return;
 			}
-			this.$http.post("/app/order/locaOrder/agreeRefund",data).then(res => {
+			let params = {
+				...this.query
+			}
+			this.$http.post('/groupmeal/merchantPackageOrder/refundAgree', params).then(res => {
 				if (res.statusCode == 200) {
 					uni.showToast({
 						icon: 'none',
@@ -223,248 +218,254 @@ export default {
 					this.getRecord()
 				}
 			})
-			
-		}
+		},
 	}
 }
 </script>
 
 <style lang="scss" scoped>
-	.record {
-		width: 100vw;
-		height: 100vh;
-		background: #F7F8FC;
+.record {
+	width: 100vw;
+	height: 100vh;
+	background: #F7F8FC;
+	display: flex;
+	flex-direction: column;
+
+	.product {
 		display: flex;
-		flex-direction: column;
-
-		.product {
-			display: flex;
-			border-radius: 16rpx;
-			padding: 20rpx 24rpx;
-			background-color: #FFFFFF;
-			border-top: 1px solid #eeeeee;
-
-			.img {
+		border-radius: 16rpx;
+		padding: 20rpx 24rpx;
+		background-color: #FFFFFF;
+		border-top: 1rpx solid #eeeeee;
+
+		.left {
+			width: 132rpx;
+			height: 132rpx;
+			margin-right: 16rpx;
+			border-radius: 12rpx;
+			overflow: hidden;
+
+			image {
 				width: 132rpx;
 				height: 132rpx;
-				border-radius: 12rpx;
-				overflow: hidden;
-				margin-right: 16rpx;
-
-				image {
-					width: 132rpx;
-					height: 132rpx;
-				}
 			}
+		}
 
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
 			.name {
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-				justify-content: space-between;
 				font-size: 28rpx;
 				color: #000000;
-				line-height: 35rpx;
-
+			}
+			.desc {
+				font-size: 22rpx;
+				color: #8A91A8;
+			}
+			.line {
+				display: flex;
+				align-items: baseline;
+				justify-content: space-between;
+				.num {
+					font-size: 22rpx;
+					color: #8A91A8;
+				}
 				.price {
 					font-size: 26rpx;
-					color: #666666;
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-
-					span {
-						color: #666666;
-					}
+					color: #FD4912;
 				}
 			}
 		}
+	}
 
-		.history {
-			flex: 1;
-			overflow-y: auto;
-			padding: 0px 24rpx;
-			margin-top: 18rpx;
+	.history {
+		flex: 1;
+		overflow-y: auto;
+		padding: 0px 24rpx;
+		margin-top: 18rpx;
 
-			.client {
-				background-color: #FFFFFF;
-				padding: 20rpx 16rpx;
-				box-shadow: 0px 2rpx 8rpx 0px rgba(214, 225, 237, 0.1);
-				border-radius: 16rpx;
-				margin-bottom: 20rpx;
+		.client {
+			background-color: #FFFFFF;
+			padding: 20rpx;
+			box-shadow: 0px 2rpx 8rpx 0px rgba(214, 225, 237, 0.1);
+			border-radius: 16rpx;
+			margin-bottom: 20rpx;
 
-				.title {
-					display: flex;
-					border-bottom: 1px solid #EEEEEE;
-					padding-bottom: 16rpx;
-					margin-bottom: 16rpx;
+			.title {
+				margin-bottom: 16rpx;
+				padding-bottom: 16rpx;
+				display: flex;
+				border-bottom: 1rpx solid #EEEEEE;
 
-					.img {
+				.img {
+					width: 80rpx;
+					height: 80rpx;
+					margin-right: 12rpx;
+					border-radius: 8rpx;
+					overflow: hidden;
+
+					image {
 						width: 80rpx;
 						height: 80rpx;
-						margin-right: 12rpx;
-						border-radius: 8rpx;
-						overflow: hidden;
-
-						image {
-							width: 80rpx;
-							height: 80rpx;
-						}
-					}
-
-					.message {
-						display: flex;
-						flex-direction: column;
-						justify-content: space-between;
-						font-size: 28rpx;
-						color: #000000;
-
-						span {
-							font-size: 24rpx;
-							color: #999999;
-						}
+						background: #eee;
 					}
 				}
 
-				.information {
-					font-size: 26rpx;
-					color: #333333;
-					margin-bottom: 10rpx;
-					word-wrap: break-word;
-				}
-
-				.request {
+				.message {
 					display: flex;
-					align-items: center;
-					justify-content: end;
-					margin-top: 16rpx;
+					flex-direction: column;
+					justify-content: space-between;
+					font-size: 28rpx;
+					color: #000000;
 
-					.btn {
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						width: 112rpx;
-						height: 47rpx;
-						border-radius: 47rpx;
-						border: 1px solid #449AFF;
+					.time {
 						font-size: 24rpx;
-						color: #449AFF;
-						margin-left: 24rpx;
+						color: #999999;
 					}
 				}
 			}
-		}
 
-		.popup {
-			width: 100vw;
-			height: 100vh;
-			position: fixed;
-			top: 0;
-			left: 0;
-			background: rgba(0, 0, 0, 0.4);
+			.information {
+				font-size: 26rpx;
+				color: #333333;
+				margin-bottom: 10rpx;
+				word-wrap: break-word;
+			}
 
-			.content {
-				width: 100%;
-				background: #FFFFFF;
-				border-radius: 20rpx 20rpx 0rpx 0px;
-				padding: 20rpx 24rpx;
-				padding-bottom: 16rpx;
-				position: absolute;
-				bottom: 0;
-				left: 0;
+			.request {
+				display: flex;
+				align-items: center;
+				justify-content: end;
+				margin-top: 16rpx;
 
-				.title {
+				.btn {
 					display: flex;
 					align-items: center;
 					justify-content: center;
-					position: relative;
-					border-bottom: 1px solid #EEEEEE;
-					padding-bottom: 20rpx;
-					font-weight: 600;
-
-					image {
-						width: 37rpx;
-						height: 37rpx;
-						position: absolute;
-						right: 0;
-					}
+					width: 112rpx;
+					height: 47rpx;
+					border-radius: 47rpx;
+					border: 1px solid #449AFF;
+					font-size: 24rpx;
+					color: #449AFF;
+					margin-left: 24rpx;
 				}
+			}
+		}
+	}
 
-				.popup_title {
-					font-size: 30rpx;
-					color: #333333;
-					margin-top: 20rpx;
-					font-weight: 600;
+	.popup {
+		width: 100vw;
+		height: 100vh;
+		position: fixed;
+		top: 0;
+		left: 0;
+		background: rgba(0, 0, 0, 0.4);
+
+		.content {
+			width: 100%;
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 0rpx 0px;
+			padding: 20rpx 24rpx;
+			padding-bottom: 16rpx;
+			position: absolute;
+			bottom: 0;
+			left: 0;
 
-					.input {
-						width: 100%;
-						// min-height: 196rpx;
-						margin-top: 15rpx;
-						padding: 16rpx 16rpx;
-						background: #F1F1F2;
-						border-radius: 4rpx;
-						overflow-y: auto;
-						font-weight: normal;
+			.title {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				border-bottom: 1px solid #EEEEEE;
+				padding-bottom: 20rpx;
+				font-weight: 600;
+
+				image {
+					width: 37rpx;
+					height: 37rpx;
+					position: absolute;
+					right: 0;
+				}
+			}
 
-						textarea {
-							width: 100%;
-							height: 196rpx;
-						}
+			.popup_title {
+				font-size: 30rpx;
+				color: #333333;
+				margin-top: 20rpx;
+				font-weight: 600;
+
+				.input {
+					width: 100%;
+					// min-height: 196rpx;
+					margin-top: 15rpx;
+					padding: 16rpx 16rpx;
+					background: #F1F1F2;
+					border-radius: 4rpx;
+					overflow-y: auto;
+					font-weight: normal;
+
+					textarea {
+						width: 100%;
+						height: 196rpx;
+					}
 
-						span {
-							display: block;
-							text-align: right;
-						}
+					span {
+						display: block;
+						text-align: right;
 					}
 				}
+			}
 
-				.item {
-					height: 70rpx;
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-					border-bottom: 1px solid #EEEEEE;
+			.item {
+				height: 70rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				border-bottom: 1px solid #EEEEEE;
 
-					image {
-						width: 28rpx;
-						height: 28rpx;
-					}
+				image {
+					width: 28rpx;
+					height: 28rpx;
 				}
+			}
 
-				.submit {
-					height: 112rpx;
+			.submit {
+				height: 112rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-around;
+				border-top: 1px solid #eeeeee;
+				margin-top: 20rpx;
+
+				.cancel_btn {
+					width: 324rpx;
+					height: 76rpx;
+					border-radius: 54rpx;
+					border: 1px solid #CCCCCC;
+					font-size: 28rpx;
+					color: #999999;
 					display: flex;
 					align-items: center;
-					justify-content: space-around;
-					border-top: 1px solid #eeeeee;
-					margin-top: 20rpx;
-
-					.cancel_btn {
-						width: 324rpx;
-						height: 76rpx;
-						border-radius: 54rpx;
-						border: 1px solid #CCCCCC;
-						font-size: 28rpx;
-						color: #999999;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-					}
+					justify-content: center;
+				}
 
-					.submit_btn {
-						width: 324rpx;
-						height: 76rpx;
-						border-radius: 54rpx;
-						background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
-						border: 1px solid #CCCCCC;
-						font-size: 28rpx;
-						color: #FFFFFF;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-					}
+				.submit_btn {
+					width: 324rpx;
+					height: 76rpx;
+					border-radius: 54rpx;
+					background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
+					border: 1px solid #CCCCCC;
+					font-size: 28rpx;
+					color: #FFFFFF;
+					display: flex;
+					align-items: center;
+					justify-content: center;
 				}
 			}
 		}
 	}
+}
 </style>

+ 12 - 2
pages/groupMeal/users/settings.vue

@@ -86,7 +86,6 @@ export default {
 		}
 	},
 	onLoad(query) {
-		console.log(this.$Route)
 		this.query = query;
 		if (query.isEnterprise) this.getData();
 	},
@@ -103,7 +102,18 @@ export default {
 			};
 			this.$http.get('/groupmeal/gmMerchantSettings/getByIsEnterprise', {params}).then(res => {
 				if (res.data.code === 200 && res.data.result.length > 0) {
-					this.form.mealTimes = res.data.result;
+					res.data.result.map(item => {
+						let i = this.form.mealTimes.findIndex(mitem => mitem.id === item.category);
+						if (i !== -1) {
+							this.$set(this.form.mealTimes, i, {
+								...this.form.mealTimes[i],
+								id: item.category,  
+								startTime: item.strStartTime, 
+								endTime: item.strEndTime,
+								minGroupSize: item.minGroupSize,
+							});
+						}
+					});
 				}
 			});
 		},