From 3e04c9b9fe1b7ffdf7a536ffda8fe02a648ad5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Wed, 21 Aug 2024 16:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Q2=E6=96=B0=E5=A2=9EBUG=20HL-?= =?UTF-8?q?5385?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspectionQ2/index.vue | 45 +++++++++++++------ .../qms/inspectionQ2/inspectionQ2.data.ts | 35 +++++++-------- 2 files changed, 48 insertions(+), 32 deletions(-) diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index 3e4efc71d..9adee6bbb 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -103,6 +103,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(async () => { const setV = {} if (formField == 'supplierCode') { + setV['purchaseReceiptNumber'] = '' const supplierParams = { by: 'ASC', filters: [{ column: 'code', action: '==', value: val[0].supplierCode }], @@ -119,13 +120,16 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { } }) } - + if (formField == 'purchaseReceiptNumber') { - console.log("wolaile", - val[0].qty - ); - - setV['wmsQty'] = val[0].qty + let result = '' + for (var i = 0; i < val.length; i++) { + result += val[i].number + ',' + } + if (result.endsWith(',')) { + result = result.substring(0, result.length - 1) + } + setV['purchaseReceiptNumber'] = '123' } if (formField == 'lightItemCode') { @@ -138,12 +142,13 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { setV['SupplierName'] = '' setV['itemName'] = '' setV['standardCostPrice'] = '' - setV['lightQty'] = '' - setV['claimAmount'] = '' - setV['otherclaimAmount'] = '' - setV['summaryAmount'] = '' - setV['disbursementAmount'] = '' - setV['remainingAmount'] = '' + setV['lightQty'] = 0 + setV['claimAmount'] = 0 + setV['otherclaimAmount'] = 0 + setV['summaryAmount'] = 0 + setV['disbursementAmount'] = 0 + setV['remainingAmount'] = 0 + setV['purchaseReceiptNumber'] = '' setV['uom'] = val[0].supplierUom Q2Api.getEmail().then((res) => { @@ -153,7 +158,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { }) } }) - + const supplieritemParams = { by: 'ASC', filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }], @@ -223,6 +228,7 @@ const onChange = (field, e) => { parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) ).toFixed(6) + } if (field == 'claimMultiple') { basicFormRef.value.formRef.formModel.claimAmount = ( @@ -241,6 +247,16 @@ const onChange = (field, e) => { parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) ).toFixed(6) } + if (field == 'claimAmount') { + basicFormRef.value.formRef.formModel.summaryAmount = ( + parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) + ).toFixed(6) + basicFormRef.value.formRef.formModel.remainingAmount = ( + parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - + parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount) + ).toFixed(6) + } if (field == 'disbursementAmount') { basicFormRef.value.formRef.formModel.remainingAmount = ( @@ -379,7 +395,8 @@ const openForm = (type: string, row?: any) => { basicFormRef.value.formRef.setValues({ handleTime: new Date().getTime(), claimTime: new Date().getTime(), - priority: '3' + priority: '3', + disbursementAmount: 0 }) }) } diff --git a/src/views/qms/inspectionQ2/inspectionQ2.data.ts b/src/views/qms/inspectionQ2/inspectionQ2.data.ts index 067a5a8ef..e6b366611 100644 --- a/src/views/qms/inspectionQ2/inspectionQ2.data.ts +++ b/src/views/qms/inspectionQ2/inspectionQ2.data.ts @@ -166,7 +166,6 @@ export const Q2 = useCrudSchemas( form: { // labelMessage: '信息提示说明!!!', componentProps: { - enterSearch: true, disabled: true, multiple: true, isSearchList: true, // 开启查询弹窗 @@ -186,17 +185,7 @@ export const Q2 = useCrudSchemas( value: 'itemCode', isMainValue: true } - ], - verificationParams: [ - { - key: 'number', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true - } - ] // 失去焦点校验参数 + ] } } }, @@ -253,7 +242,7 @@ export const Q2 = useCrudSchemas( ], verificationParams: [ { - key: 'lightItemCode', + key: 'code', action: '==', value: '', isMainValue: false, @@ -322,7 +311,7 @@ export const Q2 = useCrudSchemas( dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY, dictClass: 'string', isSearch: false, - isTable: false, + isTable: true, tableForm: { type: 'Select' } @@ -351,6 +340,7 @@ export const Q2 = useCrudSchemas( field: 'standardCostPrice', sort: 'custom', isSearch: false, + isTable: true, table: { width: 150 }, @@ -367,7 +357,7 @@ export const Q2 = useCrudSchemas( label: '索赔金额', field: 'claimAmount', sort: 'custom', - isTable: false, + isTable: true, isSearch: false, table: { width: 150 @@ -376,7 +366,7 @@ export const Q2 = useCrudSchemas( component: 'InputNumber', componentProps: { min: 0, - precision: 2 + precision: 6 } } }, @@ -386,6 +376,7 @@ export const Q2 = useCrudSchemas( field: 'otherClaimDesc', sort: 'custom', isSearch: false, + isTable: true, table: { width: '150' }, @@ -399,6 +390,7 @@ export const Q2 = useCrudSchemas( field: 'otherclaimAmount', sort: 'custom', isSearch: false, + isTable: true, table: { width: 150 }, @@ -415,6 +407,7 @@ export const Q2 = useCrudSchemas( field: 'summaryAmount', sort: 'custom', isSearch: false, + isTable: true, table: { width: 150 }, @@ -432,6 +425,7 @@ export const Q2 = useCrudSchemas( field: 'disbursementAmount', sort: 'custom', isSearch: false, + isTable: true, table: { width: 150 }, @@ -448,6 +442,7 @@ export const Q2 = useCrudSchemas( field: 'remainingAmount', sort: 'custom', isSearch: false, + isTable: true, table: { width: 150 }, @@ -509,7 +504,7 @@ export const Q2 = useCrudSchemas( field: 'costCode', sort: 'custom', isSearch: false, - isTable: false, + isTable: true, isForm: true, form: { // labelMessage: '信息提示说明!!!', @@ -560,6 +555,7 @@ export const Q2 = useCrudSchemas( field: 'responUser', sort: 'custom', isSearch: false, + isTable: true, isForm: true, table: { width: 120 @@ -574,7 +570,7 @@ export const Q2 = useCrudSchemas( { label: '处理时间', field: 'handleTime', - isTable: false, + isTable: true, table: { width: 180 }, @@ -600,6 +596,7 @@ export const Q2 = useCrudSchemas( dictType: DICT_TYPE.PUBLISHE_STATUS, dictClass: 'string', isForm: false, + isTable: true, isSearch: false, tableForm: { type: 'Select', @@ -616,6 +613,7 @@ export const Q2 = useCrudSchemas( field: 'desc', sort: 'custom', isSearch: false, + isTable: true, table: { width: '150' }, @@ -639,6 +637,7 @@ export const Q2 = useCrudSchemas( label: '创建时间', field: 'createTime', isForm: false, + isTable: true, table: { width: 180 },