| | |
| | | |
| | | let cell = fieldMap.get(item.field) |
| | | |
| | | cell.$ctrls = cell.$ctrls || [] |
| | | cell.$ctrls.push(key) |
| | | |
| | | if (cell.hidden) return |
| | | |
| | | if (cell.skip && supItem.forbid) { // 上级表单禁用时,此表单不受控制 |
| | |
| | | |
| | | formlist = formlist.map(cell => { |
| | | let item = fieldMap.get(cell.field) |
| | | |
| | | if (item.$ctrls && item.$ctrls.length === 1) { |
| | | delete item.$ctrls |
| | | } |
| | | |
| | | if (item.linkField) { |
| | | let supInitVal = fieldMap.get(item.linkField).initval || '' |
| | |
| | | m.hidden = !cell.values.includes(val) |
| | | } |
| | | |
| | | if (!m.hidden && m.$ctrls) { |
| | | m.$ctrls.forEach(n => { |
| | | if (n === current.field || m.hidden) return |
| | | |
| | | let oth = map.get(n) |
| | | let _val = this.record[n] |
| | | |
| | | if (_val && JSON.stringify(_val) === '[]') { |
| | | _val = '' |
| | | } |
| | | |
| | | let p = oth.controlFields.filter(q => q.field === m.field)[0] |
| | | |
| | | if (oth.hidden || (p.notNull && !_val)) { |
| | | m.hidden = true |
| | | } else if (oth.type === 'checkbox' || oth.type === 'multiselect') { |
| | | let _vals = [...(_val || []), ...p.values] |
| | | if (_vals.length === new Set(_vals).size) { |
| | | m.hidden = true |
| | | } |
| | | } else if (!p.values.includes(_val)) { |
| | | m.hidden = true |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (m.hidden) { |
| | | m.initval = this.record[m.field] |
| | | } |
| | |
| | | {value: 'true', label: '启用'}, |
| | | {value: 'false', label: '禁用'}, |
| | | ], |
| | | forbid: !!appType || isprint |
| | | forbid: !!appType || subtype === 'propcard' || isprint |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'searchBtn', |
| | | label: '搜索按钮', |
| | | initval: wrap.searchBtn || 'hidden', |
| | | // tooltip: '启用搜索条件缓存后,在菜单刷新时搜索条件不变。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'hidden', label: '隐藏'}, |
| | | {value: 'show', label: '显示'}, |
| | | ], |
| | | forbid: appType === 'mob' || isprint, |
| | | forbid: appType === 'mob' || subtype === 'propcard' || isprint, |
| | | }, |
| | | { |
| | | type: 'radio', |