Browse Source

2023-12-18

cmy 1 year ago
parent
commit
ae6f71ccc3
2 changed files with 24 additions and 217 deletions
  1. 20 215
      src/pages/order/serveList/index.vue
  2. 4 2
      src/pages/user/list/handle/userDetails.vue

+ 20 - 215
src/pages/order/serveList/index.vue

@@ -51,8 +51,10 @@
 						<div class="tabBox_img" v-viewer>
 							<img v-lazy="val.slider_image" />
 						</div>
-						<span class="tabBox_tit">{{ val.store_name }}</span>
-						<span class="tabBox_pice">{{'¥' + val.pay_price}}</span>
+						<div class="tabBox_content">
+						<div class="tabBox_tit">{{ val.store_name }}</div>
+						<div class="tabBox_pice">{{'¥' + val.pay_price}}</div>
+						</div>
 					</div>
 				</template>
 				<template slot-scope="{ row, index }" slot="pay_price">
@@ -65,11 +67,11 @@
 					<span class="tabBox_pice">{{row.store.name}}</span>
 				</template>
 
-				<template slot-scope="{ row }" slot="status">
+				<!-- <template slot-scope="{ row }" slot="status">
 					<Tag color="blue" size="medium" v-if="row.status == -1">退款</Tag>
 					<Tag color="blue" size="medium" v-if="row.status == 0">待服务</Tag>
 					<Tag color="blue" size="medium" v-if="row.status == 2">已完成</Tag>
-				</template>
+				</template> -->
 
 				<template slot-scope="{ row }" slot="statusName">
 					<Tooltip theme="dark" max-width="300" :delay="600">
@@ -88,20 +90,8 @@
 				<template slot-scope="{ row, index }" slot="add_time">
 					<span class="tabBox_pice">{{showTime(row.add_time)}}</span>
 				</template>
-				<!-- <template slot-scope="{ row }" slot="statusGoodName">
-          <div v-html="row.refund_goods_explain" class="pt5"></div>
-          <div class="pictrue-box" v-if="row.refund_goods_img">
-            <div
-              v-viewer
-              v-for="(item, index) in row.refund_goods_img || []"
-              :key="index"
-            >
-              <img class="pictrue mr10" v-lazy="item" :src="item" />
-            </div>
-          </div>
-        </template> -->
 				<template slot-scope="{ row }" slot="action">
-					<a @click="changeMenu(row)" v-if="row.status == 0">修改服务员工</a>
+					<a @click="changeMenu(row)" v-if="row.status == 0">修改员工</a>
 				</template>
 			</Table>
 			<div class="acea-row row-right page">
@@ -109,15 +99,6 @@
 					:page-size="pagination.limit" />
 			</div>
 		</Card>
-		<!-- 编辑 退款 退积分 不退款-->
-		<edit-from ref="edits" :FromData="FromData" @submitFail="submitFail"></edit-from>
-		<!-- 详情 -->
-		<details-from ref="detailss" :orderDatalist="orderDatalist" :orderId="orderId" :rowActive="rowActive"
-			:openErp="openErp"></details-from>
-		<!-- 备注 -->
-		<order-remark ref="remarks" remarkType="refund" :orderId="orderId" @submitFail="submitFail"></order-remark>
-		<!-- 记录 -->
-		<order-record ref="record"></order-record>
 		<Modal v-model="modals" scrollable title="选择员工" class="order_box" :closable="false">
 			<Form :label-width="80">
 				<FormItem label="员工:" prop="chooseId">
@@ -151,17 +132,6 @@
 		mapState
 	} from "vuex";
 	import {
-		orderRefundList,
-		orderList,
-		getOrdeDatas,
-		getDataInfo,
-		getRefundDataInfo,
-		getRefundFrom,
-		getRefundOrderFrom,
-		getnoRefund,
-		refundIntegral,
-		getDistribution,
-		writeUpdate,
 		getServeOrder,
 		member_update
 	} from "@/api/order";
@@ -171,21 +141,12 @@
 	import {
 		erpConfig
 	} from "@/api/erp";
-	import editFrom from "@/components/from/from";
-	import detailsFrom from "../orderList/handle/orderDetails";
-	import orderRemark from "../orderList/handle/orderRemark";
-	import orderRecord from "../orderList/handle/orderRecord";
-	import timeOptions from "@/utils/timeOptions";
 	import userlist from "@/components/customerInfo/index";
 	import staffList from "@/components/staffList/index";
 
 
 	export default {
 		components: {
-			editFrom,
-			detailsFrom,
-			orderRemark,
-			orderRecord,
 			userlist,
 			staffList
 		},
@@ -230,16 +191,16 @@
 						slot: "reservation_time",
 						minWidth: 130,
 					},
-					{
-						title: "订单状态",
-						slot: "status",
-						minWidth: 80,
-					},
-					{
-						title: "退款状态",
-						slot: "refund_status",
-						minWidth: 80,
-					},
+					// {
+					// 	title: "订单状态",
+					// 	slot: "status",
+					// 	minWidth: 80,
+					// },
+					// {
+					// 	title: "退款状态",
+					// 	slot: "refund_status",
+					// 	minWidth: 80,
+					// },
 					{
 						title: "预约门店",
 						slot: "store",
@@ -271,12 +232,8 @@
 						value: -1
 					},
 				],
-				orderDatalist: null,
 				loading: false,
-				FromData: null,
 				total: 0,
-				orderId: 0,
-				animal: 1,
 				pagination: {
 					page: 1,
 					limit: 15,
@@ -286,18 +243,9 @@
 					uid: '',
 					work_member_id: ''
 				},
-				options: timeOptions,
-				timeVal: [],
-				modal: false,
-				qrcode: null,
-				name: "",
-				spin: false,
-				rowActive: {},
 			};
 		},
 		computed: {
-			...mapState("order", ["orderChartType"]),
-			// ...mapState("admin/layout", ["isMobile"]),
 			labelWidth() {
 				return this.isMobile ? undefined : 96;
 			},
@@ -307,7 +255,6 @@
 		},
 		created() {
 			this.getYgList()
-			this.getErpConfig();
 			this.getOrderList();
 		},
 		methods: {
@@ -318,7 +265,6 @@
 			// 选中员工
 			checkmember(res) {
 				let data = res[0];
-				console.log(res,'res')
 				this.memberListShow = false;
 				this.pagination.work_member_id = data.id;
 			},
@@ -364,56 +310,13 @@
 				})
 				return price.toFixed(2)
 			},
-			//erp配置
-			getErpConfig() {
-				erpConfig().then(res => {
-					this.openErp = res.data.open_erp;
-				}).catch(err => {
-					this.$Message.error(err.msg);
-				})
-			},
-			onchangeCode(e) {
-				this.animal = e;
-				this.qrcodeShow();
-			},
-			// 具体日期搜索();
-			onchangeTime(e) {
-				this.pagination.page = 1;
-				this.timeVal = e;
-				this.pagination.time = this.timeVal[0] ? this.timeVal.join("-") : "";
-			},
-			// 获取详情表单数据
-			getData(id, type) {
-				getRefundDataInfo(id)
-					.then(async (res) => {
-						if (!type) {
-							this.$refs.detailss.modals = true;
-						}
-						this.$refs.detailss.activeName = "detail";
-						this.orderDatalist = res.data;
-						// if (this.orderDatalist.orderInfo.refund_img) {
-						//   try {
-						//     this.orderDatalist.orderInfo.refund_img = JSON.parse(
-						//       this.orderDatalist.orderInfo.refund_img
-						//     );
-						//   } catch (e) {
-						//     this.orderDatalist.orderInfo.refund_img = [];
-						//   }
-						// }
-					})
-					.catch((res) => {
-						this.$Message.error(res.msg);
-					});
-			},
 			// 操作
 			changeMenu(row, name) {
-				console.log('dddddddddddddddd')
 				this.modals = true
 				this.order_id = row.id
 			},
 			cancal() {
 				this.modals = false
-				this.remark = ''
 			},
 			getygList() {
 				getYgList().then(res => {
@@ -421,7 +324,6 @@
 					this.ygList = res.data.list
 				})
 			},
-			//goCancal
 			goCancal() {
 				if (this.chooseId == '') {
 					return this.$Message.error('请选择员工')
@@ -438,82 +340,6 @@
 				})
 
 			},
-			// 获取退款表单数据
-			getRefundData(id, refund_type) {
-				if (refund_type == 2) {
-					this.delfromData = {
-						title: "是否立即退货",
-						url: `/refund/agree/${id}`,
-						method: "get",
-					};
-					this.$modalSure(this.delfromData)
-						.then((res) => {
-							this.$Message.success(res.msg);
-							this.getOrderList();
-							this.getData(this.orderId, 1);
-						})
-						.catch((res) => {
-							this.$Message.error(res.msg);
-						});
-				} else {
-					this.$modalForm(getRefundOrderFrom(id)).then(() => {
-						this.getOrderList();
-						this.getData(this.orderId, 1);
-						this.$emit("changeGetTabs");
-					});
-				}
-			},
-			// 获取退积分表单数据
-			getRefundIntegral(id) {
-				refundIntegral(id)
-					.then(async (res) => {
-						this.FromData = res.data;
-						this.$refs.edits.modals = true;
-					})
-					.catch((res) => {
-						this.$Message.error(res.msg);
-					});
-			},
-			// 删除单条订单
-			delOrder(row, data) {
-				if (row.is_del === 1) {
-					this.$modalSure(data)
-						.then((res) => {
-							this.$Message.success(res.msg);
-							this.getOrderList();
-						})
-						.catch((res) => {
-							this.$Message.error(res.msg);
-						});
-				} else {
-					const title = "错误!";
-					const content =
-						"<p>您选择的的订单存在用户未删除的订单,无法删除用户未删除的订单!</p>";
-					this.$Modal.error({
-						title: title,
-						content: content,
-					});
-				}
-			},
-			// 修改成功
-			submitFail() {
-				this.getOrderList();
-				this.getData(this.orderId, 1);
-			},
-			// 订单选择状态
-			selectChange2(tab) {
-				this.pagination.page = 1;
-				this.pagination.refund_type = tab;
-				this.getOrderList(tab);
-			},
-			// 不退款表单数据
-			getNoRefundData(id) {
-				this.$modalForm(getnoRefund(id)).then(() => {
-					this.getOrderList();
-					this.getData(this.orderId);
-					this.$emit("changeGetTabs");
-				});
-			},
 			// 订单列表
 			getOrderList() {
 				this.loading = true;
@@ -527,12 +353,6 @@
 						} = res.data;
 						this.total = count;
 						this.tbody = list;
-						// this.num = num;
-						list.forEach((item) => {
-							if (item.id == this.orderId) {
-								this.rowActive = item;
-							}
-						});
 					})
 					.catch((err) => {
 						this.loading = false;
@@ -544,26 +364,11 @@
 				this.pagination.page = index;
 				this.getOrderList();
 			},
-			nameSearch() {
-				this.pagination.page = 1;
-				this.getOrderList();
-			},
 			// 订单搜索
 			orderSearch() {
 				this.pagination.page = 1;
 				this.getOrderList();
 			},
-			// 配送信息表单数据
-			delivery(row) {
-				getDistribution(row.id)
-					.then(async (res) => {
-						this.FromData = res.data;
-						this.$refs.edits.modals = true;
-					})
-					.catch((res) => {
-						this.$Message.error(res.msg);
-					});
-			},
 		},
 	};
 </script>
@@ -593,7 +398,9 @@
 		height: 100%;
 		display: flex;
 		align-items: center;
-
+		.tabBox_content{
+			padding-left: 5px;
+		}
 		.tabBox_pice {
 			flex-shrink: 0;
 		}
@@ -611,9 +418,7 @@
 
 		.tabBox_tit {
 			flex-grow: 1;
-			height: 30px;
 			font-size: 12px !important;
-			margin: 0 2px 0 10px;
 			letter-spacing: 1px;
 			box-sizing: border-box;
 		}

+ 4 - 2
src/pages/user/list/handle/userDetails.vue

@@ -61,7 +61,9 @@
 						<template slot-scope="{ row }" slot="card_name">
 							<div>
 								<div class="title">{{ row.card_name }}</div>
-								<div class="title">价格:{{ row.order.pay_price }}</div>
+								<div class="title" v-if="row.order">价格:{{ row.order.pay_price }}</div>
+								<div class="title" v-if="row.servicecard">折扣:{{ row.servicecard
+								.discount }}%</div>
 							</div>
 						</template>
 						<template slot-scope="{ row }" slot="add_time">
@@ -500,7 +502,7 @@
 									{
 										title: '服务卡',
 										slot: 'card_name',
-										minWidth: 120
+										minWidth: 150
 									},
 									{
 										title: '绑定项目',