From fa68fdcc8f96d306612cc06c90618f0e4f1c1c7a Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Tue, 22 Apr 2025 17:12:51 +0800 Subject: [PATCH 1/8] =?UTF-8?q?YT-2478:=E9=94=80=E5=94=AE=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E5=B1=95=E7=A4=BA=E6=98=8E=E7=BB=86=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=9C=80=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerSaleInvoiceBasicForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue index fdf0d5bae..c6a36bfd3 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue @@ -267,7 +267,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['customerName'] = val[0]['customerName'] CustomerStatementDetailApi.getCustomerStatementDetailPage({ pageNo:1, - pageSize: 5000, + pageSize: 50000, masterId:val[0]['id'] }).then((res) => { console.log(55,res) From 2fc5511e8bf4b50ff5e053a2e25a74da0eb609a7 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Thu, 24 Apr 2025 08:45:17 +0800 Subject: [PATCH 2/8] =?UTF-8?q?YT-2478WMS=E3=80=8A=E9=94=80=E5=94=AE?= =?UTF-8?q?=E5=BC=80=E7=A5=A8=E7=94=B3=E8=AF=B7=E3=80=8B=E4=B8=BB=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=B9=B6=E6=98=BE=E7=A4=BA=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=9A=20=E2=80=9C=E6=A8=A1=E5=85=B7=E6=9C=AA?= =?UTF-8?q?=E7=A8=8E=E9=87=91=E9=A2=9D=E2=80=9D=E3=80=81=E2=80=9C=E6=A8=A1?= =?UTF-8?q?=E5=85=B7=E7=A8=8E=E9=A2=9D=E2=80=9D=E3=80=81=E2=80=9C=E6=A8=A1?= =?UTF-8?q?=E5=85=B7=E5=90=AB=E7=A8=8E=E9=87=91=E9=A2=9D=E2=80=9D=E3=80=81?= =?UTF-8?q?=E2=80=9C=E6=9D=90=E6=96=99=E6=9C=AA=E7=A8=8E=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E2=80=9D=E3=80=81=E2=80=9C=E6=9D=90=E6=96=99=E7=A8=8E=E9=A2=9D?= =?UTF-8?q?=E2=80=9D=E3=80=81=E2=80=9C=E6=9D=90=E6=96=99=E5=90=AB=E7=A8=8E?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E2=80=9D=20=EF=BC=8C=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=EF=BC=8C=E4=BF=9D=E7=95=992=E4=BD=8D?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E3=80=82YT-2430=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=8F=AA=E5=81=9A=E4=BA=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/Form.vue | 3 + .../CustomerSaleInvoiceBasicForm.vue | 29 +++- .../customerSaleInvoiceRequestMain.data.ts | 140 ++++++++++++++++++ 3 files changed, 169 insertions(+), 3 deletions(-) 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', From 4176662e7c7b1cec6fb1c2bc074abd98effa2c3e Mon Sep 17 00:00:00 2001 From: zhang_li Date: Thu, 24 Apr 2025 09:26:42 +0800 Subject: [PATCH 3/8] =?UTF-8?q?YT-2511=E5=8F=B7=E5=8F=A3=E5=93=81=E3=80=81?= =?UTF-8?q?=E8=A1=A5=E7=BB=99=E5=93=81=E7=94=9F=E4=BA=A7=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=EF=BC=8C=E5=88=9B=E5=BB=BA=E6=A0=87=E7=AD=BE=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E9=80=89=E6=8B=A9=E6=89=B9=E6=AC=A1=EF=BC=8C?= =?UTF-8?q?=E6=8C=89=E6=95=B0=E9=87=8F=E7=AE=A1=E7=90=86=E5=BA=94=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=89=B9=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceiptRequestMain.data.ts | 6 +++--- .../productreceiptAssembleRequestMain.data.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index 944c9e269..b5bcff7e9 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -2218,9 +2218,9 @@ export const ProductreceiptRequestLabelRules = reactive({ productionLineCodePackage: [ { required: true, message: '请选择生产线', trigger: 'change' } ], - batch: [ - { required: true, message: '请选择批次', trigger: ['change','blur'] } - ], + // batch: [ + // { required: true, message: '请选择批次', trigger: ['change','blur'] } + // ], packUnit: [ { required: true, message: '请选择包装规格', trigger: ['change','blur'] } ], diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts index 9c93172af..d14a711c7 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -2186,7 +2186,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas( export const ProductreceiptRequestLabelRules = reactive({ supplierItemCode: [{ required: true, message: '请选择供应商', trigger: 'change' }], productionLineCodePackage: [{ required: true, message: '请选择生产线', trigger: 'change' }], - batch: [{ required: true, message: '请选择批次', trigger: ['change', 'blur'] }], + // batch: [{ required: true, message: '请选择批次', trigger: ['change', 'blur'] }], packUnit: [ { required: true, message: '请选择包装规格', trigger: ['change','blur'] } ], From 077a76278d469fd1bd8982a7307f230153381583 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Thu, 24 Apr 2025 10:38:13 +0800 Subject: [PATCH 4/8] =?UTF-8?q?YT-2478MS=E3=80=8A=E9=94=80=E5=94=AE?= =?UTF-8?q?=E5=BC=80=E7=A5=A8=E7=94=B3=E8=AF=B7=E3=80=8B=E3=80=8A=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=BC=80=E7=A5=A8=E8=AE=B0=E5=BD=95=E3=80=8B=E4=B8=BB?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=B9=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=9A=20=E2=80=9C=E6=A8=A1=E5=85=B7?= =?UTF-8?q?=E6=9C=AA=E7=A8=8E=E9=87=91=E9=A2=9D=E2=80=9D=E3=80=81=E2=80=9C?= =?UTF-8?q?=E6=A8=A1=E5=85=B7=E7=A8=8E=E9=A2=9D=E2=80=9D=E3=80=81=E2=80=9C?= =?UTF-8?q?=E6=A8=A1=E5=85=B7=E5=90=AB=E7=A8=8E=E9=87=91=E9=A2=9D=E2=80=9D?= =?UTF-8?q?=E3=80=81=E2=80=9C=E6=9D=90=E6=96=99=E6=9C=AA=E7=A8=8E=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E2=80=9D=E3=80=81=E2=80=9C=E6=9D=90=E6=96=99=E7=A8=8E?= =?UTF-8?q?=E9=A2=9D=E2=80=9D=E3=80=81=E2=80=9C=E6=9D=90=E6=96=99=E5=90=AB?= =?UTF-8?q?=E7=A8=8E=E9=87=91=E9=A2=9D=E2=80=9D=20=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E7=BC=96=E8=BE=91=EF=BC=8C=E4=BF=9D=E7=95=992?= =?UTF-8?q?=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerSaleInvoiceRecordMain.data.ts | 133 ++++++++++++++++++ .../CustomerSaleInvoiceBasicForm.vue | 35 ++++- .../customerSaleInvoiceRequestMain.data.ts | 49 ------- 3 files changed, 162 insertions(+), 55 deletions(-) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts index 6f3a6a436..4b8a03ae6 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts +++ b/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([ 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', diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue index ef3473e49..364f37b6e 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue +++ b/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 // 2、系统税额:每条数据的合同价格X可开票数量,计算结果取两位小数之后*税率的计算结果,再保留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) } diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts index 41e0336cc..859670da0 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts @@ -220,18 +220,11 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ 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([ 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([ 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([ 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([ 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([ 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([ table: { width: 160 }, - sortTableDefault: 10, form: { - component: 'InputNumber', componentProps: { - precision: 2, disabled: true, } }, - tableForm: { - type: 'InputNumber', - precision: 2, - } }, { label: '金税票号', From c44f1376cd013e6836adc44c99f442ae1ac16cc8 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Thu, 24 Apr 2025 10:46:45 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=A8=A1=E5=85=B7=E6=9C=AA=E7=A8=8E?= =?UTF-8?q?=E5=B0=BE=E5=B7=AE=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerSaleInvoiceBasicForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue index 364f37b6e..0f96a15ff 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue @@ -80,7 +80,7 @@ materialsTaxTotal: (Number(materialsUntaxedAmount) + Number(materialsTaxAmount)).toFixed(2), // 主数据模具未税尾差 allocationDifferenceBeforeTax : 模具未税金额 减去 系统明细中品番数量*模具单价 保留两位小数后汇总金额 - allocationDifferenceBeforeTax: (Number(moldUntaxedAmount) - Number(allAmount)).toFixed(2), + // allocationDifferenceBeforeTax: (Number(moldUntaxedAmount) - Number(allAmount)).toFixed(2), }) } } From f4a6b74970075406fe43556c24bd8ed6452b5a6b Mon Sep 17 00:00:00 2001 From: zhang_li Date: Thu, 24 Apr 2025 11:23:17 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=81=A2=E5=A4=8DYT-2511=E5=8F=B7=E5=8F=A3?= =?UTF-8?q?=E5=93=81=E3=80=81=E8=A1=A5=E7=BB=99=E5=93=81=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=EF=BC=8C=E5=88=9B=E5=BB=BA=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=8F=90=E7=A4=BA=E9=80=89=E6=8B=A9=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=EF=BC=8C=E6=8C=89=E6=95=B0=E9=87=8F=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=BA=94=E6=B2=A1=E6=9C=89=E6=89=B9=E6=AC=A1=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=9C=A8=E6=AD=A4=E5=88=86=E6=94=AF=E4=B8=8A=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceiptRequestMain.data.ts | 6 +++--- .../productreceiptAssembleRequestMain.data.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index b5bcff7e9..944c9e269 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -2218,9 +2218,9 @@ export const ProductreceiptRequestLabelRules = reactive({ productionLineCodePackage: [ { required: true, message: '请选择生产线', trigger: 'change' } ], - // batch: [ - // { required: true, message: '请选择批次', trigger: ['change','blur'] } - // ], + batch: [ + { required: true, message: '请选择批次', trigger: ['change','blur'] } + ], packUnit: [ { required: true, message: '请选择包装规格', trigger: ['change','blur'] } ], diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts index d14a711c7..9c93172af 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -2186,7 +2186,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas( export const ProductreceiptRequestLabelRules = reactive({ supplierItemCode: [{ required: true, message: '请选择供应商', trigger: 'change' }], productionLineCodePackage: [{ required: true, message: '请选择生产线', trigger: 'change' }], - // batch: [{ required: true, message: '请选择批次', trigger: ['change', 'blur'] }], + batch: [{ required: true, message: '请选择批次', trigger: ['change', 'blur'] }], packUnit: [ { required: true, message: '请选择包装规格', trigger: ['change','blur'] } ], From 06cc93927ee3aff4164052b9412444702d062dc2 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Fri, 25 Apr 2025 10:20:20 +0800 Subject: [PATCH 7/8] =?UTF-8?q?YT-2519=E5=AE=A2=E6=88=B7=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E5=8F=98=E6=9B=B4=EF=BC=8C=E8=AF=A6=E8=A7=81=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en-US.ts | 5 +- src/locales/zh-CN.ts | 3 + .../customerStatement/index.vue | 85 +++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 4c195e17d..f0f471b00 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1313,13 +1313,16 @@ export default { 重新对比成功: 'Re comparison successful', 确认对比结果: 'Confirm the comparison results', 确认成功: 'Confirmed successful', + 确认不分摊成功: 'Confirm successful non allocation', 确认分摊金额: 'Confirm the shared amount', + 确认不分摊: 'Confirm not to allocate', 导入模具分摊对账单: 'Import mold allocation statement', 是否重新对比: 'Do you want to re compare?', 是否确认对比结果: 'Are you sure about the comparison results?', "是否退回所选中数据?": 'Do you want to return the selected data?', 退回成功: 'Returned successfully', - 是否确认分摊金额: 'Do you want to confirm the allocation amount?', + 是否确认分摊金额: 'Are you sure about the allocation amount?', + 是否确认不分摊: 'Are you sure not to allocate?', 创建开票申请: 'Create an invoice request?', 详情:'Detail', 退回:'Return', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 4fa544df5..97dd8493b 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1313,13 +1313,16 @@ export default { 重新对比成功: '重新对比成功', 确认对比结果: '确认对比结果', 确认成功: '确认成功', + 确认不分摊成功: '确认不分摊成功', 确认分摊金额: '确认分摊金额', + 确认不分摊: '确认不分摊', 导入模具分摊对账单: '导入模具分摊对账单', 是否重新对比: '是否重新对比?', "是否确认对比结果": "是否确认对比结果?", "是否退回所选中数据?": '是否退回所选中数据?', 退回成功: '退回成功', 是否确认分摊金额: '是否确认分摊金额?', + 是否确认不分摊: '是否确认不分摊?', 创建开票申请: '创建开票申请', 作废成功:'作废成功', 退回: '退回', diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue index 1f75ab7fa..1334402d2 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue @@ -291,6 +291,15 @@ const butttondata = (row, $index) => { hasPermi: 'wms:customer-statement-main:confirmationShare', link: true // 文本展现按钮 }, + { + label: t('ts.确认不分摊'), + name: 'confirmationNoShare', + hide: row.isNoShare!='1', + type: 'primary', + color: '', + hasPermi: 'wms:customer-statement-main:confirmationShare', + link: true // 文本展现按钮 + }, { label: t('ts.创建开票申请'), name: 'createTicketApply', @@ -327,6 +336,9 @@ const buttonTableClick = async (val, row) => { } else if (val == 'confirmShareMoney') { // 确认分摊金额 handleConfirmShareMoney(row.id) + } else if (val == 'confirmationNoShare') { + // 确认不分摊金额 + handleConfirmationNoShare(row.id) } else if (val == 'createTicketApply') { // 创建开票申请 let mainRes = await CustomerStatementMainApi.getCustomerStatementMain(row.id) @@ -572,6 +584,26 @@ const handleConfirmShareMoney = async (id: number) => { await getList() } } +// 确认不分摊金额 +const handleConfirmationNoShare = async (id: number) => { + try { + await message.confirm(t('ts.是否确认不分摊')) + await CustomerStatementMainApi.confirmationNoShare(id) + // chooseRow.value = 5 + let res = await CustomerStatementMainApi.getCustomerStatementMainPage({ + id:chooseRow.value.id, + pageSize:20, + pageNo:1 + }) + if(res&&res.list&&res.list.length>0){ + chooseRow.value = res.list[0] + } + await message.success(t('ts.确认不分摊成功')) + } finally { + // 刷新列表 + await getList() + } +} // 根据状态返回该按钮是否显示 const isShowMainButton = (row, val) => { if (val.indexOf(row.status) > -1) { @@ -580,6 +612,14 @@ const isShowMainButton = (row, val) => { return true } } +// 根据状态返回该按钮是否显示 +const isShowMainButton1 = (row, val) => { + if (val.indexOf(row.isNoShare) > -1) { + return false + } else { + return true + } +} const tabCurrent = ref({}) const changeTabs = async (item) => { tabCurrent.value = item @@ -684,6 +724,16 @@ console.log(555,DetailAllSchemas.value) float: 'left', disabled: chooseRow.value.isShare == 0 ? true : false, hasPermi: 'wms:customer-statement-main:confirmationShare' + }, + { + label: t('ts.确认不分摊'), + name: 'confirmationNoShare', + hide: isShowMainButton1(chooseRow.value, ['1']), + type: 'primary', + color: '', + float: 'left', + disabled: chooseRow.value.isNoShare == 0 ? true : false, + hasPermi: 'wms:customer-statement-main:confirmationShare' } ] } else { @@ -747,6 +797,23 @@ const detailButtonBaseClick = async (val, item, detailTableObject) => { } ] } catch {} + }else if (val == 'confirmationNoShare') { + // 确认分摊金额 + try { + await handleConfirmationNoShare(chooseRow.value.id) + detailRef.value.submitUpdateList() + otherHeadButttonData.value = [ + { + label: t(`ts.导出`).replace('ts.', ''), + name: 'export', + hide: false, + type: 'success', + icon: 'ep:download', + color: '', + hasPermi: 'wms:customer-statement-main:export' + } + ] + } catch {} } } // 子表导出明细 @@ -833,6 +900,15 @@ const handleDetailSubmitForm = async (formType, data) => { disabled:true, float: 'left', hasPermi: 'wms:customer-statement-main:confirmationShare' + }, { + label: t('ts.确认不分摊'), + name: 'confirmationNoShare', + hide: isShowMainButton1(chooseRow.value, ['1']), + type: 'primary', + color: '', + float: 'left', + disabled:true, + hasPermi: 'wms:customer-statement-main:confirmationShare' } ] } else { @@ -855,6 +931,15 @@ const handleDetailSubmitForm = async (formType, data) => { disabled:false, float: 'left', hasPermi: 'wms:customer-statement-main:confirmationShare' + } ,{ + label: t('ts.确认不分摊'), + name: 'confirmationNoShare', + hide: isShowMainButton1(chooseRow.value, ['1']), + type: 'primary', + color: '', + float: 'left', + disabled: false, + hasPermi: 'wms:customer-statement-main:confirmationShare' } ] } From ce494b96f0e8701a94516f6229150b7410332e09 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Fri, 25 Apr 2025 10:20:51 +0800 Subject: [PATCH 8/8] =?UTF-8?q?YT-2519=E5=AE=A2=E6=88=B7=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E5=8F=98=E6=9B=B4=EF=BC=8C=E8=AF=A6=E8=A7=81=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/customerStatementMain/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/wms/customerStatementMain/index.ts b/src/api/wms/customerStatementMain/index.ts index bd60e0972..2f182e977 100644 --- a/src/api/wms/customerStatementMain/index.ts +++ b/src/api/wms/customerStatementMain/index.ts @@ -96,7 +96,10 @@ export const publish = async (id: number) => { export const confirmationShare = async (id: number) => { return await request.get({ url: `/wms/customer-statement-main/confirmationShare?id=` + id}) } - +// 根据对账单主id点击确认不分摊 +export const confirmationNoShare = async (id: number) => { + return await request.get({ url: `/wms/customer-statement-main/confirmationNoShare?id=` + id }) +} // 客户对账单查询客户代码 export const getCustomerList = async () => { return await request.get({ url: `/wms/customer-statement-main/confirmationShare`})