| | |
| | | card.errors = [] |
| | | |
| | | if (card.wrap.datatype === 'static') { |
| | | let supModule = card.wrap.linkType === 'static' ? '' : 'has' |
| | | // let supModule = card.wrap.linkType === 'static' ? '' : 'has' |
| | | |
| | | card.elements.forEach(cell => { |
| | | if (cell.eleType === 'button') { |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else if (!supModule) { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain') { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } |
| | | }) |
| | | // } else if (!supModule) { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain') { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } else if (cell.datatype === 'dynamic' && cell.field) { |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | let supModule = card.wrap.linkType === 'static' ? '' : 'has' |
| | | // let supModule = card.wrap.linkType === 'static' ? '' : 'has' |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && card.wrap.linkType !== 'sync' && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && card.wrap.linkType !== 'sync' && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } else if (cell.datatype === 'dynamic' && cell.field && !columns.includes(cell.field)) { |
| | |
| | | |
| | | card.errors = [] |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | card.errors.push({ level: 0, detail: '未设置上级组件!'}) |
| | | } |
| | | |
| | | let supModule = '' |
| | | if (card.wrap.supType === 'multi') { // 数据卡多上级组件 |
| | | if (card.supNodes && card.supNodes[0]) { |
| | | supModule = card.supNodes[0].componentId |
| | | } |
| | | } else if (card.setting.supModule) { |
| | | supModule = card.setting.supModule[card.setting.supModule.length - 1] || '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | } |
| | | // let supModule = '' |
| | | // if (card.wrap.supType === 'multi') { // 数据卡多上级组件 |
| | | // if (card.supNodes && card.supNodes[0]) { |
| | | // supModule = card.supNodes[0].componentId |
| | | // } |
| | | // } else if (card.setting.supModule) { |
| | | // supModule = card.setting.supModule[card.setting.supModule.length - 1] || '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | // } |
| | | |
| | | card.action.forEach(cell => { |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | // $check@有效性检测 |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (linkbtn && linkbtn === cell.uuid) { |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (linkbtn && linkbtn === cell.uuid) { |
| | |
| | | } |
| | | |
| | | if (card.wrap.datatype === 'static') { |
| | | let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | // let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | card.subcards.forEach((item, i) => { |
| | | let linkbtn = item.setting.linkbtn || '' |
| | | |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else if (!supModule) { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain') { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } |
| | | }) |
| | | // } else if (!supModule) { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain') { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (linkbtn && linkbtn === cell.uuid) { |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else if (!supModule) { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain') { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } |
| | | }) |
| | | // } else if (!supModule) { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain') { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (linkbtn && linkbtn === cell.uuid) { |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (linkbtn && linkbtn === cell.uuid) { |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (linkbtn && linkbtn === cell.uuid) { |
| | |
| | | |
| | | card.errors = [] |
| | | |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.subcards.length === 0) { |
| | | card.errors.push({ level: 0, detail: '卡片不可为空!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (linkbtn && linkbtn === cell.uuid) { |
| | |
| | | |
| | | card.errors = [] |
| | | |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } else if (cell.datatype === 'dynamic' && cell.field && !columns.includes(cell.field)) { |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain') { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain') { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } else if (cell.datatype === 'dynamic' && cell.field) { |
| | |
| | | }) |
| | | }) |
| | | } else { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } else if (cell.datatype === 'dynamic' && cell.field && !columns.includes(cell.field)) { |
| | |
| | | supModule = '' |
| | | } |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | item.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `表单“${m.label}”大小写与字段集不一致`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | supModule = '' |
| | | } |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | item.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `分组“${item.setting.title}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `分组“${item.setting.title}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `分组“${item.setting.title}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | supModule = '' |
| | | } |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | item.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `分组“${item.setting.title}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `分组“${item.setting.title}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `分组“${item.setting.title}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | if (!window.GLOB.styling || !card.errors) { // 样式修改时不做筛查 |
| | | card.errors = [] |
| | | |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (!window.GLOB.styling || !card.errors) { // 样式修改时不做筛查 |
| | | card.errors = [] |
| | | |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | let doubleClick = card.wrap.doubleClick || '' |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (doubleClick === cell.uuid) { |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | if (doubleClick === cell.uuid) { |
| | |
| | | if (!window.GLOB.styling || !card.errors) { // 样式修改时不做筛查 |
| | | card.errors = [] |
| | | |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | // if (supModule === 'empty') { |
| | | // supModule = '' |
| | | // } |
| | | let columns = card.columns.map(c => c.field) |
| | | let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | // let lowcols = card.columns.map(c => c.field.toLowerCase()) |
| | | |
| | | if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '未设置数据源!'}) |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else { |
| | | cell.modal.fields.forEach(m => { |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | } |
| | | }) |
| | | // } else { |
| | | // cell.modal.fields.forEach(m => { |
| | | // if (m.type === 'linkMain' && !supModule) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`}) |
| | | // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { |
| | | // card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`}) |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } else if (cell.datatype === 'dynamic' && cell.field && !columns.includes(cell.field)) { |