From 7b1e7f72c74861f65911aa362e3ce15e1213f6fd Mon Sep 17 00:00:00 2001 From: xyz <747050115@qq.com> Date: Wed, 25 Dec 2024 15:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=94=B3=E8=AF=B7=E6=8B=89?= =?UTF-8?q?=E5=8D=95=E8=B0=83=E6=95=B4=20=E6=80=BB=E8=B4=A6=E7=BB=93?= =?UTF-8?q?=E8=B4=A6-=E5=AF=B9=E8=B4=A6=E6=8C=89=E9=92=AE=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json | 3 +- .../reckoning/list/events/buttonClick.js | 15 +- src/gl/finalTreatment/reckoning/list/index.js | 955 +++++++++--------- .../list/reconciReportModal/index.js | 254 +++++ src/ic/ic/sapplybill/transfer/transfer.js | 6 +- src/ic/ic/sapplybill/transfer2/const/index.js | 6 +- 6 files changed, 771 insertions(+), 468 deletions(-) create mode 100644 src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js diff --git a/config.json b/config.json index ccc21c0..c117feb 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,8 @@ "./src/sscivm/*/*/*/index.js", "./src/sscrp/public/*/*/*/index.js", "./src/ic/ic/sapplybill/*/index.js", - "./src/ssctp/sscuser/sscuser/*/index.js" + "./src/ssctp/sscuser/sscuser/*/index.js", + "./src/gl/*/*/*/index.js" ], "proxy": "http://127.0.0.1:8088", "buildWithoutHTML": ["uapbd/refer", "uap/refer"], diff --git a/src/gl/finalTreatment/reckoning/list/events/buttonClick.js b/src/gl/finalTreatment/reckoning/list/events/buttonClick.js index 6e3dc2c..5e72736 100644 --- a/src/gl/finalTreatment/reckoning/list/events/buttonClick.js +++ b/src/gl/finalTreatment/reckoning/list/events/buttonClick.js @@ -12,27 +12,30 @@ export default function buttonClick(props, id) { this.handleEndAccount(); break; case 'cancelreckon'://取消结账 - this.handleUnendAccount(); + this.handleUnendAccount(); break; case 'rebuildbalance'://重建余额表 this.handleRebuildbalance(); break; case 'print'://打印 - + break; case 'templateoutput'://模板输出 - + break; case 'uploadtaxcloud'://上传税务云 setTimeout(()=>{ this.handleUploud() },24) - + + break; + case 'reconciliate'://对账 + this.handleReconciliate(); break; default: - break; + break; } } -/*q2LCmxM8POvl78IL0LiydgYfK0gSymXZVYY7zYdQVCU=*/ \ No newline at end of file +/*q2LCmxM8POvl78IL0LiydgYfK0gSymXZVYY7zYdQVCU=*/ diff --git a/src/gl/finalTreatment/reckoning/list/index.js b/src/gl/finalTreatment/reckoning/list/index.js index cd154d6..da9259a 100644 --- a/src/gl/finalTreatment/reckoning/list/index.js +++ b/src/gl/finalTreatment/reckoning/list/index.js @@ -2,8 +2,8 @@ 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 + 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'; @@ -22,6 +22,7 @@ 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' @@ -61,7 +62,7 @@ class Reckon extends Component{ resourceData_sum:[],//查询出来的历史数据 resourceColumns_sum:[],//查询出来的历史数据列字段 selectedData:{},//选中的数据 - } + } } beSureBtnClick=()=>{ this.UploadTax.confirm(); @@ -80,120 +81,120 @@ class Reckon extends Component{ 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) { - - const { data, error, success } = res; - if(success){ - self.setState({ - yearList: data, - }) - - }else { - toast({ content: error.message, color: 'warning' }); - } - }, - error: function (res) { - toast({ content: res.message, color: 'warning' }); - - } - }); + let url = '/nccloud/gl/voucher/yearcombo.do'; + let data = { + "pk_accountingbook":pk_accountingbook + }; + ajax({ + url, + data, + success: function (res) { + + const { data, error, success } = res; + if(success){ + self.setState({ + yearList: data, + }) + + }else { + toast({ content: error.message, color: 'warning' }); + } + }, + error: function (res) { + toast({ content: res.message, color: 'warning' }); + + } + }); } //根据账簿请求会计年 月 getPeriodList = (pk_accountingbook,year) => { let self = this; - let url = '/nccloud/gl/voucher/periodcombo.do'; - let data = { + let url = '/nccloud/gl/voucher/periodcombo.do'; + let data = { "pk_accountingbook":pk_accountingbook, "year":year, - }; + }; - ajax({ - url, - data, - success: function (res) { - - const { data, error, success } = res; - if(success){ - self.setState({ - periodList: data, - }) - - }else { - toast({ content: error.message, color: 'warning' }); - } - }, - error: function (res) { - toast({ content: res.message, color: 'warning' }); - - } - }); - } + ajax({ + url, + data, + success: function (res) { + + const { data, error, success } = res; + if(success){ + self.setState({ + periodList: data, + }) + + }else { + toast({ content: error.message, color: 'warning' }); + } + }, + error: function (res) { + toast({ content: res.message, color: 'warning' }); + + } + }); + } //处理width changeWidth(arr){ arr.map((item,index)=>{ if(item.children){ this.changeWidth(item.children); }else{ - item['width']=150; - } + 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-000001'],itemType:'textInput',itemKey:'reckedMonth'},/* 国际化处理: 待结账月份:*/ - ] + 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 ( - { + 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; - + {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; + if(item.itemKey=='pk_accountingbook'){ if(v.refpk){ self.getReckoningData(v.refpk); @@ -202,67 +203,67 @@ class Reckon extends Component{ 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 - }) + 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) } - ):
} - ); - } - } - break; - case 'select': - return( - - { - return (item.itemChild) } - } - onChange={(v)=>{ - listItem[item.itemKey].value = v + onChange={(v)=>{ + listItem[item.itemKey].value = v this.setState({ listItem }) - }} - /> - - ) - case 'textInput': - return( - - {/* + + ) + 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']} + : + + } + + ) + default: + break; + } + }) + + ) + :(
) } //结账检查报告 handleEndAccountReport=()=>{ @@ -316,7 +317,7 @@ class Reckon extends Component{ self.props.modal.show('reprotModal'); }) } - } + } } }); } @@ -366,9 +367,9 @@ class Reckon extends Component{ },()=>{ self.props.modal.show('reprotModal'); }) - } + } } - } + } } }); } @@ -400,9 +401,9 @@ class Reckon extends Component{ listItem['reckedMonth'].value=data.reckedMonth; self.setState({ reckonintData,listItem - }) + }) } - } + } }, error:function(res){ toast({ content: res.message, color: 'danger' }); @@ -421,9 +422,9 @@ class Reckon extends Component{ pk_display = listItem.pk_accountingbook.display let url = '/nccloud/gl/pfxx/taxcloudconfig.do'; ajax({ - url, - data:up_pk_accountingbook, - success: function (res) { + url, + data:up_pk_accountingbook, + success: function (res) { taxcloudurl = res.data.url period = res.data.period pk_periodscheme = res.data.pk_periodscheme @@ -437,17 +438,52 @@ class Reckon extends Component{ },()=>{ self.props.modal.show('UploadTaxModal'); }) - }, - error: function (res) { - toast({ content: res.message, color: 'warning' }); - } - }); + }, + error: function (res) { + toast({ content: res.message, color: 'warning' }); + } + }); } - //打印 + //对账todo + handleReconciliate=()=>{ + 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('reportReconciModal'); + }) + } + } + } + }); + } + //打印 handlePrintReport() { this.setState({ - showPrintModal: true + showPrintModal: true }) } handlePrint(data) { @@ -468,35 +504,35 @@ class Reckon extends Component{ showPrintModal: false }); } - //模板输出 - showOutputModal() { - let outputUrl = '/nccloud/gl/accountrep/reckoningreportoutput.do' - let { appcode, nodekey, ctemplate, queryDataObj ,listItem} = 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) - } - handleOutput() { - } + mouldOutput(outputUrl, appcode, nodekey, ctemplate, queryDataObj) + } + handleOutput() { + } //关闭 handleClose=()=>{ this.setState({ - ShowHideFlag: !this.state.ShowHideFlag, - - }) + 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; + 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)=>{ @@ -534,14 +570,14 @@ class Reckon extends Component{ } } if(item.itemType=='Dbdate'||item.itemType=='DbtextInput'||item.itemType=='Dbselect'){ - item.itemKey.map((k,index)=>{ - let name= k; - listItem[name]=key - }); + item.itemKey.map((k,index)=>{ + let name= k; + listItem[name]=key + }); }else{ let name= item.itemKey; listItem[name]=key - } + } }) this.setState({ listItem @@ -549,7 +585,7 @@ class Reckon extends Component{ } //切换账簿请求数据和结账月份 getReckoningData=(pk_accountingbook)=>{ - let self=this; + let self=this; let {reckonintData,listItem}=this.state; let url ='/nccloud/gl/reckoning/refreshperiod.do'; let pk_accpont = {"pk_accountingbook":pk_accountingbook} @@ -572,7 +608,7 @@ class Reckon extends Component{ self.setState({ reckonintData }) - } + } } }); } @@ -586,7 +622,7 @@ class Reckon extends Component{ } } componentDidMount(){ - let self=this; + let self=this; let url = '/nccloud/gl/pfxx/taxcloudconfig.do'; ajax({ url:url, @@ -594,157 +630,157 @@ class Reckon extends Component{ self.props.button.setButtonDisabled(['uploadtaxcloud'], false); }, error : function(response){ - self.props.button.setButtonDisabled(['uploadtaxcloud'], false); - + 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)=>{ + // let defaultAccouontBook=getDefaultAccountBook(appcode); + getDefaultAccountBook(appcode).then((defaultAccouontBook)=>{ accountingbook=defaultAccouontBook; if(defaultAccouontBook.value){ - this.getReckoningData(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'){ + 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{ + + key={ + display:'', + value:'' + } + } + }else if(item.itemType=='select'||item.itemType=='Dbselect'||item.itemType=='radio'){//下拉框赋初始值 key={ - display:defaultAccouontBook.display, - value:defaultAccouontBook.value + 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}
+ } + } - 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}
- } - } - - ]; - this.setState({ - json:json, - },()=>{ - initTemplate.call(this, this.props); - }) - } - getMultiLang({moduleId:['20020RECON','uptoload'],domainName:'gl',currentLocale:'simpchn',callback}); + ]; + this.setState({ + json:json, + },()=>{ + initTemplate.call(this, this.props); + }) + } + getMultiLang({moduleId:['20020RECON','uptoload'],domainName:'gl',currentLocale:'simpchn',callback}); } selectedChange=(props,newVal,oldVal)=>{//选中行发生变化 @@ -754,7 +790,7 @@ class Reckon extends Component{ let reportSum={ reportSumData:reportDataSum, reportSumTitle:reportSumTitle, - reportSumFont:reportSumFont, + reportSumFont:reportSumFont, } let reportDetail={ reportDetailData:reportData, @@ -762,16 +798,16 @@ class Reckon extends Component{ reportDetailFont:reportFont } return( - + ) } onRef=(ref)=>{ @@ -779,7 +815,7 @@ class Reckon extends Component{ } 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; @@ -788,11 +824,11 @@ class Reckon extends Component{ columnsVerify=this.Defaultcolumns?this.Defaultcolumns:[]; } let { table } = this.props; - let { createSimpleTable } = table; + let { createSimpleTable } = table; let reportSum={ reportSumData:reportDataSum, reportSumTitle:reportSumTitle, - reportSumFont:reportSumFont, + reportSumFont:reportSumFont, } let reportDetail={ reportDetailData:reportData, @@ -813,112 +849,121 @@ class Reckon extends Component{ 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//取消按钮事件 - }) - } -
- -
+
+ + + {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-000034'],/* 国际化处理: 对账*/ + content:(
11111111
), + userControl: true, // 点确定按钮后,是否自动关闭弹出框.true:手动关。false:自动关 + noFooter : true, //是否需要底部按钮,默认有footer,有false,没有true + }) + } +
+ +
) - + } } Reckon = createPage({ - // initTemplate:initTemplate + // initTemplate:initTemplate })(Reckon); ReactDOM.render(,document.querySelector('#app')); -/*pbHnlLNCpsWdx+f6QNDErXUJ9hVUkCPC2/wKKBoJVMo=*/ \ No newline at end of file +/*pbHnlLNCpsWdx+f6QNDErXUJ9hVUkCPC2/wKKBoJVMo=*/ diff --git a/src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js b/src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js new file mode 100644 index 0000000..eb53ac7 --- /dev/null +++ b/src/gl/finalTreatment/reckoning/list/reconciReportModal/index.js @@ -0,0 +1,254 @@ +/*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 +} = base; +const { NCFormItem:FormItem } = NCForm; +import '../index.less'; +export default class ReportModal extends Component{ + constructor(props){ + super(props) + this.columns_report = [ + { + title: "", + 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; + } + } + if(redFlag){ + return( +
{!text? :text}
+ ) + }else{ + return( +
{!text? :text}
+ ) + } + + } + }, + { + title: "", + 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; + } + } + if(redFlag){ + return( +
{!text? :text}
+ ) + }else{ + return( +
{!text? :text}
+ ) + } + + } + } + ] + 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) =>{ + this.columns_reportSum = [ + { + title: (
{json['20020RECON-000023']}
),/* 国际化处理: 检查项*/ + dataIndex: "strRowOne", + key: "strRowOne", + 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( +
{!text? :text}
+ ) + }else{ + return( +
{!text? :text}
+ ) + } + + } + }, + { + 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( +
{!text? :text}
+ ) + }else{ + return( +
{!text? :text}
+ ) + } + + } + }, + { + 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( +
{!text? :text}
+ ) + }else{ + return( +
{!text? :text}
+ ) + } + + } + } + ] + this.setState({ + columns_reportSum:this.columns_reportSum, + json:json, + },()=>{ + }) + } + 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; + this.setState({ + 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 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') ? + +
8 ? (100 + (columns_report.length - 8) * 15) + "%" : '100%', y: 320 }} + /> + : null} + + + ) + } +} + +/*qZ5a1x5ign4IdlZuRO5Ax6TjC2a3u5fVc0DIn53oa4I=*/ diff --git a/src/ic/ic/sapplybill/transfer/transfer.js b/src/ic/ic/sapplybill/transfer/transfer.js index 1a07cc9..0f396df 100644 --- a/src/ic/ic/sapplybill/transfer/transfer.js +++ b/src/ic/ic/sapplybill/transfer/transfer.js @@ -1,8 +1,8 @@ /*qglWYo2THvIGavZX5nSbwZ5iMJbqsiHVu5zwiu1zN1U=*/ /* - * @Author: raoczh + * @Author: raoczh * @PageInfo: 出库申请单拉单-物资需求申请 - * @Date: 2018-06-11 19:08:05 + * @Date: 2018-06-11 19:08:05 * @Last Modified by: lizhbo * @Last Modified time: 2020-03-28 13:18:38 */ @@ -191,4 +191,4 @@ class TransferTable extends Component { TransferTable = createPage({})(TransferTable); export default TransferTable; -/*qglWYo2THvIGavZX5nSbwZ5iMJbqsiHVu5zwiu1zN1U=*/ \ No newline at end of file +/*qglWYo2THvIGavZX5nSbwZ5iMJbqsiHVu5zwiu1zN1U=*/ diff --git a/src/ic/ic/sapplybill/transfer2/const/index.js b/src/ic/ic/sapplybill/transfer2/const/index.js index 07ef988..2a4e1fc 100644 --- a/src/ic/ic/sapplybill/transfer2/const/index.js +++ b/src/ic/ic/sapplybill/transfer2/const/index.js @@ -24,9 +24,9 @@ const DATASOURCE = { }; //备料计划申请 const fileds_orgfilter_Bljh = [ - 'pk_storereq_b.pk_material', - 'pk_storereq_b.pk_srcmaterial', - 'pk_storereq_b.cvendorid' //供应商 + 'mm_pickm_b.pk_material', + 'mm_pickm_b.pk_srcmaterial', + 'mm_pickm_b.cvendorid' //供应商 ]; const PK = { headBljh: 'mm_pickm',