lhl 2 роки тому
батько
коміт
3b2143368e

+ 2 - 1
src/api/check.js

@@ -94,6 +94,7 @@ export function getDepartmentList () {
 export function getCheckList(data) {
 	return request({
 	    url: `work/checkin`,
-	    method: 'post'
+	    method: 'post',
+		data
 	});
 }

+ 7 - 7
src/pages/check/classes/index.vue

@@ -18,7 +18,7 @@
 					{{ showDate(row.sch_checkin_time)}}
 				</template>
 				<template slot-scope="{ row, index }" slot="status">
-					{{ row.status == 1?'正常': (row.status == 2 ? '迟到': '早退')}}
+					{{ row.status == 1?'正常': (row.status == 2 ? '迟到': (row.status == 3 ?'早退': '未打卡'))}}
 				</template>
 				<template slot-scope="{ row, index }" slot="time">
 					<!-- <span> {{row.add_time | formatDate}}</span> -->
@@ -154,12 +154,12 @@
 					//     key: 'discount_ratio',
 					//     minWidth: 100
 					// },
-					{
-						title: '操作',
-						slot: 'action',
-						fixed: 'right',
-						minWidth: 170
-					}
+					// {
+					// 	title: '操作',
+					// 	slot: 'action',
+					// 	fixed: 'right',
+					// 	minWidth: 170
+					// }
 				],
 				tableFrom: {
 					page: 1,

+ 19 - 5
src/pages/check/components/addStaff.vue

@@ -33,10 +33,16 @@
 							</FormItem>
 							</Col>
 							<Col span="24">
+							<FormItem label="浮动比例:" label-for="floating_ratio" prop="floating_ratio">
+								<Input v-model="formItem.floating_ratio" placeholder="请输入浮动比例" />
+							</FormItem>
+							</Col>
+							<Col span="24">
 							<FormItem label="绑定用户:" label-for="mobile" prop="mobile">
 								<Button v-if="checkUser.nickname || checkUser.phone" style="margin-right: 20rpx;">昵称:{{checkUser.nickname || '暂无'}} 手机号:{{checkUser.phone || '暂无'}}</Button>
-								<Button type="primary" @click="chooseUser" >选择员工</Button>
+								<Button type="primary" @click="chooseUser" >选择用户</Button>
 							</FormItem>
+							
 							</Col>
 							<Col span="24" class="mt20">
 							<FormItem label="性别:">
@@ -149,7 +155,8 @@
 					address: '',
 					main_department: '',
 					direct_leader: 'ZhouFengYu',
-					position: ''
+					position: '',
+					floating_ratio: ''
 				},
 				spinShow: false,
 				addresData: [],
@@ -164,7 +171,11 @@
 						message: '请输入地址地址',
 						trigger: 'blur'
 					}],
-
+					floating_ratio: [{
+						required: true,
+						message: '请输入浮动比例',
+						trigger: 'blur'
+					}],
 					mobile: [{
 						required: true,
 						validator: validatePhone,
@@ -220,7 +231,8 @@
 					address: '',
 					main_department: '',
 					direct_leader: 'ZhouFengYu',
-					position: ''
+					position: '',
+					floating_ratio: ''
 				}
 			}
 		},
@@ -264,7 +276,8 @@
 					alias: '',
 					address: '',
 					main_department: '',
-					direct_leader: 'ZhouFengYu'
+					direct_leader: 'ZhouFengYu',
+					floating_ratio: ''
 				}
 				this.add = 0;
 				this.isApi = 0;
@@ -289,6 +302,7 @@
 					if (valid) {
 						if (this.formItem.id) {
 							editYg({
+								floating_ratio: this.formItem.floating_ratio,
 								id: this.formItem.id,
 								name: this.formItem.name,
 								avatar: this.formItem.avatar,