|
|
|
@ -95,59 +95,86 @@ |
|
|
|
<!-- 客户模态框 --> |
|
|
|
<el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="500px"> |
|
|
|
<el-form label-position="top" :model="modalData" :rules="rules"> |
|
|
|
<el-form-item label="客户名称" prop="customerDesc" :rules="rules.customerDesc"> |
|
|
|
<el-input v-model="modalData.customerDesc" :readonly="detailModalFlag"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="行业"> |
|
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.customerIndustry" :disabled="detailModalFlag" dict-type="plm_customer_information_customer_industry"></dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="客户组分类(1)"> |
|
|
|
<span style="cursor: pointer" v-if="modalData.title !== '客户详情'" slot="label" @click="getBaseList(120)"><a herf="#">客户组分类(1)</a></span> |
|
|
|
<el-input v-model="modalData.customerGroupId1" :disabled="modalData.title === '客户详情'" @blur="customerGroupBlur(120)" style="width: 124px"></el-input> |
|
|
|
<el-input v-model="modalData.customerGroupName1" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户组分类(2)"> |
|
|
|
<span style="cursor: pointer" v-if="modalData.title !== '客户详情'" slot="label" @click="getBaseList(121)"><a herf="#">客户组分类(2)</a></span> |
|
|
|
<el-input v-model="modalData.customerGroupId2" :disabled="modalData.title === '客户详情'" @blur="customerGroupBlur2(121)" style="width: 124px"></el-input> |
|
|
|
<el-input v-model="modalData.customerGroupName2" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" |
|
|
|
style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="重要程度" prop="importantCustomer" :rules="rules.importantCustomer"> |
|
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.importantCustomer" :disabled="detailModalFlag" |
|
|
|
style="width: 145px" dict-type="plm_customer_information_important_customer"> |
|
|
|
</dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户状态" prop="customerStatus" :rules="rules.customerStatus"> |
|
|
|
<el-select v-model="modalData.customerStatus" :disabled="detailModalFlag" style="width: 140px"> |
|
|
|
<el-option label="启用" value="Y"></el-option> |
|
|
|
<el-option label="停用" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户类型" prop="customerStatus" :rules="rules.customerType"> |
|
|
|
<el-select v-model="modalData.customerType" :disabled="detailModalFlag" style="width: 145px"> |
|
|
|
<el-option label="潜在客户" value="潜在客户"></el-option> |
|
|
|
<el-option label="正式客户" value="正式客户"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="客户描述" class="auto"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
v-model="modalData.customerDescription" |
|
|
|
readonly |
|
|
|
:rows="2" |
|
|
|
resize='none' |
|
|
|
show-word-limit |
|
|
|
:readonly="detailModalFlag"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="客户名称" prop="customerDesc" :rules="rules.customerDesc"> |
|
|
|
<el-input v-model="modalData.customerDesc" :readonly="detailModalFlag"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="行业"> |
|
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.customerIndustry" :disabled="detailModalFlag" dict-type="plm_customer_information_customer_industry"></dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox-group :disabled="modalData.title === '客户详情'" v-model="customerGroupList" :max="1"> |
|
|
|
<el-checkbox label="品牌客户" value="品牌客户"></el-checkbox> |
|
|
|
<el-checkbox label="直接客户" value="直接客户"></el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户组分类(1)"> |
|
|
|
<span style="cursor: pointer" v-if="modalData.title !== '客户详情'" slot="label" @click="getBaseList(120)"><a herf="#">客户组分类(1)</a></span> |
|
|
|
<el-input v-model="modalData.customerGroupId1" :disabled="modalData.title === '客户详情'" @blur="customerGroupBlur(120)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-input v-model="modalData.customerGroupName1" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户组分类(2)"> |
|
|
|
<span style="cursor: pointer" v-if="modalData.title !== '客户详情'" slot="label" @click="getBaseList(121)"><a herf="#">客户组分类(2)</a></span> |
|
|
|
<el-input v-model="modalData.customerGroupId2" :disabled="modalData.title === '客户详情'" @blur="customerGroupBlur2(121)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-input v-model="modalData.customerGroupName2" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="重要程度" prop="importantCustomer" :rules="rules.importantCustomer"> |
|
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.importantCustomer" :disabled="detailModalFlag" dict-type="plm_customer_information_important_customer"></dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户状态" prop="customerStatus" :rules="rules.customerStatus"> |
|
|
|
<el-select v-model="modalData.customerStatus" style="width: 100%" :disabled="detailModalFlag"> |
|
|
|
<el-option label="启用" value="Y"></el-option> |
|
|
|
<el-option label="停用" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户类型" prop="customerStatus" :rules="rules.customerType"> |
|
|
|
<el-select v-model="modalData.customerType" style="width: 100%" :disabled="detailModalFlag"> |
|
|
|
<el-option label="潜在客户" value="潜在客户"></el-option> |
|
|
|
<el-option label="正式客户" value="正式客户"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="客户描述" class="auto"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
v-model="modalData.customerDescription" |
|
|
|
readonly |
|
|
|
:rows="2" |
|
|
|
resize='none' |
|
|
|
show-word-limit |
|
|
|
:readonly="detailModalFlag"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;line-height:40px;text-align:center"> |
|
|
|
<el-footer style="height:auto;line-height:1.5;padding: 10px 0;text-align:center"> |
|
|
|
<el-button v-if="modalData.flag !== '3'" type="primary" @click="saveData()">保存</el-button> |
|
|
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
@ -759,6 +786,11 @@ export default { |
|
|
|
if (newVal){ |
|
|
|
this.refreshCurrentTabTable(); |
|
|
|
} |
|
|
|
}, |
|
|
|
modalFlag(newVal,oldVal){ |
|
|
|
if (newVal === false){ |
|
|
|
this.customerGroupList = []; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
@ -968,13 +1000,31 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 160 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101001, |
|
|
|
serialNumber: '101001Table1CustomerGroup', |
|
|
|
tableId: '101001Table1', |
|
|
|
tableName: '客户信息表', |
|
|
|
columnProp: 'customerGroup', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '客户分组', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101001, |
|
|
|
serialNumber: '101001Table1ImportantCustomer', |
|
|
|
tableId: '101001Table1', |
|
|
|
tableName: '客户信息表', |
|
|
|
columnProp: 'importantCustomer', |
|
|
|
columnProp: 'importantCustomerLabel', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '重要程度', |
|
|
|
@ -1853,6 +1903,8 @@ export default { |
|
|
|
managerFlag: false, |
|
|
|
ownerFlag: false, |
|
|
|
userRoleFlag: false, |
|
|
|
|
|
|
|
customerGroupList:[],//只允许勾选一个 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -2018,10 +2070,12 @@ export default { |
|
|
|
addressStatus: '启用', |
|
|
|
addressType: '类型一', |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
type: '' |
|
|
|
type: '', |
|
|
|
customerGroup: undefined, |
|
|
|
} |
|
|
|
this.modalDisableFlag = false |
|
|
|
this.detailModalFlag = false |
|
|
|
|
|
|
|
this.modalFlag = true |
|
|
|
}, |
|
|
|
/** |
|
|
|
@ -2157,6 +2211,9 @@ export default { |
|
|
|
} |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.detailModalFlag = false |
|
|
|
|
|
|
|
// 客户组修改 |
|
|
|
this.customerGroupList = row.customerGroup?[row.customerGroup]:[] |
|
|
|
this.modalFlag = true |
|
|
|
}, |
|
|
|
/** |
|
|
|
@ -2310,6 +2367,9 @@ export default { |
|
|
|
} |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.detailModalFlag = true |
|
|
|
|
|
|
|
// 客户组修改 |
|
|
|
this.customerGroupList = row.customerGroup?[row.customerGroup]:[] |
|
|
|
this.modalFlag = true |
|
|
|
}, |
|
|
|
/** |
|
|
|
@ -2586,14 +2646,6 @@ export default { |
|
|
|
this.$message.warning('请输入客户名称!') |
|
|
|
return |
|
|
|
} |
|
|
|
// if (this.modalData.customerIndustry === '' || this.modalData.customerIndustry == null) { |
|
|
|
// this.$message.warning('请输入行业!') |
|
|
|
// return |
|
|
|
// } |
|
|
|
if (this.modalData.customerCurrency === '' || this.modalData.customerCurrency == null) { |
|
|
|
this.$message.warning('请输入币种!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.importantCustomer === '' || this.modalData.importantCustomer == null) { |
|
|
|
this.$message.warning('请选择重要程度!') |
|
|
|
return |
|
|
|
@ -2606,9 +2658,12 @@ export default { |
|
|
|
this.$message.warning('请选择客户类型!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.customerGroupList.length > 0){ |
|
|
|
this.modalData.customerGroup = this.customerGroupList[0] |
|
|
|
}else { |
|
|
|
this.modalData.customerGroup = '' |
|
|
|
} |
|
|
|
if (this.modalData.flag === '1') { |
|
|
|
// this.modalData.primaryContact = 'Y' |
|
|
|
// this.modalData.contactStatus = '启用' |
|
|
|
customerInformationSave(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
|