账账相对报表
This commit is contained in:
		
							parent
							
								
									ab0e28d91f
								
							
						
					
					
						commit
						a1c1c3a44e
					
				|  | @ -1,18 +1,48 @@ | |||
| /*pbHnlLNCpsWdx+f6QNDErXUJ9hVUkCPC2/wKKBoJVMo=*/ | ||||
| import React, {Component} from 'react'; | ||||
| 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, | ||||
|     NCCheckbox:Checkbox,NCNumber,AutoComplete,NCDropdown:Dropdown,NCPanel:Panel,NCForm,NCButtonGroup:ButtonGroup,NCAffix,NCDiv | ||||
| 
 | ||||
| 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, | ||||
| 	NCCheckbox: Checkbox, | ||||
| 	NCNumber, | ||||
| 	AutoComplete, | ||||
| 	NCDropdown: Dropdown, | ||||
| 	NCPanel: Panel, | ||||
| 	NCForm, | ||||
| 	NCButtonGroup: ButtonGroup, | ||||
| 	NCAffix, | ||||
| 	NCDiv | ||||
| } = base; | ||||
| 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 ReportModal from './reportModal/reportModal'; | ||||
| import getDefaultAccountBook from '../../../public/components/getDefaultAccountBook.js'; | ||||
| import {rebuildBalanceItem, rebuildBalanceComfirm} from './rebuildBalancemodal/index'; | ||||
| import {buttonClick, initTemplate} from './events'; | ||||
| import PrintModal from '../../../public/components/printModal'; | ||||
| 
 | ||||
| const {PrintOutput} = high; | ||||
| import {printRequire, mouldOutput} from '../../../public/components/printModal/events'; | ||||
| import HeaderArea from '../../../public/components/HeaderArea'; | ||||
|  | @ -22,11 +52,13 @@ import './index.less'; | |||
| import '../../../public/reachercss/reacher.less'; | ||||
| import UploadTax from './uploadTax' | ||||
| import {cancelBtnClick} from '../../../busirecon/pages/list/events/buttonClick'; | ||||
| import {reconciReport} from './reconciReportModal/index'; | ||||
| import ReconciReport from './reconciReportModal/index'; | ||||
| 
 | ||||
| const config = { | ||||
| 	"isDataPowerEnable": 'Y', | ||||
| 	"DataPowerOperationCode": 'fi' | ||||
| }; | ||||
| 
 | ||||
| class Reckon extends Component { | ||||
| 	constructor(props) { | ||||
| 		super(props); | ||||
|  | @ -45,8 +77,7 @@ class Reckon extends Component{ | |||
| 			accountingbook: {display: '', value: ''}, | ||||
| 			reportDataSum: [],//结账汇总数据
 | ||||
| 			reportData: [],//结账详情数据
 | ||||
|             listItem:{ | ||||
|             },//表头字段
 | ||||
| 			listItem: {},//表头字段
 | ||||
| 			rebuildBalanceItem: {},//重建余额表的查询字段
 | ||||
| 			yearList: [], | ||||
| 			periodList: [], | ||||
|  | @ -64,6 +95,7 @@ class Reckon extends Component{ | |||
| 			selectedData: {},//选中的数据
 | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	beSureBtnClick = () => { | ||||
| 		this.UploadTax.confirm(); | ||||
| 	} | ||||
|  | @ -136,6 +168,7 @@ class Reckon extends Component{ | |||
| 			} | ||||
| 		}); | ||||
| 	} | ||||
| 
 | ||||
| 	//处理width
 | ||||
| 	changeWidth(arr) { | ||||
| 		arr.map((item, index) => { | ||||
|  | @ -153,9 +186,28 @@ class Reckon extends Component{ | |||
| 		let {listItem, reckonintData} = self.state; | ||||
| 		let appcode = self.props.getSearchParam("c"); | ||||
| 		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-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
 | ||||
| 			// 	itemChild: []
 | ||||
| 			// },
 | ||||
| 
 | ||||
| 		] | ||||
| 		return listItem.reckedMonth ? ( | ||||
| 				headData.map((item, i) => { | ||||
|  | @ -165,7 +217,9 @@ class Reckon extends Component{ | |||
| 							let referUrl = item.config.refCode + '/index.js'; | ||||
| 							let defaultValue = {refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value}; | ||||
| 							if (!self.state[item.itemKey]) { | ||||
|                               {createScript.call(self,referUrl,item.itemKey)} | ||||
| 								{ | ||||
| 									createScript.call(self, referUrl, item.itemKey) | ||||
| 								} | ||||
| 								return <div/> | ||||
| 							} else { | ||||
| 								if (item.itemKey == 'pk_accountingbook') { | ||||
|  | @ -193,6 +247,7 @@ class Reckon extends Component{ | |||
| 														}, config) | ||||
| 													}, | ||||
| 													onChange: (v) => { | ||||
| 														console.log(v) | ||||
| 														let {accountingbook} = self.state; | ||||
| 
 | ||||
| 														if (item.itemKey == 'pk_accountingbook') { | ||||
|  | @ -215,6 +270,52 @@ class Reckon extends Component{ | |||
| 												} | ||||
| 											) : <div/>} | ||||
| 										</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; | ||||
|  | @ -272,12 +373,73 @@ class Reckon extends Component{ | |||
|                                 className="changesmmd" | ||||
|                             /> */} | ||||
| 									{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> | ||||
| 									} | ||||
| 								</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: | ||||
| 							break; | ||||
| 					} | ||||
|  | @ -289,7 +451,15 @@ class Reckon extends Component{ | |||
| 	//结账检查报告
 | ||||
| 	handleEndAccountReport = () => { | ||||
| 		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) { | ||||
| 			toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/ | ||||
| 			return false; | ||||
|  | @ -326,7 +496,17 @@ class Reckon extends Component{ | |||
| 		// this.refs.getSwordButton.print();
 | ||||
| 		// return false;
 | ||||
| 		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) { | ||||
| 			toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/ | ||||
| 			return false; | ||||
|  | @ -448,13 +628,35 @@ class Reckon extends Component{ | |||
| 	//对账todo
 | ||||
| 	handleReconciliate = () => { | ||||
| 		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) { | ||||
| 			toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/ | ||||
| 			return false; | ||||
| 		} | ||||
|         let url ='/nccloud/gl/reckoning/reckoningreport.do'; | ||||
|         let pk_accpont = {"pk_accountingbook":accountingbook.value}; | ||||
| 		if (pk_accountingbook.value == "" || pk_accountingbook.value == undefined) { | ||||
| 			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({ | ||||
| 			url: url, | ||||
| 			data: pk_accpont, | ||||
|  | @ -463,16 +665,30 @@ class Reckon extends Component{ | |||
| 				//渲染已有账表数据遮罩
 | ||||
| 				if (success) { | ||||
| 					if (response.data) { | ||||
|                         reportDataSum=data.reportSumMesg; | ||||
|                         reportSumTitle=data.sumDisMesg; | ||||
|                         reportSumFont=data.sumFont; | ||||
|                         reportData=data.reportMesg; | ||||
|                         reportTitle=data.disMesg; | ||||
|                         reportFont=data.font; | ||||
|                         self.setState({ | ||||
|                             reportDataSum,reportSumTitle,reportSumFont,reportData,reportTitle,reportFont, | ||||
|                             ShowHideFlag:true, | ||||
|                         },()=>{ | ||||
| 						data.forEach((item, i) => { | ||||
| 							if (i != 0) { | ||||
| 								if (data[i - 1].pacccode == item.pacccode) { | ||||
| 									item.paccname = '' | ||||
| 								} | ||||
| 								if (data[i - 1].acccode == item.acccode) { | ||||
| 									item.accname = '' | ||||
| 								} | ||||
| 							} | ||||
| 						}) | ||||
| 						reportData = data | ||||
| 						reportData.unshift({ | ||||
| 							pacccode: "会计科目编码", //总账余额表-会计科目编码
 | ||||
| 							paccname: "会计科目", //总账余额表-会计科目名称
 | ||||
| 							pendlocamount: "期末余额", //总账余额表-期末余额
 | ||||
| 							//===============
 | ||||
| 							acccode: "会计科目编码", //总账辅助余额表-会计科目编码
 | ||||
| 							accname: "会计科目", //总账辅助余额表-会计科目名称
 | ||||
| 							assname: "辅助核算", //总账辅助余额表-辅助核算
 | ||||
| 							endlocamount: "期末余额", //总账辅助余额表-期末余额
 | ||||
| 							//===============
 | ||||
| 							difference: "金额", //差异-金额
 | ||||
| 						}) | ||||
| 						self.setState({reportData, ShowHideFlag: true}, () => { | ||||
| 							self.props.modal.show('reportReconciModal'); | ||||
| 						}) | ||||
| 					} | ||||
|  | @ -480,12 +696,14 @@ class Reckon extends Component{ | |||
| 			} | ||||
| 		}); | ||||
| 	} | ||||
| 
 | ||||
| 	//打印
 | ||||
| 	handlePrintReport() { | ||||
| 		this.setState({ | ||||
| 			showPrintModal: true | ||||
| 		}) | ||||
| 	} | ||||
| 
 | ||||
| 	handlePrint(data) { | ||||
| 		let printUrl = '/nccloud/gl/accountrep/reckoningreportprint.do' | ||||
| 		let {queryDataObj, appcode, sumOrDetail, listItem} = this.state | ||||
|  | @ -504,6 +722,7 @@ class Reckon extends Component{ | |||
| 			showPrintModal: false | ||||
| 		}); | ||||
| 	} | ||||
| 
 | ||||
| 	//模板输出
 | ||||
| 	showOutputModal() { | ||||
| 		let outputUrl = '/nccloud/gl/accountrep/reckoningreportoutput.do' | ||||
|  | @ -513,8 +732,10 @@ class Reckon extends Component{ | |||
| 		queryDataObj.month = listItem['reckedMonth'].value.split('/')[1]; | ||||
| 		mouldOutput(outputUrl, appcode, nodekey, ctemplate, queryDataObj) | ||||
| 	} | ||||
| 
 | ||||
| 	handleOutput() { | ||||
| 	} | ||||
| 
 | ||||
| 	//关闭
 | ||||
| 	handleClose = () => { | ||||
| 		this.setState({ | ||||
|  | @ -597,6 +818,8 @@ class Reckon extends Component{ | |||
| 				const {data, success} = response; | ||||
| 				//渲染已有账表数据遮罩
 | ||||
| 				if (success) { | ||||
| 					let periodData = {} | ||||
| 					console.log(response.data) | ||||
| 					if (response.data) { | ||||
| 						reckonintData = data.reckedYear; | ||||
| 						self.showSimpletableData(reckonintData); | ||||
|  | @ -604,9 +827,12 @@ class Reckon extends Component{ | |||
| 							item.key = index; | ||||
| 						}) | ||||
| 						listItem['reckedMonth'].value = data.reckedMonth; | ||||
| 
 | ||||
| 						periodData.presentYear = data.presentYear | ||||
| 						periodData.presentMonth = data.presentMonth | ||||
| 					} | ||||
| 					self.setState({ | ||||
|                         reckonintData | ||||
| 						reckonintData, periodData | ||||
| 					}) | ||||
| 				} | ||||
| 			} | ||||
|  | @ -621,6 +847,7 @@ class Reckon extends Component{ | |||
| 			this.props.table.setAllTableData(this.tableId, {rows: []}); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	componentDidMount() { | ||||
| 		let self = this; | ||||
| 		let url = '/nccloud/gl/pfxx/taxcloudconfig.do'; | ||||
|  | @ -635,6 +862,7 @@ class Reckon extends Component{ | |||
| 			} | ||||
| 		}); | ||||
| 	} | ||||
| 
 | ||||
| 	componentWillMount() { | ||||
| 		let {listItem, rebuildBalanceItem, accountingbook} = this.state; | ||||
| 		let appcode = this.props.getSearchParam("c"); | ||||
|  | @ -646,9 +874,28 @@ class Reckon extends Component{ | |||
| 				this.getYearList(defaultAccouontBook.value); | ||||
| 			} | ||||
| 			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-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
 | ||||
| 				// 	itemChild: []
 | ||||
| 				// },
 | ||||
| 			] | ||||
| 			const loadQuery = [ | ||||
| 				{ | ||||
|  | @ -665,9 +912,10 @@ class Reckon extends Component{ | |||
| 					config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"}, | ||||
| 					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',
 | ||||
| 				// 	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) => { | ||||
| 						let name = k; | ||||
| 						listItem[name] = key | ||||
|  | @ -782,11 +1030,20 @@ class Reckon extends Component{ | |||
| 		} | ||||
| 		getMultiLang({moduleId: ['20020RECON', 'uptoload'], domainName: 'gl', currentLocale: 'simpchn', callback}); | ||||
| 	} | ||||
| 
 | ||||
| 	selectedChange = (props, newVal, oldVal) => {//选中行发生变化
 | ||||
| 
 | ||||
| 	} | ||||
| 	showReporModal = () => { | ||||
|         let{ShowHideFlag,reportDataSum,reportSumTitle,reportSumFont,reportData,reportTitle,reportFont}=this.state; | ||||
| 		let { | ||||
| 			ShowHideFlag, | ||||
| 			reportDataSum, | ||||
| 			reportSumTitle, | ||||
| 			reportSumFont, | ||||
| 			reportData, | ||||
| 			reportTitle, | ||||
| 			reportFont | ||||
| 		} = this.state; | ||||
| 		let reportSum = { | ||||
| 			reportSumData: reportDataSum, | ||||
| 			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) => { | ||||
| 		this.UploadTax = ref; | ||||
| 	} | ||||
| 
 | ||||
| 	render() { | ||||
| 		let {taxcloudurl, pk_periodscheme, up_pk_accountingbook, pk_display, period} = this.state | ||||
| 
 | ||||
|         let{accountingbook,columnsVerify,reckonintData,listItem,ShowHideFlag,isQueryShow, | ||||
|             reportDataSum,reportSumTitle,reportSumFont,reportData,reportTitle,reportFont}=this.state; | ||||
| 		let { | ||||
| 			accountingbook, columnsVerify, reckonintData, listItem, ShowHideFlag, isQueryShow, | ||||
| 			reportDataSum, reportSumTitle, reportSumFont, reportData, reportTitle, reportFont | ||||
| 		} = this.state; | ||||
| 		let {modal} = this.props; | ||||
| 		let {createModal} = modal; | ||||
| 		if (columnsVerify.length == 0) { | ||||
|  | @ -850,9 +1144,10 @@ class Reckon extends Component{ | |||
| 				config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"}, | ||||
| 				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 ( | ||||
| 			<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"> | ||||
| 							<NCForm useRow={true} | ||||
| 							        submitAreaClassName='classArea' | ||||
|                                   showSubmit={false} > | ||||
| 							        showSubmit={false}> | ||||
| 								{this.getHeadData()} | ||||
| 							</NCForm> | ||||
| 						</div> | ||||
|  | @ -948,8 +1243,8 @@ class Reckon extends Component{ | |||
| 				</div> | ||||
| 				<div> | ||||
| 					{ShowHideFlag && createModal('reportReconciModal', { | ||||
|                        title:this.state.json['20020RECON-000034'],/* 国际化处理: 对账*/ | ||||
|                        content:(<div>11111111</div>), | ||||
| 						title: this.state.json['20020RECON-000039'],/* 国际化处理: 对账*/ | ||||
| 						content: this.showReconciModal(), | ||||
| 						userControl: true,  // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
 | ||||
| 						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({ | ||||
| 	// initTemplate:initTemplate
 | ||||
| })(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{ | ||||
|     border:none !important; | ||||
|  | @ -95,6 +179,7 @@ | |||
|             } | ||||
|             span:nth-of-type(2){ | ||||
|                 .u-col-md-2.u-col-sm-2.u-col-xs-2:nth-of-type(1){ | ||||
|                     width: 0 !important; | ||||
|                     //width: 110px !important; | ||||
|                 } | ||||
|             } | ||||
|  | @ -147,7 +232,7 @@ | |||
|                     width: 240px; | ||||
|                 } | ||||
|             } | ||||
|             .changesm:nth-of-type(2){ | ||||
|             .changesm:nth-of-type(3){ | ||||
|                 div:nth-of-type(1){ | ||||
|                     width: auto !important; | ||||
|                 } | ||||
|  | @ -160,7 +245,7 @@ | |||
|                 // left: 113px; | ||||
|                 // width: 82px; | ||||
|             } | ||||
|             span:nth-of-type(2){ | ||||
|             span:nth-of-type(3){ | ||||
|                 .u-form-item.u-form-inline{ | ||||
|                     // position: absolute; | ||||
|                     // left: 118px; | ||||
|  |  | |||
|  | @ -1,18 +1,40 @@ | |||
| /*qZ5a1x5ign4IdlZuRO5Ax6TjC2a3u5fVc0DIn53oa4I=*/ | ||||
| import React, {Component} from 'react'; | ||||
| 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, | ||||
| 	NCCheckbox:Checkbox,NCNumber,AutoComplete,NCDropdown:Dropdown,NCPanel:Panel,NCModal:Modal,NCForm,NCButtonGroup:ButtonGroup,NCDiv | ||||
| 
 | ||||
| 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, | ||||
| 	NCCheckbox: Checkbox, | ||||
| 	NCNumber, | ||||
| 	AutoComplete, | ||||
| 	NCDropdown: Dropdown, | ||||
| 	NCPanel: Panel, | ||||
| 	NCModal: Modal, | ||||
| 	NCForm, | ||||
| 	NCButtonGroup: ButtonGroup, | ||||
| 	NCDiv | ||||
| } = base; | ||||
| const {NCFormItem: FormItem} = NCForm; | ||||
| import '../index.less'; | ||||
| 
 | ||||
| export default class ReportModal extends Component { | ||||
| 	constructor(props) { | ||||
| 		super(props) | ||||
| 		this.columns_report = [ | ||||
| 			{ | ||||
| 				title: "", | ||||
| 				title: (<div>5235235</div>), | ||||
| 				dataIndex: "strRowOne", | ||||
| 				key: "strRowOne", | ||||
| 				width: 300, | ||||
|  | @ -26,11 +48,17 @@ export default class ReportModal extends Component{ | |||
| 					} | ||||
| 					if (redFlag) { | ||||
| 						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 { | ||||
| 						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) { | ||||
| 						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 { | ||||
| 						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数据
 | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	componentWillMount() { | ||||
| 		let callback = (json) => { | ||||
| 			// console.log(json)
 | ||||
| 			this.columns_reportSum = [ | ||||
| 				{ | ||||
| 					title: (<div fieldid="strRowOne" className='checkbox-mergecells'>{json['20020RECON-000023']}</div>),/* 国际化处理: 检查项*/ | ||||
| 					dataIndex: "strRowOne", | ||||
| 					key: "strRowOne", | ||||
| 					title: (<div fieldid="field1" className='checkbox-mergecells thTitle'>{json['20020RECON-000034']}</div>),/* 国际化处理: 总账余额表*/ | ||||
| 					dataIndex: "field1", | ||||
| 					key: "field1", | ||||
| 					width: 300, | ||||
| 					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 ( | ||||
| 								<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>),/* 国际化处理: 是否通过*/ | ||||
| 					dataIndex: "strRowTwo", | ||||
| 					key: "strRowTwo", | ||||
| 					width: 80, | ||||
| 					title: (<div fieldid="field2" className='checkbox-mergecells thTitle'>{json['20020RECON-000035']}</div>),/* 国际化处理: 总账辅助余额表*/ | ||||
| 					dataIndex: "field2", | ||||
| 					key: "field2", | ||||
| 					width: 500, | ||||
| 					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 ( | ||||
| 								<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>),/* 国际化处理: 说明*/ | ||||
| 					dataIndex: "strRowThree", | ||||
| 					key: "strRowThree", | ||||
| 					width: 310, | ||||
| 				/*{ | ||||
| 					title: (<div fieldid="field3" className='checkbox-mergecells thTitle'>{json['20020RECON-000036']}</div>),/!* 国际化处理: 总账辅助明细账*!/ | ||||
| 					dataIndex: "field3", | ||||
| 					key: "field3", | ||||
| 					width: 680, | ||||
| 					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 ( | ||||
| 								<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({ | ||||
| 				columns_reportSum: this.columns_reportSum, | ||||
|  | @ -160,7 +188,9 @@ export default class ReportModal extends Component{ | |||
| 		} | ||||
| 		getMultiLang({moduleId: '20020RECON', domainName: 'gl', currentLocale: 'simpchn', callback}); | ||||
| 	} | ||||
| 
 | ||||
| 	componentWillReceiveProps(nextProp) { | ||||
| 		console.log(this.state) | ||||
| 		let {reportTableDataSum, reportTableData, reportTableTitle} = this.state; | ||||
| 		let {reportSum, reportDetail, showOrHide} = nextProp; | ||||
| 		reportTableDataSum = reportSum; | ||||
|  | @ -169,82 +199,43 @@ export default class ReportModal extends Component{ | |||
| 			reportTableDataSum, reportTableData | ||||
| 		}) | ||||
| 	} | ||||
| 
 | ||||
| 	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() { | ||||
| 		let {sumOrDetail,reportTableTitle,columns_report,columns_reportSum}=this.state; | ||||
| 		let{showOrHide,reportSum,reportDetail}=this.props; | ||||
| 		let reportTableDataSum=reportSum; | ||||
| 		let {columns_reportSum} = this.state; | ||||
| 		let {reportDetail} = this.props; | ||||
| 		let reportTableData = reportDetail; | ||||
| 		return ( | ||||
| 			<div id='finalTreatment_report'> | ||||
| 				<div className="tryto"> | ||||
| 					<ButtonGroup style={{ margin: 10 }}> | ||||
| 						{sumOrDetail == 'detail' ? | ||||
| 							<Button colors="primary" onClick={this.comeBack.bind(this)} fieldid="comeback">{this.state.json['20020RECON-000027']}</Button>/* 国际化处理: 返回*/ | ||||
| 							: 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}> | ||||
| 			<div id='reconci_report'> | ||||
| 				<div className="tryto" style={{"padding-top":"15px"}}> | ||||
| 
 | ||||
| 					{/*<div class='reportTitle'>账账相对</div>*/} | ||||
| 					{<NCDiv fieldid="reportTable_sum" areaCode={NCDiv.config.TableCom}> | ||||
| 						<Table | ||||
| 							columns={columns_reportSum} | ||||
| 							bordered | ||||
| 								data={reportTableDataSum.reportSumData} | ||||
| 								scroll={{ x: columns_reportSum.length > 8 ? (100 + (columns_reportSum.length - 8) * 15) + "%" : '100%', y: 320 }} | ||||
| 							data={reportTableData.reportDetailData} | ||||
| 							scroll={{ | ||||
| 								x: columns_reportSum.length > 8 ? (100 + (columns_reportSum.length - 8) * 15) + "%" : '100%', | ||||
| 								y: 320 | ||||
| 							}} | ||||
| 						/> | ||||
| 						</NCDiv> : null} | ||||
| 					{(sumOrDetail == 'detail') ? | ||||
| 					</NCDiv>} | ||||
| 					{/*{(sumOrDetail == 'detail') ? | ||||
| 						<NCDiv fieldid="reportTable_detail" areaCode={NCDiv.config.TableCom}> | ||||
| 							<Table | ||||
| 								columns={columns_report} | ||||
| 								bordered | ||||
| 								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> | ||||
| 		) | ||||
|  |  | |||
|  | @ -32,5 +32,11 @@ | |||
|     "20020RECON-000030": "模板输出", | ||||
|     "20020RECON-000031": "年", | ||||
|     "20020RECON-000032": "月", | ||||
|     "20020RECON-000033": "重建余额表成功" | ||||
|     "20020RECON-000033": "重建余额表成功", | ||||
|     "20020RECON-000034": "总账余额表", | ||||
|     "20020RECON-000035": "总账辅助余额表", | ||||
|     "20020RECON-000036": "总账辅助明细表", | ||||
|     "20020RECON-000037": "差异", | ||||
|     "20020RECON-000038": "请先选择会计科目", | ||||
|     "20020RECON-000039": "账账相对报表" | ||||
| } | ||||
		Loading…
	
		Reference in New Issue