Browse Source

供应商发票添加发票总额

intex_online20241216
张立 2 months ago
parent
commit
1a4b92a20f
  1. 22
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  2. 10
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  3. 41
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

22
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -16,6 +16,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isSearch: false isSearch: false
}, },
{ {
label: '发票申请单号', label: '发票申请单号',
field:'requestNumber', field:'requestNumber',
@ -286,9 +287,6 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
} }
}, },
{ {
label: '索赔金额', label: '索赔金额',
field: 'claimAmount', field: 'claimAmount',
@ -747,6 +745,15 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150 // width: 150
// }, // },
// }, // },
{
label: '发票总额',
field: 'invoiceAmountMain',
formatter: accountantFormart,
table: {
width: 160
},
sortTableDefault: 12,
},
{ {
label: '索赔总额', label: '索赔总额',
field: 'claimAmount', field: 'claimAmount',
@ -1350,9 +1357,14 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
}, },
}, },
{ {
label: '', label: '发票总额',
field: '', field: 'invoiceAmountMain',
formatter: accountantFormart,
table: {
width: 160
},
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,

10
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -87,7 +87,8 @@
discountAmount1 = 0, discountAmount1 = 0,
beforeTaxDiffAmount = 0, beforeTaxDiffAmount = 0,
taxAmountDiff = 0, taxAmountDiff = 0,
rebateTax=0, rebateTax = 0,
claimAmount = 0,
} = formModel } = formModel
// 2X*2 // 2X*2
if (formType == 'update') { if (formType == 'update') {
@ -103,6 +104,7 @@
} }
formRef.value.setValues({ formRef.value.setValues({
afterTaxAmount: amount + taxAmount, // 3+- afterTaxAmount: amount + taxAmount, // 3+-
invoiceAmountMain: amount - claimAmount, // -
adTaxAmount: beforeTaxAmount + totalTaxAmount, //6+ adTaxAmount: beforeTaxAmount + totalTaxAmount, //6+
beforeTaxDiffAmount: beforeTaxAmount - amount, //- beforeTaxDiffAmount: beforeTaxAmount - amount, //-
taxAmountDiff: totalTaxAmount - taxAmount, // - taxAmountDiff: totalTaxAmount - taxAmount, // -
@ -131,6 +133,7 @@
formRef.value.setValues({ formRef.value.setValues({
taxAmount: taxAmount_, taxAmount: taxAmount_,
afterTaxAmount: amount + taxAmount, // 3+- afterTaxAmount: amount + taxAmount, // 3+-
invoiceAmountMain: amount - claimAmount, // -
adTaxAmount: beforeTaxAmount + totalTaxAmount, //6+ adTaxAmount: beforeTaxAmount + totalTaxAmount, //6+
beforeTaxDiffAmount: beforeTaxAmount - amount, //- beforeTaxDiffAmount: beforeTaxAmount - amount, //-
taxAmountDiff: totalTaxAmount - taxAmount, // - taxAmountDiff: totalTaxAmount - taxAmount, // -
@ -163,7 +166,8 @@
), ),
0 0
) )
} }
sumObject.invoiceAmountMain = (Number(sumObject.amount) -Number(formRef.value.formModel.claimAmount)).toFixed(2), // -
formRef.value.setValues(sumObject) formRef.value.setValues(sumObject)
} }
" "
@ -986,7 +990,7 @@ const claimDetailsList = ref([])
const claimDetails = async (supplierCode) => { const claimDetails = async (supplierCode) => {
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(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.claimAmount = claimDetailsList.value.map(item => item.claimAmount).reduce((prev, item) => prev + item).toFixed(5)
formRef.value.formRef.formModel.invoiceAmountMain = (Number(formRef.value.formRef.formModel.amount) -Number(formRef.value.formModel.claimAmount)).toFixed(2) // -
} }
// //
const claimDetailsForUpdate = async (supplierCode,id) => { const claimDetailsForUpdate = async (supplierCode,id) => {

41
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -270,6 +270,26 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
precision: 2, precision: 2,
} }
}, },
{
label: '发票总额',
field: 'invoiceAmountMain',
formatter: accountantFormart,
sortTableDefault: 3,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
},
},
{ {
label: '税率(%)', label: '税率(%)',
field: 'taxRate', field: 'taxRate',
@ -1591,7 +1611,26 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
}, },
}, },
{
label: '发票总额',
field: 'invoiceAmountMain',
formatter: accountantFormart,
table: {
width: 160
},
sortTableDefault: 8,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
},
},
])) ]))

Loading…
Cancel
Save