@dazhicheng/ui 1.6.12 → 1.6.14
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/supplier.d.ts +4 -0
- package/dist/api/supplier.js +15 -9
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/hooks/basicDataCodes.d.ts +7 -0
- package/dist/hooks/basicDataCodes.js +148 -105
- package/dist/hooks/useBasicDataOptions.js +102 -107
- package/dist/hooks/usePanelSelectSchemas.js +84 -80
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/api/supplier.d.ts
CHANGED
|
@@ -26,3 +26,7 @@ export declare function listAllValidSupplierManage(params?: {
|
|
|
26
26
|
}, options?: {
|
|
27
27
|
[key: string]: any;
|
|
28
28
|
}): Promise<SupplierManageListItem[]>;
|
|
29
|
+
/** 获取全量采购地数据 GET /supplier/supplierPurchase/listAll */
|
|
30
|
+
export declare function listAllSupplierPurchase(options?: {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}): Promise<SupplierAPI.SupplierPurchaseListCO[]>;
|
package/dist/api/supplier.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { request as
|
|
2
|
-
async function
|
|
3
|
-
return
|
|
1
|
+
import { request as i } from "../utils/xhr.js";
|
|
2
|
+
async function r(l = {}, e) {
|
|
3
|
+
return i.post({
|
|
4
4
|
url: "/supplier/supplierConfigManage/getAllConfigList",
|
|
5
|
-
params:
|
|
5
|
+
params: l
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
|
-
async function
|
|
9
|
-
return
|
|
8
|
+
async function n(l, e) {
|
|
9
|
+
return i.get({
|
|
10
10
|
url: "/supplier/supplierManage/listAllValid",
|
|
11
|
-
params:
|
|
11
|
+
params: l
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
async function s(l) {
|
|
15
|
+
return i.get({
|
|
16
|
+
url: "/supplier/supplierPurchase/listAll"
|
|
12
17
|
});
|
|
13
18
|
}
|
|
14
19
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
r as getAllConfigListSupplierConfigManage,
|
|
21
|
+
s as listAllSupplierPurchase,
|
|
22
|
+
n as listAllValidSupplierManage
|
|
17
23
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TtArea.vue3.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b814e001"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./DrawerHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ o(r, [["__scopeId", "data-v-9b698cc3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -2,7 +2,7 @@ import o from "./index.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6dba01d4"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
_ as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./loading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5d760747"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -26,6 +26,8 @@ export declare const CODES: {
|
|
|
26
26
|
readonly SUPPLIER_CONFIG: "supplierConfig";
|
|
27
27
|
/** 供应商(/supplier/supplierManage/listAllValid) */
|
|
28
28
|
readonly SUPPLIER: "supplier";
|
|
29
|
+
/** 采购地(/supplier/supplierPurchase/listAll) */
|
|
30
|
+
readonly PURCHASE_PLACE: "purchasePlace";
|
|
29
31
|
};
|
|
30
32
|
export type BasicDataCode = (typeof CODES)[keyof typeof CODES];
|
|
31
33
|
export type BasicDataOption = {
|
|
@@ -61,6 +63,11 @@ export type PanelSelectGroupBy = (typeof GROUP_BY)[keyof typeof GROUP_BY];
|
|
|
61
63
|
* `pinyin` / `none` 或不支持的分组原样返回,交由组件拼音/平铺模式处理。
|
|
62
64
|
*/
|
|
63
65
|
export declare function groupBasicDataOptions(options: BasicDataOption[], groupBy: PanelSelectGroupBy): BasicDataOption[];
|
|
66
|
+
/**
|
|
67
|
+
* 采购地 options 按 supplierSubType 分组为树形结构。
|
|
68
|
+
* 兼容 purchaseInfo 嵌套(数据权限)与 listAll 扁平字段。
|
|
69
|
+
*/
|
|
70
|
+
export declare function groupPurchasePlaceOptions(options: BasicDataOption[]): BasicDataOption[];
|
|
64
71
|
/** 各 code 默认分组;未特殊指定时为拼音 */
|
|
65
72
|
export declare function resolveDefaultGroupBy(code: BasicDataCode, groupBy?: PanelSelectGroupBy): PanelSelectGroupBy;
|
|
66
73
|
export type BasicDataFetchContext = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAllBasicAirline as O, getDictItemsByCodes as R, listChainByTypeAirportRegionLevel as A } from "../api/basicData.js";
|
|
2
2
|
import { queryAllRoles as L, pageUser as I } from "../api/dataTypeContext.js";
|
|
3
3
|
import { secondaryDropdownListLossReason as T, primaryDropdownListLossReason as C } from "../api/lossReason.js";
|
|
4
|
-
import { listAllValidSupplierManage as _, getAllConfigListSupplierConfigManage as
|
|
4
|
+
import { listAllSupplierPurchase as P, listAllValidSupplierManage as _, getAllConfigListSupplierConfigManage as h } from "../api/supplier.js";
|
|
5
5
|
const o = {
|
|
6
6
|
AIRLINE: "airline",
|
|
7
7
|
CONTINENT: "continent",
|
|
@@ -24,7 +24,9 @@ const o = {
|
|
|
24
24
|
/** 配置号(/supplier/supplierConfigManage/getAllConfigList) */
|
|
25
25
|
SUPPLIER_CONFIG: "supplierConfig",
|
|
26
26
|
/** 供应商(/supplier/supplierManage/listAllValid) */
|
|
27
|
-
SUPPLIER: "supplier"
|
|
27
|
+
SUPPLIER: "supplier",
|
|
28
|
+
/** 采购地(/supplier/supplierPurchase/listAll) */
|
|
29
|
+
PURCHASE_PLACE: "purchasePlace"
|
|
28
30
|
}, d = {
|
|
29
31
|
CONTINENT: "continent",
|
|
30
32
|
REGION: "region",
|
|
@@ -38,7 +40,7 @@ const o = {
|
|
|
38
40
|
PINYIN: "pinyin",
|
|
39
41
|
/** 不分组,原样平铺 */
|
|
40
42
|
NONE: "none"
|
|
41
|
-
},
|
|
43
|
+
}, b = {
|
|
42
44
|
[d.CONTINENT]: { codeKey: "continentCode", nameKey: "continentName" },
|
|
43
45
|
[d.REGION]: { codeKey: "regionCode", nameKey: "regionName" },
|
|
44
46
|
[d.COUNTRY]: { codeKey: "countryCode", nameKey: "countryName" },
|
|
@@ -49,88 +51,100 @@ const o = {
|
|
|
49
51
|
nameKey: "supplierManageName",
|
|
50
52
|
labelMode: "name"
|
|
51
53
|
}
|
|
52
|
-
},
|
|
54
|
+
}, g = {
|
|
53
55
|
TICKETING: "出票",
|
|
54
56
|
REFUND: "退票",
|
|
55
57
|
REBOOK: "改签"
|
|
56
58
|
};
|
|
57
|
-
function
|
|
59
|
+
function J(a, e) {
|
|
58
60
|
if (!Array.isArray(a) || !a.length) return a || [];
|
|
59
61
|
if (e === d.PINYIN || e === d.NONE) return a;
|
|
60
|
-
const
|
|
61
|
-
if (!
|
|
62
|
-
const
|
|
62
|
+
const l = b[e];
|
|
63
|
+
if (!l) return a;
|
|
64
|
+
const n = /* @__PURE__ */ new Map(), s = [], r = l.labelMode || "codeName";
|
|
63
65
|
return a.forEach((u) => {
|
|
64
|
-
const t = u[
|
|
65
|
-
if (!
|
|
66
|
+
const t = u[l.codeKey], c = t != null && t !== "", i = c ? String(t) : "__unknown__";
|
|
67
|
+
if (!n.has(i)) {
|
|
66
68
|
s.push(i);
|
|
67
|
-
const
|
|
69
|
+
const f = u[l.nameKey];
|
|
68
70
|
let E = "未知";
|
|
69
|
-
|
|
71
|
+
c && (r === "name" ? E = f != null && String(f) !== "" ? String(f) : String(t) : E = `${t}(${f || ""})`), n.set(i, {
|
|
70
72
|
label: E,
|
|
71
|
-
value:
|
|
73
|
+
value: c ? t : "__unknown__",
|
|
72
74
|
children: []
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
|
-
|
|
76
|
-
}), s.map((u) =>
|
|
77
|
+
n.get(i).children.push(u);
|
|
78
|
+
}), s.map((u) => n.get(u));
|
|
79
|
+
}
|
|
80
|
+
function Q(a) {
|
|
81
|
+
const e = /* @__PURE__ */ new Map();
|
|
82
|
+
return (Array.isArray(a) ? a : []).forEach((l) => {
|
|
83
|
+
const n = l.purchaseInfo || l, s = (n == null ? void 0 : n.supplierSubType) ?? "其他";
|
|
84
|
+
let r = e.get(s);
|
|
85
|
+
r || (r = {
|
|
86
|
+
label: String(s),
|
|
87
|
+
value: s,
|
|
88
|
+
children: []
|
|
89
|
+
}, e.set(s, r)), r.children.push(l);
|
|
90
|
+
}), Array.from(e.values());
|
|
77
91
|
}
|
|
78
|
-
function
|
|
92
|
+
function X(a, e) {
|
|
79
93
|
return e || (a === o.CONTINENT ? d.NONE : a === o.AIRPORT || a === o.CITY ? d.COUNTRY : a === o.COUNTRY || a === o.REGION ? d.CONTINENT : a === o.LOSS_REASON ? d.BUSINESS_TYPE : a === o.LOSS_REASON_SECONDARY ? d.PRIMARY_REASON : a === o.SUPPLIER_CONFIG ? d.SUPPLIER_MANAGE_NAME : d.PINYIN);
|
|
80
94
|
}
|
|
81
|
-
const
|
|
95
|
+
const v = {
|
|
82
96
|
1: { codeKey: "continentCode", nameKey: "continentName", statusKey: "continentStatus" },
|
|
83
97
|
2: { codeKey: "regionCode", nameKey: "regionName", statusKey: "regionStatus" },
|
|
84
98
|
3: { codeKey: "countryCode", nameKey: "countryName", statusKey: "countryStatus" },
|
|
85
99
|
4: { codeKey: "cityCode", nameKey: "cityName", statusKey: "cityStatus" },
|
|
86
100
|
5: { codeKey: "airportCode", nameKey: "airportName", statusKey: "airportStatus" }
|
|
87
101
|
};
|
|
88
|
-
function
|
|
102
|
+
function K(a = []) {
|
|
89
103
|
return (Array.isArray(a) ? a : []).filter((e) => e == null ? void 0 : e.airlineCode).map((e) => ({
|
|
90
104
|
...e,
|
|
91
105
|
label: `${e.airlineCode}(${e.airlineNameCn || ""})`,
|
|
92
106
|
value: e.airlineCode
|
|
93
107
|
}));
|
|
94
108
|
}
|
|
95
|
-
function
|
|
109
|
+
function M(a) {
|
|
96
110
|
if (!a || typeof a != "object" || Array.isArray(a))
|
|
97
111
|
return a || {};
|
|
98
|
-
const e = a.continentCode || a.regionCode || a.countryCode || a.cityCode || a.airportCode,
|
|
99
|
-
if (e && !
|
|
112
|
+
const e = a.continentCode || a.regionCode || a.countryCode || a.cityCode || a.airportCode, l = [1, 2, 3, 4, 5].some((u) => a[String(u)] || a[u]);
|
|
113
|
+
if (e && !l)
|
|
100
114
|
return a;
|
|
101
|
-
let
|
|
115
|
+
let n = {}, s = 0;
|
|
102
116
|
for (const u of [1, 2, 3, 4, 5]) {
|
|
103
117
|
const t = a[String(u)] || a[u];
|
|
104
118
|
if (!t || typeof t != "object") continue;
|
|
105
|
-
const
|
|
106
|
-
|
|
119
|
+
const c = Number(t.type ?? u);
|
|
120
|
+
c >= s && (s = c, n = t);
|
|
107
121
|
}
|
|
108
|
-
const
|
|
122
|
+
const r = { ...n };
|
|
109
123
|
for (const u of [1, 2, 3, 4, 5]) {
|
|
110
124
|
const t = a[String(u)] || a[u];
|
|
111
125
|
if (!t || typeof t != "object") continue;
|
|
112
|
-
const { codeKey:
|
|
113
|
-
t.code !== void 0 && t.code !== null && t.code !== "" && (
|
|
126
|
+
const { codeKey: c, nameKey: i, statusKey: f } = v[u];
|
|
127
|
+
t.code !== void 0 && t.code !== null && t.code !== "" && (r[c] = t.code), t.name !== void 0 && (r[i] = t.name), t.status !== void 0 && (r[f] = t.status);
|
|
114
128
|
}
|
|
115
|
-
return
|
|
129
|
+
return r;
|
|
116
130
|
}
|
|
117
|
-
function
|
|
118
|
-
return (Array.isArray(a) ? a : []).map((
|
|
131
|
+
function w(a) {
|
|
132
|
+
return (Array.isArray(a) ? a : []).map((l) => M(l || {}));
|
|
119
133
|
}
|
|
120
|
-
function Y(a = [], e,
|
|
121
|
-
return (Array.isArray(a) ? a : []).filter((
|
|
122
|
-
...
|
|
123
|
-
label: `${
|
|
124
|
-
value:
|
|
134
|
+
function Y(a = [], e, l) {
|
|
135
|
+
return (Array.isArray(a) ? a : []).filter((n) => n == null ? void 0 : n[e]).map((n) => ({
|
|
136
|
+
...n,
|
|
137
|
+
label: `${n[e]}(${n[l] || ""})`,
|
|
138
|
+
value: n[e]
|
|
125
139
|
}));
|
|
126
140
|
}
|
|
127
|
-
const
|
|
141
|
+
const U = [o.CONTINENT, o.REGION, o.COUNTRY, o.CITY, o.AIRPORT], y = {
|
|
128
142
|
[o.CONTINENT]: 1,
|
|
129
143
|
[o.REGION]: 2,
|
|
130
144
|
[o.COUNTRY]: 3,
|
|
131
145
|
[o.CITY]: 4,
|
|
132
146
|
[o.AIRPORT]: 5
|
|
133
|
-
},
|
|
147
|
+
}, F = {
|
|
134
148
|
[o.CONTINENT]: { codeKey: "continentCode", nameKey: "continentName" },
|
|
135
149
|
[o.REGION]: { codeKey: "regionCode", nameKey: "regionName" },
|
|
136
150
|
[o.COUNTRY]: { codeKey: "countryCode", nameKey: "countryName" },
|
|
@@ -138,37 +152,37 @@ const w = [o.CONTINENT, o.REGION, o.COUNTRY, o.CITY, o.AIRPORT], N = {
|
|
|
138
152
|
[o.AIRPORT]: { codeKey: "airportCode", nameKey: "airportName" }
|
|
139
153
|
};
|
|
140
154
|
o.CONTINENT, o.REGION, o.COUNTRY, o.CITY;
|
|
141
|
-
function
|
|
142
|
-
return
|
|
155
|
+
function N(a) {
|
|
156
|
+
return U.includes(a);
|
|
143
157
|
}
|
|
144
|
-
function
|
|
145
|
-
return !
|
|
158
|
+
function Z(a, e) {
|
|
159
|
+
return !N(a) || !N(e) ? !1 : y[a] > y[e];
|
|
146
160
|
}
|
|
147
|
-
function
|
|
148
|
-
if (!
|
|
149
|
-
const { codeKey:
|
|
150
|
-
return (Array.isArray(a) ? a : []).forEach((
|
|
151
|
-
const u =
|
|
161
|
+
function ee(a, e) {
|
|
162
|
+
if (!N(e)) return [];
|
|
163
|
+
const { codeKey: l, nameKey: n } = F[e], s = /* @__PURE__ */ new Map();
|
|
164
|
+
return (Array.isArray(a) ? a : []).forEach((r) => {
|
|
165
|
+
const u = r == null ? void 0 : r[l];
|
|
152
166
|
if (u == null || u === "") return;
|
|
153
167
|
const t = String(u);
|
|
154
168
|
s.has(t) || s.set(t, {
|
|
155
|
-
...
|
|
156
|
-
label: `${u}(${n
|
|
169
|
+
...r,
|
|
170
|
+
label: `${u}(${r[n] || ""})`,
|
|
157
171
|
value: u
|
|
158
172
|
});
|
|
159
173
|
}), Array.from(s.values());
|
|
160
174
|
}
|
|
161
|
-
function
|
|
175
|
+
function ae(a) {
|
|
162
176
|
let e;
|
|
163
|
-
for (const
|
|
164
|
-
|
|
177
|
+
for (const l of a)
|
|
178
|
+
N(l) && (!e || y[l] > y[e]) && (e = l);
|
|
165
179
|
return e;
|
|
166
180
|
}
|
|
167
|
-
function p(a, e,
|
|
181
|
+
function p(a, e, l) {
|
|
168
182
|
return async () => {
|
|
169
183
|
try {
|
|
170
|
-
const
|
|
171
|
-
return Y(
|
|
184
|
+
const n = await A({ type: a });
|
|
185
|
+
return Y(w(n), e, l);
|
|
172
186
|
} catch {
|
|
173
187
|
return [];
|
|
174
188
|
}
|
|
@@ -181,43 +195,43 @@ function D(a = []) {
|
|
|
181
195
|
value: e.itemCode
|
|
182
196
|
}));
|
|
183
197
|
}
|
|
184
|
-
function
|
|
185
|
-
const e = Array.isArray(a) ? a : [],
|
|
186
|
-
e.map((
|
|
187
|
-
),
|
|
188
|
-
e.filter((
|
|
189
|
-
), s = e.filter((
|
|
190
|
-
const u = String(
|
|
198
|
+
function G(a = []) {
|
|
199
|
+
const e = Array.isArray(a) ? a : [], l = new Set(
|
|
200
|
+
e.map((r) => r.parentItemCode).filter((r) => r != null && String(r) !== "").map(String)
|
|
201
|
+
), n = new Set(
|
|
202
|
+
e.filter((r) => (r == null ? void 0 : r.itemCode) !== void 0 && (r == null ? void 0 : r.itemCode) !== null && (r == null ? void 0 : r.itemCode) !== "").map((r) => String(r.itemCode))
|
|
203
|
+
), s = e.filter((r) => (r == null ? void 0 : r.itemCode) !== void 0 && (r == null ? void 0 : r.itemCode) !== null && (r == null ? void 0 : r.itemCode) !== "").map((r) => {
|
|
204
|
+
const u = String(r.itemCode), t = r.itemName || "";
|
|
191
205
|
return {
|
|
192
|
-
...
|
|
193
|
-
label:
|
|
206
|
+
...r,
|
|
207
|
+
label: l.has(u) ? `${u}(${t})` : t,
|
|
194
208
|
value: u
|
|
195
209
|
};
|
|
196
210
|
});
|
|
197
|
-
return
|
|
198
|
-
|
|
199
|
-
itemCode:
|
|
200
|
-
itemName:
|
|
201
|
-
label:
|
|
202
|
-
value:
|
|
211
|
+
return l.forEach((r) => {
|
|
212
|
+
n.has(r) || s.push({
|
|
213
|
+
itemCode: r,
|
|
214
|
+
itemName: r,
|
|
215
|
+
label: r,
|
|
216
|
+
value: r,
|
|
203
217
|
parentItemCode: null
|
|
204
218
|
});
|
|
205
219
|
}), s;
|
|
206
220
|
}
|
|
207
221
|
function S(a, e = D) {
|
|
208
|
-
return async (
|
|
222
|
+
return async (l) => {
|
|
209
223
|
try {
|
|
210
|
-
const
|
|
224
|
+
const n = await R({
|
|
211
225
|
dictCodeList: [a],
|
|
212
|
-
permissionOnlyCode:
|
|
213
|
-
}), s = (
|
|
226
|
+
permissionOnlyCode: l == null ? void 0 : l.permissionOnlyCode
|
|
227
|
+
}), s = (n == null ? void 0 : n[a]) || [];
|
|
214
228
|
return e(s);
|
|
215
229
|
} catch {
|
|
216
230
|
return [];
|
|
217
231
|
}
|
|
218
232
|
};
|
|
219
233
|
}
|
|
220
|
-
function
|
|
234
|
+
function x(a = []) {
|
|
221
235
|
return (Array.isArray(a) ? a : []).filter((e) => (e == null ? void 0 : e.id) !== void 0 && (e == null ? void 0 : e.id) !== null).map((e) => ({
|
|
222
236
|
...e,
|
|
223
237
|
label: e.fullName || e.username || String(e.id),
|
|
@@ -231,43 +245,55 @@ function m(a = []) {
|
|
|
231
245
|
value: e.id
|
|
232
246
|
}));
|
|
233
247
|
}
|
|
234
|
-
function
|
|
248
|
+
function B(a = []) {
|
|
235
249
|
return (Array.isArray(a) ? a : []).filter((e) => (e == null ? void 0 : e.id) !== void 0 && (e == null ? void 0 : e.id) !== null).map((e) => {
|
|
236
|
-
const
|
|
250
|
+
const l = e.businessType || "";
|
|
237
251
|
return {
|
|
238
252
|
...e,
|
|
239
|
-
businessTypeName:
|
|
253
|
+
businessTypeName: g[l] || l,
|
|
240
254
|
label: e.reasonName || "",
|
|
241
255
|
value: e.id
|
|
242
256
|
};
|
|
243
257
|
});
|
|
244
258
|
}
|
|
245
|
-
function
|
|
246
|
-
return (Array.isArray(a) ? a : []).filter((
|
|
247
|
-
const
|
|
259
|
+
function $(a = [], e = /* @__PURE__ */ new Map()) {
|
|
260
|
+
return (Array.isArray(a) ? a : []).filter((l) => (l == null ? void 0 : l.id) !== void 0 && (l == null ? void 0 : l.id) !== null).map((l) => {
|
|
261
|
+
const n = l.primaryReasonId, s = (n != null ? e.get(n) : void 0) || (n != null ? String(n) : "");
|
|
248
262
|
return {
|
|
249
|
-
...
|
|
263
|
+
...l,
|
|
250
264
|
primaryReasonName: s,
|
|
251
|
-
label:
|
|
252
|
-
value:
|
|
265
|
+
label: l.reasonName || "",
|
|
266
|
+
value: l.id
|
|
253
267
|
};
|
|
254
268
|
});
|
|
255
269
|
}
|
|
256
|
-
function
|
|
270
|
+
function V(a = []) {
|
|
257
271
|
return (Array.isArray(a) ? a : []).filter((e) => e == null ? void 0 : e.supplierConfigPcc).map((e) => ({
|
|
258
272
|
...e,
|
|
259
273
|
label: e.supplierConfigPcc,
|
|
260
274
|
value: e.supplierConfigPcc
|
|
261
275
|
}));
|
|
262
276
|
}
|
|
263
|
-
function
|
|
277
|
+
function j(a = []) {
|
|
264
278
|
return (Array.isArray(a) ? a : []).filter((e) => e == null ? void 0 : e.supplierCode).map((e) => ({
|
|
265
279
|
...e,
|
|
266
280
|
label: e.supplierName || e.supplierCode,
|
|
267
281
|
value: e.supplierCode
|
|
268
282
|
}));
|
|
269
283
|
}
|
|
270
|
-
|
|
284
|
+
function H(a = []) {
|
|
285
|
+
return (Array.isArray(a) ? a : []).filter((e) => e == null ? void 0 : e.purchasePlaceCode).map((e) => ({
|
|
286
|
+
...e,
|
|
287
|
+
label: e.purchasePlaceName || e.purchasePlaceCode,
|
|
288
|
+
value: e.purchasePlaceCode,
|
|
289
|
+
purchaseInfo: {
|
|
290
|
+
purchasePlaceCode: e.purchasePlaceCode,
|
|
291
|
+
purchasePlaceName: e.purchasePlaceName,
|
|
292
|
+
supplierSubType: e.supplierSubType
|
|
293
|
+
}
|
|
294
|
+
}));
|
|
295
|
+
}
|
|
296
|
+
const re = {
|
|
271
297
|
[o.AIRLINE]: {
|
|
272
298
|
defaultFieldName: "airlineCodes",
|
|
273
299
|
defaultLabel: "航司",
|
|
@@ -277,7 +303,7 @@ const Z = {
|
|
|
277
303
|
async fetchOptions() {
|
|
278
304
|
try {
|
|
279
305
|
const a = await O();
|
|
280
|
-
return
|
|
306
|
+
return K(a || []);
|
|
281
307
|
} catch {
|
|
282
308
|
return [];
|
|
283
309
|
}
|
|
@@ -336,7 +362,7 @@ const Z = {
|
|
|
336
362
|
valueField: "value",
|
|
337
363
|
parentField: "parentItemCode"
|
|
338
364
|
},
|
|
339
|
-
fetchOptions: S(o.SALES_ORDER_TYPE,
|
|
365
|
+
fetchOptions: S(o.SALES_ORDER_TYPE, G)
|
|
340
366
|
},
|
|
341
367
|
[o.SALES_ORDER_PRODUCT_TYPE]: {
|
|
342
368
|
defaultFieldName: "productType",
|
|
@@ -361,7 +387,7 @@ const Z = {
|
|
|
361
387
|
async fetchOptions() {
|
|
362
388
|
try {
|
|
363
389
|
const a = await I({ pageNo: 1, pageSize: 9999 });
|
|
364
|
-
return
|
|
390
|
+
return x((a == null ? void 0 : a.records) || []);
|
|
365
391
|
} catch {
|
|
366
392
|
return [];
|
|
367
393
|
}
|
|
@@ -391,7 +417,7 @@ const Z = {
|
|
|
391
417
|
async fetchOptions() {
|
|
392
418
|
try {
|
|
393
419
|
const a = await C();
|
|
394
|
-
return
|
|
420
|
+
return B(a || []);
|
|
395
421
|
} catch {
|
|
396
422
|
return [];
|
|
397
423
|
}
|
|
@@ -408,10 +434,10 @@ const Z = {
|
|
|
408
434
|
const [a, e] = await Promise.all([
|
|
409
435
|
T(),
|
|
410
436
|
C()
|
|
411
|
-
]),
|
|
412
|
-
return (e || []).forEach((
|
|
413
|
-
(
|
|
414
|
-
}),
|
|
437
|
+
]), l = /* @__PURE__ */ new Map();
|
|
438
|
+
return (e || []).forEach((n) => {
|
|
439
|
+
(n == null ? void 0 : n.id) !== void 0 && (n == null ? void 0 : n.id) !== null && l.set(n.id, n.reasonName || String(n.id));
|
|
440
|
+
}), $(a || [], l);
|
|
415
441
|
} catch {
|
|
416
442
|
return [];
|
|
417
443
|
}
|
|
@@ -425,8 +451,8 @@ const Z = {
|
|
|
425
451
|
defaultShowAll: !1,
|
|
426
452
|
async fetchOptions() {
|
|
427
453
|
try {
|
|
428
|
-
const a = await
|
|
429
|
-
return
|
|
454
|
+
const a = await h({});
|
|
455
|
+
return V(a || []);
|
|
430
456
|
} catch {
|
|
431
457
|
return [];
|
|
432
458
|
}
|
|
@@ -441,7 +467,23 @@ const Z = {
|
|
|
441
467
|
async fetchOptions() {
|
|
442
468
|
try {
|
|
443
469
|
const a = await _();
|
|
444
|
-
return
|
|
470
|
+
return j(a || []);
|
|
471
|
+
} catch {
|
|
472
|
+
return [];
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
[o.PURCHASE_PLACE]: {
|
|
477
|
+
defaultFieldName: "purchasePlaceId",
|
|
478
|
+
defaultLabel: "采购地",
|
|
479
|
+
defaultExcludeLabel: "排除采购地",
|
|
480
|
+
defaultMultiple: !0,
|
|
481
|
+
defaultShowAll: !1,
|
|
482
|
+
defaultShowNav: !1,
|
|
483
|
+
async fetchOptions() {
|
|
484
|
+
try {
|
|
485
|
+
const a = await P();
|
|
486
|
+
return H(a || []);
|
|
445
487
|
} catch {
|
|
446
488
|
return [];
|
|
447
489
|
}
|
|
@@ -450,13 +492,14 @@ const Z = {
|
|
|
450
492
|
};
|
|
451
493
|
export {
|
|
452
494
|
o as CODES,
|
|
453
|
-
|
|
454
|
-
|
|
495
|
+
re as CODE_REGISTRY,
|
|
496
|
+
U as GEO_LEVEL_CODES,
|
|
455
497
|
d as GROUP_BY,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
X as
|
|
498
|
+
Z as canDeriveGeoLevel,
|
|
499
|
+
ee as deriveRegionLevelOptionsFromGeoSource,
|
|
500
|
+
J as groupBasicDataOptions,
|
|
501
|
+
Q as groupPurchasePlaceOptions,
|
|
502
|
+
N as isGeoLevelCode,
|
|
503
|
+
X as resolveDefaultGroupBy,
|
|
504
|
+
ae as resolveHighestGeoLevelCode
|
|
462
505
|
};
|