From 1b1b934d87c509eb5e15aec78564e51397f51aef Mon Sep 17 00:00:00 2001
From: liuminghui <468701464@qq.com>
Date: Mon, 2 Nov 2026 10:41:20 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E8=B7=AF?=
=?UTF-8?q?=E7=94=B1=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../20261102_supplier_menu_path.sql | 10 ++++++++++
bms-front/src/router/index.js | 15 ++++++++++++++-
.../supplierinfo/supplieredit/index.vue | 4 +++-
3 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 bms-back/sql/customer+supplier/20261102_supplier_menu_path.sql
diff --git a/bms-back/sql/customer+supplier/20261102_supplier_menu_path.sql b/bms-back/sql/customer+supplier/20261102_supplier_menu_path.sql
new file mode 100644
index 00000000..0cd46f92
--- /dev/null
+++ b/bms-back/sql/customer+supplier/20261102_supplier_menu_path.sql
@@ -0,0 +1,10 @@
+-- 供应商管理是一级目录,path 被写成了 "1",列表实际地址变成 /1/supplierinfo。
+-- 编辑页取消若写死 /customersuppliermanagement/supplierinfo,路由未注册,会落到 404。
+-- 把目录地址改成 supplier,列表即为 /supplier/supplierinfo。可重复执行。
+UPDATE sys_menu
+SET path = 'supplier',
+ update_by = 'admin',
+ update_time = NOW()
+WHERE menu_id = 2497
+ AND menu_type = 'M'
+ AND path = '1';
diff --git a/bms-front/src/router/index.js b/bms-front/src/router/index.js
index 5f48a047..e6d2e910 100644
--- a/bms-front/src/router/index.js
+++ b/bms-front/src/router/index.js
@@ -197,7 +197,11 @@ export const dynamicRoutes = [
path: 'index',
component: () => import('@/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue'),
name: 'SupplierEdit',
- meta: { title: '供应商编辑', activeMenu: '/customersuppliermanagement/supplierinfo' }
+ // 高亮地址跟菜单走。供应商目录 path 曾被写成 "1",列表实际是 /1/supplierinfo,写死客户管理目录会对不上。
+ beforeEnter(to) {
+ to.meta.activeMenu = supplierListPath()
+ },
+ meta: { title: '供应商编辑', activeMenu: '/supplier/supplierinfo' }
}
]
},
@@ -264,4 +268,13 @@ const router = createRouter({
},
})
+/**
+ * 供应商列表的真实地址由菜单注册,不写死目录。
+ * 当前库里「供应商管理」目录 path 若仍是 1,这里会得到 /1/supplierinfo。
+ */
+export function supplierListPath() {
+ const hit = router.getRoutes().find(r => /\/supplierinfo$/.test(r.path))
+ return hit ? hit.path : '/supplier/supplierinfo'
+}
+
export default router
diff --git a/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue b/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue
index 016ad13b..a4486076 100644
--- a/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue
+++ b/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue
@@ -622,6 +622,7 @@ import { getToken } from '@/utils/auth'
import axios from 'axios'
import { saveAs } from 'file-saver'
import { useChannels, parseChannelCodes } from '@/components/ChannelSelect/useChannels'
+import { supplierListPath } from '@/router'
const { proxy } = getCurrentInstance()
const route = useRoute()
@@ -1063,7 +1064,8 @@ function submitForm() {
}
function goBack() {
- router.push({ path: '/customersuppliermanagement/supplierinfo' })
+ // 关闭编辑页并回到已注册的供应商列表。菜单目录 path 是 1 时列表为 /1/supplierinfo,不能回到客户管理那条不存在的地址。
+ proxy.$tab.closeOpenPage({ path: supplierListPath() })
}
/* ============ 初始化 ============ */
From e93f0c02335a427fef1831a0ed3270d0a37a06ff Mon Sep 17 00:00:00 2001
From: wuweihua <88888888>
Date: Mon, 2 Nov 2026 11:52:08 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A5=97=E9=A4=90?=
=?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF=E7=BC=96=E8=BE=91=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=EF=BC=8C=E5=8C=85=E6=8B=AC=E6=9B=B4=E6=96=B0=E5=A5=97?=
=?UTF-8?q?=E9=A4=90=E5=90=8D=E7=A7=B0=E5=92=8C=E5=A4=87=E6=B3=A8=EF=BC=8C?=
=?UTF-8?q?=E6=94=AF=E6=8C=81=E5=AE=A2=E6=88=B7=E7=AD=9B=E9=80=89=E5=92=8C?=
=?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=AE=A2=E6=88=B7=E6=98=BE=E7=A4=BA=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/price/PriceSetController.java | 10 ++
.../com/bms/price/domain/PrcPriceSet.java | 4 +
.../bms/price/mapper/PrcPriceSetMapper.java | 3 +
.../price/service/IPrcPriceSetService.java | 3 +
.../service/impl/PrcPriceSetServiceImpl.java | 24 ++++
.../mapper/price/PrcPriceSetMapper.xml | 38 +++++--
bms-front/src/api/price/set.js | 9 ++
.../set/components/create/StepBasicInfo.vue | 3 +-
bms-front/src/views/price/set/priceSet.vue | 103 +++++++++++++++---
9 files changed, 170 insertions(+), 27 deletions(-)
diff --git a/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/PriceSetController.java b/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/PriceSetController.java
index 9bad75c1..dab60160 100644
--- a/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/PriceSetController.java
+++ b/bms-back/bms-admin/src/main/java/com/bms/web/controller/price/PriceSetController.java
@@ -102,6 +102,16 @@ public class PriceSetController extends BaseController
return toAjax(priceSetService.updatePrcPriceSet(set));
}
+ /** Update package name and note only. */
+ @PreAuthorize("@ss.hasPermi('price:set:edit')")
+ @Log(title = "价格套餐基本信息", businessType = BusinessType.UPDATE)
+ @PutMapping("/basic")
+ public AjaxResult editBasic(@RequestBody PrcPriceSet set)
+ {
+ set.setUpdateBy(getUsername());
+ return toAjax(priceSetService.updateBasicInfo(set));
+ }
+
@PreAuthorize("@ss.hasPermi('price:set:remove')")
@Log(title = "价格套餐", businessType = BusinessType.DELETE)
@DeleteMapping("/{priceSetIds}")
diff --git a/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcPriceSet.java b/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcPriceSet.java
index 8f260747..32ec60c5 100644
--- a/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcPriceSet.java
+++ b/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcPriceSet.java
@@ -34,8 +34,12 @@ public class PrcPriceSet extends BaseEntity
private Integer productCount;
private Integer customerCount;
+ /** List display: bound customer code/name summary (not a DB column). */
+ private String boundCustomers;
private Boolean expired;
private String keyword;
+ /** Query only: filter packages by bound customer id. */
+ private Long customerId;
private String submitFlag;
/** current version on create/edit save */
private PrcPriceSetVersion version;
diff --git a/bms-back/bms-system/src/main/java/com/bms/price/mapper/PrcPriceSetMapper.java b/bms-back/bms-system/src/main/java/com/bms/price/mapper/PrcPriceSetMapper.java
index 86f20570..5174b0f7 100644
--- a/bms-back/bms-system/src/main/java/com/bms/price/mapper/PrcPriceSetMapper.java
+++ b/bms-back/bms-system/src/main/java/com/bms/price/mapper/PrcPriceSetMapper.java
@@ -21,6 +21,9 @@ public interface PrcPriceSetMapper
public int updatePrcPriceSet(PrcPriceSet set);
+ /** Update name / note only (does not touch set_type / discount / status). */
+ public int updateBasicInfo(PrcPriceSet set);
+
public int updatePrcPriceSetStatus(PrcPriceSet set);
public int deletePrcPriceSetByIds(Long[] priceSetIds);
diff --git a/bms-back/bms-system/src/main/java/com/bms/price/service/IPrcPriceSetService.java b/bms-back/bms-system/src/main/java/com/bms/price/service/IPrcPriceSetService.java
index 4b10014c..e2d9dd2f 100644
--- a/bms-back/bms-system/src/main/java/com/bms/price/service/IPrcPriceSetService.java
+++ b/bms-back/bms-system/src/main/java/com/bms/price/service/IPrcPriceSetService.java
@@ -26,6 +26,9 @@ public interface IPrcPriceSetService
public int updatePrcPriceSet(PrcPriceSet set);
+ /** Update package name and note only; allowed for effect / draft / stopped. */
+ public int updateBasicInfo(PrcPriceSet set);
+
public int deletePrcPriceSetByIds(Long[] priceSetIds);
public int submit(Long priceSetId, String updateBy);
diff --git a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcPriceSetServiceImpl.java b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcPriceSetServiceImpl.java
index 2562f3ca..1c060e66 100644
--- a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcPriceSetServiceImpl.java
+++ b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcPriceSetServiceImpl.java
@@ -258,6 +258,30 @@ public class PrcPriceSetServiceImpl implements IPrcPriceSetService
return setMapper.updatePrcPriceSet(set);
}
+ @Override
+ public int updateBasicInfo(PrcPriceSet set)
+ {
+ if (set == null || set.getPriceSetId() == null)
+ {
+ throw new ServiceException(MessageUtils.message("price.set.notExists"));
+ }
+ PrcPriceSet db = requireSet(set.getPriceSetId());
+ if (STATUS_AUDIT.equals(db.getStatus()))
+ {
+ throw new ServiceException(MessageUtils.message("price.set.edit.audit"));
+ }
+ if (StringUtils.isEmpty(set.getPriceSetName()))
+ {
+ throw new ServiceException(MessageUtils.message("price.set.name.empty"));
+ }
+ set.setPriceSetName(set.getPriceSetName().trim());
+ if (setMapper.countByName(set) > 0)
+ {
+ throw new ServiceException(MessageUtils.message("price.set.name.exists"));
+ }
+ return setMapper.updateBasicInfo(set);
+ }
+
@Override
@Transactional
public int deletePrcPriceSetByIds(Long[] priceSetIds)
diff --git a/bms-back/bms-system/src/main/resources/mapper/price/PrcPriceSetMapper.xml b/bms-back/bms-system/src/main/resources/mapper/price/PrcPriceSetMapper.xml
index 39decd38..ba21255b 100644
--- a/bms-back/bms-system/src/main/resources/mapper/price/PrcPriceSetMapper.xml
+++ b/bms-back/bms-system/src/main/resources/mapper/price/PrcPriceSetMapper.xml
@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -33,7 +34,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
inner join prc_price_set_version v on v.psv_id = p.psv_id
where v.price_set_id = s.price_set_id
and ifnull(p.is_del, '0') = '0') as product_count,
- (select count(1) from prc_customer_price_set c where c.price_set_id = s.price_set_id) as customer_count
+ (select count(1) from prc_customer_price_set c where c.price_set_id = s.price_set_id) as customer_count,
+ (select group_concat(
+ concat(ifnull(c.customer_code, ''),
+ case when ifnull(c.customer_name, '') = '' then '' else concat(' ', c.customer_name) end)
+ order by c.bind_priority asc, c.customer_priceset_id asc
+ separator '、')
+ from prc_customer_price_set c
+ where c.price_set_id = s.price_set_id) as bound_customers
from prc_price_set s
@@ -47,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s.set_type, s.default_discount, s.default_type, s.calculate_sign,
s.status, s.tms_id,
s.created_by, s.create_time, s.updated_by, s.update_time,
- null as product_count, null as customer_count
+ null as product_count, null as customer_count, null as bound_customers
from prc_price_set s
where s.price_set_id = #{priceSetId}
@@ -71,14 +79,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND (
s.price_set_code like concat('%', #{keyword}, '%')
OR s.price_set_name like concat('%', #{keyword}, '%')
- OR exists (
- select 1 from prc_customer_price_set c
- where c.price_set_id = s.price_set_id
- and (
- c.customer_name like concat('%', #{keyword}, '%')
- or concat(c.customer_id, '') like concat('%', #{keyword}, '%')
- )
- )
+ )
+
+
+ AND exists (
+ select 1 from prc_customer_price_set c
+ where c.price_set_id = s.price_set_id
+ and c.customer_id = #{customerId}
)