lhl %!s(int64=2) %!d(string=hai) anos
pai
achega
bb8a863b52
Modificáronse 1 ficheiros con 58 adicións e 41 borrados
  1. 58 41
      src/pages/check/components/addStaff.vue

+ 58 - 41
src/pages/check/components/addStaff.vue

@@ -51,13 +51,27 @@
 										<Icon type="social-apple"></Icon>
 										<span>女</span>
 									</Radio>
-									<Radio :label="2">
+									<Radio :label="1">
 										<Icon type="social-android"></Icon>
 										<span>男</span>
 									</Radio>
 								</RadioGroup>
 							</FormItem>
 							</Col>
+							<Col span="24" class="mt20">
+							<FormItem label="类型:">
+								<RadioGroup v-model="formItem.is_reservation">
+									<Radio :label="1">
+										<Icon type="social-apple"></Icon>
+										<span>服务员工</span>
+									</Radio>
+									<Radio :label="0">
+										<Icon type="social-android"></Icon>
+										<span>普通员工</span>
+									</Radio>
+								</RadioGroup>
+							</FormItem>
+							</Col>
 							<Col span="24">
 							<FormItem label="职务:" label-for="position" prop="position">
 								<Input v-model="formItem.position" placeholder="请输入职务" />
@@ -147,6 +161,7 @@
 				isTemplate: false,
 				title: '',
 				formItem: {
+					is_reservation: 0,
 					uid: '',
 					name: '',
 					avatar: '',
@@ -277,7 +292,8 @@
 					address: '',
 					main_department: '',
 					direct_leader: 'ZhouFengYu',
-					floating_ratio: ''
+					floating_ratio: '',
+					is_reservation: 0
 				}
 				this.add = 0;
 				this.isApi = 0;
@@ -298,46 +314,47 @@
 			},
 			// 提交
 			handleSubmit(name) {
-				this.$refs[name].validate((valid) => {
-					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,
-								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);
-							})
-						}
+				console.log(this.formItem)
+				// this.$refs[name].validate((valid) => {
+				// 	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,
+				// 				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;
-					}
-				})
+				// 	} else {
+				// 		return false;
+				// 	}
+				// })
 
 			}
 		}