diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue
index 2e599dd83..4037b7250 100644
--- a/src/components/Form/src/Form.vue
+++ b/src/components/Form/src/Form.vue
@@ -496,4 +496,7 @@ export default defineComponent({
::v-deep(.el-select-v2 .el-icon) {
display: inline-flex;
}
+::v-deep(.el-input-number){
+ width: 100%;
+}
diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
index c6a36bfd3..ef3473e49 100644
--- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
+++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
@@ -70,15 +70,37 @@
const { taxRate = 0 } = formModel
// 1、主数据未税金额 mainBeforeTaxAmount : 所有明细行未税金额的和
let mainBeforeTaxAmount = tableData.reduce((prev, item) =>prev + Number(item['beforeTaxAmount'].toFixed(2)),0).toFixed(2)
- // 2.主数据税额 mainTaxAmount = 未税金额*税率/100 保留两位小数
+ // 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)
+ // 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)
const sumObject = {
// 主数据未税金额
beforeTaxAmount:mainBeforeTaxAmount,
// 主数据税额
taxAmount:mainTaxAmount,
// 主数据价税合计金额:mainAdTaxAmount =未税金额+税额
- adTaxAmount:(Number(mainBeforeTaxAmount)+Number(mainTaxAmount)).toFixed(2)
+ adTaxAmount:(Number(mainBeforeTaxAmount)+Number(mainTaxAmount)).toFixed(2),
+ // 主数据-模具未税金额
+ moldUntaxedAmount: moldUntaxedAmount,
+ // 主数据-模具税额
+ moldTaxAmount:moldTaxAmount,
+ // 主数据-模具含税金额 = 模具未税金额+模具税额
+ moldTaxTotal: (Number(moldUntaxedAmount) + Number(moldTaxAmount)).toFixed(2),
+ // 主数据-材料未税金额
+ materialsUntaxedAmount: materialsUntaxedAmount,
+ // 主数据-材料金额
+ materialsTaxAmount: materialsTaxAmount,
+ // 主数据-材料含税金额= 材料未税金额+材料税额
+ materialsTaxTotal: (Number(materialsUntaxedAmount) + Number(materialsTaxAmount)).toFixed(2),
+ // 主数据模具未税尾差 allocationDifferenceBeforeTax : 所有明细行未税金额保留两位小数的总和 (mainBeforeTaxAmount) 减去 系统明细中品番数量*模具单价 保留两位小数(moldUntaxedAmount)后汇总金额
+ allocationDifferenceBeforeTax: (Number(mainBeforeTaxAmount) - Number(moldUntaxedAmount)).toFixed(2),
}
formRef.value.setValues(sumObject)
}
@@ -323,4 +345,5 @@ const tableSelectionDelete = (selection) => {
defineExpose({openForm,openFormTable})
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
index ca03b41cb..41e0336cc 100644
--- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
+++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
@@ -6,6 +6,7 @@ import {
import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
+import { accountantFormart } from '@/utils/formatter'
const { t } = useI18n() // 国际化
const invoiceType = [{label:'全部',value:''},...getDictOptions(DICT_TYPE.INVOICE_TYPE)]
console.log(888, invoiceType)
@@ -212,6 +213,145 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([
width:150
}
},
+ {
+ label: '模具未税金额',
+ field: 'moldUntaxedAmount',
+ formatter: accountantFormart,
+ table: {
+ width: 160
+ },
+ sortTableDefault: 8,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
+ },
+ {
+ label: '模具税额',
+ field: 'moldTaxAmount',
+ formatter: accountantFormart,
+ table: {
+ width: 160
+ },
+ sortTableDefault: 8,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
+ },
+ {
+ label: '模具含税金额',
+ field: 'moldTaxTotal',
+ formatter: accountantFormart,
+ table: {
+ width: 160
+ },
+ sortTableDefault: 8,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
+ },
+ {
+ label: '材料未税金额',
+ field: 'materialsUntaxedAmount',
+ formatter: accountantFormart,
+ table: {
+ width: 160
+ },
+ sortTableDefault: 9,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
+ },
+ {
+ label: '材料税额',
+ field: 'materialsTaxAmount',
+ formatter: accountantFormart,
+ table: {
+ width: 160
+ },
+ sortTableDefault: 10,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
+ },
+ {
+ label: '材料含税金额',
+ field: 'materialsTaxTotal',
+ formatter: accountantFormart,
+ table: {
+ width: 160
+ },
+ sortTableDefault: 10,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
+ }, {
+ label: '模具未税尾差',
+ field: 'allocationDifferenceBeforeTax',
+ formatter: accountantFormart,
+ table: {
+ width: 160
+ },
+ sortTableDefault: 10,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
+ },
{
label: '金税票号',
field: 'goldenTaxInvoiceNumber',