| | |
| | | resetButton(item, group.subButton) |
| | | }) |
| | | } else if (item.type === 'module' && item.subtype === 'invoice') { |
| | | let msg = getDataSource(item.buyer, []) |
| | | |
| | | sqls.push({uuid: item.uuid + 'buyer', type: 'datasource', ...msg}) |
| | | if (item.buyer.setting && item.buyer.setting.interType === 'system') { |
| | | let msg = getDataSource(item.buyer, []) |
| | | |
| | | sqls.push({uuid: item.uuid + 'buyer', type: 'datasource', ...msg}) |
| | | } |
| | | |
| | | let _msg = getDataSource(item.detail, []) |
| | | |
| | | sqls.push({uuid: item.uuid + 'detail', type: 'datasource', ..._msg}) |
| | | if (item.detail.setting && item.detail.setting.interType === 'system') { |
| | | let _msg = getDataSource(item.detail, []) |
| | | |
| | | sqls.push({uuid: item.uuid + 'detail', type: 'datasource', ..._msg}) |
| | | } |
| | | |
| | | let btnmsg = getInvoicePreSql(item.billSaveBtn, item.$menuname + '-' + item.billSaveBtn.label) |
| | | |
| | |
| | | } else if (cell.OpenType === 'excelOut') { |
| | | if (cell.intertype === 'system' && cell.verify && cell.verify.dataType === 'custom') { |
| | | let msg = getExcelOutSql(cell, item) |
| | | |
| | | sqls.push({uuid: cell.uuid, type: 'excelOut', ...msg}) |
| | | } else if (cell.intertype === 'system' && cell.verify && item.subtype === 'dualdatacard' && item.setting && item.setting.interType === 'system') { |
| | | let msg = getDoubleExcelOutSql(cell, item) |
| | | |
| | | sqls.push({uuid: cell.uuid, type: 'excelOut', ...msg}) |
| | | } |
| | |
| | | } |
| | | |
| | | let getDataSource = (item, mainSearch = [], type) => { |
| | | if (!item.setting || item.setting.interType !== 'system') return |
| | | |
| | | let searches = item.search || [] |
| | | if (item.setting.useMSearch === 'true' && mainSearch.length > 0) { |
| | | searches = [...searches, ...mainSearch] |
| | |
| | | _search = '' |
| | | } |
| | | |
| | | if (/\s/.test(_dataresource)) { |
| | | if (/\s/.test(_dataresource) && !/\)\s+tb$/.test(_dataresource)) { |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | |
| | | return msg |
| | | } |
| | | |
| | | let getDoubleExcelOutSql = (btn, component) => { |
| | | let item = fromJS(component).toJS() |
| | | item.search = item.$searches || [] |
| | | item.subtype = 'datacard' |
| | | item.columns = [...item.columns, ...item.subColumns] |
| | | |
| | | item.setting.laypage = btn.pagination |
| | | item.setting.$name = btn.logLabel || '' |
| | | |
| | | let msg = getDataSource(item, []) |
| | | |
| | | return msg |
| | | } |
| | | |
| | | let getPrintSql = (btn, component) => { |
| | | let item = {setting: {}, columns: btn.verify.columns || [], search: [], useMSearch: 'false'} |
| | | |