From 57ec2038f86f47a87db6b73c0c6eb27c1c25b08e Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期三, 06 八月 2025 14:16:00 +0800 Subject: [PATCH] 我的已办、仓库管理相关调整 --- src/views/tms/WarehouseList.vue | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/src/views/tms/WarehouseList.vue b/src/views/tms/WarehouseList.vue index 9be0090..9466732 100644 --- a/src/views/tms/WarehouseList.vue +++ b/src/views/tms/WarehouseList.vue @@ -268,7 +268,20 @@ }, methods: { handleAdd: function () { - const nextSeq = Number(this.dataSource[this.dataSource.length - 1].seq) + 1 + let nextSeq = 0; + // 瀹夊叏鐨勫啓娉� + if (this.dataSource && this.dataSource.length > 0) { + const lastItem = this.dataSource[this.dataSource.length - 1]; + if (lastItem && lastItem.seq !== undefined) { + nextSeq = Number(lastItem.seq) + 1; + } else { + // 澶勭悊鏈�鍚庝竴涓厓绱犱笉瀛樺湪seq鐨勬儏鍐� + nextSeq = 0; // 鎴栧叾浠栭粯璁ゅ�� + } + } else { + // 澶勭悊鏁扮粍涓虹┖鐨勬儏鍐� + nextSeq = 0; // 鎴栧叾浠栭粯璁ゅ�� + } this.$refs.modalForm.add(nextSeq); this.$refs.modalForm.title = "鏂板"; this.$refs.modalForm.disableSubmit = false; -- Gitblit v1.9.3