|
@@ -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 = ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|