浏览代码

项目登记前端

lizhenhao 2 年之前
父节点
当前提交
e30bc8afb6

+ 2 - 2
src/api/program/ProgramProjectListInfoService.js

@@ -25,8 +25,8 @@ export default class ProgramProjectListInfoService {
   delete (ids) {
     return request({
       url: '/program/projectList/deleteById',
-      method: 'delete',
-      params: {ids: ids}
+      method: 'get',
+      params: {id: ids}
     })
   }
   findContractPageList (params) {

+ 4 - 0
src/views/modules/program/registered/ContactForm.vue

@@ -103,6 +103,10 @@
       // 表单提交
       getContact () {
         let rows = this.$refs.contactTable.getCheckboxRecords()
+        if (this.commonJS.isEmpty(rows)) {
+          this.$message.error('请是至少选择一条数据')
+          return
+        }
         let list = []
         if (!this.commonJS.isEmpty(rows)) {
           rows.forEach(item => {

+ 4 - 0
src/views/modules/program/registered/ContractForm.vue

@@ -136,6 +136,10 @@
       // 表单提交
       getContract () {
         let row = this.$refs.workContractTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
         this.close()
         this.$emit('getContract', row)
       },

+ 76 - 17
src/views/modules/program/registered/ProjectForm.vue

@@ -6,10 +6,10 @@
       v-dialogDrag
       width="1300px"
       @close="close"
-      @keyup.enter.native="doSubmit"
+      @keyup.enter.native=""
       :visible.sync="visible">
       <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
-               label-width="200px" @submit.native.prevent>
+               label-width="220px" @submit.native.prevent>
         <el-divider content-position="left"><i class="el-icon-document"></i> 选择合同</el-divider>
         <el-row  :gutter="15">
           <el-col :span="24">
@@ -31,10 +31,22 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="合同金额(元)" prop="contractAmount"
+            <el-form-item label="合同金额(元)" prop="amount"
                           :rules="[
                  ]">
-              <el-input :disabled="true" v-model="inputForm.contractAmount" placeholder="请填写合同金额"></el-input>
+<!--              <el-input v-model="inputForm.amount" placeholder="请填写合同金额"></el-input>-->
+              <el-input-number
+                :disabled="true"
+                v-model="inputForm.amount"
+                controls-position="right"
+                :controls="false"
+                style="width:100%;"
+                :precision="2"
+                placeholder="请填写合同金额"
+                :step="0.01"
+                :min="0"
+                clearable>
+              </el-input-number>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -64,6 +76,7 @@
           <el-col :span="12">
             <el-form-item label="项目名称" prop="name"
                           :rules="[
+                          {required: true, message:'项目名称不能为空', trigger:'blur'}
                  ]">
               <el-input v-model="inputForm.name" placeholder="请输入项目名称" clearable></el-input>
             </el-form-item>
@@ -78,6 +91,7 @@
           <el-col :span="12">
             <el-form-item label="项目类别" prop="projectType"
                           :rules="[
+                          {required: true, message:'项目类别不能为空', trigger:'blur'}
                  ]">
               <el-radio v-model="inputForm.projectType" label="1" size="small" style="margin-right: 0px;width: 48%" border>资评报字</el-radio>
               <el-radio v-model="inputForm.projectType" label="2" size="small" style="margin-right: 0px;width: 48%" border>资评咨字</el-radio>
@@ -86,6 +100,7 @@
           <el-col :span="12">
             <el-form-item label="项目类型" prop="projectMould"
                           :rules="[
+                          {required: true, message:'项目类型不能为空', trigger:'blur'}
                  ]">
               <el-select v-model="inputForm.projectMould" placeholder="请选择项目类型" clearable style="width: 100%;">
                 <el-option
@@ -108,6 +123,8 @@
           <el-col :span="12">
             <el-form-item label="产权持有人" prop="propertyHolderName"
                           :rules="[
+                          {required: true, message:'产权持有人不能为空', trigger:'blur'},
+                          {required: true, message:'产权持有人不能为空', trigger:'change'}
                  ]">
               <el-input v-model="inputForm.propertyHolderName" @focus="openWorkClientForm('2')" placeholder="请输入产权持有人" clearable></el-input>
             </el-form-item>
@@ -115,6 +132,7 @@
           <el-col :span="12">
             <el-form-item label="项目所在地" prop="location"
                           :rules="[
+                          {required: true, message:'项目所在地不能为空', trigger:'blur'}
                  ]">
               <el-input v-model="inputForm.location" placeholder="请输入项目所在地"clearable></el-input>
             </el-form-item>
@@ -122,6 +140,7 @@
           <el-col :span="12">
             <el-form-item label="是否首次承做" prop="isFirst"
                           :rules="[
+                          {required: true, message:'是否首次承做不能为空', trigger:'blur'}
                  ]">
               <el-radio v-model="inputForm.isFirst" v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" size="small" style="margin-right: 0px;width: 48%" border>
                 {{item.label}}</el-radio>
@@ -130,6 +149,7 @@
           <el-col :span="12" v-if="inputForm.isFirst === '0'">
             <el-form-item label="已连续承做几年" prop="yearNum"
                           :rules="[
+                          {required: true, message:'已连续承做几年不能为空', trigger:'blur'}
                  ]">
               <el-input-number
                 v-model="inputForm.yearNum"
@@ -162,8 +182,8 @@
           <el-col :span="12">
             <el-form-item label="项目经理" prop="projectManager"
                           :rules="[
+                          {required: true, message:'项目经理不能为空', trigger:'blur'}
                  ]">
-<!--              <el-input v-model="inputForm.name6" placeholder="请输入项目经理"clearable></el-input>-->
               <SelectUserTree
                 ref="companyTree"
                 size="medium"
@@ -182,6 +202,7 @@
           <el-col :span="12">
             <el-form-item label="报告类型" prop="reportType"
                           :rules="[
+                          {required: true, message:'报告类型不能为空', trigger:'blur'}
                  ]">
               <el-select v-model="inputForm.reportType" placeholder="请选择报告类型" clearable style="width: 100%;">
                 <el-option
@@ -210,6 +231,7 @@
           <el-col :span="12">
             <el-form-item label="风险等级" prop="riskLevel"
                           :rules="[
+                          {required: true, message:'风险等级不能为空', trigger:'blur'}
                  ]">
               <el-radio v-model="inputForm.riskLevel" v-for="item in $dictUtils.getDictList('program_registered_risk_level')" :label="item.value" size="small" style="margin-right: 0px;width: 31%" border>
                 {{item.label}}</el-radio>
@@ -218,6 +240,7 @@
           <el-col :span="12">
             <el-form-item label="项目来源" prop="projectSource"
                           :rules="[
+                          {required: true, message:'项目来源不能为空', trigger:'blur'}
                  ]">
               <el-select v-model="inputForm.projectSource" placeholder="请选择项目来源" clearable style="width: 100%;">
                 <el-option
@@ -324,6 +347,8 @@
           <el-col :span="12">
             <el-form-item label="被评估企业" prop="assessmentEnterpriseName"
                           :rules="[
+                          {required: true, message:'被评估企业不能为空', trigger:'blur'},
+                          {required: true, message:'被评估企业不能为空', trigger:'change'}
                  ]">
               <el-input v-model="inputForm.assessmentEnterpriseName" @focus="openWorkClientForm('3')" placeholder="请输入被评估企业"clearable></el-input>
             </el-form-item>
@@ -331,6 +356,7 @@
           <el-col :span="12">
             <el-form-item label="联系人及电话" prop="linkNum"
                           :rules="[
+                          {required: true, message:'联系人及电话不能为空', trigger:'blur'}
                  ]">
               <el-input v-model="inputForm.linkNum" placeholder="请输入联系人及电话"clearable></el-input>
             </el-form-item>
@@ -359,6 +385,7 @@
           <el-col :span="12">
             <el-form-item label="评估基准日" prop="assessmentDate"
                           :rules="[
+                          {required: true, message:'评估基准日不能为空', trigger:'blur'}
                  ]">
               <el-date-picker
                 v-model="inputForm.assessmentDate"
@@ -374,6 +401,7 @@
           <el-col :span="12">
             <el-form-item label="评估服务收费总额" prop="num"
                           :rules="[
+                          {required: true, message:'评估服务收费总额不能为空', trigger:'blur'}
                  ]">
               <el-input-number
                 v-model="inputForm.num"
@@ -391,6 +419,7 @@
           <el-col :span="12">
             <el-form-item label="项目开发人" prop="projectDevelopment"
                           :rules="[
+                          {required: true, message:'项目开发人不能为空', trigger:'blur'}
                  ]">
               <el-input v-model="inputForm.projectDevelopment" placeholder="请输入项目开发人"clearable></el-input>
             </el-form-item>
@@ -398,6 +427,7 @@
           <el-col :span="12">
             <el-form-item label="项目类型" prop="delegateProjectType"
                           :rules="[
+                          {required: true, message:'项目类型不能为空', trigger:'blur'}
                  ]">
               <el-select v-model="inputForm.delegateProjectType" placeholder="请选择项目类型" clearable style="width: 100%">
                 <el-option-group
@@ -417,6 +447,7 @@
           <el-col :span="12">
             <el-form-item label="评估对象" prop="assessmentObject"
                           :rules="[
+                          {required: true, message:'评估对象不能为空', trigger:'blur'}
                  ]">
               <el-input v-model="inputForm.assessmentObject" placeholder="请输入评估对象"clearable></el-input>
             </el-form-item>
@@ -442,6 +473,7 @@
           <el-col :span="12">
             <el-form-item label="预计出报告时间" prop="reportingDate"
                           :rules="[
+                          {required: true, message:'预计出报告时间不能为空', trigger:'blur'}
                  ]">
               <el-date-picker
                 v-model="inputForm.reportingDate"
@@ -459,6 +491,7 @@
           <el-col :span="12">
             <el-form-item label="本所是否具备承接胜任能力" prop="isHave"
                           :rules="[
+                          {required: true, message:'本所是否具备承接胜任能力不能为空', trigger:'blur'}
                  ]">
               <el-radio v-model="inputForm.isHave" v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" size="small" style="margin-right: 0px;width: 48%" border>
                 {{item.label}}</el-radio>
@@ -467,6 +500,7 @@
           <el-col :span="12">
             <el-form-item label="是否影响本所承做人员独立性" prop="isInfluence"
                           :rules="[
+                          {required: true, message:'是否影响本所承做人员独立性不能为空', trigger:'blur'}
                  ]">
               <el-radio v-model="inputForm.isInfluence" v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" size="small" style="margin-right: 0px;width: 48%" border>
                 {{item.label}}</el-radio>
@@ -475,6 +509,7 @@
           <el-col :span="12">
             <el-form-item label="项目承做方式" prop="mode"
                           :rules="[
+                          {required: true, message:'项目承做方式不能为空', trigger:'blur'}
                  ]">
               <el-input v-model="inputForm.mode" placeholder="请输入项目承做方式"clearable></el-input>
             </el-form-item>
@@ -747,7 +782,8 @@
           name: '', // 项目名称
           projectType: '', // 项目类型
           company: '', // 执业机构
-          propertyHolder: '', // 产权持有人
+          propertyHolder: '', // 产权持有人id
+          propertyHolderName: '', // 产权持有人姓名
           location: '', // 项目所在地
           isFirst: '', // 是否首次承建
           yearNum: '', // 承做年数
@@ -765,6 +801,7 @@
           workHours: '', // 预算工时
           remarks: '', // 备注
           assessmentEnterprise: '', // 被评估企业
+          assessmentEnterpriseName: '', // 被评估企业名称
           linkNum: '', // 联系人及电话
           relationship: '', // 委托人与被评估单位关系
           assessmentWay: '', // 评估方式
@@ -824,6 +861,7 @@
           projectMould: '', // 项目类型
           company: '江苏兴光资产评估有限公司', // 执业机构
           propertyHolder: '', // 产权持有人
+          propertyHolderName: '', // 产权持有人姓名
           location: '', // 项目所在地
           isFirst: '', // 是否首次承建
           yearNum: '', // 承做年数
@@ -841,6 +879,7 @@
           workHours: '', // 预算工时
           remarks: '', // 备注
           assessmentEnterprise: '', // 被评估企业
+          assessmentEnterpriseName: '', // 被评估企业名称
           linkNum: '', // 联系人及电话
           relationship: '', // 委托人与被评估单位关系
           assessmentWay: '', // 评估方式
@@ -889,21 +928,21 @@
               this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
               if (!this.commonJS.isEmpty(this.inputForm.workBeginDate) && !this.commonJS.isEmpty(this.inputForm.workEndDate)) {
                 this.inputForm.workBeginAndEndDate = []
-                this.inputForm.workBeginAndEndDate[0] = JSON.stringify(this.inputForm.workBeginDate)
-                this.inputForm.workBeginAndEndDate[1] = JSON.stringify(this.inputForm.workEndDate)
+                this.inputForm.workBeginAndEndDate[0] = this.inputForm.workBeginDate
+                this.inputForm.workBeginAndEndDate[1] = this.inputForm.workEndDate
               }
-              this.clientList = []
-              this.equityList = []
-              this.contactList = []
+              this.inputForm.clientList = []
+              this.inputForm.equityList = []
+              this.inputForm.contactList = []
               this.inputForm.links.forEach(item => {
                 if (item.type === '0') {
-                  this.clientList.push(item)
+                  this.inputForm.clientList.push(item)
                 }
                 if (item.type === '2') {
-                  this.equityList.push(item)
+                  this.inputForm.equityList.push(item)
                 }
                 if (item.type === '3') {
-                  this.contactList.push(item)
+                  this.inputForm.contactList.push(item)
                 }
               })
               this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'program')
@@ -952,8 +991,9 @@
         if (!this.commonJS.isEmpty(this.inputForm.workBeginAndEndDate)) {
           this.inputForm.workBeginDate = this.inputForm.workBeginAndEndDate[0]
           this.inputForm.workEndDate = this.inputForm.workBeginAndEndDate[1]
-          this.moment(this.inputForm.workBeginDate).format('yyyy-MM-dd')
-          this.moment(this.inputForm.workEndDate).format('yyyy-MM-dd')
+        }
+        if (this.inputForm.isFirst === '1') {
+          this.inputForm.yearNum = ''
         }
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
@@ -963,7 +1003,6 @@
               return
             }
             this.inputForm.files = this.$refs.uploadComponent.getDataList()
-            console.log(this.inputForm)
             this.programProjectListInfoService.save(this.inputForm).then(({data}) => {
               this.close()
               this.$message.success(data)
@@ -989,6 +1028,7 @@
         this.inputForm.clientName = row.clientName // 委托方名称
         this.inputForm.amount = row.contractAmount // 合同金额
         this.inputForm.contractType = row.contractType // 合同类型
+        this.clearClientList()
         this.$forceUpdate()
       },
       openWorkClientForm (deputy) {
@@ -1002,10 +1042,12 @@
         if (deputy === '2') {
           this.inputForm.propertyHolderName = row.name
           this.inputForm.propertyHolder = row.id
+          this.clearEquityList()
         }
         if (deputy === '3') {
           this.inputForm.assessmentEnterpriseName = row.name
           this.inputForm.assessmentEnterprise = row.id
+          this.clearContactList()
         }
         this.$forceUpdate()
       },
@@ -1042,6 +1084,7 @@
         if (deputy === '3') {
           this.inputForm.contactList = rows
         }
+        this.$forceUpdate()
       },
       close () {
         this.$refs.uploadComponent.clearUpload()
@@ -1095,6 +1138,22 @@
             this.inputForm.clientList.push(data)
           })
         }
+      },
+      clearContactList () {
+        // 被评估企业对接联系人列表清除
+        this.inputForm.contactList = []
+        this.$forceUpdate()
+      },
+      clearEquityList () {
+        console.log('45454545454554545')
+        // 产权持有人联系人列表清除
+        this.inputForm.equityList = []
+        this.$forceUpdate()
+      },
+      clearClientList () {
+        // 项目直接对接联系人列表清除
+        this.inputForm.clientList = []
+        this.$forceUpdate()
       }
     }
   }

文件差异内容过多而无法显示
+ 1153 - 0
src/views/modules/program/registered/RegisItemForm.vue


+ 4 - 0
src/views/modules/program/registered/WorkClientForm.vue

@@ -183,6 +183,10 @@
       // 表单提交
       getWorkClient () {
         let row = this.$refs.workClientTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
         this.close()
         this.$emit('getWorkClient', row, this.searchForm.deputy)
       },