wangguoyu 1 月之前
父節點
當前提交
ce0df27fb2
共有 1 個文件被更改,包括 71 次插入71 次删除
  1. 71 71
      pages/admin/Jiazheng/banzhengXinxi.vue

+ 71 - 71
pages/admin/Jiazheng/banzhengXinxi.vue

@@ -471,86 +471,86 @@
 				} else {
 					console.log('this.piliangArray', this.piliangArray);
 					this.$emit('addSavePiliang', this.piliangArray)
-					}
-				},
-				// 提交表单
-				addSaveForm() {
-					//debugger
+				}
+			},
+			// 提交表单
+			addSaveForm() {
+				//debugger
 
-					console.log('statusstatusstatus', this.status);
+				console.log('statusstatusstatus', this.status);
 
-					let req = {
-						canxunshijian: this.formData.canxunshijian,
-						jgId: this.formData.baozhengJigouId,
-						needKaoshi: this.formData.needKaoshi,
-						needKecheng: this.formData.needKecheng,
-						shicaochengji: this.formData.shicaochengji,
-						zongkeshi: this.formData.zongkeshi,
-						zyId: this.formData.zhiyeId,
-						zyLevel: this.formData.zhiyeLevelId,
-						jgType: this.formData.baozhengJigouType,
-						jgName: this.formData.baozhengJigouName,
-						zyName: this.formData.zhiyeName,
-						zyLevelName: this.formData.zhiyeLevelName,
-						id: this.formData.id,
-						createTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
-					}
-					console.log('req', req);
-					if (this.status == 'add' || this.localStatus == 'editadd' || this.localStatus == 'addEdit') {
-						req.createTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
-					}
-					if (req.jgId == '' || req.zyId == '' || req.zyLevel == '') {
-						uni.showToast({
-							title: '请选择保证机构,职业名称,职业等级',
-							icon: 'none'
-						});
-						return false
-					}
-					if (this.formData.baozhengJigouType == 1 && (this.formData.shicaochengji == '' || this.formData
-							.zongkeshi ==
-							'' || this.formData.canxunshijian == '')) {
-						uni.showToast({
-							title: '请填写参训时间,实操成绩,总课时',
-							icon: 'none'
-						});
-						return false
+				let req = {
+					canxunshijian: this.formData.canxunshijian,
+					jgId: this.formData.baozhengJigouId,
+					needKaoshi: this.formData.needKaoshi,
+					needKecheng: this.formData.needKecheng,
+					shicaochengji: this.formData.shicaochengji,
+					zongkeshi: this.formData.zongkeshi,
+					zyId: this.formData.zhiyeId,
+					zyLevel: this.formData.zhiyeLevelId,
+					jgType: this.formData.baozhengJigouType,
+					jgName: this.formData.baozhengJigouName,
+					zyName: this.formData.zhiyeName,
+					zyLevelName: this.formData.zhiyeLevelName,
+					id: this.formData.id,
+					createTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
+				}
+				console.log('req', req);
+				if (this.status == 'add' || this.localStatus == 'editadd' || this.localStatus == 'addEdit') {
+					req.createTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
+				}
+				if (req.jgId == '' || req.zyId == '' || req.zyLevel == '') {
+					uni.showToast({
+						title: '请选择保证机构,职业名称,职业等级',
+						icon: 'none'
+					});
+					return false
+				}
+				if (this.formData.baozhengJigouType == 1 && (this.formData.shicaochengji == '' || this.formData
+						.zongkeshi ==
+						'' || this.formData.canxunshijian == '')) {
+					uni.showToast({
+						title: '请填写参训时间,实操成绩,总课时',
+						icon: 'none'
+					});
+					return false
+				}
+				console.log('req123123123', req);
+				if (req.jgId && req.zyId && req.zyLevel) {
+					if (this.localStatus == 'addEdit') {
+						this.$emit('addEdit', req, 'addEdit', this.currentIndex);
+					} else if (this.status == 'add') {
+						this.$emit('addSave', req);
+					} else if (this.localStatus == 'editAdd') {
+						this.$emit('editSave', req, 'editAdd');
+					} else {
+						this.$emit('editSave', req, 'edit', this.currentIndex);
 					}
-					console.log('req123123123', req);
-					if (req.jgId && req.zyId && req.zyLevel) {
-						if (this.localStatus == 'addEdit') {
-							this.$emit('addEdit', req, 'addEdit', this.currentIndex);
-						} else if (this.status == 'add') {
-							this.$emit('addSave', req);
-						} else if (this.localStatus == 'editAdd') {
-							this.$emit('editSave', req, 'editAdd');
-						} else {
-							this.$emit('editSave', req, 'edit', this.currentIndex);
-						}
-
-					} else if (req.jgId == '' && req.zyId == '' && req.zyLevel == '') {
-						if (this.status == 'add') {
-							this.$emit('addSave', '');
-						} else if (this.localStatus == 'editAdd') {
-							//this.$emit('editSave', '');
-							// uni.showToast({
-							// 	title: '请选择保证机构,职业名称,职业等级',
-							// 	icon: 'none'
-							// });
 
-							// return false
-						} else {
+				} else if (req.jgId == '' && req.zyId == '' && req.zyLevel == '') {
+					if (this.status == 'add') {
+						this.$emit('addSave', '');
+					} else if (this.localStatus == 'editAdd') {
+						//this.$emit('editSave', '');
+						// uni.showToast({
+						// 	title: '请选择保证机构,职业名称,职业等级',
+						// 	icon: 'none'
+						// });
 
-						}
+						// return false
 					} else {
-						uni.showToast({
-							title: '请选择保证机构,职业名称,职业等级',
-							icon: 'none'
-						});
 
-						return false
 					}
+				} else {
+					uni.showToast({
+						title: '请选择保证机构,职业名称,职业等级',
+						icon: 'none'
+					});
 
+					return false
 				}
+
 			}
-		};
+		}
+	};
 </script>