核销和异币种核销: 币种校验
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;
|
||||
|
|
Loading…
Reference in New Issue