|
|
@ -10,6 +10,7 @@ |
|
|
|
:tableAllSchemas="CustomerSaleInvoiceDetail.allSchemas" |
|
|
|
:tableFormRules="CustomerSaleInvoiceDetailRules" |
|
|
|
:tableData="tableData" |
|
|
|
:showTypeList="showTypeList" |
|
|
|
:apiUpdate="CustomerSaleInvoiceMainApi.updateCustomerSaleInvoiceMain" |
|
|
|
:apiCreate="CustomerSaleInvoiceMainApi.createCustomerSaleInvoiceMain" |
|
|
|
:isBusiness="true" |
|
|
@ -127,11 +128,9 @@ const openFormTable =async (type: string, row?: any, list?:any) => { |
|
|
|
initTableDataPrice() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const showTypeList = ref([]) |
|
|
|
const onChange = (field, cur, formRef)=>{ |
|
|
|
|
|
|
|
console.log('onChange',field, cur, formRef) |
|
|
|
|
|
|
|
if(field == 'taxRate'){ |
|
|
|
// 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 |
|
|
|
tableData.value.forEach(item=>{ |
|
|
@ -139,6 +138,11 @@ const onChange = (field, cur, formRef)=>{ |
|
|
|
// 含税金额 = 未税价格+税额,四舍五入保留2位小数 |
|
|
|
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] |
|
|
|
}) |
|
|
|
} else if (field == 'invoiceType') { |
|
|
|
showTypeList.value = cur |
|
|
|
// if (cur == '补给品') { |
|
|
|
// tableData.value = |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
const inputNumberChange = (field, index, row, val) => { |
|
|
|