Browse Source

修改前端问题

lizhenhao 2 years ago
parent
commit
43e53652ca
1 changed files with 67 additions and 31 deletions
  1. 67 31
      src/views/modules/sys/workClient/WorkClientForm.vue

+ 67 - 31
src/views/modules/sys/workClient/WorkClientForm.vue

@@ -25,7 +25,7 @@
               width="400"
               width="400"
               trigger="click"
               trigger="click"
               :popper-options="{ boundariesElement: 'viewport', removeOnDestroy: true }"
               :popper-options="{ boundariesElement: 'viewport', removeOnDestroy: true }"
-              ref="pop">
+              ref="pops">
               <vxe-table
               <vxe-table
                 border="inner"
                 border="inner"
                 auto-resize
                 auto-resize
@@ -215,7 +215,7 @@
         <el-form-item label="开户行信息" prop="bankInfos">
         <el-form-item label="开户行信息" prop="bankInfos">
           <vxe-toolbar>
           <vxe-toolbar>
             <template #buttons>
             <template #buttons>
-              <vxe-button :disabled="method==='view'" size="mini" @click="insertEvent('bank')">新增</vxe-button>
+              <vxe-button status="primary" :disabled="method==='view'" size="mini" @click="insertEvent('bank')">新增</vxe-button>
             </template>
             </template>
           </vxe-toolbar>
           </vxe-toolbar>
         </el-form-item>
         </el-form-item>
@@ -234,17 +234,17 @@
           :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true}"
           :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true}"
         >
         >
 
 
-          <vxe-table-column field="ourBank" title="开户银行" >
+          <vxe-table-column field="ourBank" title="开户银行" :edit-render="{}">
             <template v-slot:edit="scope" >
             <template v-slot:edit="scope" >
               <el-input v-model="scope.row.ourBank" ></el-input>
               <el-input v-model="scope.row.ourBank" ></el-input>
             </template>
             </template>
           </vxe-table-column>
           </vxe-table-column>
-          <vxe-table-column field="bankNumber" title="开户账号" >
+          <vxe-table-column field="bankNumber" title="开户账号" :edit-render="{}">
             <template v-slot:edit="scope" >
             <template v-slot:edit="scope" >
               <el-input v-model="scope.row.bankNumber" ></el-input>
               <el-input v-model="scope.row.bankNumber" ></el-input>
             </template>
             </template>
           </vxe-table-column>
           </vxe-table-column>
-          <vxe-table-column field="remarks" title="备注信息" >
+          <vxe-table-column field="remarks" title="备注信息" :edit-render="{}">
             <template v-slot:edit="scope" >
             <template v-slot:edit="scope" >
               <el-input v-model="scope.row.remarks" ></el-input>
               <el-input v-model="scope.row.remarks" ></el-input>
             </template>
             </template>
@@ -256,10 +256,10 @@
           </vxe-table-column>
           </vxe-table-column>
         </vxe-table>
         </vxe-table>
 
 
-        <el-form-item label="联系人信息" prop="linkmanInfos">
-          <vxe-toolbar>
+        <el-form-item style="margin-top: 20px" label="联系人信息" prop="linkmanInfos">
+          <vxe-toolbar >
             <template #buttons>
             <template #buttons>
-              <vxe-button :disabled="method==='view'" size="mini" @click="insertEvent('linkman')">新增</vxe-button>
+              <vxe-button status="primary" :disabled="method==='view'" size="mini" @click="insertEvent('linkman')">新增</vxe-button>
             </template>
             </template>
           </vxe-toolbar>
           </vxe-toolbar>
         </el-form-item>
         </el-form-item>
@@ -275,40 +275,40 @@
           @cell-click="dbclickFun"
           @cell-click="dbclickFun"
           @edit-closed=""
           @edit-closed=""
           highlight-current-row
           highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true}"
+          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
         >
         >
 
 
-        <vxe-table-column field="name" title="联系人姓名" >
+        <vxe-table-column field="name" title="联系人姓名" :edit-render="{}">
           <template v-slot:edit="scope">
           <template v-slot:edit="scope">
             <el-input v-model="scope.row.name" ></el-input>
             <el-input v-model="scope.row.name" ></el-input>
           </template>
           </template>
         </vxe-table-column>
         </vxe-table-column>
-        <vxe-table-column field="office" title="部门" >
+        <vxe-table-column field="office" title="部门" :edit-render="{}">
           <template v-slot:edit="scope">
           <template v-slot:edit="scope">
             <el-input v-model="scope.row.office" ></el-input>
             <el-input v-model="scope.row.office" ></el-input>
           </template>
           </template>
         </vxe-table-column>
         </vxe-table-column>
-        <vxe-table-column field="position" title="职务" >
+        <vxe-table-column field="position" title="职务" :edit-render="{}">
           <template v-slot:edit="scope">
           <template v-slot:edit="scope">
             <el-input v-model="scope.row.position" ></el-input>
             <el-input v-model="scope.row.position" ></el-input>
           </template>
           </template>
         </vxe-table-column>
         </vxe-table-column>
-        <vxe-table-column field="qq" title="QQ" >
+        <vxe-table-column field="qq" title="QQ" :edit-render="{}">
           <template v-slot:edit="scope">
           <template v-slot:edit="scope">
             <el-input v-model="scope.row.qq" ></el-input>
             <el-input v-model="scope.row.qq" ></el-input>
           </template>
           </template>
         </vxe-table-column>
         </vxe-table-column>
-        <vxe-table-column field="linkPhone" title="联系方式1" >
+        <vxe-table-column field="linkPhone" title="联系方式1" :edit-render="{}">
           <template v-slot:edit="scope">
           <template v-slot:edit="scope">
             <el-input v-model="scope.row.linkPhone" ></el-input>
             <el-input v-model="scope.row.linkPhone" ></el-input>
           </template>
           </template>
         </vxe-table-column>
         </vxe-table-column>
-        <vxe-table-column field="linkMobile" title="联系方式2" >
+        <vxe-table-column field="linkMobile" title="联系方式2" :edit-render="{}">
           <template v-slot:edit="scope">
           <template v-slot:edit="scope">
             <el-input v-model="scope.row.linkMobile" ></el-input>
             <el-input v-model="scope.row.linkMobile" ></el-input>
           </template>
           </template>
         </vxe-table-column>
         </vxe-table-column>
-        <vxe-table-column field="email" title="E-mail" >
+        <vxe-table-column field="email" title="E-mail" :edit-render="{}">
           <template v-slot:edit="scope">
           <template v-slot:edit="scope">
             <el-input v-model="scope.row.email" ></el-input>
             <el-input v-model="scope.row.email" ></el-input>
           </template>
           </template>
@@ -320,7 +320,7 @@
         </vxe-table-column>
         </vxe-table-column>
         </vxe-table>
         </vxe-table>
 
 
-        <el-upload ref="upload" style="display: inline-block; margin-left: 5em; :show-header='status'" action=""
+        <el-upload  ref="upload" style="display: inline-block; margin-left: 5em; :show-header='status' ;margin-top: 20px;" action=""
                    :limit="999" :http-request="httpRequest"
                    :limit="999" :http-request="httpRequest"
                    multiple
                    multiple
                    :on-exceed="(files, fileList) =>{
                    :on-exceed="(files, fileList) =>{
@@ -682,7 +682,7 @@
                 })
                 })
               }
               }
               this.inputForm.workClientInfo = JSON.parse(JSON.stringify(data.workClientInfo))
               this.inputForm.workClientInfo = JSON.parse(JSON.stringify(data.workClientInfo))
-              this.inputForm.permissionFlag = data.permissionFlag
+              this.inputForm.permissionFlag = true
               this.inputForm.workClientInfo.deputyList = deputyList
               this.inputForm.workClientInfo.deputyList = deputyList
               this.inputForm.workClientInfo = JSON.parse(JSON.stringify(this.inputForm.workClientInfo))
               this.inputForm.workClientInfo = JSON.parse(JSON.stringify(this.inputForm.workClientInfo))
               this.inputForm.workClientInfo.hasUscc = JSON.stringify(this.inputForm.workClientInfo.hasUscc)
               this.inputForm.workClientInfo.hasUscc = JSON.stringify(this.inputForm.workClientInfo.hasUscc)
@@ -714,7 +714,46 @@
             this.linkmanInfos.forEach((item) => {
             this.linkmanInfos.forEach((item) => {
               this.inputForm.workClientLinkman.push(item)
               this.inputForm.workClientLinkman.push(item)
             })
             })
+            if (this.inputForm.workClientBank.length === 0) {
+              this.$message.error('开户行信息至少填写一条')
+              this.loading = false
+              return
+            } else {
+              let flag = true
+              this.inputForm.workClientBank.forEach(item => {
+                if (item.ourBank === null || item.ourBank === undefined || item.ourBank === '') {
+                  this.$message.error('开户银行未填写')
+                  this.loading = false
+                  flag = false
+                } else if (item.bankNumber === null || item.bankNumber === undefined || item.bankNumber === '') {
+                  this.$message.error('开户账号未填写')
+                  this.loading = false
+                  flag = false
+                }
+              })
+              if (flag === false) {
+                return
+              }
+            }
+            if (this.inputForm.workClientLinkman.length === 0) {
+              this.$message.error('联系人信息至少填写一条')
+              this.loading = false
+              return
+            } else {
+              let flag = true
+              this.inputForm.workClientLinkman.forEach(item => {
+                if (item.name === null || item.name === undefined || item.name === '') {
+                  this.$message.error('联系人姓名未填写')
+                  this.loading = false
+                  flag = false
+                }
+              })
+              if (flag === false) {
+                return
+              }
+            }
             this.inputForm.workClientInfo.deputy = this.inputForm.workClientInfo.deputyList.join(',')
             this.inputForm.workClientInfo.deputy = this.inputForm.workClientInfo.deputyList.join(',')
+
             this.workClientService.save(this.inputForm).then(({data}) => {
             this.workClientService.save(this.inputForm).then(({data}) => {
               this.close()
               this.close()
               this.$message.success(data)
               this.$message.success(data)
@@ -860,14 +899,6 @@
           this.radio = val.index
           this.radio = val.index
         }
         }
       },
       },
-
-      getAllFirm () {
-        this.rankSequenceService.queryAllFirm().then(({data}) => {
-          // 赋值的时候
-          this.bankInfo = JSON.parse(JSON.stringify(data))
-          this.bankInfos = JSON.parse(JSON.stringify(this.bankInfo))
-        })
-      },
       // 点击修改
       // 点击修改
       dbclickFun (cell) {
       dbclickFun (cell) {
         this.onedit = false
         this.onedit = false
@@ -887,12 +918,12 @@
       // eslint-disable-next-line no-dupe-keys
       // eslint-disable-next-line no-dupe-keys
       async insertEvent (type) {
       async insertEvent (type) {
         if (type === 'bank') {
         if (type === 'bank') {
-          await this.$refs.xTable1.insertAt().then((data) => {
+          await this.$refs.xTable1.insert().then((data) => {
             this.bankInfos.push(data)
             this.bankInfos.push(data)
           })
           })
         }
         }
         if (type === 'linkman') {
         if (type === 'linkman') {
-          await this.$refs.xTable2.insertAt().then((data) => {
+          await this.$refs.xTable2.insert().then((data) => {
             this.linkmanInfos.push(data)
             this.linkmanInfos.push(data)
           })
           })
         }
         }
@@ -924,13 +955,18 @@
             this.gridData = data
             this.gridData = data
           })
           })
         }
         }
-        this.$refs.pop.updatePopper()
-        this.keyNum++
+        this.$refs.pops.updatePopper()
       },
       },
       closePop () {
       closePop () {
         this.visable = false
         this.visable = false
-        this.keyNum++
       }
       }
     }
     }
   }
   }
 </script>
 </script>
+
+<style>
+  .tid_45 .vxe-body--column .vxe-cell{
+    padding: 0px;
+    text-align: center;
+  }
+</style>