mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 19:46:43 +08:00
客户列表无法编辑户籍问题处理
This commit is contained in:
@@ -10,8 +10,7 @@ import areaNew from '@/assets/js/utils/areaNewForSale'
|
|||||||
export default function getAreaName(data, isNew) {
|
export default function getAreaName(data, isNew) {
|
||||||
let names = []
|
let names = []
|
||||||
for (let item of data) {
|
for (let item of data) {
|
||||||
let code = item.code
|
let name = getNameByCode(item.code, isNew)
|
||||||
let name = getNameByCode(code, isNew)
|
|
||||||
if (name) {
|
if (name) {
|
||||||
names.push(name)
|
names.push(name)
|
||||||
}
|
}
|
||||||
@@ -23,6 +22,18 @@ export default function getAreaName(data, isNew) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getCensusName(data) {
|
||||||
|
let names = []
|
||||||
|
for (let item of data) {
|
||||||
|
let name = getNameByCode(item.code)
|
||||||
|
if (name) {
|
||||||
|
names.push(name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('names :>> ', names)
|
||||||
|
return names.join('-')
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据code获取省/市/区名称
|
* 根据code获取省/市/区名称
|
||||||
* @param {String} code
|
* @param {String} code
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
@click="toSelect('1')"
|
@click="toSelect('1')"
|
||||||
/>
|
/>
|
||||||
<van-field :value="census" readonly label="户籍" name="户籍" right-icon="arrow" placeholder="请选择" @click="censusShow = true" />
|
<van-field v-model="census" readonly label="户籍" name="户籍" right-icon="arrow" placeholder="请选择" @click="censusShow = true" />
|
||||||
<FieldDatePicter
|
<FieldDatePicter
|
||||||
label="出生日期"
|
label="出生日期"
|
||||||
:value.sync="userInfo.birthday"
|
:value.sync="userInfo.birthday"
|
||||||
@@ -208,7 +208,7 @@ import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
|
|||||||
import areaList from '@/assets/js/utils/areaForSale'
|
import areaList from '@/assets/js/utils/areaForSale'
|
||||||
import areaLists from '@/assets/js/utils/areaNewForSale'
|
import areaLists from '@/assets/js/utils/areaNewForSale'
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
import getAreaName, { getCensusName } from '@/assets/js/utils/getAreaNameForSale'
|
||||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||||
import { idToData } from '@/views/ebiz/customer/js/verification'
|
import { idToData } from '@/views/ebiz/customer/js/verification'
|
||||||
import filter from '@/filters/index'
|
import filter from '@/filters/index'
|
||||||
@@ -454,7 +454,7 @@ export default {
|
|||||||
},
|
},
|
||||||
censusInfo() {
|
censusInfo() {
|
||||||
let area = [{ code: this.userInfo.province }, { code: this.userInfo.city }]
|
let area = [{ code: this.userInfo.province }, { code: this.userInfo.city }]
|
||||||
this.census = getAreaName(area)
|
this.census = getCensusName(area)
|
||||||
},
|
},
|
||||||
areaNameInfo() {
|
areaNameInfo() {
|
||||||
let area = [{ code: this.userInfo.companyProvince }, { code: this.userInfo.companyCity }, { code: this.userInfo.companyArea }]
|
let area = [{ code: this.userInfo.companyProvince }, { code: this.userInfo.companyCity }, { code: this.userInfo.companyArea }]
|
||||||
@@ -551,7 +551,7 @@ export default {
|
|||||||
this.homeShow = false
|
this.homeShow = false
|
||||||
break
|
break
|
||||||
case '3': //户籍
|
case '3': //户籍
|
||||||
this.census = getAreaName(area)
|
this.census = getCensusName(area)
|
||||||
;[this.userInfo.province, this.userInfo.city] = [area[0].code, area[1].code]
|
;[this.userInfo.province, this.userInfo.city] = [area[0].code, area[1].code]
|
||||||
this.censusShow = false
|
this.censusShow = false
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user