|
@ -57,21 +57,8 @@ |
|
|
:detailButtonIsShowDelete="false" |
|
|
:detailButtonIsShowDelete="false" |
|
|
:detailButtonIsShowAdd="false" |
|
|
:detailButtonIsShowAdd="false" |
|
|
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-request-main:export` })]" |
|
|
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-request-main:export` })]" |
|
|
:sumFormDataByForm=" |
|
|
@detailBasicFormOnChange="detailBasicFormOnChange" |
|
|
(formRef, formModel) => {console.log('formModel====',formModel) |
|
|
|
|
|
const { beforeTaxAmount = 0, taxAmount = 0 , qty=0,price,allocationPrice,taxRate=1} = formModel |
|
|
|
|
|
formRef.value.setValues({ |
|
|
|
|
|
// 含税金额 = 未税价格+税额,四舍五入保留2位小数 |
|
|
|
|
|
afterTaxAmount: Number((Number(beforeTaxAmount) + Number(taxAmount)).toFixed(2)), |
|
|
|
|
|
// 模具分摊单价 默认从模具分摊对账单带出,未税金额修改后重新计算,等于未税金额/数量-销售单价 |
|
|
|
|
|
allocationPrice: Number(Number(Number(beforeTaxAmount)/Number(qty)) - Number(price)), |
|
|
|
|
|
// 合计单价 = 销售单价 + 模具分摊单价 |
|
|
|
|
|
sumPrice:Number(Number(price)+Number(allocationPrice)), |
|
|
|
|
|
// 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 |
|
|
|
|
|
taxAmount: Number((Number(beforeTaxAmount) * Number(taxRate)))/100 //含税金额 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
" |
|
|
|
|
|
@buttonBaseClick="detailButtonBaseClick" |
|
|
@buttonBaseClick="detailButtonBaseClick" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
> |
|
|
> |
|
@ -356,6 +343,20 @@ const onSearchChange = (field, value)=>{ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
const detailBasicFormOnChange = (field, cur, formRef1) => { |
|
|
|
|
|
console.log( formRef1.value.formModel) |
|
|
|
|
|
const { beforeTaxAmount = 0, taxAmount = 0, qty = 0, price, allocationPrice, taxRate = 1 } = formRef1.value.formModel |
|
|
|
|
|
formRef1.value.setValues({ |
|
|
|
|
|
// 含税金额 = 未税价格+税额,四舍五入保留2位小数 |
|
|
|
|
|
afterTaxAmount: Number((Number(beforeTaxAmount) + Number(taxAmount)).toFixed(2)), |
|
|
|
|
|
// 模具分摊单价 默认从模具分摊对账单带出,未税金额修改后重新计算,等于未税金额/数量-销售单价 |
|
|
|
|
|
allocationPrice: Number(Number(Number(beforeTaxAmount)/Number(qty)) - Number(price)), |
|
|
|
|
|
// 合计单价 = 销售单价 + 模具分摊单价 |
|
|
|
|
|
sumPrice:Number(Number(price)+Number(allocationPrice)), |
|
|
|
|
|
// 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 |
|
|
|
|
|
taxAmount: Number((Number(beforeTaxAmount) * Number(taxRate)))/100 //含税金额 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
const searchClick = async (data)=>{ |
|
|
const searchClick = async (data)=>{ |
|
|
console.log('查询',data) |
|
|
console.log('查询',data) |
|
|
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')}) |
|
|
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')}) |
|
|