parent
							
								
									e39bfcf3b3
								
							
						
					
					
						commit
						a947bde88b
					
				|  | @ -104,5 +104,6 @@ | |||
|     "20020VRIFYPAGE-000103": "为必输项,请知悉", | ||||
|     "20020VRIFYPAGE-000104": "刷新成功", | ||||
|     "20020VRIFYPAGE-000105": "辅助核算不符合核销对象设置!", | ||||
|     "20020VRIFYPAGE-000106": "核销历史查询" | ||||
|     "20020VRIFYPAGE-000106": "核销历史查询", | ||||
|     "20020VRIFYPAGE-000107": "异币种核销" | ||||
| } | ||||
|  | @ -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(); | ||||
|  |  | |||
|  | @ -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=*/ | ||||
|  | @ -37,7 +37,7 @@ export default function handleQueryClick(state,data,isrefreah){ | |||
|     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; | ||||
|  | @ -200,6 +200,7 @@ export default function handleQueryClick(state,data,isrefreah){ | |||
|                     const disabledButtonsArr = [ | ||||
|                         "verificationCancel", | ||||
|                         "RB_hedging", | ||||
|                         "cross_currency_v", | ||||
|                         "auto_verificationCancel", | ||||
|                         "auto_RB_hedging", | ||||
|                         "full_match", | ||||
|  |  | |||
|  | @ -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=*/ | ||||
|  | @ -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", | ||||
|  | @ -19,6 +20,7 @@ export default function(props) { | |||
|           const disabledButtonsArr = [ | ||||
|             "verificationCancel", | ||||
|             "RB_hedging", | ||||
|             "cross_currency_v", | ||||
|             "auto_verificationCancel", | ||||
|             "auto_RB_hedging", | ||||
|             "full_match", | ||||
|  |  | |||
|  | @ -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:'', | ||||
|  | @ -359,6 +366,8 @@ export default class SearchModal extends Component { | |||
|                                 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 /> | ||||
|  | @ -606,6 +615,44 @@ export default class SearchModal extends Component { | |||
|                                         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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue