xyvcard-shop 0.0.2 → 0.0.3

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,4 +1,4 @@
1
- import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-CRcHmk21.mjs";
1
+ import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-BlhpqyYt.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,8 +1,8 @@
1
1
  import { g as oe, _ as le, a as ae } from "./common-DSpd8KEL.mjs";
2
- import { defineComponent as te, mergeModels as T, getCurrentInstance as ne, ref as V, reactive as C, useModel as re, resolveComponent as m, openBlock as f, createBlock as _, withCtx as a, createElementVNode as w, createVNode as o, createTextVNode as $, toDisplayString as q, unref as n, createCommentVNode as A, createElementBlock as se } from "vue";
2
+ import { defineComponent as te, mergeModels as T, getCurrentInstance as ne, ref as V, reactive as C, useModel as re, resolveComponent as m, openBlock as g, createBlock as _, withCtx as t, createElementVNode as w, createVNode as o, createTextVNode as R, toDisplayString as $, unref as n, createCommentVNode as A, createElementBlock as se } from "vue";
3
3
  import { ElMessage as I } from "element-plus";
4
4
  import { useI18n as de } from "vue-i18n";
5
- import { b as R } from "./index-BxO9l6bZ.mjs";
5
+ import { b as q } from "./index-BxO9l6bZ.mjs";
6
6
  import { D as ue } from "./index-DSuJ_n1X.mjs";
7
7
  const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te({
8
8
  __name: "edit",
@@ -18,18 +18,18 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
18
18
  }),
19
19
  emits: /* @__PURE__ */ T(["refresh"], ["update:modelValue"]),
20
20
  setup(y, { emit: D }) {
21
- const { t: d } = de(), { proxy: g } = ne(), b = V([]), h = V(!1), H = V();
21
+ const { t: d } = de(), { proxy: b } = ne(), f = V([]), h = V(!1), H = V();
22
22
  let l = C({
23
23
  requestId: Math.random() * 10 + "",
24
24
  updateMask: "shopId,facadeName,contacts,mobilePhone,picUrl,address,note,businessStartHour,businessEndHour",
25
25
  businessHoursRange: []
26
26
  });
27
- const M = (e, t, s) => {
28
- t ? /^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(t) ? s() : s(new Error(d("branch.correctPhone"))) : s(new Error(d("branch.mobilePhoneRequired")));
29
- }, B = (e, t, s) => {
27
+ const F = (e, a, s) => {
28
+ a ? /^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(a) ? s() : s(new Error(d("branch.correctPhone"))) : s(new Error(d("branch.mobilePhoneRequired")));
29
+ }, M = (e, a, s) => {
30
30
  const u = l.businessStartHour, i = l.businessEndHour;
31
31
  !u || !i ? s(new Error(d("branch.businessHoursRangeRequired"))) : u >= i ? s(new Error(d("branch.correctHour"))) : s();
32
- }, j = C({
32
+ }, B = C({
33
33
  shopId: [
34
34
  {
35
35
  required: !0,
@@ -75,14 +75,14 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
75
75
  mobilePhone: [
76
76
  {
77
77
  required: !0,
78
- validator: M,
78
+ validator: F,
79
79
  trigger: "blur"
80
80
  }
81
81
  ],
82
82
  businessHoursRange: [
83
83
  {
84
84
  required: !0,
85
- validator: B,
85
+ validator: M,
86
86
  trigger: "change"
87
87
  }
88
88
  ],
@@ -100,15 +100,16 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
100
100
  trigger: "blur"
101
101
  }
102
102
  ]
103
- }), c = re(y, "modelValue"), P = y, U = D, F = Object.keys(P.entityKey), N = V(F.length >= 1);
104
- N.value && R.findById(P.entityKey).then(({ data: e }) => {
105
- Object.assign(l, e), b.value = [
106
- g.$moment.convertToFullDateTime(l.businessStartHour),
107
- g.$moment.convertToFullDateTime(l.businessEndHour)
103
+ }), c = re(y, "modelValue"), P = y, U = D, j = Object.keys(P.entityKey), N = V(j.length >= 1);
104
+ N.value && q.findById(P.entityKey).then(({ data: e }) => {
105
+ Object.assign(l, e), f.value = [
106
+ b.$moment.convertToFullDateTime(l.businessStartHour),
107
+ b.$moment.convertToFullDateTime(l.businessEndHour)
108
108
  ];
109
109
  });
110
110
  function K(e) {
111
- b.value = e, console.log(b), l.businessStartHour = g.$moment.formatToTime(e[0]), l.businessEndHour = g.$moment.formatToTime(e[1]);
111
+ var a;
112
+ f.value = e, console.log(f), l.businessStartHour = b.$moment.formatToTime(e[0]), l.businessEndHour = b.$moment.formatToTime(e[1]), (a = b.$refs.branchFormRef) == null || a.validateField("businessHoursRange");
112
113
  }
113
114
  function L(e) {
114
115
  l.latitude = e[0].toString(), l.longitude = e[1].toString();
@@ -121,13 +122,13 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
121
122
  }
122
123
  const G = async () => {
123
124
  var e;
124
- await ((e = H.value) == null ? void 0 : e.validate((t) => {
125
- t && (N.value ? R.update(l).then((s) => {
125
+ await ((e = H.value) == null ? void 0 : e.validate((a) => {
126
+ a && (N.value ? q.update(l).then((s) => {
126
127
  console.log(s), s.status === 200 && (I({
127
128
  message: d("common.submitSuccess"),
128
129
  type: "success"
129
130
  }), c.value && (c.value = !1), U("refresh", s.status === 200));
130
- }) : R.create(l).then((s) => {
131
+ }) : q.create(l).then((s) => {
131
132
  console.log(s), s.status === 200 && (I({
132
133
  message: d("common.submitSuccess"),
133
134
  type: "success"
@@ -141,18 +142,18 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
141
142
  function J(e) {
142
143
  l.picUrl = e;
143
144
  }
144
- return (e, t) => {
145
+ return (e, a) => {
145
146
  const s = m("jmash-select"), u = m("el-form-item"), i = m("el-col"), p = m("el-input"), Q = le, W = ae, X = m("el-time-picker"), E = m("el-row"), v = m("el-button"), Y = m("View"), S = m("el-icon"), Z = m("Hide"), x = m("el-form"), ee = m("el-dialog");
146
- return f(), _(ee, {
147
+ return g(), _(ee, {
147
148
  modelValue: c.value,
148
- "onUpdate:modelValue": t[10] || (t[10] = (r) => c.value = r),
149
+ "onUpdate:modelValue": a[10] || (a[10] = (r) => c.value = r),
149
150
  onClose: k
150
151
  }, {
151
- footer: a(() => [
152
+ footer: t(() => [
152
153
  w("div", me, [
153
154
  o(v, { onClick: k }, {
154
- default: a(() => [
155
- $(q(e.$t("common.cancel")), 1)
155
+ default: t(() => [
156
+ R($(e.$t("common.cancel")), 1)
156
157
  ]),
157
158
  _: 1
158
159
  }),
@@ -160,35 +161,35 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
160
161
  type: "primary",
161
162
  onClick: G
162
163
  }, {
163
- default: a(() => [
164
- $(q(e.$t("common.confirm")), 1)
164
+ default: t(() => [
165
+ R($(e.$t("common.confirm")), 1)
165
166
  ]),
166
167
  _: 1
167
168
  })
168
169
  ])
169
170
  ]),
170
- default: a(() => [
171
+ default: t(() => [
171
172
  o(x, {
172
173
  ref_key: "branchFormRef",
173
174
  ref: H,
174
175
  model: n(l),
175
176
  "label-width": "120px",
176
- rules: j
177
+ rules: B
177
178
  }, {
178
- default: a(() => [
179
- t[12] || (t[12] = w("div", { class: "title-content" }, "门店基本信息", -1)),
179
+ default: t(() => [
180
+ a[12] || (a[12] = w("div", { class: "title-content" }, "门店基本信息", -1)),
180
181
  o(E, null, {
181
- default: a(() => [
182
+ default: t(() => [
182
183
  o(i, { span: 12 }, {
183
- default: a(() => [
184
+ default: t(() => [
184
185
  o(u, {
185
186
  label: e.$t("branch.shopName"),
186
187
  prop: "shopId"
187
188
  }, {
188
- default: a(() => [
189
+ default: t(() => [
189
190
  o(s, {
190
191
  modelValue: n(l).shopId,
191
- "onUpdate:modelValue": t[0] || (t[0] = (r) => n(l).shopId = r),
192
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n(l).shopId = r),
192
193
  data: n(ue).shopBizDict.values,
193
194
  placeholder: e.$t("branch.shopNameRequired"),
194
195
  clearable: ""
@@ -200,15 +201,15 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
200
201
  _: 1
201
202
  }),
202
203
  o(i, { span: 12 }, {
203
- default: a(() => [
204
+ default: t(() => [
204
205
  o(u, {
205
206
  label: e.$t("branch.facadeName"),
206
207
  prop: "facadeName"
207
208
  }, {
208
- default: a(() => [
209
+ default: t(() => [
209
210
  o(p, {
210
211
  modelValue: n(l).facadeName,
211
- "onUpdate:modelValue": t[1] || (t[1] = (r) => n(l).facadeName = r),
212
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => n(l).facadeName = r),
212
213
  placeholder: e.$t("branch.facadeNameRequired"),
213
214
  maxlength: "60",
214
215
  "show-word-limit": "",
@@ -221,12 +222,12 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
221
222
  _: 1
222
223
  }),
223
224
  o(i, { span: 12 }, {
224
- default: a(() => [
225
+ default: t(() => [
225
226
  o(u, {
226
227
  label: e.$t("branch.picUrl"),
227
228
  prop: "picUrl"
228
229
  }, {
229
- default: a(() => [
230
+ default: t(() => [
230
231
  o(Q, {
231
232
  "picture-url": n(l).picUrl,
232
233
  onImageSrc: J
@@ -238,15 +239,15 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
238
239
  _: 1
239
240
  }),
240
241
  o(i, { span: 12 }, {
241
- default: a(() => [
242
+ default: t(() => [
242
243
  o(u, {
243
244
  label: e.$t("branch.note"),
244
245
  prop: "note"
245
246
  }, {
246
- default: a(() => [
247
+ default: t(() => [
247
248
  o(p, {
248
249
  modelValue: n(l).note,
249
- "onUpdate:modelValue": t[2] || (t[2] = (r) => n(l).note = r),
250
+ "onUpdate:modelValue": a[2] || (a[2] = (r) => n(l).note = r),
250
251
  type: "textarea",
251
252
  autosize: { minRows: 3 },
252
253
  maxlength: "200",
@@ -261,15 +262,15 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
261
262
  _: 1
262
263
  }),
263
264
  o(i, { span: 24 }, {
264
- default: a(() => [
265
+ default: t(() => [
265
266
  o(u, {
266
267
  label: e.$t("branch.address"),
267
268
  prop: "address"
268
269
  }, {
269
- default: a(() => [
270
+ default: t(() => [
270
271
  o(p, {
271
272
  modelValue: n(l).address,
272
- "onUpdate:modelValue": t[3] || (t[3] = (r) => n(l).address = r),
273
+ "onUpdate:modelValue": a[3] || (a[3] = (r) => n(l).address = r),
273
274
  placeholder: e.$t("branch.addressRequired"),
274
275
  maxlength: "120",
275
276
  "show-word-limit": "",
@@ -282,10 +283,10 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
282
283
  _: 1
283
284
  }),
284
285
  o(i, { span: 24 }, {
285
- default: a(() => [
286
+ default: t(() => [
286
287
  o(u, null, {
287
- default: a(() => [
288
- n(l).address ? (f(), _(W, {
288
+ default: t(() => [
289
+ n(l).address ? (g(), _(W, {
289
290
  key: 0,
290
291
  address: n(l).address,
291
292
  onGetLatLng: L,
@@ -298,15 +299,15 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
298
299
  _: 1
299
300
  }),
300
301
  o(i, { span: 12 }, {
301
- default: a(() => [
302
+ default: t(() => [
302
303
  o(u, {
303
304
  label: e.$t("branch.contacts"),
304
305
  prop: "contacts"
305
306
  }, {
306
- default: a(() => [
307
+ default: t(() => [
307
308
  o(p, {
308
309
  modelValue: n(l).contacts,
309
- "onUpdate:modelValue": t[4] || (t[4] = (r) => n(l).contacts = r),
310
+ "onUpdate:modelValue": a[4] || (a[4] = (r) => n(l).contacts = r),
310
311
  placeholder: e.$t("branch.contactsRequired"),
311
312
  maxlength: "15",
312
313
  "show-word-limit": "",
@@ -319,15 +320,15 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
319
320
  _: 1
320
321
  }),
321
322
  o(i, { span: 12 }, {
322
- default: a(() => [
323
+ default: t(() => [
323
324
  o(u, {
324
325
  label: e.$t("branch.mobilePhone"),
325
326
  prop: "mobilePhone"
326
327
  }, {
327
- default: a(() => [
328
+ default: t(() => [
328
329
  o(p, {
329
330
  modelValue: n(l).mobilePhone,
330
- "onUpdate:modelValue": t[5] || (t[5] = (r) => n(l).mobilePhone = r),
331
+ "onUpdate:modelValue": a[5] || (a[5] = (r) => n(l).mobilePhone = r),
331
332
  placeholder: e.$t("branch.mobilePhoneRequired"),
332
333
  maxlength: "30",
333
334
  "show-word-limit": "",
@@ -340,15 +341,15 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
340
341
  _: 1
341
342
  }),
342
343
  o(i, { span: 24 }, {
343
- default: a(() => [
344
+ default: t(() => [
344
345
  o(u, {
345
346
  label: e.$t("branch.businessHoursRange"),
346
347
  prop: "businessHoursRange"
347
348
  }, {
348
- default: a(() => [
349
+ default: t(() => [
349
350
  o(X, {
350
- modelValue: b.value,
351
- "onUpdate:modelValue": t[6] || (t[6] = (r) => b.value = r),
351
+ modelValue: f.value,
352
+ "onUpdate:modelValue": a[6] || (a[6] = (r) => f.value = r),
352
353
  format: "HH:mm",
353
354
  "is-range": "",
354
355
  "range-separator": "To",
@@ -365,20 +366,20 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
365
366
  ]),
366
367
  _: 1
367
368
  }),
368
- n(l).branchId ? A("", !0) : (f(), se("div", ie, [
369
- t[11] || (t[11] = w("div", { class: "title-content" }, "管理员信息", -1)),
369
+ n(l).branchId ? A("", !0) : (g(), se("div", ie, [
370
+ a[11] || (a[11] = w("div", { class: "title-content" }, "管理员信息", -1)),
370
371
  o(E, null, {
371
- default: a(() => [
372
+ default: t(() => [
372
373
  o(i, { span: 12 }, {
373
- default: a(() => [
374
+ default: t(() => [
374
375
  o(u, {
375
376
  label: e.$t("branch.loginAccount"),
376
377
  prop: "loginAccount"
377
378
  }, {
378
- default: a(() => [
379
+ default: t(() => [
379
380
  o(p, {
380
381
  modelValue: n(l).loginAccount,
381
- "onUpdate:modelValue": t[7] || (t[7] = (r) => n(l).loginAccount = r),
382
+ "onUpdate:modelValue": a[7] || (a[7] = (r) => n(l).loginAccount = r),
382
383
  placeholder: e.$t("branch.loginAccountRequired"),
383
384
  maxlength: "30",
384
385
  "show-word-limit": ""
@@ -390,37 +391,37 @@ const ie = { key: 0 }, me = { class: "dialog-footer" }, Ve = /* @__PURE__ */ te(
390
391
  _: 1
391
392
  }),
392
393
  o(i, { span: 12 }, {
393
- default: a(() => [
394
+ default: t(() => [
394
395
  o(u, {
395
396
  label: e.$t("branch.loginPassword"),
396
397
  prop: "loginPassword"
397
398
  }, {
398
- default: a(() => [
399
+ default: t(() => [
399
400
  o(p, {
400
401
  modelValue: n(l).loginPassword,
401
- "onUpdate:modelValue": t[9] || (t[9] = (r) => n(l).loginPassword = r),
402
+ "onUpdate:modelValue": a[9] || (a[9] = (r) => n(l).loginPassword = r),
402
403
  type: h.value ? "text" : "password",
403
404
  placeholder: e.$t("branch.loginPasswordRequired")
404
405
  }, {
405
- append: a(() => [
406
+ append: t(() => [
406
407
  o(v, { onClick: z }, {
407
- default: a(() => [
408
- $(q(e.$t("branch.randomPwd")), 1)
408
+ default: t(() => [
409
+ R($(e.$t("branch.randomPwd")), 1)
409
410
  ]),
410
411
  _: 1
411
412
  })
412
413
  ]),
413
- suffix: a(() => [
414
+ suffix: t(() => [
414
415
  w("span", {
415
- onClick: t[8] || (t[8] = (r) => h.value = !h.value)
416
+ onClick: a[8] || (a[8] = (r) => h.value = !h.value)
416
417
  }, [
417
- h.value ? (f(), _(S, { key: 0 }, {
418
- default: a(() => [
418
+ h.value ? (g(), _(S, { key: 0 }, {
419
+ default: t(() => [
419
420
  o(Y)
420
421
  ]),
421
422
  _: 1
422
- })) : (f(), _(S, { key: 1 }, {
423
- default: a(() => [
423
+ })) : (g(), _(S, { key: 1 }, {
424
+ default: t(() => [
424
425
  o(Z)
425
426
  ]),
426
427
  _: 1
@@ -3,7 +3,7 @@ import { useTableHooks as te, fileApi as j } from "jmash-core";
3
3
  import { useI18n as ae } from "vue-i18n";
4
4
  import { D as R } from "./index-DSuJ_n1X.mjs";
5
5
  import { b as ne } from "./index-BxO9l6bZ.mjs";
6
- import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-CRcHmk21.mjs";
6
+ import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-BlhpqyYt.mjs";
7
7
  import { useRouter as re } from "vue-router";
8
8
  const ie = { class: "app-container" }, de = { class: "search-container" }, ue = { key: 0 }, me = { key: 1 }, pe = {
9
9
  key: 2,
package/dist/index.mjs CHANGED
@@ -2744,7 +2744,7 @@ const Li = {
2744
2744
  }
2745
2745
  };
2746
2746
  }
2747
- }, Ii = /* @__PURE__ */ Object.assign({ "./views/shop/shop-branch/edit.vue": () => import("./edit-gQkU3nNU.mjs"), "./views/shop/shop-branch/index.vue": () => import("./index-DdLR4ZGH.mjs"), "./views/shop/shop-branch/info.vue": () => import("./info-SCwFWVk7.mjs"), "./views/shop/shop-branchs-users/edit.vue": () => import("./edit-Bwb9SdLu.mjs").then((e) => e.e), "./views/shop/shop-branchs-users/index.vue": () => import("./index-41aS9sqD.mjs"), "./views/shop/shop-info/edit.vue": () => import("./edit-C8JUlzmu.mjs"), "./views/shop/shop-info/index.vue": () => import("./index-Cb8t4xcf.mjs"), "./views/shop/shop-info/info.vue": () => import("./info-BpqWC_4h.mjs"), "./views/shop/shop-pay-info/edit.vue": () => import("./edit-DGFUgzQR.mjs"), "./views/shop/shop-pay-info/index.vue": () => import("./index-CxMYU0Yy.mjs"), "./views/shop/shop-shops-users/edit.vue": () => import("./edit-BAd26uKC.mjs").then((e) => e.e), "./views/shop/shop-shops-users/index.vue": () => import("./index-D27HdDnZ.mjs"), "./views/shop/shop-spec-info/edit.vue": () => import("./edit-6ExO3D2p.mjs"), "./views/shop/shop-spec-info/index.vue": () => import("./index-BvyKJYOR.mjs"), "./views/shop/shop-spec-value/edit.vue": () => import("./edit-CRKiIk5l.mjs"), "./views/shop/shop-spec-value/index.vue": () => import("./index-Wp6XCMtZ.mjs") }), Ui = {
2747
+ }, Ii = /* @__PURE__ */ Object.assign({ "./views/shop/shop-branch/edit.vue": () => import("./edit-BcdA43EV.mjs"), "./views/shop/shop-branch/index.vue": () => import("./index-CtHfI_ub.mjs"), "./views/shop/shop-branch/info.vue": () => import("./info-SCwFWVk7.mjs"), "./views/shop/shop-branchs-users/edit.vue": () => import("./edit-Bwb9SdLu.mjs").then((e) => e.e), "./views/shop/shop-branchs-users/index.vue": () => import("./index-41aS9sqD.mjs"), "./views/shop/shop-info/edit.vue": () => import("./edit-C8JUlzmu.mjs"), "./views/shop/shop-info/index.vue": () => import("./index-Cb8t4xcf.mjs"), "./views/shop/shop-info/info.vue": () => import("./info-BpqWC_4h.mjs"), "./views/shop/shop-pay-info/edit.vue": () => import("./edit-DGFUgzQR.mjs"), "./views/shop/shop-pay-info/index.vue": () => import("./index-CxMYU0Yy.mjs"), "./views/shop/shop-shops-users/edit.vue": () => import("./edit-BAd26uKC.mjs").then((e) => e.e), "./views/shop/shop-shops-users/index.vue": () => import("./index-D27HdDnZ.mjs"), "./views/shop/shop-spec-info/edit.vue": () => import("./edit-6ExO3D2p.mjs"), "./views/shop/shop-spec-info/index.vue": () => import("./index-BvyKJYOR.mjs"), "./views/shop/shop-spec-value/edit.vue": () => import("./edit-CRKiIk5l.mjs"), "./views/shop/shop-spec-value/index.vue": () => import("./index-Wp6XCMtZ.mjs") }), Ui = {
2748
2748
  install(e) {
2749
2749
  Ss(Ii, 7), Ws(Ys), e.use(Li), Ds(Rs);
2750
2750
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-shop",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/src/index.d.ts",