Browse Source

YT-2478MS《销售开票申请》《销售开票记录》主表中增加并显示字段: “模具未税金额”、“模具税额”、“模具含税金额”、“材料未税金额”、“材料税额”、“材料含税金额” ,不可编辑,保留2位小数

intex_online20250410
张立 4 days ago
parent
commit
077a76278d
  1. 133
      src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts
  2. 35
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
  3. 49
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts

133
src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts

@ -5,6 +5,7 @@ import {
} from '../moldAllocation/customerStatement/customerStatementMain.data'
import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
import { accountantFormart } from '@/utils/formatter'
const { t } = useI18n() // 国际化
@ -166,6 +167,138 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
width:150
}
},
{
label: '模具未税金额',
field: 'moldUntaxedAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '模具税额',
field: 'moldTaxAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '模具含税金额',
field: 'moldTaxTotal',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料未税金额',
field: 'materialsUntaxedAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料税额',
field: 'materialsTaxAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料含税金额',
field: 'materialsTaxTotal',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
}, {
label: '模具未税尾差',
field: 'allocationDifferenceBeforeTax',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '金税票号',
field: 'goldenTaxInvoiceNumber',

35
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue

@ -40,7 +40,9 @@
discountAmount1 = 0,
beforeTaxDiffAmount = 0,
taxAmountDiff = 0,
rebateTax=0,
rebateTax = 0,
moldUntaxedAmount=0,
materialsUntaxedAmount=0
} = formModel
// 2X*2
if (formType == 'update') {
@ -56,11 +58,29 @@
}
// 2. mainTaxAmount = */100
let mainTaxAmount = Number(beforeTaxAmount*taxRate*0.01).toFixed(2)
// 4 moldTaxAmount = */100
let moldTaxAmount = Number(Number(moldUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// 6 materialsTaxAmount = */100
let materialsTaxAmount = Number(Number(materialsUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// *
let allAmount = tableData.reduce((prev, item) =>prev + Number((Number(item['allocationPrice'])*Number(item['qty'])).toFixed(2)),0).toFixed(2)
formRef.value.setValues({
//
taxAmount:mainTaxAmount,
// mainAdTaxAmount =+
adTaxAmount:beforeTaxAmount+parseFloat(taxAmount)
adTaxAmount: (beforeTaxAmount + parseFloat(taxAmount)).toFixed(2),
//
moldTaxAmount:moldTaxAmount,
// - = +
moldTaxTotal: (Number(moldUntaxedAmount) + Number(moldTaxAmount)).toFixed(2),
// -
materialsTaxAmount: materialsTaxAmount,
// -= +
materialsTaxTotal: (Number(materialsUntaxedAmount) + Number(materialsTaxAmount)).toFixed(2),
// allocationDifferenceBeforeTax : *
allocationDifferenceBeforeTax: (Number(moldUntaxedAmount) - Number(allAmount)).toFixed(2),
})
}
}
@ -72,14 +92,17 @@
let mainBeforeTaxAmount = tableData.reduce((prev, item) =>prev + Number(item['beforeTaxAmount'].toFixed(2)),0).toFixed(2)
// 2 mainTaxAmount = */100
let mainTaxAmount = Number(mainBeforeTaxAmount * taxRate * 0.01).toFixed(2)
// 3 moldUntaxedAmount : *
let moldUntaxedAmount = tableData.reduce((prev, item) =>prev + Number((Number(item['allocationPrice'])*Number(item['qty'])).toFixed(2)),0).toFixed(2)
// 3 moldUntaxedAmount : moldUntaxedAmount
let moldUntaxedAmount = tableData[0].moldUntaxedAmount
// 4 moldTaxAmount = */100
let moldTaxAmount = Number(Number(moldUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// 5 materialsUntaxedAmount : *
let materialsUntaxedAmount = tableData.reduce((prev, item) =>prev + Number((Number(item['price'])*Number(item['qty'])).toFixed(2)),0).toFixed(2)
// 6 materialsTaxAmount = */100
let materialsTaxAmount = Number(Number(materialsUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// *
let allAmount = tableData.reduce((prev, item) =>prev + Number((Number(item['allocationPrice'])*Number(item['qty'])).toFixed(2)),0).toFixed(2)
const sumObject = {
//
beforeTaxAmount:mainBeforeTaxAmount,
@ -99,8 +122,8 @@
materialsTaxAmount: materialsTaxAmount,
// -= +
materialsTaxTotal: (Number(materialsUntaxedAmount) + Number(materialsTaxAmount)).toFixed(2),
// allocationDifferenceBeforeTax : (mainBeforeTaxAmount) * (moldUntaxedAmount)
allocationDifferenceBeforeTax: (Number(mainBeforeTaxAmount) - Number(moldUntaxedAmount)).toFixed(2),
// allocationDifferenceBeforeTax : *
allocationDifferenceBeforeTax: (Number(moldUntaxedAmount) - Number(allAmount)).toFixed(2),
}
formRef.value.setValues(sumObject)
}

49
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts

@ -220,18 +220,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 160
},
sortTableDefault: 8,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '模具税额',
@ -240,18 +233,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 160
},
sortTableDefault: 8,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '模具含税金额',
@ -260,18 +246,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 160
},
sortTableDefault: 8,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料未税金额',
@ -280,18 +259,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 160
},
sortTableDefault: 9,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料税额',
@ -300,18 +272,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 160
},
sortTableDefault: 10,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料含税金额',
@ -320,18 +285,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 160
},
sortTableDefault: 10,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
}, {
label: '模具未税尾差',
field: 'allocationDifferenceBeforeTax',
@ -339,18 +297,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 160
},
sortTableDefault: 10,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '金税票号',

Loading…
Cancel
Save