xyvcard-paper-buyer 0.0.15 → 0.0.16

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.
@@ -1,355 +0,0 @@
1
- import { defineComponent as le, ref as g, reactive as T, onActivated as oe, resolveComponent as a, resolveDirective as ne, createElementBlock as R, openBlock as c, createElementVNode as A, createVNode as n, createBlock as U, createCommentVNode as C, withCtx as o, withKeys as j, unref as r, createTextVNode as b, toDisplayString as p, withDirectives as $, isRef as S } from "vue";
2
- import { useTableHooks as re } from "jmash-core";
3
- import { useI18n as ae } from "vue-i18n";
4
- import { o as se } from "./index-CIhWvEaK.mjs";
5
- import ie from "./edit-DT79EUCr.mjs";
6
- import { useRouter as de } from "vue-router";
7
- import { dictRegionApi as ue } from "jmash-region";
8
- const me = { class: "app-container" }, pe = { class: "search-container" }, ce = ["onClick"], fe = ["onClick"], ge = /* @__PURE__ */ le({
9
- __name: "index",
10
- setup(be) {
11
- const { t: y } = ae();
12
- de();
13
- const d = g({}), {
14
- tableHooks: s,
15
- multipleTableRef: z,
16
- queryFormRef: B,
17
- listLoading: D,
18
- tableData: I,
19
- total: h
20
- } = re(y, se, d);
21
- let v = g([
22
- {
23
- label: "orderUserAddress.note",
24
- prop: "note",
25
- minWidth: "150",
26
- sortable: "custom",
27
- isColumn: !0
28
- },
29
- {
30
- label: "orderUserAddress.userName",
31
- prop: "userName",
32
- width: "150",
33
- sortable: "custom",
34
- isColumn: !0
35
- },
36
- {
37
- label: "orderUserAddress.mobilePhone",
38
- prop: "mobilePhoneIns",
39
- slotName: "mobileIns",
40
- columnType: "slot",
41
- width: "150",
42
- sortable: "custom",
43
- isColumn: !0
44
- },
45
- {
46
- label: "orderUserAddress.detailInfo",
47
- prop: "detailInfo",
48
- minWidth: "150",
49
- sortable: "custom",
50
- isColumn: !0,
51
- slotName: "detailInfo",
52
- columnType: "slot"
53
- },
54
- {
55
- label: "orderUserAddress.listOrder",
56
- width: "60",
57
- columnType: "slot",
58
- slotName: "listOrder",
59
- isColumn: !0
60
- },
61
- {
62
- label: "common.operate",
63
- width: "100",
64
- slotName: "operation",
65
- columnType: "slot",
66
- fixed: "right",
67
- isColumn: !0
68
- }
69
- ]);
70
- const u = g({
71
- title: y("common.edit"),
72
- visible: !1
73
- });
74
- function q(e) {
75
- e.mobileEncrypt = !e.mobileEncrypt;
76
- }
77
- let V = T({});
78
- function L() {
79
- V = T({}), u.value.title = y("common.add"), u.value.visible = !0;
80
- }
81
- function F(e) {
82
- V.addressId = e.addressId, u.value.title = y("common.edit"), u.value.visible = !0;
83
- }
84
- function K(e) {
85
- s.selectionRows.value = e;
86
- }
87
- function M(e) {
88
- s.handleSort(e.prop, e.order);
89
- }
90
- const f = g(/* @__PURE__ */ new Map());
91
- async function Q(e) {
92
- if (!e)
93
- return "";
94
- if (f.value.has(e))
95
- return f.value.get(e) || e;
96
- try {
97
- const t = await ue.findByCode({
98
- regionCode: e
99
- });
100
- if (t.data) {
101
- const m = O(t.data);
102
- return f.value.set(e, m), I.value = [...I.value], m;
103
- }
104
- return e;
105
- } catch (t) {
106
- return console.error(`获取地区编码 ${e} 的信息失败:`, t), f.value.set(e, e), e;
107
- }
108
- }
109
- function O(e) {
110
- const t = [];
111
- function m(i) {
112
- i && i.regionName && t.push(i.regionName), i && i.children && i.children.length > 0 && m(i.children[0]);
113
- }
114
- return m(e), t.join("");
115
- }
116
- function H(e) {
117
- return f.value.has(e) ? f.value.get(e) || e : e ? (Q(e), e) : "";
118
- }
119
- function W(e) {
120
- e && s.getList();
121
- }
122
- return oe(() => {
123
- s.getList();
124
- }), (e, t) => {
125
- const m = a("el-input"), i = a("el-form-item"), _ = a("el-col"), k = a("el-button"), P = a("el-row"), G = a("el-form"), J = a("jmash-column-select"), X = a("jmash-mobileIns-component"), Y = a("Bottom"), E = a("el-icon"), Z = a("Top"), x = a("jmash-table"), ee = a("jmash-pagination"), te = a("el-card"), w = ne("hasPerm");
126
- return c(), R("div", me, [
127
- A("div", pe, [
128
- n(G, {
129
- ref_key: "queryFormRef",
130
- ref: B,
131
- model: d.value,
132
- inline: !0
133
- }, {
134
- default: o(() => [
135
- n(P, null, {
136
- default: o(() => [
137
- n(_, { span: 6 }, {
138
- default: o(() => [
139
- n(i, {
140
- label: e.$t("orderUserAddress.note"),
141
- prop: "likeNote"
142
- }, {
143
- default: o(() => [
144
- n(m, {
145
- modelValue: d.value.likeNote,
146
- "onUpdate:modelValue": t[0] || (t[0] = (l) => d.value.likeNote = l),
147
- placeholder: e.$t("orderUserAddress.noteRequired"),
148
- onKeyup: t[1] || (t[1] = j((l) => r(s).handleQuery(), ["enter"])),
149
- class: "!w-[203px]"
150
- }, null, 8, ["modelValue", "placeholder"])
151
- ]),
152
- _: 1
153
- }, 8, ["label"])
154
- ]),
155
- _: 1
156
- }),
157
- n(_, { span: 6 }, {
158
- default: o(() => [
159
- n(i, {
160
- label: e.$t("orderUserAddress.userName"),
161
- prop: "likeUserName"
162
- }, {
163
- default: o(() => [
164
- n(m, {
165
- modelValue: d.value.likeUserName,
166
- "onUpdate:modelValue": t[2] || (t[2] = (l) => d.value.likeUserName = l),
167
- placeholder: e.$t("orderUserAddress.userNameRequired"),
168
- onKeyup: t[3] || (t[3] = j((l) => r(s).handleQuery(), ["enter"])),
169
- class: "!w-[203px]"
170
- }, null, 8, ["modelValue", "placeholder"])
171
- ]),
172
- _: 1
173
- }, 8, ["label"])
174
- ]),
175
- _: 1
176
- }),
177
- n(_, { span: 12 }, {
178
- default: o(() => [
179
- n(i, { class: "search-btn" }, {
180
- default: o(() => [
181
- n(k, {
182
- type: "primary",
183
- onClick: t[4] || (t[4] = (l) => r(s).handleQuery())
184
- }, {
185
- default: o(() => [
186
- b(p(e.$t("common.search")), 1)
187
- ]),
188
- _: 1
189
- }),
190
- n(k, {
191
- onClick: t[5] || (t[5] = (l) => r(s).resetQuery())
192
- }, {
193
- default: o(() => [
194
- b(p(e.$t("common.reset")), 1)
195
- ]),
196
- _: 1
197
- })
198
- ]),
199
- _: 1
200
- })
201
- ]),
202
- _: 1
203
- })
204
- ]),
205
- _: 1
206
- })
207
- ]),
208
- _: 1
209
- }, 8, ["model"]),
210
- t[13] || (t[13] = A("div", { class: "clear" }, null, -1))
211
- ]),
212
- n(te, {
213
- shadow: "never",
214
- class: "table-container"
215
- }, {
216
- header: o(() => [
217
- n(P, null, {
218
- default: o(() => [
219
- n(_, { span: 17 }, {
220
- default: o(() => [
221
- $((c(), U(k, {
222
- type: "primary",
223
- onClick: L
224
- }, {
225
- default: o(() => [
226
- b(p(e.$t("common.add")), 1)
227
- ]),
228
- _: 1
229
- })), [
230
- [w, ["order:order_user_address:add"]]
231
- ]),
232
- $((c(), U(k, {
233
- type: "primary",
234
- onClick: t[6] || (t[6] = (l) => r(s).deleteRecords())
235
- }, {
236
- default: o(() => [
237
- b(p(e.$t("common.batchDelete")), 1)
238
- ]),
239
- _: 1
240
- })), [
241
- [w, ["order:order_user_address:delete"]]
242
- ])
243
- ]),
244
- _: 1
245
- }),
246
- n(_, {
247
- span: 7,
248
- class: "container-float"
249
- }, {
250
- default: o(() => [
251
- n(J, {
252
- modelValue: r(v),
253
- "onUpdate:modelValue": t[7] || (t[7] = (l) => S(v) ? v.value = l : v = l),
254
- "label-name": "order/order-user-address"
255
- }, null, 8, ["modelValue"])
256
- ]),
257
- _: 1
258
- })
259
- ]),
260
- _: 1
261
- })
262
- ]),
263
- footer: o(() => [
264
- r(h) > 0 ? (c(), U(ee, {
265
- key: 0,
266
- total: r(h),
267
- "onUpdate:total": t[8] || (t[8] = (l) => S(h) ? h.value = l : null),
268
- "current-page": d.value.curPage,
269
- "onUpdate:currentPage": t[9] || (t[9] = (l) => d.value.curPage = l),
270
- "page-size": d.value.pageSize,
271
- "onUpdate:pageSize": t[10] || (t[10] = (l) => d.value.pageSize = l),
272
- onPagination: t[11] || (t[11] = (l) => r(s).getList())
273
- }, null, 8, ["total", "current-page", "page-size"])) : C("", !0)
274
- ]),
275
- default: o(() => [
276
- n(x, {
277
- ref_key: "multipleTableRef",
278
- ref: z,
279
- "row-key": "addressId",
280
- "list-loading": r(D),
281
- data: r(I),
282
- "table-label": r(v),
283
- onSelectionChange: K,
284
- onSortChange: M
285
- }, {
286
- mobileIns: o((l) => [
287
- n(X, {
288
- mobilePhoneIns: l.data.row.mobilePhoneIns,
289
- mobilePhone: l.data.row.mobilePhone,
290
- mobileEncrypt: l.data.row.mobileEncrypt,
291
- onToggleEncrypt: (N) => q(l.data.row)
292
- }, null, 8, ["mobilePhoneIns", "mobilePhone", "mobileEncrypt", "onToggleEncrypt"])
293
- ]),
294
- detailInfo: o((l) => [
295
- A("span", null, p(H(l.data.row.provinceName)) + " " + p(l.data.row.detailInfo), 1)
296
- ]),
297
- listOrder: o((l) => [
298
- n(E, {
299
- size: "16",
300
- onClick: (N) => r(s).handleMove(l.data.row, !1)
301
- }, {
302
- default: o(() => [
303
- n(Y)
304
- ]),
305
- _: 2
306
- }, 1032, ["onClick"]),
307
- n(E, {
308
- size: "16",
309
- onClick: (N) => r(s).handleMove(l.data.row, !0)
310
- }, {
311
- default: o(() => [
312
- n(Z)
313
- ]),
314
- _: 2
315
- }, 1032, ["onClick"])
316
- ]),
317
- operation: o((l) => [
318
- $((c(), R("span", {
319
- class: "el-button-color",
320
- onClick: (N) => F(l.data.row)
321
- }, [
322
- b(p(e.$t("common.edit")), 1)
323
- ], 8, ce)), [
324
- [w, ["order:order_user_address:update"]]
325
- ]),
326
- $((c(), R("span", {
327
- class: "el-button-color dropdown-left",
328
- onClick: (N) => r(s).deleteRecord(l.data.row)
329
- }, [
330
- b(p(e.$t("common.delete")), 1)
331
- ], 8, fe)), [
332
- [w, ["order:order_user_address:delete"]]
333
- ])
334
- ]),
335
- _: 1
336
- }, 8, ["list-loading", "data", "table-label"])
337
- ]),
338
- _: 1
339
- }),
340
- u.value.visible ? (c(), U(ie, {
341
- key: 0,
342
- modelValue: u.value.visible,
343
- "onUpdate:modelValue": t[12] || (t[12] = (l) => u.value.visible = l),
344
- title: u.value.title,
345
- "entity-key": r(V),
346
- onRefresh: W,
347
- width: "500px"
348
- }, null, 8, ["modelValue", "title", "entity-key"])) : C("", !0)
349
- ]);
350
- };
351
- }
352
- });
353
- export {
354
- ge as default
355
- };