From bd4a233df1b68d482b0d1b2cac99efeaf5ffa8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Tue, 30 Jul 2024 19:41:45 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspectionQ1/index.vue | 10 +++- .../qms/inspectionQ1/inspectionQ1.data.ts | 46 +++++++++++-------- src/views/qms/inspectionQ2/index.vue | 10 +++- .../qms/inspectionQ2/inspectionQ2.data.ts | 8 ++-- src/views/qms/inspectionQ3/index.vue | 10 +++- .../qms/inspectionQ3/inspectionQ3.data.ts | 8 ++-- 6 files changed, 60 insertions(+), 32 deletions(-) diff --git a/src/views/qms/inspectionQ1/index.vue b/src/views/qms/inspectionQ1/index.vue index 92ee8d1b2..6e42909ac 100644 --- a/src/views/qms/inspectionQ1/index.vue +++ b/src/views/qms/inspectionQ1/index.vue @@ -187,8 +187,6 @@ nextTick(() => { handleTime: new Date().getTime(), claimTime: new Date().getTime(), priority: '3', - qty: 1, - claimAmount: 1,     })   }) } @@ -207,6 +205,14 @@ const formsSuccess = async (formType, data) => { return; } } + if (data.qty==0) { + message.error('数量不能为0') + return; + } + if (data.claimAmount==0) { + message.error('索赔金额不能为0') + return; + } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; if (formType === 'create') { diff --git a/src/views/qms/inspectionQ1/inspectionQ1.data.ts b/src/views/qms/inspectionQ1/inspectionQ1.data.ts index ee6e635a5..3bcbde33e 100644 --- a/src/views/qms/inspectionQ1/inspectionQ1.data.ts +++ b/src/views/qms/inspectionQ1/inspectionQ1.data.ts @@ -83,14 +83,16 @@ export const Q1 = useCrudSchemas( isMainValue: false } ], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 } }, isSearch: true @@ -151,7 +153,7 @@ export const Q1 = useCrudSchemas( form: { component: 'InputNumber', componentProps: { - min: 0.01, + min: 0, precision: 2 } } @@ -223,7 +225,7 @@ export const Q1 = useCrudSchemas( form: { component: 'InputNumber', componentProps: { - min: 0.01, + min: 0, precision: 2 } } @@ -238,7 +240,7 @@ export const Q1 = useCrudSchemas( form: { // labelMessage: '信息提示说明!!!', componentProps: { - enterSearch:true, + enterSearch: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 searchField: 'costcentreCode', // 查询弹窗赋值字段 @@ -252,14 +254,16 @@ export const Q1 = useCrudSchemas( isMainValue: false } ], - verificationParams: [{ - key: 'costcentreCode', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + verificationParams: [ + { + key: 'costcentreCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 } } }, @@ -340,8 +344,10 @@ export const Q1 = useCrudSchemas( field: 'available', sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE, - isSearch: true, + isSearch: false, isForm: false, + isTable: false, + isDetail: false, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 search: { value: 'TRUE' diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index 5c3cd909c..83f9aa46c 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -201,8 +201,6 @@ nextTick(() => { handleTime: new Date().getTime(), claimTime: new Date().getTime(), priority: '3', - qty: 1, - claimAmount: 1,     })   }) } @@ -223,6 +221,14 @@ const formsSuccess = async (formType, data) => { if (data.qty>data.wmsQty) { message.error('数量不能大于记录中的收货数量') return; + } + if (data.qty==0) { + message.error('数量不能为0') + return; + } + if (data.claimAmount==0) { + message.error('索赔金额不能为0') + return; } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; diff --git a/src/views/qms/inspectionQ2/inspectionQ2.data.ts b/src/views/qms/inspectionQ2/inspectionQ2.data.ts index 9ac2a2e21..39ed48b5c 100644 --- a/src/views/qms/inspectionQ2/inspectionQ2.data.ts +++ b/src/views/qms/inspectionQ2/inspectionQ2.data.ts @@ -275,7 +275,7 @@ export const Q2 = useCrudSchemas( form: { component: 'InputNumber', componentProps: { - min: 0.01, + min: 0, precision: 2 } } @@ -330,7 +330,7 @@ export const Q2 = useCrudSchemas( form: { component: 'InputNumber', componentProps: { - min: 0.01, + min: 0, precision: 2 } } @@ -438,7 +438,9 @@ export const Q2 = useCrudSchemas( field: 'available', sort: 'custom', isSearch: false, - isForm: false + isForm: false, + isTable: false, + isDetail: false }, { label: '创建时间', diff --git a/src/views/qms/inspectionQ3/index.vue b/src/views/qms/inspectionQ3/index.vue index bbc4fd735..e313d6371 100644 --- a/src/views/qms/inspectionQ3/index.vue +++ b/src/views/qms/inspectionQ3/index.vue @@ -194,8 +194,6 @@ nextTick(() => {     basicFormRef.value.formRef.setValues({ handleTime: new Date().getTime(), priority: '3', - qty: 1, - amount: 1,     })   }) } @@ -212,6 +210,14 @@ const formsSuccess = async (formType, data) => { message.error('失效时间要大于生效时间') return; } + } + if (data.qty==0) { + message.error('数量不能为0') + return; + } + if (data.amount==0) { + message.error('金额不能为0') + return; } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; diff --git a/src/views/qms/inspectionQ3/inspectionQ3.data.ts b/src/views/qms/inspectionQ3/inspectionQ3.data.ts index 38d02113a..18e41531c 100644 --- a/src/views/qms/inspectionQ3/inspectionQ3.data.ts +++ b/src/views/qms/inspectionQ3/inspectionQ3.data.ts @@ -181,7 +181,7 @@ export const Q3 = useCrudSchemas( form: { component: 'InputNumber', componentProps: { - min: 0.01, + min: 0, precision: 2 } } @@ -289,7 +289,7 @@ export const Q3 = useCrudSchemas( form: { component: 'InputNumber', componentProps: { - min: 0.01, + min: 0, precision: 2 } } @@ -374,7 +374,9 @@ export const Q3 = useCrudSchemas( field: 'available', sort: 'custom', isSearch: false, - isForm: false + isForm: false, + isTable: false, + isDetail: false }, { label: '创建时间',