Jelajahi Sumber

Merge branch 'master' into master-pro

hxl13994548489 10 bulan lalu
induk
melakukan
06d37ef282

+ 62 - 6
pages/groupMeal/goods/form-step1.vue

@@ -14,7 +14,7 @@
 				</u-form-item>
 				
 				<u-form-item prop="name" label="商品名称" required borderBottom>
-					<u-input v-model="form.name" placeholder="输入商品名称" height="41" inputAlign="right"></u-input>
+					<u-input v-model="form.name" placeholder="输入商品名称" height="41" inputAlign="right"></u-input>
 				</u-form-item>
 
 				<u-form-item prop="productImage" label="商品封面图" required labelPosition="top">
@@ -48,12 +48,21 @@
 				</u-form-item>
 
 				<u-form-item prop="price" label="团餐价" required borderBottom>
-					<u-input v-model.number="form.price" type="digit" height="41" :clearable="false" placeholder="请输入团餐价" inputAlign="right"></u-input>
+					<u-input type="digit" height="41" :clearable="false" 
+						inputAlign="right"
+						placeholder="请输入团餐价" 
+						v-model.number="form.price"
+						@input="onInput($event, 'price')"
+					></u-input>
 					<text slot="right" class="input-suffix">元</text>
 				</u-form-item>
 				
-				<u-form-item prop="sellingPrice" label="售价" required :borderBottom="false">
-					<u-input v-model.number="form.sellingPrice" type="digit" height="41" :clearable="false" placeholder="商品售价" inputAlign="right"></u-input>
+				<u-form-item prop="sellingPrice" label="售价" required :borderBottom="true">
+					<u-input type="digit" height="41" :clearable="false" 
+					 	inputAlign="right" placeholder="请输入商品售价"
+						v-model.number="form.sellingPrice"
+						@input="onInput($event, 'sellingPrice')"
+					></u-input>
 					<text slot="right" class="input-suffix">元</text>
 				</u-form-item>
 			</u-form>
@@ -125,7 +134,17 @@ export default {
 						type: 'number',
 						message: '请输入团餐价格',
 						trigger: ['blur', 'change']
-					}
+					},
+					{
+						asyncValidator: (rule, value, callback) => {
+							if (this.form.sellingPrice && value > this.form.sellingPrice) {
+								callback(new Error('团餐价格不能大于商品售价'));
+							} else {
+								callback();
+							}
+						},
+						trigger: ['blur', 'change']
+					},
 				],
 				sellingPrice: [
 					{
@@ -133,7 +152,17 @@ export default {
 						type: 'number',
 						message: '请输入商品售价',
 						trigger: ['blur', 'change']
-					}
+					},
+					{
+						asyncValidator: (rule, value, callback) => {
+							if (this.form.price && value < this.form.price) {
+								callback(new Error('商品售价不能小于团餐价格'));
+							} else {
+								callback();
+							}
+						},
+						trigger: ['blur', 'change']
+					},
 				],
 				productImage: [
 					{
@@ -208,6 +237,33 @@ export default {
 			this.form.category = e.value;
 			this.form.categoryName = e.text;
 		},
+		// 价格数值处理
+		onInput(value, key) {
+			// 过滤所有非数字和非小数点的字符
+			let filtered = value.replace(/[^\d.]/g, '');
+			
+			// 处理多个小数点(只保留第一个)
+			filtered = filtered.replace(/^\./g, ''); // 移除开头的小数点(避免 ".123" 情况)
+			filtered = filtered.replace(/\.{2,}/g, '.'); // 多个小数点只保留第一个
+			
+			// 分割整数和小数部分,限制小数最多两位
+			const parts = filtered.split('.');
+			if (parts.length > 1) {
+				// 小数部分只保留前两位
+				filtered = parts[0] + '.' + (parts[1].slice(0, 2) || '');
+			}
+			
+			// 处理特殊情况(如 "000" 转为 "0",但价格允许 "0.00")
+			// 若需要严格限制整数部分首位不为0(非必须,根据业务决定):
+			// if (parts.length === 1 && filtered.length > 1 && filtered[0] === '0') {
+			//   filtered = filtered.replace(/^0+/, '0');
+			// }
+			
+			// 更新绑定值
+			this.$nextTick(() => {
+				this.form[key] = filtered;
+			});
+		},
 		// 图片处理
 		onUpload(event, type) {
 			this.fileList[type] = event;

+ 8 - 6
pages/groupMeal/goods/form-step2.vue

@@ -269,12 +269,14 @@ export default {
 						// 遍历二级菜品
 						category.items.forEach(item => {
 							// 创建新对象,只保留需要的属性
-							details.push({
-								category: category.id,
-								name: item.name,
-								price: item.price,
-								description: item.description
-							});
+							if (this.isEdited(item)) {
+								details.push({
+									category: category.id,
+									name: item.name,
+									price: item.price,
+									description: item.description
+								});
+							}
 						});
 					}
 				});

+ 62 - 17
pages/groupMeal/goods/list.vue

@@ -19,12 +19,13 @@
 					padding: '0 20rpx',
 					borderLeft: '1rpx solid #DDDDDD'
 				}"
+				v-model="queryName"
 				@search="onSearch" @custom="onSearch"
 			></u-search>
 		</view>
 
 		<!-- 一级分类Tabs -->
-		<u-tabs :list="statusTabs" 
+		<u-tabs ref="tabs" :list="statusTabs" 
 			:current="currentStatusTab" 
 			font-size="30"
 			inactive-color="#666666"
@@ -59,7 +60,6 @@
 				:style="{ paddingBottom: isManaging ? '120rpx' : '0' }"
 				:scroll-into-view="scrollIntoViewId"  
 				:scroll-with-animation="true"
-				@scroll="onScroll"  
 			>
 				<view class="goods-category-section" :id="category.scrollId" v-for="category in filteredGoods" :key="category.id">
 					<view class="category-title">{{ category.name }}</view>
@@ -75,6 +75,7 @@
 									<text class="price"><text class="unit">¥</text>{{ goods.price }}</text>
 									<text class="original-price">¥{{ goods.sellingPrice }}</text>
 								</view>
+								<view class="status" v-if="currentStatusTab == 2 && goods.reviewStatus !== 1">{{ getReviewStatus(goods.reviewStatus) }}</view>
 							</view>
 							<!-- 根据模式和状态显示不同操作 -->
 							<view class="goods-actions">
@@ -88,10 +89,11 @@
 						</view>
 					</u-checkbox-group>
 				</view>
+				<u-empty text="暂无数据" mode="list" v-if="filteredGoods.length === 0"></u-empty>
 			</scroll-view>
 		</view>
 
-		<!-- <ListScrollView ref="listScroll0" 
+		<!-- <ListScrollView ref="listScroll" 
 			:api="api"
 			:init="{
 				...initParams,
@@ -141,6 +143,8 @@ export default {
 				url: '/groupmeal/gmMerchantPackage/pageList',
 				method: 'POST',
 			},
+			// 搜索值
+			queryName: '',
 			// 是否处于批量管理模式
 			isManaging: false, 
 			// 一级分类
@@ -194,12 +198,14 @@ export default {
 			let params = {
 				// 商品状态: 0 未上架, 1 已上架
 				status: 0,
-				// 审核状态: 0 审核中, 1 已审核
+				// 审核状态: 0 审核中, 1 已审核, 2 驳回
 				// reviewStatus: 0,
+				name: this.queryName,
 			}
 			// 售卖中
 			if (this.currentStatusTab == 0) {
 				params = {
+					...params,
 					status: 1,
 					reviewStatus: 1,
 				}
@@ -207,6 +213,7 @@ export default {
 			// 审核中 
 			else if (this.currentStatusTab == 1) {
 				params = {
+					...params,
 					status: 0,
 					reviewStatus: 0,
 				}
@@ -214,24 +221,31 @@ export default {
 			// 未上架
 			else if (this.currentStatusTab == 2) {
 				params = {
+					...params,
 					status: 0,
+					// reviewStatus: 1,
 				}
 			}
 			return params;
 		}
 	},
 	onLoad() {
-		// 获取商品数据
-		this.getData();
 		// 获取餐品分类
 		this.getClassData();
 	},
+	onShow() {
+		// 获取商品数据
+		this.getData();
+	},
 	methods: {
 		// 商品数据
 		getData() {
+			uni.showLoading({
+				title: '加载中'
+			});
 			let params = {
 				pageNo: 1,
-				pageSize: 10,
+				pageSize: 100,
 				...this.initParams
 			};
 			this.$http.post('/groupmeal/gmMerchantPackage/pageList', params).then(res => {
@@ -243,6 +257,7 @@ export default {
 						}
 					});
 				}
+				uni.hideLoading();
 			});
 		},
 		// 餐品分类
@@ -251,11 +266,20 @@ export default {
 				if (res.data.code === 200) {}
 			});
 		},
+		getReviewStatus(status) {
+			// 审核状态: 0 审核中, 1 已审核, 2 驳回
+			const statusMap = {
+				0: '审核中',
+				1: '已通过',
+				2: '未通过',
+			};
+			return statusMap[status] || '';
+		},
 		// 操作模式
 		toggleManageMode() {
 			this.isManaging = !this.isManaging;
-			this.selectedGoods = []; // 切换模式时清空选择
-			this.isAllSelected = false;
+			// 切换模式时清空选择
+			this.onClearSel();
 			if (!this.isManaging) {
 				this.filteredGoods.flatMap(category => category.items.forEach(item => {
 					item.checked = false;
@@ -263,19 +287,17 @@ export default {
 			}
 		},
 		onSearch(value) {
-			this.$refs[`listScroll`].reloadList({
-				queryName: value,
-			});
+			this.getData();
 		},
 		// 主分类事件
 		onTabChange(e) {
 			this.currentStatusTab = e;
-			this.selectedGoods = []; // 切换Tab时清空选择
-			this.isAllSelected = false;
+			// 切换Tab时清空选择
+			this.onClearSel();
 			// 列表数据
 			this.getData();
 			// 切换 Tab 后,重置左侧分类高亮到第一个
-			// this.currentCategoryTab = 0; 
+			this.currentCategoryTab = 0; 
 			// this.$nextTick(() => {
 			// 	// 确保在新数据渲染后,滚动到第一个分类
 			// 	this.scrollIntoViewId = this.filteredGoods[0]?.scrollId || '';
@@ -283,12 +305,14 @@ export default {
 		},
 		// 添加商品
 		addGoods() {
+			this.isManaging = false;
 			uni.navigateTo({
 				url: '/pages/groupMeal/goods/form-step1'
 			});
 		},
 		// 编辑商品
 		editGoods(goods) {
+			this.isManaging = false;
 			uni.navigateTo({
 				url: '/pages/groupMeal/goods/form-step1?id=' + goods.id
 			});
@@ -343,7 +367,10 @@ export default {
 				this.$http.delete('/groupmeal/gmMerchantPackage/deleteBatch', {}, {
 					params: { ids: this.selectedGoods.join() }
 				}).then(res => {
-					if (res.data.code === 200) {}
+					if (res.data.code === 200) {
+						this.onClearSel();
+						this.getData();
+					}
 					this.$tip.toast(res.data.message);
 				});
 			} else {
@@ -354,11 +381,19 @@ export default {
 					ids: this.selectedGoods,
 					status: this.currentStatusTab == 2 ? 1 : 0 
 				}).then(res => {
-					if (res.data.code === 200) {}
+					if (res.data.code === 200) {
+						this.onClearSel();
+						this.getData();
+					}
 					this.$tip.toast(res.data.message);
 				});
 			}
 		},
+		// 完成某种操作后,清空数据
+		onClearSel() {
+			this.selectedGoods = []; 
+			this.isAllSelected = false;
+		},
 		// 核心功能 1: 点击左侧二级分类,右侧商品列表滚动到对应位置
 		onCategoryTabChange(index) {
 			this.currentCategoryTab = index;
@@ -560,6 +595,16 @@ export default {
 					margin-left: 10rpx;
 				}
 			}
+			.status {
+				color: #fff;
+				font-size: 24rpx;
+				padding: 5rpx 10rpx;
+				border-radius: 12rpx 0 12rpx;
+				background: #449AFF;
+				position: absolute;
+				top: 20rpx;
+				left: 0;
+			}
 		}
 		.goods-actions {
 			position: absolute;

+ 31 - 13
pages/groupMeal/orders/order-alist.vue

@@ -74,16 +74,21 @@
 									<u-checkbox :name="item.orderId" shape="circle" v-model="item.checked"></u-checkbox>
 								</view>
 							</view>
-							<view class="order-card" v-for="(eItem, ei) in item.merchantPackageOrderDTOS" :key="ei">
-								<u-image width="84rpx" height="84rpx" border-radius="12rpx" :src="eItem.productImage && `${$config.apiUrl}/${eItem.productImage.split(',')[0]}`" mode="aspectFill"></u-image>
-								<view class="order-info">
-									<view class="order-title">{{ eItem.packageName }}</view>
-									<view class="order-line">
-										<view class="leader-name">{{ eItem.dishName }}</view>
-										<view class="quantity-tag">{{ eItem.numberUserCount }}份</view>
+							
+							<ListExpand :items="item.merchantPackageOrderDTOS">
+								<template v-slot:="{ items }">
+									<view class="order-card" v-for="(eItem, ei) in items" :key="ei">
+										<u-image width="84rpx" height="84rpx" border-radius="12rpx" :src="eItem.productImage && `${$config.apiUrl}/${eItem.productImage.split(',')[0]}`" mode="aspectFill"></u-image>
+										<view class="order-info">
+											<view class="order-title">{{ eItem.packageName }}</view>
+											<view class="order-line">
+												<view class="leader-name">{{ eItem.dishName }}</view>
+												<view class="quantity-tag">{{ eItem.numberUserCount }}份</view>
+											</view>
+										</view>
 									</view>
-								</view>
-							</view>
+								</template>
+							</ListExpand>
 						</view>
 					</u-checkbox-group>
 				</template>
@@ -113,11 +118,13 @@
 <script>
 import Modal from '@/components/modal/index.vue';
 import Tabbar from '@/pages/groupMeal/tabbar/index.vue';
+import ListExpand from '@/components/list-scroll-view/list-expand.vue';
 import ListScrollView from '@/components/list-scroll-view/index.vue';
 export default {
 	components: {
 		Modal,
 		Tabbar,
+		ListExpand,
 		ListScrollView
 	},
 	data() {
@@ -174,14 +181,12 @@ export default {
 		},
 		toggleManageMode() {
 			this.isManaging = !this.isManaging;
-			this.selectedOrders = [];
-			this.isAllSelected = false;
+			this.onClearSel();
 		},
 		onTabChange(e) {
 			this.currentStatusTab = e;
 			// 清除已选数据
-			this.selectedOrders = [];
-			this.isAllSelected = false;
+			this.onClearSel();
 			// 关闭批量
 			this.isManaging = false;
 			// 触发更新
@@ -210,6 +215,11 @@ export default {
 				item.checked = e.value;
 			});
 		},
+		// 完成某种操作后,清空数据
+		onClearSel() {
+			this.selectedOrders = []; 
+			this.isAllSelected = false;
+		},
 		handleBatchAction() {
 			if (this.selectedOrders.length === 0) {
 				this.$tip.toast("请先选择订单")
@@ -223,6 +233,13 @@ export default {
 				this.$http.get('/groupmeal/merchantPackageOrder/orderReady', {params}).then(res => {
 					if (res.data.code === 200) {
 						this.$tip.success(res.data.message);
+						// 触发更新
+						this.isManaging = false;
+						this.currentStatusTab = 1;
+						this.onClearSel();
+						this.$nextTick(() => {
+							this.$refs.listScroll.downCallback();
+						});
 					} else {
 						this.$tip.error(res.data.message);
 					}
@@ -352,6 +369,7 @@ export default {
 					display: flex;
 					align-items: center;
 					.leader-name {
+						flex: 1;
 						font-weight: 400;
 						font-size: 22rpx;
 						color: #8A91A8;

+ 15 - 12
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>
@@ -65,7 +66,7 @@
 									<view class="item-title">{{ item.packageName }}</view>
 									<view class="item-desc">{{ item.dishName }}</view>
 									<view class="item-line">
-										<view class="item-quantity">数量:{{ item.packageNumber }}</view>
+										<view class="item-quantity">数量:{{ item.packageNumber || 1 }}</view>
 										<view class="item-price">成团价:<text class="price-value"><text class="unit">¥</text>{{ item.price }}</text></view>
 									</view>
 								</view>
@@ -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;

+ 304 - 303
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>
-					<view class="message"  v-if="item.refundType == 0">
-						{{item.nickName}}<br />
-						<span>{{item.createTime}}</span>
+					<view class="img">
+						<image :src="data.userAvatar" alt="" />
 					</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="" v-if="item.refundType == 1">
-					<view class="information" >
-						拒绝原因:{{item.refuseReason}}
+				<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="">
 					<view class="information">
-						补充说明:{{item.refuseReasonExplain}}
+						拒绝原因:{{ data.refuseReason && reasonList.find(item => item.value == data.refuseReason).label }}
+					</view>
+					<view class="information">
+						补充说明:{{ 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,18 +117,10 @@
 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: '',
-			reasonList: [{
+			data: {},
+			query: {},
+			reasonList: [
+				{
 					name: '商品已使用',
 					check: false,
 				},
@@ -125,346 +131,341 @@ 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
+				}
+				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 => {
-				if (res.statusCode == 200) {
+			let params = {
+				...this.query
+			}
+			this.$http.post('/groupmeal/merchantPackageOrder/refundAgree', params).then(res => {
+				if (res.data.code == 200) {
 					uni.showToast({
 						icon: 'none',
 						title: '商家已同意退款'
-					})
-					this.getRecord()
+					});
+					this.getData();
 				}
 			})
-			
-		}
+		},
 	}
 }
 </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;
+			box-shadow: 0px 2rpx 8rpx 0px rgba(214, 225, 237, 0.1);
+			border-radius: 16rpx;
+			margin-bottom: 20rpx;
 
-			.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;
+			.title {
+				margin-bottom: 16rpx;
+				padding-bottom: 16rpx;
+				display: flex;
+				border-bottom: 1rpx solid #EEEEEE;
 
-				.title {
-					display: flex;
-					border-bottom: 1px solid #EEEEEE;
-					padding-bottom: 16rpx;
-					margin-bottom: 16rpx;
+				.img {
+					width: 80rpx;
+					height: 80rpx;
+					margin-right: 12rpx;
+					border-radius: 8rpx;
+					overflow: hidden;
 
-					.img {
+					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 {
+		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;
 
-				.popup_title {
-					font-size: 30rpx;
-					color: #333333;
-					margin-top: 20rpx;
-					font-weight: 600;
+			.title {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				border-bottom: 1px solid #EEEEEE;
+				padding-bottom: 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;
+				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>

+ 35 - 18
pages/groupMeal/users/settings.vue

@@ -3,23 +3,25 @@
 		<u-navbar title="团餐设置" :autoBack="true" :placeholder="true" :border-bottom="false"></u-navbar>
 		
 		<u-form :model="form" :rules="rules" ref="formRef" labelPosition="left" labelWidth="auto">
-			<view class="meal-section" v-for="(meal, index) in form.mealTimes" :key="index">
-				<view class="section-title">{{ meal.name }}</view>
+			<template v-for="(meal, index) in form.mealTimes">
+				<view class="meal-section" :key="index" v-if="isGroup(meal)">
+					<view class="section-title">{{ meal.name }}</view>
+					
+					<u-form-item :label="`拼团最低起送量`" :prop="`mealTimes.${index}.minGroupSize`" borderBottom :required="isEdited(index)">
+						<u-input v-model="meal.minGroupSize" type="number" placeholder="输入数量" height="41" inputAlign="right"></u-input>
+					</u-form-item>
+					
+					<u-form-item :label="`开团时间`" :prop="`mealTimes.${index}.startTime`" borderBottom :required="isEdited(index)">
+						<u-input v-model="meal.startTime" :clearable="false" placeholder="去设置" height="41" inputAlign="right" @click="openTimePicker(index, 'startTime')"></u-input>
+						<u-icon slot="right" name="arrow-right"></u-icon>
+					</u-form-item>
 				
-				<u-form-item :label="`拼团最低起送量`" :prop="`mealTimes.${index}.minGroupSize`" borderBottom :required="isEdited(index)">
-					<u-input v-model="meal.minGroupSize" type="number" placeholder="输入数量" height="41" inputAlign="right"></u-input>
-				</u-form-item>
-				
-				<u-form-item :label="`开团时间`" :prop="`mealTimes.${index}.startTime`" borderBottom :required="isEdited(index)">
-					<u-input v-model="meal.startTime" :clearable="false" placeholder="去设置" height="41" inputAlign="right" @click="openTimePicker(index, 'startTime')"></u-input>
-					<u-icon slot="right" name="arrow-right"></u-icon>
-				</u-form-item>
-
-				<u-form-item :label="`闭团时间`" :prop="`mealTimes.${index}.endTime`" @click="openTimePicker(index, 'endTime')" :required="isEdited(index)">
-					<u-input v-model="meal.endTime" :clearable="false" placeholder="去设置" height="41" inputAlign="right" @click="openTimePicker(index, 'endTime')"></u-input>
-					<u-icon slot="right" name="arrow-right"></u-icon>
-				</u-form-item>
-			</view>
+					<u-form-item :label="`闭团时间`" :prop="`mealTimes.${index}.endTime`" @click="openTimePicker(index, 'endTime')" :required="isEdited(index)">
+						<u-input v-model="meal.endTime" :clearable="false" placeholder="去设置" height="41" inputAlign="right" @click="openTimePicker(index, 'endTime')"></u-input>
+						<u-icon slot="right" name="arrow-right"></u-icon>
+					</u-form-item>
+				</view>
+			</template>
 		</u-form>
 
 		<view class="footer-bar">
@@ -86,7 +88,6 @@ export default {
 		}
 	},
 	onLoad(query) {
-		console.log(this.$Route)
 		this.query = query;
 		if (query.isEnterprise) this.getData();
 	},
@@ -103,10 +104,26 @@ 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 + '',
+							});
+						}
+					});
 				}
 			});
 		},
+		isGroup(e) {
+			let flag = true;
+			if (this.query.isEnterprise == 2 && e.id != 2) flag = false;
+			return flag;
+		},
 		// 判断一个餐次区块是否被编辑过
 		isEdited(index) {
 			const meal = this.form.mealTimes[index];

+ 8 - 4
pages/groupMeal/users/team-member.vue

@@ -16,13 +16,14 @@
 				<ListScrollView 
 					ref="listScroll"
 					:api="api"
+					:noPage="true"
 				>
 					<template v-slot:list="{ data }">
-						<view class="user-item" v-for="(item, i) in 10" :key="i" @click="onClick">
+						<view class="user-item" v-for="(item, i) in data" :key="i" @click="onClick">
 							<u-avatar size="80" src="/static/product/user.png" />
 							<view class="user-info">
-								<view class="name">{{ item.nickName || '' }}</view>
-								<view class="phone">{{ item.phone || '' }}</view>
+								<view class="name">{{ item.headName || '' }}</view>
+								<view class="phone">{{ item.headPhone || '' }}</view>
 							</view>
 						</view>
 					</template>
@@ -40,7 +41,10 @@ export default {
 	},
     data() {
         return {
-			api: null,
+			api: {
+				url: '/groupmeal/gmMerchantHead/regimentalCommander',
+				method: 'GET',
+			},
         };
     },
     onLoad() {

+ 21 - 17
pages/order/index.vue

@@ -65,19 +65,22 @@
 					<view class="id_left">
 						订单编号:{{item.orderId}}
 					</view>
-					<view class="id_right"  v-if="item.refundType ==0">
+					<view class="id_right" v-if="item.refundType ==0">
 						未退款
 					</view>
-					<view class="id_right"  v-if="item.refundType ==1">
-						退款
+					<view class="id_right" v-if="item.refundType ==1">
+						退款成功
 					</view>
-					<view class="id_right"  v-if="item.refundType ==2">
+					<view class="id_right" v-if="item.refundType ==2">
 						退款中
 					</view>
-					<view class="id_right"  v-if="item.refundType ==3">
+					<view class="id_right" v-if="item.refundType ==3">
 						退款失败
 					</view>
-					<view class="id_right"  v-if="item.refundType ==99">
+					<view class="id_right" v-if="item.refundType ==4">
+						拒绝退款
+					</view>
+					<view class="id_right" v-if="item.refundType ==99">
 						挂起
 					</view>
 				</view>
@@ -125,7 +128,8 @@
 							</view>
 						</view>
 					</view>
-					<view class="is_show" @click.stop="unfold(index)" v-if="item.orderLinkCategorySpecItems&&item.orderLinkCategorySpecItems.length > 2">
+					<view class="is_show" @click.stop="unfold(index)"
+						v-if="item.orderLinkCategorySpecItems&&item.orderLinkCategorySpecItems.length > 2">
 						{{item.isShow?'收起查看':'展开查看'}}
 						<image src="/static/order/hidden.png" mode="" v-if="item.isShow"></image>
 						<image src="/static/order/show.png" mode="" v-else></image>
@@ -437,7 +441,7 @@
 			//跳转实况记录
 			goLive(item) {
 				uni.navigateTo({
-					url: '/pages/order/serviceOrder/live?taskId=' + item.taskId+'&checkType='+item.checkType
+					url: '/pages/order/serviceOrder/live?taskId=' + item.taskId + '&checkType=' + item.checkType
 				})
 			},
 			selectTime() {
@@ -821,19 +825,19 @@
 				// this.paramState = '06'
 				// this.serveType = '02'
 				let params = {
-				  taskId: item.taskId,
-				  checkType: item.checkType,
-				  uptype: 4,         // 道路救援
-				  paramState: '06',
-				  serveType: '02',
-				  // isUpload: true
+					taskId: item.taskId,
+					checkType: item.checkType,
+					uptype: 4, // 道路救援
+					paramState: '06',
+					serveType: '02',
+					// isUpload: true
 				}
 				let queryString = Object.keys(params)
-				  .map(key => `${key}=${encodeURIComponent(params[key])}`)
-				  .join('&');
+					.map(key => `${key}=${encodeURIComponent(params[key])}`)
+					.join('&');
 				uni.navigateTo({
 					// url:'/pages/order/arriveUpload、${queryString}'  paramState
-					 url: `/pages/order/arriveUpload?taskId=${item.taskId}&checkType=${item.checkType}&uptype=4&paramState=06&serveType=02&jumptype=0`
+					url: `/pages/order/arriveUpload?taskId=${item.taskId}&checkType=${item.checkType}&uptype=4&paramState=06&serveType=02&jumptype=0`
 				})
 			},
 			//救援完成拍照

+ 8 - 1
pages/order/record.vue

@@ -208,13 +208,20 @@
 					reOrderId:this.reOrderId
 				}
 				this.$http.post("/app/order/locaOrder/agreeRefund",data).then(res => {
-					if (res.statusCode == 200) {
+					console.log(res)
+					if (res.data.code == 200) {
 						uni.showToast({
 							icon: 'none',
 							title: '商家已同意退款'
 						})
 						this.getRecord()
 					}
+					else{
+						uni.showToast({
+							icon: 'none',
+							title: res.data.message
+						})
+					}
 				})
 				
 			}

+ 22 - 16
plugin/uni-simple-router/helpers/urlQuery.js

@@ -69,7 +69,11 @@ class ParseQuery {
         if (intact) {
             formatQuery = '?';
         }
-        formatQuery += `query=${encodeURIComponent(strQuery)}`;
+        // 保留query的原逻辑赋值,使用substring去除第一位的?
+        formatQuery += uni.$u.queryParams({
+            query: encodeURIComponent(strQuery),
+            ...query,
+        }).substring(1);
         return formatQuery;
     }
 
@@ -108,24 +112,26 @@ class ParseQuery {
     }
 
     queryGet(query) {
+        // 直接给原query参数进行重新赋值操作,以确保decode方法无误
+        query = { query: JSON.stringify(query) };
         const { encodeURI } = Global.Router.CONFIG; // 获取到路由配置
         let [decode, historyObj, strQuery] = [query, query, ''];
         switch (encodeURI) {
-        case true: { // 加密模式
-            decode = this.decode(query);
-            strQuery = this.encode(decode);
-            historyObj = {
-                query: encodeURIComponent(JSON.stringify(decode)),
-            };
-            break;
-        }
-        case false: { // 不加密模式
-            strQuery = this.stringify(query);
-            break;
-        }
-        default: {
-            err('未知参数模式,请检查 \'encodeURI\'', true);
-        }
+            case true: { // 加密模式
+                decode = this.decode(query);
+                strQuery = this.encode(decode);
+                historyObj = {
+                    query: encodeURIComponent(JSON.stringify(decode)),
+                };
+                break;
+            }
+            case false: { // 不加密模式
+                strQuery = this.stringify(query);
+                break;
+            }
+            default: {
+                err('未知参数模式,请检查 \'encodeURI\'', true);
+            }
         }
         return { strQuery, historyObj, decode };
     }