|
|
@@ -15,8 +15,8 @@
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="客户行业" prop="custIndustry">
|
|
|
- <el-select v-model="editForm.custIndustry" placeholder="请选择客户行业" style="width: 100%">
|
|
|
+ <el-form-item label="客户类型" prop="custIndustry">
|
|
|
+ <el-select v-model="editForm.custIndustry" placeholder="请选择客户类型" style="width: 100%">
|
|
|
<el-option v-for="item in industryOptions" :key="item.value" :label="item.value" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -136,7 +136,7 @@
|
|
|
custAddress: '', // 详细地址
|
|
|
custStatus: '', // 客户状态(10正常20)
|
|
|
followUpDate: '', // 最后跟进时间
|
|
|
- custIndustry: '', // 客户行业 (没数据)
|
|
|
+ custIndustry: '', // 客户类型 (没数据)
|
|
|
custLevel: '', // 客户级别 (没数据)
|
|
|
source: '', //客户来源
|
|
|
province: {}, //省
|
|
|
@@ -145,13 +145,13 @@
|
|
|
},
|
|
|
editRules: {
|
|
|
custName: [{ required: true, validator: checkCustName, trigger: 'blur' }],
|
|
|
- custIndustry: [{ required: true, trigger: 'change', message: '请选择客户行业' }],
|
|
|
+ custIndustry: [{ required: true, trigger: 'change', message: '请选择客户类型' }],
|
|
|
custLevel: [{ required: true, trigger: 'change', message: '请选择客户级别' }],
|
|
|
source: [{ required: true, trigger: 'change', message: '请选择客户来源' }],
|
|
|
},
|
|
|
provinceOptions: [],
|
|
|
provinceDetail: [],
|
|
|
- industryOptions: [], //客户行业
|
|
|
+ industryOptions: [], //客户类型
|
|
|
levelOptions: [], //客户级别
|
|
|
sourceOptions: [], //客户来源
|
|
|
}
|
|
|
@@ -203,6 +203,17 @@
|
|
|
if (params.city.id) arr.push(params.city.distName)
|
|
|
if (params.region.id) arr.push(params.region.distName)
|
|
|
params.custLocation = arr.join('/')
|
|
|
+ params.custProvinceId = params.province.id
|
|
|
+ params.custProvince = params.province.distName
|
|
|
+ params.custCityId = params.city.id
|
|
|
+ params.custCity = params.city.distName
|
|
|
+ params.custRegionId = params.region.id
|
|
|
+ params.custRegion = params.region.distName
|
|
|
+ this.industryOptions.forEach((i) => {
|
|
|
+ if (params.custIndustry == i.value) {
|
|
|
+ params.custIndustryCode = i.key
|
|
|
+ }
|
|
|
+ })
|
|
|
if (!params.followUpDate) params.followUpDate = null
|
|
|
const [err, res] = await to(api.createCustomer(params))
|
|
|
if (err) return
|
|
|
@@ -226,6 +237,12 @@
|
|
|
if (params.city.id) arr.push(params.city.distName)
|
|
|
if (params.region.id) arr.push(params.region.distName)
|
|
|
params.custLocation = arr.join('/')
|
|
|
+ params.custProvinceId = params.province.id
|
|
|
+ params.custProvince = params.province.distName
|
|
|
+ params.custCityId = params.city.id
|
|
|
+ params.custCity = params.city.distName
|
|
|
+ params.custRegionId = params.region.id
|
|
|
+ params.custRegion = params.region.distName
|
|
|
if (!params.followUpDate) params.followUpDate = null
|
|
|
const [err, res] = await to(api.updateCostomer(params))
|
|
|
if (err) return
|
|
|
@@ -254,7 +271,7 @@
|
|
|
custAddress: '', // 详细地址
|
|
|
custStatus: '', // 客户状态(10正常20)
|
|
|
followUpDate: '', // 最后跟进时间
|
|
|
- custIndustry: '', // 客户行业 (没数据)
|
|
|
+ custIndustry: '', // 客户类型 (没数据)
|
|
|
custLevel: '', // 客户级别 (没数据)
|
|
|
source: '', //客户来源
|
|
|
province: {}, //省
|