xyvcard-member 0.0.1

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/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # pnpm publish --no-git-checks
2
+ npm config set registry https://registry.npmjs.org/
3
+
4
+ # pnpm install
5
+ npm config set registry https://registry.npmmirror.com/
6
+
7
+
8
+ This template should help get you started developing with Vue 3 in Vite.
9
+
10
+ ## Recommended IDE Setup
11
+
12
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
13
+
14
+ ## Type Support for `.vue` Imports in TS
15
+
16
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
17
+
18
+ If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
19
+
20
+ 1. Disable the built-in TypeScript Extension
21
+ 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
22
+ 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
23
+ 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
24
+
25
+ ## Customize configuration
26
+
27
+ See [Vite Configuration Reference](https://vitejs.dev/config/).
28
+
29
+ ## Project Setup
30
+
31
+ ```sh
32
+ pnpm install
33
+ ```
34
+
35
+ ### Compile and Hot-Reload for Development
36
+
37
+ ```sh
38
+ pnpm dev
39
+ ```
40
+
41
+ ### Type-Check, Compile and Minify for Production
42
+
43
+ ```sh
44
+ pnpm build
45
+ ```
46
+
47
+ ### Lint with [ESLint](https://eslint.org/)
48
+
49
+ ```sh
50
+ pnpm lint
51
+ ```
@@ -0,0 +1,443 @@
1
+ import { defineComponent as ae, ref as w, getCurrentInstance as ne, reactive as me, resolveComponent as r, resolveDirective as re, createElementBlock as v, openBlock as i, createElementVNode as E, createVNode as t, createBlock as k, createCommentVNode as c, withCtx as a, withKeys as N, unref as n, createTextVNode as D, toDisplayString as p, withDirectives as ue, isRef as j } from "vue";
2
+ import { useTableHooks as se } from "jmash-core";
3
+ import { useI18n as ie } from "vue-i18n";
4
+ import { m as de } from "./index-DmzC8epe.mjs";
5
+ import { D as s, C as I } from "./index-BvWKLWL4.mjs";
6
+ import { useRouter as pe } from "vue-router";
7
+ const be = { class: "app-container" }, ce = { class: "search-container" }, fe = { key: 0 }, ve = { key: 0 }, _e = { key: 0 }, ye = ["onClick"], ke = /* @__PURE__ */ ae({
8
+ __name: "index",
9
+ setup(he) {
10
+ const { t: C } = ie(), m = w({});
11
+ s.levelDict.useDictValues(), s.sourceEnum.useEnumValues(), s.genderDict.useEnumValues();
12
+ const U = pe(), { proxy: L } = ne();
13
+ console.log(s.sourceEnum.values, "=> sourceEnum");
14
+ const {
15
+ tableHooks: u,
16
+ multipleTableRef: S,
17
+ queryFormRef: B,
18
+ listLoading: M,
19
+ tableData: z,
20
+ total: _
21
+ } = se(C, de, m);
22
+ let f = w([
23
+ // 会员卡号
24
+ {
25
+ label: "memberInfo.memberNum",
26
+ prop: "memberNum",
27
+ width: "200",
28
+ sortable: "custom",
29
+ isColumn: !0
30
+ },
31
+ // 会员等级
32
+ {
33
+ label: "memberInfo.levelCode",
34
+ prop: "levelCode",
35
+ slotName: "levelCode",
36
+ columnType: "slot",
37
+ width: "110",
38
+ sortable: "custom",
39
+ isColumn: !0
40
+ },
41
+ // 会员姓名
42
+ {
43
+ label: "memberInfo.realName",
44
+ prop: "realName",
45
+ width: "110",
46
+ sortable: "custom",
47
+ isColumn: !0
48
+ },
49
+ // 性别
50
+ {
51
+ label: "memberInfo.gender",
52
+ prop: "gender",
53
+ slotName: "gender",
54
+ columnType: "slot",
55
+ width: "110",
56
+ sortable: "custom",
57
+ isColumn: !0
58
+ },
59
+ // 生日
60
+ {
61
+ label: "memberInfo.birthDate",
62
+ prop: "birthDate",
63
+ width: "110",
64
+ sortable: "custom",
65
+ isColumn: !0
66
+ },
67
+ // 手机号码
68
+ {
69
+ label: "memberInfo.mobilePhone",
70
+ prop: "mobilePhoneIns",
71
+ slotName: "mobilePhoneIns",
72
+ columnType: "slot",
73
+ width: "140",
74
+ sortable: "custom",
75
+ isColumn: !0
76
+ },
77
+ // 地址
78
+ {
79
+ label: "memberInfo.address",
80
+ prop: "address",
81
+ minWidth: "200",
82
+ sortable: "custom",
83
+ isColumn: !0
84
+ },
85
+ // 注册时间
86
+ {
87
+ label: "memberInfo.createTime",
88
+ prop: "createTime",
89
+ slotName: "createTime",
90
+ columnType: "slot",
91
+ width: "150",
92
+ sortable: "custom",
93
+ isColumn: !0
94
+ },
95
+ // 会员标签
96
+ // 推荐人
97
+ {
98
+ label: "memberInfo.referrerId",
99
+ prop: "referrerId",
100
+ width: "110",
101
+ sortable: "custom",
102
+ isColumn: !0
103
+ },
104
+ // 来源
105
+ {
106
+ label: "memberInfo.source",
107
+ prop: "source",
108
+ slotName: "source",
109
+ columnType: "slot",
110
+ width: "110",
111
+ sortable: "custom",
112
+ isColumn: !0
113
+ },
114
+ // 状态
115
+ {
116
+ label: "memberInfo.status",
117
+ prop: "status",
118
+ slotName: "status",
119
+ columnType: "slot",
120
+ width: "80",
121
+ sortable: "custom",
122
+ isColumn: !0
123
+ },
124
+ // 备注
125
+ {
126
+ label: "memberInfo.note",
127
+ prop: "note",
128
+ minWidth: "150",
129
+ sortable: "custom",
130
+ isColumn: !0
131
+ },
132
+ {
133
+ label: "common.operate",
134
+ width: "200",
135
+ slotName: "operation",
136
+ columnType: "slot",
137
+ fixed: "right",
138
+ isColumn: !0
139
+ }
140
+ ]);
141
+ function K(o) {
142
+ o.mobileEncrypt = !o.mobileEncrypt;
143
+ }
144
+ const y = w({
145
+ title: C("common.edit"),
146
+ visible: !1
147
+ }), h = w(!1);
148
+ let $ = me({});
149
+ function Q(o) {
150
+ $.memberId = o.memberId, U.push({
151
+ query: { memberId: o.memberId },
152
+ path: "/member/mem-member-info/info"
153
+ });
154
+ }
155
+ function q(o) {
156
+ u.selectionRows.value = o;
157
+ }
158
+ function A(o) {
159
+ u.handleSort(o.prop, o.order);
160
+ }
161
+ function Y(o) {
162
+ o && u.getList();
163
+ }
164
+ function F() {
165
+ h.value = !1;
166
+ }
167
+ function H(o) {
168
+ o.updateMask = "", u.importExcel(o).then((l) => {
169
+ h.value = !1;
170
+ });
171
+ }
172
+ return u.getList(), (o, l) => {
173
+ const T = r("el-input"), b = r("el-form-item"), d = r("el-col"), P = r("jmash-select"), W = r("jmash-dict-select"), V = r("el-row"), R = r("el-button"), G = r("el-form"), J = r("jmash-column-select"), O = r("el-switch"), X = r("jmash-mobileIns-component"), Z = r("jmash-table"), x = r("jmash-pagination"), ee = r("el-card"), le = r("member_info-edit"), oe = r("jmash-import-upload"), te = re("hasPerm");
174
+ return i(), v("div", be, [
175
+ E("div", ce, [
176
+ t(G, {
177
+ ref_key: "queryFormRef",
178
+ ref: B,
179
+ model: m.value,
180
+ inline: !0
181
+ }, {
182
+ default: a(() => [
183
+ t(V, null, {
184
+ default: a(() => [
185
+ t(d, { span: 6 }, {
186
+ default: a(() => [
187
+ t(b, {
188
+ label: o.$t("memberInfo.realName"),
189
+ prop: "likeRealName"
190
+ }, {
191
+ default: a(() => [
192
+ t(T, {
193
+ modelValue: m.value.likeRealName,
194
+ "onUpdate:modelValue": l[0] || (l[0] = (e) => m.value.likeRealName = e),
195
+ placeholder: o.$t("memberInfo.realNameRead"),
196
+ onKeyup: l[1] || (l[1] = N((e) => n(u).handleQuery(), ["enter"]))
197
+ }, null, 8, ["modelValue", "placeholder"])
198
+ ]),
199
+ _: 1
200
+ }, 8, ["label"])
201
+ ]),
202
+ _: 1
203
+ }),
204
+ t(d, { span: 6 }, {
205
+ default: a(() => [
206
+ t(b, {
207
+ label: o.$t("memberInfo.gender"),
208
+ prop: "gender"
209
+ }, {
210
+ default: a(() => [
211
+ t(P, {
212
+ modelValue: m.value.gender,
213
+ "onUpdate:modelValue": l[2] || (l[2] = (e) => m.value.gender = e),
214
+ placeholder: o.$t("memberInfo.genderRead"),
215
+ data: n(s).genderDict.values,
216
+ filterable: "",
217
+ clearable: ""
218
+ }, null, 8, ["modelValue", "placeholder", "data"])
219
+ ]),
220
+ _: 1
221
+ }, 8, ["label"])
222
+ ]),
223
+ _: 1
224
+ }),
225
+ t(d, { span: 6 }, {
226
+ default: a(() => [
227
+ t(b, {
228
+ label: o.$t("memberInfo.levelCode"),
229
+ prop: "levelCode"
230
+ }, {
231
+ default: a(() => [
232
+ t(W, {
233
+ modelValue: m.value.levelCode,
234
+ "onUpdate:modelValue": l[3] || (l[3] = (e) => m.value.levelCode = e),
235
+ placeholder: o.$t("memberInfo.levelCodeRead"),
236
+ "type-code": n(I).LEVEL,
237
+ clearable: ""
238
+ }, null, 8, ["modelValue", "placeholder", "type-code"])
239
+ ]),
240
+ _: 1
241
+ }, 8, ["label"])
242
+ ]),
243
+ _: 1
244
+ }),
245
+ t(d, { span: 6 }, {
246
+ default: a(() => [
247
+ t(b, {
248
+ label: o.$t("memberInfo.memberNum"),
249
+ prop: "likeMemberNum"
250
+ }, {
251
+ default: a(() => [
252
+ t(T, {
253
+ modelValue: m.value.likeMemberNum,
254
+ "onUpdate:modelValue": l[4] || (l[4] = (e) => m.value.likeMemberNum = e),
255
+ placeholder: o.$t("memberInfo.memberNumRead"),
256
+ onKeyup: l[5] || (l[5] = N((e) => n(u).handleQuery(), ["enter"]))
257
+ }, null, 8, ["modelValue", "placeholder"])
258
+ ]),
259
+ _: 1
260
+ }, 8, ["label"])
261
+ ]),
262
+ _: 1
263
+ })
264
+ ]),
265
+ _: 1
266
+ }),
267
+ t(V, null, {
268
+ default: a(() => [
269
+ t(d, { span: 6 }, {
270
+ default: a(() => [
271
+ t(b, {
272
+ label: o.$t("memberInfo.source"),
273
+ prop: "source"
274
+ }, {
275
+ default: a(() => [
276
+ t(P, {
277
+ modelValue: m.value.source,
278
+ "onUpdate:modelValue": l[6] || (l[6] = (e) => m.value.source = e),
279
+ data: n(s).sourceEnum.values,
280
+ placeholder: o.$t("memberInfo.sourceRead"),
281
+ onKeyup: l[7] || (l[7] = N((e) => n(u).handleQuery(), ["enter"])),
282
+ filterable: "",
283
+ clearable: ""
284
+ }, null, 8, ["modelValue", "data", "placeholder"])
285
+ ]),
286
+ _: 1
287
+ }, 8, ["label"])
288
+ ]),
289
+ _: 1
290
+ }),
291
+ t(d, { span: 18 }, {
292
+ default: a(() => [
293
+ t(b, { class: "search-btn" }, {
294
+ default: a(() => [
295
+ t(R, {
296
+ type: "primary",
297
+ onClick: l[8] || (l[8] = (e) => n(u).handleQuery())
298
+ }, {
299
+ default: a(() => [
300
+ D(p(o.$t("common.search")), 1)
301
+ ]),
302
+ _: 1
303
+ }),
304
+ t(R, {
305
+ onClick: l[9] || (l[9] = (e) => n(u).resetQuery())
306
+ }, {
307
+ default: a(() => [
308
+ D(p(o.$t("common.reset")), 1)
309
+ ]),
310
+ _: 1
311
+ })
312
+ ]),
313
+ _: 1
314
+ })
315
+ ]),
316
+ _: 1
317
+ })
318
+ ]),
319
+ _: 1
320
+ })
321
+ ]),
322
+ _: 1
323
+ }, 8, ["model"]),
324
+ l[17] || (l[17] = E("div", { class: "clear" }, null, -1))
325
+ ]),
326
+ t(ee, {
327
+ shadow: "never",
328
+ class: "table-container"
329
+ }, {
330
+ header: a(() => [
331
+ t(V, null, {
332
+ default: a(() => [
333
+ t(d, {
334
+ span: 24,
335
+ class: "container-float"
336
+ }, {
337
+ default: a(() => [
338
+ t(J, {
339
+ modelValue: n(f),
340
+ "onUpdate:modelValue": l[10] || (l[10] = (e) => j(f) ? f.value = e : f = e),
341
+ "label-name": "member/mem-member-info"
342
+ }, null, 8, ["modelValue"])
343
+ ]),
344
+ _: 1
345
+ })
346
+ ]),
347
+ _: 1
348
+ })
349
+ ]),
350
+ footer: a(() => [
351
+ n(_) > 0 ? (i(), k(x, {
352
+ key: 0,
353
+ total: n(_),
354
+ "onUpdate:total": l[11] || (l[11] = (e) => j(_) ? _.value = e : null),
355
+ "current-page": m.value.curPage,
356
+ "onUpdate:currentPage": l[12] || (l[12] = (e) => m.value.curPage = e),
357
+ "page-size": m.value.pageSize,
358
+ "onUpdate:pageSize": l[13] || (l[13] = (e) => m.value.pageSize = e),
359
+ onPagination: l[14] || (l[14] = (e) => n(u).getList())
360
+ }, null, 8, ["total", "current-page", "page-size"])) : c("", !0)
361
+ ]),
362
+ default: a(() => [
363
+ t(Z, {
364
+ ref_key: "multipleTableRef",
365
+ ref: S,
366
+ "row-key": "memberId",
367
+ "list-loading": n(M),
368
+ data: n(z),
369
+ "table-label": n(f),
370
+ onSelectionChange: q,
371
+ onSortChange: A
372
+ }, {
373
+ source: a((e) => [
374
+ e.data.row.source ? (i(), v("span", fe, p(n(s).sourceEnum.getEnumValue(e.data.row.source)), 1)) : c("", !0)
375
+ ]),
376
+ levelCode: a((e) => [
377
+ e.data.row.levelCode ? (i(), v("span", ve, p(n(s).levelDict.getDictValue(e.data.row.levelCode)), 1)) : c("", !0)
378
+ ]),
379
+ gender: a((e) => [
380
+ e.data.row.gender ? (i(), v("span", _e, p(n(s).genderDict.getEnumValue(e.data.row.gender)), 1)) : c("", !0)
381
+ ]),
382
+ status: a((e) => [
383
+ t(O, {
384
+ modelValue: e.data.row.status,
385
+ "onUpdate:modelValue": (g) => e.data.row.status = g,
386
+ "active-value": n(I).ENABLED,
387
+ "inactive-value": n(I).DISABLED,
388
+ onClick: (g) => n(u).enableRecord(
389
+ e.data.row,
390
+ e.data.row.status === n(I).ENABLED
391
+ )
392
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value", "onClick"])
393
+ ]),
394
+ mobilePhoneIns: a((e) => [
395
+ t(X, {
396
+ mobileEncrypt: e.data.row.mobileEncrypt,
397
+ mobilePhoneIns: e.data.row.mobilePhoneIns,
398
+ mobilePhone: e.data.row.mobilePhone,
399
+ onToggleEncrypt: (g) => K(e.data.row)
400
+ }, null, 8, ["mobileEncrypt", "mobilePhoneIns", "mobilePhone", "onToggleEncrypt"])
401
+ ]),
402
+ createTime: a((e) => [
403
+ E("span", null, p(n(L).$moment.formatDate(e.data.row.createTime, "YYYY-MM-DD")), 1)
404
+ ]),
405
+ operation: a((e) => [
406
+ ue((i(), v("span", {
407
+ class: "el-button-color dropdown-left",
408
+ onClick: (g) => Q(e.data.row)
409
+ }, [
410
+ D(p(o.$t("common.view")), 1)
411
+ ], 8, ye)), [
412
+ [te, ["member:member_info:view"]]
413
+ ])
414
+ ]),
415
+ _: 1
416
+ }, 8, ["list-loading", "data", "table-label"])
417
+ ]),
418
+ _: 1
419
+ }),
420
+ y.value.visible ? (i(), k(le, {
421
+ key: 0,
422
+ modelValue: y.value.visible,
423
+ "onUpdate:modelValue": l[15] || (l[15] = (e) => y.value.visible = e),
424
+ title: y.value.title,
425
+ "entity-key": n($),
426
+ onRefresh: Y,
427
+ width: "900px"
428
+ }, null, 8, ["modelValue", "title", "entity-key"])) : c("", !0),
429
+ h.value ? (i(), k(oe, {
430
+ key: 1,
431
+ "upload-visible": h.value,
432
+ "template-title": o.$t("sysUser.templateDownload"),
433
+ onTemplateDown: l[16] || (l[16] = (e) => n(u).downloadTemplate(n(C)("member.memberInfo.name"))),
434
+ onImportEvents: H,
435
+ onUploadClosed: F
436
+ }, null, 8, ["upload-visible", "template-title"])) : c("", !0)
437
+ ]);
438
+ };
439
+ }
440
+ });
441
+ export {
442
+ ke as default
443
+ };