| | |
| | | width: '20%' |
| | | }, |
| | | { |
| | | title: '菜单', |
| | | title: '组件', |
| | | dataIndex: 'nodes', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'switch' || item.type === 'check') { |
| | | if (['switch', 'check', 'popSelect'].includes(item.type)) { |
| | | _linksupFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'switch' || item.type === 'check') { |
| | | if (['switch', 'check', 'popSelect'].includes(item.type)) { |
| | | _linksupFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'switch' || item.type === 'check') { |
| | | if (['switch', 'check', 'popSelect'].includes(item.type)) { |
| | | _linksupFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | |
| | | Select @invoice_type='', @from_to_name='', @from_to_tax_no='', @from_to_addr='', @from_to_tel='', @from_to_bank_name='', @from_to_account_no='', @from_to_mob='', @from_to_email='', @from_to_code='', @orgname='', @tax_no='', @addr='', @tel='', @bank_name='', @account_no='', @remark='', @payee='', @reviewer='', @drawer='', @io='', @orgcode='', @total_net_amount=0, @total_tax=0, @total_amount=0 |
| | | |
| | | /* 发票明细临时表 */ |
| | | Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50)) |
| | | Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), free_tax_mark Nvarchar(50), vat_special_management Nvarchar(50), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50)) |
| | | |
| | | Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, invoice_lp, jskey, data_type) |
| | | Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, free_tax_mark, vat_special_management, invoice_lp, jskey, data_type) |
| | | |
| | | Select '', '', '', '', 0, 0, 0, '', '', 0, 0, '', '', '' |
| | | Select '', '', '', '', 0, 0, 0, '', '', 0, 0, '', '', '', '', '' |
| | | |
| | | ` |
| | | |
| | |
| | | </p> |
| | | <p className="note">{`/* 发票明细临时表 */`}</p> |
| | | <p> |
| | | Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50)) |
| | | Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), free_tax_mark Nvarchar(50), vat_special_management Nvarchar(50), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50)) |
| | | </p> |
| | | <p> |
| | | Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, invoice_lp, jskey, data_type) |
| | | Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, free_tax_mark, vat_special_management, invoice_lp, jskey, data_type) |
| | | </p> |
| | | <p> |
| | | Select '', '', '', '', 0, 0, 0, '', '', 0, 0, '', '', '' |
| | | Select '', '', '', '', 0, 0, 0, '', '', 0, 0, '', '', '', '', '' |
| | | </p> |
| | | <p className="note">{`/* 前置脚本 */`}</p> |
| | | <p> |
| | |
| | | position: absolute; |
| | | bottom: 10px; |
| | | } |
| | | >.ant-table-wrapper { |
| | | .ant-table-wrapper { |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | .ant-table { |
| | | color: inherit; |
| | |
| | | value: 'colspan', |
| | | text: '合并列' |
| | | }, { |
| | | value: 'extend', |
| | | text: '扩展列' |
| | | }, { |
| | | value: 'index', |
| | | text: '序号' |
| | | }] |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'colUnit', |
| | | label: '单位', |
| | | initVal: card.colUnit || 'day', |
| | | required: true, |
| | | options: [{ |
| | | value: 'day', |
| | | text: '天' |
| | | }, { |
| | | value: 'hour', |
| | | text: '小时' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'shift', |
| | | label: '偏移量', |
| | | initVal: card.shift || 0, |
| | | min: -1000, |
| | | max: 1000, |
| | | decimal: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'quota', |
| | | label: '指标数', |
| | | initVal: card.quota || 7, |
| | | min: 1, |
| | | max: 1000, |
| | | decimal: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'dayFormat', |
| | | label: '格式化', |
| | | initVal: card.dayFormat || 'M/DD', |
| | | required: true, |
| | | options: [{ |
| | | value: 'M/DD', |
| | | label: 'M/DD(4/29)' |
| | | }, { |
| | | value: 'M-DD', |
| | | label: 'M-DD(4-29)' |
| | | }, { |
| | | value: 'M月DD日', |
| | | label: 'M月DD日(4月29日)' |
| | | }, { |
| | | value: 'M/DD week', |
| | | label: 'M/DD week(4/29 星期一)' |
| | | }, { |
| | | value: 'M-DD week', |
| | | label: 'M-DD week(4-29 星期一)' |
| | | }, { |
| | | value: 'M月DD日 week', |
| | | label: 'M月DD日 week(4月29日 星期一)' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'hourFormat', |
| | | label: '格式化', |
| | | initVal: card.hourFormat || 'H:00', |
| | | required: true, |
| | | options: [{ |
| | | value: 'H:00', |
| | | label: 'H:00(15:00)' |
| | | }, { |
| | | value: 'H point', |
| | | label: 'H(15点)' |
| | | }, { |
| | | value: 'h:00', |
| | | label: 'h:00(3:00 pm)' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'supField', |
| | | label: '上级字段', |
| | | initVal: card.supField || '', |
| | | tooltip: '来源于上级组件的字段集(上级组件为空时从url参数中选取),该字段值(用逗号分隔)可控制扩展列的列名。', |
| | | required: false, |
| | | rules: [{ |
| | | pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, |
| | | message: '字段名只允许包含数字、字母、汉字以及_' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'startTime', |
| | | precision: 0, |
| | |
| | | custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'], |
| | | action: ['label', 'type', 'Align', 'Width'], |
| | | formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'], |
| | | extend: ['label', 'field', 'type', 'Align', 'Width', 'colUnit', 'shift', 'quota', 'supField'], |
| | | index: ['label', 'type', 'Align', 'Width'] |
| | | } |
| | | |
| | |
| | | _options.push('decimal') |
| | | } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { |
| | | _options.push('sortField') |
| | | } else if (this.record.type === 'extend') { |
| | | if (this.record.colUnit === 'day') { |
| | | _options.push('dayFormat') |
| | | } else { |
| | | _options.push('hourFormat') |
| | | } |
| | | } |
| | | |
| | | if (this.record.Hide !== 'true') { |
| | |
| | | } |
| | | } else if (key === 'format' && value === 'percent') { |
| | | this.props.form.setFieldsValue({postfix: '%'}) |
| | | } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) { |
| | | } else if (['perspective', 'eval', 'IsSort', 'textFormat', 'colUnit'].includes(key)) { |
| | | let _options = this.getOptions() |
| | | |
| | | this.setState({ |
| | |
| | | if (item.hidden || item.forbid) return |
| | | |
| | | if (item.type === 'text') { |
| | | let rules = [] |
| | | let rules = item.rules || [] |
| | | if (item.key !== 'linkurl') { |
| | | rules = [{ |
| | | rules.push({ |
| | | max: formRule.input.max, |
| | | message: formRule.input.message |
| | | }] |
| | | }) |
| | | } |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'cascader') { // 多选 |
| | | } else if (item.type === 'cascader') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap, action, columns, cols } = this.state.card |
| | | const { card } = this.state |
| | | |
| | | let _actions = [] |
| | | |
| | | cols.forEach(col => { |
| | | card.cols.forEach(col => { |
| | | if (col.type === 'custom') { |
| | | col.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') return |
| | |
| | | } |
| | | }) |
| | | |
| | | return getWrapForm(wrap, _actions, columns, action) |
| | | return getWrapForm(card.wrap, _actions, card.columns, card.action, card.supNodes || [], card.uuid) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | |
| | | res.borderRadius = card.wrap.borderRadius || 0 |
| | | res.resetContrl = card.wrap.resetContrl || 'init' |
| | | |
| | | this.updateComponent({...card, wrap: res}) |
| | | let _card = {...card, wrap: res} |
| | | |
| | | if (res.supNodes) { |
| | | _card.supNodes = res.supNodes |
| | | _card.supNodes = _card.supNodes.map(item => { |
| | | item.componentId = item.nodes[item.nodes.length - 1] |
| | | return item |
| | | }) |
| | | |
| | | delete res.supNodes |
| | | } else { |
| | | delete _card.supNodes |
| | | } |
| | | |
| | | this.updateComponent(_card) |
| | | } |
| | | |
| | | updatecolumn = (config) => { |
| | |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (wrap, action = [], columns = [], toolBtns) { |
| | | export default function (wrap, action = [], columns = [], toolBtns, supNodes, id = '') { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | let appType = sessionStorage.getItem('appType') |
| | | let isprint = sessionStorage.getItem('MenuType') === 'billPrint' |
| | |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | let menu = window.GLOB.customMenu |
| | | let modules = MenuUtils.getSupModules(menu.components, id, menu.interfaces) |
| | | |
| | | const wrapForm = [ |
| | | { |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'supType', |
| | | label: '上级类型', |
| | | initval: wrap.supType || 'single', |
| | | tooltip: '上级组件为单一组件或多个组件。', |
| | | required: false, |
| | | forbid: appType === 'mob' || isprint, |
| | | options: [ |
| | | {value: 'single', label: '单组件'}, |
| | | {value: 'multi', label: '多组件'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'supNodes', values: ['multi']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'permission', |
| | | label: '权限验证', |
| | | initval: wrap.permission || (!appType ? 'true' : 'false'), |
| | |
| | | options: roleList, |
| | | forbid: !!appType || isprint |
| | | }, |
| | | { |
| | | type: 'table', |
| | | field: 'supNodes', |
| | | label: '上级组件', |
| | | initval: supNodes, |
| | | required: true, |
| | | forbid: appType === 'mob' || isprint, |
| | | span: 24, |
| | | actions: ['edit', 'del', 'add', 'move'], |
| | | columns: [ |
| | | { |
| | | title: '序号', |
| | | dataIndex: '$index', |
| | | editable: false, |
| | | required: false, |
| | | width: '20%' |
| | | }, |
| | | { |
| | | title: '组件', |
| | | dataIndex: 'nodes', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | | required: true, |
| | | extends: [{key: 'label', value: 'label'}], |
| | | width: '50%', |
| | | render: (text, record) => record.label, |
| | | options: modules |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | | return wrapForm |
| | |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'switch' || item.type === 'check') { |
| | | if (['switch', 'check', 'popSelect'].includes(item.type)) { |
| | | _linksupFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | |
| | | height: 100%; |
| | | overflow-y: hidden; |
| | | background: #ffffff; |
| | | .ant-card-head { |
| | | min-height: 44px; |
| | | .ant-card { |
| | | padding-top: 45px; |
| | | .ant-card-head { |
| | | min-height: 44px; |
| | | position: fixed; |
| | | width: calc(100vw - 235px); |
| | | top: 48px; |
| | | z-index: 12; |
| | | background: #ffffff; |
| | | } |
| | | } |
| | | .ant-card-head-title { |
| | | padding: 5px 0; |
| | |
| | | config.components.forEach(component => { |
| | | if (component.type === 'tabs') return |
| | | |
| | | if (param.$searchkey) { |
| | | component.search = component.search.map(item => { |
| | | if (['text', 'select', 'link', 'checkcard'].includes(item.type) && param.$searchkey === item.field.toLowerCase()) { |
| | | item.initval = param.$searchval |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | component.$searches = Utils.initMainSearch(component.search) |
| | | } |
| | | |
| | | if (component.$searches.length) { |
| | | component.$main = true |
| | | |
| | |
| | | // 搜索条件初始化 |
| | | Utils.initSearchVal(item) |
| | | |
| | | if (urlparam.$searchkey) { |
| | | item.search.forEach(cell => { |
| | | if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { |
| | | cell.initval = urlparam.$searchval |
| | | } |
| | | }) |
| | | } |
| | | |
| | | item.$searches = Utils.initMainSearch(item.search) |
| | | |
| | | let statFields = [] |
| | |
| | | precards: [], |
| | | nextcards: [], |
| | | selected: 'false', |
| | | supNodes: [], |
| | | supComs: null, |
| | | pickup: false |
| | | } |
| | | |
| | | loaded = false |
| | | supModules = [] |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { config } = this.props |
| | |
| | | _config.wrap.selected = 'false' |
| | | } |
| | | |
| | | let supComs = null |
| | | if (_config.wrap.supType === 'multi') { |
| | | supComs = _config.supNodes.map(item => item.componentId) |
| | | } |
| | | |
| | | _config.wrap.selStyle = _config.wrap.selStyle || 'active' |
| | | _config.wrap.pagestyle = _config.wrap.pagestyle || 'page' |
| | | _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : '' |
| | |
| | | this.setState({ |
| | | pageSize: _config.setting.pageSize || 10, |
| | | pageOptions, |
| | | supComs, |
| | | selected, |
| | | precards, |
| | | nextcards, |
| | |
| | | * @param {*} btn // 执行的按钮 |
| | | */ |
| | | refreshByButtonResult = (menuId, position, btn, id = '', lines) => { |
| | | const { config, BID, supComs, supNodes } = this.state |
| | | const { config, BID } = this.state |
| | | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | if (supComs) { |
| | | if (position === 'mainline' || position === 'popclose') { // 主表刷新,去除同步刷新组件 |
| | | let supNode = supNodes[supNodes.length - 1] |
| | | supComs.forEach((item, i) => { |
| | | if (config.supNodes) { |
| | | if (position === 'mainline' || position === 'popclose') { |
| | | let supNode = this.supModules[this.supModules.length - 1] |
| | | config.supNodes.forEach((item, i) => { |
| | | setTimeout(() => { |
| | | if (supNode && supNode.key === item) { |
| | | MKEmitter.emit('reloadData', item, supNode.value) |
| | |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id, data) => { |
| | | const { config, supComs } = this.state |
| | | const { config } = this.state |
| | | |
| | | if (supComs) { |
| | | if (!supComs.includes(MenuID)) return |
| | | let supNodes = this.state.supNodes.filter(item => item.key !== MenuID) |
| | | if (config.supNodes) { |
| | | if (!config.supNodes.includes(MenuID)) return |
| | | this.supModules = this.supModules.filter(item => item.key !== MenuID) |
| | | let bid = '' |
| | | let _data = null |
| | | |
| | | if (id) { |
| | | supNodes.push({key: MenuID, value: id, data}) |
| | | this.supModules.push({key: MenuID, value: id, data}) |
| | | } |
| | | if (supNodes.length > 0) { |
| | | bid = supNodes[supNodes.length - 1].value |
| | | _data = supNodes[supNodes.length - 1].data |
| | | if (this.supModules.length > 0) { |
| | | bid = this.supModules[this.supModules.length - 1].value |
| | | _data = this.supModules[this.supModules.length - 1].data |
| | | } |
| | | |
| | | if (bid !== this.state.BID || bid !== '') { |
| | | this.setState({ BID: bid, BData: _data, pageIndex: 1, supNodes }, () => { |
| | | this.setState({ BID: bid, BData: _data, pageIndex: 1 }, () => { |
| | | this.loadData() |
| | | }) |
| | | } else { |
| | | this.setState({ supNodes }) |
| | | } |
| | | } else { |
| | | if (!config.setting.supModule || config.setting.supModule !== MenuID) return |
| | |
| | | let tax = 0 |
| | | |
| | | let lines = details.map(line => { |
| | | let _sql = `Select '${line.productcode}', '${line.productname}', '${line.spec}', '${line.unit}', ${line.bill_count}, ${line.unitprice}, ${line.amount_line}, '${line.tax_classify_code}', '${line.tax_classify_name}', ${line.tax_rate}, ${line.tax_amount}, '${line.invoice_lp || ''}', '${line.uuid}'` |
| | | let _sql = `Select '${line.productcode}', '${line.productname}', '${line.spec}', '${line.unit}', ${line.bill_count}, ${line.unitprice}, ${line.amount_line}, '${line.tax_classify_code}', '${line.tax_classify_name}', ${line.tax_rate}, ${line.tax_amount}, '${line.free_tax_mark || ''}', '${line.vat_special_management || ''}', '${line.invoice_lp || ''}', '${line.uuid}'` |
| | | let data_type = 'add' |
| | | |
| | | price += line.amount_line * 100 |
| | |
| | | |
| | | if (options.length) { |
| | | options.forEach(line => { |
| | | lines.push(`Select '${line.productcode}', '${line.productname}', '${line.spec}', '${line.unit}', ${line.bill_count}, ${line.unitprice}, ${line.amount_line}, '${line.tax_classify_code}', '${line.tax_classify_name}', ${line.tax_rate}, ${line.tax_amount}, '${line.invoice_lp || ''}', '${line.uuid}', 'del'`) |
| | | lines.push(`Select '${line.productcode}', '${line.productname}', '${line.spec}', '${line.unit}', ${line.bill_count}, ${line.unitprice}, ${line.amount_line}, '${line.tax_classify_code}', '${line.tax_classify_name}', ${line.tax_rate}, ${line.tax_amount}, '${line.free_tax_mark || ''}', '${line.vat_special_management || ''}', '${line.invoice_lp || ''}', '${line.uuid}', 'del'`) |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | /* 发票明细临时表 */ |
| | | |
| | | Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50)) |
| | | Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), free_tax_mark Nvarchar(50), vat_special_management Nvarchar(50), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50)) |
| | | |
| | | Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, invoice_lp, jskey, data_type) |
| | | Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, free_tax_mark, vat_special_management, invoice_lp, jskey, data_type) |
| | | |
| | | ${lines} |
| | | |
| | |
| | | item.unitprice = prod.unitprice |
| | | item.tax_rate = prod.tax_rate || 0 |
| | | item.tax_name = prod.tax_rate * 100 + '%' |
| | | item.free_tax_mark = prod.free_tax_mark || '' |
| | | item.vat_special_management = prod.vat_special_management || '' |
| | | |
| | | if (prod.vat_special_management && prod.free_tax_mark === 'true') { |
| | | item.tax_name = prod.vat_special_management |
| | |
| | | position: absolute; |
| | | bottom: 10px; |
| | | } |
| | | >.ant-table-wrapper { |
| | | .ant-table-wrapper { |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | .ant-table { |
| | | color: inherit; |
| | |
| | | position: absolute; |
| | | bottom: 10px; |
| | | } |
| | | >.ant-table-wrapper { |
| | | .ant-table-wrapper { |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | .ant-table { |
| | | color: inherit; |
| | |
| | | --mk-table-font-size: 14px; |
| | | --mk-table-font-weight: normal; |
| | | |
| | | >.ant-table-wrapper { |
| | | .ant-table-wrapper { |
| | | position: relative; |
| | | // z-index: 1; |
| | | } |
| | | .ant-table-placeholder { |
| | | border-top-color: var(--mk-table-border-color); |
| | |
| | | } |
| | | |
| | | loaded = false |
| | | supModules = [] |
| | | |
| | | /** |
| | | * @description 初始化处理 |
| | |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id, data) => { |
| | | const { setting } = this.state |
| | | const { config, setting } = this.state |
| | | |
| | | if (!setting.supModule || setting.supModule !== MenuID) return |
| | | if (config.supNodes) { |
| | | if (!config.supNodes.includes(MenuID)) return |
| | | this.supModules = this.supModules.filter(item => item.key !== MenuID) |
| | | let bid = '' |
| | | let _data = null |
| | | |
| | | if (id !== this.state.BID || id !== '') { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | BID: id, |
| | | BData: data |
| | | }, () => { |
| | | if (!setting.checkBid) { |
| | | if (id) { |
| | | this.supModules.push({key: MenuID, value: id, data}) |
| | | } |
| | | if (this.supModules.length > 0) { |
| | | bid = this.supModules[this.supModules.length - 1].value |
| | | _data = this.supModules[this.supModules.length - 1].data |
| | | } |
| | | |
| | | if (bid !== this.state.BID || bid !== '') { |
| | | this.setState({ BID: bid, BData: _data, pageIndex: 1 }, () => { |
| | | this.loadmaindata(true, 'true') |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | if (!setting.supModule || setting.supModule !== MenuID) return |
| | | |
| | | if (id !== this.state.BID || id !== '') { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | BID: id, |
| | | BData: data |
| | | }, () => { |
| | | if (!setting.checkBid) { |
| | | this.loadmaindata(true, 'true') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | if (config.supNodes) { |
| | | if (position === 'mainline' || position === 'popclose') { |
| | | let supNode = this.supModules[this.supModules.length - 1] |
| | | config.supNodes.forEach((item, i) => { |
| | | setTimeout(() => { |
| | | if (supNode && supNode.key === item) { |
| | | MKEmitter.emit('reloadData', item, supNode.value) |
| | | } else { |
| | | MKEmitter.emit('reloadData', item) |
| | | } |
| | | }, i * 10) |
| | | }) |
| | | } else { |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.reloadtable(btn, id) |
| | | } |
| | | } else { |
| | | this.reloadtable(btn, id) |
| | | } |
| | | } |
| | | } else { |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.reloadtable(btn, id) |
| | | } |
| | | } else if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) { // 刷新源组件时,附带刷新上级行与当前组件 |
| | | MKEmitter.emit('reloadData', config.setting.supModule, BID) |
| | | } else { |
| | | this.reloadtable(btn, id) |
| | | } |
| | | } else if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) { // 刷新源组件时,附带刷新上级行与当前组件 |
| | | MKEmitter.emit('reloadData', config.setting.supModule, BID) |
| | | } else { |
| | | this.reloadtable(btn, id) |
| | | } |
| | | } |
| | | |
| | |
| | | config.components.forEach(component => { |
| | | if (component.type !== 'search') return |
| | | |
| | | if (param.$searchkey) { |
| | | component.search = component.search.map(item => { |
| | | if (['text', 'select', 'link', 'checkcard'].includes(item.type) && param.$searchkey === item.field.toLowerCase()) { |
| | | item.initval = param.$searchval |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | component.$searches = Utils.initMainSearch(component.search) |
| | | } |
| | | |
| | | window.GLOB.SearchBox.set(MenuID, component.$searches) |
| | | |
| | | if (component.$s_req) { |
| | |
| | | item.type = 'card' |
| | | } |
| | | |
| | | if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件 |
| | | item.setting.supModule = item.supNodes[0].componentId |
| | | if (item.wrap && item.wrap.supType === 'multi') { // 数据卡、table多上级组件 |
| | | item.supNodes = item.supNodes.map(node => node.componentId) |
| | | if (item.supNodes[0]) { |
| | | item.setting.supModule = item.supNodes[0] |
| | | } else { |
| | | item.supNodes = null |
| | | item.setting.supModule = '' |
| | | } |
| | | } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') { |
| | | let pid = item.setting.supModule.pop() |
| | | if (pid && pid !== 'empty') { |
| | |
| | | // 搜索条件初始化 |
| | | if (item.search) { |
| | | Utils.initSearchVal(item) |
| | | |
| | | if (urlparam.$searchkey) { |
| | | item.search.forEach(cell => { |
| | | if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { |
| | | cell.initval = urlparam.$searchval |
| | | } |
| | | }) |
| | | } |
| | | |
| | | item.$searches = Utils.initMainSearch(item.search) |
| | | |
| | |
| | | if (cell.syncComponentId) { |
| | | if (cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } else if (cell.syncComponentId === 'multiComponent') { |
| | |
| | | return m.syncComId.pop() || '' |
| | | }) |
| | | |
| | | if (item.setting.supModule && ids.includes(item.setting.supModule)) { |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | if (item.supNodes) { |
| | | item.supNodes.forEach(node => { |
| | | if (!ids.includes(node)) return |
| | | |
| | | if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | ids = ids.filter(id => id !== node) |
| | | }) |
| | | } else if (item.setting.supModule && ids.includes(item.setting.supModule)) { |
| | | if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | ids = ids.filter(id => id !== item.setting.supModule) |
| | |
| | | } |
| | | } |
| | | |
| | | if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件 |
| | | item.setting.supModule = item.supNodes[0].componentId |
| | | if (item.wrap && item.wrap.supType === 'multi') { // 数据卡、table多上级组件 |
| | | item.supNodes = item.supNodes.map(node => node.componentId) |
| | | if (item.supNodes[0]) { |
| | | item.setting.supModule = item.supNodes[0] |
| | | } else { |
| | | item.supNodes = null |
| | | item.setting.supModule = '' |
| | | } |
| | | } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') { |
| | | let pid = item.setting.supModule.pop() |
| | | if (pid && pid !== 'empty') { |
| | |
| | | if (cell.syncComponentId) { |
| | | if (cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } else if (cell.syncComponentId === 'multiComponent') { |
| | |
| | | return m.syncComId.pop() || '' |
| | | }) |
| | | |
| | | if (item.setting.supModule && ids.includes(item.setting.supModule)) { |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | if (item.supNodes) { |
| | | item.supNodes.forEach(node => { |
| | | if (!ids.includes(node)) return |
| | | |
| | | if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | ids = ids.filter(id => id !== node) |
| | | }) |
| | | } else if (item.setting.supModule && ids.includes(item.setting.supModule)) { |
| | | if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | ids = ids.filter(id => id !== item.setting.supModule) |
| | |
| | | const wb = XLSX.utils.book_new() |
| | | XLSX.utils.book_append_sheet(wb, ws, btn.verify.sheet || 'Sheet1') |
| | | |
| | | XLSX.writeFile(wb, `${btn.$menuName || ''}${moment().format('YYYYMMDDHHmmss')}.xlsx`) |
| | | XLSX.writeFile(wb, `${btn.verify.excelName || btn.$menuName || ''}${moment().format('YYYYMMDDHHmmss')}.xlsx`) |
| | | |
| | | this.execSuccess({ErrCode: ErrCode || 'S', message: msg || '导出成功!'}) |
| | | } |
| | |
| | | position: absolute; |
| | | bottom: 40px; |
| | | } |
| | | >.ant-table-wrapper { |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | .ant-table-wrapper { |
| | | position: relative; |
| | | color: rgba(0, 0, 0, 0.65); |
| | | font-size: 14px; |
| | | .ant-table { |
| | |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'switch' || item.type === 'check') { |
| | | if (['switch', 'check', 'popSelect'].includes(item.type)) { |
| | | _linksupFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | |
| | | </Col> : null} |
| | | {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="导出excel的文件名,默认为菜单名+组件名。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 文件名 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('excelName', { |
| | | initialValue: setting.excelName || '' |
| | | })(<Input autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="导出excel中工作表名称,默认为Sheet1。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 工作表 |
| | |
| | | }> |
| | | {getFieldDecorator('sheet', { |
| | | initialValue: setting.sheet || '' |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> |
| | |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.type === 'table' && item.cols) { |
| | | } else if (item.type === 'table') { |
| | | if (item.supNodes && item.supNodes.length > 0) { |
| | | item.supNodes = item.supNodes.map(cell => { |
| | | cell.nodes = cell.nodes.map(n => md5(commonId + n)) |
| | | cell.componentId = cell.nodes[cell.nodes.length - 1] |
| | | |
| | | return cell |
| | | }) |
| | | } |
| | | |
| | | let loopCol = (cols) => { |
| | | return cols.map(col => { |
| | | if (col.type === 'action') { |
| | |
| | | }) |
| | | } |
| | | |
| | | item.cols = loopCol(item.cols) |
| | | item.cols = loopCol(item.cols || []) |
| | | |
| | | if (item.colsCtrls) { |
| | | item.colsCtrls = item.colsCtrls.map(col => { |
| | |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.type === 'table' && item.cols) { |
| | | } else if (item.type === 'table') { |
| | | let loopCol = (cols) => { |
| | | return cols.map(col => { |
| | | if (col.type === 'action') { |
| | |
| | | }) |
| | | } |
| | | |
| | | item.cols = loopCol(item.cols) |
| | | item.cols = loopCol(item.cols || []) |
| | | |
| | | if (item.colsCtrls) { |
| | | item.colsCtrls = item.colsCtrls.map(col => { |
| | |
| | | } else if (!card.setting.supModule) { |
| | | errors.push({ level: 0, detail: '未设置上级组件!'}) |
| | | } |
| | | } else if (card.type === 'card' && card.subtype === 'datacard') { // 数据卡,可能有多上级 |
| | | } else if ((card.type === 'card' && card.subtype === 'datacard') || card.subtype === 'normaltable') { // 数据卡、table,可能有多上级 |
| | | if (card.wrap.supType !== 'multi' && !card.setting.supModule) { |
| | | errors.push({ level: 0, detail: '未设置上级组件!'}) |
| | | } |