Ver Fonte

2024-1-26

cmy há 1 ano atrás
pai
commit
c6f588d7e6

+ 10 - 1
src/api/agent.js

@@ -145,4 +145,13 @@ export function globalList(params) {
 	    method: 'get',
 	    params
 	})
-}
+}
+
+// 员工股权记录
+export function recordList(params) {
+	return request({
+	    url: 'work/recordList',
+	    method: 'get',
+	    params
+	})
+}

+ 10 - 1
src/api/order.js

@@ -691,4 +691,13 @@ export function active_refund_order(data) {
 	    url: `/service/active_refund_order`,
 	    method: 'post',
 	    data});
-}
+}
+//员工订单统计
+export function getSubscribeOrderCount(data) {
+	return request({
+	    url: `/work/getSubscribeOrderCount`,
+	    method: 'post',
+	    data
+		});
+}
+

+ 9 - 2
src/components/staffList/index.vue

@@ -35,6 +35,12 @@
 	} from '@/api/store'
 	export default {
 		name: "index",
+		props: {
+			is_reservation: {
+				type: Number,
+				default: 1
+			},
+		},
 		data() {
 			return {
 				//选中商品集合
@@ -46,7 +52,6 @@
 				formValidate: {
 					page: 1,
 					limit: 10,
-					is_reservation:1
 				},
 				total: 0,
 				loading: false,
@@ -59,6 +64,7 @@
 					{
 						title: "员工ID",
 						key: "id",
+						width: 60,
 					},
 					{
 						title: "头像",
@@ -137,7 +143,8 @@
 			// 列表
 			getList() {
 				this.loading = true;
-					getYgList(this.formValidate)
+					getYgList({...this.formValidate,
+					is_reservation:this.is_reservation})
 						.then(async (res) => {
 							let data = res.data;
 							this.tableList = data.list;

+ 22 - 77
src/pages/agent/kpi/index.vue

@@ -7,11 +7,10 @@
 				<Form ref="pagination" inline :model="pagination" :label-width="labelWidth"
 					:label-position="labelPosition" @submit.native.prevent>
 
-					<FormItem label="选择员工:">
-						<Select filterable clearable v-model="pagination.member_id" class="input-add">
-							<Option v-for="(item, index) in ygList" :value="item.id" :key="index">{{ item.name }}(ID:{{item.uid}})
-							</Option>
-						</Select>
+					<FormItem label="员工ID:" label-for="title">
+						<div class='flex-search'>
+							<Input v-model="pagination.member_id" icon="ios-search" @on-click='openmid' placeholder="请输入员工ID" class="input-add mr14" />
+						</div>
 					</FormItem>
 					<FormItem label="时间范围:">
 						<DatePicker :editable="false" @on-change="onchangeTime" :value="timeVal" format="yyyy/MM/dd"
@@ -32,7 +31,6 @@
 				</Form>
 			</div>
 		</Card>
-
 		<cards-data :cardLists="cardLists"></cards-data>
 		<Card :bordered="false" dis-hover class="ivu-mt">
 			<!-- 售后订单表格 -->
@@ -80,18 +78,11 @@
 					:page-size="pagination.limit" />
 			</div>
 		</Card>
-		<Modal v-model="modals" scrollable title="选择员工" class="order_box" :closable="false">
-			<Form :label-width="80">
-				<FormItem label="员工:" prop="chooseId">
-					<Select v-model="chooseId" style="width: 250px">
-						<Option v-for="item in ygList" :key="item.id" :value="item.id">{{ item.name }}</Option>
-					</Select>
-				</FormItem>
-			</Form>
-			<div slot="footer">
-				<Button type="primary" @click="goCancal">提交</Button>
-				<Button @click="cancal">取消</Button>
-			</div>
+		<Modal v-model="modals" width='80' mask title="员工选择">
+			<staffList :is_reservation='0' @getProductId='checkmember'></staffList>
+			<template #footer>
+				<Button @click="memberListShow=false">取消</Button>
+			</template>
 		</Modal>
 	</div>
 </template>
@@ -103,26 +94,21 @@
 	import {
 		member_update
 	} from "@/api/order";
-	import {
-		getYgList
-	} from "@/api/store"
 	import {
 		getKpi
 	} from "@/api/agent"
 	import timeOptions from "@/utils/timeOptions";
 	import cardsData from "@/components/cards/cards";
+	import staffList from "@/components/staffList/index";
 	export default {
 		components: {
-			cardsData
+			cardsData,
+			staffList
 		},
 		data() {
 			return {
+				modals:false,
 				cardLists: [],
-				modals: false,
-				order_id: '',
-				ygList: [],
-				chooseId: 0,
-				openErp: false,
 				thead: [{
 						title: "id",
 						align: "id",
@@ -185,28 +171,19 @@
 						value: 2
 					},
 				],
-				orderDatalist: null,
 				loading: false,
-				FromData: null,
 				total: 0,
-				orderId: 0,
-				animal: 1,
 				pagination: {
 					type: 0,
-					member_id: 0,
+					member_id: '',
 					page: 1,
 					limit: 15,
-					order_id: "",
 					create_time: "",
 					status: 0
 				},
 				options: timeOptions,
 				timeVal: [],
-				modal: false,
-				qrcode: null,
 				name: "",
-				spin: false,
-				rowActive: {},
 			};
 		},
 		computed: {
@@ -220,23 +197,18 @@
 			},
 		},
 		created() {
-			this.getYgList()
 			this.getOrderList();
 		},
 		methods: {
-			showName(id) {
-				let yg = this.ygList.find(item => {
-					return item.id == id
-				})
-				return yg ? yg.name : ''
+			// 打开弹窗
+			openmid(e) {
+				this.modals = true;
 			},
-			getYgList() {
-				getYgList({
-					page: 1,
-					limit: 1000
-				}).then(res => {
-					this.ygList = res.data.list
-				})
+			// 选中员工
+			checkmember(res) {
+				let data = res[0];
+				this.modals = false;
+				this.pagination.member_id = data.id;
 			},
 			showTime(time) {
 				var date = new Date(time * 1000);
@@ -263,27 +235,6 @@
 				this.timeVal = e;
 				this.pagination.create_time = this.timeVal[0] ? this.timeVal.join("-") : "";
 			},
-			cancal() {
-				this.modals = false
-				this.remark = ''
-			},
-			//goCancal
-			goCancal() {
-				if (this.chooseId == '') {
-					return this.$Message.error('请选择员工')
-				}
-				this.modals = false
-				member_update({
-					id: this.order_id,
-					work_member_id: this.chooseId
-				}).then(res => {
-					this.$Message.success(res.msg)
-					this.getOrderList()
-				}).catch(err => {
-					this.$Message.error(err.msg)
-				})
-
-			},
 			// 订单列表
 			getOrderList() {
 				this.loading = true;
@@ -309,12 +260,6 @@
 							name: "手工总业绩",
 							className: "md-pricetags",
 						}];
-						// this.num = num;
-						list.forEach((item) => {
-							if (item.id == this.orderId) {
-								this.rowActive = item;
-							}
-						});
 					})
 					.catch((err) => {
 						this.loading = false;

+ 22 - 100
src/pages/finance/guquan/list.vue

@@ -3,9 +3,7 @@
 	<div>
 		<Card :bordered="false" dis-hover class="ivu-mt">
 			<!-- 相关操作 -->
-			<Select v-model="listFrom.member_id" style="width: 250px">
-				<Option v-for="item in ygList" :key="item.id" :value="item.id">{{ item.name }}</Option>
-			</Select>
+			<Input v-model="listFrom.member_id" icon="ios-search" @on-click='openmid' placeholder="请输入员工ID" class="input-add mr14" />
 			<Button type="primary" @click="getList" style="margin-left: 20px;">查询</Button>
 			<Button type="primary" @click="reset" style="margin-left: 20px;">重置</Button>
 			<Table :columns="columns1" :data="list" ref="table" class="mt25" :loading="loading" highlight-row
@@ -44,6 +42,12 @@
 					:page-size="listFrom.limit" />
 			</div>
 		</Card>
+		<Modal v-model="modals" width='80' mask title="员工选择">
+			<staffList :is_reservation='0' @getProductId='checkmember'></staffList>
+			<template #footer>
+				<Button @click="memberListShow=false">取消</Button>
+			</template>
+		</Modal>
 	</div>
 </template>
 <script>
@@ -51,30 +55,18 @@
 		mapState,
 		mapMutations
 	} from 'vuex';
-	import {
-		userList
-	} from '@/api/user';
-	import {
-		updateShareholdingRecord,
-		deleteShareholder,
-		addShareholder
-	} from '@/api/shareholder';
-	import {
-		getYgList
-	} from "@/api/store"
 	import {
 		getYgGqList,
 		passYgGqTx
 	} from '@/api/finance'
-	import user from "@/components/userList/index"
+	import staffList from "@/components/staffList/index";
 	export default {
 		name: 'guquanList',
+		components: {
+			staffList
+		},
 		data() {
 			return {
-				ygList: [],
-				// 股权发放弹窗
-				modalss: false,
-				// 用户列表弹窗
 				modals: false,
 				loading: false,
 				columns1: [{
@@ -112,54 +104,31 @@
 					is_shareholder: 1,
 					page: 1,
 					limit: 10,
-					member_id: 0,
-				},
-				fromHolder: {
-					uid: 0,
-					initial_share: 0,
-					bonus_share: 0,
-					initial_status: "1",
-					bonus_status: "1",
-					mark: ''
+					member_id: '',
 				},
 				list: [],
 				total: 0,
-				user: {}
 			}
 		},
 		created() {
 			console.log('zs');
 			this.getList();
-			this.getYgList()
 		},
 		methods: {
+			// 打开弹窗
+			openmid(e) {
+				this.modals = true;
+			},
+			// 选中员工
+			checkmember(res) {
+				let data = res[0];
+				this.modals = false;
+				this.listFrom.member_id = data.id;
+			},
 			reset() {
 				this.listFrom.member_id = 0,
 				this.getList()
 			},
-			getYgList() {
-				getYgList({
-					page: 1,
-					limit: 1000
-				}).then(res => {
-					this.ygList = res.data.list
-				})
-			},
-			// 确认发放股权
-			comInput(res) {
-				updateShareholdingRecord(this.fromHolder).then((res) => {
-					this.getList();
-					this.$Message.success(res.msg);
-				}).catch(res => {
-					this.$Message.error(res.msg);
-				});
-			},
-			// 打开股权发放
-			changeholder(res) {
-				// 保存当前选中的对象
-				this.fromHolder.uid = res.uid;
-				this.modalss = true;
-			},
 			pass(row,type) {
 				console.log('row',row)
 				let that = this
@@ -183,41 +152,6 @@
 					}
 				});
 			},
-			getProductId(res) {
-				console.log(res);
-				this.modals = false;
-				this.$Modal.confirm({
-					title: '提示',
-					content: `是否将用户${res.name}(UID:${res.uid})添加为股东`,
-					loading: true,
-					onOk: () => {
-						this.$Modal.remove();
-						this.add(res.uid)
-						this.getList();
-					},
-					onCancel: () => {
-						// this.$Message.info('取消成功');
-					}
-				});
-			},
-			// 删除
-			del(row) {
-				let delfromData = {
-					title: "删除股东",
-					url: `stockRights/deleteShareholder`,
-					method: 'post',
-					ids: {
-						uid: row.uid
-					}
-				}
-				this.$modalSure(delfromData).then((res) => {
-					this.$Message.success(res.msg);
-					this.getList();
-				}).catch(res => {
-					this.$Message.error(res.msg);
-				});
-			},
-			// 等级列表
 			getList() {
 				this.loading = true;
 				getYgGqList(this.listFrom).then(async res => {
@@ -235,18 +169,6 @@
 				this.listFrom.page = index;
 				this.getList();
 			},
-			// 添加
-			add(uid) {
-				addShareholder({
-					uid
-				}).then((res) => {
-					console.log(res);
-					this.getList();
-					this.$Message.success(res.msg);
-				}).catch((res) => {
-					this.$Message.error(res.msg);
-				})
-			},
 		}
 	}
 </script>

+ 178 - 0
src/pages/order/serveuser/index.vue

@@ -0,0 +1,178 @@
+<template>
+	<!-- 订单-售后订单 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 筛选条件 -->
+				<Form ref="pagination" inline :model="pagination" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<FormItem label="时间范围:">
+						<DatePicker :editable="false" @on-change="onchangeTime" :value="timeVal" format="yyyy/MM/dd"
+							type="daterange" placement="bottom-start" placeholder="自定义时间" class="input-add"
+							:options="options"></DatePicker>
+						<Button type="primary" @click="orderSearch()">查询</Button>
+					</FormItem>
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 售后订单表格 -->
+			<Table :columns="thead" :data="tbody" ref="table" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果">
+				<template slot-scope="{ row }" slot="info">
+
+
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="pagination.page" show-elevator show-total @on-change="pageChange"
+					:page-size="pagination.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		getSubscribeOrderCount
+	} from "@/api/order";
+	import timeOptions from "@/utils/timeOptions";
+	export default {
+		data() {
+			return {
+				tbody: [],
+				loading: false,
+				total: 0,
+				orderId: 0,
+				pagination: {
+					page: 1,
+					limit: 15,
+					time: "",
+				},
+				options: timeOptions,
+				timeVal: [],
+				modal: false,
+			};
+		},
+		computed: {
+			...mapState("order", ["orderChartType"]),
+			// ...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getOrderList();
+		},
+		methods: {
+			// 具体日期搜索();
+			onchangeTime(e) {
+				this.pagination.page = 1;
+				this.timeVal = e;
+				this.pagination.time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 订单列表
+			getOrderList() {
+				this.loading = true;
+				getSubscribeOrderCount(this.pagination)
+					.then((res) => {
+						this.loading = false;
+						const {
+							count,
+							list,
+							num
+						} = 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;
+						this.$Message.error(err.msg);
+					});
+			},
+			// 分页
+			pageChange(index) {
+				this.pagination.page = index;
+				this.getOrderList();
+			},
+			// 订单搜索
+			orderSearch() {
+				this.pagination.page = 1;
+				this.getOrderList();
+			},
+		},
+	};
+</script>
+
+<style lang="stylus" scoped>
+	.span-del {
+		color: #ed4014;
+		display: block
+	}
+
+	.code {
+		position: relative;
+	}
+
+	.QRpic {
+		width: 180px;
+		height: 259px;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.tabBox {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		align-items: center;
+
+		.tabBox_img {
+			width: 30px;
+			height: 30px;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.tabBox_tit {
+			width: 245px;
+			height: 30px;
+			line-height: 30px;
+			font-size: 12px !important;
+			margin: 0 2px 0 10px;
+			letter-spacing: 1px;
+			box-sizing: border-box;
+		}
+	}
+
+	.tabBox+.tabBox {
+		margin-top: 5px;
+	}
+
+	.pictrue-box {
+		display: flex;
+		align-item: center;
+	}
+
+	.pictrue {
+		width: 25px;
+		height: 25px;
+	}
+</style>

Diff do ficheiro suprimidas por serem muito extensas
+ 887 - 1249
src/pages/product/productAdd/index.vue


+ 5 - 1
src/pages/setting/step/index.vue

@@ -45,6 +45,9 @@
 				<FormItem label="股权:" prop="shareholding">
 					<Input v-model="updata.shareholding" type="text" style="width: 100%" />
 				</FormItem>
+				<FormItem label="未达业绩扣款:" prop="money">
+					<Input v-model="updata.money" type="text" style="width: 100%" />
+				</FormItem>
 			</Form>
 			<div slot="footer">
 				<Button type="primary" @click="goCancal">提交</Button>
@@ -83,7 +86,8 @@
 					shareholding: '',
 					sort: 1,
 					status: 1,
-					step: ''
+					step: '',
+					money:''
 				},
 				id: 51,
 				grid: {

+ 101 - 7
src/pages/user/list/handle/userDetails.vue

@@ -60,16 +60,43 @@
 						</template>
 						<template slot-scope="{ row }" slot="card_name">
 							<div>
-								<div class="title">{{ row.card_name }}(ID:{{ row.servicecard.id}})</div>
+								<div class="title">{{ row.card_name }}</div>
+								<div class="title">
+									订单号:{{row.order.order_id}}
+								</div>
+								<div class="title">ID:{{ row.servicecard.id}}</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="serviceCard">
+							<div class="product">
+								<div class="image" v-viewer>
+									<img v-lazy="row.serviceCard.image">
+								</div>
+								<div class="title">
+									<div>
+										{{ row.serviceCard.card_name }}
+									</div>
+									<div>
+										服务卡ID:{{row.serviceCard.id}}
+									</div>
+								</div>
+							</div>
+						</template>
+						<template slot-scope="{ row }" slot="number">
+							<div>
+								<span v-if="row.pm==1">+</span>
+								<span v-else>-</span>
+								<span>{{row.number}}</span>
+							</div>
+						</template>
 						<template slot-scope="{ row }" slot="add_time">
 							<div>
 								<div class="title" v-if="row.order">
-									{{row.add_time}}</div>
+									{{row.add_time}}
+								</div>
 								<div class="title" v-else>已失效</div>
 							</div>
 						</template>
@@ -80,7 +107,31 @@
 								</div>
 								<div class="title">
 									<div>
-										{{ item.product.store_name }}(ID:{{item.product.id}})
+										{{ item.product.store_name }}
+									</div>
+									<div>
+										ID:{{item.product.id}}
+									</div>
+									<div>
+										原价:{{ item.product.price }}
+									</div>
+									<div>
+										剩余次数:{{ item.repertory }}
+									</div>
+								</div>
+							</div>
+						</template>
+						<template slot-scope="{ row }" slot="serveInfo">
+							<div class="product" v-for="item in row.info">
+								<div class="image" v-viewer>
+									<img v-lazy="item.product.image">
+								</div>
+								<div class="title">
+									<div>
+										{{ item.product.store_name }}
+									</div>
+									<div>
+										ID:{{item.product.id}}
 									</div>
 									<div>
 										原价:{{ item.product.price }}
@@ -150,8 +201,8 @@
 						label: '服务卡'
 					},
 					{
-						val: 'service_list',
-						label: '服务记录'
+						val: 'service_card_record',
+						label: '服务卡变动'
 					},
 					{
 						val: 'balance_change',
@@ -397,15 +448,23 @@
 				}
 				infoApi(data).then(async res => {
 					if (res.status === 200) {
-						let data = res.data
+						let data = res.data;
 						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');
+									res.add_time = this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
 								}
 								return res
 							});
+						} else if (this.userFrom.type == 'service_card_record') {
+							console.log(data,'data');
+							this.userLists = data.list.map((res) => {
+								const date = new Date(res.add_time * 1000);
+								res.add_time = this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
+								return res
+							});
+							console.log(this.userLists, 'this.userLists ')
 						} else {
 							this.userLists = data.list;
 						}
@@ -530,6 +589,41 @@
 									// }
 								]
 								break;
+							case 'service_card_record':
+								this.columns = [
+									{
+										title: '服务订单号',
+										key: 'link_id',
+										minWidth: 200
+									},
+									{
+										title: '服务卡',
+										slot: 'serviceCard',
+										minWidth: 250
+									},
+									{
+										title: '变化数量',
+										slot: 'number',
+										minWidth: 80
+									},
+									{
+										title: '变化后数量',
+										key: 'banlance',
+										minWidth: 80
+									},
+
+									{
+										title: '说明',
+										key: 'mark',
+										minWidth: 100
+									},
+									{
+										title: '变动时间',
+										key: 'add_time',
+										minWidth: 120
+									},
+								]
+								break;
 							case 'coupon':
 								this.columns = [{
 										title: '优惠券名称',

+ 2 - 2
src/pages/user/shareholder/list.vue

@@ -40,7 +40,7 @@
 					<Input type="number" v-model="fromHolder.bonus_share" placeholder="输入分红股权数量"></Input>
 				</FormItem>
 				<FormItem label="修改分红股权">
-					<RadioGroup v-model="fromHolder.initial_status">
+					<RadioGroup v-model="fromHolder.bonus_status">
 						<Radio label="1">增加</Radio>
 						<Radio label="2">减少</Radio>
 					</RadioGroup>
@@ -49,7 +49,7 @@
 					<Input type="number" v-model="fromHolder.initial_share" placeholder="输入原始股权数量"></Input>
 				</FormItem>
 				<FormItem label="修改原始股权">
-					<RadioGroup v-model="fromHolder.bonus_status">
+					<RadioGroup v-model="fromHolder.initial_status">
 						<Radio label="1">增加</Radio>
 						<Radio label="2">减少</Radio>
 					</RadioGroup>

+ 9 - 0
src/router/modules/order.js

@@ -66,6 +66,15 @@ export default {
             },
             component: () => import('@/pages/order/refund/index')
         },
+		{
+		    path: 'serve',
+		    name: `${pre}serve`,
+		    meta: {
+		        auth: ['admin-order-serve'],
+		        title: '员工订单统计'
+		    },
+		    component: () => import('@/pages/order/serveuser/index')
+		},
 		{
 		    path: 'reservation',
 		    name: `${pre}reservation`,

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff