cmy hai 1 ano
pai
achega
f2be260028
Modificáronse 2 ficheiros con 38 adicións e 53 borrados
  1. 37 52
      src/pages/check/classes/index.vue
  2. 1 1
      src/pages/user/components/userDetails2.vue

+ 37 - 52
src/pages/check/classes/index.vue

@@ -1,8 +1,21 @@
 <template>
 <template>
 	<div>
 	<div>
 		<Card :bordered="false" dis-hover class="ivu-mt">
 		<Card :bordered="false" dis-hover class="ivu-mt">
-			<button></button>
-			<Table :columns="columns1" :data="tableList" ref="table" class="mt25" :loading="loading" highlight-row
+			<Form ref="pagination" :model="tableFrom" :label-width="labelWidth" :label-position="labelPosition"
+				@submit.native.prevent>
+				<Row type="flex" >
+					<Col class="ivu-text-left mr">
+					<FormItem label="员工:">
+						<Select v-model="tableFrom.work_member_id" style="width: 250px">
+							<Option value="">全部</Option>
+							<Option v-for="item in ygList" :key="item.id" :value="item.userid">{{ item.name }}</Option>
+						</Select>
+						<Button type="primary" class="ml10 search" @click="userSearchs">搜索</Button>
+					</FormItem>
+					</Col>
+				</Row>
+			</Form>
+			<Table :columns="columns1" :data="tableList" ref="table" :loading="loading" highlight-row
 				no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
 				no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
 				<template slot-scope="{ row, index }" slot="groupname">
 				<template slot-scope="{ row, index }" slot="groupname">
 					{{row.checkin_option.groupname}}
 					{{row.checkin_option.groupname}}
@@ -49,6 +62,9 @@
 	import {
 	import {
 		formatDate
 		formatDate
 	} from '@/utils/validate';
 	} from '@/utils/validate';
+	import {
+		getYgList
+	} from "@/api/check";
 	import Setting from "@/setting";
 	import Setting from "@/setting";
 	export default {
 	export default {
 		name: 'storeCoupon',
 		name: 'storeCoupon',
@@ -93,8 +109,6 @@
 		},
 		},
 		filters: {
 		filters: {
 			showTime(seconds) {
 			showTime(seconds) {
-				  
-
 				if(seconds ) {
 				if(seconds ) {
 					var hours = Math.floor(seconds / 3600);
 					var hours = Math.floor(seconds / 3600);
 					var minutes = Math.floor((seconds % 3600) / 60);
 					var minutes = Math.floor((seconds % 3600) / 60);
@@ -105,14 +119,8 @@
 		data() {
 		data() {
 			return {
 			return {
 				roterPre: Setting.roterPre,
 				roterPre: Setting.roterPre,
-				grid: {
-					xl: 7,
-					lg: 7,
-					md: 12,
-					sm: 24,
-					xs: 24
-				},
 				loading: false,
 				loading: false,
+				ygList:[],
 				columns1: [{
 				columns1: [{
 						title: 'ID',
 						title: 'ID',
 						key: 'id',
 						key: 'id',
@@ -121,12 +129,12 @@
 					{
 					{
 						title: '员工',
 						title: '员工',
 						key: 'name',
 						key: 'name',
-						minWidth: 150
+						minWidth: 80
 					},
 					},
 					{
 					{
 						title: '打卡类型',
 						title: '打卡类型',
 						slot: 'checkin_type',
 						slot: 'checkin_type',
-						minWidth: 20
+						minWidth: 100
 					},
 					},
 					{
 					{
 						title: '打卡奖励',
 						title: '打卡奖励',
@@ -136,52 +144,50 @@
 					{
 					{
 						title: '打卡时间',
 						title: '打卡时间',
 						slot: 'sch_checkin_time',
 						slot: 'sch_checkin_time',
-						minWidth: 100
+						minWidth: 130
 					},
 					},
-					//sch_checkin_time
 					{
 					{
 						title: '实际打卡时间',
 						title: '实际打卡时间',
 						slot: 'checkin_time',
 						slot: 'checkin_time',
-						minWidth: 100
+						minWidth: 130
 					},
 					},
 					{
 					{
 						title: '打卡情况',
 						title: '打卡情况',
 						slot: 'status',
 						slot: 'status',
-						minWidth: 100
+						minWidth: 80
 					},
 					},
-					// {
-					//     title: '折扣',
-					//     key: 'discount_ratio',
-					//     minWidth: 100
-					// },
-					// {
-					// 	title: '操作',
-					// 	slot: 'action',
-					// 	fixed: 'right',
-					// 	minWidth: 170
-					// }
 				],
 				],
 				tableFrom: {
 				tableFrom: {
 					page: 1,
 					page: 1,
-					limit: 15
+					limit: 15,
+					work_member_id:''
 				},
 				},
 				tableList: [],
 				tableList: [],
 				total: 0,
 				total: 0,
-				FromData: null
 			}
 			}
 		},
 		},
 		created() {
 		created() {
 			this.getList();
 			this.getList();
+			this.getygList();
 		},
 		},
 		computed: {
 		computed: {
 			labelWidth() {
 			labelWidth() {
-				return this.isMobile ? undefined : 90;
+				return this.isMobile ? undefined : 50;
 			},
 			},
 			labelPosition() {
 			labelPosition() {
 				return this.isMobile ? 'top' : 'left';
 				return this.isMobile ? 'top' : 'left';
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			getygList() {
+				getYgList({
+					page: 1,
+					limit: 1000
+				}).then(res => {
+					console.log(res)
+					this.ygList = res.data.list
+				})
+			},
 			showDate(timestamp) {
 			showDate(timestamp) {
 				  var date = new Date(timestamp*1000);
 				  var date = new Date(timestamp*1000);
 				  var year = date.getFullYear();
 				  var year = date.getFullYear();
@@ -190,15 +196,11 @@
 				  var hours = ("0" + date.getHours()).slice(-2);
 				  var hours = ("0" + date.getHours()).slice(-2);
 				  var minutes = ("0" + date.getMinutes()).slice(-2);
 				  var minutes = ("0" + date.getMinutes()).slice(-2);
 				  var seconds = ("0" + date.getSeconds()).slice(-2);
 				  var seconds = ("0" + date.getSeconds()).slice(-2);
-				
 				  return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
 				  return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
-				
-
 			},
 			},
 			// 列表
 			// 列表
 			getList() {
 			getList() {
 				this.loading = true;
 				this.loading = true;
-
 				getCheckList(this.tableFrom).then(async res => {
 				getCheckList(this.tableFrom).then(async res => {
 					let data = res.data
 					let data = res.data
 					this.tableList = data.data;
 					this.tableList = data.data;
@@ -213,28 +215,11 @@
 				this.tableFrom.page = index;
 				this.tableFrom.page = index;
 				this.getList();
 				this.getList();
 			},
 			},
-			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);
-				})
-			},
 			// 表格搜索
 			// 表格搜索
 			userSearchs() {
 			userSearchs() {
 				this.tableFrom.page = 1;
 				this.tableFrom.page = 1;
 				this.getList();
 				this.getList();
 			},
 			},
-			// 修改成功
-			submitFail() {
-				this.getList();
-			}
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 1 - 1
src/pages/user/components/userDetails2.vue

@@ -122,7 +122,7 @@
 					</div>
 					</div>
 					<div class="title">
 					<div class="title">
 						<div>
 						<div>
-							{{ item.product.store_name }}
+							{{ item.product.store_name }}(ID:{{item.product.id}})
 						</div>
 						</div>
 						<div>
 						<div>
 							原价:{{ item.product.price }}
 							原价:{{ item.product.price }}