核销和异币种核销: 币种校验
This commit is contained in:
		
							parent
							
								
									b822d549cd
								
							
						
					
					
						commit
						6d1d76f383
					
				|  | @ -105,5 +105,7 @@ | |||
|     "20020VRIFYPAGE-000104": "刷新成功", | ||||
|     "20020VRIFYPAGE-000105": "辅助核算不符合核销对象设置!", | ||||
|     "20020VRIFYPAGE-000106": "核销历史查询", | ||||
|     "20020VRIFYPAGE-000107": "异币种核销" | ||||
|     "20020VRIFYPAGE-000107": "异币种核销", | ||||
|     "20020VRIFYPAGE-000108": "只能选择同币种", | ||||
|     "20020VRIFYPAGE-000109": "只能选择异币种" | ||||
| } | ||||
|  |  | |||
|  | @ -6,7 +6,6 @@ export default function handleCrossCurrency(self){ | |||
|     console.log('异币种核销=============') | ||||
|     // return false
 | ||||
| 
 | ||||
| 
 | ||||
|     let url= '/nccloud/gl/verify/onverifyMul.do'; | ||||
|     let {creditDataArr,creditSelectedData,debitSelectedData,queryCondition}=self.state; | ||||
|     creditSelectedData=self.filterSelectedData('credit');//获取借方选中的数据
 | ||||
|  | @ -15,6 +14,17 @@ export default function handleCrossCurrency(self){ | |||
|         toast({ content: self.state.json['20020VRIFYPAGE-000014'], color: 'warning' });/* 国际化处理: 请选择借贷两方数据进行核销*/ | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     // 异币种校验
 | ||||
|     if(creditSelectedData.length||debitSelectedData.length){ | ||||
|         let same1 = creditSelectedData.some(function (value, index) { return value.m_pk_currtype.value !== creditSelectedData[0].m_pk_currtype.value}) | ||||
|         let same2 = debitSelectedData.some(function (value, index) { return value.m_pk_currtype.value !== debitSelectedData[0].m_pk_currtype.value}) | ||||
|         if(same1||same2||creditSelectedData[0].m_pk_currtype.value!=debitSelectedData[0].m_pk_currtype.value){ | ||||
|             toast({ content: self.state.json['20020VRIFYPAGE-000109'], color: 'warning' });/* 国际化处理: 只能选择同币种*/ | ||||
|             return false | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     if(self.handleSumCY('debit')!=self.handleSumCY('credit')){ | ||||
|         promptBox({ | ||||
|             color:'info', | ||||
|  |  | |||
|  | @ -2,10 +2,22 @@ | |||
| import {ajax,deepClone,promptBox,toast} from 'nc-lightapp-front'; | ||||
| import verifyUnverifySum from './verifyUnverifySum'; | ||||
| export default function handleVerify(self){ | ||||
| 
 | ||||
|     let url= '/nccloud/gl/verify/onverify.do'; | ||||
|     let {creditDataArr,creditSelectedData,debitSelectedData,queryCondition}=self.state; | ||||
|     creditSelectedData=self.filterSelectedData('credit');//获取借方选中的数据
 | ||||
|     debitSelectedData=self.filterSelectedData('debit');//获取借方选中的数据
 | ||||
| 
 | ||||
|     // 同币种校验
 | ||||
|     if(creditSelectedData.length||debitSelectedData.length){ | ||||
|         let different1 = creditSelectedData.some(function (value, index) { return value.m_pk_currtype.value !== creditSelectedData[0].m_pk_currtype.value}) | ||||
|         let different2 = debitSelectedData.some(function (value, index) { return value.m_pk_currtype.value !== debitSelectedData[0].m_pk_currtype.value}) | ||||
|         if(different1||different2||creditSelectedData[0].m_pk_currtype.value!=debitSelectedData[0].m_pk_currtype.value){ | ||||
|             toast({ content: self.state.json['20020VRIFYPAGE-000108'], color: 'warning' });/* 国际化处理: 只能选择同币种*/ | ||||
|             return false | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     if(debitSelectedData.length<=0||creditSelectedData.length<=0){ | ||||
|         toast({ content: self.state.json['20020VRIFYPAGE-000014'], color: 'warning' });/* 国际化处理: 请选择借贷两方数据进行核销*/ | ||||
|         return false; | ||||
|  | @ -30,7 +42,7 @@ export default function handleVerify(self){ | |||
|         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; | ||||
|  | @ -41,7 +53,7 @@ export default function handleVerify(self){ | |||
|             checkedArrayDebit=[]; | ||||
|             queryCondition.end_date=creditSelectedData[0].m_prepareddate.display; | ||||
|         } | ||||
|          | ||||
| 
 | ||||
|     }else{ | ||||
|         checkedAllDebit=false; | ||||
|         checkedAllCredit=false; | ||||
|  | @ -164,4 +176,4 @@ export function cancelBtnClick(){ | |||
|     return false; | ||||
| } | ||||
| 
 | ||||
| /*mjYQ3YU0f86RWZ9JI+KJHpmHaFiWPWGuKf7NDRh+ig8=*/ | ||||
| /*mjYQ3YU0f86RWZ9JI+KJHpmHaFiWPWGuKf7NDRh+ig8=*/ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue