xyvcard-goods 0.0.33 → 0.0.34

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.
Files changed (92) hide show
  1. package/dist/{GoodsBaseForm-6rzBkBTh.mjs → GoodsBaseForm-BSvXc_XA.mjs} +1 -1
  2. package/dist/{GoodsBaseForm.vue_vue_type_script_setup_true_lang-BmIR352P.mjs → GoodsBaseForm.vue_vue_type_script_setup_true_lang-rsmqHXbJ.mjs} +60 -53
  3. package/dist/GoodsLogisticsForm-1Bbd4Z52.mjs +4 -0
  4. package/dist/GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-PSnPNbmT.mjs +434 -0
  5. package/dist/{GoodsSpecForm-BqaN71rS.mjs → GoodsSpecForm-Ddo1IZLZ.mjs} +1 -1
  6. package/dist/GoodsSpecForm.vue_vue_type_script_setup_true_lang-CdWIufm4.mjs +338 -0
  7. package/dist/edit copy 2-Yzf_M31V.mjs +59 -0
  8. package/dist/{edit copy-tfwJCdiV.mjs → edit copy-CCnzlrgL.mjs } +3 -3
  9. package/dist/{edit-D2zcGl_U.mjs → edit-BgtwinSN.mjs} +1 -1
  10. package/dist/{edit-Db2EJ9dq.mjs → edit-Dke5sWct.mjs} +3 -3
  11. package/dist/{edit-CZwlbL9o.mjs → edit-e5-aXV6K.mjs} +18 -18
  12. package/dist/{edit-DBTNknBy.mjs → edit-lfXK_dUp.mjs} +3 -3
  13. package/dist/{edit-1Lv_dvlq.mjs → edit-pUKONjxH.mjs} +1 -1
  14. package/dist/{edit.vue_vue_type_script_setup_true_lang-BmOhw098.mjs → edit.vue_vue_type_script_setup_true_lang-BtGT564r.mjs} +32 -32
  15. package/dist/{index-BXa-atkT.mjs → index-BSzOTWcG.mjs} +1 -1
  16. package/dist/{index-Cl4wz2yF.mjs → index-BpKiAhvt.mjs} +3 -3
  17. package/dist/{index-DXIGHcIv.mjs → index-ChQ-ZxD1.mjs} +2 -2
  18. package/dist/{index-BpXZNA11.mjs → index-CkJncbVf.mjs} +3 -3
  19. package/dist/{index-DGYGNHfx.mjs → index-CkMWas2b.mjs} +3 -3
  20. package/dist/index-Da2R0n8O.mjs +374 -0
  21. package/dist/{index-CRfiEzkA.mjs → index-DhS4AuWf.mjs} +509 -481
  22. package/dist/{index-BhUD_X30.mjs → index-DyLLV1NK.mjs} +2 -2
  23. package/dist/index.mjs +1 -1
  24. package/dist/{info-DfbU-CWk.mjs → info-DOKoSi7a.mjs} +34 -34
  25. package/dist/{info-DDi6GKQH.mjs → info-De_pBN6A.mjs} +19 -19
  26. package/dist/{skuForm-DoIpxDvq.mjs → skuForm-DVGkw6rD.mjs} +21 -21
  27. package/dist/{skuForm-DWIoveRP.mjs → skuForm-YXHrhyPI.mjs} +110 -109
  28. package/dist/{skuTable-BVBtWrf9.mjs → skuTable-DOIQ9kiV.mjs} +62 -62
  29. package/dist/style.css +1 -1
  30. package/dts/xyvcard-goods/src/App.vue.d.ts +2 -0
  31. package/dts/xyvcard-goods/src/api/dict.d.ts +35 -0
  32. package/dts/xyvcard-goods/src/api/goods-base/index.d.ts +11 -0
  33. package/dts/xyvcard-goods/src/api/goods-base/types.d.ts +33 -0
  34. package/dts/xyvcard-goods/src/api/goods-brand-info/index.d.ts +20 -0
  35. package/dts/xyvcard-goods/src/api/goods-brand-info/types.d.ts +73 -0
  36. package/dts/xyvcard-goods/src/api/goods-category/index.d.ts +23 -0
  37. package/dts/xyvcard-goods/src/api/goods-category/types.d.ts +70 -0
  38. package/dts/xyvcard-goods/src/api/goods-ensure/index.d.ts +13 -0
  39. package/dts/xyvcard-goods/src/api/goods-ensure/types.d.ts +13 -0
  40. package/dts/xyvcard-goods/src/api/goods-label-info/index.d.ts +20 -0
  41. package/dts/xyvcard-goods/src/api/goods-label-info/types.d.ts +70 -0
  42. package/dts/xyvcard-goods/src/api/goods-logistics/index.d.ts +8 -0
  43. package/dts/xyvcard-goods/src/api/goods-logistics/types.d.ts +16 -0
  44. package/dts/xyvcard-goods/src/api/goods-sku/types.d.ts +18 -0
  45. package/dts/xyvcard-goods/src/api/goods-spec/index.d.ts +8 -0
  46. package/dts/xyvcard-goods/src/api/goods-spec/types.d.ts +15 -0
  47. package/dts/xyvcard-goods/src/api/goods-spu/index.d.ts +69 -0
  48. package/dts/xyvcard-goods/src/api/goods-spu/types.d.ts +245 -0
  49. package/dts/xyvcard-goods/src/api/goods-stock/index.d.ts +8 -0
  50. package/dts/xyvcard-goods/src/api/goods-stock/types.d.ts +32 -0
  51. package/dts/xyvcard-goods/src/api/index.d.ts +29 -0
  52. package/dts/xyvcard-goods/src/api/shop-branch/index.d.ts +9 -0
  53. package/dts/xyvcard-goods/src/api/shop-branch/types.d.ts +28 -0
  54. package/dts/xyvcard-goods/src/components/ImageUpload.vue.d.ts +36 -0
  55. package/dts/xyvcard-goods/src/constant.d.ts +107 -0
  56. package/dts/xyvcard-goods/src/index.d.ts +12 -0
  57. package/dts/xyvcard-goods/src/lang/goods/en.d.ts +2 -0
  58. package/dts/xyvcard-goods/src/lang/goods/zh-cn.d.ts +141 -0
  59. package/dts/xyvcard-goods/src/lang/index.d.ts +1 -0
  60. package/dts/xyvcard-goods/src/main.d.ts +7 -0
  61. package/dts/xyvcard-goods/src/permission.d.ts +1 -0
  62. package/dts/xyvcard-goods/src/router/index.d.ts +6 -0
  63. package/dts/xyvcard-goods/src/utils/momentPlugin.d.ts +5 -0
  64. package/dts/xyvcard-goods/src/utils/returnBizLay.d.ts +2 -0
  65. package/dts/xyvcard-goods/src/utils/sku.d.ts +19 -0
  66. package/dts/xyvcard-goods/src/views/goods/goods-brand-info/edit.vue.d.ts +22 -0
  67. package/dts/xyvcard-goods/src/views/goods/goods-brand-info/index.vue.d.ts +2 -0
  68. package/dts/xyvcard-goods/src/views/goods/goods-category/edit.vue.d.ts +22 -0
  69. package/dts/xyvcard-goods/src/views/goods/goods-category/index.vue.d.ts +2 -0
  70. package/dts/xyvcard-goods/src/views/goods/goods-combination/edit.vue.d.ts +2 -0
  71. package/dts/xyvcard-goods/src/views/goods/goods-combination/index.vue.d.ts +2 -0
  72. package/dts/xyvcard-goods/src/views/goods/goods-combination/info.vue.d.ts +2 -0
  73. package/dts/xyvcard-goods/src/views/goods/goods-combination/skuForm.vue.d.ts +20 -0
  74. package/dts/xyvcard-goods/src/views/goods/goods-label-info/edit.vue.d.ts +22 -0
  75. package/dts/xyvcard-goods/src/views/goods/goods-label-info/index.vue.d.ts +2 -0
  76. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsBaseForm.vue.d.ts +34 -0
  77. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsLogisticsForm.vue.d.ts +42 -0
  78. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsSpecForm.vue.d.ts +42 -0
  79. package/dts/xyvcard-goods/src/views/goods/goods-spu/edit copy 2.vue.d.ts +2 -0
  80. package/dts/xyvcard-goods/src/views/goods/goods-spu/edit copy.vue.d.ts +2 -0
  81. package/dts/xyvcard-goods/src/views/goods/goods-spu/edit.vue.d.ts +2 -0
  82. package/dts/xyvcard-goods/src/views/goods/goods-spu/index.vue.d.ts +2 -0
  83. package/dts/xyvcard-goods/src/views/goods/goods-spu/info.vue.d.ts +2 -0
  84. package/dts/xyvcard-goods/src/views/goods/goods-spu/skuForm.vue.d.ts +29 -0
  85. package/dts/xyvcard-goods/src/views/goods/goods-spu/skuTable.vue.d.ts +40 -0
  86. package/dts/xyvcard-shop/src/api/shop-branch/index.d.ts +14 -0
  87. package/dts/xyvcard-shop/src/api/shop-branch/types.d.ts +76 -0
  88. package/package.json +4 -4
  89. package/dist/GoodsLogisticsForm-CHyQ99Mt.mjs +0 -10
  90. package/dist/GoodsSpecForm.vue_vue_type_script_setup_true_lang-BTFKRiNW.mjs +0 -140
  91. package/dist/edit copy 2-DnKLaz3I.mjs +0 -45
  92. package/dist/index-Df-F10aZ.mjs +0 -264
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./GoodsBaseForm.vue_vue_type_script_setup_true_lang-BmIR352P.mjs";
1
+ import { _ as f } from "./GoodsBaseForm.vue_vue_type_script_setup_true_lang-rsmqHXbJ.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,16 +1,15 @@
1
- import { _ as G } from "./ImageUpload-Bf2jhRs5.mjs";
2
- import { defineComponent as T, reactive as C, ref as j, resolveComponent as m, createBlock as y, openBlock as I, unref as o, withCtx as t, createVNode as e, createCommentVNode as z, createElementVNode as h, createTextVNode as F } from "vue";
3
- import { useI18n as M } from "vue-i18n";
4
- import { useRoute as Y, useRouter as W } from "vue-router";
5
- import { useUserStore as f, clearEmpty as S, request as b, fileApi as H, routerUtil as J } from "jmash-core";
6
- import { WangEditor as K } from "xyvcard-cms";
7
- import { D as g, C as U } from "./index-Df-F10aZ.mjs";
8
- import { a as Q } from "./index-CRfiEzkA.mjs";
9
- import { E as q } from "./el-message-BB2-39XJ.mjs";
10
- class X {
1
+ import { _ as j } from "./ImageUpload-Bf2jhRs5.mjs";
2
+ import { defineComponent as F, reactive as h, ref as M, resolveComponent as m, createBlock as U, openBlock as y, unref as o, withCtx as t, createVNode as e, createCommentVNode as z, createElementVNode as I, createTextVNode as Y } from "vue";
3
+ import { useI18n as W } from "vue-i18n";
4
+ import { useRoute as H, useRouter as J } from "vue-router";
5
+ import { useUserStore as c, clearEmpty as V, request as f, fileApi as K, routerUtil as Q } from "jmash-core";
6
+ import { WangEditor as X } from "xyvcard-cms";
7
+ import { D as g, C as q } from "./index-Da2R0n8O.mjs";
8
+ import { E as B } from "./el-message-BB2-39XJ.mjs";
9
+ class Z {
11
10
  // A创建商品基本信息
12
11
  create(d) {
13
- return d.tenant = f().user.tenant, S(d), b({
12
+ return d.tenant = c().user.tenant, V(d), f({
14
13
  url: "/v1/goods/goods_base",
15
14
  method: "post",
16
15
  data: d
@@ -18,7 +17,7 @@ class X {
18
17
  }
19
18
  // A编辑商品基本信息
20
19
  update(d) {
21
- return d.tenant = f().user.tenant, S(d), b({
20
+ return d.tenant = c().user.tenant, V(d), f({
22
21
  url: "/v1/goods/goods_base",
23
22
  method: "patch",
24
23
  data: d
@@ -26,8 +25,8 @@ class X {
26
25
  }
27
26
  // 导入下载模版
28
27
  downloadTemplate() {
29
- const d = f().user.tenant;
30
- return b({
28
+ const d = c().user.tenant;
29
+ return f({
31
30
  url: `/v1/goods/goods_base/${d}/template.xlsx`,
32
31
  method: "get",
33
32
  responseType: "blob"
@@ -35,23 +34,26 @@ class X {
35
34
  }
36
35
  // A导入商品基本信息请求.
37
36
  importExcel(d) {
38
- return d.tenant = f().user.tenant, S(d), b({
37
+ return d.tenant = c().user.tenant, V(d), f({
39
38
  url: "/v1/ecoupons/grant_users/import",
40
39
  method: "patch",
41
40
  data: d
42
41
  });
43
42
  }
44
43
  }
45
- const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
44
+ const E = new Z(), x = { class: "image-card" }, de = /* @__PURE__ */ F({
46
45
  __name: "GoodsBaseForm",
46
+ props: {
47
+ goodsSpuModel: { default: () => ({}) }
48
+ },
47
49
  emits: ["submit"],
48
- setup(E, { emit: d }) {
50
+ setup(C, { emit: d }) {
49
51
  g.goodsSupClassEnum.useEnumValues(), g.brandListBizDict.useValues(), g.goodsCategoryListBizLayDict.useValues();
50
- const { t: i } = M(), c = Y(), P = W();
51
- let s = C({
52
+ const { t: i } = W(), b = H(), P = J(), v = C;
53
+ let s = h({
52
54
  requestId: Math.random() * 10 + "",
53
55
  updateMask: "spuName,categoryIds,brandId,spuCode,labelIds,picUrls,sellPoint,description,appApiUrl",
54
- appApiUrl: H.baseApiUrl() || location.origin,
56
+ appApiUrl: K.baseApiUrl() || location.origin,
55
57
  categoryIds: [],
56
58
  labelIds: [],
57
59
  spuId: "",
@@ -61,12 +63,10 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
61
63
  picUrls: "",
62
64
  sellPoint: "",
63
65
  description: "",
64
- supClass: U.GOODS_SUP_CLASS_VALUES.GOODS_TYPE_REAL,
66
+ supClass: q.GOODS_SUP_CLASS_VALUES.GOODS_TYPE_REAL,
65
67
  isBranchPickup: !1
66
68
  });
67
- c.query.spuId && Q.findById({ spuId: c.query.spuId }).then(({ data: a }) => {
68
- Object.assign(s, a);
69
- });
69
+ b.query.spuId && Object.assign(s, v.goodsSpuModel);
70
70
  const w = (a, l, n) => {
71
71
  var p;
72
72
  const r = (p = s.picUrls) == null ? void 0 : p.split(",").filter(Boolean);
@@ -75,7 +75,10 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
75
75
  return n(new Error(i("goodsSpu.imageListsErrors")));
76
76
  n();
77
77
  } else return n(new Error(i("goodsSpu.picUrlsRequired")));
78
- }, R = C({
78
+ }, R = () => {
79
+ var a;
80
+ (a = _.value) == null || a.validateField("picUrls");
81
+ }, $ = h({
79
82
  supClass: [
80
83
  {
81
84
  required: !0,
@@ -120,44 +123,45 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
120
123
  ],
121
124
  picUrls: [
122
125
  {
126
+ required: !0,
123
127
  validator: w,
124
128
  trigger: "change"
125
129
  }
126
130
  ]
127
- }), V = j(), v = d;
128
- function $() {
131
+ }), _ = M(), N = d;
132
+ function L() {
129
133
  var a;
130
- (a = V.value) == null || a.validate((l) => {
134
+ (a = _.value) == null || a.validate((l) => {
131
135
  if (l) {
132
- if (c.query.spuId) {
133
- B.update(s).then((n) => {
134
- n.status === 200 && (q({
136
+ if (b.query.spuId) {
137
+ E.update(s).then((n) => {
138
+ n.status === 200 && (B({
135
139
  message: i("common.submitSuccess"),
136
140
  type: "success"
137
- }), J.closeTagView(c.fullPath, P, !1));
141
+ }), Q.closeTagView(b.fullPath, P, !1));
138
142
  });
139
143
  return;
140
144
  }
141
- B.create(s).then((n) => {
142
- n.status === 200 && (q({
145
+ E.create(s).then((n) => {
146
+ n.status === 200 && (B({
143
147
  message: i("common.submitSuccess"),
144
148
  type: "success"
145
- }), v("submit", n.data));
149
+ }), N("submit", n.data));
146
150
  });
147
151
  }
148
152
  });
149
153
  }
150
154
  return (a, l) => {
151
- const n = m("jmash-enum-radio"), r = m("el-form-item"), p = m("el-col"), _ = m("el-input"), N = m("el-tree-select"), A = m("jmash-select"), L = G, k = m("el-row"), D = m("el-button"), O = m("el-form");
152
- return I(), y(O, {
155
+ const n = m("jmash-enum-radio"), r = m("el-form-item"), p = m("el-col"), S = m("el-input"), k = m("el-tree-select"), A = m("jmash-select"), D = j, O = m("el-row"), G = m("el-button"), T = m("el-form");
156
+ return y(), U(T, {
153
157
  ref_key: "goodsBaseFormRef",
154
- ref: V,
158
+ ref: _,
155
159
  model: o(s),
156
160
  "label-width": "120px",
157
- rules: R
161
+ rules: $
158
162
  }, {
159
163
  default: t(() => [
160
- e(k, null, {
164
+ e(O, null, {
161
165
  default: t(() => [
162
166
  e(p, { span: 12 }, {
163
167
  default: t(() => [
@@ -177,7 +181,7 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
177
181
  ]),
178
182
  _: 1
179
183
  }),
180
- o(s).supClass === o(U).GOODS_SUP_CLASS_VALUES.GOODS_TYPE_REAL ? (I(), y(p, {
184
+ o(s).supClass === o(q).GOODS_SUP_CLASS_VALUES.GOODS_TYPE_REAL ? (y(), U(p, {
181
185
  key: 0,
182
186
  span: 12
183
187
  }, {
@@ -205,7 +209,7 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
205
209
  prop: "spuName"
206
210
  }, {
207
211
  default: t(() => [
208
- e(_, {
212
+ e(S, {
209
213
  modelValue: o(s).spuName,
210
214
  "onUpdate:modelValue": l[2] || (l[2] = (u) => o(s).spuName = u),
211
215
  placeholder: a.$t("goodsSpu.spuNameRequired"),
@@ -226,7 +230,7 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
226
230
  prop: "categoryIds"
227
231
  }, {
228
232
  default: t(() => [
229
- e(N, {
233
+ e(k, {
230
234
  modelValue: o(s).categoryIds,
231
235
  "onUpdate:modelValue": l[3] || (l[3] = (u) => o(s).categoryIds = u),
232
236
  data: o(g).goodsCategoryListBizLayDict.values,
@@ -270,7 +274,7 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
270
274
  prop: "spuCode"
271
275
  }, {
272
276
  default: t(() => [
273
- e(_, {
277
+ e(S, {
274
278
  modelValue: o(s).spuCode,
275
279
  "onUpdate:modelValue": l[5] || (l[5] = (u) => o(s).spuCode = u),
276
280
  placeholder: a.$t("goodsSpu.spuCodeRequired"),
@@ -291,14 +295,17 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
291
295
  prop: "picUrls"
292
296
  }, {
293
297
  default: t(() => [
294
- h("div", Z, [
295
- e(L, {
298
+ I("div", x, [
299
+ e(D, {
296
300
  modelValue: o(s).picUrls,
297
- "onUpdate:modelValue": l[6] || (l[6] = (u) => o(s).picUrls = u),
301
+ "onUpdate:modelValue": [
302
+ l[6] || (l[6] = (u) => o(s).picUrls = u),
303
+ R
304
+ ],
298
305
  limit: 6,
299
306
  "list-type": "picture-card"
300
307
  }, null, 8, ["modelValue"]),
301
- l[9] || (l[9] = h("div", { class: "red-color" }, " 推荐尺寸:100*100或同比例图片,最少上传1张 ", -1))
308
+ l[9] || (l[9] = I("div", { class: "red-color" }, " 推荐尺寸:100*100或同比例图片,最少上传1张 ", -1))
302
309
  ])
303
310
  ]),
304
311
  _: 1
@@ -313,7 +320,7 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
313
320
  prop: "sellPoint"
314
321
  }, {
315
322
  default: t(() => [
316
- e(_, {
323
+ e(S, {
317
324
  type: "textarea",
318
325
  modelValue: o(s).sellPoint,
319
326
  "onUpdate:modelValue": l[7] || (l[7] = (u) => o(s).sellPoint = u),
@@ -334,7 +341,7 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
334
341
  prop: "description"
335
342
  }, {
336
343
  default: t(() => [
337
- e(o(K), {
344
+ e(o(X), {
338
345
  modelValue: o(s).description,
339
346
  "onUpdate:modelValue": l[8] || (l[8] = (u) => o(s).description = u),
340
347
  style: { width: "100%" }
@@ -350,12 +357,12 @@ const B = new X(), Z = { class: "image-card" }, de = /* @__PURE__ */ T({
350
357
  }),
351
358
  e(r, null, {
352
359
  default: t(() => [
353
- e(D, {
360
+ e(G, {
354
361
  type: "primary",
355
- onClick: $
362
+ onClick: L
356
363
  }, {
357
364
  default: t(() => l[10] || (l[10] = [
358
- F("保存", -1)
365
+ Y("保存", -1)
359
366
  ])),
360
367
  _: 1,
361
368
  __: [10]
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-PSnPNbmT.mjs";
2
+ export {
3
+ f as default
4
+ };