UNPKG

ttk-app-core

Version:
784 lines (777 loc) 41.5 kB
export function getMeta() { return { name: 'root', component: '::div', className: 'ttk-access-app-tranreport', id: 'ttk-access-app-tranreport', _visible: '{{ data.other.allVisible}}', children: [{ name: 'step0', component: '::div', className: '{{!data.step.step0Visible ? "ttk-access-app-tranreport-step0content contentdisplay" : "ttk-access-app-tranreport-step0content"}}', _visible: '{{ data.step.step0Visible}}', children: { component: 'Spin', tip: '数据处理中...', className: 'tranreportspin', spinning: '{{data.other.step0loading}}', children: [{ name: 'setInfo', component: 'Form', className: 'ttk-access-app-tranreport-step0content-form', id: 'setInfo', children: [{ name: 'tips', component: '::div', className: 'ttk-access-app-tranreport-step0content-tips', children: '注:请先进行设置准则制度、申报所属期等在进行报表数据转换。' }, { name: 'vatTaxpayerNum', component: 'Form.Item', colon: false, label: '纳税人识别号', required: true, validateStatus: "{{data.error.vatTaxpayerNum?'error':'success'}}", help: '{{data.error.vatTaxpayerNum}}', children: { // name: 'inputTaxpayerNum', // component: '::div', // style: { position: 'relative' }, // children: [{ name: 'input', component: 'Input', value: '{{data.form.vatTaxpayerNum}}', onChange: "{{function(e){$fieldChange('data.form.vatTaxpayerNum',e.target.value)}}}", style: { width: '330px', Height: '30px' } // }] } }, { name: 'areaCode', component: 'Form.Item', label: '地区', validateStatus: "{{data.error.areaCode?'error':'success'}}", help: '{{data.error.areaCode}}', required: true, colon: false, children: { // name: 'select', // component: '::div', // style: { position: 'relative' }, // children: [{ name: 'select', component: 'Select', showSearch: false, getPopupContainer: '{{function(){return document.getElementById("ttk-access-app-tranreport")}}}', value: '{{data.form.areaCode}}', onChange: "{{function(value){$fieldChange('data.form.areaCode',value)}}}", style: { width: '330px', Height: '30px' }, children: '{{$renderSelectOption(data.enumListForm.areaCode, "value", "label")}}' // }] } }, { name: 'accountingStandards', component: 'Form.Item', colon: false, label: '会计制度准则', validateStatus: "{{data.error.accountingStandards?'error':'success'}}", help: '{{data.error.accountingStandards}}', required: true, children: { // name: 'select', // component: '::div', // style: { position: 'relative' }, // children: [{ name: 'select', component: 'Select', showSearch: false, getPopupContainer: '{{function(){return document.getElementById("ttk-access-app-tranreport")}}}', value: '{{data.form.accountingStandards}}', onChange: "{{function(value){$fieldChange('data.form.accountingStandards',value)}}}", style: { width: '330px', Height: '30px' }, children: '{{$renderSelectOption(data.enumListForm.accountingStandardEnums, "id", "name")}}' // }] } }, { name: 'taxTimeType', component: 'Form.Item', label: '申报所属期', validateStatus: "{{data.error.taxTimeType?'error':'success'}}", help: '{{data.error.taxTimeType}}', required: true, colon: false, children: { name: 'periodOfTax', component: '::span', //defaultValue: '{{data.form.taxTimeType}}' // onChange: `{{function(v){$fieldChange('data.form.taxTimeType',v.target.value)}}}`, children: '{{$renderOption(data.form.taxTimeType)}}' } }, { name: 'taxTimes', component: 'Form.Item', colon: false, label: ' ', validateStatus: "{{data.error.taxTimes?'error':'success'}}", help: '{{data.error.taxTimes}}', children: [{ name: 'monthDate', component: 'DatePicker.MonthPicker', _visible: '{{ data.other.monthDateVisible}}', className: '{{!data.other.monthDateVisible ? "contentdisplay" : ""}}', style: { width: '330px', Height: '30px' }, value: "{{$stringToMoment(data.form.monthTaxTime)}}", onChange: "{{function(d){$fieldChange('data.form.monthTaxTime',$momentToString(d,'YYYY-MM'))}}}" }, { name: 'yearSeasonSelect', component: 'Select', showSearch: false, _visible: '{{ data.other.yearDateVisible}}', className: '{{!data.other.yearDateVisible ? "contentdisplay" : ""}}', value: '{{data.form.yearTaxTime}}', onChange: "{{function(value){$fieldChange('data.form.yearTaxTime',value)}}}", style: { width: '330px', Height: '30px' }, children: '{{$renderSelectOption(data.enumListForm.taxYears, "id", "name")}}' }, { name: 'yearSeasonSelect', component: 'Select', showSearch: false, className: '{{!data.other.seasonVisible ? "contentdisplay" : ""}}', _visible: '{{ data.other.seasonVisible}}', getPopupContainer: '{{function(){return document.getElementById("ttk-access-app-tranreport")}}}', value: '{{data.form.year}}', onChange: "{{function(value){$fieldChange('data.form.year',value)}}}", style: { width: '160px', Height: '30px' }, children: '{{$renderSelectOption(data.enumListForm.taxYears, "id", "name")}}' }, { name: 'span', component: '::span', children: "-", className: '{{!data.other.seasonVisible ? "contentdisplay" : ""}}', _visible: '{{ data.other.seasonVisible}}', style: { width: '5px' }, }, { name: 'seasonSelect', component: 'Select', showSearch: false, value: '{{data.form.season}}', className: '{{!data.other.seasonVisible ? "contentdisplay" : ""}}', _visible: '{{ data.other.seasonVisible}}', getPopupContainer: '{{function(){return document.getElementById("ttk-access-app-tranreport")}}}', onChange: "{{function(value){$fieldChange('data.form.season',value)}}}", style: { width: '160px', Height: '30px' }, children: '{{$renderSelectOption(data.enumListForm.taxSeasons, "id", "name")}}' }] }, { name: 'name', component: 'Form.Item', colon: false, children: { name: 'save', component: 'Button', type: 'primary', children: '下一步', onClick: '{{$formSaveClick}}', className: 'step0contentbtn', } }] }] } }, { name: 'step1', component: '::div', className: '{{!data.step.step1Visible ? "ttk-access-app-tranreport-step1content contentdisplay" : "ttk-access-app-tranreport-step1content"}}', _visible: '{{data.step.step1Visible}}', children: { component: 'Spin', tip: '数据处理中...', className: 'tranreportspin', spinning: '{{data.other.step1loading}}', children: [{ name: 'ttk-access-app-tranreport-leadIn', className: 'ttk-access-app-tranreport-leadIn', component: '::div', children: [{ name: 'care', component: '::div', className: 'ttk-access-app-tranreport-leadIn-care', children: '{{$getUpdatePrompt()}}' }, { name: 'update-balancesheet-item', component: '::div', className: 'update-balancesheet-item', _visible: '{{data.other.balancesheetStatus}}', children: [{ component: '::span', name: 'update-balancesheet-item-title', className: 'update-balancesheet-item-title', children: '{{data.rptTitle.balanceSheetRpt}}' }, { component: '::span', name: 'update-balancesheet-item-content', // name: 'button', component: '::div', type: 'primary', className: 'update-balancesheet-item-content', children: '{{$renderUpload("balancesheet")}}' }] }, { name: 'update-balancesheet-item2', component: '::div', className: 'update-balancesheet-item', _visible: '{{data.other.profitstatementStatus}}', children: [{ component: '::span', name: 'update-balancesheet-item-title', className: 'update-balancesheet-item-title', children: '{{data.rptTitle.profitStatementRpt}}' }, { component: '::span', name: 'update-balancesheet-item-content', component: '::div', type: 'primary', className: 'update-balancesheet-item-content', children: '{{$renderUpload("profitstatement")}}' }] }, { name: 'update-balancesheet-item3', component: '::div', className: 'update-balancesheet-item', _visible: '{{data.other.cashflowstatementStatus}}', children: [{ component: '::span', name: 'update-balancesheet-item-title', className: 'update-balancesheet-item-title', children: '{{data.rptTitle.cashflowStatementRpt}}' }, { // component: '::span', name: 'update-balancesheet-item-content', // name: 'button', component: '::div', type: 'primary', className: 'update-balancesheet-item-content', children: '{{$renderUpload("cashflowstatement")}}' }] }, { name: 'selectLocalRpt', component: 'Button', type: 'primary', children: '转为局端格式', onClick: '{{$selectLocalRptClick}}', className: 'ttk-access-app-tranreport-leadIn-localRpt', disabled: '{{ !data.btnState.updateState }}', }, { name: 'nextBtn', component: '::div', className: 'ttk-access-app-tranreport-leadIn-next', children: [{ component: '::a', className: 'tranreporticon1', onClick: '{{$taxSettingClick}}', _visible: '{{data.step.iconVisible}}', children: [{ name: 'taxSetting', component: 'Icon', fontFamily: 'edficon', className: 'taxSet', type: 'shezhi', title: '设置' }, { name: 'nextBtnText', className: 'nextBtnText', component: '::span', children: '设置' }] }, { name: 'iconSpace', className: 'nextBtnText', _visible: '{{data.step.iconVisible}}', style: { position: 'relative' }, component: '::span', children: '|' }, { component: "{{data.btnState.nextState?'::div':'::a'}}", className: 'tranreporticon2', disabled: '{{data.btnState.nextState}}', onClick: '{{data.btnState.nextState?function(){}:$nextClick}}', children: [{ name: 'nextBtnIconRight', className: "{{data.btnState.nextState?'nextBtnIcon':'nextBtnIcon nextBtnIcon-color'}}", component: 'Icon', fontFamily: 'edficon', type: 'zhuanhuandebaobiao', }, { name: 'nextBtnTextRight', className: 'nextBtnText', style: { position: 'relative', float: 'right' }, component: '::span', children: '转换的报表' }] }] }] }] } }, { name: 'step2', component: '::div', className: '{{!data.step.step2Visible ? "ttk-access-app-tranreport-step2content contentdisplay" : "ttk-access-app-tranreport-step2content"}}', _visible: '{{data.step.step2Visible}}', children: [{ name: 'header', component: '::div', className: 'ttk-access-app-tranreport-step2content-header', children: [{ name: 'rpttype', component: '::div', className: 'ttk-access-app-tranreport-step2content-header-rpttype', children: [ // { // name: 'headRptType', // component: 'Radio.Group', // value: '{{data.other.rpttype}}', // onChange: `{{function(v){$rptTypeChange('data.other.rpttype',v.target.value)}}}`, // children: [{ // name: 'balanceSheetRpt', // value: 'balanceSheetRpt', // component: 'Radio.Button', // children: '{{data.rptTitle.balanceSheetRpt}}' // }, { // name: 'profitStatementRpt', // value: 'profitStatementRpt', // component: 'Radio.Button', // children: '{{data.rptTitle.profitStatementRpt}}' // }, { // name: 'cashflowStatementRpt', // value: 'cashflowStatementRpt', // component: 'Radio.Button', // _visible: '{{data.other.cashflowstatementStatus}}', // children: '{{data.rptTitle.cashflowStatementRpt}}' // }] // }, { className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent', component: '::div', children: [{ className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-left', component: '::div', _visible: '{{data.other.taxapplyTipsVisible}}', title: '注:原表与税局报表有不匹配的项目,请调整项目对应关系。调整后,以后属期可直接导入啦!', children: '注:原表与税局报表有不匹配的项目,请调整项目对应关系。调整后,以后属期可直接导入啦!' }, { name: 'maintitle', component: '::div', className: 'ttk-access-app-tranreport-step2content-header-maintitle', children: '{{data.rptHeader.mainTitle}}' }, { component: '::div', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right', children: [{ name: 'taxDeclareRpt', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-generatebtn', children: '申报', //disabled: '{{!data.other.writable}}', _visible: '{{data.other.taxapplyVisible && data.other.writable}}', onClick: '{{$taxDeclareRptClick}}' }, { name: 'downloadRpt', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-generatebtn', children: '下载转换后的Excel', _visible: '{{data.other.componyVisible}}', onClick: '{{$downloadRptClick}}' }, { name: 'generate', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-generatebtn', children: '生成', _visible: '{{data.other.taxVisible}}', onClick: '{{$generateClick}}', }, { name: 'saveRpt', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-otherbtn', children: '保存', style: { "min-width": '80px' }, //disabled: '{{!data.other.writable}}', _visible: '{{data.other.taxapplyVisible && data.other.writable}}', onClick: '{{$saveRptClick}}' }, { name: 'reQueryRpt', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-otherbtn', children: '重新取数', //disabled: '{{!data.other.writable}}', _visible: '{{data.other.taxapplyVisible && data.other.writable}}', onClick: '{{$reQueryRptClick}}' }, // { // name: 'reQueryRpt', // component: 'Button', // className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-otherbtn', // children: '重新取数', // _visible: '{{ data.other.taxapplyVisible}}', // onClick: '{{$reQueryRptClick}}' // }, // { // name: 'downRptPdf', // component: 'Button', // className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-otherbtn', // children: '下载PDF', // _visible: '{{data.other.taxapplyVisible}}', // onClick: '{{$downRptPdfClick}}' // }, { // name: 'uploadAttach', // component: 'Button', // className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-otherbtn', // children: '上传附注', // _visible: '{{data.other.taxapplyVisible}}', // onClick: '{{$uploadAttachClick}}' // }, { name: 'reSelectRpt', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-otherbtn', children: '重传Excel', _visible: '{{data.other.taxapplyVisible ? false : true}}', onClick: '{{$reSelectRptClick}}' }, { name: 'projectAdjust', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-otherbtn', children: '调整项目', _visible: '{{data.other.isProjectAdjust&&data.other.writable}}', onClick: '{{$projectAdjustClick}}' }, { name: 'projectAdjust', component: 'Button', className: 'ttk-access-app-tranreport-step2content-header-rpttype-rightcontent-right-generatebtn', children: '下载PDF', _visible: '{{data.other.taxapplyVisible&&!data.other.writable}}', onClick: '{{$downRptPdfClick}}' }, { name: 'Popover', component: 'Popover', placement: 'bottomLeft', _visible: '{{data.other.taxapplyVisible && data.other.writable}}', overlayClassName: 'Popover-app-proof-of-list', style: { padding: '0px 10px', "margin-left": '8px' }, content: { name: 'menu', component: 'Menu', className: 'more_btn_container', onClick: '{{$moreActionOpeate}}', children: [{ name: 'selectRpt', component: 'Menu.Item', className: 'more_btn_item', children: '选择表单', key: 'selectRptClick', _visible: '{{data.other.writable}}', }, { name: 'downRptPdf', component: 'Menu.Item', className: 'more_btn_item', key: 'downRptPdfClick', children: '下载PDF' }, { name: 'uploadAttach', component: 'Menu.Item', className: 'more_btn_item', _visible: '{{data.other.yearVisible&&data.other.writable}}', key: 'uploadAttachClick', children: '上传附注' }] }, children: { name: '更多', component: 'Button', className: 'more', children: ['更多', { name: 'down', component: 'Icon', type: 'down' }] } }] }] }] }, { name: 'tabs', component: 'Tabs', activeKey: '{{data.other.rpttype}}', defaultActiveKey: 'balanceSheetRpt', onChange: `{{function(v){$tabChange('data.other.rpttype',v)}}}`, children: [{ name: 'balanceSheetRpt', key: 'balanceSheetRpt', component: 'Tabs.TabPane', tab: '{{data.rptTitle.balanceSheetRpt}}' }, { name: 'profitStatementRpt', key: 'profitStatementRpt', component: 'Tabs.TabPane', tab: '{{data.rptTitle.profitStatementRpt}}' }, { name: 'cashflowStatementRpt', key: 'cashflowStatementRpt', component: 'Tabs.TabPane', tab: '{{data.rptTitle.cashflowStatementRpt}}', _visible: '{{data.other.cashflowstatementStatus}}' }] }, { name: 'rpttopdesc', component: '::div', className: 'ttk-access-app-tranreport-step2content-header-rpttopdesc', children: [{ component: '::div', className: 'rptHeaderLeft', children: '{{data.rptHeader.vatTaxpayerNum}}' }, { component: '::div', className: 'rptHeaderCenter', children: '{{data.rptHeader.subTitle}}' }, { component: '::div', className: 'rptHeaderRight', children: '{{data.rptHeader.enterprise}}' }] }, { name: 'rptbottomdesc', component: '::div', className: 'ttk-access-app-tranreport-step2content-header-rptbottomdesc', children: [{ component: '::div', className: 'rptHeaderbottomLeft', children: '{{data.rptHeader.compilingUnit}}' }, { component: '::div', className: 'rptHeaderbottomCenter', children: [{ component: '::div', className: 'rptHeaderbottomSpace-ll', children: '{{data.rptHeader.fillReportDate}}' }, { component: '::div', className: 'rptHeaderbottomSpace-rr', children: '{{data.rptHeader.reportperiod}}' }] }, { component: '::div', className: 'rptHeaderRight', children: '{{data.rptHeader.unit}}' }] }] }, { name: 'content',//1、balanceSheetRpt 资产负债 2、profitStatementRpt 利润表 3、cashflowStatementRpt 现金流量表 className: 'ttk-access-app-tranreport-step2content-content', name: 'voucherItems', component: 'Table', pagination: false, id: 'balanceSheetRptId', //scroll: '{{data.source.dataList.length> 0 ? data.tableOption:{}}}', allowColResize: false, enableSequenceColumn: false, bordered: true, dataSource: '{{data.source.dataList}}', noDelCheckbox: true, columns: '{{$tableColumns()}}', // loading: '{{data.other.loading}}', }] }] } } export function getInitState() { return { data: { form: { name: '', vatTaxpayer: '', accountingStandards: '', //会计总则 taxTimeType: 2000070002,//申报所属期 vatTaxpayerNum: '', //纳税人识别号 areaCode: '',//地区 sssqQ: '2018-01-01', sssqZ: '2018-12-31', }, localForm: [{ "taxTimeType": 2000070002, "areaCode": "", "systemDate": "", "industry": "", "accountingStandards": "", "vatTaxpayer": "", "vatTaxpayerNum": "" }], accountStandardsForSB: [{ "id": 2000020001, "name": "企业会计准则(一般企业)", "code": "2007", "enumId": 200002, "showOrder": 1 }, { "id": 2000020002, "name": "小企业会计准则", "code": "2013", "enumId": 200002, "showOrder": 2 }, { "id": 2000020003, "name": "企业会计准则(商业银行)", "code": "bank", "enumId": 200002, "showOrder": 3 }, { "id": 2000020004, "name": "企业会计准则(保险公司)", "code": "Insurance", "enumId": 200002, "showOrder": 4 }, { "id": 2000020005, "name": "企业会计准则(证券公司)", "code": "securities", "enumId": 200002, "showOrder": 5 }, { "id": 2000020006, "name": "企业会计准则(担保企业会计核算办法)", "code": "guarantee", "enumId": 200002, "showOrder": 1 }, { "id": 2000020007, "name": "事业单位会计制度", "code": "enterprise", "enumId": 200002, "showOrder": 7 }], taxTimeType: [{ "id": 2000070001, "name": "月", "code": "month" }, { "id": 2000070002, "name": "季", "code": "season" }, { "id": 2000070003, "name": "年", "code": "year" }], error: { }, enumListForm: { taxTimeTypes: [], taxYears: [], areaCode: [], accountingStandardEnums: [], taxSeasons: [] }, tableOption: { x: 900, y: null }, uploadFile: {}, btnState: { updateState: false, selectLocalDiabled: false, nextState: true }, step: { step0Visible: true, //设置页面 step1Visible: false, //选择页面 step2Visible: false, //报表页面 iconVisible: false //图标显示隐藏 }, list: [], rptHeader: { mainTitle: '财务报表', //资产负债表 subTitle: '(适用执行企业会计准则的一般企业)', vatTaxpayerNum: '', //纳税人识别号: 123123123123123123213123 fillReportDate: '',//填报日期:2018-04-18 compilingUnit: '',//编制单位:方欣科技股份公司 reportperiod: '',//报表属期:2018-01-01 2018-03-31 enterprise: '',//会企03表 unit: ''//单位:元 }, urlData: '', //传入参数 afferentParamsData: '', source: { headerList: [], dataList: [], allFormulaList: [], allColumns: [], rptTitleList: [{ zlbsxlDm: '', titleList: [ { key: 'balanceSheetRpt', value: '资产负债表' }, { key: 'profitStatementRpt', value: '利润表' }, { key: 'cashflowStatementRpt', value: '现金流量表' } ] }, { zlbsxlDm: 'ZL1001024', titleList: [ { key: 'balanceSheetRpt', value: '资产负债表' }, { key: 'profitStatementRpt', value: '收入支出表' }, { key: 'cashflowStatementRpt', value: '财政补助收入支出表' } ] }, { zlbsxlDm: 'ZL1001022', titleList: [ { key: 'balanceSheetRpt', value: '资产负债表' }, { key: 'profitStatementRpt', value: '利润表及利润分配表' }, { key: 'cashflowStatementRpt', value: '现金流量表' } ] }], isMutilColFormula: false }, targetList: [], other: { allVisible: false, loading: false, step0loading: false, step1loading: false, rpttype: 'balanceSheetRpt', care: '注:下方列表只显示不一致的项目。', balancesheetDisabled: false,//页签是否可选 cashflowstatementDisabled: false,//true, profitstatementDisabled: false, balancesheetStatus: true,//upload profitstatementStatus: true,//upload cashflowstatementStatus: false, //upload customAttribute: 0, editStatus: false, //财税助手对应得按钮 componyVisible: false, //局端对应得按钮 taxVisible: true, //税局对应得按钮 taxapplyVisible: false, //税局不出现对应的提示 taxapplyTipsVisible: true, //设置界面 季度控件显示状态 seasonVisible: false, //设置界面年控件显示状态 yearDateVisible: false, //设置界面yue控件显示状态 monthDateVisible: true, //上传附注只有年报才显示 yearVisible: false, //申报 是否显示项目调整 isProjectAdjust: true, appraisalId: '',//清册ID tableHeight: '500px', writable: true //申报状态 填写 查看 }, rptTitle: { balanceSheetRpt: '资产负债表', profitStatementRpt: '利润表', cashflowStatementRpt: '现金流量表' }, //会计总则 accountingStandards: '', } } }