Browse Source

项目修改调整

sangwenwei 6 months ago
parent
commit
d489423b47
2 changed files with 15 additions and 68 deletions
  1. 14 67
      src/views/jy/project/ProjectEdit.vue
  2. 1 1
      src/views/jy/project/ProjectList.vue

+ 14 - 67
src/views/jy/project/ProjectEdit.vue

@@ -681,79 +681,26 @@
 			this.doSubmit('agree', callback)
 		},
 		// 表单提交
-		doSubmit (status, callback) {
+		doSubmit () {
+			console.log('12312321321')
 			this.loading = true
-			if (status === 'save') {
-				// 暂存
-				this.inputForm.status = '1'
-				this.loading = true
-				if (this.$refs.uploadComponent.checkProgress()) {
-					this.loading = false
-					return
-				}
-				this.inputForm.files = this.$refs.uploadComponent.getDataList()
-				this.projectInfoService.saveForm(this.inputForm).then((data) => {
-					callback(data.businessTable, data.businessId, this.inputForm)
-					this.loading = false
-				}).catch(() => {
-					this.loading = false
-				})
-				return
-			} else if (status === 'startAndHold') {
-				// 送审  待审核
-				this.inputForm.status = '2'
-			} else if (status === 'agree') {
-				// 审核同意
-				this.inputForm.status = '5'
-			}
-			if (this.commonJS.isEmpty(this.inputForm.clientList)) {
+			if (this.$refs.uploadComponent.checkProgress()) {
 				this.loading = false
-				this.$message.error('填写一条委托方联系人信息')
 				return
 			}
-			if (this.commonJS.isEmpty(this.inputForm.contractStatus)) {
+			console.log('this.inputForm', this.inputForm)
+			this.inputForm.files = this.$refs.uploadComponent.getDataList()
+			JSON
+			this.projectInfoService.saveForm(this.inputForm).then((data) => {
+				// this.inputForm.id = data.businessId
+				// callback(data.businessTable, data.businessId, this.inputForm)
+				// this.loading = false
+				this.visible=false
+				this.$emit('refreshList')
+			}).catch(() => {
 				this.loading = false
-				this.$message.error('请选择合同情况')
-				return
-			}
-			if (this.inputForm.contractStatus === '1' && this.inputForm.contractName === '') {
-				this.loading = false
-				this.$message.error('请选择合同')
-				return
-			}
-			if (this.commonJS.isEmpty(this.inputForm.projectPlace)) {
-				this.loading = false
-				this.$message.error('请选择项目所在地')
-				return
-			}
-			if (this.commonJS.isEmpty(this.inputForm.projectLeader)) {
-				this.loading = false
-				this.$message.error('请选择项目负责人')
-				return
-			}
-			this.$refs['inputForm'].validate((valid) => {
-				if (valid) {
-					this.loading = true
-					if (this.$refs.uploadComponent.checkProgress()) {
-						this.loading = false
-						return
-					}
-					console.log('this.inputForm', this.inputForm)
-					this.inputForm.files = this.$refs.uploadComponent.getDataList()
-					JSON
-					this.projectInfoService.saveForm(this.inputForm).then((data) => {
-						// this.inputForm.id = data.businessId
-						// callback(data.businessTable, data.businessId, this.inputForm)
-						// this.loading = false
-						this.visible=false
-						this.$emit('refreshList')
-					}).catch(() => {
-						this.loading = false
-					})
-				} else {
-					this.loading = false
-				}
 			})
+
 		},
 		async updateStatusById (type, callback) {
 			this.loading = true

+ 1 - 1
src/views/jy/project/ProjectList.vue

@@ -357,7 +357,7 @@
 		<ProofreadForm  ref="proofreadForm" @refreshDataList="refreshList"></ProofreadForm>
 		<ProofreadBrowseForm  ref="proofreadBrowseForm" @refreshDataList="refreshList"></ProofreadBrowseForm>
 		<ContractAddForm ref="contractAddForm"></ContractAddForm>
-		<ProjectEdit ref="projectEdit"></ProjectEdit>
+		<ProjectEdit ref="projectEdit" @refreshList="refreshList"></ProjectEdit>
 	</div>
 </template>