Procházet zdrojové kódy

客户登记详情页面

lizhenhao před 2 roky
rodič
revize
410e09ddd6

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1345 - 0
src/views/modules/cw/workClientInfo/WorkClientForm.vue


+ 16 - 12
src/views/modules/cw/workClientInfo/WorkClientList.vue

@@ -95,8 +95,13 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="40" ></vxe-column>
-          <vxe-column min-width="230" align="center" title="客户名称" field="name"></vxe-column>
+          <vxe-column min-width="230" align="center" title="客户名称" field="name">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cw_work_client:info:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cw_work_client:info:view')"  @click="view(scope.row.id,)">{{scope.row.name}}</el-link>
+              <span v-else>{{scope.row.name}}</span>
+            </template>
+          </vxe-column>
           <vxe-column min-width="160" align="center" title="客户编号" field="no"></vxe-column>
           <vxe-column min-width="160" align="center" title="客户类型" field="type">
             <template slot-scope="scope">
@@ -161,6 +166,7 @@
         </vxe-pager>
       </div>
     </div>
+    <WorkClientForm ref="workClientForm"></WorkClientForm>
   </div>
 </template>
 
@@ -168,6 +174,7 @@
   import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
   import TaskService from '@/api/flowable/TaskService'
   import ProcessService from '@/api/flowable/ProcessService'
+  import WorkClientForm from './WorkClientForm'
   import pick from 'lodash.pick'
   export default {
     data () {
@@ -206,6 +213,7 @@
       this.processService = new ProcessService()
     },
     components: {
+      WorkClientForm
     },
     computed: {
       userName () {
@@ -225,22 +233,18 @@
     methods: {
       // 新增
       add () {
-        this.$refs.klgBaseQuestionsForm.init('add', '')
+        this.$refs.workClientForm.init('add', '')
       },
       // 修改
       edit (id) {
-        id = id || this.$refs.questionsTable.getCheckboxRecords().map(item => {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
           return item.id
         })[0]
-        this.$refs.klgBaseQuestionsForm.init('edit', id)
+        this.$refs.workClientForm.init('edit', id)
       },
       // 查看
       view (id) {
-        this.$refs.klgBaseQuestionsDetailForm.init('view', id)
-      },
-      // 查看
-      viewProgram (id) {
-        this.$refs.projectFormUpdate.init('view', id)
+        this.$refs.workClientForm.init('view', id)
       },
       // 获取数据列表
       refreshList () {
@@ -279,7 +283,7 @@
       },
       // 删除
       del (id) {
-        let ids = id || this.$refs.questionsTable.getCheckboxRecords().map(item => {
+        let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
           return item.id
         }).join(',')
         this.$confirm(`确定删除所选项吗?`, '提示', {
@@ -383,7 +387,7 @@
           type: 'warning'
         }).then(async () => {
           await this.workClientService.queryById(row.id).then(({data}) => {
-            if (row.procInsId !== data.procInsId) { // status的值不等于“审核中”,就弹出提示
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
               this.refreshList()
             } else {

+ 4 - 181
src/views/modules/cw/workClientInfo/WorkClientTaskForm.vue

@@ -511,7 +511,7 @@
                   >
                     <vxe-table-column align="center" field="isTaxpayerIdentificationNo" title="是否有纳税人识别号" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no')}">
                       <template v-slot:edit="scope">
-                        <vxe-select @change="changeTaxpayerIdentificationNo(scope.$rowIndex)" v-model="scope.row.isTaxpayerIdentificationNo" placeholder="是否有纳税人识别号" clearable style="width: 100%;" transfer>
+                        <vxe-select :disabled="formReadOnly" @change="changeTaxpayerIdentificationNo(scope.$rowIndex)" v-model="scope.row.isTaxpayerIdentificationNo" placeholder="是否有纳税人识别号" clearable style="width: 100%;" transfer>
                           <vxe-option
                             v-for="item in $dictUtils.getDictList('yes_no')"
                             :key="item.value"
@@ -585,7 +585,7 @@
                     </vxe-table-column>
                     <vxe-table-column align="center" field="sex" title="性别" :edit-render="{name: '$select', options: $dictUtils.getDictList('sex')}">
                       <template v-slot:edit="scope">
-                        <vxe-select v-model="scope.row.sex" placeholder="性别" clearable style="width: 100%;" transfer>
+                        <vxe-select :disabled="formReadOnly" v-model="scope.row.sex" placeholder="性别" clearable style="width: 100%;" transfer>
                           <vxe-option
                             v-for="item in $dictUtils.getDictList('sex')"
                             :key="item.value"
@@ -932,7 +932,7 @@
       },
       async agreeForm (callback) {
         await this.workClientService.queryById(this.inputForm.id).then(({data}) => {
-          if (this.inputForm.procInsId !== data.procInsId || this.inputForm.status !== '2') { // “procInsId”已经改变或者审核状态不是“待审核”,就弹出提示
+          if (this.inputForm.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
           } else {
@@ -998,7 +998,7 @@
             throw new Error()
           }
           await this.workClientService.queryById(this.inputForm.id).then(({data}) => {
-            if (this.inputForm.procInsId !== data.procInsId || this.inputForm.status !== '2') { // status的值不等于“审核中”,或者“procInsId”已经改变,就弹出提示
+            if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
               this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
               throw new Error()
             } else {
@@ -1317,183 +1317,6 @@
           }
         })
       }
-      // contactSubmit () {
-      //   if (this.commonJS.isNotEmpty(this.inputForm.cwWorkClientContactDTOList)) {
-      //     this.inputForm.cwWorkClientContactDTOList.forEach((item, index) => {
-      //       if (this.commonJS.isEmpty(item.name)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.name)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].name = item.row.name
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].name = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].name = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.sex)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.sex)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].sex = item.row.sex
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].sex = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].sex = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.officeId)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.officeId)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].officeId = item.row.officeId
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].officeId = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].officeId = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.position)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.position)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].position = item.row.position
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].position = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].position = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.contactFirst)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.contactFirst)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].contactFirst = item.row.contactFirst
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].contactFirst = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].contactFirst = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.contactSecond)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.contactSecond)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].contactSecond = item.row.contactSecond
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].contactSecond = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].contactSecond = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.fax)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.fax)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].fax = item.row.fax
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].fax = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].fax = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.email)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.email)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].email = item.row.email
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].email = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].email = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.remarks)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.remarks)) {
-      //             this.inputForm.cwWorkClientContactDTOList[index].remarks = item.row.remarks
-      //           } else {
-      //             this.inputForm.cwWorkClientContactDTOList[index].remarks = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientContactDTOList[index].remarks = ''
-      //         }
-      //       }
-      //     })
-      //   }
-      // },
-      // billingSubmit () {
-      //   if (this.commonJS.isNotEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
-      //     this.inputForm.cwWorkClientBillingDTOList.forEach((item, index) => {
-      //       if (this.commonJS.isEmpty(item.isTaxpayerIdentificationNo)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.isTaxpayerIdentificationNo)) {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].isTaxpayerIdentificationNo = item.row.isTaxpayerIdentificationNo
-      //           } else {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].isTaxpayerIdentificationNo = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientBillingDTOList[index].isTaxpayerIdentificationNo = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.taxpayerIdentificationNo)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.taxpayerIdentificationNo)) {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].taxpayerIdentificationNo = item.row.taxpayerIdentificationNo
-      //           } else {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].taxpayerIdentificationNo = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientBillingDTOList[index].taxpayerIdentificationNo = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.accountHolder)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.accountHolder)) {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].accountHolder = item.row.accountHolder
-      //           } else {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].accountHolder = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientBillingDTOList[index].accountHolder = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.account)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.account)) {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].account = item.row.account
-      //           } else {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].account = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientBillingDTOList[index].account = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.phone)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.phone)) {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].phone = item.row.phone
-      //           } else {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].phone = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientBillingDTOList[index].phone = ''
-      //         }
-      //       }
-      //       if (this.commonJS.isEmpty(item.address)) {
-      //         if (this.commonJS.isNotEmpty(item.row)) {
-      //           if (this.commonJS.isNotEmpty(item.row.address)) {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].address = item.row.address
-      //           } else {
-      //             this.inputForm.cwWorkClientBillingDTOList[index].address = ''
-      //           }
-      //         } else {
-      //           this.inputForm.cwWorkClientBillingDTOList[index].address = ''
-      //         }
-      //       }
-      //     })
-      //   }
-      // }
     }
   }
 </script>