Browse Source

修改Q2新增BUG HL-5385

hella_online_20240821
parent
commit
3e04c9b9fe
  1. 41
      src/views/qms/inspectionQ2/index.vue
  2. 35
      src/views/qms/inspectionQ2/inspectionQ2.data.ts

41
src/views/qms/inspectionQ2/index.vue

@ -103,6 +103,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'supplierCode') { if (formField == 'supplierCode') {
setV['purchaseReceiptNumber'] = ''
const supplierParams = { const supplierParams = {
by: 'ASC', by: 'ASC',
filters: [{ column: 'code', action: '==', value: val[0].supplierCode }], filters: [{ column: 'code', action: '==', value: val[0].supplierCode }],
@ -121,11 +122,14 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
} }
if (formField == 'purchaseReceiptNumber') { if (formField == 'purchaseReceiptNumber') {
console.log("wolaile", let result = ''
val[0].qty for (var i = 0; i < val.length; i++) {
); result += val[i].number + ','
}
setV['wmsQty'] = val[0].qty if (result.endsWith(',')) {
result = result.substring(0, result.length - 1)
}
setV['purchaseReceiptNumber'] = '123'
} }
if (formField == 'lightItemCode') { if (formField == 'lightItemCode') {
@ -138,12 +142,13 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
setV['SupplierName'] = '' setV['SupplierName'] = ''
setV['itemName'] = '' setV['itemName'] = ''
setV['standardCostPrice'] = '' setV['standardCostPrice'] = ''
setV['lightQty'] = '' setV['lightQty'] = 0
setV['claimAmount'] = '' setV['claimAmount'] = 0
setV['otherclaimAmount'] = '' setV['otherclaimAmount'] = 0
setV['summaryAmount'] = '' setV['summaryAmount'] = 0
setV['disbursementAmount'] = '' setV['disbursementAmount'] = 0
setV['remainingAmount'] = '' setV['remainingAmount'] = 0
setV['purchaseReceiptNumber'] = ''
setV['uom'] = val[0].supplierUom setV['uom'] = val[0].supplierUom
Q2Api.getEmail().then((res) => { Q2Api.getEmail().then((res) => {
@ -223,6 +228,7 @@ const onChange = (field, e) => {
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6) ).toFixed(6)
} }
if (field == 'claimMultiple') { if (field == 'claimMultiple') {
basicFormRef.value.formRef.formModel.claimAmount = ( basicFormRef.value.formRef.formModel.claimAmount = (
@ -241,6 +247,16 @@ const onChange = (field, e) => {
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6) ).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') { if (field == 'disbursementAmount') {
basicFormRef.value.formRef.formModel.remainingAmount = ( basicFormRef.value.formRef.formModel.remainingAmount = (
@ -379,7 +395,8 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.formRef.setValues({ basicFormRef.value.formRef.setValues({
handleTime: new Date().getTime(), handleTime: new Date().getTime(),
claimTime: new Date().getTime(), claimTime: new Date().getTime(),
priority: '3' priority: '3',
disbursementAmount: 0
}) })
}) })
} }

35
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -166,7 +166,6 @@ export const Q2 = useCrudSchemas(
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
disabled: true, disabled: true,
multiple: true, multiple: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
@ -186,17 +185,7 @@ export const Q2 = useCrudSchemas(
value: 'itemCode', value: 'itemCode',
isMainValue: true isMainValue: true
} }
], ]
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -253,7 +242,7 @@ export const Q2 = useCrudSchemas(
], ],
verificationParams: [ verificationParams: [
{ {
key: 'lightItemCode', key: 'code',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
@ -322,7 +311,7 @@ export const Q2 = useCrudSchemas(
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY, dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
@ -351,6 +340,7 @@ export const Q2 = useCrudSchemas(
field: 'standardCostPrice', field: 'standardCostPrice',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: 150 width: 150
}, },
@ -367,7 +357,7 @@ export const Q2 = useCrudSchemas(
label: '索赔金额', label: '索赔金额',
field: 'claimAmount', field: 'claimAmount',
sort: 'custom', sort: 'custom',
isTable: false, isTable: true,
isSearch: false, isSearch: false,
table: { table: {
width: 150 width: 150
@ -376,7 +366,7 @@ export const Q2 = useCrudSchemas(
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 0, min: 0,
precision: 2 precision: 6
} }
} }
}, },
@ -386,6 +376,7 @@ export const Q2 = useCrudSchemas(
field: 'otherClaimDesc', field: 'otherClaimDesc',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: '150' width: '150'
}, },
@ -399,6 +390,7 @@ export const Q2 = useCrudSchemas(
field: 'otherclaimAmount', field: 'otherclaimAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: 150 width: 150
}, },
@ -415,6 +407,7 @@ export const Q2 = useCrudSchemas(
field: 'summaryAmount', field: 'summaryAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: 150 width: 150
}, },
@ -432,6 +425,7 @@ export const Q2 = useCrudSchemas(
field: 'disbursementAmount', field: 'disbursementAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: 150 width: 150
}, },
@ -448,6 +442,7 @@ export const Q2 = useCrudSchemas(
field: 'remainingAmount', field: 'remainingAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: 150 width: 150
}, },
@ -509,7 +504,7 @@ export const Q2 = useCrudSchemas(
field: 'costCode', field: 'costCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isTable: true,
isForm: true, isForm: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -560,6 +555,7 @@ export const Q2 = useCrudSchemas(
field: 'responUser', field: 'responUser',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
isForm: true, isForm: true,
table: { table: {
width: 120 width: 120
@ -574,7 +570,7 @@ export const Q2 = useCrudSchemas(
{ {
label: '处理时间', label: '处理时间',
field: 'handleTime', field: 'handleTime',
isTable: false, isTable: true,
table: { table: {
width: 180 width: 180
}, },
@ -600,6 +596,7 @@ export const Q2 = useCrudSchemas(
dictType: DICT_TYPE.PUBLISHE_STATUS, dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string', dictClass: 'string',
isForm: false, isForm: false,
isTable: true,
isSearch: false, isSearch: false,
tableForm: { tableForm: {
type: 'Select', type: 'Select',
@ -616,6 +613,7 @@ export const Q2 = useCrudSchemas(
field: 'desc', field: 'desc',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: '150' width: '150'
}, },
@ -639,6 +637,7 @@ export const Q2 = useCrudSchemas(
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
isForm: false, isForm: false,
isTable: true,
table: { table: {
width: 180 width: 180
}, },

Loading…
Cancel
Save