Commit 61c264d1 authored by lrw's avatar lrw

户籍展示修改

parent 9e965b0f
...@@ -498,6 +498,22 @@ ...@@ -498,6 +498,22 @@
titleClass: 'title', titleClass: 'title',
type: 'picker', type: 'picker',
opts: [{ opts: [{
label: "中国",
value: "China"
},
{
label: "中国香港",
value: "Hong Kong"
},
{
label: "中国澳门",
value: "Macau"
},
{
label: "中国台湾",
value: "Taiwan prov."
},
{
label: "喀麦隆", label: "喀麦隆",
value: "Cameroon" value: "Cameroon"
}, },
...@@ -529,10 +545,7 @@ ...@@ -529,10 +545,7 @@
label: "智利", label: "智利",
value: "Chile" value: "Chile"
}, },
{
label: "中国",
value: "China"
},
{ {
label: "哥伦比亚", label: "哥伦比亚",
value: "Colombia" value: "Colombia"
...@@ -717,10 +730,7 @@ ...@@ -717,10 +730,7 @@
label: "洪都拉斯", label: "洪都拉斯",
value: "Honduras" value: "Honduras"
}, },
{
label: "中国香港",
value: "Hong Kong"
},
{ {
label: "匈牙利", label: "匈牙利",
value: "Hungary" value: "Hungary"
...@@ -833,10 +843,6 @@ ...@@ -833,10 +843,6 @@
label: "卢森堡", label: "卢森堡",
value: "Luxembourg" value: "Luxembourg"
}, },
{
label: "中国澳门",
value: "Macau"
},
{ {
label: "马其顿", label: "马其顿",
value: "Macedonia Rep" value: "Macedonia Rep"
...@@ -1177,10 +1183,7 @@ ...@@ -1177,10 +1183,7 @@
label: "塔吉克斯坦", label: "塔吉克斯坦",
value: "Tadzhikistan" value: "Tadzhikistan"
}, },
{
label: "中国台湾",
value: "Taiwan prov."
},
{ {
label: "坦桑尼亚", label: "坦桑尼亚",
value: "Tanzania" value: "Tanzania"
...@@ -1301,7 +1304,10 @@ ...@@ -1301,7 +1304,10 @@
label: "津巴布韦", label: "津巴布韦",
value: "Zimbabwe" value: "Zimbabwe"
} }
] ],
show: [8],
showValue: ['China']
}, },
{ {
label: '身份证号/护照号', label: '身份证号/护照号',
...@@ -1318,6 +1324,8 @@ ...@@ -1318,6 +1324,8 @@
titleClass: 'title', titleClass: 'title',
placeholder: '请输入户籍地址', placeholder: '请输入户籍地址',
type: 'input', type: 'input',
num: 8,
hidden: true,
}, },
{ {
label: '在沪居住(暂住)地址', label: '在沪居住(暂住)地址',
...@@ -1432,7 +1440,7 @@ ...@@ -1432,7 +1440,7 @@
required: true, required: true,
value: 'leftVehicleNum', value: 'leftVehicleNum',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 16, num: 16,
hidden: true, hidden: true,
...@@ -1451,7 +1459,7 @@ ...@@ -1451,7 +1459,7 @@
required: true, required: true,
value: 'leftTarget', value: 'leftTarget',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 18, num: 18,
hidden: true, hidden: true,
...@@ -1461,7 +1469,7 @@ ...@@ -1461,7 +1469,7 @@
required: true, required: true,
value: 'leftAddress', value: 'leftAddress',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 19, num: 19,
hidden: true, hidden: true,
...@@ -1550,7 +1558,7 @@ ...@@ -1550,7 +1558,7 @@
required: true, required: true,
value: 'backVehicleNum', value: 'backVehicleNum',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 26, num: 26,
hidden: true, hidden: true,
...@@ -2006,6 +2014,7 @@ ...@@ -2006,6 +2014,7 @@
} }
}) })
}) })
break
} }
} }
} }
...@@ -2027,7 +2036,22 @@ ...@@ -2027,7 +2036,22 @@
} }
} }
if (type === 'picker') {
let val = item.opts[evt.detail.value].value;
for (let i = 0; i < this.list.length; i++) {
const current = this.list[i]
if (current.value == prop && current.show) {
current.show.forEach(child => {
this.list.forEach(row => {
if (child == row.num) {
this.$set(row, 'hidden', !current.showValue.includes(val))
}
})
})
break
}
}
}
}, },
isShowChild() { isShowChild() {
...@@ -2050,15 +2074,15 @@ ...@@ -2050,15 +2074,15 @@
this.$set(this.form, prop, val) this.$set(this.form, prop, val)
return return
} }
for (let i = 0; i < opts.length; i++) {
if (i == val) {
if (prop == 'orgName') { if (prop == 'orgName') {
this.$set(this.form, 'orgId', opts[i].value) this.$set(this.form, 'orgId', opts[val].value)
this.$set(this.form, prop, opts[i].label) this.$set(this.form, prop, opts[val].label)
} else { } else {
this.$set(this.form, prop, opts[i].label) this.$set(this.form, prop, opts[val].label)
}
} }
if (item.show) {
this.showChange(event, item)
} }
}, },
// 提交信息 // 提交信息
...@@ -2068,7 +2092,7 @@ ...@@ -2068,7 +2092,7 @@
for (let i = 0; i < this.list.length; i++) { for (let i = 0; i < this.list.length; i++) {
if (this.list[i].required) { if (this.list[i].required) {
const val = this.form[this.list[i].value] const val = this.form[this.list[i].value]
if (!val&& !this.list[i].hidden && this.list[i].required) { if (!val && !this.list[i].hidden && this.list[i].required) {
flag = false flag = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
......
...@@ -532,7 +532,7 @@ ...@@ -532,7 +532,7 @@
required: true, required: true,
value: 'leftVehicleNum', value: 'leftVehicleNum',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 16, num: 16,
hidden: true, hidden: true,
...@@ -551,7 +551,7 @@ ...@@ -551,7 +551,7 @@
required: true, required: true,
value: 'leftTarget', value: 'leftTarget',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 18, num: 18,
hidden: true, hidden: true,
...@@ -561,7 +561,7 @@ ...@@ -561,7 +561,7 @@
required: true, required: true,
value: 'leftAddress', value: 'leftAddress',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 19, num: 19,
hidden: true, hidden: true,
...@@ -650,7 +650,7 @@ ...@@ -650,7 +650,7 @@
required: true, required: true,
value: 'backVehicleNum', value: 'backVehicleNum',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '请输入',
type: 'input', type: 'input',
num: 26, num: 26,
hidden: true, hidden: true,
...@@ -748,7 +748,6 @@ ...@@ -748,7 +748,6 @@
} }
// 复选框展示和隐藏 // 复选框展示和隐藏
if (type === 'pickerMore') { if (type === 'pickerMore') {
console.log(evt)
let val = evt.detail.value; let val = evt.detail.value;
const showList = item.showList const showList = item.showList
if (showList && showList.length > 0) { if (showList && showList.length > 0) {
...@@ -769,7 +768,6 @@ ...@@ -769,7 +768,6 @@
}, },
isShowChild() { isShowChild() {
console.log(this.form['returnToWork'])
this.list[10].hidden = this.form['returnToWork'] == 'a' this.list[10].hidden = this.form['returnToWork'] == 'a'
}, },
...@@ -782,7 +780,6 @@ ...@@ -782,7 +780,6 @@
}, },
// 更新下拉框绑定的表单内容 // 更新下拉框绑定的表单内容
updatePickerVal(event, item) { updatePickerVal(event, item) {
console.log(event)
const opts = item.opts const opts = item.opts
const prop = item.value const prop = item.value
const val = event.detail.value const val = event.detail.value
...@@ -790,16 +787,7 @@ ...@@ -790,16 +787,7 @@
this.$set(this.form, prop, val) this.$set(this.form, prop, val)
return return
} }
for (let i = 0; i < opts.length; i++) { this.$set(this.form, prop, opts[val].label)
if (i == val) {
if (prop == 'orgName') {
this.$set(this.form, 'orgId', opts[i].value)
this.$set(this.form, prop, opts[i].label)
} else {
this.$set(this.form, prop, opts[i].label)
}
}
}
}, },
// 提交信息 // 提交信息
formSubmit() { formSubmit() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment