|
@ -33,7 +33,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item prop="organizationLevel" label="组织级别"> |
|
|
<el-form-item prop="organizationLevel" label="组织级别"> |
|
|
<el-select v-model="dataForm2.organizationLevel" key="organizationLevel"> |
|
|
<el-select v-model="dataForm2.organizationLevel" key="organizationLevel"> |
|
|
<el-option v-for="(val, key) in organizationLevels" :key="key" :label="val" :value="val"></el-option> |
|
|
<el-option v-for="(val, key) in organizationLevels" :key="key" :label="key" :value="val"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-button type="primary" @click="submitStepHandle">下一步</el-button> |
|
|
<el-button type="primary" @click="submitStepHandle">下一步</el-button> |
|
@ -51,14 +51,14 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item prop="level" label="组织级别"> |
|
|
<el-form-item prop="level" label="组织级别"> |
|
|
<el-select v-model="dataForm3.level" key="level"> |
|
|
<el-select v-model="dataForm3.level" key="level"> |
|
|
<el-option v-for="(val, key) in organizationLevels" :key="key" :label="val" :value="val"></el-option> |
|
|
<el-option v-for="(val, key) in organizationLevels" :key="key" :label="key" :value="val"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item prop="district" label="选择地区"> |
|
|
<el-form-item :prop="pcd" label="选择地区" :show-message="pcdError"> |
|
|
<v-distpicker :hideArea="isHideArea" :onlyProvince="isOnlyProvince" @province="onChangeProvince" @city="onChangeCity" @area="onChangeArea"></v-distpicker> |
|
|
<v-distpicker :hideArea="isHideArea" :onlyProvince="isOnlyProvince" @province="onChangeProvince" @city="onChangeCity" @area="onChangeArea"></v-distpicker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item prop="areaCode" label="地区编码"> |
|
|
<el-form-item prop="areaCode" label="地区编码"> |
|
|
<el-input v-model="dataForm3.areaCode" key="areaCode"></el-input> |
|
|
<el-input v-model="dataForm3.areaCode" key="areaCode" disabled></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-button type="primary" @click="submitStepHandle">下一步</el-button> |
|
|
<el-button type="primary" @click="submitStepHandle">下一步</el-button> |
|
|
</el-form> |
|
|
</el-form> |
|
@ -108,8 +108,16 @@ export default { |
|
|
getDataListURL: '/oper/crm/customer/getvalidcustomerlist', |
|
|
getDataListURL: '/oper/crm/customer/getvalidcustomerlist', |
|
|
getDataListIsPage: false |
|
|
getDataListIsPage: false |
|
|
}, |
|
|
}, |
|
|
|
|
|
pcd: 'district', |
|
|
|
|
|
pcdError: true, |
|
|
centerDialogVisible: false, |
|
|
centerDialogVisible: false, |
|
|
organizationLevels: ['社区级', '乡(镇、街道)级', '区县级', '市级', '省级'], |
|
|
organizationLevels: { |
|
|
|
|
|
'社区级': 'community', |
|
|
|
|
|
'乡(镇、街道)级': 'street', |
|
|
|
|
|
'区县级': 'district', |
|
|
|
|
|
'市级': 'city', |
|
|
|
|
|
'省级': 'province' |
|
|
|
|
|
}, |
|
|
genders: ['未知', '男', '女'], |
|
|
genders: ['未知', '男', '女'], |
|
|
step: 1, |
|
|
step: 1, |
|
|
details: [], |
|
|
details: [], |
|
@ -268,14 +276,26 @@ export default { |
|
|
onChangeProvince (e) { |
|
|
onChangeProvince (e) { |
|
|
this.dataForm3.areaCode = e.code |
|
|
this.dataForm3.areaCode = e.code |
|
|
this.dataForm3.province = e.value |
|
|
this.dataForm3.province = e.value |
|
|
|
|
|
this.dataForm3.city = '' |
|
|
|
|
|
this.dataForm3.district = '' |
|
|
|
|
|
if (this.pcd === 'province') { |
|
|
|
|
|
this.pcdError = false |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
onChangeCity (e) { |
|
|
onChangeCity (e) { |
|
|
this.dataForm3.areaCode = e.code |
|
|
this.dataForm3.areaCode = e.code |
|
|
this.dataForm3.city = e.value |
|
|
this.dataForm3.city = e.value |
|
|
|
|
|
this.dataForm3.district = '' |
|
|
|
|
|
if (this.pcd === 'city') { |
|
|
|
|
|
this.pcdError = false |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
onChangeArea (e) { |
|
|
onChangeArea (e) { |
|
|
this.dataForm3.areaCode = e.code |
|
|
this.dataForm3.areaCode = e.code |
|
|
this.dataForm3.district = e.value |
|
|
this.dataForm3.district = e.value |
|
|
|
|
|
if (this.pcd === 'district') { |
|
|
|
|
|
this.pcdError = false |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -297,10 +317,10 @@ export default { |
|
|
{ required: true, message: '请输入地区编码' } |
|
|
{ required: true, message: '请输入地区编码' } |
|
|
], |
|
|
], |
|
|
province: [ |
|
|
province: [ |
|
|
{ required: true, message: '请选择省份' } |
|
|
{ required: true, message: '请选择省份', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
city: [ |
|
|
city: [ |
|
|
{ required: true, message: '请选择城市' } |
|
|
{ required: true, message: '请选择城市', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
district: [ |
|
|
district: [ |
|
|
{ required: true, message: '请选择区县', trigger: 'blur' } |
|
|
{ required: true, message: '请选择区县', trigger: 'blur' } |
|
@ -345,15 +365,29 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
'dataForm3.level': function (nVal) { |
|
|
'dataForm3.level': function (nVal) { |
|
|
if (nVal === '省级') { |
|
|
this.pcdError = true |
|
|
|
|
|
this.dataForm3.areaCode = '' |
|
|
|
|
|
if (nVal === 'province') { |
|
|
this.isOnlyProvince = true |
|
|
this.isOnlyProvince = true |
|
|
} else if (nVal === '市级') { |
|
|
this.pcd = 'province' |
|
|
|
|
|
} else if (nVal === 'city') { |
|
|
this.isHideArea = true |
|
|
this.isHideArea = true |
|
|
this.isOnlyProvince = false |
|
|
this.isOnlyProvince = false |
|
|
|
|
|
this.pcd = 'city' |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
this.pcd = 'district' |
|
|
this.isHideArea = false |
|
|
this.isHideArea = false |
|
|
this.isOnlyProvince = false |
|
|
this.isOnlyProvince = false |
|
|
} |
|
|
} |
|
|
|
|
|
if (nVal !== '') { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
|
|
if (!valid) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|