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