Commit 61c264d1 authored by lrw's avatar lrw

户籍展示修改

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