From 98d7ed663f9a5f7293649aa4f0a2c4687891698a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 5 Oct 2025 14:38:00 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90erp?= =?UTF-8?q?=20=E7=B3=BB=E7=BB=9F=E3=80=91tableData.value.findIndex((item)?= =?UTF-8?q?=20=3D>=20item.id=20=3D=3D=3D=20row.id)=20=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=20seq=20=E6=AF=94=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/erp/finance/payment/modules/item-form.vue | 2 +- .../src/views/erp/finance/receipt/modules/item-form.vue | 2 +- .../src/views/erp/purchase/in/modules/item-form.vue | 6 +++--- .../src/views/erp/purchase/order/modules/item-form.vue | 6 +++--- .../src/views/erp/purchase/return/modules/item-form.vue | 6 +++--- .../web-antd/src/views/erp/sale/order/modules/item-form.vue | 6 +++--- apps/web-antd/src/views/erp/sale/out/modules/item-form.vue | 6 +++--- .../src/views/erp/sale/return/modules/item-form.vue | 6 +++--- .../src/views/erp/stock/check/modules/item-form.vue | 6 +++--- apps/web-antd/src/views/erp/stock/in/modules/item-form.vue | 6 +++--- .../web-antd/src/views/erp/stock/move/modules/item-form.vue | 6 +++--- apps/web-antd/src/views/erp/stock/out/modules/item-form.vue | 6 +++--- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/apps/web-antd/src/views/erp/finance/payment/modules/item-form.vue b/apps/web-antd/src/views/erp/finance/payment/modules/item-form.vue index 60195d7a6..3dfa62a8e 100644 --- a/apps/web-antd/src/views/erp/finance/payment/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/finance/payment/modules/item-form.vue @@ -65,7 +65,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { diff --git a/apps/web-antd/src/views/erp/finance/receipt/modules/item-form.vue b/apps/web-antd/src/views/erp/finance/receipt/modules/item-form.vue index 76746cd40..2d9230b69 100644 --- a/apps/web-antd/src/views/erp/finance/receipt/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/finance/receipt/modules/item-form.vue @@ -65,7 +65,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { diff --git a/apps/web-antd/src/views/erp/purchase/in/modules/item-form.vue b/apps/web-antd/src/views/erp/purchase/in/modules/item-form.vue index cb2d61ba7..45dce4380 100644 --- a/apps/web-antd/src/views/erp/purchase/in/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/purchase/in/modules/item-form.vue @@ -71,7 +71,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -131,7 +131,7 @@ watch( /** 处理删除 */ function handleDelete(row: ErpPurchaseInApi.PurchaseInItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -151,7 +151,7 @@ const handleWarehouseChange = async (row: ErpPurchaseInApi.PurchaseInItem) => { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/purchase/order/modules/item-form.vue b/apps/web-antd/src/views/erp/purchase/order/modules/item-form.vue index 8f787a9d4..9f4e840a0 100644 --- a/apps/web-antd/src/views/erp/purchase/order/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/purchase/order/modules/item-form.vue @@ -67,7 +67,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -142,7 +142,7 @@ function handleAdd() { /** 处理删除 */ function handleDelete(row: ErpPurchaseOrderApi.PurchaseOrderItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -169,7 +169,7 @@ async function handleProductChange(productId: any, row: any) { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/purchase/return/modules/item-form.vue b/apps/web-antd/src/views/erp/purchase/return/modules/item-form.vue index 5bf4392f6..818b2f1c7 100644 --- a/apps/web-antd/src/views/erp/purchase/return/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/purchase/return/modules/item-form.vue @@ -71,7 +71,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -131,7 +131,7 @@ watch( /** 处理删除 */ function handleDelete(row: ErpPurchaseReturnApi.PurchaseReturnItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -153,7 +153,7 @@ const handleWarehouseChange = async ( /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/sale/order/modules/item-form.vue b/apps/web-antd/src/views/erp/sale/order/modules/item-form.vue index 36094dc89..1f28a74e2 100644 --- a/apps/web-antd/src/views/erp/sale/order/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/sale/order/modules/item-form.vue @@ -67,7 +67,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -142,7 +142,7 @@ function handleAdd() { /** 处理删除 */ function handleDelete(row: ErpSaleOrderApi.SaleOrderItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -169,7 +169,7 @@ async function handleProductChange(productId: any, row: any) { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/sale/out/modules/item-form.vue b/apps/web-antd/src/views/erp/sale/out/modules/item-form.vue index 6f97538b1..f7f3011b0 100644 --- a/apps/web-antd/src/views/erp/sale/out/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/sale/out/modules/item-form.vue @@ -71,7 +71,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -131,7 +131,7 @@ watch( /** 处理删除 */ function handleDelete(row: ErpSaleOutApi.SaleOutItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -151,7 +151,7 @@ const handleWarehouseChange = async (row: ErpSaleOutApi.SaleOutItem) => { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/sale/return/modules/item-form.vue b/apps/web-antd/src/views/erp/sale/return/modules/item-form.vue index c388e1422..9259eb432 100644 --- a/apps/web-antd/src/views/erp/sale/return/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/sale/return/modules/item-form.vue @@ -71,7 +71,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -131,7 +131,7 @@ watch( /** 处理删除 */ function handleDelete(row: ErpSaleReturnApi.SaleReturnItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -151,7 +151,7 @@ const handleWarehouseChange = async (row: ErpSaleReturnApi.SaleReturnItem) => { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue b/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue index ddf093769..54d6e55f9 100644 --- a/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue @@ -55,7 +55,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -106,7 +106,7 @@ function handleAdd() { /** 处理删除 */ function handleDelete(row: ErpStockCheckApi.StockCheckItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -164,7 +164,7 @@ function handleActualCountChange(actualCount: any, row: any) { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/stock/in/modules/item-form.vue b/apps/web-antd/src/views/erp/stock/in/modules/item-form.vue index 1c0e6eff0..469c02686 100644 --- a/apps/web-antd/src/views/erp/stock/in/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/stock/in/modules/item-form.vue @@ -55,7 +55,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -105,7 +105,7 @@ function handleAdd() { /** 处理删除 */ function handleDelete(row: ErpStockInApi.StockInItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -150,7 +150,7 @@ async function handleProductChange(productId: any, row: any) { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/stock/move/modules/item-form.vue b/apps/web-antd/src/views/erp/stock/move/modules/item-form.vue index 3831ec097..5a3b45626 100644 --- a/apps/web-antd/src/views/erp/stock/move/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/stock/move/modules/item-form.vue @@ -55,7 +55,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -106,7 +106,7 @@ function handleAdd() { /** 处理删除 */ function handleDelete(row: ErpStockMoveApi.StockMoveItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -159,7 +159,7 @@ async function handleProductChange(productId: any, row: any) { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else { diff --git a/apps/web-antd/src/views/erp/stock/out/modules/item-form.vue b/apps/web-antd/src/views/erp/stock/out/modules/item-form.vue index 92c42cd78..e8ade25ba 100644 --- a/apps/web-antd/src/views/erp/stock/out/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/stock/out/modules/item-form.vue @@ -55,7 +55,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ autoResize: true, border: true, rowConfig: { - keyField: 'row_id', + keyField: 'seq', isHover: true, }, pagerConfig: { @@ -105,7 +105,7 @@ function handleAdd() { /** 处理删除 */ function handleDelete(row: ErpStockOutApi.StockOutItem) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index !== -1) { tableData.value.splice(index, 1); } @@ -148,7 +148,7 @@ async function handleProductChange(productId: any, row: any) { /** 处理行数据变更 */ function handleRowChange(row: any) { - const index = tableData.value.findIndex((item) => item.id === row.id); + const index = tableData.value.findIndex((item) => item.seq === row.seq); if (index === -1) { tableData.value.push(row); } else {