Browse Source

添加修改审定金额接口

huangguoce 3 weeks ago
parent
commit
b7eb09e54b

+ 7 - 0
src/api/cw/reportManagement/ProjectReportService.js

@@ -32,6 +32,13 @@ export default {
 			data: inputForm,
 		});
 	},
+	updateAmount: function (inputForm) {
+		return request({
+			url: prefix + `/cwProjectReport/updateAmount`,
+			method: "post",
+			data: inputForm,
+		});
+	},
 	saveForm2: function (inputForm) {
 		return request({
 			url: prefix + `/cwProjectReport/saveForm2`,

+ 11 - 33
src/views/cw/reportManagement/ReportApprovedAmountForm.vue

@@ -230,7 +230,7 @@
               </el-col>
               <el-col :span="12" v-if="inputForm.reportType === '1'">
                 <el-form-item label="审定金额(不含税/元)" prop="approvedNoIncludingTax" :rules="[
-					{ required: true, message: '审定金额(不含税/元)不能为空', trigger: 'blur' },
+                  { required: true, message: '审定金额(不含税/元)不能为空', trigger: 'blur' },
                 ]">
                   <el-input v-model="inputForm.approvedNoIncludingTax" placeholder="请填写审定金额(不含税/元)" v-on:input="inputForm.approvedNoIncludingTax = inputForm.approvedNoIncludingTax.replace(/[^\d.]/g, '')
                     .replace(/^\./g, '')
@@ -241,7 +241,7 @@
               </el-col>
               <el-col :span="12" v-if="inputForm.reportType === '1'">
                 <el-form-item label="审定金额(含税/元)" prop="approvedIncludingTax" :rules="[
-					{ required: true, message: '审定金额(含税/元)不能为空', trigger: 'blur' },
+                  { required: true, message: '审定金额(含税/元)不能为空', trigger: 'blur' },
                 ]">
                   <el-input v-model="inputForm.approvedIncludingTax" placeholder="请填写审定金额(含税/元)" v-on:input="inputForm.approvedIncludingTax = inputForm.approvedIncludingTax.replace(/[^\d.]/g, '')
                     .replace(/^\./g, '')
@@ -1316,37 +1316,15 @@ export default {
               this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
               this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
               this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
-              //根据签字注师1的人员id去查是否超过了100次
-              userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
-                if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
-                  if (data.name === '王真' && data.accountantUserCount <= 120) {
-
-                    this.reportReviewService.save(this.inputForm).then(() => {
-                      projectReportService.saveForm(this.inputForm).then(() => {
-                        this.$emit('refreshList')
-                        this.close()
-                        this.loading = false
-                      }).catch(() => {
-                        this.loading = false
-                      })
-                    })
-                  } else {
-                    this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-                    this.loading = false
-                    throw new Error()
-                  }
-                } else {
-                  this.reportReviewService.save(this.inputForm).then(() => {
-                    projectReportService.saveForm(this.inputForm).then(() => {
-                      this.$emit('refreshList')
-                      this.close()
-                      this.loading = false
-                    }).catch(() => {
-                      this.loading = false
-                    })
-                  })
-                }
-              });
+              // 只修改审定金额
+              projectReportService.updateAmount(this.inputForm).then((data) => {
+                this.$emit('refreshList')
+                this.close()
+                this.$message.success(data.msg)
+                this.loading = false
+              }).catch(() => {
+                this.loading = false
+              })
             }
           })
           return