往来核销处理:

1.查询条件-币种支持多选
2.异币种核销
This commit is contained in:
xyz 2025-03-04 16:48:38 +08:00
parent e39bfcf3b3
commit a947bde88b
9 changed files with 343 additions and 114 deletions

View File

@ -104,5 +104,6 @@
"20020VRIFYPAGE-000103": "为必输项,请知悉",
"20020VRIFYPAGE-000104": "刷新成功",
"20020VRIFYPAGE-000105": "辅助核算不符合核销对象设置!",
"20020VRIFYPAGE-000106": "核销历史查询"
}
"20020VRIFYPAGE-000106": "核销历史查询",
"20020VRIFYPAGE-000107": "异币种核销"
}

View File

@ -27,4 +27,4 @@ export default function (props) {
});
}
/*pmFWCFu5nhKkBzYmrkBakUskA4/xbWYlI8OGOG8a3xA=*/
/*pmFWCFu5nhKkBzYmrkBakUskA4/xbWYlI8OGOG8a3xA=*/

View File

@ -77,7 +77,7 @@ export default class SearchModal extends Component {
let self=this;
let {loadData,showOrHide,modalDefaultValue}=nextProp;
let { listItem,showModal,isShowUnit,childAssData }=self.state;
if (showOrHide&&nextProp.loadData != self.state.loadData&&self.state.loadData.length==0 ) {
childAssData.pk_org=modalDefaultValue.pk_org;
childAssData.accountingbook_org=modalDefaultValue.pk_org;
@ -113,7 +113,7 @@ export default class SearchModal extends Component {
isMustItem:item.isMustItem,
itemName:item.itemName
}
}
}
} else if (item.itemType == "radio") {
if(item.itemKey=='dateType'){
key = {
@ -124,7 +124,7 @@ export default class SearchModal extends Component {
value: item.itemChild[0].value
};
}
}else{
key={
value:''
@ -154,7 +154,7 @@ export default class SearchModal extends Component {
let name= item.itemKey;
listItem[name]=key
}
})
listItem['begin_date']={value:modalDefaultValue.begindate};
listItem['end_date']={value:modalDefaultValue.bizDate};
@ -229,23 +229,23 @@ export default class SearchModal extends Component {
// let currrentDate = getNowFormatDate();
let dateInputPlaceholder = this.state.json['20020VRIFYHISTORY-000038'];/* 国际化处理: 选择日期*/
let businessInfo = getBusinessInfo();
let currrentDate = businessInfo.businessDate.split(' ')[0];
let currrentDate = businessInfo.businessDate.split(' ')[0];
let { listItem,isShowUnit,assData,checkedArray,childAssData,assidCondition,modalDefaultValue } =self.state;
return data.length!=0?(
data.map((item, i) => {
data.map((item, i) => {
switch (item.itemType) {
case 'refer':
let referUrl= item.config.refCode+'/index.js';
let DBValue=[];
let defaultValue={}
if(listItem[item.itemKey].length){
if(listItem[item.itemKey].length){
listItem[item.itemKey].map((item,index)=>{
DBValue[index]={ refname: item.display, refpk:item.value };
})
}else{
defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
}
//let defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
//let defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
if(!self.state[item.itemKey]){
{createScript.call(self,referUrl,item.itemKey)}
return <div />
@ -299,7 +299,7 @@ export default class SearchModal extends Component {
self.setState({
isShowUnit,childAssData,assidCondition
})
}
}
}
});
}
@ -340,8 +340,8 @@ export default class SearchModal extends Component {
"pk_accountingbook": listItem.pk_accountingbook.value? listItem.pk_accountingbook.value:'',
"dateStr":currrentDate,
"TreeRefActionExt":'nccloud.web.gl.verify.action.VerifyObjectRefSqlBuilder'
},config)
},config)
},
onFocus:(v)=>{
if(!listItem.pk_accountingbook.value){
@ -364,7 +364,7 @@ export default class SearchModal extends Component {
pk_accasoa: v.refpk,
prepareddate: currrentDate,
};
ajax({
url:url,
data:queryData,
@ -395,7 +395,7 @@ export default class SearchModal extends Component {
self.setState({
assData,checkedArray
})
}
}
}
});
}
@ -454,7 +454,7 @@ export default class SearchModal extends Component {
childAssData.pk_org =childAssData.accountingbook_org;
assidCondition.pk_org=childAssData.accountingbook_org;
}
//辅助核算项的值
assData.map((item,index)=>{
item.checkvaluename =null;
@ -473,7 +473,7 @@ export default class SearchModal extends Component {
}else{
return(<div/>)
}
}else{
return(
<FormItem
@ -494,7 +494,7 @@ export default class SearchModal extends Component {
//"pk_accountingbook": self.state.pk_accountingbook.value
},config)
},
onChange:(v)=>{
onChange:(v)=>{
listItem[item.itemKey].value = v.refpk
listItem[item.itemKey].display = v.refname
this.setState({
@ -646,9 +646,9 @@ export default class SearchModal extends Component {
method="change"
inputAfter={
<Col xs={12} md={12} sm={12}>
<span className="online">&nbsp;--&nbsp;</span>
<span className="online">&nbsp;--&nbsp;</span>
<div style={{display:'inline-block'}} >
<NCNumber
<NCNumber
fieldid="mny_end"
scale={2}
value={listItem.mny_end.value}
@ -658,11 +658,11 @@ export default class SearchModal extends Component {
listItem
})
}}
/>
</div>
/>
</div>
</Col>}
>
<NCNumber
<NCNumber
fieldid="mny_begin"
scale={2}
value={listItem.mny_begin.value}
@ -674,7 +674,7 @@ export default class SearchModal extends Component {
}}
/>
</FormItem>
// </Col>
// </Col>
// </Row>
);
case 'radio':
@ -699,7 +699,7 @@ export default class SearchModal extends Component {
type="customer"
defaultValue={listItem[item.itemKey].value}
items={() => {
return (item.itemChild)
return (item.itemChild)
}}
onChange={(v)=>{
listItem[item.itemKey].value = v
@ -728,14 +728,14 @@ export default class SearchModal extends Component {
>
<SelectItem name={item.itemKey}
fieldid={item.itemKey}
// defaultValue={this.state[item.itemKey].value?this.state[item.itemKey].value:'all'}
// defaultValue={this.state[item.itemKey].value?this.state[item.itemKey].value:'all'}
items = {
() => {
return (item.itemChild)
return (item.itemChild)
}
}
onChange={(v)=>{
listItem[item.itemKey].value = v
this.setState({
listItem
@ -756,15 +756,15 @@ export default class SearchModal extends Component {
method="change"
// change={self.handleGTypeChange.bind(this, 'contracttype')}
>
<CheckboxItem name={item.itemKey}
//defaultValue={this.state.periodloan.value}
<CheckboxItem name={item.itemKey}
//defaultValue={this.state.periodloan.value}
boxs = {
() => {
return (item.itemChild)
return (item.itemChild)
}
}
onChange={(v)=>{
}}
/>
</FormItem>
@ -774,7 +774,7 @@ export default class SearchModal extends Component {
}
})
):<div/>;
}
@ -808,7 +808,7 @@ export default class SearchModal extends Component {
checkedArray: checkedArray,
});
};
renderColumnsMultiSelect(columns) {
const {checkedArray } = this.state;
const { multiSelect } = this.props;
@ -931,7 +931,7 @@ export default class SearchModal extends Component {
// },config)
// } else {
// if (record.classid == '40d39c26-a2b6-4f16-a018-45664cac1a1f') {//人员
config.isShowDimission=true;
config.isShowDimission=true;
return Object.assign({
"busifuncode": "all",
"pk_org": childAssData.pk_org
@ -941,7 +941,7 @@ export default class SearchModal extends Component {
// "pk_org": childAssData.pk_org
// },config)
// }
// }
},
onChange: (v) => {
@ -953,7 +953,7 @@ export default class SearchModal extends Component {
refnameArr.push(arr.refname);
refpkArr.push(arr.refpk);
refcodeArr.push(arr.refcode);
})
originData.checkvaluename = refnameArr.join();
originData.pk_Checkvalue = refpkArr.join();
@ -1002,7 +1002,7 @@ export default class SearchModal extends Component {
refnameArr.push(arr.refname);
refpkArr.push(arr.refpk);
refcodeArr.push(arr.refcode);
})
originData.checkvaluename = refnameArr.join();
originData.pk_Checkvalue = refpkArr.join();
@ -1041,7 +1041,7 @@ export default class SearchModal extends Component {
assData, childAssData
})
}}
/>
)
} else if (record.classid == 'BS000010000100001031') {//数值
@ -1126,7 +1126,7 @@ export default class SearchModal extends Component {
// originData.pk_Checkvalue =assArr;
// originData.checkvaluecode=assArr;
// }
// childAssData.assData=assData;
// childAssData.assData=assData;
// this.setState({
// assData,childAssData
// })
@ -1155,7 +1155,7 @@ export default class SearchModal extends Component {
/>
)
}
}
}
}
@ -1213,4 +1213,4 @@ export default class SearchModal extends Component {
}
SearchModal.defaultProps = defaultProps12;
/*nJFEVIQK/X4J2qzRu8A3m/q9DNS/i4EKyyoJYy7lp/Y=*/
/*nJFEVIQK/X4J2qzRu8A3m/q9DNS/i4EKyyoJYy7lp/Y=*/

View File

@ -1,6 +1,6 @@
/*q2LCmxM8POvl78IL0Liydo5bohca3dvG3wsSHNuPiA4=*/
import {toast } from 'nc-lightapp-front';
import {handleVerify, handleHedging,handleUnMatch} from "./index.js";
import {handleVerify, handleHedging,handleUnMatch,handleCrossCurrency} from "./index.js";
// import {voucherRelatedApp} from "../../../../public/components/oftenApi.js";
// import {voucher_link,voucher_gen} from "../../../../public/components/constJSON";
import { openToVoucher } from '../../../../public/common/voucherUtils';
@ -25,6 +25,11 @@ export default function buttonClick(props, id) {
handleHedging(this);
break;
// 异币种核销
case 'cross_currency_v':
handleCrossCurrency(this);
break;
// 自动核销
case 'auto_verificationCancel':
this.handleAutoVerifyClick();
@ -101,11 +106,11 @@ export default function buttonClick(props, id) {
// }
// )
break;
break;
default:
break;
}
}
/*q2LCmxM8POvl78IL0Liydo5bohca3dvG3wsSHNuPiA4=*/
/*q2LCmxM8POvl78IL0Liydo5bohca3dvG3wsSHNuPiA4=*/

View File

@ -0,0 +1,172 @@
/*mjYQ3YU0f86RWZ9JI+KJHpmHaFiWPWGuKf7NDRh+ig8=*/
import {ajax,deepClone,promptBox,toast} from 'nc-lightapp-front';
import verifyUnverifySum from './verifyUnverifySum';
export default function handleCrossCurrency(self){
//todo
console.log('异币种核销=============')
return false
let url= '/nccloud/gl/verify/onverify.do';
let {creditDataArr,creditSelectedData,debitSelectedData,queryCondition}=self.state;
creditSelectedData=self.filterSelectedData('credit');//获取借方选中的数据
debitSelectedData=self.filterSelectedData('debit');//获取借方选中的数据
if(debitSelectedData.length<=0||creditSelectedData.length<=0){
toast({ content: self.state.json['20020VRIFYPAGE-000014'], color: 'warning' });/* 国际化处理: 请选择借贷两方数据进行核销*/
return false;
}
if(self.handleSumCY('debit')!=self.handleSumCY('credit')){
promptBox({
color:'info',
title:self.state.json['20020VRIFYPAGE-000009'],/* 国际化处理: 提示*/
content:self.state.json['20020VRIFYPAGE-000015'],/* 国际化处理: 参加核销的借贷方金额不相等,是否强制核销?*/
noFooter: false, // 是否显示底部按钮(确定、取消),默认显示(false),非必输
noCancelBtn: false, // 是否显示取消按钮,,默认显示(false),非必输
beSureBtnName:self.state.json['20020VRIFYPAGE-000011'], // 确定按钮名称, 默认为"确定",非必输/* 国际化处理: 确定*/
cancelBtnName:self.state.json['20020VRIFYPAGE-000012'], // 取消按钮名称, 默认为"取消",非必输/* 国际化处理: 取消*/
beSureBtnClick: dealOperate.bind(self,url,creditSelectedData,debitSelectedData,queryCondition), // 确定按钮点击调用函数,非必输
cancelBtnClick: cancelBtnClick.bind(self) // 取消按钮点击调用函数,非必输
})
}else{
dealOperate.call(self,url,creditSelectedData,debitSelectedData,queryCondition);
}
}
export function dealOperate(url,creditSelectedData,debitSelectedData,queryCondition){
let self=this;
let {creditDataArr,checkedAllDebit,checkedAllCredit,firstCheckedDatas,resourceData_credit,resourceData_debit,
checkedArrayCredit,checkedArrayDebit,creditBoxClicked,debitBoxClicked,creditOrDebitFlag,voucherVerifyflag}=self.state;
if(voucherVerifyflag=='0'){//及时核销,不能把本方的选中状态去掉
if(creditOrDebitFlag=='debit'){
checkedAllCredit=false;
checkedArrayCredit=[];
queryCondition.end_date=debitSelectedData[0].m_prepareddate.display;
}else if(creditOrDebitFlag=='credit'){
checkedAllDebit=false;
checkedArrayDebit=[];
queryCondition.end_date=creditSelectedData[0].m_prepareddate.display;
}
}else{
checkedAllDebit=false;
checkedAllCredit=false;
checkedArrayCredit=[];
checkedArrayDebit=[];
}
let queryData={
"credit":creditSelectedData,
"debit":debitSelectedData,
"condition":queryCondition
}
firstCheckedDatas.type='';//借方还是贷方
firstCheckedDatas.assinfo={};//选中行的严格控制的辅助核算信息
ajax({
url:url,
data:queryData,
success: function(response){
const { data, success } = response;
if(success){
let creditData = data.credit;
let debitData = data.debit;
creditBoxClicked=false;
debitBoxClicked=false;
if(creditData){
creditData.map((item,i)=>{
item.key=i;
//定义两个临时变量存储未核销的原币和组织本币
item.empty_m_Balancecreditamount={
display:item.m_Balancecreditamount.value,
value:item.m_Balancecreditamount.value
}
item.empty_m_Balancelocalcreditamount={
display:item.m_Balancelocalcreditamount.value,
value :item.m_Balancelocalcreditamount.value
}
if(voucherVerifyflag=='0'&&creditOrDebitFlag=='credit'){//及时核销,不能把本方的选中状态去掉
item.m_dCredit_Money_Y=deepClone(item.m_Balancecreditamount);
item.m_dCredit_Money_B=deepClone(item.m_Balancelocalcreditamount);
item.m_Balancecreditamount.display=0;
item.m_Balancecreditamount.value=0;
item.m_Balancelocalcreditamount.display=0;
item.m_Balancelocalcreditamount.value=0;
creditBoxClicked=true;
if (!firstCheckedDatas.type) {//如果未选中一行数据,先选中第一行
creditData[0].m_voAss.map((item, index) => {
if (queryCondition.isControlItems.indexOf(item.m_pk_checktype) != -1) {
firstCheckedDatas.assinfo[item.m_pk_checktype] = item.m_pk_checkvalue;
}
})
firstCheckedDatas.type = 'credit';
}
}else{
checkedArrayCredit.push(false);
}
})
}else{
creditData=[];
checkedArrayCredit=[];
}
if(debitData){
debitData.map((item,i)=>{
item.key=i;
//定义两个临时变量存储未核销的原币和组织本币
//定义两个临时变量存储未核销的原币和组织本币
item.empty_m_Balancedebitamount={
display:item.m_Balancedebitamount.value,
value:item.m_Balancedebitamount.value
}
item.empty_m_Balancelocaldebitamount={
display:item.m_Balancelocaldebitamount.value,
value:item.m_Balancelocaldebitamount.value
}
if(voucherVerifyflag=='0'&&creditOrDebitFlag=='debit'){//及时核销,不能把本方的选中状态去掉
item.m_dDebit_Money_Y=deepClone(item.m_Balancedebitamount);
item.m_dDebit_Money_B=deepClone(item.m_Balancelocaldebitamount);
item.m_Balancedebitamount.display=0;
item.m_Balancedebitamount.value=0;
item.m_Balancelocaldebitamount.display=0;
item.m_Balancelocaldebitamount.value=0;
debitBoxClicked=true;
if (!firstCheckedDatas.type) {//如果未选中一行数据,先选中第一行
debitData[0].m_voAss.map((item, index) => {
if (queryCondition.isControlItems.indexOf(item.m_pk_checktype) != -1) {
firstCheckedDatas.assinfo[item.m_pk_checktype] = item.m_pk_checkvalue;
}
})
firstCheckedDatas.type = 'debit';
}
}else{
checkedArrayDebit.push(false);
}
})
}else{
debitData=[];
checkedArrayDebit=[];
}
resourceData_credit=JSON.parse(JSON.stringify(creditData));
resourceData_debit=JSON.parse(JSON.stringify(debitData));
self.setState({
resourceData_credit,resourceData_debit,
creditDataArr: creditData,
debitDataArr: debitData,
creditBoxClicked,//贷方选中
debitBoxClicked,//借方选中
checkedArrayCredit,checkedArrayDebit,checkedAllDebit,checkedAllCredit,
firstCheckedDatas
},()=>{
verifyUnverifySum(self);
if(voucherVerifyflag=='0'){
self.props.refreshVoucherData();//及时核销成功刷新凭证卡片数据
}
})
} else {
toast({ content: self.state.json['20020VRIFYPAGE-000006'], color: 'warning' });/* 国际化处理: 没有获取数据*/
}
}
});
}
export function cancelBtnClick(){
return false;
}
/*mjYQ3YU0f86RWZ9JI+KJHpmHaFiWPWGuKf7NDRh+ig8=*/

View File

@ -7,7 +7,7 @@ export default function handleQueryClick(state,data,isrefreah){
let {defaultStatu,mockData,creditDataArr,debitDataArr,checkedAllDebit,checkedAllCredit,checkedArrayCredit,checkedArrayDebit,
modalDefaultValue,isControl,queryCondition,pk_accasoa,pk_accountingbook,resourceData_credit,resourceData_debit,CompareStatus,
resourveQuery,creditOrDebitFlag,voucherVerifyflag,creditScale_Y,creditScale_B,debitScale_Y,debitScale_B,
creditBoxClicked,debitBoxClicked,firstCheckedDatas} = state;
creditBoxClicked,debitBoxClicked,firstCheckedDatas} = state;
resourveQuery=data;
let childData = JSON.parse(JSON.stringify(data));//deepClone(data);
if(voucherVerifyflag=='0'){//及时核销,不能把本方的选中状态去掉
@ -30,14 +30,14 @@ export default function handleQueryClick(state,data,isrefreah){
resourceData_debit=[];
creditDataArr=[];
debitDataArr=[];
defaultStatu=false;
defaultStatu=false;
let url = '/nccloud/gl/verify/query.do';
pk_accasoa.display=childData.pk_accasoa.display;
pk_accountingbook.display=childData.pk_accountingbook.display;
for(let k in childData){
if(k=='ass'||k=='resourceAss'||k=='account_currency'||k=='cashtype'||k=='pk_org'||k=='isShowUnit'
||k=='isControl'||k=='endflag'||k=='isCrossAccountVerify'||k=='isControlItems'){
}else if(k=='pk_units'){
}else if(k=='pk_units'||k=='pk_currency'){
if(childData[k].length>0){
if(childData[k][0].value==""){
childData[k]=null;
@ -54,10 +54,10 @@ export default function handleQueryClick(state,data,isrefreah){
}
}
if(voucherVerifyflag=='0'){
childData.type='0';//type=0是即时核销type=1 是普通核销
childData.type='0';//type=0是即时核销type=1 是普通核销
childData.pk_detail=queryCondition.pk_detail?queryCondition.pk_detail:null;
}else{
childData.type='1';//type=0是即时核销type=1 是普通核销
childData.type='1';//type=0是即时核销type=1 是普通核销
}
isControl=childData.isControl;
if(childData.isShowUnit==undefined){
@ -81,13 +81,13 @@ export default function handleQueryClick(state,data,isrefreah){
if((creditDataArr&&creditDataArr.length>0) || (debitDataArr&&debitDataArr.length>0)){
if(isrefreah){
toast({ title: self.state.json['20020VRIFYPAGE-000104'], color: "success" })/* 国际化处理: 刷新成功*/
}else{
let creditDataLen = creditDataArr&&creditDataArr.length ? creditDataArr.length: 0;
let debitDataLen = debitDataArr&&debitDataArr.length ? debitDataArr.length :0;
toast({ content: self.state.inlt && self.state.inlt.get('20020VRIFYPAGE-000101',{credit : creditDataLen , debit : debitDataLen}), color: "success" })
}
}
}else{
if(isrefreah){
toast({ title: self.state.json['20020VRIFYPAGE-000104'], color: "success" })
@ -96,7 +96,7 @@ export default function handleQueryClick(state,data,isrefreah){
toast({ content: self.state.json['20020VRIFYPAGE-000100'], color: "warning" })/* 国际化处理: 未查询出符合条件的数据*/
}
}
if(creditDataArr&&creditDataArr.length>0){//贷方
creditScale_Y=creditDataArr[0].m_creditamount.scale;
creditScale_B=creditDataArr[0].m_localcreditamount.scale;
@ -130,10 +130,10 @@ export default function handleQueryClick(state,data,isrefreah){
}else{
checkedArrayCredit.push(false);
}
defaultStatu=true;
})
}else{
creditDataArr=[];
}
@ -171,10 +171,10 @@ export default function handleQueryClick(state,data,isrefreah){
checkedArrayDebit.push(false);
}
defaultStatu=true;
})
})
}else{
debitDataArr=[];
debitDataArr=[];
}
resourceData_credit=JSON.parse(JSON.stringify(creditDataArr));//$$creditData;
resourceData_debit=JSON.parse(JSON.stringify(debitDataArr));//$$debitData;
@ -196,10 +196,11 @@ export default function handleQueryClick(state,data,isrefreah){
},()=>{
verifyUnverifySum(self);
self.handleSumAmount('credit');
self.handleSumAmount('debit');
self.handleSumAmount('debit');
const disabledButtonsArr = [
"verificationCancel",
"RB_hedging",
"cross_currency_v",
"auto_verificationCancel",
"auto_RB_hedging",
"full_match",
@ -239,4 +240,4 @@ export default function handleQueryClick(state,data,isrefreah){
});
}
/*u4fuI16HuMDfqDwHbJz/3UlZJIe0ygck8CqbI2WILwc=*/
/*u4fuI16HuMDfqDwHbJz/3UlZJIe0ygck8CqbI2WILwc=*/

View File

@ -2,6 +2,7 @@
import handleQueryClick from './handleQueryClick';
import handleVerify from './handleVerify';
import handleHedging from './handleHedging';
import handleCrossCurrency from './handleCrossCurrency';
import handleAutoVerify from './handleAutoVerify';
import handleAutoHedging from './handleAutoHedging';
import compareOtherData from './compareOtherData';
@ -12,7 +13,7 @@ import initTemplate from './initTemplate';
import buttonClick from './buttonClick';
import iseqAssinfo from './iseqAssinfo';
export {initTemplate,buttonClick };
export {handleQueryClick,handleVerify,handleHedging,handleAutoVerify,handleAutoHedging,
export {handleQueryClick,handleVerify,handleHedging,handleCrossCurrency,handleAutoVerify,handleAutoHedging,
compareOtherData,handleUnMatch,matchOtherData,verifyUnverifySum,iseqAssinfo}
/*jdNRuZuduINgBy4HapEa4fqmBMzA+9W4I6NnfWBJr/o=*/
/*jdNRuZuduINgBy4HapEa4fqmBMzA+9W4I6NnfWBJr/o=*/

View File

@ -2,6 +2,7 @@
import {ajax,base} from "nc-lightapp-front";
const pageCode = "20020VRIFYPAGE";
export default function(props) {
let appcode = props.getSearchParam("c");
ajax({
url: "/nccloud/platform/appregister/queryallbtns.do",
@ -13,12 +14,13 @@ export default function(props) {
success: function(res) {
if (res.data) {
let button = res.data;
props.button.setButtons(button, () => {
// 设置进入页面时的不可用按钮
const disabledButtonsArr = [
"verificationCancel",
"RB_hedging",
"cross_currency_v",
"auto_verificationCancel",
"auto_RB_hedging",
"full_match",
@ -34,4 +36,4 @@ export default function(props) {
});
}
/*pmFWCFu5nhKkBzYmrkBakUskA4/xbWYlI8OGOG8a3xA=*/
/*pmFWCFu5nhKkBzYmrkBakUskA4/xbWYlI8OGOG8a3xA=*/

View File

@ -89,6 +89,7 @@ export default class SearchModal extends Component {
item.key=index;
checkedArray.push(true);
})
//console.log(loadData)
loadData.forEach((item,i)=>{
let key;
if(item.itemType=='refer'){
@ -107,12 +108,18 @@ export default class SearchModal extends Component {
itemName:item.itemName
}
}else if(item.itemKey=='pk_currency'){
key={
key=[{
display:modalDefaultValue.pk_currency.display,
value:modalDefaultValue.pk_currency.value,
isMustItem:item.isMustItem,
itemName:item.itemName
}
itemName:item.itemName,
}]
/*key={
display:modalDefaultValue.pk_currency.display,
value:modalDefaultValue.pk_currency.value,
isMustItem:item.isMustItem,
itemName:item.itemName,
}*/
}else{
key={
display:'',
@ -120,7 +127,7 @@ export default class SearchModal extends Component {
isMustItem:item.isMustItem,
itemName:item.itemName
}
}
}
}else if(item.itemType=='select'||item.itemType=='Dbselect'||item.itemType=='radio'){//下拉框赋初始值
if(item.itemKey=='cmbDirect'){
key={
@ -135,7 +142,7 @@ export default class SearchModal extends Component {
value:item.itemChild[0].value
}
}
}else if(item.itemType=='checkbox'){
item.itemChild[0].checked=modalDefaultValue.hasTally=='Y'?true:false;
key={
@ -170,7 +177,7 @@ export default class SearchModal extends Component {
let name= item.itemKey;
listItem[name]=key
}
})
if(this.props.voucherVerifyflag=='0'){//及时核销 设置科目并且不可编辑
listItem['pk_accasoa']=modalDefaultValue.pk_accasoa;
@ -182,7 +189,7 @@ export default class SearchModal extends Component {
listItem['begin_date']={value:modalDefaultValue.begindate};
listItem['end_date']={value:modalDefaultValue.bizDate};
}
listItem.account_currency=modalDefaultValue.account_currency;
listItem.pk_org = modalDefaultValue.pk_org;
self.setState({
@ -246,7 +253,7 @@ export default class SearchModal extends Component {
promptBox({
color:'warning',
content:this.state.json["20020VRIFYPAGE-000105"],/* 辅助核算不符合核销对象设置! */
noCancelBtn: true
noCancelBtn: true
});
return;
}
@ -345,20 +352,22 @@ export default class SearchModal extends Component {
const dateInputPlaceholder = this.state.json['20020VRIFYPAGE-000083'];/* 国际化处理: 选择日期*/
let { listItem,isShowUnit,mnyScale,scale,orgscale,groupscale,globalscale,NC001,NC002,assData,checkedArray,isCrossAccountVerify,childAssData,assidCondition,modalDefaultValue } =self.state;
return data.length!=0?(
data.map((item, i) => {
data.map((item, i) => {
switch (item.itemType) {
case 'refer':
let referUrl= item.config.refCode+'/index.js';
let DBValue=[];
let defaultValue={}
if(listItem[item.itemKey].length){
if(listItem[item.itemKey].length){
listItem[item.itemKey].map((item,index)=>{
DBValue[index]={ refname: item.display, refpk:item.value };
})
}else{
defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
}
//let defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
//let defaultValue = { refname: listItem[item.itemKey].display, refpk: listItem[item.itemKey].value };
// console.log('item=======================')
// console.log(item)
if(!self.state[item.itemKey]){
{createScript.call(self,referUrl,item.itemKey)}
return <div />
@ -425,7 +434,7 @@ export default class SearchModal extends Component {
self.setState({
isShowUnit,scale,orgscale,groupscale,globalscale,NC001,NC002,isCrossAccountVerify,assidCondition
})
}
}
}
});
}
@ -468,8 +477,8 @@ export default class SearchModal extends Component {
"pk_accountingbook": listItem.pk_accountingbook.value? listItem.pk_accountingbook.value:'',
"dateStr":currrentDate,
"TreeRefActionExt":'nccloud.web.gl.verify.action.VerifyObjectRefSqlBuilder'
},config)
},config)
},
onFocus:(v)=>{
if(!listItem.pk_accountingbook.value){
@ -478,7 +487,7 @@ export default class SearchModal extends Component {
}
},
onChange:(v)=>{
//根据选定的pk 实现过滤
if(item.itemKey!='pk_accountingbook'&&!listItem.pk_accountingbook.value){
toast({ content: this.state.json['20020VRIFYPAGE-000091'], color: 'warning' });/* 国际化处理: 请先选择核算账簿*/
@ -524,7 +533,7 @@ export default class SearchModal extends Component {
self.setState({
assData,checkedArray
})
}
}
}
});
}
@ -605,7 +614,45 @@ export default class SearchModal extends Component {
}else{
return(<div/>)
}
}else if(item.itemKey=='pk_currency'){ //币种
return(
<FormItem
inline={true}
showMast={item.isMustItem}
labelXs={2} labelSm={2} labelMd={2}
xs={10} md={10} sm={10}
labelName={item.itemName}
// isRequire={true}
method="change"
>
{self.state[item.itemKey]?(self.state[item.itemKey])(
{
fieldid:item.itemKey,
value:DBValue,
disabled:(self.props.voucherVerifyflag=='0')?true:false,
isMultiSelectedEnabled:true, //多选
queryCondition:() => {
return Object.assign({
},config)
},
onChange:(v)=>{
listItem[item.itemKey]=[];
v.map((arr,index)=>{
let currency={
display:arr.refname,
value:arr.refpk
}
listItem[item.itemKey].push(currency);
})
// console.log(listItem)
this.setState({
listItem
})
}
}
):<div/>}
</FormItem>)
}else{
return(
<FormItem
@ -627,12 +674,12 @@ export default class SearchModal extends Component {
//"pk_accountingbook": self.state.pk_accountingbook.value
},config)
},
onChange:(v)=>{
listItem[item.itemKey].value = v.refpk
listItem[item.itemKey].display = v.refname
this.setState({
listItem
})
onChange:(v)=>{
listItem[item.itemKey].value = v.refpk
listItem[item.itemKey].display = v.refname
this.setState({
listItem
})
}
}
):<div/>}
@ -766,9 +813,9 @@ export default class SearchModal extends Component {
method="change"
inputAfter={
<div style={{display:'inline-block'}} >
<span className="online">&nbsp;--&nbsp;</span>
<span className="online">&nbsp;--&nbsp;</span>
<div style={{display:'inline-block'}} >
<NCNumber
<NCNumber
fieldid="mny_end"
scale={Number(mnyScale)}
value={listItem.mny_end.value}
@ -783,7 +830,7 @@ export default class SearchModal extends Component {
</div>
}
>
<NCNumber
<NCNumber
fieldid="mny_begin"
scale={Number(mnyScale)}
value={listItem.mny_begin.value}
@ -818,7 +865,7 @@ export default class SearchModal extends Component {
type="customer"
defaultValue={listItem[item.itemKey].value}
items={() => {
return (item.itemChild)
return (item.itemChild)
}}
onChange={(v)=>{
listItem[item.itemKey].value = v
@ -842,12 +889,12 @@ export default class SearchModal extends Component {
sm={10}
labelName={item.itemName}
// isRequire={true}
method="change"
method="change"
>
<SelectItem
<SelectItem
name={item.itemKey}
fieldid={item.itemKey}
defaultValue={listItem[item.itemKey].value}
defaultValue={listItem[item.itemKey].value}
disabled={(self.props.voucherVerifyflag=='0')?true:false}
items = {
() => {
@ -895,7 +942,7 @@ export default class SearchModal extends Component {
method="change"
inputAfter={
<Col xs={12} md={12} sm={12} className="dateMargin labelMargin">
<NCNumber
<NCNumber
fieldid="mny_begin"
scale={Number(mnyScale)}
value={listItem.mny_begin.value}
@ -906,9 +953,9 @@ export default class SearchModal extends Component {
})
}}
/>
<span className="online">&nbsp;--&nbsp;</span>
<span className="online">&nbsp;--&nbsp;</span>
<div style={{display:'inline-block'}} >
<NCNumber
<NCNumber
fieldid="mny_end"
scale={Number(mnyScale)}
value={listItem.mny_end.value}
@ -963,13 +1010,13 @@ export default class SearchModal extends Component {
className='checkboxStyle'
method="change"
>
<CheckboxItem
name={item.itemKey}
<CheckboxItem
name={item.itemKey}
fieldid={item.itemKey}
//defaultValue={this.state.periodloan.value}
//defaultValue={this.state.periodloan.value}
boxs = {
() => {
return (item.itemChild)
return (item.itemChild)
}
}
onChange={(v)=>{
@ -986,7 +1033,7 @@ export default class SearchModal extends Component {
}
})
):<div/>;
}
@ -1020,7 +1067,7 @@ export default class SearchModal extends Component {
checkedArray: checkedArray,
});
};
renderColumnsMultiSelect(columns) {
const {checkedArray } = this.state;
const { multiSelect } = this.props;
@ -1119,7 +1166,7 @@ export default class SearchModal extends Component {
//isRequire={true}
method="change"
>
{this.state[record.refnodename] ?
{this.state[record.refnodename] ?
(this.state[record.refnodename])(
{
value: defaultValue,
@ -1159,7 +1206,7 @@ export default class SearchModal extends Component {
refnameArr.push(arr.refname);
refpkArr.push(arr.refpk);
refcodeArr.push(arr.refcode);
})
originData.checkvaluename = (v.length>0)?refnameArr.join():null;
originData.pk_Checkvalue = (v.length>0)?refpkArr.join():null;
@ -1208,7 +1255,7 @@ export default class SearchModal extends Component {
refnameArr.push(arr.refname);
refpkArr.push(arr.refpk);
refcodeArr.push(arr.refcode);
})
originData.checkvaluename = (v.length>0)?refnameArr.join():null;
originData.pk_Checkvalue = (v.length>0)?refpkArr.join():null;
@ -1247,7 +1294,7 @@ export default class SearchModal extends Component {
assData, childAssData
})
}}
/>
)
} else if (record.classid == 'BS000010000100001031') {//数值
@ -1341,7 +1388,7 @@ export default class SearchModal extends Component {
/>
)
}
}
}
}
@ -1386,7 +1433,7 @@ export default class SearchModal extends Component {
<div className="getAssDatas">
{getAssDatas({pretentAssData})}
</div>
</Modal.Body>
<Modal.Footer fieldid="bottom_area">
<Button colors="primary" onClick={ this.confirm } fieldid="confirm"> {this.state.json['20020VRIFYPAGE-000061']} </Button>{/* 国际化处理 查询*/}
@ -1399,4 +1446,4 @@ export default class SearchModal extends Component {
}
SearchModal.defaultProps = defaultProps12;
/*bUd6j32gDOqGz4ZuopC5zxfEJaQ5jTVUffm4Tj30IuI=*/
/*bUd6j32gDOqGz4ZuopC5zxfEJaQ5jTVUffm4Tj30IuI=*/