From 6a8598cd9fc7f92603ff77f15fd9da33695646d4 Mon Sep 17 00:00:00 2001
From: zjf <1799650030@qq.com>
Date: Thu, 2 Jan 2025 15:46:10 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B6=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 8 +-
src/views/supermarket/supermarketSpu/form.vue | 174 +++++++++---------
.../supermarket/supermarketSpu/index.vue | 12 +-
3 files changed, 97 insertions(+), 97 deletions(-)
diff --git a/.env.development b/.env.development
index 274b324..8d2e21c 100644
--- a/.env.development
+++ b/.env.development
@@ -8,12 +8,12 @@ VITE_OPEN = true
ENV = 'development'
# ADMIN 服务地址
-VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/
-#VITE_ADMIN_PROXY_PATH = http://192.168.110.156:9999
+#VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/
+VITE_ADMIN_PROXY_PATH = http://127.0.0.1:9999
# 图片访问基础地址
-VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api
-# VITE_IMAGE_BASE_PATH = http://localhost:9999
+#VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api
+ VITE_IMAGE_BASE_PATH = http://localhost:9999
# 代码生成服务地址
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
diff --git a/src/views/supermarket/supermarketSpu/form.vue b/src/views/supermarket/supermarketSpu/form.vue
index b445e05..2373b96 100644
--- a/src/views/supermarket/supermarketSpu/form.vue
+++ b/src/views/supermarket/supermarketSpu/form.vue
@@ -38,6 +38,20 @@
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
@@ -48,29 +62,22 @@
-
+
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -82,73 +89,66 @@
-->
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -156,11 +156,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -176,11 +176,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/src/views/supermarket/supermarketSpu/index.vue b/src/views/supermarket/supermarketSpu/index.vue
index 17ba7b1..743edf3 100644
--- a/src/views/supermarket/supermarketSpu/index.vue
+++ b/src/views/supermarket/supermarketSpu/index.vue
@@ -73,16 +73,16 @@
-
+
-
+
-
-
-
-
+
+
+
+
From c444bc8607e206d5fa1b87fd224311778c4f6a69 Mon Sep 17 00:00:00 2001
From: ctw <>
Date: Fri, 3 Jan 2025 11:49:03 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=8C=85=E8=A3=85=E5=8D=95=E4=BD=8D?=
=?UTF-8?q?=E5=92=8C=E8=BE=85=E5=8A=A9=E6=9D=A1=E7=A0=81=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../supermarketAuxiliaryCode/form.vue | 2 +-
.../supermarketAuxiliaryCode/index.vue | 55 ++++++------
.../components/supermarketUnit/index.vue | 65 +++++++-------
src/views/supermarket/supermarketSpu/form.vue | 90 +++++++++++--------
4 files changed, 116 insertions(+), 96 deletions(-)
diff --git a/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/form.vue b/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/form.vue
index df8ed9f..02bb08e 100644
--- a/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/form.vue
+++ b/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/form.vue
@@ -2,7 +2,7 @@
-
+
diff --git a/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/index.vue b/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/index.vue
index 37c81ee..e62fbab 100644
--- a/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/index.vue
+++ b/src/views/supermarket/supermarketSpu/components/supermarketAuxiliaryCode/index.vue
@@ -45,28 +45,30 @@
> -->
-
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
@@ -110,13 +112,14 @@ const tableStyle = {
const getDataList = (formData: any) => {
console.log(formData);
- const index = supermarketAuxiliaryCodeEntityList.value.findIndex((item: any) => item.id === formData.id);
- if (index === -1) {
- supermarketAuxiliaryCodeEntityList.value.push(formData);
+ const index = supermarketAuxiliaryCodeEntityList.value?.findIndex((item: any) => item.id === formData.id);
+ if (supermarketAuxiliaryCodeEntityList.value == null || index == undefined) {
+ supermarketAuxiliaryCodeEntityList.value = [{ ...formData, isNew: true }];
+ } else if (index === -1) {
+ supermarketAuxiliaryCodeEntityList.value.push({ ...formData, isNew: true });
} else {
supermarketAuxiliaryCodeEntityList.value[index] = formData;
}
- console.log('a', supermarketAuxiliaryCodeEntityList.value);
};
// 清空搜索条件
// const resetQuery = () => {
diff --git a/src/views/supermarket/supermarketSpu/components/supermarketUnit/index.vue b/src/views/supermarket/supermarketSpu/components/supermarketUnit/index.vue
index 442d64d..fbf3a8f 100644
--- a/src/views/supermarket/supermarketSpu/components/supermarketUnit/index.vue
+++ b/src/views/supermarket/supermarketSpu/components/supermarketUnit/index.vue
@@ -53,33 +53,35 @@
> -->
-
-
-
-
-
-
-
-
- 正常
- 停销
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
- 删除
-
-
-
+
+
+
+
+
+
+
+
+
+ 正常
+ 停销
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
@@ -122,13 +124,14 @@ const tableStyle = {
const getDataList = (formData: any) => {
console.log(formData);
- const index = supermarketUnitEntityList.value.findIndex((item: any) => item.id === formData.id);
- if (index === -1) {
- supermarketUnitEntityList.value.push(formData);
+ const index = supermarketUnitEntityList.value?.findIndex((item: any) => item.id === formData.id);
+ if (supermarketUnitEntityList.value == null || index == undefined) {
+ supermarketUnitEntityList.value = [{ ...formData, isNew: true }];
+ } else if (index === -1) {
+ supermarketUnitEntityList.value.push({ ...formData, isNew: true });
} else {
supermarketUnitEntityList.value[index] = formData;
}
- console.log('a', supermarketUnitEntityList.value);
};
// 清空搜索条件
diff --git a/src/views/supermarket/supermarketSpu/form.vue b/src/views/supermarket/supermarketSpu/form.vue
index b445e05..a0d69d1 100644
--- a/src/views/supermarket/supermarketSpu/form.vue
+++ b/src/views/supermarket/supermarketSpu/form.vue
@@ -4,179 +4,179 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
{{ item.label }}
-
+
-
+
-
+
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -203,7 +203,7 @@
-