|
|
@ -87,7 +87,8 @@ |
|
|
|
discountAmount1 = 0, |
|
|
|
beforeTaxDiffAmount = 0, |
|
|
|
taxAmountDiff = 0, |
|
|
|
rebateTax=0 |
|
|
|
rebateTax=0, |
|
|
|
claimAmount=0 |
|
|
|
} = formModel |
|
|
|
// 2、系统税额:每条数据的合同价格X可开票数量,计算结果取两位小数之后*税率的计算结果,再保留2位。所有子表数据再求和 |
|
|
|
if (formType == 'update') { |
|
|
@ -102,7 +103,7 @@ |
|
|
|
updateOriginFormModel(formModel) |
|
|
|
} |
|
|
|
formRef.value.setValues({ |
|
|
|
afterTaxAmount: amount + taxAmount, // 3、系统价税合计:系统未税金额+系统税额 |
|
|
|
afterTaxAmount: amount + taxAmount - claimAmount, // 3、系统价税合计:系统未税金额+系统税额-索赔总额 |
|
|
|
adTaxAmount: beforeTaxAmount + totalTaxAmount, //6、价税合计金额:未税金额+税额 |
|
|
|
beforeTaxDiffAmount: beforeTaxAmount - amount, //未税差额:未税金额-系统未税金额 |
|
|
|
taxAmountDiff: totalTaxAmount - taxAmount, // 税额差异:税额-系统税额 |
|
|
@ -130,7 +131,7 @@ |
|
|
|
} |
|
|
|
formRef.value.setValues({ |
|
|
|
taxAmount: taxAmount_, |
|
|
|
afterTaxAmount: amount + taxAmount, // 3、系统价税合计:系统未税金额+系统税额 |
|
|
|
afterTaxAmount: amount + taxAmount - claimAmount, // 3、系统价税合计:系统未税金额+系统税额-索赔总额 |
|
|
|
adTaxAmount: beforeTaxAmount + totalTaxAmount, //6、价税合计金额:未税金额+税额 |
|
|
|
beforeTaxDiffAmount: beforeTaxAmount - amount, //未税差额:未税金额-系统未税金额 |
|
|
|
taxAmountDiff: totalTaxAmount - taxAmount, // 税额差异:税额-系统税额 |
|
|
@ -198,6 +199,7 @@ |
|
|
|
}} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<!-- <template #foorter> |
|
|
|
<div style="text-align: left"> |
|
|
|
{{ basicFormFooter }} |
|
|
@ -210,6 +212,40 @@ |
|
|
|
:modelValue="(row['singlePrice'] - row['purchasePrice']).toFixed(5)" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
<template #table> |
|
|
|
<div > |
|
|
|
<div style="padding-left: 10px;border-left: 6px solid #409eff;margin:10px 0px;font-size: 16px;font-weight: bold;">索赔明细</div> |
|
|
|
<!-- <Table |
|
|
|
:columns="ClaimDetails.allSchemas.tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
|
:pagination="{ |
|
|
|
total: tableObject.total |
|
|
|
}" |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
style='width: calc(100% - 32px);' |
|
|
|
/> --> |
|
|
|
<div |
|
|
|
style="border: 1px solid #dedede; |
|
|
|
border-radius: 8px; |
|
|
|
padding: 10px; |
|
|
|
width: calc(100% - 32px); |
|
|
|
display: flex;"> |
|
|
|
<TableForm |
|
|
|
ref="tableFormRef" |
|
|
|
class="w-[100%]" |
|
|
|
:tableFields="ClaimDetails.allSchemas.tableFormColumns" |
|
|
|
:tableData="claimDetailsList" |
|
|
|
:isShowButton="false" |
|
|
|
:isShowReduceButton="false" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</BasicForm> |
|
|
|
|
|
|
|
<!-- 财务通过窗口 finance_mainPlanSub --> |
|
|
@ -350,6 +386,7 @@ |
|
|
|
import dayjs from 'dayjs' |
|
|
|
// 供应商发票申请 |
|
|
|
import download from '@/utils/download' |
|
|
|
import TableForm from '@/components/TableForm/src/TableForm.vue' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import { |
|
|
|
SupplierinvoiceRequestMain, |
|
|
@ -360,10 +397,13 @@ import { |
|
|
|
SupplierinvoiceRequestFinanceRules, |
|
|
|
PurchasePass, |
|
|
|
PurchasePassRules, |
|
|
|
SupplierinvoiceRequestDetailMain |
|
|
|
SupplierinvoiceRequestDetailMain, |
|
|
|
ClaimDetails |
|
|
|
} from './supplierinvoiceRequestMain.data' |
|
|
|
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' |
|
|
|
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' |
|
|
|
import * as PurchaseClaimRequestDetailApi from '@/api/wms/purchaseClaimRequestDetail' |
|
|
|
|
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data' |
|
|
@ -566,12 +606,17 @@ const searchTableSuccess = (formField, searchField, val, searchFormRef, type, ro |
|
|
|
}) |
|
|
|
} else { |
|
|
|
// 切换供应商代码 |
|
|
|
console.log(11,val[0][searchField]) |
|
|
|
console.log(11,searchFormRef.formModel.supplierCode) |
|
|
|
if ( |
|
|
|
formField == 'supplierCode' && |
|
|
|
val[0][searchField] != searchFormRef.formModel.supplierCode |
|
|
|
) { |
|
|
|
tableData.value = [] |
|
|
|
} |
|
|
|
if (formField == 'supplierCode') { |
|
|
|
claimDetails(val[0][searchField]) |
|
|
|
} |
|
|
|
// 切换订单类型 |
|
|
|
if (formField == 'orderType' && val[0][searchField] != searchFormRef.formModel.orderType) { |
|
|
|
tableData.value = [] |
|
|
@ -873,6 +918,7 @@ const openForm = async (type: string, row?: any) => { |
|
|
|
item.value = defaultSupplierCode.value |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
item.componentProps.disabled = false |
|
|
|
claimDetails(defaultSupplierCode.value) |
|
|
|
} |
|
|
|
// 订单类型 |
|
|
|
if (item.field == 'orderType') { |
|
|
@ -918,7 +964,15 @@ const openForm = async (type: string, row?: any) => { |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
formRef.value.open(type, row) |
|
|
|
} |
|
|
|
// 校验是否可以开票 |
|
|
|
// 获取索赔明细 |
|
|
|
const claimDetailsList = ref([]) |
|
|
|
const claimDetails = async (supplierCode) => { |
|
|
|
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(supplierCode) |
|
|
|
formRef.value.formRef.formModel.claimAmount = claimDetailsList.value.map(item => item.claimAmount).reduce((prev, item) => prev + item).toFixed(5) |
|
|
|
formRef.value.formRef.formModel.afterTaxAmount = (parseFloat(formRef.value.formRef.formModel.afterTaxAmount) - parseFloat(formRef.value.formRef.formModel.claimAmount)).toFixed(2) |
|
|
|
console.log(formRef.value.formRef.formModel.afterTaxAmount) |
|
|
|
} |
|
|
|
// 校验是否可以开票 |
|
|
|
const checkInvoicingCalendar = async () => { |
|
|
|
let resData = '' |
|
|
|
await SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then((res) => { |
|
|
@ -937,6 +991,7 @@ const getDefaultSupplier = async () => { |
|
|
|
console.log('defaultSupplierCode', defaultSupplierCode) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
|
const { wsCache } = useCache() |
|
|
|
/** 详情操作 */ |
|
|
|