| | |
| | | |
| | | config.checkBid = true |
| | | item.checkShift = true |
| | | if (config.setting) { |
| | | config.setting.checkBid = true |
| | | } |
| | | } |
| | | |
| | | item.initval = '' |
| | |
| | | |
| | | config.checkBid = true |
| | | item.checkShift = true |
| | | if (config.setting) { |
| | | config.setting.checkBid = true |
| | | } |
| | | } |
| | | |
| | | item.initval = '' |
| | |
| | | if (/@BID@/ig.test(item.dataSource) && supModule) { |
| | | config.checkBid = true |
| | | item.checkBid = true |
| | | if (config.setting) { |
| | | config.setting.checkBid = true |
| | | } |
| | | } |
| | | if (item.initval === '$first') { |
| | | item.initval = '' |
| | |
| | | |
| | | return item |
| | | }) |
| | | |
| | | if (config.checkBid) { |
| | | if (config.setting) { |
| | | config.setting.checkBid = true |
| | | } |
| | | if (config.type !== 'search') { |
| | | config.$checkBid = true |
| | | } |
| | | } |
| | | |
| | | config.$s_keys = keys |
| | | config.$s_req = required |
| | |
| | | |
| | | val = val.replace(/(^\s+$)|\t+|\v+/ig, '') |
| | | |
| | | if (col.interception !== 'false') { |
| | | val = val.replace(/^\s+|\s+$/g, '') |
| | | } |
| | | |
| | | if (!val && col.required === 'true') { // 必填校验 |
| | | errors.push(_position + '内容不可为空') |
| | | } else if (col.limit && val.length > col.limit) { // 长度校验 |
| | |
| | | let _initColfields = [] |
| | | let _declarefields = [] |
| | | let verifyValSql = '' |
| | | let datavars = {} |
| | | |
| | | // 获取字段键值对 |
| | | formdata && formdata.forEach(form => { |
| | |
| | | } |
| | | |
| | | let _key = form.key.toLowerCase() |
| | | datavars[_key] = form.value |
| | | |
| | | if (!_initvars.includes(_key)) { |
| | | _initvars.push(_key) |
| | |
| | | |
| | | // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过) |
| | | if (data && btn.Ot !== 'notRequired' && columns && columns.length > 0) { |
| | | datavars = {..._data, ...datavars} |
| | | |
| | | const setField = (col) => { |
| | | if (!col.field) return |
| | | let _key = col.field.toLowerCase() |
| | |
| | | item.field.split(',').forEach((_field, index) => { |
| | | let _key = _field.toLowerCase() |
| | | let _val = '' |
| | | let _val2 = '' |
| | | let _val2 = datavars[_key] !== undefined ? datavars[_key] : '' |
| | | |
| | | arr.push(_key) |
| | | if (_key === 'bid') { |
| | |
| | | |
| | | if (_key === 'bid') { |
| | | _val2 = BID |
| | | } else { |
| | | _val2 = `' + @${_field} + '` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}=${_val}`) |