From f35397155487ab4af4355be94eb80590160c5669 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Sun, 28 Jun 2026 12:06:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8A=9F=E8=83=BD=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E7=BB=9F=E4=B8=80=E4=BC=98=E5=8C=96=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accounts/accountDealRecord/addEdit.vue | 41 ++++++++---- .../accounts/creditTransferRecord/addEdit.vue | 33 +++++++--- .../accounts/debitTransferRecord/addEdit.vue | 31 +++++++-- .../accounts/investAccountDeal/addEdit.vue | 35 ++++++++--- .../accounts/investTransferRecord/addEdit.vue | 31 +++++++-- .../accounts/lendTransferRecord/addEdit.vue | 35 ++++++++--- .../accounts/posTransferRecord/addEdit.vue | 35 ++++++++--- src/pages/work/base/bankBaseInfo/addEdit.vue | 47 +++++++++----- src/pages/work/base/creditCard/addEdit.vue | 63 ++++++++++++------- .../work/base/creditCard/adjustLimit.vue | 34 +++++++--- src/pages/work/base/debitCard/addEdit.vue | 57 +++++++++++------ src/pages/work/base/debitCard/adjustLimit.vue | 32 +++++++--- src/pages/work/base/financials/addEdit.vue | 39 +++++++++--- src/pages/work/base/futures/addEdit.vue | 55 ++++++++++------ src/pages/work/base/lend/addEdit.vue | 41 ++++++++---- src/pages/work/base/posmachine/addEdit.vue | 51 ++++++++++----- src/pages/work/base/stocks/addEdit.vue | 39 +++++++++--- .../work/bill/creditCardBill/addEdit.vue | 31 +++++++-- .../bill/creditInstallmentHistory/addEdit.vue | 43 +++++++++---- .../detailsAddEdit.vue | 35 ++++++++--- .../work/bill/creditQueryRecord/addEdit.vue | 29 +++++++-- src/pages/work/bill/futuresBill/addEdit.vue | 29 +++++++-- .../work/bill/onlineLendHistory/addEdit.vue | 45 +++++++++---- .../bill/onlineLendHistory/detailsAddEdit.vue | 37 ++++++++--- .../work/bill/peopleLendHistory/addEdit.vue | 33 +++++++--- src/pages/work/bill/stocksBill/addEdit.vue | 29 +++++++-- src/pages/work/heartJourney/addEdit.vue | 29 +++++++-- .../work/product/productInfor/addEdit.vue | 33 +++++++--- .../product/productPriceRecord/addEdit.vue | 41 ++++++++---- .../pages/system/config/addEdit.vue | 34 +++++++--- src/pages_mine/pages/system/dept/addEdit.vue | 38 +++++++---- src/pages_mine/pages/system/dict/addEdit.vue | 32 +++++++--- .../pages/system/dictData/addEdit.vue | 36 +++++++---- src/pages_mine/pages/system/job/addEdit.vue | 40 ++++++++---- src/pages_mine/pages/system/menu/addEdit.vue | 29 +++++++-- src/pages_mine/pages/system/post/addEdit.vue | 32 +++++++--- src/pages_mine/pages/system/role/addEdit.vue | 27 ++++++-- src/pages_mine/pages/system/user/addEdit.vue | 41 ++++++++---- src/static/scss/form-common.scss | 48 +++++++++++++- 39 files changed, 1096 insertions(+), 374 deletions(-) diff --git a/src/pages/work/accounts/accountDealRecord/addEdit.vue b/src/pages/work/accounts/accountDealRecord/addEdit.vue index 1715861..938b107 100644 --- a/src/pages/work/accounts/accountDealRecord/addEdit.vue +++ b/src/pages/work/accounts/accountDealRecord/addEdit.vue @@ -9,58 +9,58 @@ {{ title}} - + inputAlign="left" :customStyle="getInputStyle('typeName')"> + inputAlign="left" :customStyle="getInputStyle('tempDebitTypeName')"> + inputAlign="left" :customStyle="getInputStyle('accountName')"> + inputAlign="left" :customStyle="getInputStyle('dealTypeName')"> + inputAlign="left" :customStyle="getInputStyle('createTime')"> + inputAlign="left" :customStyle="getInputStyle('amount')"> + inputAlign="left" :customStyle="getInputStyle('dealCategoryName')"> + inputAlign="left" :customStyle="getInputStyle('childCategoryName')"> @@ -68,7 +68,7 @@ + inputAlign="left" :customStyle="getInputStyle('locationAddress')"> {{ form.locationName }} 经纬度:{{ form.longitude }},{{ form.latitude }} @@ -154,6 +154,19 @@ const inputBaseStyle = { width: '100%', boxSizing: 'border-box' } +const errorFields = ref([]) +const inputErrorStyle = { + background: '#fef0f0', + border: '2rpx solid #f56c6c', + borderRadius: '8rpx', + padding: '0 24rpx', + height: '68rpx', + width: '100%', + boxSizing: 'border-box' +} +const getInputStyle = (field) => { + return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle +} const data = reactive({ form: { id: null, @@ -673,7 +686,8 @@ onLoad((option) => { form.value.childCategory = form.value.dealCategory form.value.childCategoryName = form.value.dealCategory } - proxy.$refs['uForm'].validate().then(() => { + errorFields.value = [] + proxy.$refs['uForm'].validate().then(() => { if (form.value.id != null) { if(flag.value==null){ updateAccountDealRecord(form.value).then(res => { @@ -702,6 +716,11 @@ onLoad((option) => { }) }) } + }).catch(errors => { + if (errors && errors.length > 0) { + errorFields.value = errors.map(err => err.field) + } + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages/work/accounts/creditTransferRecord/addEdit.vue b/src/pages/work/accounts/creditTransferRecord/addEdit.vue index a09d508..d3e72d6 100644 --- a/src/pages/work/accounts/creditTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/creditTransferRecord/addEdit.vue @@ -11,36 +11,36 @@ {{ title}} - + inputAlign="left" :customStyle="getInputStyle('outAccountName')"> + inputAlign="left" :customStyle="getInputStyle('inAccountName')"> - + + inputAlign="left" :customStyle="getInputStyle('amount')"> + inputAlign="left" :customStyle="getInputStyle('dealTypeName')"> @@ -131,6 +131,19 @@ const inputBaseStyle = { width: '100%', boxSizing: 'border-box' } +const errorFields = ref([]) +const inputErrorStyle = { + background: '#fef0f0', + border: '2rpx solid #f56c6c', + borderRadius: '8rpx', + padding: '0 24rpx', + height: '68rpx', + width: '100%', + boxSizing: 'border-box' +} +const getInputStyle = (field) => { + return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle +} const data = reactive({ form: { @@ -299,7 +312,8 @@ function handleCreditCard() { datePickShow.value = false } function submit() { - proxy.$refs['uForm'].validate().then(() => { + errorFields.value = [] + proxy.$refs['uForm'].validate().then(() => { if (form.value.id != null) { updateAccountsTransferRecord(form.value).then(res => { proxy.$refs['uToast'].show({ @@ -317,6 +331,11 @@ function handleCreditCard() { }) }) } + }).catch(errors => { + if (errors && errors.length > 0) { + errorFields.value = errors.map(err => err.field) + } + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages/work/accounts/debitTransferRecord/addEdit.vue b/src/pages/work/accounts/debitTransferRecord/addEdit.vue index c934343..9d51c0a 100644 --- a/src/pages/work/accounts/debitTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/debitTransferRecord/addEdit.vue @@ -9,31 +9,31 @@ {{ title }} - + inputAlign="left" :customStyle="getInputStyle('outAccountName')"> + inputAlign="left" :customStyle="getInputStyle('inAccountName')"> - + + inputAlign="left" :customStyle="getInputStyle('amount')"> { + return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle +} const data = reactive({ form: { @@ -233,7 +246,8 @@ function handleInAccount() { datePickShow.value = false } function submit() { - proxy.$refs['uForm'].validate().then(() => { + errorFields.value = [] + proxy.$refs['uForm'].validate().then(() => { if (form.value.id != null) { updateAccountsTransferRecord(form.value).then(res => { proxy.$refs['uToast'].show({ @@ -251,6 +265,11 @@ function handleInAccount() { }) }) } + }).catch(errors => { + if (errors && errors.length > 0) { + errorFields.value = errors.map(err => err.field) + } + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages/work/accounts/investAccountDeal/addEdit.vue b/src/pages/work/accounts/investAccountDeal/addEdit.vue index ba031b0..81d3bef 100644 --- a/src/pages/work/accounts/investAccountDeal/addEdit.vue +++ b/src/pages/work/accounts/investAccountDeal/addEdit.vue @@ -9,39 +9,39 @@ {{ title}} - + inputAlign="left" :customStyle="getInputStyle('accountName')"> - + + inputAlign="left" :customStyle="getInputStyle('amount')"> + inputAlign="left" :customStyle="getInputStyle('closedPosition')"> + inputAlign="left" :customStyle="getInputStyle('commission')"> { + return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle +} const data = reactive({ form: { @@ -293,7 +306,8 @@ onLoad((option) => { datePickShow.value = false } function submit() { - proxy.$refs['uForm'].validate().then(() => { + errorFields.value = [] + proxy.$refs['uForm'].validate().then(() => { //如果是期货,给备注 if (accountType.value == '1') { form.value.remark = '平仓盈亏' + form.value.closedPosition + ',手续费' + form.value.commission @@ -323,6 +337,11 @@ onLoad((option) => { }) }) } + }).catch(errors => { + if (errors && errors.length > 0) { + errorFields.value = errors.map(err => err.field) + } + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages/work/accounts/investTransferRecord/addEdit.vue b/src/pages/work/accounts/investTransferRecord/addEdit.vue index 8c77253..0549d1f 100644 --- a/src/pages/work/accounts/investTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/investTransferRecord/addEdit.vue @@ -11,31 +11,31 @@ {{ title}} - + inputAlign="left" :customStyle="getInputStyle('inAccountName')"> + inputAlign="left" :customStyle="getInputStyle('dealTypeName')"> - + + inputAlign="left" :customStyle="getInputStyle('amount')"> @@ -93,6 +93,19 @@ const inputBaseStyle = { width: '100%', boxSizing: 'border-box' } +const errorFields = ref([]) +const inputErrorStyle = { + background: '#fef0f0', + border: '2rpx solid #f56c6c', + borderRadius: '8rpx', + padding: '0 24rpx', + height: '68rpx', + width: '100%', + boxSizing: 'border-box' +} +const getInputStyle = (field) => { + return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle +} const data = reactive({ form: { @@ -237,7 +250,8 @@ onLoad((option) => { datePickShow.value = false } function submit() { - proxy.$refs['uForm'].validate().then(() => { + errorFields.value = [] + proxy.$refs['uForm'].validate().then(() => { if (form.value.id != null) { if(flag.value==null){ updateAccountsTransferRecord(form.value).then(res => { @@ -266,6 +280,11 @@ onLoad((option) => { }) }) } + }).catch(errors => { + if (errors && errors.length > 0) { + errorFields.value = errors.map(err => err.field) + } + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages/work/accounts/lendTransferRecord/addEdit.vue b/src/pages/work/accounts/lendTransferRecord/addEdit.vue index 4896186..1351720 100644 --- a/src/pages/work/accounts/lendTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/lendTransferRecord/addEdit.vue @@ -9,42 +9,42 @@ {{ title}} - + inputAlign="left" :customStyle="getInputStyle('outAccountName')"> + inputAlign="left" :customStyle="getInputStyle('inAccountName')"> + inputAlign="left" :customStyle="getInputStyle('dealTypeName')"> - + + inputAlign="left" :customStyle="getInputStyle('amount')"> + inputAlign="left" :customStyle="getInputStyle('commission')"> { + return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle +} const data = reactive({ form: { @@ -309,7 +322,8 @@ function handleInAccount() { datePickShow.value = false } function submit() { - proxy.$refs['uForm'].validate().then(() => { + errorFields.value = [] + proxy.$refs['uForm'].validate().then(() => { if (form.value.id != null) { updateAccountsTransferRecord(form.value).then(res => { proxy.$refs['uToast'].show({ @@ -327,6 +341,11 @@ function handleInAccount() { }) }) } + }).catch(errors => { + if (errors && errors.length > 0) { + errorFields.value = errors.map(err => err.field) + } + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages/work/accounts/posTransferRecord/addEdit.vue b/src/pages/work/accounts/posTransferRecord/addEdit.vue index 6c81829..3f9c928 100644 --- a/src/pages/work/accounts/posTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/posTransferRecord/addEdit.vue @@ -11,18 +11,18 @@ {{ title}} - + inputAlign="left" :customStyle="getInputStyle('posName')"> + inputAlign="left" :customStyle="getInputStyle('rate')">