|
@ -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 |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|