Bläddra i källkod

展示项调整

user5 1 år sedan
förälder
incheckning
c127f51e40

+ 1 - 1
src/views/cw/reimbursementApproval/info/CwProgramPageForm.vue

@@ -30,7 +30,7 @@
                 <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
               </el-form-item>
             </el-form>
-<!--            <div v-if="num" style="margin-bottom: 10px"><span style="color: #F56C6C">注:最多选择 10 条数据</span></div>-->
+            <div v-if="num" style="margin-bottom: 10px"><span style="color: #F56C6C">注:最多选择 50 条数据</span></div>
             <vxe-table
               border="inner"
               auto-resize

+ 0 - 1
src/views/cw/reimbursementApproval/info/InfoList.vue

@@ -550,7 +550,6 @@
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then((data) => {
-        	console.log('data',data.records)
           this.dataList = data.records
           this.tablePage.total = data.total
           this.loading = false

+ 22 - 6
src/views/program/registered/ProjectFormUpdate.vue

@@ -523,6 +523,7 @@
 			  <vxe-table
 				  border
 				  show-overflow
+				  :key="clientTableKey"
 				  ref="clientTable"
 				  class="vxe-table-element"
 				  :data="inputForm.clientList"
@@ -754,6 +755,7 @@
           equityList: [], // 产权持有人联系人
           clientList: [] // 项目直接对接联系人
         },
+		  clientTableKey: 'default',
         clientTypes: [
           {value: '1', label: '委托人'},
           {value: '2', label: '项目对接人'}
@@ -973,6 +975,7 @@
         })
       },
       getContract (row) {
+      	console.log(row)
         this.inputForm.contractId = row.id // 合同id
         this.inputForm.contractName = row.name // 合同名称
         this.inputForm.client = row.clientId // 委托方
@@ -1012,12 +1015,25 @@
         }
       },
       getContact (rows, deputy) {
-        if (deputy === '0') {
-          rows.forEach(item => {
-            this.inputForm.clientList.push(item)
-          })
-        }
-        this.$forceUpdate()
+		  if (this.commonJS.isNotEmpty(this.inputForm.clientList)) {
+			  this.inputForm.clientList.forEach(item => {
+				  rows.forEach(row => {
+					  if (item.contacts === row.contacts && item.linkMobilePhoneFirst === row.linkMobilePhoneFirst && item.linkMobilePhoneSecoed === row.linkMobilePhoneSecoed) {
+						  this.$message.error('联系人已存在')
+						  throw new Error()
+					  }
+				  })
+			  })
+		  }
+		  this.$nextTick(() => {
+			  if (deputy === '0') {
+				  rows.forEach(item => {
+					  this.inputForm.clientList.push(item)
+					  this.clientTableKey = Math.random()
+				  })
+			  }
+			  this.$forceUpdate()
+		  })
       },
       openWorkClientForm (deputy) {
         if (!this.commonJS.isEmpty(this.inputForm.propertyHolder)) {