From a1c1c3a44e0c4746f4b9b70c42207530522cc44b Mon Sep 17 00:00:00 2001
From: xyz <747050115@qq.com>
Date: Fri, 3 Jan 2025 17:40:29 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B4=A6=E8=B4=A6=E7=9B=B8=E5=AF=B9=E6=8A=A5?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/gl/finalTreatment/reckoning/list/index.js | 2145 ++++++++++-------
.../finalTreatment/reckoning/list/index.less | 101 +-
.../list/reconciReportModal/index.js | 363 ++-
.../lang/standard/simpchn/20020RECON.json | 10 +-
4 files changed, 1502 insertions(+), 1117 deletions(-)
diff --git a/src/gl/finalTreatment/reckoning/list/index.js b/src/gl/finalTreatment/reckoning/list/index.js
index da9259a..6070d5d 100644
--- a/src/gl/finalTreatment/reckoning/list/index.js
+++ b/src/gl/finalTreatment/reckoning/list/index.js
@@ -1,269 +1,370 @@
/*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
+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
} = base;
-const { NCFormItem:FormItem } = NCForm;
-import { CheckboxItem,RadioItem,TextAreaItem,ReferItem,SelectItem,InputItem,DateTimePickerItem} from '../../../public/components/FormItems';
+const {NCFormItem: FormItem} = NCForm;
+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 {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';
+
+const {PrintOutput} = high;
+import {printRequire, mouldOutput} from '../../../public/components/printModal/events';
import HeaderArea from '../../../public/components/HeaderArea';
-import { getTableHeight } from '../../../public/common/method.js';
+import {getTableHeight} from '../../../public/common/method.js';
import {changeToSimpletableDatas} from '../../../public/common/changeToSimpletableDatas.js';
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';
-const config={
- "isDataPowerEnable":'Y',
- "DataPowerOperationCode":'fi'
+import {cancelBtnClick} from '../../../busirecon/pages/list/events/buttonClick';
+import ReconciReport from './reconciReportModal/index';
+
+const config = {
+ "isDataPowerEnable": 'Y',
+ "DataPowerOperationCode": 'fi'
};
-class Reckon extends Component{
- constructor(props){
- super(props);
- this.tableId = 'reckoning';
- this.state={
- pk_periodscheme:"",//上传税务云参数
- up_pk_accountingbook:{},//上传税务云pk
- pk_display:"",//上传税务云账簿名字
- json:{},
- period:'',//上传税务云期间
- taxcloudurl:'',//上传税务云地址
- isQueryShow:false,//上传税务云弹框
- appcode:this.props.getUrlParam('c') || this.props.getSearchParam('c'),
- ShowHideFlag:false,//查询条件对话框
- pk_accasoaDisabled:false,//控制科目是否可以编辑
- accountingbook:{display:'',value:''},
- reportDataSum:[],//结账汇总数据
- reportData:[],//结账详情数据
- listItem:{
- },//表头字段
- rebuildBalanceItem:{},//重建余额表的查询字段
- yearList:[],
- periodList:[],
- reportSumTitle:'',//汇总报告title
- reportSumFont:{},//汇总报告字体
- reportTitle:'',//报告title
- reportFont:{},
- refersh:false,//刷新
- columnsVerify:[],
- reckonintData:[],
- verBalanceVOData:{},
- queryDataObj:{},//保存查询条件
- resourceData_sum:[],//查询出来的历史数据
- resourceColumns_sum:[],//查询出来的历史数据列字段
- selectedData:{},//选中的数据
- }
- }
- beSureBtnClick=()=>{
- this.UploadTax.confirm();
- }
- cancelBtnClick=()=>{
- this.UploadTax.close();
- }
- handleCloseTax = () =>{
- this.setState({
- isQueryShow: false
- });
- this.props.modal.close('UploadTaxModal');
- }
- //根据账簿请求会计年 月
- getYearList = (pk_accountingbook) => {
- let self = this;
- let {rebuildBalanceItem,yearList}=self.state;
- let url = '/nccloud/gl/voucher/yearcombo.do';
- let data = {
- "pk_accountingbook":pk_accountingbook
- };
- ajax({
- url,
- data,
- success: function (res) {
+class Reckon extends Component {
+ constructor(props) {
+ super(props);
+ this.tableId = 'reckoning';
+ this.state = {
+ pk_periodscheme: "",//上传税务云参数
+ up_pk_accountingbook: {},//上传税务云pk
+ pk_display: "",//上传税务云账簿名字
+ json: {},
+ period: '',//上传税务云期间
+ taxcloudurl: '',//上传税务云地址
+ isQueryShow: false,//上传税务云弹框
+ appcode: this.props.getUrlParam('c') || this.props.getSearchParam('c'),
+ ShowHideFlag: false,//查询条件对话框
+ pk_accasoaDisabled: false,//控制科目是否可以编辑
+ accountingbook: {display: '', value: ''},
+ reportDataSum: [],//结账汇总数据
+ reportData: [],//结账详情数据
+ listItem: {},//表头字段
+ rebuildBalanceItem: {},//重建余额表的查询字段
+ yearList: [],
+ periodList: [],
+ reportSumTitle: '',//汇总报告title
+ reportSumFont: {},//汇总报告字体
+ reportTitle: '',//报告title
+ reportFont: {},
+ refersh: false,//刷新
+ columnsVerify: [],
+ reckonintData: [],
+ verBalanceVOData: {},
+ queryDataObj: {},//保存查询条件
+ resourceData_sum: [],//查询出来的历史数据
+ resourceColumns_sum: [],//查询出来的历史数据列字段
+ selectedData: {},//选中的数据
+ }
+ }
- const { data, error, success } = res;
- if(success){
- self.setState({
- yearList: data,
- })
+ beSureBtnClick = () => {
+ this.UploadTax.confirm();
+ }
+ cancelBtnClick = () => {
+ this.UploadTax.close();
+ }
+ handleCloseTax = () => {
+ this.setState({
+ isQueryShow: false
+ });
+ this.props.modal.close('UploadTaxModal');
+ }
- }else {
- toast({ content: error.message, color: 'warning' });
- }
- },
- error: function (res) {
- toast({ content: res.message, color: 'warning' });
+ //根据账簿请求会计年 月
+ getYearList = (pk_accountingbook) => {
+ let self = this;
+ let {rebuildBalanceItem, yearList} = self.state;
+ let url = '/nccloud/gl/voucher/yearcombo.do';
+ let data = {
+ "pk_accountingbook": pk_accountingbook
+ };
+ ajax({
+ url,
+ data,
+ success: function (res) {
- }
- });
- }
- //根据账簿请求会计年 月
- getPeriodList = (pk_accountingbook,year) => {
- let self = this;
- let url = '/nccloud/gl/voucher/periodcombo.do';
- let data = {
- "pk_accountingbook":pk_accountingbook,
- "year":year,
- };
+ const {data, error, success} = res;
+ if (success) {
+ self.setState({
+ yearList: data,
+ })
- ajax({
- url,
- data,
- success: function (res) {
+ } else {
+ toast({content: error.message, color: 'warning'});
+ }
+ },
+ error: function (res) {
+ toast({content: res.message, color: 'warning'});
- const { data, error, success } = res;
- if(success){
- self.setState({
- periodList: data,
- })
+ }
+ });
+ }
+ //根据账簿请求会计年 月
+ getPeriodList = (pk_accountingbook, year) => {
+ let self = this;
+ let url = '/nccloud/gl/voucher/periodcombo.do';
+ let data = {
+ "pk_accountingbook": pk_accountingbook,
+ "year": year,
+ };
- }else {
- toast({ content: error.message, color: 'warning' });
- }
- },
- error: function (res) {
- toast({ content: res.message, color: 'warning' });
+ ajax({
+ url,
+ data,
+ success: function (res) {
- }
- });
- }
- //处理width
- changeWidth(arr){
- arr.map((item,index)=>{
- if(item.children){
- this.changeWidth(item.children);
- }else{
- item['width']=150;
- }
- })
- return arr;
- }
+ const {data, error, success} = res;
+ if (success) {
+ self.setState({
+ periodList: data,
+ })
- getHeadData=()=>{
- let self=this;
- 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-000001'],itemType:'textInput',itemKey:'reckedMonth'},/* 国际化处理: 待结账月份:*/
- ]
- return listItem.reckedMonth?(
- headData.map((item,i)=>{
- let defValue=listItem[item.itemKey].value;
- switch (item.itemType) {
- case 'refer':
- 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)}
- return
- }else{
- if(item.itemKey=='pk_accountingbook'){
- return (
-
- {self.state[item.itemKey]?(self.state[item.itemKey])(
- {
- fieldid:item.itemKey,
- value:defaultValue,
- isMultiSelectedEnabled:false,
- disabledDataShow:true,
- queryCondition:() => {
- return Object.assign({
- "TreeRefActionExt":'nccloud.web.gl.ref.AccountBookRefSqlBuilder',
- "appcode":appcode
- },config)
- },
- onChange:(v)=>{
- let {accountingbook}=self.state;
+ } else {
+ toast({content: error.message, color: 'warning'});
+ }
+ },
+ error: function (res) {
+ toast({content: res.message, color: 'warning'});
- if(item.itemKey=='pk_accountingbook'){
- if(v.refpk){
- self.getReckoningData(v.refpk);
- }else{
- reckonintData=[];
- self.props.table.setAllTableData(self.tableId, { rows: []});
- }
+ }
+ });
+ }
- accountingbook.value=v.refpk;
- accountingbook.display=v.refname;
- listItem[item.itemKey].value = v.refpk;
- listItem[item.itemKey].display = v.refname;
- this.setState({
- listItem,accountingbook,reckonintData
- })
- }
- }
- }
- ):}
- );
- }
- }
- break;
- case 'select':
- return(
-
- {
- return (item.itemChild)
- }
- }
- onChange={(v)=>{
- listItem[item.itemKey].value = v
- this.setState({
- listItem
- })
- }}
- />
-
- )
- case 'textInput':
- return(
-
- {/* {
+ if (item.children) {
+ this.changeWidth(item.children);
+ } else {
+ item['width'] = 150;
+ }
+ })
+ return arr;
+ }
+
+ getHeadData = () => {
+ let self = this;
+ 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-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) => {
+ let defValue = listItem[item.itemKey].value;
+ switch (item.itemType) {
+ case 'refer':
+ 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)
+ }
+ return
+ } else {
+ if (item.itemKey == 'pk_accountingbook') {
+ return (
+
+ {self.state[item.itemKey] ? (self.state[item.itemKey])(
+ {
+ fieldid: item.itemKey,
+ value: defaultValue,
+ isMultiSelectedEnabled: false,
+ disabledDataShow: true,
+ queryCondition: () => {
+ return Object.assign({
+ "TreeRefActionExt": 'nccloud.web.gl.ref.AccountBookRefSqlBuilder',
+ "appcode": appcode
+ }, config)
+ },
+ onChange: (v) => {
+ console.log(v)
+ let {accountingbook} = self.state;
+
+ if (item.itemKey == 'pk_accountingbook') {
+ if (v.refpk) {
+ self.getReckoningData(v.refpk);
+ } else {
+ reckonintData = [];
+ self.props.table.setAllTableData(self.tableId, {rows: []});
+ }
+
+ accountingbook.value = v.refpk;
+ accountingbook.display = v.refname;
+ listItem[item.itemKey].value = v.refpk;
+ listItem[item.itemKey].display = v.refname;
+ this.setState({
+ listItem, accountingbook, reckonintData
+ })
+ }
+ }
+ }
+ ) : }
+ );
+ } else if (item.itemKey == 'pk_accasoa') { //会计科目
+ return (
+
+ {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
+ })
+ }
+ }
+ }
+ ) : }
+ );
+ }
+ }
+ break;
+ case 'select':
+ return (
+
+ {
+ return (item.itemChild)
+ }
+ }
+ onChange={(v) => {
+ listItem[item.itemKey].value = v
+ this.setState({
+ listItem
+ })
+ }}
+ />
+
+ )
+ case 'textInput':
+ return (
+
+ {/* */}
- {/* */}
- {listItem['pk_accountingbook'].value?
- {defValue.split("/")[0]}{this.state.json['20020RECON-000031']}{defValue.split("/")[1]}{this.state.json['20020RECON-000032']}
- :
-
- }
-
- )
- default:
- break;
- }
- })
+ {listItem['pk_accountingbook'].value ?
+ {defValue.split("/")[0]}{this.state.json['20020RECON-000031']}{defValue.split("/")[1]}{this.state.json['20020RECON-000032']}
+ :
+
+ }
+
+ )
+ case 'Dbselect':
+ return (
+
+
+
+ }
+ >
+
+
+ )
+ default:
+ break;
+ }
+ })
- })
- }
- GetRequest=(urlstr)=> {
- var url = decodeURIComponent(urlstr)//(window.parent.location.href); //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(url.indexOf("?")+1);
- var strs = str.split("&");
- for(var i = 0; i < strs.length; i ++) {
- theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- //字段格式转换
- keyValueChange=(defaultAccouontBook,data,listItem)=>{
- data.forEach((item,i)=>{
- let key;
- if(item.itemType=='refer'){
- if(item.itemKey=='pk_accountingbook'){
- key=[{
- display:defaultAccouontBook.display,
- value:defaultAccouontBook.value
- }]
- }else if(item.itemKey=='pk_accasoa'){
- key=[{
- display:'',
- value:''
- }]
- }else{
- key={
- display:'',
- value:''
- }
- }
- }else if(item.itemType=='select'||item.itemType=='Dbselect'||item.itemType=='radio'){//下拉框赋初始值
- key={
- value:''
- }
- }else{
- key={
- value:''
- }
- if(item.itemType=='date'||item.itemType=='Dbdate'){
- key={
- value:''
- }
- }
- }
- if(item.itemType=='Dbdate'||item.itemType=='DbtextInput'||item.itemType=='Dbselect'){
- item.itemKey.map((k,index)=>{
- let name= k;
- listItem[name]=key
- });
- }else{
- let name= item.itemKey;
- listItem[name]=key
- }
- })
- this.setState({
- listItem
- })
- }
- //切换账簿请求数据和结账月份
- getReckoningData=(pk_accountingbook)=>{
- let self=this;
- let {reckonintData,listItem}=this.state;
- let url ='/nccloud/gl/reckoning/refreshperiod.do';
- let pk_accpont = {"pk_accountingbook":pk_accountingbook}
- //let pk_accpont = {"pk_accountingbook": "1001A3100000000008MT"}
- ajax({
- url:url,
- data:pk_accpont,
- success: function(response){
- const { data,success } = response;
- //渲染已有账表数据遮罩
- if (success) {
- if(response.data){
- reckonintData=data.reckedYear;
- self.showSimpletableData(reckonintData);
- reckonintData.map((item,index)=>{
- item.key=index;
- })
- listItem['reckedMonth'].value=data.reckedMonth;
- }
- self.setState({
- reckonintData
- })
- }
- }
- });
- }
- //渲染simpletable数据
- showSimpletableData=(reckonintData)=>{
- let simpleTableData=changeToSimpletableDatas(reckonintData)||[];
- if(simpleTableData){
- this.props.table.setAllTableData(this.tableId, {rows:simpleTableData});
- }else{
- this.props.table.setAllTableData(this.tableId, { rows: []});
- }
- }
- componentDidMount(){
- let self=this;
- let url = '/nccloud/gl/pfxx/taxcloudconfig.do';
- ajax({
- url:url,
- success: function(response){
- self.props.button.setButtonDisabled(['uploadtaxcloud'], false);
- },
- error : function(response){
- self.props.button.setButtonDisabled(['uploadtaxcloud'], false);
+ )
+ : ()
+ }
+ //结账检查报告
+ handleEndAccountReport = () => {
+ let self = this;
+ 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;
+ }
+ let url = '/nccloud/gl/reckoning/reckoningreport.do';
+ let pk_accpont = {"pk_accountingbook": accountingbook.value};
+ ajax({
+ url: url,
+ data: pk_accpont,
+ success: function (response) {
+ const {data, success} = response;
+ //渲染已有账表数据遮罩
+ 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,
+ }, () => {
+ self.props.modal.show('reprotModal');
+ })
+ }
+ }
+ }
+ });
+ }
+ //结账
+ handleEndAccount = () => {
+ // this.refs.getSwordButton.print();
+ // return false;
+ let self = this;
+ 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;
+ }
+ let url = '/nccloud/gl/reckoning/reckoning.do';
+ let pk_accpont = {"pk_accountingbook": accountingbook.value};
+ ajax({
+ url: url,
+ data: pk_accpont,
+ success: function (response) {
+ const {data, success} = response;
+ //渲染已有账表数据遮罩
+ if (success) {
+ if (response.data) {
+ let isReckoningble = data.isReckoningble;
+ if (isReckoningble) {
+ toast({content: self.state.json['20020RECON-000011'], color: 'success'});/* 国际化处理: 结账成功*/
+ reckonintData = data.reckedYear;
+ self.showSimpletableData(reckonintData);
+ reckonintData.map((item, index) => {
+ item.key = index;
+ })
+ listItem['reckedMonth'].value = data.reckedMonth;
+ self.setState({
+ reckonintData, listItem
+ })
+ } else {
+ toast({content: self.state.json['20020RECON-000012'], color: 'warning'});/* 国际化处理: 结账失败*/
+ 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,
+ }, () => {
+ self.props.modal.show('reprotModal');
+ })
+ }
+ }
+ }
+ }
+ });
+ }
+ //取消结账
+ handleUnendAccount = () => {
+ let self = this;
+ let {reckonintData, listItem, reportDataSum, reportData, accountingbook, reportTitle, reportFont} = self.state;
+ if (accountingbook.value == "" || accountingbook.value == undefined) {
+ toast({content: self.state.json['20020RECON-000010'], color: 'warning'});/* 国际化处理: 请先选择核算账簿*/
+ return false;
+ }
+ let url = '/nccloud/gl/reckoning/unreckoning.do';
+ let pk_accpont = {"pk_accountingbook": accountingbook.value};
+ ajax({
+ url: url,
+ data: pk_accpont,
+ success: function (response) {
+ const {data, success} = response;
+ //渲染已有账表数据遮罩
+ if (success) {
+ if (response.data) {
+ let isReckoningble = data.isReckoningble;
+ toast({content: self.state.json['20020RECON-000013'], color: 'success'});/* 国际化处理: 反结账成功*/
+ reckonintData = data.reckedYear;
+ self.showSimpletableData(reckonintData);
+ reckonintData.map((item, index) => {
+ item.key = index;
+ })
+ listItem['reckedMonth'].value = data.reckedMonth;
+ self.setState({
+ reckonintData, listItem
+ })
+ }
+ }
+ },
+ error: function (res) {
+ toast({content: res.message, color: 'danger'});
+ }
+ });
+ }
+ //重建余额表
+ handleRebuildbalance = () => {
+ this.props.modal.show('rebuildbalance');
+ }
+ //上传税务云
+ handleUploud = () => {
+ let self = this;
+ let {listItem, up_pk_accountingbook, taxcloudurl, period, pk_periodscheme, pk_display} = this.state;
+ up_pk_accountingbook = {'pk_accountingbook': listItem.pk_accountingbook.value}
+ pk_display = listItem.pk_accountingbook.display
+ let url = '/nccloud/gl/pfxx/taxcloudconfig.do';
+ ajax({
+ url,
+ data: up_pk_accountingbook,
+ success: function (res) {
+ taxcloudurl = res.data.url
+ period = res.data.period
+ pk_periodscheme = res.data.pk_periodscheme
+ self.setState({
+ up_pk_accountingbook,
+ taxcloudurl,
+ pk_periodscheme,
+ period,
+ pk_display,
+ isQueryShow: true
+ }, () => {
+ self.props.modal.show('UploadTaxModal');
+ })
+ },
+ error: function (res) {
+ toast({content: res.message, color: 'warning'});
+ }
+ });
- }
- });
- }
- componentWillMount(){
- let {listItem,rebuildBalanceItem,accountingbook}=this.state;
- let appcode=this.props.getSearchParam("c");
- // let defaultAccouontBook=getDefaultAccountBook(appcode);
- getDefaultAccountBook(appcode).then((defaultAccouontBook)=>{
- accountingbook=defaultAccouontBook;
- if(defaultAccouontBook.value){
- this.getReckoningData(defaultAccouontBook.value);
- 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-000001'],itemType:'textInput',itemKey:'reckedMonth'},/* 国际化处理: 待结账月份:*/
- ]
- const loadQuery=[
- {
- itemName:this.state.json['20020RECON-000000'],/* 国际化处理: 核算账簿*/
- itemType:'refer',
- itemKey:'pk_accountingbook',
- config:{refCode:"uapbd/refer/org/AccountBookTreeRef"},
- showMast:true
- },
- {
- itemName: this.state.json['20020RECON-000002'],/* 国际化处理: 会计科目*/
- itemType: "refer",
- itemKey: "pk_accasoa",
- config: { refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef" },
- showMast:false
- },
- {itemName:this.state.json['20020RECON-000003'],itemType:'Dbselect',itemKey:['year','period'],/* 国际化处理: 会计期间*/
- itemChild:[]
- }
- // {itemName:'会计期间',itemType:'select',itemKey:'period',
- // itemChild:[]
- // }
- ]
- this.keyValueChange(defaultAccouontBook,loadQuery,rebuildBalanceItem);
- headData.forEach((item,i)=>{
- let key;
- if(item.itemType=='refer'){
- if(item.itemKey=='pk_accountingbook'){
- key={
- display:defaultAccouontBook.display,
- value:defaultAccouontBook.value
- }
- }else{
+ }
+ //对账todo
+ handleReconciliate = () => {
+ let self = this;
+ 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;
+ }
+ 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,
+ success: function (response) {
+ const {data, success} = response;
+ //渲染已有账表数据遮罩
+ if (success) {
+ if (response.data) {
+ 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');
+ })
+ }
+ }
+ }
+ });
+ }
- key={
- display:'',
- value:''
- }
- }
- }else if(item.itemType=='select'||item.itemType=='Dbselect'||item.itemType=='radio'){//下拉框赋初始值
- key={
- value:item.itemChild[0].value
- }
- }else{
- key={
- value:''
- }
- if(item.itemType=='date'||item.itemType=='Dbdate'){
- key={
- value:''
- }
- }
- }
- if(item.itemType=='Dbdate'||item.itemType=='DbtextInput'){
- item.itemKey.map((k,index)=>{
- let name= k;
- listItem[name]=key
- });
- }else{
- let name= item.itemKey;
- listItem[name]=key
- }
- })
- this.setState({
- listItem,accountingbook
- })
- })
- let callback= (json) =>{
- this.Defaultcolumns = [
- {
- title: ({json['20020RECON-000004']}
),/* 国际化处理: 会计期间 */
- dataIndex: "dispReckedMonth",
- key: "dispReckedMonth",
- width: 100,
- render: (text, record, index) => {
- return {!text? :text}
- }
- },
- {
- title: ({json['20020RECON-000005']}
),/* 国际化处理: 是否结账*/
- dataIndex: "dispReckedOrNot",
- key: "dispReckedOrNot",
- width: 100,
- render: (text, record, index) => {
- return {!text? :text}
- }
- },
- {
- title: ({json['20020RECON-000006']}
),/* 国际化处理: 结账人*/
- dataIndex: "endaccuser",
- key: "endaccuser",
- width: 100,
- render: (text, record, index) => {
- return {!text? :text}
- }
- },
- {
- title: ({json['20020RECON-000007']}
),/* 国际化处理: 结账时间*/
- dataIndex: "endacctime",
- key: "endacctime",
- width: 100,
- render: (text, record, index) => {
- return {!text? :text}
- }
- },
- {
- title: ({json['20020RECON-000008']}
),/* 国际化处理: 取消结账*/
- dataIndex: "unendaccuser",
- key: "unendaccuser",
- width: 100,
- render: (text, record, index) => {
- return {!text? :text}
- }
- },
- {
- title: ({json['20020RECON-000009']}
),/* 国际化处理: 取消结账时间*/
- dataIndex: "unendacctime",
- key: "unendacctime",
- width: 100,
- render: (text, record, index) => {
- return {!text? :text}
- }
- }
+ //打印
+ handlePrintReport() {
+ this.setState({
+ showPrintModal: true
+ })
+ }
- ];
- this.setState({
- json:json,
- },()=>{
- initTemplate.call(this, this.props);
- })
- }
- getMultiLang({moduleId:['20020RECON','uptoload'],domainName:'gl',currentLocale:'simpchn',callback});
- }
- selectedChange=(props,newVal,oldVal)=>{//选中行发生变化
+ handlePrint(data) {
+ let printUrl = '/nccloud/gl/accountrep/reckoningreportprint.do'
+ let {queryDataObj, appcode, sumOrDetail, listItem} = this.state
+ let {ctemplate, nodekey} = data
+ queryDataObj.queryvo = data
+ queryDataObj.pk_accountingbook = listItem['pk_accountingbook'].value;
+ queryDataObj.year = listItem['reckedMonth'].value.split('/')[0];
+ queryDataObj.month = listItem['reckedMonth'].value.split('/')[1];
+ queryDataObj.issum = 'Y';
+ this.setState({
+ ctemplate: ctemplate,
+ nodekey: nodekey
+ })
+ printRequire(printUrl, appcode, nodekey, ctemplate, queryDataObj)
+ this.setState({
+ showPrintModal: false
+ });
+ }
- }
- showReporModal=()=>{
- 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(
-
- )
- }
- onRef=(ref)=>{
- this.UploadTax=ref;
- }
- render(){
- let {taxcloudurl, pk_periodscheme, up_pk_accountingbook, pk_display, period} = this.state
+ //模板输出
+ showOutputModal() {
+ let outputUrl = '/nccloud/gl/accountrep/reckoningreportoutput.do'
+ let {appcode, nodekey, ctemplate, queryDataObj, listItem} = this.state;
+ queryDataObj.pk_accountingbook = listItem['pk_accountingbook'].value;
+ queryDataObj.year = listItem['reckedMonth'].value.split('/')[0];
+ queryDataObj.month = listItem['reckedMonth'].value.split('/')[1];
+ mouldOutput(outputUrl, appcode, nodekey, ctemplate, queryDataObj)
+ }
- 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){
- columnsVerify=this.Defaultcolumns?this.Defaultcolumns:[];
- }
- let { table } = this.props;
- let { createSimpleTable } = table;
- let reportSum={
- reportSumData:reportDataSum,
- reportSumTitle:reportSumTitle,
- reportSumFont:reportSumFont,
- }
- let reportDetail={
- reportDetailData:reportData,
- reportDetailTitle:reportTitle,
- reportDetailFont:reportFont
- }
- const loadQuery=[
- {
- itemName:this.state.json['20020RECON-000000'],/* 国际化处理: 核算账簿*/
- itemType:'refer',
- itemKey:'pk_accountingbook',
- config:{refCode:"uapbd/refer/org/AccountBookTreeRef"},
- showMast:true
- },
- {
- itemName: this.state.json['20020RECON-000002'],/* 国际化处理: 会计科目*/
- itemType: "refer",
- itemKey: "pk_accasoa",
- config: { refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef" },
- showMast:false
- },
- {itemName:this.state.json['20020RECON-000003'],itemType:'Dbselect',itemKey:['year','period'],/* 国际化处理: 会计期间*/
- itemChild:[]
- }
- ]
- return(
-
-
-
- {this.getHeadData()}
-
-
- }
- btnContent={
- this.props.button.createButtonApp({
- area: 'button_area',
- buttonLimit: 4,
- onButtonClick: buttonClick.bind(this),
- popContainer: document.querySelector('.header-button-area')
- })
- }
- />
-
- {createSimpleTable(this.tableId, {
- // showCheck: true,
- showIndex: true,
- selectedChange: this.selectedChange.bind(this)
- })}
-
-
- {ShowHideFlag&&createModal('reprotModal',{
- title:this.state.json['20020RECON-000026'],/* 国际化处理: 结账报告*/
- content:this.showReporModal(),
- userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
- noFooter : true, //是否需要底部按钮,默认有footer,有false,没有true
- })
- }
+ handleOutput() {
+ }
-
-
- {this.state.json['20020RECON-000015']&&createModal('rebuildbalance', {
- className:"repeatexl",
- title: this.state.json['20020RECON-000015'],// 弹框表头信息/* 国际化处理: 重建余额表*/
- content: rebuildBalanceItem(this,loadQuery), //弹框内容,可以是字符串或dom
- beSureBtnClick: rebuildBalanceComfirm.bind(this), //点击确定按钮事件
- userControl: false, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
- size: 'lg', // 模态框大小 sm/lg/xlg
- rightBtnName: this.state.json['20020RECON-000016'], //左侧按钮名称,默认关闭/* 国际化处理: 关闭*/
- leftBtnName: this.state.json['20020RECON-000017'], //右侧按钮名称, 默认确认/* 国际化处理: 确认*/
- })}
-
- {
- this.setState({
- showPrintModal: false
- })
- }}
- />
-
-
- {isQueryShow&&createModal('UploadTaxModal',{
- title:this.state.json['uptoload-000004'],/* 国际化处理: 上传税务云*/
- content:(
-
- ),
- className:'senior',
- userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
- beSureBtnClick:this.beSureBtnClick,//点击确定按钮事件
- cancelBtnClick:this.cancelBtnClick//取消按钮事件
- })
- }
-
-
- {ShowHideFlag&&createModal('reportReconciModal',{
- title:this.state.json['20020RECON-000034'],/* 国际化处理: 对账*/
- content:(
11111111
),
- userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
- noFooter : true, //是否需要底部按钮,默认有footer,有false,没有true
- })
- }
-
+ //关闭
+ handleClose = () => {
+ this.setState({
+ ShowHideFlag: !this.state.ShowHideFlag,
-
- )
+ })
+ }
+ GetRequest = (urlstr) => {
+ var url = decodeURIComponent(urlstr)//(window.parent.location.href); //获取url中"?"符后的字串
+ var theRequest = new Object();
+ if (url.indexOf("?") != -1) {
+ var str = url.substr(url.indexOf("?") + 1);
+ var strs = str.split("&");
+ for (var i = 0; i < strs.length; i++) {
+ theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
+ }
+ }
+ return theRequest;
+ }
+ //字段格式转换
+ keyValueChange = (defaultAccouontBook, data, listItem) => {
+ data.forEach((item, i) => {
+ let key;
+ if (item.itemType == 'refer') {
+ if (item.itemKey == 'pk_accountingbook') {
+ key = [{
+ display: defaultAccouontBook.display,
+ value: defaultAccouontBook.value
+ }]
+ } else if (item.itemKey == 'pk_accasoa') {
+ key = [{
+ display: '',
+ value: ''
+ }]
+ } else {
+ key = {
+ display: '',
+ value: ''
+ }
+ }
+ } else if (item.itemType == 'select' || item.itemType == 'Dbselect' || item.itemType == 'radio') {//下拉框赋初始值
+ key = {
+ value: ''
+ }
+ } else {
+ key = {
+ value: ''
+ }
+ if (item.itemType == 'date' || item.itemType == 'Dbdate') {
+ key = {
+ value: ''
+ }
+ }
+ }
+ if (item.itemType == 'Dbdate' || item.itemType == 'DbtextInput' || item.itemType == 'Dbselect') {
+ item.itemKey.map((k, index) => {
+ let name = k;
+ listItem[name] = key
+ });
+ } else {
+ let name = item.itemKey;
+ listItem[name] = key
+ }
+ })
+ this.setState({
+ listItem
+ })
+ }
+ //切换账簿请求数据和结账月份
+ getReckoningData = (pk_accountingbook) => {
+ let self = this;
+ let {reckonintData, listItem} = this.state;
+ let url = '/nccloud/gl/reckoning/refreshperiod.do';
+ let pk_accpont = {"pk_accountingbook": pk_accountingbook}
+ //let pk_accpont = {"pk_accountingbook": "1001A3100000000008MT"}
+ ajax({
+ url: url,
+ data: pk_accpont,
+ success: function (response) {
+ const {data, success} = response;
+ //渲染已有账表数据遮罩
+ if (success) {
+ let periodData = {}
+ console.log(response.data)
+ if (response.data) {
+ reckonintData = data.reckedYear;
+ self.showSimpletableData(reckonintData);
+ reckonintData.map((item, index) => {
+ item.key = index;
+ })
+ listItem['reckedMonth'].value = data.reckedMonth;
- }
+ periodData.presentYear = data.presentYear
+ periodData.presentMonth = data.presentMonth
+ }
+ self.setState({
+ reckonintData, periodData
+ })
+ }
+ }
+ });
+ }
+ //渲染simpletable数据
+ showSimpletableData = (reckonintData) => {
+ let simpleTableData = changeToSimpletableDatas(reckonintData) || [];
+ if (simpleTableData) {
+ this.props.table.setAllTableData(this.tableId, {rows: simpleTableData});
+ } else {
+ this.props.table.setAllTableData(this.tableId, {rows: []});
+ }
+ }
+
+ componentDidMount() {
+ let self = this;
+ let url = '/nccloud/gl/pfxx/taxcloudconfig.do';
+ ajax({
+ url: url,
+ success: function (response) {
+ self.props.button.setButtonDisabled(['uploadtaxcloud'], false);
+ },
+ error: function (response) {
+ self.props.button.setButtonDisabled(['uploadtaxcloud'], false);
+
+ }
+ });
+ }
+
+ componentWillMount() {
+ let {listItem, rebuildBalanceItem, accountingbook} = this.state;
+ let appcode = this.props.getSearchParam("c");
+ // let defaultAccouontBook=getDefaultAccountBook(appcode);
+ getDefaultAccountBook(appcode).then((defaultAccouontBook) => {
+ accountingbook = defaultAccouontBook;
+ if (defaultAccouontBook.value) {
+ this.getReckoningData(defaultAccouontBook.value);
+ 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'
+ },
+ //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 = [
+ {
+ itemName: this.state.json['20020RECON-000000'],/* 国际化处理: 核算账簿*/
+ itemType: 'refer',
+ itemKey: 'pk_accountingbook',
+ config: {refCode: "uapbd/refer/org/AccountBookTreeRef"},
+ showMast: true
+ },
+ {
+ itemName: this.state.json['20020RECON-000002'],/* 国际化处理: 会计科目*/
+ itemType: "refer",
+ itemKey: "pk_accasoa",
+ config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
+ showMast: false
+ },
+ // {
+ // itemName: this.state.json['20020RECON-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
+ // itemChild: []
+ // }
+ // {itemName:'会计期间',itemType:'select',itemKey:'period',
+ // itemChild:[]
+ // }
+ ]
+ this.keyValueChange(defaultAccouontBook, loadQuery, rebuildBalanceItem);
+ headData.forEach((item, i) => {
+ let key;
+ if (item.itemType == 'refer') {
+ if (item.itemKey == 'pk_accountingbook') {
+ key = {
+ display: defaultAccouontBook.display,
+ value: defaultAccouontBook.value
+ }
+ } else {
+
+ key = {
+ display: '',
+ value: ''
+ }
+ }
+ } else if (item.itemType == 'select' || item.itemType == 'Dbselect' || item.itemType == 'radio') {//下拉框赋初始值
+ key = {
+ value: item.itemChild[0].value
+ }
+ } else {
+ key = {
+ value: ''
+ }
+ if (item.itemType == 'date' || item.itemType == 'Dbdate') {
+ key = {
+ value: ''
+ }
+ }
+ }
+ if (item.itemType == 'Dbdate' || item.itemType == 'DbtextInput' || item.itemType == 'Dbselect') {
+ item.itemKey.map((k, index) => {
+ let name = k;
+ listItem[name] = key
+ });
+ } else {
+ let name = item.itemKey;
+ listItem[name] = key
+ }
+ })
+ this.setState({
+ listItem, accountingbook
+ })
+ })
+ let callback = (json) => {
+ this.Defaultcolumns = [
+ {
+ title: ({json['20020RECON-000004']}
),/* 国际化处理: 会计期间 */
+ dataIndex: "dispReckedMonth",
+ key: "dispReckedMonth",
+ width: 100,
+ render: (text, record, index) => {
+ return {!text ? : text}
+ }
+ },
+ {
+ title: ({json['20020RECON-000005']}
),/* 国际化处理: 是否结账*/
+ dataIndex: "dispReckedOrNot",
+ key: "dispReckedOrNot",
+ width: 100,
+ render: (text, record, index) => {
+ return {!text ? : text}
+ }
+ },
+ {
+ title: ({json['20020RECON-000006']}
),/* 国际化处理: 结账人*/
+ dataIndex: "endaccuser",
+ key: "endaccuser",
+ width: 100,
+ render: (text, record, index) => {
+ return {!text ? : text}
+ }
+ },
+ {
+ title: ({json['20020RECON-000007']}
),/* 国际化处理: 结账时间*/
+ dataIndex: "endacctime",
+ key: "endacctime",
+ width: 100,
+ render: (text, record, index) => {
+ return {!text ? : text}
+ }
+ },
+ {
+ title: ({json['20020RECON-000008']}
),/* 国际化处理: 取消结账*/
+ dataIndex: "unendaccuser",
+ key: "unendaccuser",
+ width: 100,
+ render: (text, record, index) => {
+ return {!text ? : text}
+ }
+ },
+ {
+ title: ({json['20020RECON-000009']}
),/* 国际化处理: 取消结账时间*/
+ dataIndex: "unendacctime",
+ key: "unendacctime",
+ width: 100,
+ render: (text, record, index) => {
+ return {!text ? : text}
+ }
+ }
+
+ ];
+ this.setState({
+ json: json,
+ }, () => {
+ initTemplate.call(this, this.props);
+ })
+ }
+ 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 reportSum = {
+ reportSumData: reportDataSum,
+ reportSumTitle: reportSumTitle,
+ reportSumFont: reportSumFont,
+ }
+ let reportDetail = {
+ reportDetailData: reportData,
+ reportDetailTitle: reportTitle,
+ reportDetailFont: reportFont
+ }
+ return (
+
+ )
+ }
+ /*对账弹框*/
+ 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 (
+
+ )
+ }
+ 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 {modal} = this.props;
+ let {createModal} = modal;
+ if (columnsVerify.length == 0) {
+ columnsVerify = this.Defaultcolumns ? this.Defaultcolumns : [];
+ }
+ let {table} = this.props;
+ let {createSimpleTable} = table;
+ let reportSum = {
+ reportSumData: reportDataSum,
+ reportSumTitle: reportSumTitle,
+ reportSumFont: reportSumFont,
+ }
+ let reportDetail = {
+ reportDetailData: reportData,
+ reportDetailTitle: reportTitle,
+ reportDetailFont: reportFont
+ }
+ const loadQuery = [
+ {
+ itemName: this.state.json['20020RECON-000000'],/* 国际化处理: 核算账簿*/
+ itemType: 'refer',
+ itemKey: 'pk_accountingbook',
+ config: {refCode: "uapbd/refer/org/AccountBookTreeRef"},
+ showMast: true
+ },
+ {
+ itemName: this.state.json['20020RECON-000002'],/* 国际化处理: 会计科目*/
+ itemType: "refer",
+ itemKey: "pk_accasoa",
+ config: {refCode: "uapbd/refer/fiacc/AccountDefaultGridTreeRef"},
+ showMast: false
+ },
+ // {
+ // itemName: this.state.json['20020RECON-000003'], itemType: 'Dbselect', itemKey: ['year', 'period'],/* 国际化处理: 会计期间*/
+ // itemChild: []
+ // }
+ ]
+ return (
+
+
+
+ {this.getHeadData()}
+
+
+ }
+ btnContent={
+ this.props.button.createButtonApp({
+ area: 'button_area',
+ buttonLimit: 4,
+ onButtonClick: buttonClick.bind(this),
+ popContainer: document.querySelector('.header-button-area')
+ })
+ }
+ />
+
+ {createSimpleTable(this.tableId, {
+ // showCheck: true,
+ showIndex: true,
+ selectedChange: this.selectedChange.bind(this)
+ })}
+
+
+ {ShowHideFlag && createModal('reprotModal', {
+ title: this.state.json['20020RECON-000026'],/* 国际化处理: 结账报告*/
+ content: this.showReporModal(),
+ userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
+ noFooter: true, //是否需要底部按钮,默认有footer,有false,没有true
+ })
+ }
+
+
+
+ {this.state.json['20020RECON-000015'] && createModal('rebuildbalance', {
+ className: "repeatexl",
+ title: this.state.json['20020RECON-000015'],// 弹框表头信息/* 国际化处理: 重建余额表*/
+ content: rebuildBalanceItem(this, loadQuery), //弹框内容,可以是字符串或dom
+ beSureBtnClick: rebuildBalanceComfirm.bind(this), //点击确定按钮事件
+ userControl: false, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
+ size: 'lg', // 模态框大小 sm/lg/xlg
+ rightBtnName: this.state.json['20020RECON-000016'], //左侧按钮名称,默认关闭/* 国际化处理: 关闭*/
+ leftBtnName: this.state.json['20020RECON-000017'], //右侧按钮名称, 默认确认/* 国际化处理: 确认*/
+ })}
+
+ {
+ this.setState({
+ showPrintModal: false
+ })
+ }}
+ />
+
+
+ {isQueryShow && createModal('UploadTaxModal', {
+ title: this.state.json['uptoload-000004'],/* 国际化处理: 上传税务云*/
+ content: (
+
+ ),
+ className: 'senior',
+ userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
+ beSureBtnClick: this.beSureBtnClick,//点击确定按钮事件
+ cancelBtnClick: this.cancelBtnClick//取消按钮事件
+ })
+ }
+
+
+ {ShowHideFlag && createModal('reportReconciModal', {
+ title: this.state.json['20020RECON-000039'],/* 国际化处理: 对账*/
+ content: this.showReconciModal(),
+ userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关
+ noFooter: true, //是否需要底部按钮,默认有footer,有false,没有true
+ })
+ }
+
+
+
+ )
+
+ }
+
+ 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
+ // initTemplate:initTemplate
})(Reckon);
-ReactDOM.render(,document.querySelector('#app'));
+ReactDOM.render(, document.querySelector('#app'));
/*pbHnlLNCpsWdx+f6QNDErXUJ9hVUkCPC2/wKKBoJVMo=*/
diff --git a/src/gl/finalTreatment/reckoning/list/index.less b/src/gl/finalTreatment/reckoning/list/index.less
index cf911bf..a6116c0 100644
--- a/src/gl/finalTreatment/reckoning/list/index.less
+++ b/src/gl/finalTreatment/reckoning/list/index.less
@@ -68,7 +68,91 @@
}
}
}
-
+
+}
+
+#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;
}
}
@@ -103,7 +188,7 @@
min-height: auto !important;
// padding: 0 !important;
}
-
+
}
.u-col-md-2{
padding: 0;
@@ -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;
@@ -211,7 +296,7 @@
.line{
height: 40px;
line-height: 40px;
- .title{
+ .title{
float: left;
margin-right: 20px;
width: 124px;
@@ -231,9 +316,9 @@
float: left;
}
}
-
-
+
+
}
.prompt-box.nc-modal.u-modal .u-modal-dialog .u-modal-content .u-modal-body{
overflow: hidden;
-}
\ No newline at end of file
+}
diff --git a/src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js b/src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js
index eb53ac7..8a43100 100644
--- a/src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js
+++ b/src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js
@@ -1,36 +1,64 @@
/*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
+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
} = base;
-const { NCFormItem:FormItem } = NCForm;
+const {NCFormItem: FormItem} = NCForm;
import '../index.less';
-export default class ReportModal extends Component{
- constructor(props){
+
+export default class ReportModal extends Component {
+ constructor(props) {
super(props)
this.columns_report = [
{
- title: "",
+ title: (5235235
),
dataIndex: "strRowOne",
key: "strRowOne",
width: 300,
- render:(text, record, index)=>{
- let {reportTableData}=this.state;
- let redFlag=false;
- for(let k in reportTableData.reportDetailFont){
- if(k==text){
- redFlag=true;
+ render: (text, record, index) => {
+ let {reportTableData} = this.state;
+ let redFlag = false;
+ for (let k in reportTableData.reportDetailFont) {
+ if (k == text) {
+ redFlag = true;
}
}
- if(redFlag){
- return(
-
+ if (redFlag) {
+ return (
+ //
+
)
- }else{
- return(
-
+ } else {
+ return (
+ //
+
)
}
@@ -41,210 +69,173 @@ export default class ReportModal extends Component{
dataIndex: "strRowTwo",
key: "strRowTwo",
width: 350,
- render:(text, record, index)=>{
- let {reportTableData}=this.state;
- let redFlag=false;
- for(let k in reportTableData.reportDetailFont){
- if(k==text){
- redFlag=true;
+ render: (text, record, index) => {
+ let {reportTableData} = this.state;
+ let redFlag = false;
+ for (let k in reportTableData.reportDetailFont) {
+ if (k == text) {
+ redFlag = true;
}
}
- if(redFlag){
- return(
-
+ if (redFlag) {
+ return (
+
)
- }else{
- return(
-
+ } else {
+ return (
+
)
}
}
}
]
- this.state={
- json:{},
- reportTableData:this.props.reportDetail||[],
- reportTableDataSum:this.props.reportSum||[],
- reportTableTitle:'',
- fontStr:{},
- columns_report:this.columns_report,
- columns_reportSum:[],
- sumOrDetail:'sum'//默认像是汇总table数据
+ this.state = {
+ json: {},
+ reportTableData: this.props.reportDetail || [],
+ reportTableDataSum: this.props.reportSum || [],
+ reportTableTitle: '',
+ fontStr: {},
+ columns_report: this.columns_report,
+ columns_reportSum: [],
+ sumOrDetail: 'sum'//默认像是汇总table数据
}
}
+
componentWillMount() {
- let callback= (json) =>{
+ let callback = (json) => {
+ // console.log(json)
this.columns_reportSum = [
{
- title: ({json['20020RECON-000023']}
),/* 国际化处理: 检查项*/
- dataIndex: "strRowOne",
- key: "strRowOne",
+ title: ({json['20020RECON-000034']}
),/* 国际化处理: 总账余额表*/
+ 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(
-
- )
- }else{
- return(
-
- )
- }
-
+ render: (text, record, index) => {
+ return (
+
+ {/*会计科目*/}
+
{record.paccname}
+ {/*期末余额*/}
+
{record.pendlocamount}
+
+ )
}
},
{
- title: ({json['20020RECON-000024']}
),/* 国际化处理: 是否通过*/
- dataIndex: "strRowTwo",
- key: "strRowTwo",
- width: 80,
- 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(
-
- )
- }else{
- return(
-
- )
- }
+ title: ({json['20020RECON-000035']}
),/* 国际化处理: 总账辅助余额表*/
+ dataIndex: "field2",
+ key: "field2",
+ width: 500,
+ render: (text, record, index) => {
+ return (
+
+ {/*会计科目*/}
+
{record.accname}
+ {/*辅助核算*/}
+
{record.assname}
+ {/*期末余额*/}
+
{record.endlocamount}
+
+ )
}
},
- {
- title: ({json['20020RECON-000025']}
),/* 国际化处理: 说明*/
- dataIndex: "strRowThree",
- key: "strRowThree",
- width: 310,
- 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(
-
- )
- }else{
- return(
-
- )
- }
+ /*{
+ title: ({json['20020RECON-000036']}
),/!* 国际化处理: 总账辅助明细账*!/
+ dataIndex: "field3",
+ key: "field3",
+ width: 680,
+ render: (text, record, index) => {
+ return (
+
+
{record.field6}
{/!*会计科目*!/}
+
{record.field7}
{/!*辅助核算*!/}
+
{record.field8}
{/!*凭证号*!/}
+
{record.field9}
{/!*余额*!/}
+
+ )
}
- }
+ },*/
+ {
+ title: ({json['20020RECON-000037']}
),/* 国际化处理: 差异*/
+ dataIndex: "field4",
+ key: "field4",
+ width: 300,
+ render: (text, record, index) => {
+ return (
+
+ {/*会计科目*/}
+
{record.paccname}
+ {/*金额*/}
+
{record.difference}
+
+ )
+
+ }
+ },
]
this.setState({
- columns_reportSum:this.columns_reportSum,
- json:json,
- },()=>{
+ columns_reportSum: this.columns_reportSum,
+ json: json,
+ }, () => {
})
}
- getMultiLang({moduleId:'20020RECON',domainName:'gl',currentLocale:'simpchn',callback});
+ getMultiLang({moduleId: '20020RECON', domainName: 'gl', currentLocale: 'simpchn', callback});
}
- componentWillReceiveProps(nextProp){
- let {reportTableDataSum,reportTableData,reportTableTitle}=this.state;
- let{reportSum,reportDetail,showOrHide}=nextProp;
- reportTableDataSum=reportSum;
- reportTableData=reportDetail;
+
+ componentWillReceiveProps(nextProp) {
+ console.log(this.state)
+ let {reportTableDataSum, reportTableData, reportTableTitle} = this.state;
+ let {reportSum, reportDetail, showOrHide} = nextProp;
+ reportTableDataSum = reportSum;
+ reportTableData = reportDetail;
this.setState({
- 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(){
- let {sumOrDetail,reportTableTitle,columns_report,columns_reportSum}=this.state;
- let{showOrHide,reportSum,reportDetail}=this.props;
- let reportTableDataSum=reportSum;
- let reportTableData=reportDetail;
- return(
-
-
-
- {sumOrDetail == 'detail' ?
- /* 国际化处理: 返回*/
- : null}
- {sumOrDetail == 'sum' ?
- /* 国际化处理: 查看详情*/
- : null}
- {sumOrDetail == 'detail' ?
- /* 国际化处理: 打印*/
- : null}
- {sumOrDetail == 'detail' ?
- /* 国际化处理: 模板输出*/
- : null}
- {/* */}
-
-
{reportTableData.reportDetailTitle}
- {(sumOrDetail == 'sum') ?
-
{reportTableDataSum.reportSumTitle}
- : null}
- {(sumOrDetail == 'sum') ?
-
- 8 ? (100 + (columns_reportSum.length - 8) * 15) + "%" : '100%', y: 320 }}
- />
- : null}
- {(sumOrDetail == 'detail') ?
+
+ render() {
+ let {columns_reportSum} = this.state;
+ let {reportDetail} = this.props;
+ let reportTableData = reportDetail;
+ return (
+
+
+
+ {/*
账账相对
*/}
+ {
+ 8 ? (100 + (columns_reportSum.length - 8) * 15) + "%" : '100%',
+ y: 320
+ }}
+ />
+ }
+ {/*{(sumOrDetail == 'detail') ?
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
+ }}
/>
- : null}
+ : null}*/}
)
diff --git a/src/gl/public/lang/standard/simpchn/20020RECON.json b/src/gl/public/lang/standard/simpchn/20020RECON.json
index dd2acbd..518dab2 100644
--- a/src/gl/public/lang/standard/simpchn/20020RECON.json
+++ b/src/gl/public/lang/standard/simpchn/20020RECON.json
@@ -32,5 +32,11 @@
"20020RECON-000030": "模板输出",
"20020RECON-000031": "年",
"20020RECON-000032": "月",
- "20020RECON-000033": "重建余额表成功"
-}
\ No newline at end of file
+ "20020RECON-000033": "重建余额表成功",
+ "20020RECON-000034": "总账余额表",
+ "20020RECON-000035": "总账辅助余额表",
+ "20020RECON-000036": "总账辅助明细表",
+ "20020RECON-000037": "差异",
+ "20020RECON-000038": "请先选择会计科目",
+ "20020RECON-000039": "账账相对报表"
+}