소스 검색

客户、项目模块优化

lizhenhao 2 년 전
부모
커밋
cc9f06c6ca

+ 7 - 0
src/api/cw/workClientInfo/WorkClientService.js

@@ -8,6 +8,13 @@ export default class WorkClientService {
       params: params
     })
   }
+  listTree (params) {
+    return request({
+      url: '/cw_work_client/info/list_tree',
+      method: 'get',
+      params: params
+    })
+  }
   queryById (id) {
     return request({
       url: '/cw_work_client/info/queryById',

+ 13 - 1
src/views/modules/cw/projectRecords/ProjectRecordsList.vue

@@ -83,6 +83,12 @@
             </template>
           </vxe-column>
           <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
+          <vxe-column min-width="230" align="center" title="合同名称" field="contractName">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="commonJS.isNotEmpty(scope.row.contractId)&&commonJS.isNotEmpty(scope.row.contractName)" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>
+              <span v-else style="color: red">暂无合同</span>
+            </template>
+          </vxe-column>
           <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
@@ -117,6 +123,7 @@
       </div>
     </div>
     <ProjectRecordsForm ref="projectRecordsForm" @refreshList="refreshList"></ProjectRecordsForm>
+    <ContractNameForm ref="contractNameForm"></ContractNameForm>
   </div>
 </template>
 
@@ -128,6 +135,7 @@
   import pick from 'lodash.pick'
   import UserService from '@/api/sys/UserService'
   import UserSelect from '@/components/userSelect'
+  import ContractNameForm from '../workContract/ContractNameForm'
   export default {
     data () {
       return {
@@ -164,7 +172,8 @@
     },
     components: {
       ProjectRecordsForm,
-      UserSelect
+      UserSelect,
+      ContractNameForm
     },
     computed: {
       userName () {
@@ -197,6 +206,9 @@
       view (id) {
         this.$refs.projectRecordsForm.init('view', id)
       },
+      viewContract (id) {
+        this.$refs.contractNameForm.init('view', id)
+      },
       // 查询当前用户是否是管理员用户
       checkIsAdmin () {
         this.userService.is().then(({data}) => {

+ 5 - 4
src/views/modules/cw/projectRecords/WorkContractChooseCom.vue

@@ -4,7 +4,7 @@
       title="选择合同"
       :close-on-click-modal="false"
       v-dialogDrag
-      width="1100px"
+      width="1300px"
       height="500px"
       @close="close"
       append-to-body
@@ -13,12 +13,13 @@
       <div style="height: calc(100% - 80px);">
         <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
           <!-- 搜索框-->
-          <el-form-item label="合同名称" prop="contractName">
-            <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
-          </el-form-item>
           <el-form-item label="合同编号" prop="contractNo">
             <el-input size="small" v-model="searchForm.contractNo" placeholder="请输入客户名称" clearable></el-input>
           </el-form-item>
+          <el-form-item label="合同名称" prop="contractName">
+            <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
+
 
           <el-form-item>
             <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>

+ 43 - 5
src/views/modules/cw/workClientInfo/WorkClientChooseForm.vue

@@ -4,13 +4,48 @@
       :title="title"
       :close-on-click-modal="false"
       v-dialogDrag
-      width="1100px"
+      width="1400px"
       append-to-body
       height="500px"
       @close="close"
       @keyup.enter.native="getWorkClient"
       :visible.sync="visibleChoose">
       <div style="height: calc(100%);">
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="客户名称" prop="name">
+            <el-input size="small" v-model="searchForm.name" placeholder="客户名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="客户编号" prop="no">
+            <el-input size="small" v-model="searchForm.no" placeholder="客户编号" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="客户类型" prop="type">
+            <el-select v-model="searchForm.type" placeholder="请选择" style="width:100%;"clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_work_client_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="所属行业" prop="industry">
+            <el-select v-model="searchForm.industry" placeholder="请选择" style="width:100%;"clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_work_client_industry')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
 
         <vxe-table
           border="inner"
@@ -45,6 +80,7 @@
               {{$dictUtils.getDictLabel('cw_work_client_industry', scope.row.industry, '-')}}
             </template>
           </vxe-column>
+          <vxe-column width="" title="联系电话" align="center" field="mobile"></vxe-column>
           <vxe-column width="" title="公司级次" align="center" field="companyLevel"></vxe-column>
         </vxe-table>
       </div>
@@ -76,7 +112,9 @@
         dataList: [],
         searchForm: {
           name: '',
-          no: ''
+          no: '',
+          type: '',
+          industry: ''
         }
       }
     },
@@ -122,7 +160,7 @@
         this.dataList = []
         this.loading = true
         this.searchForm.status = '5'
-        this.workClientService.list({
+        this.workClientService.listTree({
           'current': 1,
           'size': -1,
           'orders': this.tablePage.orders,
@@ -140,11 +178,11 @@
         this.list()
       },
       resetSearch () {
-        // this.$refs.searchForm.resetFields()
+        this.$refs.searchForm.resetFields()
         this.list()
       },
       close () {
-        // this.$refs.searchForm.resetFields()
+        this.$refs.searchForm.resetFields()
         this.visibleChoose = false
       }
     }

+ 164 - 18
src/views/modules/cw/workClientInfo/WorkClientForm.vue

@@ -4,7 +4,7 @@
       :title="title"
       :close-on-click-modal="false"
       v-dialogDrag
-      width="1200px"
+      width="1400px"
       height="500px"
       @close="close"
       @keyup.enter.native=""
@@ -14,7 +14,7 @@
         <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
           <el-tab-pane label="基本信息" name="base">
             <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
-                     label-width="135px" @submit.native.prevent>
+                     label-width="180px" @submit.native.prevent>
               <el-row  :gutter="0">
                 <el-col :span="10">
                   <el-form-item label="客户名称" prop="name" :rules="[
@@ -93,13 +93,6 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                  <el-form-item label="统一社会信用代码" prop="uscCode"
-                                :rules="[
-                   ]">
-                    <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="12">
                   <el-form-item label="特殊客户类型" prop="scType"
                                 :rules="[
                    ]">
@@ -114,6 +107,32 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
+                  <el-form-item label="是否有统一社会信用代码" prop="isUscCode"
+                                :rules="[
+                                {required: true, message:'请选择是否有统一社会信用代码', trigger:'blur'}
+                   ]">
+                    <el-radio-group v-model="inputForm.isUscCode" @change="changeIsUscCode">
+                      <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" >{{item.label}}</el-radio>
+                    </el-radio-group>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="inputForm.isUscCode === '1'" :span="12">
+                  <el-form-item label="统一社会信用代码" prop="uscCode"
+                                :rules="[
+                                  {required: true, message:'统一社会信用代码不能为空', trigger:'blur'}
+                   ]">
+                    <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="inputForm.isUscCode === '0'||commonJS.isEmpty(inputForm.isUscCode)" :span="12">
+                  <el-form-item label="统一社会信用代码" prop="uscCode"
+                                :rules="[
+                   ]">
+                    <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+
+                <el-col :span="12">
                   <el-form-item label="管理级次分类" prop="manageLevelType"
                                 :rules="[
                    ]">
@@ -247,6 +266,21 @@
                       @getValue="(value) => {inputForm.officeId=value}"/>
                   </el-form-item>
                 </el-col>
+                <el-col :span="12">
+                  <el-form-item label="地址" prop="address"
+                                :rules="[
+                                {required: true, message:'地址不能为空', trigger:'blur'}
+                   ]">
+                    <el-input v-model="inputForm.address" placeholder="地址" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="联系电话" prop="mobile"
+                                :rules="[
+                   ]">
+                    <el-input v-model="inputForm.mobile" placeholder="联系电话" clearable></el-input>
+                  </el-form-item>
+                </el-col>
                 <el-col :span="24">
                   <el-form-item label="备注" prop="remarks"
                                 :rules="[
@@ -516,11 +550,18 @@
                   @cell-click=""
                   @edit-closed=""
                   highlight-current-row
-                  :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+                  :edit-rules="inputForm.isUscCode === '1'?validBillingRules1:validBillingRules0"
+                  :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false, icon: '-'}"
                 >
+                  <vxe-table-column align="center" field="companyName" title="公司名称" :edit-render="{}">
+                    <template v-slot:edit="scope">
+                      <el-input v-model="scope.row.companyName" placeholder="公司名称" clearable></el-input>
+                    </template>
+                  </vxe-table-column>
                   <vxe-table-column align="center" field="isTaxpayerIdentificationNo" title="是否有纳税人识别号" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no')}">
                     <template v-slot:edit="scope">
-                      <vxe-select :disabled="method==='view'" @change="changeTaxpayerIdentificationNo(scope.$rowIndex)" v-model="scope.row.isTaxpayerIdentificationNo" placeholder="是否有纳税人识别号" clearable style="width: 100%;" transfer>
+<!--                      <vxe-select :disabled="method==='view'" @change="changeTaxpayerIdentificationNo(scope.$rowIndex)" v-model="scope.row.isTaxpayerIdentificationNo" placeholder="是否有纳税人识别号" clearable style="width: 100%;" transfer>-->
+                      <vxe-select :disabled="true" v-model="scope.row.isTaxpayerIdentificationNo" placeholder="是否有纳税人识别号" clearable style="width: 100%;" transfer>
                         <vxe-option
                           v-for="item in $dictUtils.getDictList('yes_no')"
                           :key="item.value"
@@ -532,7 +573,8 @@
                   </vxe-table-column>
                   <vxe-table-column align="center" field="taxpayerIdentificationNo" title="纳税人识别号" :edit-render="{}">
                     <template v-slot:edit="scope">
-                      <el-input :disabled="scope.row.disabledTaxpayerIdentificationNo||commonJS.isEmpty(scope.row.isTaxpayerIdentificationNo)" @change="$forceUpdate()" v-model="scope.row.taxpayerIdentificationNo" placeholder="纳税人识别号" clearable></el-input>
+<!--                      <el-input :disabled="scope.row.disabledTaxpayerIdentificationNo||commonJS.isEmpty(scope.row.isTaxpayerIdentificationNo)" @change="$forceUpdate()" v-model="scope.row.taxpayerIdentificationNo" placeholder="纳税人识别号" clearable></el-input>-->
+                      <el-input :disabled="scope.row.isTaxpayerIdentificationNo !== '1'" v-model="scope.row.taxpayerIdentificationNo" placeholder="纳税人识别号" clearable></el-input>
                     </template>
                   </vxe-table-column>
                   <vxe-table-column align="center" field="accountHolder" title="开户行" :edit-render="{}">
@@ -585,7 +627,8 @@
                   @cell-click=""
                   @edit-closed=""
                   highlight-current-row
-                  :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+                  :edit-rules="validContactRules"
+                  :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false, icon: '-'}"
                 >
                   <vxe-table-column align="center" field="name" title="姓名" :edit-render="{}">
                     <template v-slot:edit="scope">
@@ -758,7 +801,10 @@
           },
           cwWorkClientBillingDTOList: [],
           cwWorkClientContactDTOList: [],
-          workAttachmentDtoList: []
+          workAttachmentDtoList: [],
+          address: '',
+          mobile: '',
+          isUscCode: ''
         },
         keyWatch: '',
         activeName: 'base',
@@ -769,7 +815,55 @@
         disabled_change: true,
         tableKeyBilling: '1',
         tableKeyContact: '2',
-        visible: false
+        visible: false,
+        validBillingRules0: {
+          companyName: [
+            {required: true, message: '公司名称不可以为空'}
+          ],
+          isTaxpayerIdentificationNo: [
+            {required: true, message: '是否有纳税人识别号不可以为空'}
+          ],
+          accountHolder: [
+            {required: true, message: '开户行不可以为空'}
+          ],
+          account: [
+            {required: true, message: '银行账号不可以为空'}
+          ]
+        },
+        validBillingRules1: {
+          companyName: [
+            {required: true, message: '公司名称不可以为空'}
+          ],
+          isTaxpayerIdentificationNo: [
+            {required: true, message: '是否有纳税人识别号不可以为空'}
+          ],
+          taxpayerIdentificationNo: [
+            {required: true, message: '纳税人识别号不可以为空'}
+          ],
+          accountHolder: [
+            {required: true, message: '开户行不可以为空'}
+          ],
+          account: [
+            {required: true, message: '银行账号不可以为空'}
+          ]
+        },
+        validContactRules: {
+          name: [
+            {required: true, message: '姓名不可以为空'}
+          ],
+          sex: [
+            {required: true, message: '性别不可以为空'}
+          ],
+          officeId: [
+            {required: true, message: '部门不可以为空'}
+          ],
+          position: [
+            {required: true, message: '职务不可以为空'}
+          ],
+          contactFirst: [
+            {required: true, message: '联系方式1不可以为空'}
+          ]
+        }
       }
     },
     workClientService: null,
@@ -887,7 +981,10 @@
           },
           cwWorkClientBillingDTOList: [],
           cwWorkClientContactDTOList: [],
-          workAttachmentDtoList: []
+          workAttachmentDtoList: [],
+          address: '',
+          mobile: '',
+          isUscCode: ''
         }
         this.inputForm.id = id
         this.loading = false
@@ -913,6 +1010,9 @@
             if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
               this.inputForm.workAttachmentDtoList = []
             }
+            if (this.commonJS.isEmpty(this.inputForm.isUscCode)) {
+              this.inputForm.isUscCode = '1'
+            }
             if (this.commonJS.isEmpty(this.inputForm.createBy.name)) {
               this.inputForm.createBy.name = JSON.parse(localStorage.getItem('user')).name
             }
@@ -1115,7 +1215,10 @@
           },
           cwWorkClientBillingDTOList: [],
           cwWorkClientContactDTOList: [],
-          workAttachmentDtoList: []
+          workAttachmentDtoList: [],
+          address: '',
+          mobile: '',
+          isUscCode: ''
         }
         this.$refs.uploadComponent.clearUpload()
         this.$refs.inputForm.resetFields()
@@ -1123,6 +1226,8 @@
         this.visible = false
       },
       tabHandleClick (event) {
+        this.tableKeyBilling = Math.random()
+        this.tableKeyContact = Math.random()
         // console.log(event)
       },
       rowStyle (event) {
@@ -1240,7 +1345,7 @@
             account: '',
             accountHolder: '',
             address: '',
-            isTaxpayerIdentificationNo: '0',
+            isTaxpayerIdentificationNo: this.inputForm.isUscCode,
             phone: '',
             taxpayerIdentificationNo: '',
             disabledTaxpayerIdentificationNo: true
@@ -1330,9 +1435,33 @@
           this.loading = false
           throw new Error('基本信息中,”客户报备类型“未填写')
         }
+        if (this.commonJS.isEmpty(this.inputForm.address)) {
+          this.$message.error('基本信息中,”地址“未填写')
+          this.loading = false
+          throw new Error('基本信息中,”地址“未填写')
+        }
+        if (this.commonJS.isNotEmpty(this.inputForm.mobile)) {
+          if (!this.validateXG.isPhoneOrMobile(this.inputForm.mobile)) {
+            this.$message.error('基本信息中,”联系电话“填写不正确,请重新填写')
+            this.loading = false
+            throw new Error('基本信息中,”联系电话“填写不正确,请重新填写')
+          }
+        }
       },
       billingSubmit () {
         this.inputForm.cwWorkClientBillingDTOList.forEach((item, index) => {
+          if (this.commonJS.isEmpty(item.companyName)) {
+            this.$message.error('开票信息中,第' + (index + 1) + '条数据的“公司名称”未填写')
+            this.loading = false
+            throw new Error('开票信息中,第' + (index + 1) + '条数据的“公司名称”未填写')
+          }
+          if (item.isTaxpayerIdentificationNo === '1') {
+            if (this.commonJS.isEmpty(item.taxpayerIdentificationNo)) {
+              this.$message.error('开票信息中,第' + (index + 1) + '条数据的“纳税人识别号”未填写')
+              this.loading = false
+              throw new Error('开票信息中,第' + (index + 1) + '条数据的“纳税人识别号”未填写')
+            }
+          }
           if (this.commonJS.isEmpty(item.accountHolder)) {
             this.$message.error('开票信息中,第' + (index + 1) + '条数据的“开户行”未填写')
             this.loading = false
@@ -1380,6 +1509,23 @@
             throw new Error('客户联系人中,第' + (index + 1) + '条数据的“联系方式1”未填写')
           }
         })
+      },
+      changeIsUscCode (event) {
+        if (event === '1') {
+          if (this.commonJS.isNotEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
+            this.inputForm.cwWorkClientBillingDTOList.forEach(item => {
+              item.isTaxpayerIdentificationNo = '1'
+            })
+          }
+        }
+        if (event === '0') {
+          if (this.commonJS.isNotEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
+            this.inputForm.cwWorkClientBillingDTOList.forEach(item => {
+              item.isTaxpayerIdentificationNo = '0'
+              item.taxpayerIdentificationNo = ''
+            })
+          }
+        }
       }
     }
   }

+ 164 - 17
src/views/modules/cw/workClientInfo/WorkClientTaskForm.vue

@@ -5,7 +5,7 @@
           <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
             <el-tab-pane label="基本信息" name="base">
               <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
-                       label-width="135px" @submit.native.prevent>
+                       label-width="180px" @submit.native.prevent>
                 <el-row  :gutter="0">
                   <el-col :span="10">
                     <el-form-item label="客户名称" prop="name" :rules="[
@@ -84,13 +84,6 @@
                     </el-form-item>
                   </el-col>
                   <el-col :span="12">
-                    <el-form-item label="统一社会信用代码" prop="uscCode"
-                                  :rules="[
-                   ]">
-                      <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="12">
                     <el-form-item label="特殊客户类型" prop="scType"
                                   :rules="[
                    ]">
@@ -105,6 +98,32 @@
                     </el-form-item>
                   </el-col>
                   <el-col :span="12">
+                    <el-form-item label="是否有统一社会信用代码" prop="isUscCode"
+                                  :rules="[
+                                  {required: true, message:'请选择是否有统一社会信用代码', trigger:'blur'}
+                   ]">
+                      <el-radio-group v-model="inputForm.isUscCode" @change="changeIsUscCode">
+                        <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" >{{item.label}}</el-radio>
+                      </el-radio-group>
+                    </el-form-item>
+                  </el-col>
+                  <el-col v-if="inputForm.isUscCode === '1'" :span="12">
+                    <el-form-item label="统一社会信用代码" prop="uscCode"
+                                  :rules="[
+                                  {required: true, message:'统一社会信用代码不能为空', trigger:'blur'}
+                   ]">
+                      <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col v-if="inputForm.isUscCode === '0'||commonJS.isEmpty(inputForm.isUscCode)" :span="12">
+                    <el-form-item label="统一社会信用代码" prop="uscCode"
+                                  :rules="[
+                   ]">
+                      <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                    </el-form-item>
+                  </el-col>
+
+                  <el-col :span="12">
                     <el-form-item label="管理级次分类" prop="manageLevelType"
                                   :rules="[
                    ]">
@@ -238,6 +257,21 @@
                         @getValue="(value) => {inputForm.officeId=value}"/>
                     </el-form-item>
                   </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="地址" prop="address"
+                                  :rules="[
+                                {required: true, message:'地址不能为空', trigger:'blur'}
+                   ]">
+                      <el-input v-model="inputForm.address" placeholder="地址" clearable></el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="联系电话" prop="mobile"
+                                  :rules="[
+                   ]">
+                      <el-input v-model="inputForm.mobile" placeholder="联系电话" clearable></el-input>
+                    </el-form-item>
+                  </el-col>
                   <el-col :span="24">
                     <el-form-item label="备注" prop="remarks"
                                   :rules="[
@@ -507,11 +541,18 @@
                     @cell-click=""
                     @edit-closed=""
                     highlight-current-row
-                    :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+                    :edit-rules="inputForm.isUscCode === '1'?validBillingRules1:validBillingRules0"
+                    :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false, icon: '-'}"
                   >
+                    <vxe-table-column align="center" field="companyName" title="公司名称" :edit-render="{}">
+                      <template v-slot:edit="scope">
+                        <vxe-input v-model="scope.row.companyName" placeholder="公司名称" clearable></vxe-input>
+                      </template>
+                    </vxe-table-column>
                     <vxe-table-column align="center" field="isTaxpayerIdentificationNo" title="是否有纳税人识别号" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no')}">
                       <template v-slot:edit="scope">
-                        <vxe-select :disabled="formReadOnly" @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-select :disabled="true" v-model="scope.row.isTaxpayerIdentificationNo" placeholder="是否有纳税人识别号" clearable style="width: 100%;" transfer>
                           <vxe-option
                             v-for="item in $dictUtils.getDictList('yes_no')"
                             :key="item.value"
@@ -521,9 +562,11 @@
                         </vxe-select>
                       </template>
                     </vxe-table-column>
+
                     <vxe-table-column align="center" field="taxpayerIdentificationNo" title="纳税人识别号" :edit-render="{}">
                       <template v-slot:edit="scope">
-                        <el-input :disabled="scope.row.disabledTaxpayerIdentificationNo||commonJS.isEmpty(scope.row.isTaxpayerIdentificationNo)" @change="$forceUpdate()" v-model="scope.row.taxpayerIdentificationNo" placeholder="纳税人识别号" clearable></el-input>
+<!--                        <el-input :disabled="scope.row.disabledTaxpayerIdentificationNo||commonJS.isEmpty(scope.row.isTaxpayerIdentificationNo)" @change="$forceUpdate()" v-model="scope.row.taxpayerIdentificationNo" placeholder="纳税人识别号" clearable></el-input>-->
+                        <el-input :disabled="scope.row.isTaxpayerIdentificationNo !== '1'" v-model="scope.row.taxpayerIdentificationNo" placeholder="纳税人识别号" clearable></el-input>
                       </template>
                     </vxe-table-column>
                     <vxe-table-column align="center" field="accountHolder" title="开户行" :edit-render="{}">
@@ -576,7 +619,8 @@
                     @cell-click=""
                     @edit-closed=""
                     highlight-current-row
-                    :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+                    :edit-rules="validContactRules"
+                    :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false, icon: '-'}"
                   >
                     <vxe-table-column align="center" field="name" title="姓名" :edit-render="{}">
                       <template v-slot:edit="scope">
@@ -744,7 +788,10 @@
           },
           cwWorkClientBillingDTOList: [],
           cwWorkClientContactDTOList: [],
-          workAttachmentDtoList: []
+          workAttachmentDtoList: [],
+          address: '',
+          mobile: '',
+          isUscCode: ''
         },
         keyWatch: '',
         activeName: 'base',
@@ -754,7 +801,55 @@
         disabled_up: true,
         disabled_change: true,
         tableKeyBilling: '1',
-        tableKeyContact: '2'
+        tableKeyContact: '2',
+        validBillingRules0: {
+          companyName: [
+            {required: true, message: '公司名称不可以为空'}
+          ],
+          isTaxpayerIdentificationNo: [
+            {required: true, message: '是否有纳税人识别号不可以为空'}
+          ],
+          accountHolder: [
+            {required: true, message: '开户行不可以为空'}
+          ],
+          account: [
+            {required: true, message: '银行账号不可以为空'}
+          ]
+        },
+        validBillingRules1: {
+          companyName: [
+            {required: true, message: '公司名称不可以为空'}
+          ],
+          isTaxpayerIdentificationNo: [
+            {required: true, message: '是否有纳税人识别号不可以为空'}
+          ],
+          taxpayerIdentificationNo: [
+            {required: true, message: '纳税人识别号不可以为空'}
+          ],
+          accountHolder: [
+            {required: true, message: '开户行不可以为空'}
+          ],
+          account: [
+            {required: true, message: '银行账号不可以为空'}
+          ]
+        },
+        validContactRules: {
+          name: [
+            {required: true, message: '姓名不可以为空'}
+          ],
+          sex: [
+            {required: true, message: '性别不可以为空'}
+          ],
+          officeId: [
+            {required: true, message: '部门不可以为空'}
+          ],
+          position: [
+            {required: true, message: '职务不可以为空'}
+          ],
+          contactFirst: [
+            {required: true, message: '联系方式1不可以为空'}
+          ]
+        }
       }
     },
     workClientService: null,
@@ -864,7 +959,10 @@
           },
           cwWorkClientBillingDTOList: [],
           cwWorkClientContactDTOList: [],
-          workAttachmentDtoList: []
+          workAttachmentDtoList: [],
+          address: '',
+          mobile: '',
+          isUscCode: ''
         }
         this.inputForm.id = id
         this.loading = false
@@ -887,6 +985,9 @@
               this.inputForm.cwWorkClientTypeDTO.isChangeFirm = '0'
               this.disabled_change = true
             }
+            if (this.commonJS.isEmpty(this.inputForm.isUscCode)) {
+              this.inputForm.isUscCode = '1'
+            }
             if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
               this.inputForm.workAttachmentDtoList = []
             }
@@ -1086,12 +1187,17 @@
           },
           cwWorkClientBillingDTOList: [],
           cwWorkClientContactDTOList: [],
-          workAttachmentDtoList: []
+          workAttachmentDtoList: [],
+          address: '',
+          mobile: '',
+          isUscCode: ''
         }
         this.$refs.uploadComponent.clearUpload()
         this.$refs.inputForm.resetFields()
       },
       tabHandleClick (event) {
+        this.tableKeyBilling = Math.random()
+        this.tableKeyContact = Math.random()
         // console.log(event)
       },
       rowStyle (event) {
@@ -1210,7 +1316,7 @@
             account: '',
             accountHolder: '',
             address: '',
-            isTaxpayerIdentificationNo: '0',
+            isTaxpayerIdentificationNo: this.inputForm.isUscCode,
             phone: '',
             taxpayerIdentificationNo: '',
             disabledTaxpayerIdentificationNo: true
@@ -1300,9 +1406,33 @@
           this.loading = false
           throw new Error('基本信息中,”客户报备类型“未填写')
         }
+        if (this.commonJS.isEmpty(this.inputForm.address)) {
+          this.$message.error('基本信息中,”地址“未填写')
+          this.loading = false
+          throw new Error('基本信息中,”地址“未填写')
+        }
+        if (this.commonJS.isNotEmpty(this.inputForm.mobile)) {
+          if (!this.validateXG.isPhoneOrMobile(this.inputForm.mobile)) {
+            this.$message.error('基本信息中,”联系电话“填写不正确,请重新填写')
+            this.loading = false
+            throw new Error('基本信息中,”联系电话“填写不正确,请重新填写')
+          }
+        }
       },
       billingSubmit () {
         this.inputForm.cwWorkClientBillingDTOList.forEach((item, index) => {
+          if (this.commonJS.isEmpty(item.companyName)) {
+            this.$message.error('开票信息中,第' + (index + 1) + '条数据的“公司名称”未填写')
+            this.loading = false
+            throw new Error('开票信息中,第' + (index + 1) + '条数据的“公司名称”未填写')
+          }
+          if (item.isTaxpayerIdentificationNo === '1') {
+            if (this.commonJS.isEmpty(item.taxpayerIdentificationNo)) {
+              this.$message.error('开票信息中,第' + (index + 1) + '条数据的“纳税人识别号”未填写')
+              this.loading = false
+              throw new Error('开票信息中,第' + (index + 1) + '条数据的“纳税人识别号”未填写')
+            }
+          }
           if (this.commonJS.isEmpty(item.accountHolder)) {
             this.$message.error('开票信息中,第' + (index + 1) + '条数据的“开户行”未填写')
             this.loading = false
@@ -1350,6 +1480,23 @@
             throw new Error('客户联系人中,第' + (index + 1) + '条数据的“联系方式1”未填写')
           }
         })
+      },
+      changeIsUscCode (event) {
+        if (event === '1') {
+          if (this.commonJS.isNotEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
+            this.inputForm.cwWorkClientBillingDTOList.forEach(item => {
+              item.isTaxpayerIdentificationNo = '1'
+            })
+          }
+        }
+        if (event === '0') {
+          if (this.commonJS.isNotEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
+            this.inputForm.cwWorkClientBillingDTOList.forEach(item => {
+              item.isTaxpayerIdentificationNo = '0'
+              item.taxpayerIdentificationNo = ''
+            })
+          }
+        }
       }
     }
   }