|
|
@ -45,17 +45,20 @@ |
|
|
|
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" |
|
|
|
:tableFormRules="SupplierinvoiceRequestDetailRules" |
|
|
|
:tableData="tableData" |
|
|
|
:sumFormDataField = "[{ |
|
|
|
formField:'amount', |
|
|
|
tableField:'singlePrice' |
|
|
|
}]" |
|
|
|
|
|
|
|
:sumFormDataByForm ="(formRef,formModel)=>{ |
|
|
|
const {taxRate=0,amount=0} = formModel |
|
|
|
formRef.value.setValues({ |
|
|
|
taxAmount:taxRate*amount, |
|
|
|
afterTaxAmount:amount+taxRate*amount |
|
|
|
taxAmount:taxRate*amount*0.01, |
|
|
|
afterTaxAmount:amount+taxRate*amount*0.01 |
|
|
|
}) |
|
|
|
}" |
|
|
|
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{ |
|
|
|
const sumObject = { |
|
|
|
amount:tableData.reduce((prev, item) => prev + (item['singlePrice']*item['invoicableQuantity']),0) |
|
|
|
} |
|
|
|
formRef.value.setValues(sumObject) |
|
|
|
}" |
|
|
|
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain" |
|
|
|
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" |
|
|
|
:isBusiness="true" |
|
|
|