lhl 2 år sedan
förälder
incheckning
d50bae34dd

+ 91 - 0
src/api/check.js

@@ -0,0 +1,91 @@
+import request from '@/plugins/request';
+
+
+/**
+ * 打卡规则列表
+ * @param {com} data 列表
+ */
+export function checkRuleList (data) {
+	return request({
+	    url: `work/checkRule`,
+	    method: 'post',
+		data
+	})
+}
+
+/**
+ * 添加打卡规则
+ * @param {com} data 
+ */
+export function addCheckRule(data) {
+	return request({
+	    url: `work/addCheckRule`,
+	    method: 'post',
+		data
+	})
+}
+
+/**
+ * 班次列表
+ * @param {com} data 列表
+ */
+export function getClasses(data) {
+	return request({
+	    url: `work/checkClasses`,
+	    method: 'get',
+		params: data
+	})
+}
+
+//添加员工
+export function addYg(data) {
+	return request({
+	    url: `work/add`,
+	    method: 'post',
+		data
+	})
+}
+
+//删除员工
+export function delYg(data) {
+	return request({
+	    url: `work/delete`,
+	    method: 'post',
+		data
+	})
+}
+// 编辑员工
+export function editYg(data) {
+	return request({
+	    url: `work/edit`,
+	    method: 'post',
+		data
+	})
+}
+
+//考勤组列表
+export function checkGroupList(data) {
+	return request({
+	    url: `work/checkGroup`,
+	    method: 'post',
+		data
+	});
+}
+
+//员工列表
+export function getYgList(data) {
+	return request({
+	    url: `work/member`,
+	    method: 'get',
+		params:data
+	})
+}
+
+
+//获取部门列表
+export function getDepartmentList () {
+    return request({
+        url: `work/department`,
+        method: 'get'
+    });
+}

+ 418 - 0
src/components/staffList/index.vue

@@ -0,0 +1,418 @@
+<template>
+	<div class="goodList">
+		<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="avatar">
+				<viewer>
+					<div class="tabBox_img">
+						<img v-lazy="row.avatar" />
+					</div>
+				</viewer>
+			</template>
+		</Table>
+		<div class="acea-row row-right page">
+			<Page :total="total" show-elevator show-total @on-change="pageChange" :page-size="formValidate.limit" />
+		</div>
+		<div class="footer" slot="footer">
+			<Button type="primary" size="large" :loading="modal_loading" long @click="ok">确定</Button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		getYgList
+	} from '@/api/check'
+	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: ""
+				},
+				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,
+						align: 'center'
+					},
+					{
+						title: "员工ID",
+						key: "id",
+					},
+					{
+						title: "头像",
+						slot: "avatar",
+						width: 60,
+					},
+					{
+						title: "员工姓名",
+						key: "name",
+						minWidth: 200,
+					},
+					{
+						title: "创建时间",
+						key: "create_time",
+						minWidth: 100,
+					},
+				],
+				columns5: [{
+						title: "商品ID",
+						key: "id",
+					},
+					{
+						title: "图片",
+						slot: "image",
+					},
+					{
+						title: "商品名称",
+						key: "name",
+						minWidth: 250,
+					},
+				],
+				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.getList();
+		},
+		methods: {
+			// 判断是否选中
+			sortData() {
+				if (this.selectEquipsIds.length) {
+					this.tableList.forEach(ele => {
+						if (this.selectEquipsIds.includes(ele.id)) ele._checked = true;
+					})
+				}
+			},
+			// 选中一行
+			TableSelectRow(selection, row) {
+				if (!this.selectEquipsIds.includes(row.id)) {
+					this.selectEquipsIds.push(row.id);
+					this.selectEquips.push(row);
+				}
+			},
+			// 取消选中一行
+			TableSelectCancelRow(selection, row) {
+				var _index = this.selectEquipsIds.indexOf(row.id);
+				if (_index != -1) {
+					this.selectEquipsIds.splice(_index, 1);
+					this.selectEquips.splice(_index, 1);
+				}
+			},
+			// 选中所有
+			selectAll() {
+				for (let i = this.tableList.length - 1; i >= 0; i--) {
+					this.TableSelectRow(null, this.tableList[i]);
+				}
+			},
+			// 取消选中所有
+			cancelAll() {
+				for (let i = this.tableList.length - 1; i >= 0; i--) {
+					this.TableSelectCancelRow(null, this.tableList[i]);
+				}
+			},
+			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();
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				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;
+						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 = [];
+				selection.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);
+				});
+				this.images = images;
+				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();
+			},
+			// 表格搜索
+			userSearchs() {
+				this.formValidate.page = 1;
+				this.getList();
+			},
+			clear() {
+				this.productRow.id = "";
+				this.currentid = "";
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	/deep/.ivu-table-header thead tr th {
+		padding: 8px 5px;
+	}
+
+	/deep/.ivu-radio-wrapper {
+		margin-right: 0 !important;
+	}
+
+	.footer {
+		margin: 15px 0;
+	}
+
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.tabform {
+		>>>.ivu-form-item {
+			margin-bottom: 16px !important;
+		}
+	}
+
+	.btn {
+		margin-top: 20px;
+		float: right;
+	}
+
+	.goodList {}
+
+	.mr-20 {
+		margin-right: 10px;
+	}
+</style>

+ 512 - 0
src/pages/check/classes/add.vue

@@ -0,0 +1,512 @@
+<template>
+	<div class="form-submit">
+		<div class="i-layout-page-header">
+			<PageHeader class="product_tabs" hidden-breadcrumb>
+				<div slot="title">
+					<router-link :to="{ path: `${roterPre}/store/checkRule/index` }">
+						<div class="font-sm after-line">
+							<span class="iconfont iconfanhui"></span>
+							<span class="pl10">返回</span>
+						</div>
+					</router-link>
+					<span v-text="$route.params.id ? '编辑打卡规则' : '添加打卡规则'" class="mr20 ml16"></span>
+				</div>
+			</PageHeader>
+		</div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form :model="formData" :label-width="150">
+				<FormItem label="规则名称" required>
+					<Input v-model="formData.groupname" v-width="320"></Input>
+				</FormItem>
+				<FormItem label="打卡规则" required>
+					<!-- <Input v-model="formData.groupname" v-width="320"></Input> -->
+					<template v-for="item in checkedStaff">
+						<Tag>{{item.name}}</Tag>
+					</template>
+					<Button type="primary" @click="chooseSatff">选择员工</Button>
+				</FormItem>
+				<card v-for="(itemx,indexx) in formData.checkindate" style="width:1000px;">
+					<card v-for="(item,index) in itemx.checkintime" style="margin-bottom: 10px;">
+						<FormItem label="时段id" required>
+							<Input v-width="320" placeholder="大于0,小于99999,且唯一" v-model="item.time_id"></Input>
+						</FormItem>
+						<FormItem label="上班时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.work_sec" />
+						</FormItem>
+						<FormItem label="上班最早时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.earliest_work_sec" />
+						</FormItem>
+						<FormItem label="上班最晚时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.latest_work_sec" />
+						</FormItem>
+						<FormItem label="上班提醒时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.remind_work_sec" />
+						</FormItem>
+						<FormItem label="下班时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.off_work_sec" />
+						</FormItem>
+						<FormItem label="下班最早时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.earliest_off_work_sec" />
+						</FormItem>
+						<FormItem label="下班最晚时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.latest_off_work_sec" />
+						</FormItem>
+						<FormItem label="下班提醒时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.remind_off_work_sec" />
+						</FormItem>
+					</card>
+				</card>
+
+
+			</Form>
+			<div style="width: 500px; display: flex;justify-content: center;">
+				<Button type="primary" class="submission" @click="save" :disabled="disabled"
+					v-if="!formData.id">立即创建</Button>
+				<Button type="primary" class="submission" @click="save" :disabled="disabled" v-else>立即修改</Button>
+				<Button type="primary" @click="showDate()">测试数据</Button>
+			</div>
+		</Card>
+		<Modal v-model="modals" title="员工列表" footerHide class="paymentFooter" scrollable width="900"
+			@on-cancel="cancel">
+			<staff-list ref="stafflist" :goodsType="1" v-if="modals" @getProductId="getProductId"
+				:serviceCard="1"></staff-list>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import staffList from "@/components/staffList/index";
+	import storeList from "@/components/storeList";
+	import {
+		couponCategoryApi,
+		couponSaveApi,
+		couponDetailApi,
+		VipEditApi,
+		serveAddApi,
+		serveReadApi,
+		createServeProduct
+	} from "@/api/marketing";
+	import {
+		addCheckRule
+	} from '@/api/store';
+	import {
+		brandList
+	} from "@/api/product";
+	// import { formatDate } from '@/utils/validate';
+	import Setting from "@/setting";
+	export default {
+		name: "storeCouponCreate",
+		components: {
+			storeList,
+			staffList
+		},
+		data() {
+			return {
+				checkedStaff: [],
+				modals: false, //选择员工弹出
+				value: '',
+				id: '',
+				work_sec: '',
+				roterPre: Setting.roterPre,
+				disabled: false,
+				storesList: [],
+				formData: {
+					groupname: '',
+					grouptype: 1, //规则类型: 1-固定时间上下班;2-按班次上下班;3-自由上下班
+					type: 2, //	打卡方式 0-手机,2-考勤机,3-手机/考勤机
+					loc_infos: [{
+						lat: 30547030,
+						lng: 104062890,
+						loc_title: "腾讯成都大厦",
+						loc_detail: "四川省成都市武侯区高新南区天府三街",
+						distance: 300
+					}],
+					wifimac_infos: [{
+						"wifiname": "Tencent-WiFi-1",
+						"wifimac": "c0:7b:bc:37:f8:d3"
+					}],
+					range: {
+						userid: [
+							"qywx4633487382413312"
+						]
+					}, //打卡人员
+					checkindate: [{
+						'workdays': [],
+						"checkintime": [{
+							"time_id": '1',
+							"work_sec": '', //上班时间(距0点秒数,整分钟)
+							"off_work_sec": '', //下班时间
+							"remind_work_sec": '', //上班提醒时间
+							"remind_off_work_sec": '', //下班提醒时间
+							"earliest_work_sec": '', //上班最早时间
+							"latest_work_sec": '', //上班最晚时间
+							"earliest_off_work_sec": '', //下班最早时间
+							"latest_off_work_sec": '' //	下班最晚时间
+						}],
+						"flex_on_duty_time": 0,
+						"flex_off_duty_time": 0
+					}]
+
+				},
+				id: 0,
+				product_name: '',
+				product_id: 0,
+				store_name: '',
+				repertory: '',
+				card_price: '',
+				explain: '',
+				unit_name: '',
+				image: '',
+				images: '',
+				modals: false,
+			}
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile", "menuCollapse"]),
+		},
+		created() {},
+		methods: {
+			// 测试数据
+			showDate() {
+				console.log('shuju', this.formData)
+			},
+			// 打开员工选择弹窗
+			chooseSatff() {
+				this.modals = true;
+			},
+			changeT(e) {
+				// close()
+				console.log(e, 'dddddddddddddd')
+			},
+			showTime(time) {
+
+				let hh = '',
+					mm = '';
+				hh = Math.floor(time / 3600);
+				hh = hh > 9 ? hh : ('0' + hh)
+				mm = Math.floor((time % 3600) / 60);
+				mm = mm > 9 ? mm : ('0' + mm)
+				let str = hh + ':' + mm + ':' + '00'
+				console.log('str:', str)
+				return str
+
+
+			},
+			addNewDk(item) {
+				item.checkintime.push({
+					"time_id": '',
+					"work_sec": '', //上班时间(距0点秒数,整分钟)
+					"off_work_sec": '', //下班时间
+					"remind_work_sec": '', //上班提醒时间
+					"remind_off_work_sec": '', //下班提醒时间
+					"earliest_work_sec": '', //上班最早时间
+					"latest_work_sec": '', //上班最晚时间
+					"earliest_off_work_sec": '', //下班最早时间
+					"latest_off_work_sec": '' //	下班最晚时间
+				})
+			},
+			addNewDkTime() {
+				this.formData.checkindate.push({
+					'workdays': [],
+					"checkintime": [{
+						"time_id": '',
+						"work_sec": '', //上班时间(距0点秒数,整分钟)
+						"off_work_sec": '', //下班时间
+						"remind_work_sec": '', //上班提醒时间
+						"remind_off_work_sec": '', //下班提醒时间
+						"earliest_work_sec": '', //上班最早时间
+						"latest_work_sec": '', //上班最晚时间
+						"earliest_off_work_sec": '', //下班最早时间
+						"latest_off_work_sec": '' //	下班最晚时间
+					}],
+					"flex_on_duty_time": 0,
+					"flex_off_duty_time": 0
+				})
+			},
+
+			delNewDkTime(index) {
+				this.formData.checkindate.splice(index, 1)
+			},
+			delNewDk(item,index) {
+				item.splice(index, 1)
+			},
+			// 
+			onchangeTime(e) {
+				console.log(e, 'xuanz');
+			},
+			// 商品id
+			getProductId(row) {
+				this.modals = false;
+				console.log(row, '这个');
+				this.checkedStaff = row
+				let arr = []
+				this.checkedStaff.forEach(item => {
+					arr.push(item.userid)
+				})
+				this.formData.range.userid = arr
+
+			},
+			// 选择商品
+			changeGoods() {
+				this.modals = true;
+			},
+			downTab() {
+				// if (!this.formData.store_name) {
+				// 	return this.$Message.error("请输入服务卡名称");
+				// }
+				// if (!this.formData.card_price) {
+				// 	return this.$Message.error("请输入售价");
+				// }
+				// if (!this.formData.repertory) {
+				// 	return this.$Message.error("请输入库存");
+				// }
+			},
+			getTime(str) {
+				if(typeof(str) == 'string') {
+					let arr = str.split(':')
+					return arr[0]*60*60 + arr[1]*60
+				}else {
+					return str
+				}
+				
+			},
+			// 创建
+			save() {
+				let that = this
+				this.downTab();
+				console.log('这');
+				let qdata = {}
+				qdata = Object.assign(qdata,this.formData)
+				try{
+					// let qdata = JSON.parse(JSON.stringify(this.formData))
+					let checkindate = []
+					this.formData.checkindate.forEach(item => {
+						// checkindate.push(item.)
+						let mitem = []
+						item.checkintime.forEach(itemt => {
+							for(let key in itemt) {
+								// let val = ''
+								if(key != 'time_id') {
+									itemt[key] = that.getTime(itemt[key])
+								}else {
+									itemt[key] = itemt[key]*1
+								}
+							}
+							mitem.push(itemt)
+						})
+						item.checkintime = mitem
+						checkindate.push(item)
+					})
+					qdata.checkindate = checkindate
+					console.log(qdata,'this.formData')
+				}catch(e){
+					//TODO handle the exception
+					console.log(e,'cuow')
+				}
+				
+				
+				addCheckRule({
+						'group': qdata
+					})
+					.then((res) => {
+						this.disabled = true;
+						this.$Message.success(res.msg);
+						setTimeout(() => {
+							this.$router.push({
+								path: this.roterPre + "/store/checkRule/index",
+							});
+						}, 1000);
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			cancel() {
+				this.modals = false;
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tips {
+		display: inline-bolck;
+		font-size: 12px;
+		font-weight: 400;
+		color: #999999;
+		margin-top: 10px;
+	}
+
+	.imgPic {
+		.info {
+			width: 60%;
+			margin-left: 10px;
+		}
+
+		.pictrue {
+			height: 36px;
+			margin: 7px 3px 0 3px;
+
+			img {
+				height: 100%;
+				display: block;
+			}
+		}
+	}
+
+	.productType {
+		width: 120px;
+		height: 60px;
+		background: #FFFFFF;
+		border-radius: 3px;
+		border: 1px solid #E7E7E7;
+		float: left;
+		text-align: center;
+		padding-top: 8px;
+		position: relative;
+		cursor: pointer;
+		line-height: 23px;
+		margin-right: 12px;
+
+		&.on {
+			border-color: #1890FF;
+		}
+
+		.name {
+			font-size: 14px;
+			font-weight: 600;
+			color: rgba(0, 0, 0, 0.85);
+
+			&.on {
+				color: #1890FF;
+			}
+		}
+
+		.title {
+			font-size: 12px;
+			font-weight: 400;
+			color: #999999;
+		}
+
+		.jiao {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			width: 0;
+			height: 0;
+			border-bottom: 26px solid #1890FF;
+			border-left: 26px solid transparent;
+		}
+
+		.iconfont {
+			position: absolute;
+			bottom: -3px;
+			right: 1px;
+			color: #FFFFFF;
+			font-size: 12px;
+		}
+	}
+
+	.info {
+		color: #888;
+		font-size: 12px;
+	}
+
+	.ivu-input-wrapper {
+		width: 320px;
+	}
+
+	.ivu-input-number {
+		width: 160px;
+	}
+
+	.ivu-date-picker {
+		width: 320px;
+	}
+
+	.ivu-icon-ios-camera-outline {
+		width: 58px;
+		height: 58px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		border-radius: 4px;
+		background-color: rgba(0, 0, 0, 0.02);
+		line-height: 58px;
+		cursor: pointer;
+		vertical-align: middle;
+	}
+
+	.upload-list {
+		width: 58px;
+		height: 58px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		border-radius: 4px;
+		margin-right: 15px;
+		display: inline-block;
+		position: relative;
+		cursor: pointer;
+		vertical-align: middle;
+	}
+
+	.upload-list img {
+		display: block;
+		width: 100%;
+		height: 100%;
+	}
+
+	.ivu-icon-ios-close-circle {
+		position: absolute;
+		top: 0;
+		right: 0;
+		transform: translate(50%, -50%);
+	}
+
+	.form-submit {
+		/deep/.ivu-card {
+			border-radius: 0;
+		}
+
+		margin-bottom: 79px;
+
+		.fixed-card {
+			position: fixed;
+			right: 0;
+			bottom: 0;
+			left: 200px;
+			z-index: 99;
+			box-shadow: 0 -1px 2px rgb(240, 240, 240);
+
+			/deep/ .ivu-card-body {
+				padding: 15px 16px 14px;
+			}
+
+			.ivu-form-item {
+				margin-bottom: 0;
+			}
+
+			/deep/ .ivu-form-item-content {
+				margin-right: 124px;
+				text-align: center;
+			}
+
+			.ivu-btn {
+				height: 36px;
+				padding: 0 20px;
+			}
+		}
+	}
+
+	/deep/.vxe-tree-cell {
+		padding-left: 0 !important;
+	}
+</style>

+ 300 - 0
src/pages/check/classes/index.vue

@@ -0,0 +1,300 @@
+<template>
+	<div>
+		<div class="i-layout-page-header">
+			<PageHeader class="product_tabs" title="会员卡" hidden-breadcrumb></PageHeader>
+		</div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form ref="tableFrom" :model="tableFrom" :label-width="labelWidth" :label-position="labelPosition"
+				@submit.native.prevent>
+				<Row type="flex">
+					<Col v-bind="grid">
+					<Button v-auth="['admin-store-classes-add']" type="primary" icon="md-add"
+						@click="add">添加班次</Button>
+					</Col>
+				</Row>
+			</Form>
+			<Table :columns="columns1" :data="tableList" ref="table" class="mt25" :loading="loading" highlight-row
+				no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+				<template slot-scope="{ row, index }" slot="groupname">
+					{{row.checkin_option.groupname}}
+				</template>
+				<!-- workdays -->
+				<template slot-scope="{ row, index }" slot="workdays">
+					<el-tag v-for="witem in row.checkin_option.checkindate[0].workdays">{{witem | showWd}}</el-tag>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<Icon type="md-checkmark" v-if="row.status === 1" color="#0092DC" size="14" />
+					<Icon type="md-close" v-else color="#ed5565" size="14" />
+				</template>
+				<template slot-scope="{ row, index }" slot="time">
+					<!-- <span> {{row.add_time | formatDate}}</span> -->
+					<div v-for="time in row.time" style="margin-top: 10px;">
+						<span>{{time.work_sec| showTime}} </span> - <span>{{time.off_work_sec | showTime}}</span>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="add_time">
+					<span> {{row.add_time | formatDate}}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<!-- <a @click="couponSend(row)">编辑</a>
+					<Divider type="vertical" /> -->
+					<a @click="couponDel(row,'删除会员卡',index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+		<!--表单编辑-->
+		<edit-from :FromData="FromData" @changeType="changeType" ref="edits"></edit-from>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		checkGroupList,
+		checkRuleList,
+		getClasses
+	} from '@/api/store';
+	import editFrom from '@/components/from/from';
+	import {
+		formatDate
+	} from '@/utils/validate';
+	import Setting from "@/setting";
+	export default {
+		name: 'storeCoupon',
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, 'yyyy-MM-dd hh:mm');
+				}
+			},
+			showWd(day) {
+				let str = ''
+				if(day) {
+					switch (day*1){
+						case 1:
+							str = '星期一'
+							break;
+						case 2:
+							str = '星期二'
+							break;
+						case 3:
+							str = '星期三'
+							break;
+						case 4:
+							str = '星期四'
+							break;
+						case  5:
+							str = '星期五'
+							break;
+						case 6:
+							str = '星期六'
+							break;
+						case  0:
+							str = '星期日'
+							break;
+						default:
+							break;
+					}
+				}
+				return str
+			}
+		},
+		components: {
+			editFrom
+		},
+		filters: {
+			showTime(seconds) {
+				  
+
+				if(seconds ) {
+					var hours = Math.floor(seconds / 3600);
+					var minutes = Math.floor((seconds % 3600) / 60);
+					return (hours > 9?hours: '0' + hours ) + ": " + (minutes>9?minutes: '0'+ minutes) 
+				}
+			}
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24
+				},
+				loading: false,
+				columns1: [{
+						title: 'ID',
+						key: 'id',
+						width: 80
+					},
+					{
+						title: '班次名称',
+						key: 'name',
+						minWidth: 150
+					},
+					{
+						title: '打卡奖励',
+						key: 'price',
+						minWidth: 80
+					},
+					{
+						title: '打卡时段',
+						slot: 'time',
+						minWidth: 100
+					},
+					{
+						title: '添加时间',
+						key: 'create_time',
+						minWidth: 100
+					},
+					// {
+					//     title: '折扣',
+					//     key: 'discount_ratio',
+					//     minWidth: 100
+					// },
+					{
+						title: '操作',
+						slot: 'action',
+						fixed: 'right',
+						minWidth: 170
+					}
+				],
+				tableFrom: {
+					page: 1,
+					limit: 15
+				},
+				tableList: [],
+				total: 0,
+				FromData: null
+			}
+		},
+		created() {
+			this.getList();
+		},
+		computed: {
+			...mapState('admin/layout', [
+				'isMobile'
+			]),
+			labelWidth() {
+				return this.isMobile ? undefined : 90;
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'left';
+			}
+		},
+		methods: {
+			// 失效
+			couponInvalid(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `marketing/coupon/status/${row.id}`,
+					method: 'PUT',
+					ids: ''
+				};
+				this.$modalSure(delfromData).then((res) => {
+					this.$Message.success(res.msg);
+					this.getList();
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				});
+			},
+			// 发布
+			couponSend(row) {
+				// this.$modalForm(VipEditApi(row.id)).then(() => this.getList());
+				this.$router.push({
+					path: this.roterPre + "/store/checkRule/create"
+				});
+			},
+			// 删除
+			couponDel(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					url: `membership/deleteCard/${row.id}`,
+					method: 'DELETE',
+					ids: ''
+				};
+				this.$modalSure(delfromData).then((res) => {
+					this.$Message.success(res.msg);
+					this.tableList.splice(num, 1)
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+
+				getClasses(this.tableFrom).then(async res => {
+					let data = res.data
+					this.tableList = data.list;
+					this.total = res.data.count;
+					this.loading = false;
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			changeType(data) {
+				this.type = data;
+			},
+			// 添加
+			add() {
+				// this.$modalForm(couponCreateApi()).then(() => this.getList());
+				this.$router.push({
+					path: this.roterPre + "/store/classes/create"
+				});
+				// this.addType(0);
+			},
+			addType(type) {
+				couponCreateApi(type).then(async res => {
+					if (res.data.status === false) {
+						return this.$authLapse(res.data);
+					}
+					// console.log()
+					console.log(res.data, 'res.data');
+					this.FromData = res.data;
+					this.$refs.edits.modals = true;
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				})
+			},
+			// 编辑
+			edit(row) {
+				this.$modalForm(couponEditeApi(row.id)).then(() => this.getList());
+			},
+			// 表格搜索
+			userSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 修改成功
+			submitFail() {
+				this.getList();
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.ivu-col:nth-of-type(1) .ivu-form-item .ivu-form-item-label {
+		width: 80px !important;
+	}
+
+	.ivu-col:nth-of-type(1) .ivu-form-item .ivu-form-item-content {
+		margin-left: 80px !important;
+	}
+</style>

+ 495 - 0
src/pages/check/components/addStaff.vue

@@ -0,0 +1,495 @@
+<template>
+	<div>
+		<Modal v-model="isTemplate" scrollable footer-hide closable :title="title" :z-index="1" width="700"
+			@on-cancel="cancel">
+			<div class="article-manager">
+				<Card :bordered="false" dis-hover>
+					<Form ref="formItem" :model="formItem" :label-width="labelWidth" :label-position="labelPosition"
+						:rules="ruleValidate" @submit.native.prevent>
+						<Row type="flex" :gutter="24">
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="头像:" prop="image">
+								<div class="picBox" @click="modalPicTap('image')">
+									<div class="pictrue" v-if="formItem.avatar"><img v-lazy="formItem.avatar"></div>
+									<div class="upLoad" v-else>
+										<div class="iconfont">+</div>
+									</div>
+								</div>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="姓名:" prop="name" label-for="name">
+								<Input v-model="formItem.name" placeholder="请输入姓名" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="别名:" prop="name" label-for="alias">
+								<Input v-model="formItem.alias" placeholder="请输入别名" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="手机号:" label-for="mobile" prop="mobile">
+								<Input v-model="formItem.mobile" placeholder="请输入手机号" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24" class="mt20">
+							<Col v-bind="grid">
+							<FormItem label="性别:">
+								<RadioGroup v-model="formItem.gender">
+									<Radio :label="0">
+										<Icon type="social-apple"></Icon>
+										<span>女</span>
+									</Radio>
+									<Radio :label="2">
+										<Icon type="social-android"></Icon>
+										<span>男</span>
+									</Radio>
+								</RadioGroup>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="职务:" label-for="position" prop="position">
+								<Input v-model="formItem.position" placeholder="请输入职务" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="住址:" label-for="address" prop="address">
+								<Input v-model="formItem.address" placeholder="请输入住址" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="部门:" label-for="main_department" prop="main_department">
+								<el-cascader placeholder="请选择部门" :options="departmentList"
+									:value="formItem.main_department" v-width="320"
+									:props="{ checkStrictly: true,value: 'id',label: 'name' }" clearable
+									@change="changeBm"></el-cascader>
+							</FormItem>
+							</Col>
+							</Col>
+						</Row>
+						<Row style="justify-content: space-around;">
+							<Col>
+							<Button type="primary" class="btn" @click="handleSubmit('formItem')">提交</Button>
+							</Col>
+						</Row>
+						<Spin size="large" fix v-if="spinShow"></Spin>
+					</Form>
+				</Card>
+			</div>
+		</Modal>
+		<Modal
+		        v-model="modalPic"
+		        width="960px"
+		        scrollable
+		        footer-hide
+		        closable
+		        title="上传头像"
+		        :mask-closable="false"
+		        :z-index="1"
+		>
+		    <uploadPictures
+		            :isChoice="isChoice"
+		            @getPic="getPic"
+		            :gridBtn="gridBtn"
+		            :gridPic="gridPic"
+		            v-if="modalPic"
+		    ></uploadPictures>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	// import { keyApi} from '@/api/setting';
+	import uploadPictures from "@/components/uploadPictures";
+	import goodsList from '@/components/goodsList'
+	import {
+		keyApi,
+		storeGetInfoApi,
+		cityApi,
+		storeUpdateApi,
+		cascaderList,
+		staffListInfo,
+		getDepartmentList,
+		addYg,
+		editYg
+	} from '@/api/check';
+	import {
+		erpConfig
+	} from "@/api/erp";
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		name: 'systemSt',
+		components: {
+			goodsList,
+			uploadPictures
+		},
+		props: {},
+		data() {
+			let validatePhone = (rule, value, callback) => {
+				if (!value) {
+					return callback(new Error('请填写手机号'));
+				} else if (!/^1[3456789]\d{9}$/.test(value)) {
+					callback(new Error('手机号格式不正确!'));
+				} else {
+					callback();
+				}
+			};
+			let validateUpload = (rule, value, callback) => {
+				if (!this.formItem.avatar) {
+					callback(new Error('请上传头像'))
+				} else {
+					callback()
+				}
+			};
+			return {
+				isEdit: 0, //0->添加 1->编辑
+				staffData: [],
+				goodsList: [],
+				modals: false,
+				treeSelect: [],
+				modalErp: false,
+				openErp: false,
+				isTemplate: false,
+				title: '',
+				formItem: {
+					name: '',
+					avatar: '',
+					mobile: '',
+					alias: '',
+					address: '',
+					main_department: '',
+					direct_leader: 'ZhouFengYu',
+					position: ''
+				},
+				spinShow: false,
+				addresData: [],
+				ruleValidate: {
+					name: [{
+						required: true,
+						message: '请输入姓名',
+						trigger: 'blur'
+					}],
+					address: [{
+						required: true,
+						message: '请输入地址地址',
+						trigger: 'blur'
+					}],
+
+					mobile: [{
+						required: true,
+						validator: validatePhone,
+						trigger: 'blur'
+					}],
+					avatar: [{
+						required: true,
+						validator: validateUpload,
+						trigger: 'change'
+					}]
+				},
+				grid: {
+					xl: 20,
+					lg: 20,
+					md: 20,
+					sm: 24,
+					xs: 24
+				},
+				gridPic: {
+					xl: 6,
+					lg: 8,
+					md: 12,
+					sm: 12,
+					xs: 12
+				},
+				gridBtn: {
+					xl: 4,
+					lg: 8,
+					md: 8,
+					sm: 8,
+					xs: 8
+				},
+				modalPic: false,
+				isChoice: '单选',
+				pid: 0,
+				isApi: 0,
+				add: 0,
+				departmentList: []
+			}
+		},
+		created() {
+			this.getDepartmentList()
+			let data = {
+				pid: 0
+			}
+			if (this.isEdit == 0) {
+				this.formItem = {
+					name: '',
+					avatar: '',
+					mobile: '',
+					alias: '',
+					address: '',
+					main_department: '',
+					direct_leader: 'ZhouFengYu',
+					position: ''
+				}
+			}
+		},
+		computed: {
+			...mapState('admin/layout', [
+				'isMobile'
+			]),
+			labelWidth() {
+				return this.isMobile ? undefined : 120;
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'right';
+			}
+		},
+		mounted: function() {},
+		methods: {
+			handleRemove() {
+			    this.formValidate.avatar = '';
+			    // this.$refs.formValidate.validateField('image');
+			},
+			changeBm(res) {
+				console.log(res);
+				this.formItem.main_department = res[res.length - 1]
+				this.formItem.department = [this.formItem.main_department]
+			},
+			getDepartmentList() {
+				getDepartmentList().then(res => {
+					console.log(res);
+					this.departmentList = res.data
+				})
+			},
+			userSearchs() {
+				// this.orderData.page = 1;
+				// this.searchList();
+			},
+			
+			//对象数组去重;
+			unique(arr) {
+				const res = new Map();
+				return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1))
+			},
+			getGoodsId(data) {
+				let list = this.goodsList.concat(data);
+				let uni = this.unique(list);
+				this.goodsList = uni;
+				this.$nextTick(res => {
+					setTimeout(() => {
+						this.modals = false
+					}, 300)
+				})
+			},
+			bindDelete(index) {
+				this.goodsList.splice(index, 1)
+			},
+			// 门店分类;
+			goodsCategory() {
+				cascaderList(1).then(res => {
+					this.treeSelect = res.data;
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				})
+			},
+			getProductId(id) {
+				this.formItem.erp_shop_id = id;
+				this.modalErp = false;
+				this.$refs.formItem.validateField("erp_shop_id");
+			},
+			tapErp() {
+				this.$refs.refErp.currentid = this.formItem.erp_shop_id;
+				this.modalErp = true;
+				this.$refs.formItem.validateField("erp_shop_id");
+			},
+			getErpConfig() {
+				erpConfig().then(res => {
+					this.openErp = res.data.open_erp;
+				}).catch(err => {
+					this.$Message.error(err.msg);
+				})
+			},
+			clearFrom() {
+				this.goodsList = [];
+				this.formItem = {
+					name: '',
+					avatar: '',
+					mobile: '',
+					alias: '',
+					address: '',
+					main_department: '',
+					direct_leader: 'ZhouFengYu'
+				}
+				this.add = 0;
+				this.isApi = 0;
+			},
+			cancel() {
+				console.log('关闭');
+				this.isTemplate = false;
+				this.clearFrom();
+			},
+			// 选择图片
+			modalPicTap() {
+				this.modalPic = true;
+				this.$refs.formItem.validateField("avatar")
+			},
+			// 选中图片
+			getPic(pc) {
+				this.formItem.avatar = pc.att_dir;
+				this.modalPic = false;
+				// this.$refs.formItem.validateField("avatar")
+			},
+			// 提交
+			handleSubmit(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						if (this.formItem.id) {
+							editYg({
+								id: this.formItem.id,
+								name: this.formItem.name,
+								avatar: this.formItem.avatar,
+								mobile: this.formItem.mobile,
+								alias: this.formItem.alias,
+								address: this.formItem.address,
+								main_department: this.formItem.main_department,
+								department: this.formItem.department,
+								uid: this.formItem.uid,
+								userid: this.formItem.userid,
+								direct_leader: 'ZhouFengYu',
+								position: this.formItem.position
+							}).then(async res => {
+								this.$Message.success(res.msg);
+								this.isTemplate = false;
+								this.$emit('success')
+								// this.clearFrom();
+							}).catch(res => {
+								this.$Message.error(res.msg);
+							})
+						} else {
+							addYg(this.formItem).then(async res => {
+								this.$Message.success(res.msg);
+								this.isTemplate = false;
+								this.$emit('success')
+								// this.clearFrom();
+							}).catch(res => {
+								this.$Message.error(res.msg);
+							})
+						}
+
+					} else {
+						return false;
+					}
+				})
+
+			}
+		}
+	}
+</script>
+
+<style scoped lang="stylus">
+	.tips {
+		display: inline-bolck;
+		font-size: 12px;
+		font-weight: 400;
+		color: #999;
+	}
+
+	.box {
+		display flex flex-wrap wrap .box-item {
+			position relative margin-right 20px width 60px height 60px margin-bottom 10px img {
+				width 100% height 100%
+			}
+
+			.icon {
+				position absolute;
+				top: -10px;
+				right -10px;
+			}
+		}
+
+		.upload-box {
+			width 60px height 60px margin-bottom 10px display flex align-items center justify-content center background #ccc
+		}
+	}
+
+	.map-sty {
+		width: 90%;
+		text-align: right;
+		margin: 0 0 0 10%;
+	}
+
+	/deep/.ivu-card-body {
+		padding 16px 0 0 0 !important;
+	}
+
+	.footer {
+		width 100%;
+		height 50px;
+		box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.05);
+		margin-top 50px;
+	}
+
+	.btn /deep/.ivu-btn-primary {
+		width 86px;
+	}
+
+	.btn {
+		margin-top: 20px;
+	}
+
+	.inputW {
+		width 400px;
+	}
+
+	.ivu-mt {
+		min-width 580px;
+	}
+
+	.picBox {
+		display: inline-block;
+		cursor: pointer;
+
+		.upLoad {
+			width: 58px;
+			height: 58px;
+			line-height: 58px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			border-radius: 4px;
+			background: rgba(0, 0, 0, 0.02);
+		}
+
+		.pictrue {
+			width: 60px;
+			height: 60px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			margin-right: 10px;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.iconfont {
+			color: #CCCCCC;
+			font-size 26px;
+			text-align center;
+		}
+	}
+</style>

+ 685 - 0
src/pages/check/components/addStore.vue

@@ -0,0 +1,685 @@
+<template>
+    <div>
+        <Modal v-model="isTemplate" scrollable  footer-hide closable :title="title"  :z-index="1" width="700" @on-cancel="cancel">
+            <div class="article-manager">
+                <Card :bordered="false" dis-hover>
+                    <Form ref="formItem" :model="formItem" :label-width="labelWidth" :label-position="labelPosition" :rules="ruleValidate" @submit.native.prevent>
+                        <Row type="flex" :gutter="24">
+							<Col span="24" v-if="openErp">
+								<Col v-bind="grid">
+									<FormItem label="erp门店:" prop="erp_shop_id">
+										<Button @click="tapErp">{{formItem.erp_shop_id?formItem.erp_shop_id:"请选择erp门店"}}</Button>
+									</FormItem>
+								</Col>
+							</Col>
+							<Col span="24">
+							    <Col v-bind="grid">
+							        <FormItem label="门店照片:" prop="image">
+							            <div class="picBox" @click="modalPicTap('单选')">
+							                <div class="pictrue" v-if="formItem.image"><img v-lazy="formItem.image"></div>
+							                <div class="upLoad" v-else>
+												<div class="iconfont">+</div>
+							                </div>
+							            </div>
+							        </FormItem>
+							    </Col>
+							</Col>
+              <Col span="24">
+                 <Col v-bind="grid" >
+                    <FormItem label="门店分类:" prop="cate_id" label-for="cate_id">
+                      <Cascader
+                          :data="treeSelect"
+                          placeholder="请选择门店分类"
+                          change-on-select
+                          v-model="formItem.cate_id"
+                          filterable
+                      ></Cascader>
+                    </FormItem>
+                 </Col>
+              </Col>
+							<Col span="24" v-if="formItem.id == 0">
+							    <Col v-bind="grid" >
+							        <FormItem label="管理员账号:" prop="store_account" label-for="store_account">
+							            <Input v-model="formItem.store_account"  placeholder="请输入管理员账号"/>
+							        </FormItem>
+							    </Col>
+							</Col>
+							<Col span="24"  v-if="formItem.id == 0">
+							    <Col v-bind="grid">
+							        <FormItem label="管理员密码:" prop="store_password" label-for="store_password">
+							            <Input type="password" v-model="formItem.store_password"  placeholder="请输入管理员密码"/>
+							        </FormItem>
+							    </Col>
+							</Col>
+                            <Col span="24">
+                                <Col v-bind="grid">
+                                    <FormItem label="门店名称:" prop="name" label-for="name">
+                                        <Input v-model="formItem.name"  maxlength="20" show-word-limit  placeholder="请输入门店名称"/>
+                                    </FormItem>
+                                </Col>
+                            </Col>
+                            <Col span="24">
+                            	<Col v-bind="grid">
+                            		<FormItem label="门店简介:" label-for="introduction">
+                            			<Input v-model="formItem.introduction"  maxlength="100" show-word-limit :rows="4" :autosize="{maxRows:4,minRows: 4}" type="textarea"   placeholder="请输入门店简介"s/>
+                            		</FormItem>
+                            	</Col>
+                            </Col>
+                            <Col span="24">
+                                <Col v-bind="grid">
+                                    <FormItem label="门店手机号:" label-for="phone" prop="phone">
+                                        <Input v-model="formItem.phone"  placeholder="请输入门店手机号"/>
+                                    </FormItem>
+                                </Col>
+                            </Col>
+							<Col span="24">
+								<Col v-bind="grid">
+									<FormItem label="营业状态:" label-for="is_show" prop="is_show">
+										<Switch size="large" v-model="formItem.is_show" :false-value="0" :true-value="1">
+											<span slot="open" :true-value="1">开启</span>
+											<span slot="close" :false-value="0">关闭</span>
+										</Switch>
+									</FormItem>
+								</Col>
+							</Col>
+							<Col span="24">
+								<Col v-bind="grid" v-if="formItem.is_show == 1">
+									<FormItem label="营业时间:" label-for="day_time"  prop="day_time">
+										<TimePicker type="timerange" @on-change="onchangeTime" v-model="formItem.day_time"  format="HH:mm:ss" :value="formItem.day_time" placement="bottom-end" placeholder="请选择营业时间" class="inputW" ></TimePicker>
+									</FormItem>
+								</Col>
+							</Col>
+              <Col span="24">
+                <Col v-bind="grid">
+                  <FormItem label="门店类型:">
+                    <RadioGroup v-model="formItem.type">
+                      <Radio :label="1">
+                        <Icon type="social-apple"></Icon>
+                        <span>自营</span>
+                      </Radio>
+                      <Radio :label="2">
+                        <Icon type="social-android"></Icon>
+                        <span>加盟</span>
+                      </Radio>
+                    </RadioGroup>
+                    <div class="tips">自营店不支持自主上传商品,加盟店有自主上传商品的权限</div>
+                  </FormItem>
+                </Col>
+              </Col>
+							<Col span="24" v-if="formItem.type==2">
+								<Col v-bind="grid">
+									<FormItem label="商品免审:" label-for="product_verify_status" prop="product_verify_status">
+										<Switch size="large" v-model="formItem.product_verify_status" :false-value="0" :true-value="1">
+											<span slot="open" :true-value="1">开启</span>
+											<span slot="close" :false-value="0">关闭</span>
+										</Switch>
+									</FormItem>
+								</Col>
+							</Col>
+              <Col span="24" v-if="formItem.type==2">
+                <Col v-bind="grid">
+                  <FormItem label="自主添加商品:" label-for="product_status" prop="product_status">
+                    <Switch size="large" v-model="formItem.product_status" :false-value="0" :true-value="1">
+                      <span slot="open" :true-value="1">开启</span>
+                      <span slot="close" :false-value="0">关闭</span>
+                    </Switch>
+                  </FormItem>
+                </Col>
+              </Col>
+							<Col span="24">
+								<Col v-bind="grid">
+									<FormItem label="到店自提:" label-for="mention" prop="mention">
+										<Switch size="large" v-model="formItem.is_store" :false-value="0" :true-value="1">
+											<span slot="open" :true-value="1">开启</span>
+											<span slot="close" :false-value="0">关闭</span>
+										</Switch>
+									</FormItem>
+								</Col>
+							</Col>
+                            <Col span="24">
+                            	<Col v-bind="grid">
+                            		<FormItem label="门店地址:" label-for="address" prop="address">
+                            			<Cascader :data="addresData" :load-data="loadData" v-model="formItem.addressSelect" @on-change="addchack" class="inputW"></Cascader>
+                            		</FormItem>
+                            	</Col>
+                            </Col>
+							<Col span="24">
+								<Col v-bind="grid">
+									<FormItem required label="配送范围(半径):" label-for="valid_range" prop="valid_range">
+										<InputNumber :min="0.01" :max="100000" v-model="formItem.valid_range" :formatter="value => `${formItem.valid_range}`" :parser="value => value.replace('%', '')" style="width: 90px;"></InputNumber><span class="ml10">km</span>
+									</FormItem>
+								</Col>
+							</Col>
+                            <Col span="24">
+                            	<Col v-bind="grid">
+                            		<FormItem label="门店详细地址:" label-for="detailed_address" prop="detailed_address">
+                            			<Input search enter-button="查找位置" v-model="formItem.detailed_address"  placeholder="输入地址(包含城市名称,否则会影响搜索精度)" class="inputW" @on-search="onSearch" />
+                            		  <!-- 提示:定位地址后,手动补充完详细地址,禁止再次点击查找 -->
+									</FormItem>
+                            	</Col>
+                            </Col>
+							<Col span="24" v-if="isApi || add">
+								<Maps v-if="mapKey" ref="mapChild" class="map-sty" :mapKey="mapKey" :lat="Number(formItem.latitude || 34.34127)" :lon="Number(formItem.longitude || 108.93984)" :address="formItem.detailed_address" @getCoordinates="getCoordinates" />
+							</Col>
+                          <Col span="24" class="mt20" v-if="!formItem.id">
+                            <Col v-bind="grid">
+                              <FormItem label="同步商品:">
+                                <RadioGroup v-model="formItem.applicable_type">
+                                  <Radio :label="1">
+                                    <Icon type="social-apple"></Icon>
+                                    <span>全部商品</span>
+                                  </Radio>
+                                  <Radio :label="2">
+                                    <Icon type="social-android"></Icon>
+                                    <span>部分商品</span>
+                                  </Radio>
+                                </RadioGroup>
+                              </FormItem>
+                            </Col>
+                          </Col>
+                          <Col span="24" v-if="!formItem.id && formItem.applicable_type == 2" >
+                          <FormItem label="选择商品:" label-for="product_id" prop="">
+                            <div class="box">
+                              <div class="box-item" v-for="(item,index) in goodsList" :key="index">
+                                <img :src="item.image" alt="">
+                                <Icon class="icon" type="ios-close-circle" size="20" @click="bindDelete(index)" />
+                              </div>
+                              <div class="upload-box" @click="modals = true"><Icon type="ios-camera-outline" size="36" /></div>
+                            </div>
+                          </FormItem>
+                        </Col>
+                        </Row>
+                        <Row style="justify-content: space-around;">
+                            <Col>
+                                <Button type="primary" class="btn" @click="handleSubmit('formItem')">{{formItem.id!=0?'修改':'提交'}}</Button>
+                            </Col>
+                        </Row>
+                        <Spin size="large" fix v-if="spinShow"></Spin>
+                    </Form>
+                </Card>
+
+                <Modal v-model="modalPic" width="960px" scrollable  footer-hide closable title='上传提货点logo' :mask-closable="false" :z-index="1">
+                    <uploadPictures :isChoice="isChoice" @getPic="getPic" :gridBtn="gridBtn" :gridPic="gridPic" v-if="modalPic"></uploadPictures>
+                </Modal>
+				<Modal v-model="modalErp" width="700px" scrollable  footer-hide closable title='erp门店' :mask-closable="false" :z-index="1">
+					<erpList ref="refErp" @getProductId="getProductId"></erpList>
+				</Modal>
+            </div>
+        </Modal>
+        <Modal v-model="modals" title="商品列表"  class="paymentFooter" scrollable width="900" :footer-hide="true">
+          <goods-list ref="goodslist"  @getProductId="getGoodsId" v-if="modals" :ischeckbox="true" :isLive="true" :storeType="1"></goods-list>
+        </Modal>
+    </div>
+</template>
+
+<script>
+	// import { keyApi} from '@/api/setting';
+  import goodsList from '@/components/goodsList'
+	import { keyApi, storeGetInfoApi, cityApi, storeUpdateApi, cascaderList } from '@/api/store';
+	import { erpConfig } from "@/api/erp";
+	// import { keyApi, storeUpdateApi, storeGetInfoApi, cityApi } from '@/api/setting';
+	import { mapState } from 'vuex';
+	import uploadPictures from '@/components/uploadPictures';
+	import erpList from './erpList.vue';
+	import Maps from '@/components/map/map.vue'
+	export default {
+		name: 'systemStore',
+		components: { uploadPictures,Maps,erpList,goodsList },
+		props: { },
+		data () {
+			let validatePhone = (rule, value, callback) => {
+				if (!value) {
+					return callback(new Error('请填写手机号'));
+				} else if (!/^1[3456789]\d{9}$/.test(value)) {
+					callback(new Error('手机号格式不正确!'));
+				} else {
+					callback();
+				}
+			};
+			let validateUpload = (rule, value, callback) => {
+				if (!this.formItem.image) {
+					callback(new Error('请上传门店照片'))
+				} else {
+					callback()
+				}
+			};
+			let validateErp = (rule, value, callback) => {
+				if (this.formItem.erp_shop_id == 0) {
+					callback(new Error('请选择erp门店'))
+				} else {
+					callback()
+				}
+			};
+			return {
+        goodsList:[],
+        modals:false,
+        treeSelect:[],
+				modalErp:false,
+				openErp:false,
+				isTemplate: false,
+				title: '',
+				formItem: {
+          product_id:[],
+          cate_id:[],
+					id: 0,
+					erp_shop_id: 0,
+					store_account: '',
+					store_password: '',
+					image: '',
+					name: '',
+					introduction: '',
+					phone: '',
+					is_show: 1,
+					day_time: [],
+					is_store: 0,
+					address: '',
+					detailed_address: '',
+					latitude:'',
+					longitude:'',
+					province:0,
+					city:0,
+					area:0,
+					street:0,
+					addressSelect:[],
+					valid_range:0,
+					product_verify_status:0,
+          product_status:1,
+          type:1,
+          applicable_type:1
+				},
+				spinShow: false,
+				addresData: [],
+				ruleValidate: {
+					name: [
+						{ required: true, message: '请输入门店名称', trigger: 'blur' }
+					],
+					erp_shop_id: [
+						{ required: true, validator: validateErp, trigger: 'change' }
+					],
+					store_account: [
+						{ required: true, message: '请输入管理员账号', trigger: 'blur' }
+					],
+					store_password: [
+						{ required: true, message: '请输入管理员密码', trigger: 'blur' }
+					],
+					address: [
+						{ required: true, message: '请选择门店地址', trigger: 'change' }
+					],
+					day_time: [ 
+						{required: true,type: "array", message: "请选择营业时间",trigger: "change"},
+						{validator(rule, value, callback, source, options) 
+							{
+								if (value[0] === "") {
+								callback("时间不能为空");
+								}
+							 callback();//这个一定要有。不然无法验证通过
+							}
+						}
+				    ],//TimePicker-timerange,自定义的
+
+					phone: [
+						{ required: true, validator: validatePhone, trigger: 'blur' }
+					],
+					detailed_address: [
+						{ required: true, message: '请输入详细地址', trigger: 'blur' }
+					],
+					image: [
+						{ required: true, validator: validateUpload, trigger: 'change' }
+					]
+				},
+				mapKey: '',
+				grid: {
+					xl: 20,
+					lg: 20,
+					md: 20,
+					sm: 24,
+					xs: 24
+				},
+				gridPic: {
+					xl: 6,
+					lg: 8,
+					md: 12,
+					sm: 12,
+					xs: 12
+				},
+				gridBtn: {
+					xl: 4,
+					lg: 8,
+					md: 8,
+					sm: 8,
+					xs: 8
+				},
+				modalPic: false,
+				isChoice: '单选',
+				pid:0,
+				isApi:0,
+				add:0
+			}
+		},
+		created () {
+      this.goodsCategory();
+			this.getErpConfig();
+			this.getKey();
+			// this.getInfo();
+			let data = {pid:0}
+			this.cityInfo(data);
+		},
+		computed: {
+			...mapState('admin/layout', [
+				'isMobile'
+			]),
+			labelWidth () {
+				return this.isMobile ? undefined : 120;
+			},
+			labelPosition () {
+				return this.isMobile ? 'top' : 'right';
+			}
+		},
+		mounted: function () {},
+		methods: {
+      //对象数组去重;
+      unique(arr) {
+        const res = new Map();
+        return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1))
+      },
+      getGoodsId (data) {
+        let list = this.goodsList.concat(data);
+        let uni = this.unique(list);
+        this.goodsList = uni;
+        this.$nextTick(res=>{
+          setTimeout(()=>{
+            this.modals = false
+          },300)
+        })
+      },
+      bindDelete (index) {
+        this.goodsList.splice(index, 1)
+      },
+      // 门店分类;
+      goodsCategory () {
+        cascaderList(1).then(res => {
+          this.treeSelect = res.data;
+        }).catch(res => {
+          this.$Message.error(res.msg);
+        })
+      },
+			getProductId(id){
+				this.formItem.erp_shop_id = id;
+				this.modalErp = false;
+				this.$refs.formItem.validateField("erp_shop_id");
+			},
+			tapErp(){
+				this.$refs.refErp.currentid = this.formItem.erp_shop_id;
+				this.modalErp = true;
+				this.$refs.formItem.validateField("erp_shop_id");
+			},
+			getErpConfig(){
+				erpConfig().then(res=>{
+					this.openErp = res.data.open_erp;
+				}).catch(err=>{
+					this.$Message.error(err.msg);
+				})
+			},
+			clearFrom () {
+          this.goodsList = [];
+			    this.formItem = {
+          cate_id: [],
+					id: 0,
+					store_account: '',
+					store_password: "",
+					image: '',
+					erp_shop_id:0,
+					name: '',
+					introduction: '',
+					phone: '',
+					is_show: 1,
+					day_time: [],
+					is_store: 0,
+					address: '',
+					detailed_address: '',
+					latitude:'',
+					longitude:'',
+					province:0,
+					city:0,
+					area:0,
+					street:0,
+					addressSelect:[],
+					valid_range:0,
+          product_verify_status:0,
+          product_status:1,
+          type:1,
+          applicable_type:1
+				}
+				this.add = 0;
+				this.isApi = 0;
+			},
+			cancel () {
+				this.isTemplate = false;
+			    // this.$refs['formItem'].resetFields();
+			    this.clearFrom();
+			},
+			addchack(e,selectedData){
+				e.forEach((i,index)=>{
+					if(index==0){
+						this.formItem.province = i
+					}else if(index==1){
+						this.formItem.city = i
+					}else if(index==2){
+						this.formItem.area = i
+					}else {
+						this.formItem.street = i
+					}
+				})
+				this.formItem.address = (selectedData.map(o => o.label)).join("/");
+			},
+			cityInfo(data){
+				cityApi(data).then(res=>{
+					this.addresData = res.data
+				})
+			},
+			loadData(item, callback) {
+				item.loading = true;
+				cityApi({pid:item.value}).then(res=>{
+					item.children = res.data;
+					item.loading = false;
+					callback();
+				});
+			},
+			// 地图信息获取
+			getCoordinates(data) {
+				this.formItem.latitude = data.location.lat || 34.34127
+				this.formItem.longitude = data.location.lng || 108.93984
+				if(this.isApi){
+					// // this.formItem.detailed_address = data.address
+					let components = data.addressComponents;
+					if(this.formItem.detailed_address.indexOf(components.street) == -1){
+						this.formItem.detailed_address = data.address+(components.town?components.town:'');
+					}
+				}
+			},
+			// 查找位置
+			onSearch() {
+				if(this.$refs.mapChild){
+					this.$refs.mapChild.searchKeyword(this.formItem.detailed_address)
+				}
+			},
+			// key值
+			getKey () {
+				keyApi().then(res => {
+					this.mapKey = res.data.key
+				}).catch(res => {
+					this.$Message.error(res.msg)
+				})
+			},
+			// 详情
+			getInfo (id) {
+			    let that = this;
+          that.$refs['formItem'].resetFields();
+			    that.formItem.id = id;
+			    that.spinShow = true;
+			    storeGetInfoApi(id).then(res => {
+					this.isApi = 1;
+					let addressSelect = [];
+					this.formItem = res.data.info;
+					this.formItem.erp_shop_id = res.data.info.erp_shop_id || 0;
+					let a = []
+					a.push(res.data.info.day_start)
+					a.push(res.data.info.day_end)
+					this.formItem.day_time = a
+					if(res.data.info.province){
+						addressSelect.push(res.data.info.province)
+					}
+					if(res.data.info.city){
+						addressSelect.push(res.data.info.city)
+					}
+					if(res.data.info.area){
+						addressSelect.push(res.data.info.area)
+					}
+					if(res.data.info.street){
+						addressSelect.push(res.data.info.street)
+					}
+					this.$set(this.formItem,'valid_range',(this.formItem.valid_range)/1000)
+					this.formItem.addressSelect = addressSelect;
+					this.onSearch();
+					that.spinShow = false;
+				}).catch(function (res) {
+					that.spinShow = false;
+					that.$Message.error(res.msg);
+				})
+			},
+			// 选择图片
+			modalPicTap () {
+				this.modalPic = true;
+				this.$refs.formItem.validateField("image")
+			},
+			// 选中图片
+			getPic (pc) {
+				this.formItem.image = pc.att_dir;
+				this.modalPic = false;
+				this.$refs.formItem.validateField("image")
+			},
+			// 营业时间
+			onchangeTime (e) {
+				this.formItem.day_time = e;
+			},
+			// 提交
+			handleSubmit (name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						if(this.formItem.day_time[0] == ''){
+							this.formItem.day_time = ['00:00:00', '23:59:59']
+						}
+						if(this.formItem.valid_range == ''||this.formItem.valid_range<0){
+							return this.$Message.error('请输入有效的门店范围');
+						}
+            let product_id = []
+            this.goodsList.forEach(item=>{
+              product_id.push(item.product_id)
+            })
+            this.formItem.product_id = product_id;
+            // this.formItem.valid_range = this.formItem.valid_range/1000
+						storeUpdateApi(this.formItem.id,this.formItem).then(async res => {
+							this.$Message.success(res.msg);
+							this.isTemplate = false;
+							this.$parent.getList();
+							// this.$refs[name].resetFields();
+							this.clearFrom();
+						}).catch(res => {
+							this.$Message.error(res.msg);
+						})
+					} else {
+						return false;
+					}
+				})
+				
+			}
+		}
+	}
+</script>
+
+<style scoped lang="stylus">
+.tips {
+  display: inline-bolck;
+  font-size: 12px;
+  font-weight: 400;
+  color: #999;
+}
+.box{
+  display flex
+  flex-wrap wrap
+  .box-item{
+    position relative
+    margin-right 20px
+    width 60px
+    height 60px
+    margin-bottom 10px
+    img{
+      width 100%
+      height 100%
+    }
+    .icon{
+      position absolute;
+      top:-10px;
+      right -10px;
+    }
+  }
+  .upload-box{
+    width 60px
+    height 60px
+    margin-bottom 10px
+    display flex
+    align-items center
+    justify-content center
+    background #ccc
+  }
+}
+	.map-sty {
+		width: 90%;
+		text-align: right;
+		margin: 0 0 0 10%;
+	}
+	/deep/.ivu-card-body{
+		padding 16px 0 0 0!important;
+	}
+	.footer{
+		width 100%;
+		height 50px;
+		box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.05);
+		margin-top 50px;
+	}
+.btn /deep/.ivu-btn-primary{
+		width 86px;
+	}
+	.btn{
+		margin-top: 20px;
+	}
+	.inputW{
+		width 400px;
+	}
+	.ivu-mt{
+		min-width 580px;
+	}
+	.picBox
+		display: inline-block;
+		cursor: pointer;
+		.upLoad
+			width: 58px;
+			height: 58px;
+			line-height: 58px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			border-radius: 4px;
+			background: rgba(0, 0, 0, 0.02);
+		.pictrue
+			width: 60px;
+			height: 60px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			margin-right: 10px;
+			img
+				width: 100%;
+				height: 100%;
+		.iconfont
+			color: #CCCCCC;
+			font-size 26px;
+			text-align center
+			
+</style>

+ 294 - 0
src/pages/check/components/commissionDetails.vue

@@ -0,0 +1,294 @@
+<template>
+    <div style="width: 100%">
+        <Modal v-model="modals" scrollable footer-hide closable title="账单详情" :mask-closable="false" @on-cancel="cancel"
+               width="950">
+            <!-- <Divider dashed/> -->
+            <Form ref="formValidate" :label-width="labelWidth" :label-position="labelPosition" class="tabform" @submit.native.prevent>
+              <Row type="flex" :gutter="24">
+					<Col v-bind="grid">
+						<FormItem label="选择门店:"  label-for="status1">
+							<Select v-model="formValidate.store_id" placeholder="请选择" clearable element-id="status1" @on-change="searchs">
+								<Option :value ="item.id" v-for="(item,index) in staff">{{item.name}}</Option>
+							</Select>
+						</FormItem>
+					</Col>
+					<Col v-bind="grid">
+						<FormItem label="订单搜索:"  label-for="status1">
+							<Input v-model="formValidate.keyword" placeholder="请输入交易单号/交易人" class="input"></Input>
+						</FormItem>
+					</Col>
+					<Col>
+						<div class="search" @click="searchs">搜索</div>
+					</Col>
+					<Col>
+						<div class="reset" @click="reset">重置</div>
+					</Col>
+               </Row>
+            </Form>
+            <!-- <Divider dashed/> -->
+            <Table :columns="columns" :data="tabList"
+                   ref="table"
+                   :loading="loading"
+                   no-userFrom-text="暂无数据"
+                   no-filtered-userFrom-text="暂无筛选结果"
+                   class="table"
+            >
+				<template slot-scope="{ row, index }" slot="number">
+					<!-- <span class="color">{{row.number}}</span> -->
+					<span v-if="row.pm == 0" class="colorgreen">- {{row.number}}</span>
+					<span v-if="row.pm == 1" class="colorred">+ {{row.number}}</span>
+				</template>
+			</Table>
+            <div class="acea-row row-right page">
+                <Page :total="total" :current="formValidate.page" show-elevator show-total @on-change="pageChange"
+                      :page-size="formValidate.limit"/>
+            </div>
+        </Modal>
+    </div>
+</template>
+
+<script>
+    import {  storeFfundRecordInfoApi, staffListInfo } from '@/api/store';
+    import { mapState } from 'vuex';
+    export default {
+        name: 'commissionDetails',
+        data () {
+            return {
+				grid: {
+				    xl: 7,
+				    lg: 7,
+				    md: 12,
+				    sm: 24,
+				    xs: 24
+				},
+                modals: false,
+                detailsData: {},
+                Ids: 0,
+                loading: false,
+				staff: [],
+				ids: '',
+               formValidate: {
+				 ids: '',
+                 store_id: '',
+                 keyword: "",
+                 data: "",
+                 page: 1,
+                 limit: 10,
+               },
+                total: 0,
+                columns: [
+                    {
+                    	title: '交易单号',
+                    	key: 'order_id',
+                    	minWidth: 80
+                    },
+                    {
+                    	title: '关联订单',
+                    	key: 'link_id',
+                    	minWidth: 80
+                    },
+                    {
+                    	title: '交易时间',
+                    	key: 'trade_time',
+                    	minWidth: 150
+                    },
+                    {
+                    	title: '交易金额',
+                    	slot: 'number',
+                    	minWidth: 80
+                    },
+                    {
+                    	title: '交易人',
+                    	key: 'user_nickname',
+                    	ellipsis: true,  
+                    	minWidth: 80
+                    },
+                    {
+                    	title: '关联店员',
+                    	key: 'staff_name',
+                    	minWidth: 80
+                    },
+                    {
+                        title: '交易类型',
+                        key: 'type_name',
+                        minWidth: 80
+                    },
+                    {
+                        title: '支付方式',
+                        key: 'pay_type_name',
+                        minWidth: 80
+                    },
+                    {
+                    	title: '备注',
+                    	key: 'remark',
+                    	minWidth: 120
+                    }
+                ],
+                tabList: []
+
+            }
+        },
+        computed: {
+            ...mapState('admin/layout', [
+                'isMobile'
+            ]),
+            labelWidth () {
+                return this.isMobile ? undefined : 80;
+            },
+            labelPosition () {
+                return this.isMobile ? 'top' : 'left';
+            }
+        },
+        mounted () {
+			this.staffApi()
+        },
+        methods: {
+			staffApi(){
+				staffListInfo().then(res=>{
+					this.staff = res.data
+				})
+			},
+			searchs(){
+				this.formValidate.page = 1
+				this.getList(this.ids)
+			},
+            // 时间
+            onchangeTime (e) {
+                this.formValidate.start_time = e[0];
+                this.formValidate.end_time = e[1];
+            },
+            // 列表
+            getList (id) {
+				this.ids = id
+				this.formValidate.ids = id
+                this.loading = true;
+                storeFfundRecordInfoApi(this.formValidate).then(async res => {
+                    let data = res.data;
+                    this.tabList = data.list;
+                    this.total = data.count;
+                    this.loading = false;
+                }).catch(res => {
+                    this.loading = false;
+                    this.$Message.error(res.msg);
+                })
+            },
+            pageChange (index) {
+                this.formValidate.page = index
+                this.getList(this.ids);
+            },
+			reset(){
+				this.formValidate = {
+					ids: this.ids,
+				  store_id: '',
+				  keyword: "",
+				  data: "",
+				  page: 1,
+				  limit: 10,
+				}
+				this.getList(this.ids)
+			},
+			// 关闭按钮
+			cancel() {
+				this.formValidate = {
+				 ids: '',
+                 store_id: '',
+                 keyword: "",
+                 data: "",
+                 page: 1,
+                 limit: 10
+               }
+			}
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+	.colorred{color: #ff5722;}
+	.colorgreen{color: #009688;}
+	.search{
+		width: 86px;
+		height: 32px;
+		background: #1890FF;
+		border-radius: 4px;
+		text-align: center;
+		line-height: 32px;
+		font-size: 13px;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: #FFFFFF;
+		cursor: pointer;
+	}
+	.reset{
+		width: 86px;
+		height: 32px;
+		border-radius: 4px;
+		border: 1px solid rgba(151, 151, 151, 0.36);
+		text-align: center;
+		line-height: 32px;
+		font-size: 13px;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: rgba(0, 0, 0, 0.85);
+		cursor: pointer;
+	}
+    .table {
+        .ivu-table-default{
+            overflow-y: auto;
+            max-height: 350px;
+        }
+    }
+    .dashboard-workplace {
+        &-header {
+            &-avatar {
+                width: 64px;
+                height: 64px;
+                border-radius: 50%;
+                margin-right: 16px;
+                font-weight: 600;
+            }
+
+            &-tip {
+                width: 82%;
+                display: inline-block;
+                vertical-align: middle;
+
+                &-title {
+                    font-size: 13px;
+                    color: #000000;
+                    margin-bottom: 12px;
+                }
+
+                &-desc {
+                    &-sp {
+                        width: 33.33%;
+                        color: #17233D;
+                        font-size: 12px;
+                        display: inline-block;
+                    }
+                }
+            }
+
+            &-extra {
+                .ivu-col {
+                    p {
+                        text-align: right;
+                    }
+
+                    p:first-child {
+                        span:first-child {
+                            margin-right: 4px;
+                        }
+
+                        span:last-child {
+                            color: #808695;
+                        }
+                    }
+
+                    p:last-child {
+                        font-size: 22px;
+                    }
+                }
+            }
+        }
+    }
+</style>

+ 127 - 0
src/pages/check/components/erpList.vue

@@ -0,0 +1,127 @@
+<template>
+	<div>
+		<Table :columns="columns1" :data="list" ref="table" class="mt25"
+		       :loading="loading" highlight-row
+		       no-userFrom-text="暂无数据"
+		       no-filtered-userFrom-text="暂无筛选结果">
+		</Table>
+		<div class="acea-row row-right page">
+			<Button icon="ios-arrow-back" :disabled="disabledB" @click="back"></Button>
+			<Button icon="ios-arrow-forward" :disabled="disabledF" class="ml10" @click="forward"></Button>
+		</div>
+	</div>
+</template>
+
+<script>
+    import { mapState } from 'vuex';
+		import { erpShop } from "@/api/erp";
+    export default {
+        name: "erpList",
+        data() {
+            return {
+                loading: false,
+				currentid: 0,
+                columns1: [
+					{
+						width: 60,
+						align: "center",
+						render: (h, params) => {
+							let id = params.row.shop_id;
+							let flag = false;
+							if (this.currentid === id) {
+								flag = true;
+							} else {
+								flag = false;
+							}
+							let self = this;
+							return h("div", [
+								h("Radio", {
+									props: {
+										value: flag,
+										disabled:id?false:true
+									},
+									on: {
+										"on-change": () => {
+											self.currentid = id;
+											this.$emit("getProductId",id);
+										},
+									},
+								}),
+							]);
+						},
+					},
+                    {
+                        title: 'ID',
+                        key: 'shop_id',
+                        width: 120
+                    },
+                    {
+                        title: '店铺名称',
+                        key: 'shop_name',
+                        minWidth: 100
+                    }
+                ],
+                erpFrom: {
+                    page: 1,
+                    limit: 1
+                },
+                list: [],
+				disabledB:true,
+				disabledF:false
+            }
+        },
+        computed: {
+            ...mapState('admin/layout', [
+                'isMobile'
+            ]),
+            labelWidth () {
+                return this.isMobile ? undefined : 96;
+            },
+            labelPosition () {
+                return this.isMobile ? 'top' : 'right';
+            }
+        },
+        created () {
+            this.getList();
+        },
+        methods:{
+			back(){
+				this.erpFrom.page = this.erpFrom.page - 1;
+				this.getList()
+			},
+			forward(){
+				this.erpFrom.page = this.erpFrom.page + 1;
+				this.getList()
+			},
+            // erp门店列表
+            getList () {
+                this.loading = true;
+                erpShop(this.erpFrom).then(res => {
+					let data = res.data;
+                    this.list = data;
+					if(this.erpFrom.page > 1){
+						this.disabledB = false
+					}else {
+						this.disabledB = true
+					}
+					if(data.length<this.erpFrom.limit){
+						this.disabledF = true
+					}else {
+						this.disabledF = false
+					}
+                    this.loading = false;
+                }).catch(err => {
+                    this.loading = false;
+                    this.$Message.error(err.msg);
+                })
+            },
+            pageChange (index) {
+                this.specsFrom.page = index;
+                this.getList();
+            }
+        }
+    }
+</script>
+
+<style>
+</style>

+ 527 - 0
src/pages/check/rule/add.vue

@@ -0,0 +1,527 @@
+<template>
+	<div class="form-submit">
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form :model="formData" :label-width="150">
+				<FormItem label="规则名称" required>
+					<Input v-model="formData.groupname" v-width="320"></Input>
+				</FormItem>
+				<FormItem label="打卡员工" required>
+					<template v-for="item in checkedStaff">
+						<Tag>{{item.name}}</Tag>
+					</template>
+					<Button type="primary" @click="chooseSatff">选择员工</Button>
+				</FormItem>
+				<FormItem label="打卡经度">
+					<Input v-model="formData.loc_infos[0].lng" v-width="320"></Input>
+					<span> (实际经度的1000000倍)</span>
+				</FormItem>
+				<FormItem label="打卡纬度">
+					<Input v-model="formData.loc_infos[0].lat" v-width="320"></Input>
+					<span> (实际纬度的1000000倍)</span>
+				</FormItem>
+				<FormItem label="打卡地名">
+					<Input v-model="formData.loc_infos[0].loc_title" v-width="320"></Input>
+					<span> (实际纬度的1000000倍)</span>
+				</FormItem>
+				<FormItem label="打卡详细地址">
+					<Input v-model="formData.loc_infos[0].loc_detail" v-width="320"></Input>
+					<span> (实际纬度的1000000倍)</span>
+				</FormItem>
+				<FormItem label="WiFi名称">
+					<Input v-model="formData.wifimac_infos[0].wifiname" v-width="320"></Input>
+					<span> </span>
+				</FormItem>
+				<FormItem label="无线路由器MAC地址">
+					<Input v-model="formData.wifimac_infos[0].wifimac" v-width="320"></Input>
+					<span> </span>
+				</FormItem>
+				<card v-for="(itemx,indexx) in formData.checkindate" style="width:1000px;">
+					<div style="padding-bottom: 10px;">打卡时间
+						<Button type="primary" style="margin-left: 20px;" @click="addNewDkTime()"
+							v-if="indexx == 0">添加新打卡时间</Button>
+						<Button type="primary" style="margin-left: 20px;" @click="delNewDkTime(indexx)"
+							v-else>删除</Button>
+					</div>
+					<FormItem label="工作日" required>
+						<TagSelect v-model="itemx.workdays" hide-check-all>
+							<TagSelectOption :name="1">星期一</TagSelectOption>
+							<TagSelectOption :name="2">星期二</TagSelectOption>
+							<TagSelectOption :name="3">星期三</TagSelectOption>
+							<TagSelectOption :name="4">星期四</TagSelectOption>
+							<TagSelectOption :name="5">星期五</TagSelectOption>
+							<TagSelectOption :name="6">星期六</TagSelectOption>
+							<TagSelectOption :name="0">星期天</TagSelectOption>
+						</TagSelect>
+					</FormItem>
+					<card v-for="(item,index) in itemx.checkintime" style="margin-bottom: 10px;">
+						<FormItem label="时段id" required>
+							<Input v-width="320" placeholder="大于0,小于99999,且唯一" v-model="item.time_id"></Input>
+							<Button type="primary" style="margin-left: 20px;" @click="addNewDk(itemx)"
+								v-if="index == 0">添加新上班时段</Button>
+							<Button type="primary" style="margin-left: 20px;" @click="delNewDk(itemx,index)"
+								v-else>删除</Button>
+						</FormItem>
+						<FormItem label="上班时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.work_sec" />
+						</FormItem>
+						<FormItem label="上班提醒时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.remind_work_sec" />
+						</FormItem>
+						<div style="padding: 0 0 10px 150px;">上班提醒时间不可晚于上班时间,且不可早于上班20分钟,只可以为准点、提前5分钟、提前10分钟、提前15分钟、提前20分钟</div>
+						<FormItem label="上班最早时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.earliest_work_sec" />
+						</FormItem>
+						<FormItem label="上班最晚时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.latest_work_sec" />
+						</FormItem>
+						
+						<FormItem label="下班时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.off_work_sec" />
+						</FormItem>
+						<FormItem label="下班提醒时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.remind_off_work_sec" />
+						</FormItem>
+						<div style="padding: 0 0 10px 150px;">下班提醒时间不可早于下班时间,且不可晚于下班60分钟,只可以为准点、下班后10分钟、下班后20分钟、下班后30分钟、下班后60分钟</div>
+						<FormItem label="下班最早时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.earliest_off_work_sec" />
+						</FormItem>
+						<FormItem label="下班最晚时间" required>
+							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
+								v-model="item.latest_off_work_sec" />
+						</FormItem>
+						
+					</card>
+				</card>
+
+
+			</Form>
+			<div style="width: 500px; display: flex;justify-content: center;">
+				<Button type="primary" class="submission" @click="save" :disabled="disabled"
+					v-if="!formData.id">立即创建</Button>
+				<Button type="primary" class="submission" @click="save" :disabled="disabled" v-else>立即修改</Button>
+				<Button type="primary" @click="showDate()">测试数据</Button>
+			</div>
+		</Card>
+		<Modal v-model="modals" title="员工列表" footerHide class="paymentFooter" scrollable width="900"
+			@on-cancel="cancel">
+			<staff-list ref="stafflist" :goodsType="1" v-if="modals" @getProductId="getProductId"
+				:serviceCard="1"></staff-list>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	import {
+		addCheckRule
+	} from '@/api/check';
+	import Setting from "@/setting";
+	import staffList from '@/components/staffList'
+	export default {
+		name: "storeCouponCreate",
+		components: {
+			staffList
+		},
+		data() {
+			return {
+				checkedStaff: [],
+				modals: false, //选择员工弹出
+				value: '',
+				id: '',
+				work_sec: '',
+				roterPre: Setting.roterPre,
+				disabled: false,
+				storesList: [],
+				formData: {
+					groupname: '',
+					grouptype: 1, //规则类型: 1-固定时间上下班;2-按班次上下班;3-自由上下班
+					type: 2, //	打卡方式 0-手机,2-考勤机,3-手机/考勤机
+					loc_infos: [{
+						lat: 30547030,
+						lng: 104062890,
+						loc_title: "腾讯成都大厦",
+						loc_detail: "四川省成都市武侯区高新南区天府三街",
+						distance: 300
+					}],
+					wifimac_infos: [{
+						"wifiname": "Tencent-WiFi-1",
+						"wifimac": "c0:7b:bc:37:f8:d3"
+					}],
+					range: {
+						userid: [
+							"qywx4633487382413312"
+						]
+					}, //打卡人员
+					checkindate: [{
+						'workdays': [],
+						"checkintime": [{
+							"time_id": '1',
+							"work_sec": '', //上班时间(距0点秒数,整分钟)
+							"off_work_sec": '', //下班时间
+							"remind_work_sec": '', //上班提醒时间
+							"remind_off_work_sec": '', //下班提醒时间
+							"earliest_work_sec": '', //上班最早时间
+							"latest_work_sec": '', //上班最晚时间
+							"earliest_off_work_sec": '', //下班最早时间
+							"latest_off_work_sec": '' //	下班最晚时间
+						}],
+						"flex_on_duty_time": 0,
+						"flex_off_duty_time": 0
+					}]
+
+				},
+				id: 0,
+				product_name: '',
+				product_id: 0,
+				store_name: '',
+				repertory: '',
+				card_price: '',
+				explain: '',
+				unit_name: '',
+				image: '',
+				images: '',
+				modals: false,
+			}
+		},
+		created() {},
+		methods: {
+			// 测试数据
+			showDate() {
+				console.log('shuju', this.formData)
+			},
+			// 打开员工选择弹窗
+			chooseSatff() {
+				this.modals = true;
+			},
+			changeT(e) {
+				// close()
+				console.log(e, 'dddddddddddddd')
+			},
+			showTime(time) {
+
+				let hh = '',
+					mm = '';
+				hh = Math.floor(time / 3600);
+				hh = hh > 9 ? hh : ('0' + hh)
+				mm = Math.floor((time % 3600) / 60);
+				mm = mm > 9 ? mm : ('0' + mm)
+				let str = hh + ':' + mm + ':' + '00'
+				console.log('str:', str)
+				return str
+
+
+			},
+			addNewDk(item) {
+				item.checkintime.push({
+					"time_id": '',
+					"work_sec": '', //上班时间(距0点秒数,整分钟)
+					"off_work_sec": '', //下班时间
+					"remind_work_sec": '', //上班提醒时间
+					"remind_off_work_sec": '', //下班提醒时间
+					"earliest_work_sec": '', //上班最早时间
+					"latest_work_sec": '', //上班最晚时间
+					"earliest_off_work_sec": '', //下班最早时间
+					"latest_off_work_sec": '' //	下班最晚时间
+				})
+			},
+			addNewDkTime() {
+				this.formData.checkindate.push({
+					'workdays': [],
+					"checkintime": [{
+						"time_id": '',
+						"work_sec": '', //上班时间(距0点秒数,整分钟)
+						"off_work_sec": '', //下班时间
+						"remind_work_sec": '', //上班提醒时间
+						"remind_off_work_sec": '', //下班提醒时间
+						"earliest_work_sec": '', //上班最早时间
+						"latest_work_sec": '', //上班最晚时间
+						"earliest_off_work_sec": '', //下班最早时间
+						"latest_off_work_sec": '' //	下班最晚时间
+					}],
+					"flex_on_duty_time": 0,
+					"flex_off_duty_time": 0
+				})
+			},
+
+			delNewDkTime(index) {
+				this.formData.checkindate.splice(index, 1)
+			},
+			delNewDk(item,index) {
+				item.splice(index, 1)
+			},
+			// 
+			onchangeTime(e) {
+				console.log(e, 'xuanz');
+			},
+			// 商品id
+			getProductId(row) {
+				this.modals = false;
+				console.log(row, '这个');
+				this.checkedStaff = row
+				let arr = []
+				this.checkedStaff.forEach(item => {
+					arr.push(item.userid)
+				})
+				this.formData.range.userid = arr
+
+			},
+			// 选择商品
+			changeGoods() {
+				this.modals = true;
+			},
+			downTab() {
+				// if (!this.formData.store_name) {
+				// 	return this.$Message.error("请输入服务卡名称");
+				// }
+				// if (!this.formData.card_price) {
+				// 	return this.$Message.error("请输入售价");
+				// }
+				// if (!this.formData.repertory) {
+				// 	return this.$Message.error("请输入库存");
+				// }
+			},
+			getTime(str) {
+				if(typeof(str) == 'string') {
+					let arr = str.split(':')
+					return arr[0]*60*60 + arr[1]*60
+				}else {
+					return str
+				}
+				
+			},
+			// 创建
+			save() {
+				let that = this
+				this.downTab();
+				console.log('这');
+				let qdata = {}
+				qdata = Object.assign(qdata,this.formData)
+				try{
+					// let qdata = JSON.parse(JSON.stringify(this.formData))
+					let checkindate = []
+					this.formData.checkindate.forEach(item => {
+						// checkindate.push(item.)
+						let mitem = []
+						item.checkintime.forEach(itemt => {
+							for(let key in itemt) {
+								// let val = ''
+								if(key != 'time_id') {
+									itemt[key] = that.getTime(itemt[key])
+								}else {
+									itemt[key] = itemt[key]*1
+								}
+							}
+							mitem.push(itemt)
+						})
+						item.checkintime = mitem
+						checkindate.push(item)
+					})
+					qdata.checkindate = checkindate
+					console.log(qdata,'this.formData')
+				}catch(e){
+					//TODO handle the exception
+					console.log(e,'cuow')
+				}
+				
+				
+				addCheckRule({
+						'group': qdata
+					})
+					.then((res) => {
+						this.disabled = true;
+						this.$Message.success(res.msg);
+						setTimeout(() => {
+							this.$router.push({
+								path: this.roterPre + "/store/checkRule/index",
+							});
+						}, 1000);
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+						this.disabled = false;
+					});
+			},
+			cancel() {
+				this.modals = false;
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tips {
+		display: inline-bolck;
+		font-size: 12px;
+		font-weight: 400;
+		color: #999999;
+		margin-top: 10px;
+	}
+
+	.imgPic {
+		.info {
+			width: 60%;
+			margin-left: 10px;
+		}
+
+		.pictrue {
+			height: 36px;
+			margin: 7px 3px 0 3px;
+
+			img {
+				height: 100%;
+				display: block;
+			}
+		}
+	}
+
+	.productType {
+		width: 120px;
+		height: 60px;
+		background: #FFFFFF;
+		border-radius: 3px;
+		border: 1px solid #E7E7E7;
+		float: left;
+		text-align: center;
+		padding-top: 8px;
+		position: relative;
+		cursor: pointer;
+		line-height: 23px;
+		margin-right: 12px;
+
+		&.on {
+			border-color: #1890FF;
+		}
+
+		.name {
+			font-size: 14px;
+			font-weight: 600;
+			color: rgba(0, 0, 0, 0.85);
+
+			&.on {
+				color: #1890FF;
+			}
+		}
+
+		.title {
+			font-size: 12px;
+			font-weight: 400;
+			color: #999999;
+		}
+
+		.jiao {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			width: 0;
+			height: 0;
+			border-bottom: 26px solid #1890FF;
+			border-left: 26px solid transparent;
+		}
+
+		.iconfont {
+			position: absolute;
+			bottom: -3px;
+			right: 1px;
+			color: #FFFFFF;
+			font-size: 12px;
+		}
+	}
+
+	.info {
+		color: #888;
+		font-size: 12px;
+	}
+
+	.ivu-input-wrapper {
+		width: 320px;
+	}
+
+	.ivu-input-number {
+		width: 160px;
+	}
+
+	.ivu-date-picker {
+		width: 320px;
+	}
+
+	.ivu-icon-ios-camera-outline {
+		width: 58px;
+		height: 58px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		border-radius: 4px;
+		background-color: rgba(0, 0, 0, 0.02);
+		line-height: 58px;
+		cursor: pointer;
+		vertical-align: middle;
+	}
+
+	.upload-list {
+		width: 58px;
+		height: 58px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		border-radius: 4px;
+		margin-right: 15px;
+		display: inline-block;
+		position: relative;
+		cursor: pointer;
+		vertical-align: middle;
+	}
+
+	.upload-list img {
+		display: block;
+		width: 100%;
+		height: 100%;
+	}
+
+	.ivu-icon-ios-close-circle {
+		position: absolute;
+		top: 0;
+		right: 0;
+		transform: translate(50%, -50%);
+	}
+
+	.form-submit {
+		/deep/.ivu-card {
+			border-radius: 0;
+		}
+
+		margin-bottom: 79px;
+
+		.fixed-card {
+			position: fixed;
+			right: 0;
+			bottom: 0;
+			left: 200px;
+			z-index: 99;
+			box-shadow: 0 -1px 2px rgb(240, 240, 240);
+
+			/deep/ .ivu-card-body {
+				padding: 15px 16px 14px;
+			}
+
+			.ivu-form-item {
+				margin-bottom: 0;
+			}
+
+			/deep/ .ivu-form-item-content {
+				margin-right: 124px;
+				text-align: center;
+			}
+
+			.ivu-btn {
+				height: 36px;
+				padding: 0 20px;
+			}
+		}
+	}
+
+	/deep/.vxe-tree-cell {
+		padding-left: 0 !important;
+	}
+</style>

+ 223 - 0
src/pages/check/rule/index.vue

@@ -0,0 +1,223 @@
+<template>
+	<div>
+		<div class="i-layout-page-header">
+			<PageHeader class="product_tabs" title="打卡规则" hidden-breadcrumb></PageHeader>
+		</div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form ref="tableFrom" :model="tableFrom" :label-width="labelWidth" :label-position="labelPosition"
+				@submit.native.prevent>
+				<Row type="flex">
+					<Col v-bind="grid">
+					<Button v-auth="['store-check-rule-add']" type="primary" icon="md-add"
+						@click="add">添加打卡规则</Button>
+					</Col>
+				</Row>
+			</Form>
+			<Table :columns="columns1" :data="tableList" ref="table" class="mt25" :loading="loading" highlight-row
+				no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+				<template slot-scope="{ row, index }" slot="groupname">
+					{{row.checkin_option.groupname}}
+				</template>
+				<template slot-scope="{ row, index }" slot="workdays">
+					<el-tag v-for="witem in row.checkin_option.checkindate[0].workdays">{{witem | showWd}}</el-tag>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<Icon type="md-checkmark" v-if="row.status === 1" color="#0092DC" size="14" />
+					<Icon type="md-close" v-else color="#ed5565" size="14" />
+				</template>
+				<template slot-scope="{ row, index }" slot="add_time">
+					<span> {{row.add_time | formatDate}}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="couponDel(row,'删除打卡规则',index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+		<!--表单编辑-->
+		<edit-from :FromData="FromData" @changeType="changeType" ref="edits"></edit-from>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		checkGroupList,
+		checkRuleList
+	} from '@/api/check';
+	import editFrom from '@/components/from/from';
+	import {
+		formatDate
+	} from '@/utils/validate';
+	import Setting from "@/setting";
+	export default {
+		name: 'storeCoupon',
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, 'yyyy-MM-dd hh:mm');
+				}
+			},
+			showWd(day) {
+				let str = ''
+				if(day) {
+					switch (day*1){
+						case 1:
+							str = '星期一'
+							break;
+						case 2:
+							str = '星期二'
+							break;
+						case 3:
+							str = '星期三'
+							break;
+						case 4:
+							str = '星期四'
+							break;
+						case  5:
+							str = '星期五'
+							break;
+						case 6:
+							str = '星期六'
+							break;
+						case  0:
+							str = '星期日'
+							break;
+						default:
+							break;
+					}
+				}
+				return str
+			}
+		},
+		components: {
+			editFrom
+		},
+		data() {
+			return {
+				roterPre: Setting.routePre,
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24
+				},
+				loading: false,
+				columns1: [{
+						title: 'ID',
+						key: 'id',
+						width: 80
+					},
+					{
+						title: '规则名称',
+						slot: 'groupname',
+						minWidth: 150
+					},
+					{
+						title: '工作日',
+						slot: 'workdays',
+						minWidth: 80
+					},
+					{
+						title: '添加时间',
+						key: 'create_time',
+						minWidth: 100
+					},
+					// {
+					//     title: '折扣',
+					//     key: 'discount_ratio',
+					//     minWidth: 100
+					// },
+					{
+						title: '操作',
+						slot: 'action',
+						fixed: 'right',
+						minWidth: 170
+					}
+				],
+				tableFrom: {
+					page: 1,
+					limit: 15
+				},
+				tableList: [],
+				total: 0,
+				FromData: null
+			}
+		},
+		created() {
+			this.getList();
+		},
+		computed: {
+			...mapState('admin/layout', [
+				'isMobile'
+			]),
+			labelWidth() {
+				return this.isMobile ? undefined : 90;
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'left';
+			}
+		},
+		methods: {
+			// 删除
+			couponDel(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					url: `work/getCheckinOption/${row.id}`,
+					method: 'POST',
+					ids: ''
+				};
+				this.$modalSure(delfromData).then((res) => {
+					this.$Message.success(res.msg);
+					this.tableList.splice(num, 1)
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+
+				checkRuleList(this.tableFrom).then(async res => {
+					let data = res.data
+					this.tableList = data.data;
+					this.total = res.data.count;
+					this.loading = false;
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			changeType(data) {
+				this.type = data;
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: "/store/check/rule/add"
+				});
+			},
+		}
+	}
+</script>
+
+<style scoped>
+	.ivu-col:nth-of-type(1) .ivu-form-item .ivu-form-item-label {
+		width: 80px !important;
+	}
+
+	.ivu-col:nth-of-type(1) .ivu-form-item .ivu-form-item-content {
+		margin-left: 80px !important;
+	}
+</style>

+ 280 - 0
src/pages/check/staff/index.vue

@@ -0,0 +1,280 @@
+<template>
+	<!-- 门店-门店列表 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt tablebox" :padding="16">
+			<Button type="primary" @click="add">添加店员</Button>
+			<div class="table">
+				<Table :columns="columns" :data="orderList" ref="table" class="ivu-mt" :loading="loading" highlight-row
+					no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+					<template slot-scope="{ row }" slot="avatar">
+						<img :src="row.avatar" />
+					</template>
+					<template slot-scope="{ row }" slot="department_list">
+						<div>{{row.department_list[0].name.name || ''}}</div>
+					</template>
+					<template slot-scope="{ row, index }" slot="action">
+						<a @click="edit(row)">编辑</a>
+						<Divider type="vertical" />
+						<a @click="delte(row, '删除店员', index)">删除</a>
+					</template>
+				</Table>
+				<div class="acea-row row-right page">
+					<Page :total="total" :current="formValidate.page" show-elevator show-total @on-change="pageChange"
+						:page-size="formValidate.limit" />
+				</div>
+			</div>
+		</Card>
+		<add-staff ref="template" @success="addsuccess" :staffInfo="staffInfo" ></add-staff>
+	</div>
+</template>
+
+<script>
+	import util from "@/libs/util";
+	import Setting from "@/setting";
+	import addStaff from "../components/addStaff";
+	import {
+		getYgList
+	} from "@/api/check";
+	export default {
+		name: "storeList",
+		components: {
+			addStaff,
+		},
+		data() {
+			return {
+				
+				staffInfo: {},
+				staffData: [],
+				queryData:{
+				  page: 1,
+				  limit: 10,
+				  type: '',
+				  status: "",
+				  time: "",
+				  real_name: "",
+				  store_id: "",
+				  order_type: 6,
+				},
+				BaseURL: '',
+				total: 0,
+				loading: false,
+				formValidate: {
+					type: "all",
+					page: 1,
+					limit: 15,
+				},
+				columns: [{
+						title: "ID",
+						key: "id",
+						width: 60,
+					},
+					{
+						title: "头像",
+						slot: "avatar",
+						minWidth: 80,
+					},
+					{
+						title: "姓名",
+						key: "alias",
+						minWidth: 80,
+					},
+					{
+						title: "别名",
+						key: "name",
+						minWidth: 80,
+					},
+					{
+						title: "部门",
+						slot: "department_list",
+						minWidth: 100
+					},
+					{
+						title: "职务",
+						key: "position",
+						minWidth: 80,
+					},
+					{
+						title: "联系电话",
+						key: "mobile",
+						minWidth: 90,
+					},
+					{
+						title: "住址",
+						key: "address",
+						minWidth: 150,
+					},
+					{
+						title: "添加时间",
+						key: "create_time",
+						minWidth: 120,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						minWidth: 240,
+						align: "center",
+					},
+				],
+				orderList: [{
+					id: "1",
+					order_id: "12",
+					pay_price: "12",
+					status: 1,
+					phone: "13000000000",
+					address: "陕西省西安市莲湖区大兴西路啊餐厨",
+				}, ],
+			};
+		},
+		computed: {
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		mounted() {
+			this.getList();
+		},
+		methods: {
+			addsuccess() {
+				this.getList()
+			},
+			// 门店列表
+			getList() {
+				this.loading = true;
+				getYgList(this.formValidate).then((res) => {
+					this.orderList = res.data.list;
+					this.total = res.data.count;
+					this.loading = false;
+				});
+			},
+			add() {
+				this.$refs.template.isEdit = 0;
+				this.$refs.template.title = "添加店员";
+				this.$refs.template.add = 1;
+				this.$refs.template.isTemplate = true;
+				this.$refs.template.cityInfo({
+					pid: 0
+				});
+			},
+			edit(row) {
+				this.$refs.template.title = "编辑店员";
+				this.$refs.template.isTemplate = true;
+				// this.$refs.template.getInfo(row.id);
+				let editData = row
+				console.log(row);
+				this.$refs.template.formItem = row
+			},
+			getExpiresTime(expiresTime) {
+				let nowTimeNum = Math.round(new Date() / 1000);
+				let expiresTimeNum = expiresTime - nowTimeNum;
+				return parseFloat(parseFloat(parseFloat(expiresTimeNum / 60) / 60) / 24);
+			},
+			
+			delte(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `work/delete?id=${row.id}&user_id=${row.uid}`,
+					method: "post",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.orderList.splice(num, 1);
+						if (!this.orderList.length) {
+							this.formValidate.page =
+								this.formValidate.page == 1 ? 1 : this.formValidate.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			searchs() {},
+			onClickTab(e) {
+				this.formValidate.page = 1;
+				this.formValidate.type = e;
+				this.getList();
+			},
+			//分页
+			pageChange(status) {
+				this.formValidate.page = status;
+				this.getList();
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	/deep/.ivu-tabs-nav {
+		height: 45px;
+	}
+
+	.tablebox {
+		margin-top: 15px;
+	}
+
+	.btnbox {
+		padding: 20px 0px 0px 30px;
+
+		.btns {
+			width: 99px;
+			height: 32px;
+			background: #1890ff;
+			border-radius: 4px;
+			text-align: center;
+			line-height: 32px;
+			color: #ffffff;
+			cursor: pointer;
+		}
+	}
+
+	.table {
+		padding: 0;
+
+		img {
+			width: 40px;
+			height: 40px;
+		}
+	}
+
+	.search {
+		width: 86px;
+		height: 32px;
+		background: #1890ff;
+		border-radius: 4px;
+		text-align: center;
+		line-height: 32px;
+		font-size: 13px;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: #ffffff;
+		cursor: pointer;
+	}
+
+	.reset {
+		width: 86px;
+		height: 32px;
+		border-radius: 4px;
+		border: 1px solid rgba(151, 151, 151, 0.36);
+		text-align: center;
+		line-height: 32px;
+		font-size: 13px;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: rgba(0, 0, 0, 0.85);
+		cursor: pointer;
+	}
+
+	.new_tab {
+		>>>.ivu-tabs-nav .ivu-tabs-tab {
+			padding: 4px 16px 20px !important;
+			font-weight: 500;
+		}
+	}
+</style>

+ 84 - 0
src/router/modules/check.js

@@ -0,0 +1,84 @@
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+
+import BasicLayout from '@/layouts/basic-layout';
+import Setting from "@/setting";
+
+const pre = 'check_';
+
+export default {
+    path: `${Setting.routePre}/check/`,
+    name: 'check',
+    header: 'check',
+    meta: {
+        // 授权标识
+        auth: ['store-check']
+    },
+    redirect: {
+        name: `${pre}ruleIndex`
+    },
+    component: BasicLayout,
+    children: [
+        {
+            path: 'rule/index',
+            name: `${pre}ruleIndex`,
+            meta: {
+                auth: ['store-check-rule-index'],
+                title: '打卡规则列表'
+            },
+            component: () => import('@/pages/check/rule/index')
+        },
+        {
+            path: 'rule/add',
+            name: `${pre}ruleAdd`,
+            meta: {
+                auth: ['store-check-rule-add'],
+                title: '规则添加'
+            },
+            component: () => import('@/pages/check/rule/add')
+        },
+  //       {
+  //           path: 'classes/index',
+  //           name: `${pre}classesIndex`,
+  //           meta: {
+  //               auth: ['store-check-classes-index'],
+  //               title: '考勤组列表'
+  //           },
+  //           component: () => import('@/pages/check/classes/index')
+  //       },
+		// {
+		//     path: 'classes/add',
+		//     name: `${pre}classesAdd`,
+		//     meta: {
+		//         auth: ['store-check-classes-add'],
+		//         title: '考勤组列表'
+		//     },
+		//     component: () => import('@/pages/check/classes/add')
+		// },
+		{
+		    path: 'staff/index',
+		    name: `${pre}staffIndex`,
+		    meta: {
+		        auth: ['store-check-staff-index'],
+		        title: '员工列表'
+		    },
+		    component: () => import('@/pages/check/staff/index')
+		},
+		// {
+		//     path: 'staff/add',
+		//     name: `${pre}classAdd`,
+		//     meta: {
+		//         auth: ['store-check-staff-add'],
+		//         title: '添加员工'
+		//     },
+		//     component: () => import('@/pages/check/staff/add')
+		// },
+    ]
+};

+ 3 - 1
src/router/routes.js

@@ -17,6 +17,7 @@ import capital from './modules/capital';
 import user from './modules/user';
 import user from './modules/user';
 import marketing from './modules/marketing';
 import marketing from './modules/marketing';
 import set from './modules/set';
 import set from './modules/set';
+import check from "./modules/check.js"
 import Setting from "@/setting";
 import Setting from "@/setting";
 
 
 /**
 /**
@@ -120,7 +121,8 @@ const frameIn = [{
 	capital,
 	capital,
 	set,
 	set,
 	user,
 	user,
-	marketing
+	marketing,
+	check
 ];
 ];
 
 
 /**
 /**

+ 2 - 2
src/setting.js

@@ -11,7 +11,7 @@
  * iView store Pro 业务配置
  * iView store Pro 业务配置
  * */
  * */
 // 请求接口地址 如果没有配置自动获取当前网址路径
 // 请求接口地址 如果没有配置自动获取当前网址路径
-const VUE_APP_API_URL = process.env.VUE_APP_API_URL || `${location.origin}/storeapi`;
+const VUE_APP_API_URL = 'https://wx.junhailan.com/storeapi' || `${location.origin}/storeapi`;
 // 管理端ws
 // 管理端ws
 const VUE_APP_WS_ADMIN_URL = process.env.VUE_APP_WS_ADMIN_URL || `ws:${location.hostname}/ws`
 const VUE_APP_WS_ADMIN_URL = process.env.VUE_APP_WS_ADMIN_URL || `ws:${location.hostname}/ws`
 // 路由前缀
 // 路由前缀
@@ -25,7 +25,7 @@ const Setting = {
      * */
      * */
     routePre,
     routePre,
     // 网页标题的后缀
     // 网页标题的后缀
-    titleSuffix: util.cookies.get('pageTitle') || 'CRMEB',
+    titleSuffix: util.cookies.get('pageTitle') || '君子堂',
 		// 后台配置目录
 		// 后台配置目录
 		
 		
     // 路由模式,可选值为 history 或 hash
     // 路由模式,可选值为 history 或 hash