Forráskód Böngészése

Merge branch 'master' of http://git.qiniu1314.com/cmy/jztAdmin

lhl 1 éve
szülő
commit
3ce7bfb598

+ 20 - 258
src/components/staffList/index.vue

@@ -1,18 +1,18 @@
 <template>
 	<div class="goodList">
+		<Form ref="pagination" :model="formValidate" @submit.native.prevent>
+			<FormItem label="员工姓名:" label-for="title">
+				<Input v-model="formValidate.name" placeholder="请输入员工姓名" class="input-add mr14" />
+				<Button type="primary" @click="userSearchs()">查询</Button>
+			</FormItem>
+		</Form>
 		<Table ref="table" no-data-text="暂无数据" @on-select-all="selectAll" @on-select-all-cancel="cancelAll"
 			@on-select="TableSelectRow" @on-select-cancel="TableSelectCancelRow" no-filtered-data-text="暂无筛选结果"
 			:columns="columns4" :data="tableList" :loading="loading" class="mr-20" height="500">
-			<!-- <template slot-scope="{ row }" slot="store_name">
-				<Tooltip max-width="200" placement="bottom">
-					<span class="line2">{{ row.store_name }}{{row.suk}}</span>
-					<p slot="content">{{ row.store_name }}{{row.suk}}</p>
-				</Tooltip>
-			</template> -->
 			<template slot-scope="{ row }" slot="avatar">
 				<viewer>
 					<div class="tabBox_img">
-						<img v-lazy="row.avatar" />
+						<img v-lazy="row.avatar||row.user.avatar" />
 					</div>
 				</viewer>
 			</template>
@@ -30,100 +30,27 @@
 	import {
 		mapState
 	} from "vuex";
-	import {
-		cascaderListApi,
-		changeListApi,
-		allLabelApi
-	} from "@/api/product";
 	import {
 		getYgList
 	} from '@/api/store'
-	import {
-		liveGoods
-	} from "@/api/live";
 	export default {
 		name: "index",
-		props: {
-			serviceProject: {
-				type: Number,
-				default: 0,
-			},
-			serviceCard: {
-				type: Number,
-				default: 0,
-			},
-			goodsType: {
-				type: Number,
-				default: 0,
-			},
-			storeType: {
-				type: Number,
-				default: 0,
-			},
-			is_new: {
-				type: String,
-				default: "",
-			},
-			diy: {
-				type: Boolean,
-				default: false,
-			},
-			isdiy: {
-				type: Boolean,
-				default: false,
-			},
-			ischeckbox: {
-				type: Boolean,
-				default: false,
-			},
-			liveStatus: {
-				type: Boolean,
-				default: false,
-			},
-			isLive: {
-				type: Boolean,
-				default: false,
-			},
-			datas: {
-				type: Object,
-				default: function() {
-					return {};
-				},
-			},
-		},
 		data() {
 			return {
 				//选中商品集合
 				selectEquips: [],
 				// 选中的id集合
 				selectEquipsIds: [],
-				labelSelect: [],
 				cateIds: [],
 				modal_loading: false,
-				treeSelect: [],
 				formValidate: {
-					service_project: this.serviceProject,
-					service_card: this.serviceCard,
 					page: 1,
 					limit: 10,
-					cate_id: "",
-					store_name: "",
-					is_new: this.is_new,
-					store_label_id: ""
+					is_reservation:1
 				},
 				total: 0,
-				modals: false,
 				loading: false,
-				grid: {
-					xl: 10,
-					lg: 10,
-					md: 12,
-					sm: 24,
-					xs: 24,
-				},
 				tableList: [],
-				currentid: 0,
-				productRow: {},
 				columns4: [{
 						type: 'selection',
 						width: 60,
@@ -141,111 +68,31 @@
 					{
 						title: "员工姓名",
 						key: "name",
-						minWidth: 200,
+						minWidth: 80,
 					},
 					{
-						title: "创建时间",
-						key: "create_time",
-						minWidth: 100,
-					},
-				],
-				columns5: [{
-						title: "商品ID",
-						key: "id",
+						title: "别称",
+						key: "alias",
+						minWidth: 80,
 					},
 					{
-						title: "图片",
-						slot: "image",
+						title: "手机号",
+						key: "mobile",
+						width: 130,
 					},
 					{
-						title: "商品名称",
-						key: "name",
-						minWidth: 250,
+						title: "创建时间",
+						key: "create_time",
+						minWidth: 100,
 					},
 				],
 				images: [],
-				many: "",
 			};
 		},
-		computed: {
-			...mapState("admin/layout", ["isMobile"]),
-			labelWidth() {
-				return this.isMobile ? undefined : 120;
-			},
-			labelPosition() {
-				return this.isMobile ? "top" : "right";
-			},
-		},
 		created() {
-			// let radio = {
-			// 	title: "选择",
-			// 	width: 70,
-			// 	align: "center",
-			// 	render: (h, params) => {
-			// 		let id = params.row.id;
-			// 		let flag = false;
-			// 		if (this.currentid === id) {
-			// 			flag = true;
-			// 		} else {
-			// 			flag = false;
-			// 		}
-			// 		let self = this;
-			// 		return h("div", [
-			// 			h("Radio", {
-			// 				props: {
-			// 					value: flag,
-			// 				},
-			// 				on: {
-			// 					"on-change": () => {
-			// 						self.currentid = id;
-			// 						this.productRow = params.row;
-			// 						console.log('zhe+++')
-			// 						this.$emit("getProductId", this.productRow);
-			// 						if (this.productRow.id) {
-			// 							if (this.$route.query.fodder === "image") {
-			// 								/* eslint-disable */
-			// 								let imageObject = {
-			// 									image: this.productRow.image,
-			// 									product_id: this.productRow.id,
-			// 									name: this.productRow.name,
-			// 								};
-			// 								form_create_helper.set("image", imageObject);
-			// 								form_create_helper.close("image");
-			// 							}
-			// 						} else {
-			// 							this.$Message.warning("请先选择商品");
-			// 						}
-			// 					},
-			// 				},
-			// 			}),
-			// 		]);
-			// 	},
-			// };
-
-			// let checkbox = {
-			// 	type: "selection",
-			// 	width: 60,
-			// 	align: "center",
-			// };
-			// let many = "";
-			// if (this.ischeckbox) {
-			// 	many = "many";
-			// } else {
-			// 	many = this.$route.query.type;
-			// }
-			// this.many = many;
-			// if (many === "many") {
-			// 	this.columns4.unshift(checkbox);
-			// 	this.columns5.unshift(checkbox);
-			// } else {
-			// 	this.columns4.unshift(radio);
-			// 	this.columns5.unshift(radio);
-			// }
 		},
 		mounted() {
-			this.goodsCategory();
 			this.getList();
-			this.getAllLabelApi();
 		},
 		methods: {
 			// 判断是否选中
@@ -283,26 +130,6 @@
 					this.TableSelectCancelRow(null, this.tableList[i]);
 				}
 			},
-			getAllLabelApi() {
-				allLabelApi().then(res => {
-					this.labelSelect = res.data
-				}).catch(err => {
-					this.$Message.error(err.msg);
-				})
-			},
-			handleSelectAll() {
-				this.$refs.table.selectAll(false);
-			},
-			// 商品分类;
-			goodsCategory() {
-				cascaderListApi(1)
-					.then((res) => {
-						this.treeSelect = res.data;
-					})
-					.catch((res) => {
-						this.$Message.error(res.msg);
-					});
-			},
 			pageChange(index) {
 				this.formValidate.page = index;
 				this.getList();
@@ -310,19 +137,6 @@
 			// 列表
 			getList() {
 				this.loading = true;
-				if (!this.liveStatus) {
-					if (this.isLive) {
-						this.formValidate.is_live = 1;
-					}
-					if (this.goodsType) {
-						this.formValidate.is_presale_product = 0;
-						this.formValidate.is_vip_product = 0;
-					}
-					if (this.storeType) {
-						this.formValidate.is_supplier = 0;
-					}
-
-					this.formValidate.cate_id = this.cateIds[this.cateIds.length - 1]
 					getYgList(this.formValidate)
 						.then(async (res) => {
 							let data = res.data;
@@ -335,30 +149,6 @@
 							this.loading = false;
 							this.$Message.error(res.msg);
 						});
-				} else {
-					liveGoods({
-							is_show: "1",
-							status: "1",
-							live_id: this.datas.id,
-							kerword: this.formValidate.store_name,
-							page: this.formValidate.page,
-							limit: this.formValidate.limit,
-						})
-						.then(async (res) => {
-							let data = res.data;
-							data.list.forEach((el) => {
-								el.image = el.cover_img;
-							});
-							this.tableList = data.list;
-							this.total = res.data.count;
-							this.sortData();
-							this.loading = false;
-						})
-						.catch((res) => {
-							this.loading = false;
-							this.$Message.error(res.msg);
-						});
-				}
 			},
 			changeCheckbox(selection) {
 				let images = [];
@@ -375,36 +165,9 @@
 				this.$emit("getProductDiy", selection);
 			},
 			ok() {
-				// console.log('selectEquips',this.selectEquips)
 				this.$emit("getProductId", this.selectEquips);
-				// let images = [];
-				// this.selectEquips.forEach(function(item) {
-				// 	let imageObject = {
-				// 		image: item.image,
-				// 		product_id: item.id,
-				// 		store_name: item.store_name,
-				// 		temp_id: item.temp_id
-				// 	};
-				// 	images.push(imageObject);
-				// });
-				// if (images.length > 0) {
-				// 	if (this.$route.query.fodder === "image") {
-				// 		let imageValue = form_create_helper.get("image");
-				// 		form_create_helper.set("image", imageValue.concat(images));
-				// 		form_create_helper.close("image");
-				// 	} else {
-				// 		if (this.isdiy) {
-				// 			this.$emit("getProductId", this.selectEquips);
-				// 		} else {
-				// 			this.$emit("getProductId", images);
-				// 		}
-				// 	}
-				// } else {
-				// 	this.$Message.warning("请先选择商品");
-				// }
 			},
 			treeSearchs(value) {
-				this.cateIds = value;
 				this.formValidate.page = 1;
 				this.getList();
 			},
@@ -414,8 +177,6 @@
 				this.getList();
 			},
 			clear() {
-				this.productRow.id = "";
-				this.currentid = "";
 			},
 		},
 	};
@@ -437,7 +198,8 @@
 	.tabBox_img {
 		width: 36px;
 		height: 36px;
-		border-radius: 4px;
+		border-radius: 100px;
+		overflow: hidden;
 		cursor: pointer;
 
 		img {

+ 93 - 225
src/pages/order/serveList/index.vue

@@ -12,6 +12,18 @@
 							</Option>
 						</Select>
 					</FormItem>
+					<FormItem label="用户ID:" label-for="title">
+						<div class='flex-search'>
+							<Input v-model="pagination.uid" icon="ios-search" @on-click='openuid' placeholder="请输入用户ID"
+								class="input-add mr14" />
+						</div>
+					</FormItem>
+					<FormItem label="员工ID:" label-for="title">
+						<div class='flex-search'>
+							<Input v-model="pagination.work_member_id" icon="ios-search" @on-click='openmid'
+								placeholder="请输入员工ID" class="input-add mr14" />
+						</div>
+					</FormItem>
 					<FormItem label="订单搜索:" label-for="title">
 						<Input v-model="pagination.order_id" placeholder="请输入订单号" class="input-add mr14" />
 						<Button type="primary" @click="orderSearch()">查询</Button>
@@ -39,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">
@@ -53,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">
@@ -76,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">
@@ -97,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">
@@ -119,6 +112,18 @@
 				<Button @click="cancal">取消</Button>
 			</div>
 		</Modal>
+		<Modal v-model="userListShow" width='80' mask title="用户选择">
+			<userlist @imageObject='checkUser'></userlist>
+			<template #footer>
+				<Button @click="userListShow=false">取消</Button>
+			</template>
+		</Modal>
+		<Modal v-model="memberListShow" width='80' mask title="员工选择">
+			<staffList @getProductId='checkmember'></staffList>
+			<template #footer>
+				<Button @click="memberListShow=false">取消</Button>
+			</template>
+		</Modal>
 	</div>
 </template>
 
@@ -127,17 +132,6 @@
 		mapState
 	} from "vuex";
 	import {
-		orderRefundList,
-		orderList,
-		getOrdeDatas,
-		getDataInfo,
-		getRefundDataInfo,
-		getRefundFrom,
-		getRefundOrderFrom,
-		getnoRefund,
-		refundIntegral,
-		getDistribution,
-		writeUpdate,
 		getServeOrder,
 		member_update
 	} from "@/api/order";
@@ -147,20 +141,20 @@
 	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
 		},
 		data() {
 			return {
+				memberListShow: false,
+				// 显示用户列表
+				userListShow: false,
 				modals: false,
 				order_id: '',
 				ygList: [],
@@ -170,22 +164,22 @@
 						title: "订单号",
 						align: "center",
 						slot: "order_id",
-						minWidth: 150,
+						minWidth: 160,
 					},
 					{
 						title: "用户信息",
 						slot: "nickname",
-						minWidth: 130,
+						minWidth: 140,
 					},
 					{
 						title: "预约员工",
 						slot: "kf",
-						minWidth: 130,
+						minWidth: 80,
 					},
 					{
 						title: "商品信息",
 						slot: "info",
-						minWidth: 300,
+						minWidth: 250,
 					},
 					{
 						title: "实际支付",
@@ -195,18 +189,18 @@
 					{
 						title: "预约时间",
 						slot: "reservation_time",
-						minWidth: 110,
-					},
-					{
-						title: "订单状态",
-						slot: "status",
-						minWidth: 110,
-					},
-					{
-						title: "退款状态",
-						slot: "refund_status",
-						minWidth: 110,
+						minWidth: 130,
 					},
+					// {
+					// 	title: "订单状态",
+					// 	slot: "status",
+					// 	minWidth: 80,
+					// },
+					// {
+					// 	title: "退款状态",
+					// 	slot: "refund_status",
+					// 	minWidth: 80,
+					// },
 					{
 						title: "预约门店",
 						slot: "store",
@@ -215,7 +209,7 @@
 					{
 						title: "下单时间",
 						slot: "add_time",
-						minWidth: 110,
+						minWidth: 130,
 					},
 					{
 						title: "操作",
@@ -238,31 +232,20 @@
 						value: -1
 					},
 				],
-				orderDatalist: null,
 				loading: false,
-				FromData: null,
 				total: 0,
-				orderId: 0,
-				animal: 1,
 				pagination: {
 					page: 1,
 					limit: 15,
 					order_id: "",
 					time: "",
-					status: 0
+					status: 0,
+					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;
 			},
@@ -272,16 +255,34 @@
 		},
 		created() {
 			this.getYgList()
-			this.getErpConfig();
 			this.getOrderList();
 		},
 		methods: {
-			showName( id) {
+			// 打开弹窗
+			openmid(e) {
+				this.memberListShow = true;
+			},
+			// 选中员工
+			checkmember(res) {
+				let data = res[0];
+				this.memberListShow = false;
+				this.pagination.work_member_id = data.id;
+			},
+			// 选中用户
+			checkUser(res) {
+				this.userListShow = false;
+				this.pagination.uid = res.uid;
+			},
+			// 打开弹窗
+			openuid(e) {
+				this.userListShow = true;
+			},
+			showName(id) {
 				let yg = this.ygList.find(item => {
 					return item.id == id
 				})
-				console.log(yg,'ygygygyg')
-				return yg? yg.name: ''
+				// console.log(yg,'ygygygyg')
+				return yg ? yg.name : ''
 			},
 			getYgList() {
 				getYgList({
@@ -309,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 => {
@@ -366,7 +324,6 @@
 					this.ygList = res.data.list
 				})
 			},
-			//goCancal
 			goCancal() {
 				if (this.chooseId == '') {
 					return this.$Message.error('请选择员工')
@@ -383,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;
@@ -472,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;
@@ -489,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>
@@ -538,10 +398,17 @@
 		height: 100%;
 		display: flex;
 		align-items: center;
+		.tabBox_content{
+			padding-left: 5px;
+		}
+		.tabBox_pice {
+			flex-shrink: 0;
+		}
 
 		.tabBox_img {
 			width: 30px;
 			height: 30px;
+			flex-shrink: 0;
 
 			img {
 				width: 100%;
@@ -550,11 +417,8 @@
 		}
 
 		.tabBox_tit {
-			width: 245px;
-			height: 30px;
-			line-height: 30px;
+			flex-grow: 1;
 			font-size: 12px !important;
-			margin: 0 2px 0 10px;
 			letter-spacing: 1px;
 			box-sizing: border-box;
 		}
@@ -573,4 +437,8 @@
 		width: 25px;
 		height: 25px;
 	}
+
+	.flex-search {
+		display: flex;
+	}
 </style>

+ 45 - 11
src/pages/user/list/handle/userDetails.vue

@@ -58,6 +58,21 @@
 								<div class="title">{{ row.store_name }}</div>
 							</div>
 						</template>
+						<template slot-scope="{ row }" slot="card_name">
+							<div>
+								<div class="title">{{ row.card_name }}</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">
+							<div>
+								<div class="title" v-if="row.order">
+									{{row.add_time}}</div>
+								<div class="title" v-else>已失效</div>
+							</div>
+						</template>
 						<template slot-scope="{ row }" slot="item">
 							<div class="product" v-for="item in row.card">
 								<div class="image" v-viewer>
@@ -96,6 +111,9 @@
 	} from '@/api/user';
 	import userForm from './userForm';
 	import userInfo from './userInfo';
+	import {
+		formatDate
+	} from '@/utils/validate';
 
 	export default {
 		name: 'userDetails',
@@ -192,6 +210,7 @@
 		},
 		created() {},
 		methods: {
+			formatDate,
 			changeMenu(value) {
 				if (value === '99') {
 					this.getDetails(this.userId);
@@ -375,7 +394,17 @@
 				infoApi(data).then(async res => {
 					if (res.status === 200) {
 						let data = res.data
-						this.userLists = data.list;
+						if (this.userFrom.type == 'service_card') {
+							this.userLists = data.list.map((res) => {
+								if (res.order) {
+									const date = new Date(res.order.add_time * 1000);
+									res.add_time = this.formatDate(date ,'yyyy-MM-dd hh:mm:ss');
+								}
+								return res
+							});
+						} else {
+							this.userLists = data.list;
+						}
 						this.total = data.count;
 						switch (this.userFrom.type) {
 							case 'order':
@@ -471,25 +500,30 @@
 									//     minWidth: 120
 									// },
 									{
-										title: '服务卡名称',
-										key: 'card_name',
-										minWidth: 120
+										title: '服务卡',
+										slot: 'card_name',
+										minWidth: 150
 									},
-									// {
-									// 	title: '购买时间',
-									// 	key: 'add_time',
-									// 	minWidth: 120
-									// },
 									{
 										title: '绑定项目',
 										slot: 'item',
-										minWidth: 240
+										minWidth: 200
+									},
+									{
+										title: '购买时间',
+										slot: 'add_time',
+										minWidth: 120
 									},
 									{
 										title: '最近使用',
 										key: 'update_time',
 										minWidth: 120
-									}
+									},
+									// {
+									// 	title: '操作',
+									// 	slot: 'pos',
+									// 	minWidth: 50
+									// }
 								]
 								break;
 							case 'coupon':