xyvcard-goods 0.0.19 → 0.0.20

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 (36) hide show
  1. package/dist/edit-Bb2XgE0h.mjs +590 -0
  2. package/dist/edit-BcokSKfN.mjs +183 -0
  3. package/dist/{edit-E57LIt5x.mjs → edit-Cj13W2TC.mjs} +1 -1
  4. package/dist/edit-DxnsmaXV.mjs +186 -0
  5. package/dist/{edit.vue_vue_type_script_setup_true_lang-BHplO2tN.mjs → edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs} +1 -1
  6. package/dist/{goodsList-0TMcPn_Q.mjs → goodsList-DOXK1EwK.mjs} +1 -1
  7. package/dist/goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs +713 -0
  8. package/dist/index-BmOxm1P2.mjs +324 -0
  9. package/dist/index-C3FT_Oe7.mjs +318 -0
  10. package/dist/{index-CnyW3rxw.mjs → index-CGAoZY87.mjs} +2 -2
  11. package/dist/index-D3w33Nba.mjs +301 -0
  12. package/dist/{index-nSAowuoJ.mjs → index-DAJiqOCh.mjs} +2 -2
  13. package/dist/index-jTDhsbYM.mjs +141 -0
  14. package/dist/index-r0u-27m7.mjs +141 -0
  15. package/dist/index.mjs +163 -149
  16. package/dist/info-DImlMNq0.mjs +365 -0
  17. package/dist/{skuForm-DyYIl6H4.mjs → skuForm-Bt3arW0s.mjs} +154 -106
  18. package/dist/skuTable-Ahc3WlPp.mjs +639 -0
  19. package/dist/style.css +1 -1
  20. package/dts/api/dict.d.ts +6 -0
  21. package/dts/api/goods-brand-info/types.d.ts +4 -1
  22. package/dts/api/goods-label-info/types.d.ts +3 -0
  23. package/dts/api/goods-sku/types.d.ts +2 -0
  24. package/dts/api/goods-spu/types.d.ts +12 -0
  25. package/dts/api/index.d.ts +3 -1
  26. package/dts/lang/goods/zh-cn.d.ts +18 -4
  27. package/package.json +2 -2
  28. package/dist/edit-B3Ripwo1.mjs +0 -437
  29. package/dist/edit-DEdWUJfi.mjs +0 -529
  30. package/dist/edit-SYuN1_Fg.mjs +0 -465
  31. package/dist/goodsList.vue_vue_type_script_setup_true_lang-Cd7-ryQA.mjs +0 -626
  32. package/dist/index-C0nlTW8F.mjs +0 -355
  33. package/dist/index-CmKF2zdn.mjs +0 -272
  34. package/dist/index-DH3UH0QC.mjs +0 -345
  35. package/dist/info-5OkZzwEV.mjs +0 -312
  36. package/dist/skuTable-B8v1DVIO.mjs +0 -543
@@ -0,0 +1,183 @@
1
+ import { defineComponent as j, mergeModels as I, ref as v, reactive as C, useModel as E, resolveComponent as r, openBlock as F, createBlock as K, withCtx as l, createElementVNode as O, createVNode as o, createTextVNode as L, toDisplayString as N, unref as m } from "vue";
2
+ import { ElMessage as q } from "element-plus";
3
+ import { useI18n as S } from "vue-i18n";
4
+ import { g as c } from "./index-jTDhsbYM.mjs";
5
+ import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
+ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
7
+ __name: "edit",
8
+ props: /* @__PURE__ */ I({
9
+ entityKey: {
10
+ type: Object,
11
+ default: () => {
12
+ }
13
+ }
14
+ }, {
15
+ modelValue: { type: Boolean },
16
+ modelModifiers: {}
17
+ }),
18
+ emits: /* @__PURE__ */ I(["refresh"], ["update:modelValue"]),
19
+ setup(p, { emit: w }) {
20
+ const { t: u } = S(), b = v();
21
+ let t = C({
22
+ requestId: Math.random() * 10 + "",
23
+ updateMask: "labelName,labelCode,note"
24
+ });
25
+ const k = C({
26
+ labelName: [
27
+ {
28
+ required: !0,
29
+ message: u("goodsLabelInfo.labelNameRequired"),
30
+ trigger: "change"
31
+ }
32
+ ],
33
+ labelCode: [
34
+ {
35
+ required: !0,
36
+ message: u("goodsLabelInfo.labelCodeRequired"),
37
+ trigger: "change"
38
+ }
39
+ ],
40
+ note: [
41
+ {
42
+ required: !0,
43
+ message: u("goodsLabelInfo.noteRequired"),
44
+ trigger: "change"
45
+ }
46
+ ]
47
+ }), d = E(p, "modelValue"), g = p, _ = w, R = Object.keys(g.entityKey), y = v(R.length >= 1);
48
+ y.value && c.findById(g.entityKey).then(({ data: e }) => {
49
+ Object.assign(t, e);
50
+ });
51
+ const $ = async () => {
52
+ var e;
53
+ await ((e = b.value) == null ? void 0 : e.validate((n) => {
54
+ n && (y.value ? c.update(t).then((a) => {
55
+ console.log(a), a.status === 200 && (q({
56
+ message: u("common.submitSuccess"),
57
+ type: "success"
58
+ }), d.value && (d.value = !1), _("refresh", a.status === 200));
59
+ }) : c.create(t).then((a) => {
60
+ console.log(a), a.status === 200 && (q({
61
+ message: u("common.submitSuccess"),
62
+ type: "success"
63
+ }), d.value && (d.value = !1), _("refresh", a.status === 200));
64
+ }));
65
+ }));
66
+ };
67
+ function V() {
68
+ d.value && (d.value = !1);
69
+ }
70
+ return (e, n) => {
71
+ const a = r("el-input"), i = r("el-form-item"), f = r("el-col"), M = r("el-row"), B = r("el-form"), h = r("el-button"), U = r("el-dialog");
72
+ return F(), K(U, {
73
+ modelValue: d.value,
74
+ "onUpdate:modelValue": n[3] || (n[3] = (s) => d.value = s),
75
+ onClose: V
76
+ }, {
77
+ footer: l(() => [
78
+ O("div", x, [
79
+ o(h, { onClick: V }, {
80
+ default: l(() => [
81
+ L(N(e.$t("common.cancel")), 1)
82
+ ]),
83
+ _: 1
84
+ }),
85
+ o(h, {
86
+ type: "primary",
87
+ onClick: $
88
+ }, {
89
+ default: l(() => [
90
+ L(N(e.$t("common.confirm")), 1)
91
+ ]),
92
+ _: 1
93
+ })
94
+ ])
95
+ ]),
96
+ default: l(() => [
97
+ o(B, {
98
+ ref_key: "goodsLabelInfoFormRef",
99
+ ref: b,
100
+ model: m(t),
101
+ "label-width": "120px",
102
+ rules: k
103
+ }, {
104
+ default: l(() => [
105
+ o(M, null, {
106
+ default: l(() => [
107
+ o(f, { span: 24 }, {
108
+ default: l(() => [
109
+ o(i, {
110
+ label: e.$t("goodsLabelInfo.labelName"),
111
+ prop: "labelName"
112
+ }, {
113
+ default: l(() => [
114
+ o(a, {
115
+ modelValue: m(t).labelName,
116
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => m(t).labelName = s),
117
+ placeholder: e.$t("goodsLabelInfo.labelNameRequired"),
118
+ maxlength: "30",
119
+ "show-word-limit": "",
120
+ clearable: ""
121
+ }, null, 8, ["modelValue", "placeholder"])
122
+ ]),
123
+ _: 1
124
+ }, 8, ["label"])
125
+ ]),
126
+ _: 1
127
+ }),
128
+ o(f, { span: 24 }, {
129
+ default: l(() => [
130
+ o(i, {
131
+ label: e.$t("goodsLabelInfo.labelCode"),
132
+ prop: "labelCode"
133
+ }, {
134
+ default: l(() => [
135
+ o(a, {
136
+ modelValue: m(t).labelCode,
137
+ "onUpdate:modelValue": n[1] || (n[1] = (s) => m(t).labelCode = s),
138
+ placeholder: e.$t("goodsLabelInfo.labelCodeRequired"),
139
+ maxlength: "30",
140
+ "show-word-limit": "",
141
+ clearable: ""
142
+ }, null, 8, ["modelValue", "placeholder"])
143
+ ]),
144
+ _: 1
145
+ }, 8, ["label"])
146
+ ]),
147
+ _: 1
148
+ }),
149
+ o(f, { span: 24 }, {
150
+ default: l(() => [
151
+ o(i, {
152
+ label: e.$t("goodsLabelInfo.note"),
153
+ prop: "note"
154
+ }, {
155
+ default: l(() => [
156
+ o(a, {
157
+ modelValue: m(t).note,
158
+ "onUpdate:modelValue": n[2] || (n[2] = (s) => m(t).note = s),
159
+ placeholder: e.$t("goodsLabelInfo.noteRequired"),
160
+ clearable: "",
161
+ type: "textarea"
162
+ }, null, 8, ["modelValue", "placeholder"])
163
+ ]),
164
+ _: 1
165
+ }, 8, ["label"])
166
+ ]),
167
+ _: 1
168
+ })
169
+ ]),
170
+ _: 1
171
+ })
172
+ ]),
173
+ _: 1
174
+ }, 8, ["model", "rules"])
175
+ ]),
176
+ _: 1
177
+ }, 8, ["modelValue"]);
178
+ };
179
+ }
180
+ }), P = /* @__PURE__ */ D(A, [["__scopeId", "data-v-7e1c2961"]]);
181
+ export {
182
+ P as default
183
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-BHplO2tN.mjs";
1
+ import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,186 @@
1
+ import { defineComponent as E, mergeModels as B, ref as V, reactive as N, useModel as F, resolveComponent as d, openBlock as K, createBlock as O, withCtx as l, createElementVNode as x, createVNode as o, createTextVNode as U, toDisplayString as w, unref as s } from "vue";
2
+ import { ElMessage as q } from "element-plus";
3
+ import { useI18n as A } from "vue-i18n";
4
+ import { g as f } from "./index-r0u-27m7.mjs";
5
+ import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
+ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
7
+ __name: "edit",
8
+ props: /* @__PURE__ */ B({
9
+ entityKey: {
10
+ type: Object,
11
+ default: () => {
12
+ }
13
+ }
14
+ }, {
15
+ modelValue: { type: Boolean },
16
+ modelModifiers: {}
17
+ }),
18
+ emits: /* @__PURE__ */ B(["refresh"], ["update:modelValue"]),
19
+ setup(p, { emit: k }) {
20
+ const g = V(), { t: i } = A();
21
+ let t = N({
22
+ requestId: Math.random() * 10 + "",
23
+ updateMask: "brandName,logoUrl,description"
24
+ });
25
+ const R = N({
26
+ brandName: [
27
+ {
28
+ required: !0,
29
+ message: i("goodsBrandInfo.brandNameRequired"),
30
+ trigger: "change"
31
+ }
32
+ ],
33
+ logoUrl: [
34
+ {
35
+ required: !0,
36
+ message: i("goodsBrandInfo.logoUrlRequired"),
37
+ trigger: "change"
38
+ }
39
+ ],
40
+ description: [
41
+ {
42
+ required: !0,
43
+ message: i("goodsBrandInfo.descriptionRequired"),
44
+ trigger: "change"
45
+ }
46
+ ]
47
+ }), n = F(p, "modelValue"), _ = p;
48
+ function $(e) {
49
+ t.logoUrl = e;
50
+ }
51
+ const b = k, C = Object.keys(_.entityKey), y = V(C.length >= 1);
52
+ y.value && f.findById(_.entityKey).then(({ data: e }) => {
53
+ Object.assign(t, e);
54
+ });
55
+ const M = async () => {
56
+ var e;
57
+ await ((e = g.value) == null ? void 0 : e.validate((r) => {
58
+ r && (y.value ? f.update(t).then((a) => {
59
+ console.log(a), a.status === 200 && (q({
60
+ message: i("common.submitSuccess"),
61
+ type: "success"
62
+ }), n.value && (n.value = !1), b("refresh", a.status === 200));
63
+ }) : f.create(t).then((a) => {
64
+ console.log(a), a.status === 200 && (q({
65
+ message: i("common.submitSuccess"),
66
+ type: "success"
67
+ }), n.value && (n.value = !1), b("refresh", a.status === 200));
68
+ }));
69
+ }));
70
+ };
71
+ function h() {
72
+ n.value && (n.value = !1);
73
+ }
74
+ return (e, r) => {
75
+ const a = d("jmash-single-image-upload"), u = d("el-form-item"), c = d("el-col"), I = d("el-input"), j = d("el-row"), S = d("el-form"), v = d("el-button"), D = d("el-dialog");
76
+ return K(), O(D, {
77
+ modelValue: n.value,
78
+ "onUpdate:modelValue": r[2] || (r[2] = (m) => n.value = m),
79
+ onClose: h
80
+ }, {
81
+ footer: l(() => [
82
+ x("div", z, [
83
+ o(v, { onClick: h }, {
84
+ default: l(() => [
85
+ U(w(e.$t("common.cancel")), 1)
86
+ ]),
87
+ _: 1
88
+ }),
89
+ o(v, {
90
+ type: "primary",
91
+ onClick: M
92
+ }, {
93
+ default: l(() => [
94
+ U(w(e.$t("common.confirm")), 1)
95
+ ]),
96
+ _: 1
97
+ })
98
+ ])
99
+ ]),
100
+ default: l(() => [
101
+ o(S, {
102
+ ref_key: "goodsBrandInfoFormRef",
103
+ ref: g,
104
+ model: s(t),
105
+ "label-width": "120px",
106
+ rules: R
107
+ }, {
108
+ default: l(() => [
109
+ o(j, null, {
110
+ default: l(() => [
111
+ o(c, { span: 24 }, {
112
+ default: l(() => [
113
+ o(u, {
114
+ label: e.$t("goodsBrandInfo.logoUrl"),
115
+ prop: "logoUrl"
116
+ }, {
117
+ default: l(() => [
118
+ o(a, {
119
+ "picture-url": s(t).logoUrl,
120
+ onImageSrc: $,
121
+ width: 80,
122
+ type: "trans"
123
+ }, null, 8, ["picture-url"])
124
+ ]),
125
+ _: 1
126
+ }, 8, ["label"])
127
+ ]),
128
+ _: 1
129
+ }),
130
+ o(c, { span: 24 }, {
131
+ default: l(() => [
132
+ o(u, {
133
+ label: e.$t("goodsBrandInfo.brandName"),
134
+ prop: "brandName"
135
+ }, {
136
+ default: l(() => [
137
+ o(I, {
138
+ modelValue: s(t).brandName,
139
+ "onUpdate:modelValue": r[0] || (r[0] = (m) => s(t).brandName = m),
140
+ placeholder: e.$t("goodsBrandInfo.brandNameRequired"),
141
+ maxlength: "30",
142
+ "show-word-limit": "",
143
+ clearable: ""
144
+ }, null, 8, ["modelValue", "placeholder"])
145
+ ]),
146
+ _: 1
147
+ }, 8, ["label"])
148
+ ]),
149
+ _: 1
150
+ }),
151
+ o(c, { span: 24 }, {
152
+ default: l(() => [
153
+ o(u, {
154
+ label: e.$t("goodsBrandInfo.description"),
155
+ prop: "description"
156
+ }, {
157
+ default: l(() => [
158
+ o(I, {
159
+ modelValue: s(t).description,
160
+ "onUpdate:modelValue": r[1] || (r[1] = (m) => s(t).description = m),
161
+ type: "textarea",
162
+ placeholder: e.$t("goodsBrandInfo.descriptionRequired"),
163
+ "show-word-limit": "",
164
+ clearable: ""
165
+ }, null, 8, ["modelValue", "placeholder"])
166
+ ]),
167
+ _: 1
168
+ }, 8, ["label"])
169
+ ]),
170
+ _: 1
171
+ })
172
+ ]),
173
+ _: 1
174
+ })
175
+ ]),
176
+ _: 1
177
+ }, 8, ["model", "rules"])
178
+ ]),
179
+ _: 1
180
+ }, 8, ["modelValue"]);
181
+ };
182
+ }
183
+ }), W = /* @__PURE__ */ T(G, [["__scopeId", "data-v-90ddc8d1"]]);
184
+ export {
185
+ W as default
186
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as F, mergeModels as V, ref as h, reactive as v, useModel as O, onMounted as E, resolveComponent as n, openBlock as A, createBlock as T, withCtx as l, createElementVNode as G, createVNode as e, createTextVNode as w, toDisplayString as I, unref as r } from "vue";
2
2
  import { ElMessage as U } from "element-plus";
3
3
  import { useI18n as H } from "vue-i18n";
4
- import { D as q, g as N } from "./index-CmKF2zdn.mjs";
4
+ import { D as q, g as N } from "./index-D3w33Nba.mjs";
5
5
  const J = { class: "dialog-footer" }, Y = /* @__PURE__ */ F({
6
6
  __name: "edit",
7
7
  props: /* @__PURE__ */ V({
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./goodsList.vue_vue_type_script_setup_true_lang-Cd7-ryQA.mjs";
1
+ import { _ as f } from "./goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs";
2
2
  export {
3
3
  f as default
4
4
  };