Browse Source

销售开票申请

intex_online20241111
王宇飞 3 months ago
parent
commit
cb7c43d443
  1. 30
      src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue

30
src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue

@ -58,6 +58,7 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@inputNumberChange="inputNumberChange"
@onChange="onChange"
:sumFormDataByTableCustom="
(formRef, formModel, tableData) => {
tableData.forEach(item=>{
@ -168,6 +169,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
tableData.value = res.list && res.list.length > 0 ?res.list : []
tableData.value.forEach(item=>{
item['sumPrice'] = item['price'] + item['allocationPrice']
// *2
item['beforeTaxAmount'] = item['sumPrice']*item['qty']
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
// taxAmount */100,2
item['taxAmount'] = (item['beforeTaxAmount'] * formRef.formModel['taxRate'])/100 //
})
})
@ -420,9 +429,30 @@ const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
const onChange = (field, cur, formRef)=>{
console.log('onChange',field, cur, formRef)
if(field == 'taxRate'){
// taxAmount */100,2
tableData.value.forEach(item=>{
item['taxAmount'] = (item['beforeTaxAmount'] * cur)/100 //
})
}
}
const inputNumberChange = (field, index, row, val) => {
console.log('inputNumberChange',field, index, row, val)
// = +
row['sumPrice'] = row['price'] + row['allocationPrice']
// = +,2
row['afterTaxAmount'] = row['beforeTaxAmount'] + row['taxAmount']
// /-
row['allocationPrice'] = row['beforeTaxAmount']/row['qty'] - row['price']
}
//true0
const flag = ref(false)

Loading…
Cancel
Save