From a4c8ad0ee70a123fb7f833b84955c38cdb8e3643 Mon Sep 17 00:00:00 2001 From: xyz <747050115@qq.com> Date: Tue, 11 Mar 2025 18:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B8=E9=94=80=E5=92=8C=E5=BC=82=E5=B8=81?= =?UTF-8?q?=E7=A7=8D=E6=A0=B8=E9=94=80:=20=E5=B8=81=E7=A7=8D=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vrify/events/handleCrossCurrency.js | 12 +++++------- .../verify/vrify/events/handleVerify.js | 19 +++++++++---------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/gl/verify/verify/vrify/events/handleCrossCurrency.js b/src/gl/verify/verify/vrify/events/handleCrossCurrency.js index 6b26a5d..8d9abf6 100644 --- a/src/gl/verify/verify/vrify/events/handleCrossCurrency.js +++ b/src/gl/verify/verify/vrify/events/handleCrossCurrency.js @@ -16,13 +16,11 @@ 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 - } + 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')){ diff --git a/src/gl/verify/verify/vrify/events/handleVerify.js b/src/gl/verify/verify/vrify/events/handleVerify.js index 59822ec..ea12a83 100644 --- a/src/gl/verify/verify/vrify/events/handleVerify.js +++ b/src/gl/verify/verify/vrify/events/handleVerify.js @@ -8,20 +8,19 @@ export default function handleVerify(self){ 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; } + + // 同币种校验 + 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(self.handleSumCY('debit')!=self.handleSumCY('credit')){ promptBox({ color:'info',