核销和异币种核销: 币种校验
This commit is contained in:
		
							parent
							
								
									6d1d76f383
								
							
						
					
					
						commit
						a4c8ad0ee7
					
				|  | @ -16,14 +16,12 @@ export default function handleCrossCurrency(self){ | |||
|     } | ||||
| 
 | ||||
|     // 异币种校验
 | ||||
|     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({ | ||||
|  |  | |||
|  | @ -8,20 +8,19 @@ export default function handleVerify(self){ | |||
|     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(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; | ||||
|     } | ||||
|     if(self.handleSumCY('debit')!=self.handleSumCY('credit')){ | ||||
|         promptBox({ | ||||
|             color:'info', | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue