|
|
@@ -1487,10 +1487,11 @@
|
|
|
{
|
|
|
const tabs = Array.isArray(this.rbarTabNameList) ? this.rbarTabNameList : [];
|
|
|
const norm = (s) => String(s || "").trim().toLowerCase();
|
|
|
+ this.hasRyPanel = tabs.some((t) => norm(t) === "rbarry"); // 功能说明:人员tab存在才回显ryList by xu 20261201
|
|
|
this.hasBookPanel = tabs.some((t) => norm(t) === "rbarbook"); // 功能说明:预订tab存在才回显bookList by xu 20260116
|
|
|
this.hasServPanel = tabs.some((t) => norm(t) === "rbarserv"); // 功能说明:服务tab存在才回显servList by xu 20260116
|
|
|
this.hasObjPanel = tabs.some((t) => norm(t) === "rbarobj"); // 功能说明:无 rbarObj 时禁用选中能力 by xu 20260122
|
|
|
- this.cardClickAction = (this.hasObjPanel && (this.hasBookPanel || this.hasServPanel)) ? "single" : "view"; // 功能说明:仅允许选中时才启用单选联动 by xu 20260122
|
|
|
+ this.cardClickAction = (this.hasObjPanel && (this.hasRyPanel || this.hasBookPanel || this.hasServPanel)) ? "single" : "view"; // 功能说明:仅允许选中时才启用单选联动 by xu 20260122
|
|
|
}
|
|
|
|
|
|
this.searchButtonConfigCheckId = String(this.form?.management || "99");
|
|
|
@@ -1574,9 +1575,11 @@
|
|
|
if (nk === "rbarserv") {
|
|
|
p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称),不需要 meta 槽位 by xu 20260116
|
|
|
}
|
|
|
- // 功能说明:右侧“人员”面板先做前端 mock 搜索头(仅展示,不接后端) by xu 20260114
|
|
|
+ // 功能说明:右侧“人员”面板按当前场地在住人员回显,搜索仅过滤前端已加载名单 by xu 20261201
|
|
|
if (nk === "rbarry") {
|
|
|
p.iconClass = "ss-sidebar-biz-icon icon-obj-ry"; // 功能说明:右侧“人员”tab 使用右侧栏 biz 图标基类 by xu 20260123
|
|
|
+ p.itemLayout = "person";
|
|
|
+ p.searchable = true;
|
|
|
p.count = 0;
|
|
|
p.headerFilters = [
|
|
|
{
|
|
|
@@ -1786,6 +1789,7 @@
|
|
|
if (!data || typeof data !== "object") return;
|
|
|
const ensurePanel = (tabKeyLower, title) => {
|
|
|
// 功能说明:严格依赖首页 rbarTabNameList 决定是否允许创建面板:未返回 rbarServ 时即使 cxycl 有 servList 也不处理 by xu 20260116
|
|
|
+ if (tabKeyLower === "rbarry" && !this.hasRyPanel) return null;
|
|
|
if (tabKeyLower === "rbarbook" && !this.hasBookPanel) return null;
|
|
|
if (tabKeyLower === "rbarserv" && !this.hasServPanel) return null;
|
|
|
const panels = Array.isArray(this.sidebarPanels) ? this.sidebarPanels : [];
|
|
|
@@ -1798,7 +1802,9 @@
|
|
|
_tabKey: tabKeyLower,
|
|
|
title,
|
|
|
// 功能说明:预订/服务面板 iconClass 与首页初始化保持一致(避免 cxycl 兜底创建时图标错误) by xu 20260123
|
|
|
- iconClass: (tabKeyLower === "rbarbook")
|
|
|
+ iconClass: (tabKeyLower === "rbarry")
|
|
|
+ ? "ss-sidebar-biz-icon icon-obj-ry"
|
|
|
+ : (tabKeyLower === "rbarbook")
|
|
|
? "ss-sidebar-biz-icon icon-obj-yd"
|
|
|
: (tabKeyLower === "rbarserv")
|
|
|
? "ss-sidebar-biz-icon icon-obj-fw"
|
|
|
@@ -1807,7 +1813,7 @@
|
|
|
itemAction: false,
|
|
|
};
|
|
|
// 功能说明:预订面板默认使用 person 布局(title+meta) by xu 20260116
|
|
|
- if (tabKeyLower === "rbarbook") p.itemLayout = "person";
|
|
|
+ if (tabKeyLower === "rbarry" || tabKeyLower === "rbarbook") p.itemLayout = "person";
|
|
|
if (tabKeyLower === "rbarserv") p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称) by xu 20260116
|
|
|
panels.splice(insertAt, 0, p);
|
|
|
this.sidebarPanels = panels;
|
|
|
@@ -1834,14 +1840,29 @@
|
|
|
return String(v);
|
|
|
};
|
|
|
|
|
|
- const bookList = Array.isArray(data.bookList) ? data.bookList : [];
|
|
|
+ const ryList = Array.isArray(data.ryList) ? data.ryList : [];
|
|
|
+ const bookList = Array.isArray(data.bookList) ? data.bookList : [];
|
|
|
const servList = Array.isArray(data.servList) ? data.servList : []; // 功能说明:将 <对象名>_cxycl 返回的 servList 写回右侧服务面板 by xu 20260116
|
|
|
|
|
|
try {
|
|
|
console.log("[pobj] cxycl bookList", {len: bookList.length, bookList: bookList});
|
|
|
} catch (_) {
|
|
|
} // 功能说明:打印 cxycl 返回,排查“预订tab不回显” by xu 20260116
|
|
|
- // 功能说明:无论 bookList 是否为空,都要写回面板(为空则清空旧数据),避免“切换对象但仍显示上一次预订人” by xu 20260114
|
|
|
+ // 功能说明:无论列表是否为空,都要写回面板(为空则清空旧数据),避免切换场地后残留上一房间人员 by xu 20261201
|
|
|
+ const ryPanel = ensurePanel("rbarry", "人员");
|
|
|
+ if (ryPanel) {
|
|
|
+ ryPanel.itemLayout = "person";
|
|
|
+ ryPanel.searchable = true;
|
|
|
+ ryPanel.items = ryList.map((ry) => ({
|
|
|
+ _raw: ry,
|
|
|
+ id: ry?.id,
|
|
|
+ ryId: ry?.id,
|
|
|
+ title: String(ry?.title ?? ""),
|
|
|
+ meta: [ry?.cwmc, ry?.bjmc].filter(Boolean).join(" · "),
|
|
|
+ tags: [],
|
|
|
+ }));
|
|
|
+ ryPanel.count = ryPanel.items.length;
|
|
|
+ }
|
|
|
const bookPanel = ensurePanel("rbarbook", "预订");
|
|
|
if (bookPanel) {
|
|
|
bookPanel.itemLayout = "person"; // 功能说明:预订面板复用“已选”tab 的 person 布局(title+中间 meta 槽位),不走 tags by xu 20260114
|
|
|
@@ -1881,13 +1902,21 @@
|
|
|
} catch (_) {
|
|
|
} // 功能说明:打印写回后的面板状态,排查“预订tab不回显” by xu 20260116
|
|
|
},
|
|
|
- // 功能说明:选中对象后联动调用 <对象名>_cxycl,填充右侧预订/服务面板 by xu 20260114
|
|
|
+ // 功能说明:选中对象后联动调用 <对象名>_cxycl,填充右侧人员/预订/服务面板 by xu 20261201
|
|
|
loadPobjYclByItem(item) {
|
|
|
- if (!(this.hasBookPanel || this.hasServPanel)) return Promise.resolve(null); // 功能说明:预订/服务任一存在才调用 cxycl;否则不联动 by xu 20260116
|
|
|
+ if (!(this.hasRyPanel || this.hasBookPanel || this.hasServPanel)) return Promise.resolve(null); // 功能说明:人员/预订/服务任一存在才调用 cxycl;否则不联动 by xu 20261201
|
|
|
const objNum = item?.objNum || item?._raw?.ssObjId || item?._raw?.ssObjId;
|
|
|
if (!objNum) return Promise.resolve(null);
|
|
|
const ssServ = this.ssObjName ? (String(this.ssObjName) + "_cxycl") : "";
|
|
|
if (!ssServ) return Promise.resolve(null);
|
|
|
+ if (this.hasRyPanel) {
|
|
|
+ const ryPanel = (this.sidebarPanels || []).find((p) => String(p?._tabKey || "").toLowerCase() === "rbarry");
|
|
|
+ if (ryPanel) {
|
|
|
+ ryPanel.items = [];
|
|
|
+ ryPanel.count = 0;
|
|
|
+ this.sidebarPanels = (this.sidebarPanels || []).slice();
|
|
|
+ }
|
|
|
+ }
|
|
|
const reqId = (this.__yclReqId = (this.__yclReqId || 0) + 1);
|
|
|
this.yclLoading = true;
|
|
|
// 功能说明:cxycl 需要同时传入 ssObjIdName=<对象名>id,且把对象ID用该字段名提交(如 cdid=90052) by xu 20260114
|