账账相对报表
This commit is contained in:
parent
ab0e28d91f
commit
a1c1c3a44e
|
@ -1,18 +1,48 @@
|
||||||
/*pbHnlLNCpsWdx+f6QNDErXUJ9hVUkCPC2/wKKBoJVMo=*/
|
/*pbHnlLNCpsWdx+f6QNDErXUJ9hVUkCPC2/wKKBoJVMo=*/
|
||||||
import React, {Component} from 'react';
|
import React, {Component} from 'react';
|
||||||
import {createPage, high, base, ajax, deepClone, toast, getMultiLang, createPageIcon} from 'nc-lightapp-front';
|
import {createPage, high, base, ajax, deepClone, toast, getMultiLang, createPageIcon} from 'nc-lightapp-front';
|
||||||
const { NCFormControl: FormControl,NCDatePicker:DatePicker,NCButton: Button,NCRadio:Radio,NCBreadcrumb:Breadcrumb,
|
|
||||||
NCRow:Row,NCCol:Col,NCTree:Tree,NCMessage:Message,NCIcon:Icon,NCLoading:Loading,NCTable:Table,NCSelect:Select,
|
const {
|
||||||
NCCheckbox:Checkbox,NCNumber,AutoComplete,NCDropdown:Dropdown,NCPanel:Panel,NCForm,NCButtonGroup:ButtonGroup,NCAffix,NCDiv
|
NCFormControl: FormControl,
|
||||||
|
NCDatePicker: DatePicker,
|
||||||
|
NCButton: Button,
|
||||||
|
NCRadio: Radio,
|
||||||
|
NCBreadcrumb: Breadcrumb,
|
||||||
|
NCRow: Row,
|
||||||
|
NCCol: Col,
|
||||||
|
NCTree: Tree,
|
||||||
|
NCMessage: Message,
|
||||||
|
NCIcon: Icon,
|
||||||
|
NCLoading: Loading,
|
||||||
|
NCTable: Table,
|
||||||
|
NCSelect: Select,
|
||||||
|
NCCheckbox: Checkbox,
|
||||||
|
NCNumber,
|
||||||
|
AutoComplete,
|
||||||
|
NCDropdown: Dropdown,
|
||||||
|
NCPanel: Panel,
|
||||||
|
NCForm,
|
||||||
|
NCButtonGroup: ButtonGroup,
|
||||||
|
NCAffix,
|
||||||
|
NCDiv
|
||||||
} = base;
|
} = base;
|
||||||
const {NCFormItem: FormItem} = NCForm;
|
const {NCFormItem: FormItem} = NCForm;
|
||||||
import { CheckboxItem,RadioItem,TextAreaItem,ReferItem,SelectItem,InputItem,DateTimePickerItem} from '../../../public/components/FormItems';
|
import {
|
||||||
|
CheckboxItem,
|
||||||
|
RadioItem,
|
||||||
|
TextAreaItem,
|
||||||
|
ReferItem,
|
||||||
|
SelectItem,
|
||||||
|
InputItem,
|
||||||
|
DateTimePickerItem
|
||||||
|
} from '../../../public/components/FormItems';
|
||||||
import createScript from '../../../public/components/uapRefer.js';
|
import createScript from '../../../public/components/uapRefer.js';
|
||||||
import ReportModal from './reportModal/reportModal';
|
import ReportModal from './reportModal/reportModal';
|
||||||
import getDefaultAccountBook from '../../../public/components/getDefaultAccountBook.js';
|
import getDefaultAccountBook from '../../../public/components/getDefaultAccountBook.js';
|
||||||
import {rebuildBalanceItem, rebuildBalanceComfirm} from './rebuildBalancemodal/index';
|
import {rebuildBalanceItem, rebuildBalanceComfirm} from './rebuildBalancemodal/index';
|
||||||
import {buttonClick, initTemplate} from './events';
|
import {buttonClick, initTemplate} from './events';
|
||||||
import PrintModal from '../../../public/components/printModal';
|
import PrintModal from '../../../public/components/printModal';
|
||||||
|
|
||||||
const {PrintOutput} = high;
|
const {PrintOutput} = high;
|
||||||
import {printRequire, mouldOutput} from '../../../public/components/printModal/events';
|
import {printRequire, mouldOutput} from '../../../public/components/printModal/events';
|
||||||
import HeaderArea from '../../../public/components/HeaderArea';
|
import HeaderArea from '../../../public/components/HeaderArea';
|
||||||
|
@ -22,11 +52,13 @@ import './index.less';
|
||||||
import '../../../public/reachercss/reacher.less';
|
import '../../../public/reachercss/reacher.less';
|
||||||
import UploadTax from './uploadTax'
|
import UploadTax from './uploadTax'
|
||||||
import {cancelBtnClick} from '../../../busirecon/pages/list/events/buttonClick';
|
import {cancelBtnClick} from '../../../busirecon/pages/list/events/buttonClick';
|
||||||
import {reconciReport} from './reconciReportModal/index';
|
import ReconciReport from './reconciReportModal/index';
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
"isDataPowerEnable": 'Y',
|
"isDataPowerEnable": 'Y',
|
||||||
"DataPowerOperationCode": 'fi'
|
"DataPowerOperationCode": 'fi'
|
||||||
};
|
};
|
||||||
|
|
||||||
class Reckon extends Component {
|
class Reckon extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -45,8 +77,7 @@ class Reckon extends Component{
|
||||||
accountingbook: {display: '', value: ''},
|
accountingbook: {display: '', value: ''},
|
||||||
reportDataSum: [],//结账汇总数据
|
reportDataSum: [],//结账汇总数据
|
||||||
reportData: [],//结账详情数据
|
reportData: [],//结账详情数据
|
||||||
listItem:{
|
listItem: {},//表头字段
|
||||||
},//表头字段
|
|
||||||
rebuildBalanceItem: {},//重建余额表的查询字段
|
rebuildBalanceItem: {},//重建余额表的查询字段
|
||||||
yearList: [],
|
yearList: [],
|
||||||
periodList: [],
|
periodList: [],
|
||||||
|
@ -64,6 +95,7 @@ class Reckon extends Component{
|
||||||
selectedData: {},//选中的数据
|
selectedData: {},//选中的数据
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
beSureBtnClick = () => {
|
beSureBtnClick = () => {
|
||||||
this.UploadTax.confirm();
|
this.UploadTax.confirm();
|
||||||
}
|
}
|
||||||
|
@ -136,6 +168,7 @@ class Reckon extends Component{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//处理width
|
//处理width
|
||||||
changeWidth(arr) {
|
changeWidth(arr) {
|
||||||
arr.map((item, index) => {
|
arr.map((item, index) => {
|
||||||
|
@ -153,9 +186,28 @@ class Reckon extends Component{
|
||||||
let {listItem, reckonintData} = self.state;
|
let {listItem, reckonintData} = self.state;
|
||||||
let appcode = self.props.getSearchParam("c");
|
let appcode = self.props.getSearchParam("c");
|
||||||
const headData = [
|
const headData = [
|
||||||
{itemName:this.state.json['20020RECON-000000'],itemType:'refer',itemKey:'pk_accountingbook',/* 国际化处理: 核算账簿*/
|
{
|
||||||
config:{refCode:"uapbd/refer/org/AccountBookTreeRef"},queryGridUrl:'/nccloud/gl/voucher/ref.do',refType:'grid'},
|
itemName: this.state.json['20020RECON-000000'],
|
||||||
|
itemType: 'refer',
|
||||||
|
itemKey: 'pk_accountingbook',/* 国际化处理: 核算账簿*/
|
||||||
|
config: {refCode: "uapbd/refer/org/AccountBookTreeRef"},
|
||||||
|
queryGridUrl: '/nccloud/gl/voucher/ref.do',
|
||||||
|
refType: 'grid'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
itemName: this.state.json['20020RECON-000002'],/* 国际化处理: 会计科目*/
|
||||||
|
itemType: 'refer',
|
||||||
|
itemKey: 'pk_accasoa',
|
||||||
|
config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
|
||||||
|
queryGridUrl: '/nccloud/gl/voucher/ref.do', //todo
|
||||||
|
refType: 'grid' //todo
|
||||||
|
},
|
||||||
{itemName: this.state.json['20020RECON-000001'], itemType: 'textInput', itemKey: 'reckedMonth'},/* 国际化处理: 待结账月份:*/
|
{itemName: this.state.json['20020RECON-000001'], itemType: 'textInput', itemKey: 'reckedMonth'},/* 国际化处理: 待结账月份:*/
|
||||||
|
// {
|
||||||
|
// itemName: this.state.json['20020RECON-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
|
||||||
|
// itemChild: []
|
||||||
|
// },
|
||||||
|
|
||||||
]
|
]
|
||||||
return listItem.reckedMonth ? (
|
return listItem.reckedMonth ? (
|
||||||
headData.map((item, i) => {
|
headData.map((item, i) => {
|
||||||
|
@ -165,7 +217,9 @@ class Reckon extends Component{
|
||||||
let referUrl = item.config.refCode + '/index.js';
|
let referUrl = item.config.refCode + '/index.js';
|
||||||
let defaultValue = {refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value};
|
let defaultValue = {refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value};
|
||||||
if (!self.state[item.itemKey]) {
|
if (!self.state[item.itemKey]) {
|
||||||
{createScript.call(self,referUrl,item.itemKey)}
|
{
|
||||||
|
createScript.call(self, referUrl, item.itemKey)
|
||||||
|
}
|
||||||
return <div/>
|
return <div/>
|
||||||
} else {
|
} else {
|
||||||
if (item.itemKey == 'pk_accountingbook') {
|
if (item.itemKey == 'pk_accountingbook') {
|
||||||
|
@ -193,6 +247,7 @@ class Reckon extends Component{
|
||||||
}, config)
|
}, config)
|
||||||
},
|
},
|
||||||
onChange: (v) => {
|
onChange: (v) => {
|
||||||
|
console.log(v)
|
||||||
let {accountingbook} = self.state;
|
let {accountingbook} = self.state;
|
||||||
|
|
||||||
if (item.itemKey == 'pk_accountingbook') {
|
if (item.itemKey == 'pk_accountingbook') {
|
||||||
|
@ -215,6 +270,52 @@ class Reckon extends Component{
|
||||||
}
|
}
|
||||||
) : <div/>}
|
) : <div/>}
|
||||||
</FormItem>);
|
</FormItem>);
|
||||||
|
} else if (item.itemKey == 'pk_accasoa') { //会计科目
|
||||||
|
return (
|
||||||
|
<FormItem
|
||||||
|
inline={true}
|
||||||
|
showMast={false}
|
||||||
|
labelXs={2} labelSm={2} labelMd={2}
|
||||||
|
xs={2} md={2} sm={2}
|
||||||
|
labelName=''
|
||||||
|
isRequire={true}
|
||||||
|
method="change"
|
||||||
|
className="changesm"
|
||||||
|
>
|
||||||
|
{self.state[item.itemKey] ? (self.state[item.itemKey])(
|
||||||
|
{
|
||||||
|
fieldid: item.itemKey,
|
||||||
|
value: defaultValue,
|
||||||
|
isMultiSelectedEnabled: false,
|
||||||
|
disabledDataShow: true,
|
||||||
|
queryCondition: () => {
|
||||||
|
return {
|
||||||
|
"pk_accountingbook": listItem['pk_accountingbook'].value,
|
||||||
|
// "dateStr":currrentDate.split(' ')[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onFocus: () => {
|
||||||
|
let {accountingbook} = self.state;
|
||||||
|
if (accountingbook.value == "" || accountingbook.value == undefined) {
|
||||||
|
toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onChange: (v) => {
|
||||||
|
let {pk_accountingbook} = self.state;
|
||||||
|
if (item.itemKey == 'pk_accasoa') {
|
||||||
|
pk_accountingbook.value = v.refpk;
|
||||||
|
pk_accountingbook.display = v.refname;
|
||||||
|
listItem[item.itemKey].value = v.refpk;
|
||||||
|
listItem[item.itemKey].display = v.refname;
|
||||||
|
this.setState({
|
||||||
|
listItem, pk_accountingbook
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
) : <div/>}
|
||||||
|
</FormItem>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -272,12 +373,73 @@ class Reckon extends Component{
|
||||||
className="changesmmd"
|
className="changesmmd"
|
||||||
/> */}
|
/> */}
|
||||||
{listItem['pk_accountingbook'].value ?
|
{listItem['pk_accountingbook'].value ?
|
||||||
<span className="changesmmd" style={{verticalAlign:'middle'}}>{defValue.split("/")[0]}{this.state.json['20020RECON-000031']}{defValue.split("/")[1]}{this.state.json['20020RECON-000032']}</span>
|
<span className="changesmmd"
|
||||||
|
style={{verticalAlign: 'middle'}}>{defValue.split("/")[0]}{this.state.json['20020RECON-000031']}{defValue.split("/")[1]}{this.state.json['20020RECON-000032']}</span>
|
||||||
:
|
:
|
||||||
<span className="changesmmd" style={{verticalAlign: 'middle'}}></span>
|
<span className="changesmmd" style={{verticalAlign: 'middle'}}></span>
|
||||||
}
|
}
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)
|
)
|
||||||
|
case 'Dbselect':
|
||||||
|
return (
|
||||||
|
<FormItem
|
||||||
|
inline={true}
|
||||||
|
// showMast={false}
|
||||||
|
labelXs={2} labelSm={2} labelMd={2}
|
||||||
|
xs={2} md={2} sm={2}
|
||||||
|
labelName={item.itemName}
|
||||||
|
isRequire={true}
|
||||||
|
method="change"
|
||||||
|
inputAfter={
|
||||||
|
<Col xs={12} md={12} sm={12}>
|
||||||
|
<Select
|
||||||
|
fieldid="period"
|
||||||
|
size="lg"
|
||||||
|
value={listItem['period'].value}
|
||||||
|
style={{width: 150}}
|
||||||
|
onChange={
|
||||||
|
(v) => {
|
||||||
|
listItem.period = {value: v}
|
||||||
|
self.setState({
|
||||||
|
listItem
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{self.state.periodList.map((item, index) => {
|
||||||
|
return <Option value={item} key={item}>{item}</Option>
|
||||||
|
})}
|
||||||
|
|
||||||
|
</Select>
|
||||||
|
</Col>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
fieldid="year"
|
||||||
|
size="lg"
|
||||||
|
value={listItem['year'].value}
|
||||||
|
style={{width: 150}}
|
||||||
|
onChange={
|
||||||
|
(v) => {
|
||||||
|
if (v) {
|
||||||
|
if (listItem['pk_accountingbook'].length > 0) {
|
||||||
|
self.getPeriodList(listItem['pk_accountingbook'][0].value, v);
|
||||||
|
}
|
||||||
|
listItem.year = {value: v};
|
||||||
|
self.setState({
|
||||||
|
listItem
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{self.state.yearList.map((item, index) => {
|
||||||
|
return <Option value={item} key={item}>{item}</Option>
|
||||||
|
})}
|
||||||
|
|
||||||
|
</Select>
|
||||||
|
</FormItem>
|
||||||
|
)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -289,7 +451,15 @@ class Reckon extends Component{
|
||||||
//结账检查报告
|
//结账检查报告
|
||||||
handleEndAccountReport = () => {
|
handleEndAccountReport = () => {
|
||||||
let self = this;
|
let self = this;
|
||||||
let {reportDataSum,reportSumTitle,reportSumFont,reportData,accountingbook,reportTitle,reportFont}=self.state;
|
let {
|
||||||
|
reportDataSum,
|
||||||
|
reportSumTitle,
|
||||||
|
reportSumFont,
|
||||||
|
reportData,
|
||||||
|
accountingbook,
|
||||||
|
reportTitle,
|
||||||
|
reportFont
|
||||||
|
} = self.state;
|
||||||
if (accountingbook.value == "" || accountingbook.value == undefined) {
|
if (accountingbook.value == "" || accountingbook.value == undefined) {
|
||||||
toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
|
toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
|
||||||
return false;
|
return false;
|
||||||
|
@ -326,7 +496,17 @@ class Reckon extends Component{
|
||||||
// this.refs.getSwordButton.print();
|
// this.refs.getSwordButton.print();
|
||||||
// return false;
|
// return false;
|
||||||
let self = this;
|
let self = this;
|
||||||
let {reckonintData,listItem,reportDataSum,reportSumTitle,reportSumFont,reportData,accountingbook,reportTitle,reportFont}=self.state;
|
let {
|
||||||
|
reckonintData,
|
||||||
|
listItem,
|
||||||
|
reportDataSum,
|
||||||
|
reportSumTitle,
|
||||||
|
reportSumFont,
|
||||||
|
reportData,
|
||||||
|
accountingbook,
|
||||||
|
reportTitle,
|
||||||
|
reportFont
|
||||||
|
} = self.state;
|
||||||
if (accountingbook.value == "" || accountingbook.value == undefined) {
|
if (accountingbook.value == "" || accountingbook.value == undefined) {
|
||||||
toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
|
toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
|
||||||
return false;
|
return false;
|
||||||
|
@ -448,13 +628,35 @@ class Reckon extends Component{
|
||||||
//对账todo
|
//对账todo
|
||||||
handleReconciliate = () => {
|
handleReconciliate = () => {
|
||||||
let self = this;
|
let self = this;
|
||||||
let {reportDataSum,reportSumTitle,reportSumFont,reportData,accountingbook,reportTitle,reportFont}=self.state;
|
let {
|
||||||
|
reportData,
|
||||||
|
accountingbook,
|
||||||
|
pk_accountingbook,
|
||||||
|
periodData
|
||||||
|
} = self.state;
|
||||||
if (accountingbook.value == "" || accountingbook.value == undefined) {
|
if (accountingbook.value == "" || accountingbook.value == undefined) {
|
||||||
toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
|
toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let url ='/nccloud/gl/reckoning/reckoningreport.do';
|
if (pk_accountingbook.value == "" || pk_accountingbook.value == undefined) {
|
||||||
let pk_accpont = {"pk_accountingbook":accountingbook.value};
|
toast({content: self.state.json['20020RECON-000038'], color: 'warning'});/* 国际化处理: 请先选择会计科目*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let url = '/nccloud/gl/accountrep/accountbalancetotal.do';
|
||||||
|
// let pk_accpont = {"pk_accountingbook":accountingbook.value};
|
||||||
|
let enddate = this.getMonthDays(periodData.presentYear, periodData.presentMonth)
|
||||||
|
let pk_accpont = {
|
||||||
|
"pk_accountingbook": [accountingbook.value],
|
||||||
|
"pk_accasoa": [pk_accountingbook.value],
|
||||||
|
// "pk_accountingbook":["1001A110000000001PFH"],
|
||||||
|
// "pk_accasoa": ["1001A1100000000017L8"],
|
||||||
|
"startyear": periodData.presentYear,
|
||||||
|
"endyear": periodData.presentYear,
|
||||||
|
"startperiod": periodData.presentMonth,
|
||||||
|
"endperiod": periodData.presentMonth,
|
||||||
|
"startdate": periodData.presentYear + '-' + periodData.presentMonth + "-01",
|
||||||
|
"enddate": periodData.presentYear + '-' + periodData.presentMonth + '-' + enddate
|
||||||
|
}
|
||||||
ajax({
|
ajax({
|
||||||
url: url,
|
url: url,
|
||||||
data: pk_accpont,
|
data: pk_accpont,
|
||||||
|
@ -463,16 +665,30 @@ class Reckon extends Component{
|
||||||
//渲染已有账表数据遮罩
|
//渲染已有账表数据遮罩
|
||||||
if (success) {
|
if (success) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
reportDataSum=data.reportSumMesg;
|
data.forEach((item, i) => {
|
||||||
reportSumTitle=data.sumDisMesg;
|
if (i != 0) {
|
||||||
reportSumFont=data.sumFont;
|
if (data[i - 1].pacccode == item.pacccode) {
|
||||||
reportData=data.reportMesg;
|
item.paccname = ''
|
||||||
reportTitle=data.disMesg;
|
}
|
||||||
reportFont=data.font;
|
if (data[i - 1].acccode == item.acccode) {
|
||||||
self.setState({
|
item.accname = ''
|
||||||
reportDataSum,reportSumTitle,reportSumFont,reportData,reportTitle,reportFont,
|
}
|
||||||
ShowHideFlag:true,
|
}
|
||||||
},()=>{
|
})
|
||||||
|
reportData = data
|
||||||
|
reportData.unshift({
|
||||||
|
pacccode: "会计科目编码", //总账余额表-会计科目编码
|
||||||
|
paccname: "会计科目", //总账余额表-会计科目名称
|
||||||
|
pendlocamount: "期末余额", //总账余额表-期末余额
|
||||||
|
//===============
|
||||||
|
acccode: "会计科目编码", //总账辅助余额表-会计科目编码
|
||||||
|
accname: "会计科目", //总账辅助余额表-会计科目名称
|
||||||
|
assname: "辅助核算", //总账辅助余额表-辅助核算
|
||||||
|
endlocamount: "期末余额", //总账辅助余额表-期末余额
|
||||||
|
//===============
|
||||||
|
difference: "金额", //差异-金额
|
||||||
|
})
|
||||||
|
self.setState({reportData, ShowHideFlag: true}, () => {
|
||||||
self.props.modal.show('reportReconciModal');
|
self.props.modal.show('reportReconciModal');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -480,12 +696,14 @@ class Reckon extends Component{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//打印
|
//打印
|
||||||
handlePrintReport() {
|
handlePrintReport() {
|
||||||
this.setState({
|
this.setState({
|
||||||
showPrintModal: true
|
showPrintModal: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePrint(data) {
|
handlePrint(data) {
|
||||||
let printUrl = '/nccloud/gl/accountrep/reckoningreportprint.do'
|
let printUrl = '/nccloud/gl/accountrep/reckoningreportprint.do'
|
||||||
let {queryDataObj, appcode, sumOrDetail, listItem} = this.state
|
let {queryDataObj, appcode, sumOrDetail, listItem} = this.state
|
||||||
|
@ -504,6 +722,7 @@ class Reckon extends Component{
|
||||||
showPrintModal: false
|
showPrintModal: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//模板输出
|
//模板输出
|
||||||
showOutputModal() {
|
showOutputModal() {
|
||||||
let outputUrl = '/nccloud/gl/accountrep/reckoningreportoutput.do'
|
let outputUrl = '/nccloud/gl/accountrep/reckoningreportoutput.do'
|
||||||
|
@ -513,8 +732,10 @@ class Reckon extends Component{
|
||||||
queryDataObj.month = listItem['reckedMonth'].value.split('/')[1];
|
queryDataObj.month = listItem['reckedMonth'].value.split('/')[1];
|
||||||
mouldOutput(outputUrl, appcode, nodekey, ctemplate, queryDataObj)
|
mouldOutput(outputUrl, appcode, nodekey, ctemplate, queryDataObj)
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOutput() {
|
handleOutput() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//关闭
|
//关闭
|
||||||
handleClose = () => {
|
handleClose = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -597,6 +818,8 @@ class Reckon extends Component{
|
||||||
const {data, success} = response;
|
const {data, success} = response;
|
||||||
//渲染已有账表数据遮罩
|
//渲染已有账表数据遮罩
|
||||||
if (success) {
|
if (success) {
|
||||||
|
let periodData = {}
|
||||||
|
console.log(response.data)
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
reckonintData = data.reckedYear;
|
reckonintData = data.reckedYear;
|
||||||
self.showSimpletableData(reckonintData);
|
self.showSimpletableData(reckonintData);
|
||||||
|
@ -604,9 +827,12 @@ class Reckon extends Component{
|
||||||
item.key = index;
|
item.key = index;
|
||||||
})
|
})
|
||||||
listItem['reckedMonth'].value = data.reckedMonth;
|
listItem['reckedMonth'].value = data.reckedMonth;
|
||||||
|
|
||||||
|
periodData.presentYear = data.presentYear
|
||||||
|
periodData.presentMonth = data.presentMonth
|
||||||
}
|
}
|
||||||
self.setState({
|
self.setState({
|
||||||
reckonintData
|
reckonintData, periodData
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -621,6 +847,7 @@ class Reckon extends Component{
|
||||||
this.props.table.setAllTableData(this.tableId, {rows: []});
|
this.props.table.setAllTableData(this.tableId, {rows: []});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
let self = this;
|
let self = this;
|
||||||
let url = '/nccloud/gl/pfxx/taxcloudconfig.do';
|
let url = '/nccloud/gl/pfxx/taxcloudconfig.do';
|
||||||
|
@ -635,6 +862,7 @@ class Reckon extends Component{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
let {listItem, rebuildBalanceItem, accountingbook} = this.state;
|
let {listItem, rebuildBalanceItem, accountingbook} = this.state;
|
||||||
let appcode = this.props.getSearchParam("c");
|
let appcode = this.props.getSearchParam("c");
|
||||||
|
@ -646,9 +874,28 @@ class Reckon extends Component{
|
||||||
this.getYearList(defaultAccouontBook.value);
|
this.getYearList(defaultAccouontBook.value);
|
||||||
}
|
}
|
||||||
const headData = [
|
const headData = [
|
||||||
{itemName:this.state.json['20020RECON-000000'],itemType:'refer',itemKey:'pk_accountingbook',/* 国际化处理: 核算账簿*/
|
{
|
||||||
config:{refCode:"uapbd/refer/org/AccountBookTreeRef"},queryGridUrl:'/nccloud/gl/voucher/ref.do',refType:'grid'},
|
itemName: this.state.json['20020RECON-000000'],
|
||||||
|
itemType: 'refer',
|
||||||
|
itemKey: 'pk_accountingbook',/* 国际化处理: 核算账簿*/
|
||||||
|
config: {refCode: "uapbd/refer/org/AccountBookTreeRef"},
|
||||||
|
queryGridUrl: '/nccloud/gl/voucher/ref.do',
|
||||||
|
refType: 'grid'
|
||||||
|
},
|
||||||
|
//todo
|
||||||
|
{
|
||||||
|
itemName: this.state.json['20020RECON-000002'],/* 国际化处理: 会计科目*/
|
||||||
|
itemType: "refer",
|
||||||
|
itemKey: "pk_accasoa",
|
||||||
|
config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
|
||||||
|
queryGridUrl: '/nccloud/gl/voucher/ref.do',
|
||||||
|
refType: 'grid'
|
||||||
|
},
|
||||||
{itemName: this.state.json['20020RECON-000001'], itemType: 'textInput', itemKey: 'reckedMonth'},/* 国际化处理: 待结账月份:*/
|
{itemName: this.state.json['20020RECON-000001'], itemType: 'textInput', itemKey: 'reckedMonth'},/* 国际化处理: 待结账月份:*/
|
||||||
|
// {
|
||||||
|
// itemName: this.state.json['20020RECON-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
|
||||||
|
// itemChild: []
|
||||||
|
// },
|
||||||
]
|
]
|
||||||
const loadQuery = [
|
const loadQuery = [
|
||||||
{
|
{
|
||||||
|
@ -665,9 +912,10 @@ class Reckon extends Component{
|
||||||
config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
|
config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
|
||||||
showMast: false
|
showMast: false
|
||||||
},
|
},
|
||||||
{itemName:this.state.json['20020RECON-000003'],itemType:'Dbselect',itemKey:['year','period'],/* 国际化处理: 会计期间*/
|
// {
|
||||||
itemChild:[]
|
// itemName: this.state.json['20020RECON-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
|
||||||
}
|
// itemChild: []
|
||||||
|
// }
|
||||||
// {itemName:'会计期间',itemType:'select',itemKey:'period',
|
// {itemName:'会计期间',itemType:'select',itemKey:'period',
|
||||||
// itemChild:[]
|
// itemChild:[]
|
||||||
// }
|
// }
|
||||||
|
@ -702,7 +950,7 @@ class Reckon extends Component{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(item.itemType=='Dbdate'||item.itemType=='DbtextInput'){
|
if (item.itemType == 'Dbdate' || item.itemType == 'DbtextInput' || item.itemType == 'Dbselect') {
|
||||||
item.itemKey.map((k, index) => {
|
item.itemKey.map((k, index) => {
|
||||||
let name = k;
|
let name = k;
|
||||||
listItem[name] = key
|
listItem[name] = key
|
||||||
|
@ -782,11 +1030,20 @@ class Reckon extends Component{
|
||||||
}
|
}
|
||||||
getMultiLang({moduleId: ['20020RECON', 'uptoload'], domainName: 'gl', currentLocale: 'simpchn', callback});
|
getMultiLang({moduleId: ['20020RECON', 'uptoload'], domainName: 'gl', currentLocale: 'simpchn', callback});
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedChange = (props, newVal, oldVal) => {//选中行发生变化
|
selectedChange = (props, newVal, oldVal) => {//选中行发生变化
|
||||||
|
|
||||||
}
|
}
|
||||||
showReporModal = () => {
|
showReporModal = () => {
|
||||||
let{ShowHideFlag,reportDataSum,reportSumTitle,reportSumFont,reportData,reportTitle,reportFont}=this.state;
|
let {
|
||||||
|
ShowHideFlag,
|
||||||
|
reportDataSum,
|
||||||
|
reportSumTitle,
|
||||||
|
reportSumFont,
|
||||||
|
reportData,
|
||||||
|
reportTitle,
|
||||||
|
reportFont
|
||||||
|
} = this.state;
|
||||||
let reportSum = {
|
let reportSum = {
|
||||||
reportSumData: reportDataSum,
|
reportSumData: reportDataSum,
|
||||||
reportSumTitle: reportSumTitle,
|
reportSumTitle: reportSumTitle,
|
||||||
|
@ -810,14 +1067,51 @@ class Reckon extends Component{
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
/*对账弹框*/
|
||||||
|
showReconciModal = () => {
|
||||||
|
let {
|
||||||
|
ShowHideFlag,
|
||||||
|
reportDataSum,
|
||||||
|
reportSumTitle,
|
||||||
|
reportSumFont,
|
||||||
|
reportData,
|
||||||
|
reportTitle,
|
||||||
|
reportFont
|
||||||
|
} = this.state;
|
||||||
|
let reportSum = {
|
||||||
|
reportSumData: reportDataSum,
|
||||||
|
reportSumTitle: reportSumTitle,
|
||||||
|
reportSumFont: reportSumFont,
|
||||||
|
}
|
||||||
|
let reportDetail = {
|
||||||
|
reportDetailData: reportData,
|
||||||
|
reportDetailTitle: reportTitle,
|
||||||
|
reportDetailFont: reportFont
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<ReconciReport
|
||||||
|
// config={this.props}
|
||||||
|
reportSum={reportSum}
|
||||||
|
reportDetail={reportDetail}
|
||||||
|
showOrHide={ShowHideFlag}
|
||||||
|
// onConfirm = {this.handleQueryClick.bind(this)}
|
||||||
|
handlePrintReport={this.handlePrintReport.bind(this)}//打印
|
||||||
|
showOutputModal={this.showOutputModal.bind(this)}//模板输出
|
||||||
|
handleClose={this.handleClose.bind(this)}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
onRef = (ref) => {
|
onRef = (ref) => {
|
||||||
this.UploadTax = ref;
|
this.UploadTax = ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let {taxcloudurl, pk_periodscheme, up_pk_accountingbook, pk_display, period} = this.state
|
let {taxcloudurl, pk_periodscheme, up_pk_accountingbook, pk_display, period} = this.state
|
||||||
|
|
||||||
let{accountingbook,columnsVerify,reckonintData,listItem,ShowHideFlag,isQueryShow,
|
let {
|
||||||
reportDataSum,reportSumTitle,reportSumFont,reportData,reportTitle,reportFont}=this.state;
|
accountingbook, columnsVerify, reckonintData, listItem, ShowHideFlag, isQueryShow,
|
||||||
|
reportDataSum, reportSumTitle, reportSumFont, reportData, reportTitle, reportFont
|
||||||
|
} = this.state;
|
||||||
let {modal} = this.props;
|
let {modal} = this.props;
|
||||||
let {createModal} = modal;
|
let {createModal} = modal;
|
||||||
if (columnsVerify.length == 0) {
|
if (columnsVerify.length == 0) {
|
||||||
|
@ -850,9 +1144,10 @@ class Reckon extends Component{
|
||||||
config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
|
config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
|
||||||
showMast: false
|
showMast: false
|
||||||
},
|
},
|
||||||
{itemName:this.state.json['20020RECON-000003'],itemType:'Dbselect',itemKey:['year','period'],/* 国际化处理: 会计期间*/
|
// {
|
||||||
itemChild:[]
|
// itemName: this.state.json['20020RECON-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
|
||||||
}
|
// itemChild: []
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
return (
|
return (
|
||||||
<div className="reckoning nc-bill-list" id="finalTreatment_rekoning">
|
<div className="reckoning nc-bill-list" id="finalTreatment_rekoning">
|
||||||
|
@ -862,7 +1157,7 @@ class Reckon extends Component{
|
||||||
<div className="headtitle nc-theme-form-label-c" fieldid="reckoning_form-area">
|
<div className="headtitle nc-theme-form-label-c" fieldid="reckoning_form-area">
|
||||||
<NCForm useRow={true}
|
<NCForm useRow={true}
|
||||||
submitAreaClassName='classArea'
|
submitAreaClassName='classArea'
|
||||||
showSubmit={false} >
|
showSubmit={false}>
|
||||||
{this.getHeadData()}
|
{this.getHeadData()}
|
||||||
</NCForm>
|
</NCForm>
|
||||||
</div>
|
</div>
|
||||||
|
@ -948,8 +1243,8 @@ class Reckon extends Component{
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{ShowHideFlag && createModal('reportReconciModal', {
|
{ShowHideFlag && createModal('reportReconciModal', {
|
||||||
title:this.state.json['20020RECON-000034'],/* 国际化处理: 对账*/
|
title: this.state.json['20020RECON-000039'],/* 国际化处理: 对账*/
|
||||||
content:(<div>11111111</div>),
|
content: this.showReconciModal(),
|
||||||
userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
|
userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
|
||||||
noFooter: true, //是否需要底部按钮,默认有footer,有false,没有true
|
noFooter: true, //是否需要底部按钮,默认有footer,有false,没有true
|
||||||
})
|
})
|
||||||
|
@ -960,7 +1255,15 @@ class Reckon extends Component{
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getMonthDays(year, month) {
|
||||||
|
var stratDate = new Date(year, month - 1, 1),
|
||||||
|
endData = new Date(year, month, 1);
|
||||||
|
var days = (endData - stratDate) / (1000 * 60 * 60 * 24);
|
||||||
|
return days;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reckon = createPage({
|
Reckon = createPage({
|
||||||
// initTemplate:initTemplate
|
// initTemplate:initTemplate
|
||||||
})(Reckon);
|
})(Reckon);
|
||||||
|
|
|
@ -69,6 +69,90 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#reconci_report{
|
||||||
|
.btn{text-align: right}
|
||||||
|
//开始结账
|
||||||
|
.tryto{
|
||||||
|
.detail{
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
.u-button.undefined.nc-button-wrapper.button-primary {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
.reportTitle{
|
||||||
|
text-align:center;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
.reportSumTitle{
|
||||||
|
position: absolute;
|
||||||
|
top: 9px;
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
|
.u-table-scroll{
|
||||||
|
.u-table-thead{
|
||||||
|
.thTitle{
|
||||||
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.u-table-body{
|
||||||
|
tr:first-child{
|
||||||
|
td{
|
||||||
|
background-color: #dde3ee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tdSecondBox{
|
||||||
|
display: flex;
|
||||||
|
div{
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
}
|
||||||
|
div:not(last-child){
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*.u-table-tbody{
|
||||||
|
pre{
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
word-break: normal;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.u-button-group{
|
||||||
|
float: right;
|
||||||
|
margin: 5px 0 0 0 !important;
|
||||||
|
.u-button{
|
||||||
|
margin-left: 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.noprimary{
|
||||||
|
font-size: 13px;
|
||||||
|
border-radius: 3px;
|
||||||
|
min-width: 60px;
|
||||||
|
line-height: 0px;
|
||||||
|
background: #fff;
|
||||||
|
color: #111;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
-webkit-box-shadow: 0 1px 1px #d0d0d0;
|
||||||
|
box-shadow: 0 1px 1px #d0d0d0;
|
||||||
|
}
|
||||||
|
.noprimary:hover{
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #E14C46;
|
||||||
|
color: #E14C46;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.u-form-item .u-input-group-outer .u-input-after, .u-form-item .u-input-group-outer .u-input-before{
|
.u-form-item .u-input-group-outer .u-input-after, .u-form-item .u-input-group-outer .u-input-before{
|
||||||
border:none !important;
|
border:none !important;
|
||||||
|
@ -95,6 +179,7 @@
|
||||||
}
|
}
|
||||||
span:nth-of-type(2){
|
span:nth-of-type(2){
|
||||||
.u-col-md-2.u-col-sm-2.u-col-xs-2:nth-of-type(1){
|
.u-col-md-2.u-col-sm-2.u-col-xs-2:nth-of-type(1){
|
||||||
|
width: 0 !important;
|
||||||
//width: 110px !important;
|
//width: 110px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,7 +232,7 @@
|
||||||
width: 240px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.changesm:nth-of-type(2){
|
.changesm:nth-of-type(3){
|
||||||
div:nth-of-type(1){
|
div:nth-of-type(1){
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +245,7 @@
|
||||||
// left: 113px;
|
// left: 113px;
|
||||||
// width: 82px;
|
// width: 82px;
|
||||||
}
|
}
|
||||||
span:nth-of-type(2){
|
span:nth-of-type(3){
|
||||||
.u-form-item.u-form-inline{
|
.u-form-item.u-form-inline{
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// left: 118px;
|
// left: 118px;
|
||||||
|
|
|
@ -1,18 +1,40 @@
|
||||||
/*qZ5a1x5ign4IdlZuRO5Ax6TjC2a3u5fVc0DIn53oa4I=*/
|
/*qZ5a1x5ign4IdlZuRO5Ax6TjC2a3u5fVc0DIn53oa4I=*/
|
||||||
import React, {Component} from 'react';
|
import React, {Component} from 'react';
|
||||||
import {high, base, ajax, getMultiLang} from 'nc-lightapp-front';
|
import {high, base, ajax, getMultiLang} from 'nc-lightapp-front';
|
||||||
const { NCFormControl: FormControl,NCDatePicker:DatePicker,NCButton: Button,NCRadio:Radio,NCBreadcrumb:Breadcrumb,
|
|
||||||
NCRow:Row,NCCol:Col,NCTree:Tree,NCMessage:Message,NCIcon:Icon,NCLoading:Loading,NCTable:Table,NCSelect:Select,
|
const {
|
||||||
NCCheckbox:Checkbox,NCNumber,AutoComplete,NCDropdown:Dropdown,NCPanel:Panel,NCModal:Modal,NCForm,NCButtonGroup:ButtonGroup,NCDiv
|
NCFormControl: FormControl,
|
||||||
|
NCDatePicker: DatePicker,
|
||||||
|
NCButton: Button,
|
||||||
|
NCRadio: Radio,
|
||||||
|
NCBreadcrumb: Breadcrumb,
|
||||||
|
NCRow: Row,
|
||||||
|
NCCol: Col,
|
||||||
|
NCTree: Tree,
|
||||||
|
NCMessage: Message,
|
||||||
|
NCIcon: Icon,
|
||||||
|
NCLoading: Loading,
|
||||||
|
NCTable: Table,
|
||||||
|
NCSelect: Select,
|
||||||
|
NCCheckbox: Checkbox,
|
||||||
|
NCNumber,
|
||||||
|
AutoComplete,
|
||||||
|
NCDropdown: Dropdown,
|
||||||
|
NCPanel: Panel,
|
||||||
|
NCModal: Modal,
|
||||||
|
NCForm,
|
||||||
|
NCButtonGroup: ButtonGroup,
|
||||||
|
NCDiv
|
||||||
} = base;
|
} = base;
|
||||||
const {NCFormItem: FormItem} = NCForm;
|
const {NCFormItem: FormItem} = NCForm;
|
||||||
import '../index.less';
|
import '../index.less';
|
||||||
|
|
||||||
export default class ReportModal extends Component {
|
export default class ReportModal extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
this.columns_report = [
|
this.columns_report = [
|
||||||
{
|
{
|
||||||
title: "",
|
title: (<div>5235235</div>),
|
||||||
dataIndex: "strRowOne",
|
dataIndex: "strRowOne",
|
||||||
key: "strRowOne",
|
key: "strRowOne",
|
||||||
width: 300,
|
width: 300,
|
||||||
|
@ -26,11 +48,17 @@ export default class ReportModal extends Component{
|
||||||
}
|
}
|
||||||
if (redFlag) {
|
if (redFlag) {
|
||||||
return (
|
return (
|
||||||
<div className="fontColor" fieldid="strRowOne"><pre>{!text?<span> </span>:text}</pre></div>
|
// <div className="fontColor" fieldid="strRowOne"><pre>{!text?<span> </span>:text}</pre></div>
|
||||||
|
<div className="fontColor" fieldid="strRowOne">
|
||||||
|
<pre>测试测试111</pre>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div fieldid="strRowOne"><pre>{!text?<span> </span>:text}</pre></div>
|
// <div fieldid="strRowOne"><pre>{!text?<span> </span>:text}</pre></div>
|
||||||
|
<div fieldid="strRowOne">
|
||||||
|
<pre>测试测试222</pre>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,11 +79,15 @@ export default class ReportModal extends Component{
|
||||||
}
|
}
|
||||||
if (redFlag) {
|
if (redFlag) {
|
||||||
return (
|
return (
|
||||||
<div className="fontColor" fieldid="strRowTwo"><pre>{!text?<span> </span>:text}</pre></div>
|
<div className="fontColor" fieldid="strRowTwo">
|
||||||
|
<pre>{!text ? <span> </span> : text}</pre>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div fieldid="strRowTwo"><pre>{!text?<span> </span>:text}</pre></div>
|
<div fieldid="strRowTwo">
|
||||||
|
<pre>{!text ? <span> </span> : text}</pre>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,84 +105,80 @@ export default class ReportModal extends Component{
|
||||||
sumOrDetail: 'sum'//默认像是汇总table数据
|
sumOrDetail: 'sum'//默认像是汇总table数据
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
let callback = (json) => {
|
let callback = (json) => {
|
||||||
|
// console.log(json)
|
||||||
this.columns_reportSum = [
|
this.columns_reportSum = [
|
||||||
{
|
{
|
||||||
title: (<div fieldid="strRowOne" className='checkbox-mergecells'>{json['20020RECON-000023']}</div>),/* 国际化处理: 检查项*/
|
title: (<div fieldid="field1" className='checkbox-mergecells thTitle'>{json['20020RECON-000034']}</div>),/* 国际化处理: 总账余额表*/
|
||||||
dataIndex: "strRowOne",
|
dataIndex: "field1",
|
||||||
key: "strRowOne",
|
key: "field1",
|
||||||
width: 300,
|
width: 300,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
let {reportTableDataSum}=this.state;
|
|
||||||
let redFlag=false;
|
|
||||||
for(let k in reportTableDataSum.reportSumFont){
|
|
||||||
if(k==text){
|
|
||||||
redFlag=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(redFlag){
|
|
||||||
return (
|
return (
|
||||||
<div className="fontColor" fieldid="strRowOne"><pre>{!text?<span> </span>:text}</pre></div>
|
<div fieldid="field1" className='tdSecondBox'>
|
||||||
|
{/*会计科目*/}
|
||||||
|
<div style={{"width": "180px"}} title={record.paccname}>{record.paccname}</div>
|
||||||
|
{/*期末余额*/}
|
||||||
|
<div style={{"width": "120px"}} title={record.pendlocamount}>{record.pendlocamount}</div>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}else{
|
|
||||||
return(
|
|
||||||
<div fieldid="strRowOne"><pre>{!text?<span> </span>:text}</pre></div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: (<div fieldid="strRowTwo" className='checkbox-mergecells'>{json['20020RECON-000024']}</div>),/* 国际化处理: 是否通过*/
|
title: (<div fieldid="field2" className='checkbox-mergecells thTitle'>{json['20020RECON-000035']}</div>),/* 国际化处理: 总账辅助余额表*/
|
||||||
dataIndex: "strRowTwo",
|
dataIndex: "field2",
|
||||||
key: "strRowTwo",
|
key: "field2",
|
||||||
width: 80,
|
width: 500,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
let {reportTableDataSum}=this.state;
|
|
||||||
let redFlag=false;
|
|
||||||
for(let k in reportTableDataSum.reportSumFont){
|
|
||||||
if(k==text){
|
|
||||||
redFlag=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(redFlag){
|
|
||||||
return (
|
return (
|
||||||
<div className="fontColor" fieldid="strRowTwo"><pre>{!text?<span> </span>:text}</pre></div>
|
<div fieldid="field2" className='tdSecondBox'>
|
||||||
|
{/*会计科目*/}
|
||||||
|
<div style={{"width": "180px"}} title={record.accname}>{record.accname}</div>
|
||||||
|
{/*辅助核算*/}
|
||||||
|
<div style={{"width": "200px"}} title={record.assname}>{record.assname}</div>
|
||||||
|
{/*期末余额*/}
|
||||||
|
<div style={{"width": "120px"}} title={record.endlocamount}>{record.endlocamount}</div>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}else{
|
|
||||||
return(
|
|
||||||
<div fieldid="strRowTwo"><pre>{!text?<span> </span>:text}</pre></div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
/*{
|
||||||
title: (<div fieldid="strRowThree" className='checkbox-mergecells'>{json['20020RECON-000025']}</div>),/* 国际化处理: 说明*/
|
title: (<div fieldid="field3" className='checkbox-mergecells thTitle'>{json['20020RECON-000036']}</div>),/!* 国际化处理: 总账辅助明细账*!/
|
||||||
dataIndex: "strRowThree",
|
dataIndex: "field3",
|
||||||
key: "strRowThree",
|
key: "field3",
|
||||||
width: 310,
|
width: 680,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
let {reportTableDataSum}=this.state;
|
|
||||||
let redFlag=false;
|
|
||||||
for(let k in reportTableDataSum.reportSumFont){
|
|
||||||
if(k==text){
|
|
||||||
redFlag=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(redFlag){
|
|
||||||
return (
|
return (
|
||||||
<div className="fontColor" fieldid="strRowThree"><pre>{!text?<span> </span>:text}</pre></div>
|
<div fieldid="field3" className='tdSecondBox'>
|
||||||
|
<div style={{"width": "180px"}} title={record.field6}>{record.field6}</div>{/!*会计科目*!/}
|
||||||
|
<div style={{"width": "200px"}} title={record.field7}>{record.field7}</div>{/!*辅助核算*!/}
|
||||||
|
<div style={{"width": "180px"}} title={record.field8}>{record.field8}</div>{/!*凭证号*!/}
|
||||||
|
<div style={{"width": "120px"}} title={record.field9}>{record.field9}</div>{/!*余额*!/}
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}else{
|
|
||||||
return(
|
|
||||||
<div fieldid="strRowThree"><pre>{!text?<span> </span>:text}</pre></div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},*/
|
||||||
|
{
|
||||||
|
title: (<div fieldid="field4" className='checkbox-mergecells thTitle'>{json['20020RECON-000037']}</div>),/* 国际化处理: 差异*/
|
||||||
|
dataIndex: "field4",
|
||||||
|
key: "field4",
|
||||||
|
width: 300,
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return (
|
||||||
|
<div fieldid="field4" className='tdSecondBox'>
|
||||||
|
{/*会计科目*/}
|
||||||
|
<div style={{"width": "180px"}} title={record.paccname}>{record.paccname}</div>
|
||||||
|
{/*金额*/}
|
||||||
|
<div style={{"width": "120px"}} title={record.difference}>{record.difference}</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
this.setState({
|
this.setState({
|
||||||
columns_reportSum: this.columns_reportSum,
|
columns_reportSum: this.columns_reportSum,
|
||||||
|
@ -160,7 +188,9 @@ export default class ReportModal extends Component{
|
||||||
}
|
}
|
||||||
getMultiLang({moduleId: '20020RECON', domainName: 'gl', currentLocale: 'simpchn', callback});
|
getMultiLang({moduleId: '20020RECON', domainName: 'gl', currentLocale: 'simpchn', callback});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProp) {
|
componentWillReceiveProps(nextProp) {
|
||||||
|
console.log(this.state)
|
||||||
let {reportTableDataSum, reportTableData, reportTableTitle} = this.state;
|
let {reportTableDataSum, reportTableData, reportTableTitle} = this.state;
|
||||||
let {reportSum, reportDetail, showOrHide} = nextProp;
|
let {reportSum, reportDetail, showOrHide} = nextProp;
|
||||||
reportTableDataSum = reportSum;
|
reportTableDataSum = reportSum;
|
||||||
|
@ -169,82 +199,43 @@ export default class ReportModal extends Component{
|
||||||
reportTableDataSum, reportTableData
|
reportTableDataSum, reportTableData
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
||||||
}
|
}
|
||||||
//关闭
|
|
||||||
close() {
|
|
||||||
this.props.handleClose();
|
|
||||||
}
|
|
||||||
//返回
|
|
||||||
comeBack=()=>{
|
|
||||||
let {sumOrDetail}=this.state;
|
|
||||||
sumOrDetail='sum';
|
|
||||||
this.setState({
|
|
||||||
sumOrDetail
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//查看详情
|
|
||||||
queryReportDetail=()=>{
|
|
||||||
let {sumOrDetail}=this.state;
|
|
||||||
sumOrDetail='detail';
|
|
||||||
this.setState({
|
|
||||||
sumOrDetail
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//打印
|
|
||||||
confirm=()=>{
|
|
||||||
this.props.handlePrintReport();
|
|
||||||
}
|
|
||||||
//模板输出
|
|
||||||
outPutModule=()=>{
|
|
||||||
this.props.showOutputModal();
|
|
||||||
}
|
|
||||||
render() {
|
render() {
|
||||||
let {sumOrDetail,reportTableTitle,columns_report,columns_reportSum}=this.state;
|
let {columns_reportSum} = this.state;
|
||||||
let{showOrHide,reportSum,reportDetail}=this.props;
|
let {reportDetail} = this.props;
|
||||||
let reportTableDataSum=reportSum;
|
|
||||||
let reportTableData = reportDetail;
|
let reportTableData = reportDetail;
|
||||||
return (
|
return (
|
||||||
<div id='finalTreatment_report'>
|
<div id='reconci_report'>
|
||||||
<div className="tryto">
|
<div className="tryto" style={{"padding-top":"15px"}}>
|
||||||
<ButtonGroup style={{ margin: 10 }}>
|
|
||||||
{sumOrDetail == 'detail' ?
|
{/*<div class='reportTitle'>账账相对</div>*/}
|
||||||
<Button colors="primary" onClick={this.comeBack.bind(this)} fieldid="comeback">{this.state.json['20020RECON-000027']}</Button>/* 国际化处理: 返回*/
|
{<NCDiv fieldid="reportTable_sum" areaCode={NCDiv.config.TableCom}>
|
||||||
: null}
|
|
||||||
{sumOrDetail == 'sum' ?
|
|
||||||
<Button colors="primary" onClick={this.queryReportDetail.bind(this)} className="detail" fieldid="detailea">{this.state.json['20020RECON-000028']}</Button>/* 国际化处理: 查看详情*/
|
|
||||||
: null}
|
|
||||||
{sumOrDetail == 'detail' ?
|
|
||||||
<Button colors="" onClick={this.confirm.bind(this)} fieldid="print">{this.state.json['20020RECON-000029']}</Button>/* 国际化处理: 打印*/
|
|
||||||
: null}
|
|
||||||
{sumOrDetail == 'detail' ?
|
|
||||||
<Button colors="" onClick={this.outPutModule.bind(this)} fieldid="output">{this.state.json['20020RECON-000030']}</Button>/* 国际化处理: 模板输出*/
|
|
||||||
: null}
|
|
||||||
{/* <Button colors="primary" onClick={this.close.bind(this)}>关闭</Button> */}
|
|
||||||
</ButtonGroup>
|
|
||||||
<div class='reportTitle'>{reportTableData.reportDetailTitle} </div>
|
|
||||||
{(sumOrDetail == 'sum') ?
|
|
||||||
<div class='reportSumTitle'>{reportTableDataSum.reportSumTitle} </div>
|
|
||||||
: null}
|
|
||||||
{(sumOrDetail == 'sum') ?
|
|
||||||
<NCDiv fieldid="reportTable_sum" areaCode={NCDiv.config.TableCom}>
|
|
||||||
<Table
|
<Table
|
||||||
columns={columns_reportSum}
|
columns={columns_reportSum}
|
||||||
bordered
|
bordered
|
||||||
data={reportTableDataSum.reportSumData}
|
data={reportTableData.reportDetailData}
|
||||||
scroll={{ x: columns_reportSum.length > 8 ? (100 + (columns_reportSum.length - 8) * 15) + "%" : '100%', y: 320 }}
|
scroll={{
|
||||||
|
x: columns_reportSum.length > 8 ? (100 + (columns_reportSum.length - 8) * 15) + "%" : '100%',
|
||||||
|
y: 320
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</NCDiv> : null}
|
</NCDiv>}
|
||||||
{(sumOrDetail == 'detail') ?
|
{/*{(sumOrDetail == 'detail') ?
|
||||||
<NCDiv fieldid="reportTable_detail" areaCode={NCDiv.config.TableCom}>
|
<NCDiv fieldid="reportTable_detail" areaCode={NCDiv.config.TableCom}>
|
||||||
<Table
|
<Table
|
||||||
columns={columns_report}
|
columns={columns_report}
|
||||||
bordered
|
bordered
|
||||||
data={reportTableData.reportDetailData}
|
data={reportTableData.reportDetailData}
|
||||||
scroll={{ x: columns_report.length > 8 ? (100 + (columns_report.length - 8) * 15) + "%" : '100%', y: 320 }}
|
scroll={{
|
||||||
|
x: columns_report.length > 8 ? (100 + (columns_report.length - 8) * 15) + "%" : '100%',
|
||||||
|
y: 320
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</NCDiv> : null}
|
</NCDiv> : null}*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -32,5 +32,11 @@
|
||||||
"20020RECON-000030": "模板输出",
|
"20020RECON-000030": "模板输出",
|
||||||
"20020RECON-000031": "年",
|
"20020RECON-000031": "年",
|
||||||
"20020RECON-000032": "月",
|
"20020RECON-000032": "月",
|
||||||
"20020RECON-000033": "重建余额表成功"
|
"20020RECON-000033": "重建余额表成功",
|
||||||
|
"20020RECON-000034": "总账余额表",
|
||||||
|
"20020RECON-000035": "总账辅助余额表",
|
||||||
|
"20020RECON-000036": "总账辅助明细表",
|
||||||
|
"20020RECON-000037": "差异",
|
||||||
|
"20020RECON-000038": "请先选择会计科目",
|
||||||
|
"20020RECON-000039": "账账相对报表"
|
||||||
}
|
}
|
Loading…
Reference in New Issue