@dazhicheng/ui 1.5.247 → 1.5.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/lossReason.d.ts +29 -0
- package/dist/api/lossReason.js +17 -0
- package/dist/api/supplier.d.ts +28 -0
- package/dist/api/supplier.js +17 -0
- package/dist/components/tt-table/src/TableForm.vue.d.ts +4 -8
- package/dist/components/tt-table/src/TableForm.vue.js +180 -185
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +6 -8
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +156 -183
- package/dist/hooks/basicDataCodes.d.ts +19 -2
- package/dist/hooks/basicDataCodes.js +255 -101
- package/dist/hooks/useFormSchemasLink.js +14 -15
- package/dist/hooks/usePanelSelectSchemas.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { getAllBasicAirline as
|
|
1
|
+
import { getAllBasicAirline as E, getDictItemsByCodes as C, listChainByTypeAirportRegionLevel as R } from "../api/basicData.js";
|
|
2
|
+
import { pageUser as A } from "../api/dataTypeContext.js";
|
|
3
|
+
import { secondaryDropdownListLossReason as O, primaryDropdownListLossReason as S } from "../api/lossReason.js";
|
|
4
|
+
import { listAllValidSupplierManage as L, getAllConfigListSupplierConfigManage as _ } from "../api/supplier.js";
|
|
2
5
|
const u = {
|
|
3
6
|
AIRLINE: "airline",
|
|
4
7
|
CONTINENT: "continent",
|
|
@@ -9,140 +12,211 @@ const u = {
|
|
|
9
12
|
/** 订单类型(字典 SALES_ORDER_TYPE) */
|
|
10
13
|
SALES_ORDER_TYPE: "SALES_ORDER_TYPE",
|
|
11
14
|
/** 产品类型(字典 SALES_ORDER_PRODUCT_TYPE) */
|
|
12
|
-
SALES_ORDER_PRODUCT_TYPE: "SALES_ORDER_PRODUCT_TYPE"
|
|
13
|
-
|
|
15
|
+
SALES_ORDER_PRODUCT_TYPE: "SALES_ORDER_PRODUCT_TYPE",
|
|
16
|
+
/** 用户(/iam/user/page) */
|
|
17
|
+
USER: "user",
|
|
18
|
+
/** 亏损原因一级(/rule/lossReason/primaryDropdownList) */
|
|
19
|
+
LOSS_REASON: "lossReason",
|
|
20
|
+
/** 亏损原因细类(/rule/lossReason/secondaryDropdownList) */
|
|
21
|
+
LOSS_REASON_SECONDARY: "lossReasonSecondary",
|
|
22
|
+
/** 配置号(/supplier/supplierConfigManage/config/getAllConfigList) */
|
|
23
|
+
SUPPLIER_CONFIG: "supplierConfig",
|
|
24
|
+
/** 供应商(/supplier/supplierManage/listAllValid) */
|
|
25
|
+
SUPPLIER: "supplier"
|
|
26
|
+
}, d = {
|
|
14
27
|
CONTINENT: "continent",
|
|
15
28
|
REGION: "region",
|
|
16
29
|
COUNTRY: "country",
|
|
30
|
+
/** 按业务类型(亏损原因) */
|
|
31
|
+
BUSINESS_TYPE: "businessType",
|
|
32
|
+
/** 按所属一级原因(亏损原因细类) */
|
|
33
|
+
PRIMARY_REASON: "primaryReason",
|
|
34
|
+
/** 按供应商名称(配置号) */
|
|
35
|
+
SUPPLIER_MANAGE_NAME: "supplierManageName",
|
|
17
36
|
PINYIN: "pinyin"
|
|
18
|
-
},
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
37
|
+
}, I = {
|
|
38
|
+
[d.CONTINENT]: { codeKey: "continentCode", nameKey: "continentName" },
|
|
39
|
+
[d.REGION]: { codeKey: "regionCode", nameKey: "regionName" },
|
|
40
|
+
[d.COUNTRY]: { codeKey: "countryCode", nameKey: "countryName" },
|
|
41
|
+
[d.BUSINESS_TYPE]: { codeKey: "businessType", nameKey: "businessTypeName", labelMode: "name" },
|
|
42
|
+
[d.PRIMARY_REASON]: { codeKey: "primaryReasonId", nameKey: "primaryReasonName", labelMode: "name" },
|
|
43
|
+
[d.SUPPLIER_MANAGE_NAME]: {
|
|
44
|
+
codeKey: "supplierManageName",
|
|
45
|
+
nameKey: "supplierManageName",
|
|
46
|
+
labelMode: "name"
|
|
47
|
+
}
|
|
48
|
+
}, b = {
|
|
49
|
+
TICKETING: "出票",
|
|
50
|
+
REFUND: "退票",
|
|
51
|
+
REBOOK: "改签"
|
|
22
52
|
};
|
|
23
|
-
function
|
|
24
|
-
if (!Array.isArray(
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
28
|
-
const
|
|
29
|
-
return
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
53
|
+
function $(a, e) {
|
|
54
|
+
if (!Array.isArray(a) || !a.length) return a || [];
|
|
55
|
+
if (e === d.PINYIN) return a;
|
|
56
|
+
const n = I[e];
|
|
57
|
+
if (!n) return a;
|
|
58
|
+
const r = /* @__PURE__ */ new Map(), s = [], l = n.labelMode || "codeName";
|
|
59
|
+
return a.forEach((t) => {
|
|
60
|
+
const o = t[n.codeKey], f = o != null && o !== "", c = f ? String(o) : "__unknown__";
|
|
61
|
+
if (!r.has(c)) {
|
|
62
|
+
s.push(c);
|
|
63
|
+
const i = t[n.nameKey];
|
|
64
|
+
let y = "未知";
|
|
65
|
+
f && (l === "name" ? y = i != null && String(i) !== "" ? String(i) : String(o) : y = `${o}(${i || ""})`), r.set(c, {
|
|
66
|
+
label: y,
|
|
67
|
+
value: f ? o : "__unknown__",
|
|
37
68
|
children: []
|
|
38
69
|
});
|
|
39
70
|
}
|
|
40
|
-
|
|
41
|
-
}),
|
|
71
|
+
r.get(c).children.push(t);
|
|
72
|
+
}), s.map((t) => r.get(t));
|
|
42
73
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
74
|
+
function j(a, e) {
|
|
75
|
+
return e || (a === u.AIRPORT ? d.COUNTRY : a === u.LOSS_REASON ? d.BUSINESS_TYPE : a === u.LOSS_REASON_SECONDARY ? d.PRIMARY_REASON : a === u.SUPPLIER_CONFIG ? d.SUPPLIER_MANAGE_NAME : d.PINYIN);
|
|
45
76
|
}
|
|
46
|
-
const
|
|
77
|
+
const g = {
|
|
47
78
|
1: { codeKey: "continentCode", nameKey: "continentName", statusKey: "continentStatus" },
|
|
48
79
|
2: { codeKey: "regionCode", nameKey: "regionName", statusKey: "regionStatus" },
|
|
49
80
|
3: { codeKey: "countryCode", nameKey: "countryName", statusKey: "countryStatus" },
|
|
50
81
|
4: { codeKey: "cityCode", nameKey: "cityName", statusKey: "cityStatus" },
|
|
51
82
|
5: { codeKey: "airportCode", nameKey: "airportName", statusKey: "airportStatus" }
|
|
52
83
|
};
|
|
53
|
-
function
|
|
54
|
-
return (Array.isArray(
|
|
55
|
-
...
|
|
56
|
-
label: `${
|
|
57
|
-
value:
|
|
84
|
+
function P(a = []) {
|
|
85
|
+
return (Array.isArray(a) ? a : []).filter((e) => e == null ? void 0 : e.airlineCode).map((e) => ({
|
|
86
|
+
...e,
|
|
87
|
+
label: `${e.airlineCode}(${e.airlineNameCn || ""})`,
|
|
88
|
+
value: e.airlineCode
|
|
58
89
|
}));
|
|
59
90
|
}
|
|
60
|
-
function
|
|
61
|
-
if (!
|
|
62
|
-
return
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
66
|
-
let
|
|
67
|
-
for (const
|
|
68
|
-
const o =
|
|
91
|
+
function T(a) {
|
|
92
|
+
if (!a || typeof a != "object" || Array.isArray(a))
|
|
93
|
+
return a || {};
|
|
94
|
+
const e = a.continentCode || a.regionCode || a.countryCode || a.cityCode || a.airportCode, n = [1, 2, 3, 4, 5].some((t) => a[String(t)] || a[t]);
|
|
95
|
+
if (e && !n)
|
|
96
|
+
return a;
|
|
97
|
+
let r = {}, s = 0;
|
|
98
|
+
for (const t of [1, 2, 3, 4, 5]) {
|
|
99
|
+
const o = a[String(t)] || a[t];
|
|
69
100
|
if (!o || typeof o != "object") continue;
|
|
70
|
-
const
|
|
71
|
-
|
|
101
|
+
const f = Number(o.type ?? t);
|
|
102
|
+
f >= s && (s = f, r = o);
|
|
72
103
|
}
|
|
73
|
-
const
|
|
74
|
-
for (const
|
|
75
|
-
const o =
|
|
104
|
+
const l = { ...r };
|
|
105
|
+
for (const t of [1, 2, 3, 4, 5]) {
|
|
106
|
+
const o = a[String(t)] || a[t];
|
|
76
107
|
if (!o || typeof o != "object") continue;
|
|
77
|
-
const { codeKey:
|
|
78
|
-
o.code !== void 0 && o.code !== null && o.code !== "" && (
|
|
108
|
+
const { codeKey: f, nameKey: c, statusKey: i } = g[t];
|
|
109
|
+
o.code !== void 0 && o.code !== null && o.code !== "" && (l[f] = o.code), o.name !== void 0 && (l[c] = o.name), o.status !== void 0 && (l[i] = o.status);
|
|
79
110
|
}
|
|
80
|
-
return
|
|
111
|
+
return l;
|
|
81
112
|
}
|
|
82
|
-
function
|
|
83
|
-
return (Array.isArray(
|
|
113
|
+
function h(a) {
|
|
114
|
+
return (Array.isArray(a) ? a : []).map((n) => T(n || {}));
|
|
84
115
|
}
|
|
85
|
-
function
|
|
86
|
-
return (Array.isArray(
|
|
87
|
-
...
|
|
88
|
-
label: `${
|
|
89
|
-
value:
|
|
116
|
+
function M(a = [], e, n) {
|
|
117
|
+
return (Array.isArray(a) ? a : []).filter((r) => r == null ? void 0 : r[e]).map((r) => ({
|
|
118
|
+
...r,
|
|
119
|
+
label: `${r[e]}(${r[n] || ""})`,
|
|
120
|
+
value: r[e]
|
|
90
121
|
}));
|
|
91
122
|
}
|
|
92
|
-
function
|
|
123
|
+
function p(a, e, n) {
|
|
93
124
|
return async () => {
|
|
94
125
|
try {
|
|
95
|
-
const
|
|
96
|
-
return
|
|
126
|
+
const r = await R({ type: a });
|
|
127
|
+
return M(h(r), e, n);
|
|
97
128
|
} catch {
|
|
98
129
|
return [];
|
|
99
130
|
}
|
|
100
131
|
};
|
|
101
132
|
}
|
|
102
|
-
function
|
|
103
|
-
return (Array.isArray(
|
|
104
|
-
...
|
|
105
|
-
label:
|
|
106
|
-
value:
|
|
133
|
+
function v(a = []) {
|
|
134
|
+
return (Array.isArray(a) ? a : []).filter((e) => (e == null ? void 0 : e.itemCode) !== void 0 && (e == null ? void 0 : e.itemCode) !== null && (e == null ? void 0 : e.itemCode) !== "").map((e) => ({
|
|
135
|
+
...e,
|
|
136
|
+
label: e.itemName || "",
|
|
137
|
+
value: e.itemCode
|
|
107
138
|
}));
|
|
108
139
|
}
|
|
109
|
-
function
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
),
|
|
113
|
-
|
|
114
|
-
),
|
|
115
|
-
const
|
|
140
|
+
function w(a = []) {
|
|
141
|
+
const e = Array.isArray(a) ? a : [], n = new Set(
|
|
142
|
+
e.map((l) => l.parentItemCode).filter((l) => l != null && String(l) !== "").map(String)
|
|
143
|
+
), r = new Set(
|
|
144
|
+
e.filter((l) => (l == null ? void 0 : l.itemCode) !== void 0 && (l == null ? void 0 : l.itemCode) !== null && (l == null ? void 0 : l.itemCode) !== "").map((l) => String(l.itemCode))
|
|
145
|
+
), s = e.filter((l) => (l == null ? void 0 : l.itemCode) !== void 0 && (l == null ? void 0 : l.itemCode) !== null && (l == null ? void 0 : l.itemCode) !== "").map((l) => {
|
|
146
|
+
const t = String(l.itemCode), o = l.itemName || "";
|
|
116
147
|
return {
|
|
117
|
-
...
|
|
118
|
-
label:
|
|
119
|
-
value:
|
|
148
|
+
...l,
|
|
149
|
+
label: n.has(t) ? `${t}(${o})` : o,
|
|
150
|
+
value: t
|
|
120
151
|
};
|
|
121
152
|
});
|
|
122
|
-
return
|
|
123
|
-
|
|
124
|
-
itemCode:
|
|
125
|
-
itemName:
|
|
126
|
-
label:
|
|
127
|
-
value:
|
|
153
|
+
return n.forEach((l) => {
|
|
154
|
+
r.has(l) || s.push({
|
|
155
|
+
itemCode: l,
|
|
156
|
+
itemName: l,
|
|
157
|
+
label: l,
|
|
158
|
+
value: l,
|
|
128
159
|
parentItemCode: null
|
|
129
160
|
});
|
|
130
|
-
}),
|
|
161
|
+
}), s;
|
|
131
162
|
}
|
|
132
|
-
function
|
|
133
|
-
return async (
|
|
163
|
+
function N(a, e = v) {
|
|
164
|
+
return async (n) => {
|
|
134
165
|
try {
|
|
135
|
-
const
|
|
136
|
-
dictCodeList: [
|
|
137
|
-
permissionOnlyCode:
|
|
138
|
-
}),
|
|
139
|
-
return
|
|
166
|
+
const r = await C({
|
|
167
|
+
dictCodeList: [a],
|
|
168
|
+
permissionOnlyCode: n == null ? void 0 : n.permissionOnlyCode
|
|
169
|
+
}), s = (r == null ? void 0 : r[a]) || [];
|
|
170
|
+
return e(s);
|
|
140
171
|
} catch {
|
|
141
172
|
return [];
|
|
142
173
|
}
|
|
143
174
|
};
|
|
144
175
|
}
|
|
145
|
-
|
|
176
|
+
function K(a = []) {
|
|
177
|
+
return (Array.isArray(a) ? a : []).filter((e) => (e == null ? void 0 : e.id) !== void 0 && (e == null ? void 0 : e.id) !== null).map((e) => ({
|
|
178
|
+
...e,
|
|
179
|
+
label: e.fullName || e.username || String(e.id),
|
|
180
|
+
value: e.id
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
function Y(a = []) {
|
|
184
|
+
return (Array.isArray(a) ? a : []).filter((e) => (e == null ? void 0 : e.id) !== void 0 && (e == null ? void 0 : e.id) !== null).map((e) => {
|
|
185
|
+
const n = e.businessType || "";
|
|
186
|
+
return {
|
|
187
|
+
...e,
|
|
188
|
+
businessTypeName: b[n] || n,
|
|
189
|
+
label: e.reasonName || "",
|
|
190
|
+
value: e.id
|
|
191
|
+
};
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function D(a = [], e = /* @__PURE__ */ new Map()) {
|
|
195
|
+
return (Array.isArray(a) ? a : []).filter((n) => (n == null ? void 0 : n.id) !== void 0 && (n == null ? void 0 : n.id) !== null).map((n) => {
|
|
196
|
+
const r = n.primaryReasonId, s = (r != null ? e.get(r) : void 0) || (r != null ? String(r) : "");
|
|
197
|
+
return {
|
|
198
|
+
...n,
|
|
199
|
+
primaryReasonName: s,
|
|
200
|
+
label: n.reasonName || "",
|
|
201
|
+
value: n.id
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function F(a = []) {
|
|
206
|
+
return (Array.isArray(a) ? a : []).filter((e) => e == null ? void 0 : e.supplierConfigPcc).map((e) => ({
|
|
207
|
+
...e,
|
|
208
|
+
label: e.supplierConfigPcc,
|
|
209
|
+
value: e.supplierConfigPcc
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
function U(a = []) {
|
|
213
|
+
return (Array.isArray(a) ? a : []).filter((e) => e == null ? void 0 : e.supplierCode).map((e) => ({
|
|
214
|
+
...e,
|
|
215
|
+
label: e.supplierName ? `${e.supplierCode}(${e.supplierName})` : e.supplierCode,
|
|
216
|
+
value: e.supplierCode
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
const k = {
|
|
146
220
|
[u.AIRLINE]: {
|
|
147
221
|
defaultFieldName: "airlineCodes",
|
|
148
222
|
defaultLabel: "航司",
|
|
@@ -151,8 +225,8 @@ const m = {
|
|
|
151
225
|
defaultShowAll: !0,
|
|
152
226
|
async fetchOptions() {
|
|
153
227
|
try {
|
|
154
|
-
const
|
|
155
|
-
return
|
|
228
|
+
const a = await E();
|
|
229
|
+
return P(a || []);
|
|
156
230
|
} catch {
|
|
157
231
|
return [];
|
|
158
232
|
}
|
|
@@ -164,7 +238,7 @@ const m = {
|
|
|
164
238
|
defaultExcludeLabel: "排除洲",
|
|
165
239
|
defaultMultiple: !0,
|
|
166
240
|
defaultShowAll: !1,
|
|
167
|
-
fetchOptions:
|
|
241
|
+
fetchOptions: p(1, "continentCode", "continentName")
|
|
168
242
|
},
|
|
169
243
|
[u.REGION]: {
|
|
170
244
|
defaultFieldName: "regionCodes",
|
|
@@ -172,7 +246,7 @@ const m = {
|
|
|
172
246
|
defaultExcludeLabel: "排除区域",
|
|
173
247
|
defaultMultiple: !0,
|
|
174
248
|
defaultShowAll: !1,
|
|
175
|
-
fetchOptions:
|
|
249
|
+
fetchOptions: p(2, "regionCode", "regionName")
|
|
176
250
|
},
|
|
177
251
|
[u.COUNTRY]: {
|
|
178
252
|
defaultFieldName: "countryCodes",
|
|
@@ -180,7 +254,7 @@ const m = {
|
|
|
180
254
|
defaultExcludeLabel: "排除国家",
|
|
181
255
|
defaultMultiple: !0,
|
|
182
256
|
defaultShowAll: !1,
|
|
183
|
-
fetchOptions:
|
|
257
|
+
fetchOptions: p(3, "countryCode", "countryName")
|
|
184
258
|
},
|
|
185
259
|
[u.CITY]: {
|
|
186
260
|
defaultFieldName: "cityCodes",
|
|
@@ -188,7 +262,7 @@ const m = {
|
|
|
188
262
|
defaultExcludeLabel: "排除城市",
|
|
189
263
|
defaultMultiple: !0,
|
|
190
264
|
defaultShowAll: !1,
|
|
191
|
-
fetchOptions:
|
|
265
|
+
fetchOptions: p(4, "cityCode", "cityName")
|
|
192
266
|
},
|
|
193
267
|
[u.AIRPORT]: {
|
|
194
268
|
defaultFieldName: "airportCodes",
|
|
@@ -196,7 +270,7 @@ const m = {
|
|
|
196
270
|
defaultExcludeLabel: "排除机场",
|
|
197
271
|
defaultMultiple: !0,
|
|
198
272
|
defaultShowAll: !1,
|
|
199
|
-
fetchOptions:
|
|
273
|
+
fetchOptions: p(5, "airportCode", "airportName")
|
|
200
274
|
},
|
|
201
275
|
[u.SALES_ORDER_TYPE]: {
|
|
202
276
|
defaultFieldName: "orderType",
|
|
@@ -211,7 +285,7 @@ const m = {
|
|
|
211
285
|
valueField: "value",
|
|
212
286
|
parentField: "parentItemCode"
|
|
213
287
|
},
|
|
214
|
-
fetchOptions:
|
|
288
|
+
fetchOptions: N(u.SALES_ORDER_TYPE, w)
|
|
215
289
|
},
|
|
216
290
|
[u.SALES_ORDER_PRODUCT_TYPE]: {
|
|
217
291
|
defaultFieldName: "productType",
|
|
@@ -225,13 +299,93 @@ const m = {
|
|
|
225
299
|
valueField: "itemCode",
|
|
226
300
|
parentField: "parentItemCode"
|
|
227
301
|
},
|
|
228
|
-
fetchOptions:
|
|
302
|
+
fetchOptions: N(u.SALES_ORDER_PRODUCT_TYPE)
|
|
303
|
+
},
|
|
304
|
+
[u.USER]: {
|
|
305
|
+
defaultFieldName: "userIds",
|
|
306
|
+
defaultLabel: "用户",
|
|
307
|
+
defaultExcludeLabel: "排除用户",
|
|
308
|
+
defaultMultiple: !0,
|
|
309
|
+
defaultShowAll: !1,
|
|
310
|
+
async fetchOptions() {
|
|
311
|
+
try {
|
|
312
|
+
const a = await A({ pageNo: 1, pageSize: 9999 });
|
|
313
|
+
return K((a == null ? void 0 : a.records) || []);
|
|
314
|
+
} catch {
|
|
315
|
+
return [];
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
[u.LOSS_REASON]: {
|
|
320
|
+
defaultFieldName: "lossReasonIds",
|
|
321
|
+
defaultLabel: "亏损原因",
|
|
322
|
+
defaultExcludeLabel: "排除亏损原因",
|
|
323
|
+
defaultMultiple: !0,
|
|
324
|
+
defaultShowAll: !1,
|
|
325
|
+
async fetchOptions() {
|
|
326
|
+
try {
|
|
327
|
+
const a = await S();
|
|
328
|
+
return Y(a || []);
|
|
329
|
+
} catch {
|
|
330
|
+
return [];
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
[u.LOSS_REASON_SECONDARY]: {
|
|
335
|
+
defaultFieldName: "lossReasonSecondaryIds",
|
|
336
|
+
defaultLabel: "亏损原因细类",
|
|
337
|
+
defaultExcludeLabel: "排除亏损原因细类",
|
|
338
|
+
defaultMultiple: !0,
|
|
339
|
+
defaultShowAll: !1,
|
|
340
|
+
async fetchOptions() {
|
|
341
|
+
try {
|
|
342
|
+
const [a, e] = await Promise.all([
|
|
343
|
+
O(),
|
|
344
|
+
S()
|
|
345
|
+
]), n = /* @__PURE__ */ new Map();
|
|
346
|
+
return (e || []).forEach((r) => {
|
|
347
|
+
(r == null ? void 0 : r.id) !== void 0 && (r == null ? void 0 : r.id) !== null && n.set(r.id, r.reasonName || String(r.id));
|
|
348
|
+
}), D(a || [], n);
|
|
349
|
+
} catch {
|
|
350
|
+
return [];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
[u.SUPPLIER_CONFIG]: {
|
|
355
|
+
defaultFieldName: "supplierConfigPccs",
|
|
356
|
+
defaultLabel: "配置号",
|
|
357
|
+
defaultExcludeLabel: "排除配置号",
|
|
358
|
+
defaultMultiple: !0,
|
|
359
|
+
defaultShowAll: !1,
|
|
360
|
+
async fetchOptions() {
|
|
361
|
+
try {
|
|
362
|
+
const a = await _({});
|
|
363
|
+
return F(a || []);
|
|
364
|
+
} catch {
|
|
365
|
+
return [];
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
[u.SUPPLIER]: {
|
|
370
|
+
defaultFieldName: "supplierCodes",
|
|
371
|
+
defaultLabel: "供应商",
|
|
372
|
+
defaultExcludeLabel: "排除供应商",
|
|
373
|
+
defaultMultiple: !0,
|
|
374
|
+
defaultShowAll: !1,
|
|
375
|
+
async fetchOptions() {
|
|
376
|
+
try {
|
|
377
|
+
const a = await L();
|
|
378
|
+
return U(a || []);
|
|
379
|
+
} catch {
|
|
380
|
+
return [];
|
|
381
|
+
}
|
|
382
|
+
}
|
|
229
383
|
}
|
|
230
384
|
};
|
|
231
385
|
export {
|
|
232
386
|
u as CODES,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
387
|
+
k as CODE_REGISTRY,
|
|
388
|
+
d as GROUP_BY,
|
|
389
|
+
$ as groupBasicDataOptions,
|
|
390
|
+
j as resolveDefaultGroupBy
|
|
237
391
|
};
|
|
@@ -106,8 +106,7 @@ function no(r = {}, u = z) {
|
|
|
106
106
|
function G(o) {
|
|
107
107
|
const e = /* @__PURE__ */ new Map();
|
|
108
108
|
return o.forEach((n) => {
|
|
109
|
-
const t = n.purchaseInfo, l = t == null ? void 0 : t.supplierSubType;
|
|
110
|
-
if (l == null) return;
|
|
109
|
+
const t = n.purchaseInfo, l = (t == null ? void 0 : t.supplierSubType) ?? "其他";
|
|
111
110
|
let s = e.get(l);
|
|
112
111
|
s || (s = {
|
|
113
112
|
label: String(l),
|
|
@@ -152,8 +151,8 @@ function no(r = {}, u = z) {
|
|
|
152
151
|
}
|
|
153
152
|
function x(o, e, n, t, l) {
|
|
154
153
|
const s = f(o), P = l ? t.filter((i) => {
|
|
155
|
-
var
|
|
156
|
-
return (
|
|
154
|
+
var m;
|
|
155
|
+
return (m = e[s]) == null ? void 0 : m.includes(i.value);
|
|
157
156
|
}) || [] : t.find((i) => i.value === e[s]);
|
|
158
157
|
return {
|
|
159
158
|
values: e,
|
|
@@ -165,7 +164,7 @@ function no(r = {}, u = z) {
|
|
|
165
164
|
};
|
|
166
165
|
}
|
|
167
166
|
function k(o, e, n, t, l) {
|
|
168
|
-
const s = g(o), P = oo(s.componentProps, e, n, t), i = F(o), { onChange:
|
|
167
|
+
const s = g(o), P = oo(s.componentProps, e, n, t), i = F(o), { onChange: m, ...h } = P, d = q(s.customOptions) ? s.customOptions(e, t) : t, p = S(o) === "TtPanelSelect", a = p && o === "shopId" ? J(d) : p && o === "purchasePlaceId" ? G(d) : d, w = p ? D(a) : d;
|
|
169
168
|
return p ? {
|
|
170
169
|
multiple: i,
|
|
171
170
|
showAll: s.showAll ?? (o === "shopId" && c === "action" ? O(e[f("platformId")]).length > 0 : !0),
|
|
@@ -190,7 +189,7 @@ function no(r = {}, u = z) {
|
|
|
190
189
|
showOriginMode: !1,
|
|
191
190
|
showPinyinMode: !0,
|
|
192
191
|
...h,
|
|
193
|
-
options:
|
|
192
|
+
options: d,
|
|
194
193
|
onChange(R) {
|
|
195
194
|
j(
|
|
196
195
|
R,
|
|
@@ -211,11 +210,11 @@ function no(r = {}, u = z) {
|
|
|
211
210
|
dependencies: _(o),
|
|
212
211
|
componentProps: (n, t) => {
|
|
213
212
|
var h;
|
|
214
|
-
const l = N(o), s = f(o), P = F(o), i = b(o),
|
|
215
|
-
return k(o, n, t, l, (
|
|
213
|
+
const l = N(o), s = f(o), P = F(o), i = b(o), m = ((h = n[s]) == null ? void 0 : h.at(-1)) !== i;
|
|
214
|
+
return k(o, n, t, l, (d) => {
|
|
216
215
|
if (S(o) !== "TtPanelSelect") {
|
|
217
216
|
const p = n[s];
|
|
218
|
-
P && (
|
|
217
|
+
P && (m && O(d).at(-1) === i ? n[s] = [i] : n[s] = p == null ? void 0 : p.filter((a) => a !== i));
|
|
219
218
|
}
|
|
220
219
|
});
|
|
221
220
|
}
|
|
@@ -229,12 +228,12 @@ function no(r = {}, u = z) {
|
|
|
229
228
|
label: M("platformId"),
|
|
230
229
|
rules: C("platformId"),
|
|
231
230
|
componentProps: (o, e) => {
|
|
232
|
-
var
|
|
233
|
-
const n = "platformId", t = f(n), l = f("shopId"), s = F(n), P = F("shopId"), i = N(n),
|
|
231
|
+
var d;
|
|
232
|
+
const n = "platformId", t = f(n), l = f("shopId"), s = F(n), P = F("shopId"), i = N(n), m = b(n), h = ((d = o[t]) == null ? void 0 : d.at(-1)) !== m;
|
|
234
233
|
return k(n, o, e, i, (p) => {
|
|
235
234
|
if (S(n) !== "TtPanelSelect") {
|
|
236
235
|
const a = o[t];
|
|
237
|
-
s && (h && O(p).at(-1) ===
|
|
236
|
+
s && (h && O(p).at(-1) === m ? o[t] = [m] : o[t] = a == null ? void 0 : a.filter((w) => w !== m));
|
|
238
237
|
}
|
|
239
238
|
o[l] = P ? [] : void 0;
|
|
240
239
|
});
|
|
@@ -247,11 +246,11 @@ function no(r = {}, u = z) {
|
|
|
247
246
|
label: M("shopId"),
|
|
248
247
|
componentProps: (o, e) => {
|
|
249
248
|
var h;
|
|
250
|
-
const n = "shopId", t = f(n), l = o[f("platformId")], s = Q(l), P = F(n), i = b(n),
|
|
251
|
-
return k(n, o, e, s, (
|
|
249
|
+
const n = "shopId", t = f(n), l = o[f("platformId")], s = Q(l), P = F(n), i = b(n), m = ((h = o[t]) == null ? void 0 : h.at(-1)) !== i;
|
|
250
|
+
return k(n, o, e, s, (d) => {
|
|
252
251
|
if (S(n) !== "TtPanelSelect") {
|
|
253
252
|
const p = o[t];
|
|
254
|
-
P && (
|
|
253
|
+
P && (m && O(d).at(-1) === i ? o[t] = [i] : o[t] = p == null ? void 0 : p.filter((a) => a !== i));
|
|
255
254
|
}
|
|
256
255
|
});
|
|
257
256
|
},
|
|
@@ -52,8 +52,8 @@ export interface PanelSelectFieldConfig {
|
|
|
52
52
|
exclude?: PanelSelectExcludeConfig;
|
|
53
53
|
/**
|
|
54
54
|
* 分组方式。
|
|
55
|
-
* - 机场默认 `country
|
|
56
|
-
* - 可传 `continent` / `region` / `country` / `pinyin`
|
|
55
|
+
* - 机场默认 `country`;亏损原因默认 `businessType`;细类默认 `primaryReason`;配置号默认 `supplierManageName`
|
|
56
|
+
* - 可传 `continent` / `region` / `country` / `businessType` / `primaryReason` / `supplierManageName` / `pinyin`
|
|
57
57
|
* - 也可用 `GROUP_BY.CONTINENT` 等常量
|
|
58
58
|
*/
|
|
59
59
|
groupBy?: PanelSelectGroupBy;
|