xyvcard-goods 0.0.5 → 0.0.7

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,23 +1,23 @@
1
- import { defineComponent as ge, getCurrentInstance as _e, ref as P, resolveComponent as n, resolveDirective as he, openBlock as p, createElementBlock as V, createVNode as l, withCtx as o, Fragment as we, renderList as be, unref as s, createBlock as g, createElementVNode as _, withKeys as Y, createTextVNode as m, toDisplayString as u, withDirectives as y, isRef as K, createCommentVNode as k } from "vue";
1
+ import { defineComponent as ge, getCurrentInstance as _e, ref as P, resolveComponent as n, resolveDirective as he, openBlock as p, createElementBlock as k, createVNode as l, withCtx as o, Fragment as we, renderList as be, unref as s, createBlock as g, createElementVNode as _, withKeys as K, createTextVNode as m, toDisplayString as u, withDirectives as y, isRef as M, createCommentVNode as V } from "vue";
2
+ import { ElMessage as I } from "element-plus";
2
3
  import { useRouter as ve } from "vue-router";
3
- import { useTableHooks as ye, fileApi as M } from "jmash-core";
4
+ import { useTableHooks as ye, fileApi as J } from "jmash-core";
4
5
  import { useI18n as Se } from "vue-i18n";
5
6
  import { goodsSpuApi as L } from "./index.mjs";
6
7
  import { D as b, C as j } from "./index-D5_GsXR7.mjs";
7
- import { _ as Ce } from "./saleIndex.vue_vue_type_script_setup_true_lang-DAWECwmp.mjs";
8
- import { _ as $e } from "./shelfIndex.vue_vue_type_script_setup_true_lang--gWnIIPM.mjs";
9
- import { _ as Ve } from "./auditIndex.vue_vue_type_script_setup_true_lang-Ds9vp1Ci.mjs";
10
- import { _ as ke } from "./approveFailIndex.vue_vue_type_script_setup_true_lang-8ykH4NF1.mjs";
11
- import { $ as I } from "./el-message-wJI-19Bz.mjs";
8
+ import { _ as Ce } from "./saleIndex.vue_vue_type_script_setup_true_lang-BgZZMEph.mjs";
9
+ import { _ as $e } from "./shelfIndex.vue_vue_type_script_setup_true_lang-B7fw9wHp.mjs";
10
+ import { _ as ke } from "./auditIndex.vue_vue_type_script_setup_true_lang-Bnc1wKbA.mjs";
11
+ import { _ as Ve } from "./approveFailIndex.vue_vue_type_script_setup_true_lang-8ykH4NF1.mjs";
12
12
  const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-container" }, Ue = ["onClick"], De = ["onClick"], Re = ["onClick"], Ye = /* @__PURE__ */ ge({
13
13
  __name: "index",
14
14
  setup(ze) {
15
- const { t: c } = Se(), D = ve(), { proxy: J } = _e(), i = P({}), {
15
+ const { t: c } = Se(), D = ve(), { proxy: G } = _e(), i = P({}), {
16
16
  tableHooks: d,
17
17
  multipleTableRef: R,
18
- queryFormRef: G,
19
- listLoading: W,
20
- tableData: X,
18
+ queryFormRef: W,
19
+ listLoading: X,
20
+ tableData: Z,
21
21
  total: N
22
22
  } = ye(c, L, i);
23
23
  let T = P([
@@ -120,28 +120,28 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
120
120
  ]);
121
121
  b.shopInfoBizDict.useValues(), b.goodsCategoryDict.useValues();
122
122
  const h = P(0);
123
- function Z() {
123
+ function x() {
124
124
  D.push({ path: "/rawgoods/goods-spu/edit" });
125
125
  }
126
- function x(t) {
126
+ function ee(t) {
127
127
  D.push({
128
128
  path: "/rawgoods/goods-spu/edit",
129
129
  query: { spuId: t.spuId }
130
130
  });
131
131
  }
132
- function ee(t) {
132
+ function oe(t) {
133
133
  D.push({
134
134
  path: "/rawgoods/goods-spu/info",
135
135
  query: { spuId: t.spuId }
136
136
  });
137
137
  }
138
- function oe(t) {
138
+ function le(t) {
139
139
  d.selectionRows.value = t;
140
140
  }
141
- function le(t) {
141
+ function te(t) {
142
142
  d.handleSort(t.prop, t.order);
143
143
  }
144
- function te(t) {
144
+ function ae(t) {
145
145
  if (d.selectionRows.value.length === 0) {
146
146
  I({
147
147
  message: c("goodsSpu.chooseShelf"),
@@ -161,7 +161,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
161
161
  }), d.getList(), (f = R.value) == null || f.clearSelection());
162
162
  });
163
163
  }
164
- function ae(t) {
164
+ function se(t) {
165
165
  if (console.log(t), d.selectionRows.value.length === 0) {
166
166
  I({
167
167
  message: c("goodsSpu.chooseShelf"),
@@ -181,30 +181,31 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
181
181
  }), d.getList(), (f = R.value) == null || f.clearSelection());
182
182
  });
183
183
  }
184
- function se(t) {
184
+ function ne(t) {
185
185
  h.value = Number(t.index);
186
186
  }
187
187
  return d.getList(), (t, a) => {
188
- const r = n("jmash-select"), f = n("el-form-item"), S = n("el-col"), E = n("el-input"), C = n("el-button"), A = n("el-row"), ne = n("el-form"), q = n("arrow-down"), $ = n("el-icon"), B = n("Unlock"), U = n("el-dropdown-item"), F = n("Lock"), H = n("el-dropdown-menu"), O = n("el-dropdown"), ue = n("jmash-column-select"), de = n("el-image"), Q = n("el-switch"), pe = n("jmash-table"), re = n("jmash-pagination"), me = n("el-card"), ie = n("el-tab-pane"), ce = n("el-tabs"), v = he("hasPerm");
189
- return p(), V("div", Ie, [
190
- l(ce, {
188
+ const r = n("jmash-select"), f = n("el-form-item"), S = n("el-col"), E = n("el-input"), C = n("el-button"), A = n("el-row"), ue = n("el-form"), q = n("arrow-down"), $ = n("el-icon"), B = n("Unlock"), U = n("el-dropdown-item"), F = n("Lock"), H = n("el-dropdown-menu"), O = n("el-dropdown"), de = n("jmash-column-select"), pe = n("el-image"), Q = n("el-switch"), re = n("jmash-table"), me = n("jmash-pagination"), ie = n("el-card"), ce = n("el-tab-pane"), fe = n("el-tabs"), v = he("hasPerm");
189
+ return p(), k("div", Ie, [
190
+ l(fe, {
191
191
  modelValue: h.value,
192
192
  "onUpdate:modelValue": a[13] || (a[13] = (z) => h.value = z),
193
193
  type: "border-card",
194
- onTabClick: se
194
+ onTabClick: ne
195
195
  }, {
196
196
  default: o(() => [
197
- (p(!0), V(we, null, be(s(b).goodsSpuListSortEnum.values, (z, fe) => (p(), g(ie, {
197
+ (p(!0), k(we, null, be(s(b).goodsSpuListSortEnum.values, (z, Y) => (p(), g(ce, {
198
+ key: Y,
198
199
  label: z.value,
199
- name: fe
200
+ name: Y
200
201
  }, {
201
202
  default: o(() => [
202
- h.value === 0 ? (p(), V("div", Te, [
203
+ h.value === 0 ? (p(), k("div", Te, [
203
204
  _("div", Ne, [
204
- l(ne, {
205
+ l(ue, {
205
206
  ref_for: !0,
206
207
  ref_key: "queryFormRef",
207
- ref: G,
208
+ ref: W,
208
209
  model: i.value,
209
210
  inline: !0
210
211
  }, {
@@ -243,7 +244,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
243
244
  "onUpdate:modelValue": a[1] || (a[1] = (e) => i.value.spuCode = e),
244
245
  placeholder: t.$t("goodsSpu.spuCode"),
245
246
  class: "!w-[203px]",
246
- onKeyup: a[2] || (a[2] = Y((e) => s(d).handleQuery(), ["enter"]))
247
+ onKeyup: a[2] || (a[2] = K((e) => s(d).handleQuery(), ["enter"]))
247
248
  }, null, 8, ["modelValue", "placeholder"])
248
249
  ]),
249
250
  _: 1
@@ -263,7 +264,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
263
264
  "onUpdate:modelValue": a[3] || (a[3] = (e) => i.value.spuName = e),
264
265
  placeholder: t.$t("goodsSpu.spuName"),
265
266
  class: "!w-[203px]",
266
- onKeyup: a[4] || (a[4] = Y((e) => s(d).handleQuery(), ["enter"]))
267
+ onKeyup: a[4] || (a[4] = K((e) => s(d).handleQuery(), ["enter"]))
267
268
  }, null, 8, ["modelValue", "placeholder"])
268
269
  ]),
269
270
  _: 1
@@ -305,7 +306,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
305
306
  _: 1
306
307
  }, 8, ["model"])
307
308
  ]),
308
- l(me, {
309
+ l(ie, {
309
310
  shadow: "never",
310
311
  class: "table-container"
311
312
  }, {
@@ -316,7 +317,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
316
317
  default: o(() => [
317
318
  y((p(), g(C, {
318
319
  type: "primary",
319
- onClick: Z
320
+ onClick: x
320
321
  }, {
321
322
  default: o(() => [
322
323
  m(u(t.$t("common.add")), 1)
@@ -338,7 +339,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
338
339
  ]),
339
340
  y((p(), g(O, {
340
341
  class: "dropdown-left",
341
- onCommand: te
342
+ onCommand: ae
342
343
  }, {
343
344
  dropdown: o(() => [
344
345
  l(H, null, {
@@ -391,7 +392,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
391
392
  ]),
392
393
  y((p(), g(O, {
393
394
  class: "dropdown-left",
394
- onCommand: ae
395
+ onCommand: se
395
396
  }, {
396
397
  dropdown: o(() => [
397
398
  l(H, null, {
@@ -454,9 +455,9 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
454
455
  class: "container-float"
455
456
  }, {
456
457
  default: o(() => [
457
- l(ue, {
458
+ l(de, {
458
459
  modelValue: s(T),
459
- "onUpdate:modelValue": a[8] || (a[8] = (e) => K(T) ? T.value = e : T = e),
460
+ "onUpdate:modelValue": a[8] || (a[8] = (e) => M(T) ? T.value = e : T = e),
460
461
  "label-name": "goods/goods-spu"
461
462
  }, null, 8, ["modelValue"])
462
463
  ]),
@@ -467,28 +468,28 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
467
468
  })
468
469
  ]),
469
470
  footer: o(() => [
470
- s(N) > 0 ? (p(), g(re, {
471
+ s(N) > 0 ? (p(), g(me, {
471
472
  key: 0,
472
473
  total: s(N),
473
- "onUpdate:total": a[9] || (a[9] = (e) => K(N) ? N.value = e : null),
474
+ "onUpdate:total": a[9] || (a[9] = (e) => M(N) ? N.value = e : null),
474
475
  "current-page": i.value.curPage,
475
476
  "onUpdate:currentPage": a[10] || (a[10] = (e) => i.value.curPage = e),
476
477
  "page-size": i.value.pageSize,
477
478
  "onUpdate:pageSize": a[11] || (a[11] = (e) => i.value.pageSize = e),
478
479
  onPagination: a[12] || (a[12] = (e) => s(d).getList())
479
- }, null, 8, ["total", "current-page", "page-size"])) : k("", !0)
480
+ }, null, 8, ["total", "current-page", "page-size"])) : V("", !0)
480
481
  ]),
481
482
  default: o(() => [
482
- l(pe, {
483
+ l(re, {
483
484
  ref_for: !0,
484
485
  ref_key: "multipleTableRef",
485
486
  ref: R,
486
487
  "row-key": "spuId",
487
- "list-loading": s(W),
488
- data: s(X),
488
+ "list-loading": s(X),
489
+ data: s(Z),
489
490
  "table-label": s(T),
490
- onSelectionChange: oe,
491
- onSortChange: le
491
+ onSelectionChange: le,
492
+ onSortChange: te
492
493
  }, {
493
494
  shopId: o((e) => [
494
495
  _("span", null, u(s(b).shopInfoBizDict.getValue(e.data.row.shopId)), 1)
@@ -498,14 +499,14 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
498
499
  ]),
499
500
  picUrls: o((e) => [
500
501
  _("span", null, [
501
- l(de, {
502
- src: s(M).imageUrl(
502
+ l(pe, {
503
+ src: s(J).imageUrl(
503
504
  e.data.row.picUrls.split(",")[0],
504
505
  50,
505
506
  50
506
507
  ),
507
508
  "preview-src-list": [
508
- s(M).imageUrl(e.data.row.picUrls.split(",")[0])
509
+ s(J).imageUrl(e.data.row.picUrls.split(",")[0])
509
510
  ],
510
511
  "preview-teleported": "",
511
512
  "hide-on-click-modal": "",
@@ -537,7 +538,7 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
537
538
  )), 1)
538
539
  ]),
539
540
  updateTime: o((e) => [
540
- _("span", null, u(s(J).$moment.formatDate(
541
+ _("span", null, u(s(G).$moment.formatDate(
541
542
  e.data.row.updateTime,
542
543
  "YYYY-MM-DD HH:mm:ss"
543
544
  )), 1)
@@ -553,15 +554,15 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
553
554
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
554
555
  ]),
555
556
  operation: o((e) => [
556
- y((p(), V("span", {
557
+ y((p(), k("span", {
557
558
  class: "el-button-color",
558
- onClick: (w) => x(e.data.row)
559
+ onClick: (w) => ee(e.data.row)
559
560
  }, [
560
561
  m(u(t.$t("common.edit")), 1)
561
562
  ], 8, Ue)), [
562
563
  [v, ["goods:goods_spu:update"]]
563
564
  ]),
564
- y((p(), V("span", {
565
+ y((p(), k("span", {
565
566
  class: "el-button-color dropdown-left",
566
567
  onClick: (w) => s(d).deleteRecord(e.data.row)
567
568
  }, [
@@ -569,9 +570,9 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
569
570
  ], 8, De)), [
570
571
  [v, ["goods:goods_spu:delete"]]
571
572
  ]),
572
- y((p(), V("span", {
573
+ y((p(), k("span", {
573
574
  class: "el-button-color dropdown-left",
574
- onClick: (w) => ee(e.data.row)
575
+ onClick: (w) => oe(e.data.row)
575
576
  }, [
576
577
  m(u(t.$t("common.view")), 1)
577
578
  ], 8, Re)), [
@@ -583,14 +584,14 @@ const Ie = { class: "app-container" }, Te = { key: 0 }, Ne = { class: "search-co
583
584
  ]),
584
585
  _: 1
585
586
  })
586
- ])) : k("", !0),
587
- h.value === 1 ? (p(), g(Ce, { key: 1 })) : k("", !0),
588
- h.value === 2 ? (p(), g($e, { key: 2 })) : k("", !0),
589
- h.value === 3 ? (p(), g(Ve, { key: 3 })) : k("", !0),
590
- h.value === 4 ? (p(), g(ke, { key: 4 })) : k("", !0)
587
+ ])) : V("", !0),
588
+ h.value === 1 ? (p(), g(Ce, { key: 1 })) : V("", !0),
589
+ h.value === 2 ? (p(), g($e, { key: 2 })) : V("", !0),
590
+ h.value === 3 ? (p(), g(ke, { key: 3 })) : V("", !0),
591
+ h.value === 4 ? (p(), g(Ve, { key: 4 })) : V("", !0)
591
592
  ]),
592
593
  _: 2
593
- }, 1032, ["label", "name"]))), 256))
594
+ }, 1032, ["label", "name"]))), 128))
594
595
  ]),
595
596
  _: 1
596
597
  }, 8, ["modelValue"])