|
@@ -1,4 +1,4 @@
|
|
|
-<template>
|
|
|
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
|
<div>
|
|
|
<el-dialog
|
|
|
:title="title"
|
|
@@ -12,40 +12,40 @@
|
|
|
label-width="150px">
|
|
|
<el-row :gutter="15">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="客户名称" prop="name"
|
|
|
+ <el-form-item label="客户名称" prop="workClientInfo.name"
|
|
|
:rules="[
|
|
|
{required: true, message:'请输入客户名称', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.name" placeholder="请输入客户名称"></el-input>
|
|
|
+ <el-input v-model="inputForm.workClientInfo.name" placeholder="请输入客户名称"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="是否拥有信用代码" prop="hasUscc"
|
|
|
+ <el-form-item label="是否拥有信用代码" prop="workClientInfo.hasUscc"
|
|
|
:rules="[
|
|
|
{required: true, message:'请选择是否拥有信用代码', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-radio-group v-model="inputForm.hasUscc">
|
|
|
+ <el-radio-group v-model="inputForm.workClientInfo.hasUscc">
|
|
|
<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 :span="12">
|
|
|
- <el-form-item label="统一社会信用代码" prop="uscCode" v-if="inputForm.hasUscc === '1'"
|
|
|
+ <el-form-item label="统一社会信用代码" prop="workClientInfo.uscCode" v-if="inputForm.workClientInfo.hasUscc === '1'"
|
|
|
:rules="[
|
|
|
{required: true, message:'请输入统一社会信用代码', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.uscCode" placeholder="请输入统一社会信用代码"></el-input>
|
|
|
+ <el-input v-model="inputForm.workClientInfo.uscCode" placeholder="请输入统一社会信用代码"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="客户性质" prop="companyType"
|
|
|
+ <el-form-item label="客户性质" prop="workClientInfo.companyType"
|
|
|
:rules="[
|
|
|
{required: true, message:'请选择客户性质', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-select v-model="inputForm.companyType" placeholder="请选择" style="width:100%;">
|
|
|
+ <el-select v-model="inputForm.workClientInfo.companyType" placeholder="请选择" style="width:100%;">
|
|
|
<el-option
|
|
|
v-for="item in $dictUtils.getDictList('customer_nature')"
|
|
|
:key="item.value"
|
|
@@ -57,11 +57,11 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="所在行业" prop="companyIndustry"
|
|
|
+ <el-form-item label="所在行业" prop="workClientInfo.companyIndustry"
|
|
|
:rules="[
|
|
|
{required: true, message:'请选择所在行业', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-select v-model="inputForm.companyIndustry" placeholder="请选择" style="width:100%;">
|
|
|
+ <el-select v-model="inputForm.workClientInfo.companyIndustry" placeholder="请选择" style="width:100%;">
|
|
|
<el-option
|
|
|
v-for="item in $dictUtils.getDictList('industry')"
|
|
|
:key="item.value"
|
|
@@ -73,11 +73,11 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="客户类型" prop="clientType"
|
|
|
+ <el-form-item label="客户类型" prop="workClientInfo.clientType"
|
|
|
:rules="[
|
|
|
{required: true, message:'请选择客户类型', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-select v-model="inputForm.clientType" placeholder="请选择" style="width:100%;">
|
|
|
+ <el-select v-model="inputForm.workClientInfo.clientType" placeholder="请选择" style="width:100%;">
|
|
|
<el-option
|
|
|
v-for="item in $dictUtils.getDictList('customer_type')"
|
|
|
:key="item.value"
|
|
@@ -89,11 +89,11 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="代表方" prop="deputyList"
|
|
|
+ <el-form-item label="代表方" prop="workClientInfo.deputyList"
|
|
|
:rules="[
|
|
|
{required: true, message:'请选择代表方', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-select v-model="inputForm.deputyList" placeholder="请选择" multiple style="width:100%;">
|
|
|
+ <el-select v-model="inputForm.workClientInfo.deputyList" placeholder="请选择" multiple style="width:100%;">
|
|
|
<el-option
|
|
|
v-for="item in $dictUtils.getDictList('representative')"
|
|
|
:key="item.value"
|
|
@@ -105,40 +105,40 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="法人代表" prop="lawerPresint">
|
|
|
- <el-input v-model="inputForm.lawerPresint" placeholder="请填写法人代表"></el-input>
|
|
|
+ <el-form-item label="法人代表" prop="workClientInfo.lawerPresint">
|
|
|
+ <el-input v-model="inputForm.workClientInfo.lawerPresint" placeholder="请填写法人代表"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="邮政编码" prop="zipCode">
|
|
|
- <el-input v-model="inputForm.zipCode" placeholder="请填写邮政编码"></el-input>
|
|
|
+ <el-form-item label="邮政编码" prop="workClientInfo.zipCode">
|
|
|
+ <el-input v-model="inputForm.workClientInfo.zipCode" placeholder="请填写邮政编码"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="传真" prop="fax">
|
|
|
- <el-input v-model="inputForm.fax" placeholder="请填写传真"></el-input>
|
|
|
+ <el-form-item label="传真" prop="workClientInfo.fax">
|
|
|
+ <el-input v-model="inputForm.workClientInfo.fax" placeholder="请填写传真"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="公司电话" prop="telephone"
|
|
|
+ <el-form-item label="公司电话" prop="workClientInfo.telephone"
|
|
|
:rules="[
|
|
|
{required: true, message:'请填写公司电话', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.telephone" placeholder="请填写公司电话"></el-input>
|
|
|
+ <el-input v-model="inputForm.workClientInfo.telephone" placeholder="请填写公司电话"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="公司网址" prop="companyUrl">
|
|
|
- <el-input v-model="inputForm.companyUrl" placeholder="请填写公司网址"></el-input>
|
|
|
+ <el-form-item label="公司网址" prop="workClientInfo.companyUrl">
|
|
|
+ <el-input v-model="inputForm.workClientInfo.companyUrl" placeholder="请填写公司网址"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="归属区域" prop="areaId"
|
|
|
+ <el-form-item label="归属区域" prop="workClientInfo.areaId"
|
|
|
:rules="[
|
|
|
{required: true, message:'请选择归属区域', trigger:'blur'}
|
|
|
]">
|
|
@@ -150,29 +150,29 @@
|
|
|
children: 'children' // 子级字段名
|
|
|
}"
|
|
|
url="/sys/area/treeData"
|
|
|
- :value="inputForm.areaId"
|
|
|
+ :value="inputForm.workClientInfo.areaId"
|
|
|
:clearable="true"
|
|
|
:accordion="true"
|
|
|
v-if="visible"
|
|
|
- @getValue="(value) => {inputForm.areaId=value}"/>
|
|
|
+ @getValue="(value) => {inputForm.workClientInfo.areaId=value}"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="注册地址" prop="registerAddress">
|
|
|
- <el-input v-model="inputForm.registerAddress" placeholder="请填写注册地址"></el-input>
|
|
|
+ <el-form-item label="注册地址" prop="workClientInfo.registerAddress">
|
|
|
+ <el-input v-model="inputForm.workClientInfo.registerAddress" placeholder="请填写注册地址"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="详细地址" prop="address">
|
|
|
- <el-input v-model="inputForm.address" placeholder="请填写详细地址"></el-input>
|
|
|
+ <el-form-item label="详细地址" prop="workClientInfo.address">
|
|
|
+ <el-input v-model="inputForm.workClientInfo.address" placeholder="请填写详细地址"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-form-item label="单位简介" prop="remarks">
|
|
|
- <el-input v-model="inputForm.remarks"
|
|
|
+ <el-form-item label="单位简介" prop="workClientInfo.remarks">
|
|
|
+ <el-input v-model="inputForm.workClientInfo.remarks"
|
|
|
type="textarea"
|
|
|
:rows="5"
|
|
|
maxlength="500"
|
|
@@ -205,22 +205,22 @@
|
|
|
|
|
|
<vxe-table-column field="ourBank" title="开户银行" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope" >
|
|
|
- <el-input v-model="scope.row.ourBank" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.ourBank" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="bankNumber" title="开户账号" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope" >
|
|
|
- <el-input v-model="scope.row.bankNumber" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.bankNumber" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="remarks" title="备注信息" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope" >
|
|
|
- <el-input v-model="scope.row.remarks" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.remarks" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column label="操作" width="100">
|
|
|
<template v-slot="scope">
|
|
|
- <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'bank')">删除</el-button>
|
|
|
+ <el-button size="mini" type="danger" >删除</el-button>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
</vxe-table>
|
|
@@ -249,37 +249,37 @@
|
|
|
|
|
|
<vxe-table-column field="name" title="联系人姓名" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.name" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.name" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="office" title="部门" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.office" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.office" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="position" title="职务" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.position" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.position" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="qq" title="QQ" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.qq" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.qq" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="linkPhone" title="联系方式1" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.linkPhone" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.linkPhone" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="linkMobile" title="联系方式2" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.linkMobile" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.linkMobile" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="email" title="E-mail" :edit-render="{type: 'default'}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.email" @input="$refs.xTable.updateStatus(scope)"></el-input>
|
|
|
+ <el-input v-model="scope.row.email" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column label="操作" width="100">
|
|
@@ -373,6 +373,34 @@
|
|
|
visible: false,
|
|
|
loading: false,
|
|
|
inputForm: {
|
|
|
+ workClientInfo: {
|
|
|
+ name: '',
|
|
|
+ lawerPresintnamename: '',
|
|
|
+ lawerPresint: '',
|
|
|
+ orUnicode: '',
|
|
|
+ companyType: '',
|
|
|
+ companyIndustry: '',
|
|
|
+ clientType: '',
|
|
|
+ creditRank: '',
|
|
|
+ areaId: '',
|
|
|
+ zipCode: '',
|
|
|
+ fax: '',
|
|
|
+ taxId: '',
|
|
|
+ email: '',
|
|
|
+ address: '',
|
|
|
+ registerAddress: '',
|
|
|
+ companyUrl: '',
|
|
|
+ remarks: '',
|
|
|
+ companyId: '',
|
|
|
+ officeId: '',
|
|
|
+ areaParentIds: '',
|
|
|
+ telephone: '',
|
|
|
+ hasUscc: '',
|
|
|
+ uscCode: '',
|
|
|
+ number: '',
|
|
|
+ deputy: '',
|
|
|
+ deputyList: []
|
|
|
+ },
|
|
|
deputyList: [],
|
|
|
permissionFlag: '', // 判断是否为当前登录人参数
|
|
|
name: '',
|
|
@@ -527,11 +555,39 @@
|
|
|
rowurl: '',
|
|
|
src: '',
|
|
|
showVi: true,
|
|
|
- type: ''
|
|
|
+ type: '',
|
|
|
+ workClientInfo: {
|
|
|
+ name: '',
|
|
|
+ lawerPresintnamename: '',
|
|
|
+ lawerPresint: '',
|
|
|
+ orUnicode: '',
|
|
|
+ companyType: '',
|
|
|
+ companyIndustry: '',
|
|
|
+ clientType: '',
|
|
|
+ creditRank: '',
|
|
|
+ areaId: '',
|
|
|
+ zipCode: '',
|
|
|
+ fax: '',
|
|
|
+ taxId: '',
|
|
|
+ email: '',
|
|
|
+ address: '',
|
|
|
+ registerAddress: '',
|
|
|
+ companyUrl: '',
|
|
|
+ remarks: '',
|
|
|
+ companyId: '',
|
|
|
+ officeId: '',
|
|
|
+ areaParentIds: '',
|
|
|
+ telephone: '',
|
|
|
+ hasUscc: '',
|
|
|
+ uscCode: '',
|
|
|
+ number: '',
|
|
|
+ deputy: '',
|
|
|
+ deputyList: []
|
|
|
+ }
|
|
|
}
|
|
|
this.inputForm.id = id
|
|
|
if (method === 'add') {
|
|
|
- this.inputForm.hasUscc = '1'
|
|
|
+ this.inputForm.workClientInfo.hasUscc = '1'
|
|
|
this.inputForm.permissionFlag = true
|
|
|
this.title = `新建客户信息`
|
|
|
} else if (method === 'edit') {
|
|
@@ -561,12 +617,12 @@
|
|
|
deputyList.push(item)
|
|
|
})
|
|
|
}
|
|
|
- this.inputForm = JSON.parse(JSON.stringify(data.workClientInfo))
|
|
|
+ this.inputForm.workClientInfo = JSON.parse(JSON.stringify(data.workClientInfo))
|
|
|
this.inputForm.permissionFlag = data.permissionFlag
|
|
|
- this.inputForm.deputyList = deputyList
|
|
|
- this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
- this.inputForm.hasUscc = JSON.stringify(this.inputForm.hasUscc)
|
|
|
- console.log(this.inputForm)
|
|
|
+ this.inputForm.workClientInfo.deputyList = deputyList
|
|
|
+ this.inputForm.workClientInfo = JSON.parse(JSON.stringify(this.inputForm.workClientInfo))
|
|
|
+ this.inputForm.workClientInfo.hasUscc = JSON.stringify(this.inputForm.workClientInfo.hasUscc)
|
|
|
+ console.log(this.inputForm.workClientInfo)
|
|
|
this.loading = false
|
|
|
})
|
|
|
}
|
|
@@ -577,8 +633,6 @@
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
- this.inputForm.itemType = '1'
|
|
|
- console.log(this.dataListNew)
|
|
|
this.inputForm.workAttachments = []
|
|
|
this.dataListNew.forEach((item) => {
|
|
|
if (item.id === null || item.id === undefined || item.id === '') {
|
|
@@ -597,7 +651,7 @@
|
|
|
this.linkmanInfos.forEach((item) => {
|
|
|
this.inputForm.workClientLinkman.push(item)
|
|
|
})
|
|
|
- console.log(this.inputForm)
|
|
|
+ this.inputForm.workClientInfo.deputy = this.inputForm.workClientInfo.deputyList.join(',')
|
|
|
this.workClientService.save(this.inputForm).then(({data}) => {
|
|
|
this.close()
|
|
|
this.$message.success(data)
|
|
@@ -740,7 +794,6 @@
|
|
|
},
|
|
|
handleRadioChange (val) {
|
|
|
if (val) {
|
|
|
- console.log(val)
|
|
|
this.radio = val.index
|
|
|
}
|
|
|
},
|
|
@@ -754,18 +807,15 @@
|
|
|
},
|
|
|
// 点击修改
|
|
|
dbclickFun (cell) {
|
|
|
- console.log('firm', this.bankInfo)
|
|
|
this.onedit = false
|
|
|
},
|
|
|
// 删除
|
|
|
removeEvent (row, rowIndex, type) {
|
|
|
if (type === 'bank') {
|
|
|
- console.log('rowIndex', rowIndex)
|
|
|
this.$refs.xTable1.remove(row)
|
|
|
this.bankInfos.splice(rowIndex, 1)
|
|
|
}
|
|
|
if (type === 'linkman') {
|
|
|
- console.log('rowIndex', rowIndex)
|
|
|
this.$refs.xTable2.remove(row)
|
|
|
this.linkmanInfos.splice(rowIndex, 1)
|
|
|
}
|
|
@@ -774,14 +824,14 @@
|
|
|
// eslint-disable-next-line no-dupe-keys
|
|
|
async insertEvent (type) {
|
|
|
if (type === 'bank') {
|
|
|
- const {row: newRow} = await this.$refs.xTable1.insertAt()
|
|
|
- this.bankInfos.push(newRow)
|
|
|
- await this.$refs.xTable.setEditCell(newRow, 'ourBank')
|
|
|
+ await this.$refs.xTable1.insertAt().then((data) => {
|
|
|
+ this.bankInfos.push(data)
|
|
|
+ })
|
|
|
}
|
|
|
if (type === 'linkman') {
|
|
|
- const {row: newRow} = await this.$refs.xTable2.insertAt()
|
|
|
- this.linkmanInfos.push(newRow)
|
|
|
- await this.$refs.xTable.setEditCell(newRow, 'name')
|
|
|
+ await this.$refs.xTable2.insertAt().then((data) => {
|
|
|
+ this.linkmanInfos.push(data)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// 关闭窗口时调用
|