|
|
@ -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 }], |
|
|
@ -121,11 +122,14 @@ 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) => { |
|
|
@ -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 |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|