|
@ -57,6 +57,21 @@ |
|
|
: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=" |
|
|
|
|
|
(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" |
|
|
/> |
|
|
/> |
|
@ -117,7 +132,7 @@ const detailButtonBaseClick = async (val, item,tableObject) => { |
|
|
loadStart() |
|
|
loadStart() |
|
|
const excelTitle = ref(route.meta.title) |
|
|
const excelTitle = ref(route.meta.title) |
|
|
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceRequestDetail(tableObject.params) |
|
|
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceRequestDetail(tableObject.params) |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
download.excel(data, `【${excelTitle.value}】子表明细【${formatDate(new Date())}】.xlsx`) |
|
|
} catch { |
|
|
} catch { |
|
|
|
|
|
|
|
|
} finally { |
|
|
} finally { |
|
@ -217,7 +232,7 @@ const buttonTableClick = async (val, row) => { |
|
|
await message.confirm('确认要发布吗?') |
|
|
await message.confirm('确认要发布吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
CustomerSaleInvoiceMainApi.publish(row.id).then(() => { |
|
|
CustomerSaleInvoiceMainApi.publish(row.id).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success('发布成功') |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh',null) |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
@ -265,7 +280,7 @@ const handleExport = async () => { |
|
|
loadStart() |
|
|
loadStart() |
|
|
const excelTitle = ref(route.meta.title) |
|
|
const excelTitle = ref(route.meta.title) |
|
|
const data = await CustomerSaleInvoiceMainApi.exportCustomerSaleInvoiceMain(tableObject.params) |
|
|
const data = await CustomerSaleInvoiceMainApi.exportCustomerSaleInvoiceMain(tableObject.params) |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
download.excel(data, `【${excelTitle.value}】主表【${formatDate(new Date())}】.xlsx`) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
loadDone() |
|
|
loadDone() |
|
|