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
@@ -0,0 +1,40 @@
1
+ import { type PropType } from "vue";
2
+ import type { GoodsSkuCreateReq, SkuSpecValueModel } from "@/api/goods-spu/types";
3
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
4
+ specData: {
5
+ type: PropType<SkuSpecValueModel[]>;
6
+ default(): never[];
7
+ };
8
+ goodsSku: {
9
+ type: PropType<GoodsSkuCreateReq[]>;
10
+ default(): never[];
11
+ };
12
+ isSettingShow: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ getGoodsSku: (...args: any[]) => void;
18
+ getFormData: (...args: any[]) => void;
19
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
20
+ specData: {
21
+ type: PropType<SkuSpecValueModel[]>;
22
+ default(): never[];
23
+ };
24
+ goodsSku: {
25
+ type: PropType<GoodsSkuCreateReq[]>;
26
+ default(): never[];
27
+ };
28
+ isSettingShow: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ };
32
+ }>> & Readonly<{
33
+ onGetGoodsSku?: ((...args: any[]) => any) | undefined;
34
+ onGetFormData?: ((...args: any[]) => any) | undefined;
35
+ }>, {
36
+ specData: SkuSpecValueModel[];
37
+ goodsSku: GoodsSkuCreateReq[];
38
+ isSettingShow: boolean;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
40
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { AxiosPromise } from "axios";
2
+ import type { BranchApi, BranchReq, BranchModel, BranchPage, BranchList, BranchKey, BranchCreateReq, BranchUpdateReq } from "./types";
3
+ declare class BranchApiImpl implements BranchApi {
4
+ getKey(model: BranchModel): BranchKey;
5
+ findPage(query?: BranchReq): AxiosPromise<BranchPage>;
6
+ findList(query?: BranchReq): AxiosPromise<BranchList>;
7
+ findById(query: BranchKey): AxiosPromise<BranchModel>;
8
+ create(data: BranchCreateReq): AxiosPromise<BranchModel>;
9
+ update(data: BranchUpdateReq): AxiosPromise<BranchModel>;
10
+ delete(query: BranchKey): AxiosPromise<BranchModel>;
11
+ batchDelete(keys: BranchKey[]): AxiosPromise<number>;
12
+ }
13
+ declare const branchApi: BranchApiImpl;
14
+ export { branchApi };
@@ -0,0 +1,76 @@
1
+ import type { EntityApi, EntityReq, EntityModel, EntityList, EntityPage, EntityTotal, EntityKey, EntityKeyList, EntityCreateReq, EntityUpdateReq } from "jmash-core";
2
+ export interface BranchApi extends EntityApi {
3
+ }
4
+ export interface BranchReq extends EntityReq {
5
+ likeFacadeName?: string;
6
+ shopId?: string;
7
+ isHq?: boolean;
8
+ hasIsHq?: boolean;
9
+ }
10
+ export interface BranchModel extends EntityModel {
11
+ branchId?: string;
12
+ facadeName?: string;
13
+ picUrl?: string;
14
+ note?: string;
15
+ contacts?: string;
16
+ mobileEncrypt?: boolean;
17
+ businessStartHour?: string;
18
+ businessEndHour?: string;
19
+ shopId?: string;
20
+ address?: string;
21
+ }
22
+ export interface BranchList extends EntityList {
23
+ results: Array<BranchModel>;
24
+ }
25
+ export interface BranchPage extends EntityPage {
26
+ results: Array<BranchModel>;
27
+ subTotalDto: BranchModelTotal;
28
+ totalDto: BranchModelTotal;
29
+ }
30
+ export interface BranchModelTotal extends EntityTotal {
31
+ totalSize: number;
32
+ }
33
+ export interface BranchKey extends EntityKey {
34
+ tenant?: string;
35
+ branchId?: string;
36
+ }
37
+ export interface BranchKeyList extends EntityKeyList {
38
+ tenant?: string;
39
+ branchId?: Array<string>;
40
+ }
41
+ export interface BranchCreateReq extends EntityCreateReq {
42
+ shopId?: string;
43
+ facadeName?: string;
44
+ picUrl?: string;
45
+ note?: string;
46
+ regionCode?: string;
47
+ address?: string;
48
+ contacts?: string;
49
+ mobilePhone?: string;
50
+ businessHoursRange?: string;
51
+ businessStartHour?: string;
52
+ businessEndHour?: string;
53
+ longitude?: string;
54
+ latitude?: string;
55
+ isHq?: boolean;
56
+ createAdmin?: boolean;
57
+ }
58
+ export interface BranchUpdateReq extends EntityUpdateReq {
59
+ branchId?: string;
60
+ shopId?: string;
61
+ facadeName?: string;
62
+ contacts?: string;
63
+ mobilePhone?: string;
64
+ picUrl?: string;
65
+ regionCode?: string;
66
+ address?: string;
67
+ longitude?: string;
68
+ latitude?: string;
69
+ note?: string;
70
+ businessHoursRange?: string;
71
+ businessStartHour?: string;
72
+ businessEndHour?: string;
73
+ isHq?: boolean;
74
+ createAdmin?: boolean;
75
+ }
76
+ export type BranchFormReq = BranchCreateReq | BranchUpdateReq;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-goods",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/index.d.ts",
@@ -21,9 +21,9 @@
21
21
  "peerDependencies": {
22
22
  "axios": "^1.9.0",
23
23
  "element-plus": "^2.9.10",
24
- "jmash-core": "^0.1.7",
25
- "jmash-dict": "^0.1.2",
26
- "jmash-rbac": "^0.1.17",
24
+ "jmash-core": "^0.1.36",
25
+ "jmash-dict": "^0.1.5",
26
+ "jmash-rbac": "^0.1.24",
27
27
  "pinia": "^2.3.1",
28
28
  "vue": "^3.5.13",
29
29
  "vue-i18n": "^9.14.1",
@@ -1,10 +0,0 @@
1
- import { createElementBlock as o, openBlock as c } from "vue";
2
- import { _ as s } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
- const t = {}, e = { class: "container" };
4
- function r(n, i) {
5
- return c(), o("div", e, "GoodsLogisticsForm");
6
- }
7
- const m = /* @__PURE__ */ s(t, [["render", r]]);
8
- export {
9
- m as default
10
- };
@@ -1,140 +0,0 @@
1
- import { defineComponent as G, reactive as _, ref as I, resolveComponent as n, createBlock as v, openBlock as k, unref as o, withCtx as s, createVNode as e, createTextVNode as w } from "vue";
2
- import { useI18n as C } from "vue-i18n";
3
- import { useRoute as N, useRouter as O } from "vue-router";
4
- import { D as i, C as U } from "./index-Df-F10aZ.mjs";
5
- import { useUserStore as h, clearEmpty as A, request as R, routerUtil as q } from "jmash-core";
6
- import { a as F } from "./index-CRfiEzkA.mjs";
7
- import { E as L } from "./el-message-BB2-39XJ.mjs";
8
- class j {
9
- // A设置商品规格与定价信息
10
- create(u) {
11
- return u.tenant = h().user.tenant, A(u), R({
12
- url: "/v1/goods/goods_spec",
13
- method: "patch",
14
- data: u
15
- });
16
- }
17
- }
18
- const B = new j(), K = /* @__PURE__ */ G({
19
- __name: "GoodsSpecForm",
20
- emits: ["submit"],
21
- setup(y, { emit: u }) {
22
- i.presaleTypeEnum.useEnumValues();
23
- const { t: P } = C(), d = N(), b = O();
24
- let l = _({
25
- requestId: Math.random() * 10 + "",
26
- updateMask: "presaleType,isPointsGift,isPointsDeduct,purchaseLimit,balancePaymentType,balancePaymentDays,balancePaymentDate,specType,specId,skiSpecValues",
27
- isPointsGift: !1,
28
- isPointsDeduct: !1,
29
- purchaseLimit: 0,
30
- spuId: "",
31
- presaleType: U.GOODS_PRESALE_TYPE_VALUES.NONE
32
- });
33
- d.query.spuId && F.findById({ spuId: d.query.spuId }).then(({ data: a }) => {
34
- Object.assign(l, a);
35
- });
36
- const S = _({}), f = I(), V = u;
37
- function g() {
38
- var a;
39
- V("submit", {}), (a = f.value) == null || a.validate((t) => {
40
- t && B.create(l).then((r) => {
41
- r.status === 200 && (L({
42
- message: P("common.submitSuccess"),
43
- type: "success"
44
- }), q.closeTagView(d.fullPath, b, !1));
45
- });
46
- });
47
- }
48
- return (a, t) => {
49
- const r = n("jmash-enum-radio"), m = n("el-form-item"), c = n("el-col"), E = n("el-row"), T = n("el-button"), D = n("el-form");
50
- return k(), v(D, {
51
- ref_key: "goodsSpecFormRef",
52
- ref: f,
53
- model: o(l),
54
- "label-width": "130px",
55
- rules: S
56
- }, {
57
- default: s(() => [
58
- e(E, null, {
59
- default: s(() => [
60
- e(c, { span: 12 }, {
61
- default: s(() => [
62
- e(m, {
63
- label: a.$t("goodsSpu.presaleType"),
64
- prop: "presaleType"
65
- }, {
66
- default: s(() => [
67
- e(r, {
68
- modelValue: o(l).presaleType,
69
- "onUpdate:modelValue": t[0] || (t[0] = (p) => o(l).presaleType = p),
70
- data: o(i).presaleTypeEnum.values
71
- }, null, 8, ["modelValue", "data"])
72
- ]),
73
- _: 1
74
- }, 8, ["label"])
75
- ]),
76
- _: 1
77
- }),
78
- e(c, { span: 12 }, {
79
- default: s(() => [
80
- e(m, {
81
- label: a.$t("goodsSpu.isPointsGift"),
82
- prop: "isPointsGift"
83
- }, {
84
- default: s(() => [
85
- e(r, {
86
- modelValue: o(l).isPointsGift,
87
- "onUpdate:modelValue": t[1] || (t[1] = (p) => o(l).isPointsGift = p),
88
- data: o(i).yesOrNoEnum.values
89
- }, null, 8, ["modelValue", "data"])
90
- ]),
91
- _: 1
92
- }, 8, ["label"])
93
- ]),
94
- _: 1
95
- }),
96
- e(c, { span: 12 }, {
97
- default: s(() => [
98
- e(m, {
99
- label: a.$t("goodsSpu.isPointsDeduct"),
100
- prop: "isPointsDeduct"
101
- }, {
102
- default: s(() => [
103
- e(r, {
104
- modelValue: o(l).isPointsDeduct,
105
- "onUpdate:modelValue": t[2] || (t[2] = (p) => o(l).isPointsDeduct = p),
106
- data: o(i).yesOrNoEnum.values
107
- }, null, 8, ["modelValue", "data"])
108
- ]),
109
- _: 1
110
- }, 8, ["label"])
111
- ]),
112
- _: 1
113
- })
114
- ]),
115
- _: 1
116
- }),
117
- e(m, null, {
118
- default: s(() => [
119
- e(T, {
120
- type: "primary",
121
- onClick: g
122
- }, {
123
- default: s(() => t[3] || (t[3] = [
124
- w("保存", -1)
125
- ])),
126
- _: 1,
127
- __: [3]
128
- })
129
- ]),
130
- _: 1
131
- })
132
- ]),
133
- _: 1
134
- }, 8, ["model", "rules"]);
135
- };
136
- }
137
- });
138
- export {
139
- K as _
140
- };
@@ -1,45 +0,0 @@
1
- import { defineComponent as u, ref as f, computed as b, resolveComponent as l, createElementBlock as r, openBlock as n, createVNode as k, unref as s, isRef as v, withCtx as C, Fragment as B, renderList as y, createBlock as F } from "vue";
2
- import { C as m } from "./index-Df-F10aZ.mjs";
3
- import { _ as V } from "./GoodsBaseForm.vue_vue_type_script_setup_true_lang-BmIR352P.mjs";
4
- import { _ as x } from "./GoodsSpecForm.vue_vue_type_script_setup_true_lang-BTFKRiNW.mjs";
5
- import A from "./GoodsLogisticsForm-CHyQ99Mt.mjs";
6
- const E = { class: "app-container" }, L = /* @__PURE__ */ u({
7
- __name: "edit copy 2",
8
- setup(G) {
9
- const e = f(m.TAB_ENUM[0].key), c = {
10
- GoodsBaseForm: V,
11
- GoodsSpecForm: x,
12
- GoodsLogisticsForm: A
13
- };
14
- b(
15
- () => c[e.value]
16
- );
17
- function p(a, t) {
18
- e.value = a.props.name;
19
- }
20
- return (a, t) => {
21
- const _ = l("el-tab-pane"), i = l("el-tabs");
22
- return n(), r("div", E, [
23
- k(i, {
24
- type: "border-card",
25
- modelValue: s(e),
26
- "onUpdate:modelValue": t[0] || (t[0] = (o) => v(e) ? e.value = o : null),
27
- class: "demo-tabs",
28
- onTabClick: p
29
- }, {
30
- default: C(() => [
31
- (n(!0), r(B, null, y(s(m).TAB_ENUM, (o, d) => (n(), F(_, {
32
- key: d,
33
- label: o.value,
34
- name: o.key
35
- }, null, 8, ["label", "name"]))), 128))
36
- ]),
37
- _: 1
38
- }, 8, ["modelValue"])
39
- ]);
40
- };
41
- }
42
- });
43
- export {
44
- L as default
45
- };
@@ -1,264 +0,0 @@
1
- var p = Object.defineProperty;
2
- var h = (u, t, a) => t in u ? p(u, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : u[t] = a;
3
- var s = (u, t, a) => h(u, typeof t != "symbol" ? t + "" : t, a);
4
- import { BizDict as S, BizLayDict as d, EnumDict as c } from "jmash-core";
5
- import { EntryDict as L } from "jmash-dict";
6
- import { ref as E, reactive as O } from "vue";
7
- import { specValueApi as P, infoApi as y, specInfoApi as v } from "xyvcard-shop";
8
- import { g as A, b as D, a as T } from "./index-CRfiEzkA.mjs";
9
- import { g as U } from "./index-BXa-atkT.mjs";
10
- class e {
11
- }
12
- // 模块
13
- s(e, "MODULE_GOODS", "goods"), // 商品规格类型
14
- s(e, "SPEC_TYPE", {
15
- UNIFIED_SPEC: "UNIFIED_SPEC",
16
- //统一规格
17
- MULTI_SPEC: "MULTI_SPEC"
18
- //多规格
19
- }), // 启用禁用
20
- s(e, "SHELF_VALUES", E([
21
- { key: !0, value: "上架" },
22
- { key: !1, value: "下架" }
23
- ])), // 运费类型
24
- s(e, "ENUM_FREIGHT_TYPE", "xyvcard.goods.protobuf.FreightType"), // 保障服务
25
- s(e, "DICT_GOODS_ENSURE", "goods_ensure"), // 规格类型
26
- s(e, "ENUM_SPEC_TYPE", "xyvcard.goods.protobuf.SpecType"), // 商品查询枚举
27
- s(e, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"), s(e, "GOODS_SPU_VALUES", E([
28
- { key: "goods_all", value: "全部商品" },
29
- { key: "goods_sale", value: "已上架" },
30
- { key: "goods_shelf", value: "待上架" },
31
- { key: "goods_audit", value: "审核中" },
32
- { key: "goods_notpass", value: "审核驳回" }
33
- ])), // 审核状态
34
- s(e, "ENUM_APPROVAL_STATUS", "xyvcard.goods.protobuf.ApprovalStatus"), // 审核状态常量
35
- s(e, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(e, "APPROVAL_PASS", "APPROVAL_PASS"), s(e, "APPROVALING", "APPROVALING"), // 启用禁用
36
- s(e, "ENABLE_VALUES", E([
37
- { key: "true", value: "启用" },
38
- { key: "false", value: "禁用" }
39
- ])), // 商品类型
40
- s(e, "GOODS_TYPE", {
41
- NORMAL: "normal",
42
- GROUP: "group"
43
- }), // 商品品类
44
- s(e, "GOODS_SUP_CLASS", "xyvcard.goods.protobuf.SupClass"), // 商品品类.
45
- s(e, "GOODS_SUP_CLASS_VALUES", {
46
- GOODS_TYPE_REAL: "GOODS_TYPE_REAL",
47
- // 实物类商品
48
- GOODS_TYPE_VIRTUAL: "GOODS_TYPE_VIRTUAL",
49
- // 虚拟类商品
50
- GOODS_TYPE_LIFE: "GOODS_TYPE_LIFE"
51
- // 生活服务类
52
- }), // 是或否
53
- s(e, "YES_OR_NO", E([
54
- { key: !0, value: "是" },
55
- { key: !1, value: "否" }
56
- ])), // tab栏
57
- s(e, "TAB_ENUM", O([
58
- { key: "GoodsBaseForm", value: "商品基本信息" },
59
- { key: "GoodsSpecForm", value: "规格与定价" },
60
- { key: "GoodsLogisticsForm", value: "物流设置" }
61
- ])), // 预售类型
62
- s(e, "GOODS_PRESALE_TYPE", "xyvcard.goods.protobuf.PresaleType"), // 预售类型.
63
- s(e, "GOODS_PRESALE_TYPE_VALUES", {
64
- NONE: "NONE",
65
- // 无预售
66
- DEPOSIT: "DEPOSIT",
67
- // 定金预售(不退)
68
- DEPOSIT_RETURN: "DEPOSIT_RETURN"
69
- // 订金预售(可退)
70
- });
71
- function n(u, t, a) {
72
- return !Array.isArray(u) || u.length === 0 ? [] : u.map((r) => {
73
- let i = [];
74
- return Array.isArray(r.children) && r.children.length > 0 && (i = n(r.children, t, a)), {
75
- value: r[a],
76
- label: r[t],
77
- parentId: r.parentId,
78
- children: i
79
- };
80
- });
81
- }
82
- class _ {
83
- constructor(t, a) {
84
- s(this, "values", O([]));
85
- // 查询条件
86
- s(this, "query");
87
- this.values.length = 0, this.values.push(...t.value), this.query = a;
88
- }
89
- // 根据给定键获取业务数据项的值的方法
90
- getValue(t) {
91
- for (const a of this.values)
92
- if (a.key == t)
93
- return a.value;
94
- return "";
95
- }
96
- }
97
- class g extends S {
98
- // 实现 useValues 方法
99
- useValues() {
100
- return new Promise((t, a) => {
101
- y.findList(this.query).then(({ data: o }) => {
102
- const r = o.results;
103
- this.values.length = 0, this.values.push(
104
- ...r.map(
105
- (i) => ({
106
- key: i.shopId,
107
- value: i.shopName
108
- })
109
- )
110
- ), t(this.values);
111
- }).catch(a);
112
- });
113
- }
114
- }
115
- class f extends d {
116
- // 实现 useValues 方法
117
- useValues() {
118
- return new Promise((t, a) => {
119
- A.findTreeListApi(this.query).then(({ data: o }) => {
120
- this.values.length = 0, this.values.push(...n(o.results, "label", "value")), t(this.values);
121
- }).catch(a);
122
- });
123
- }
124
- }
125
- class m extends S {
126
- // 实现 useValues 方法
127
- useValues() {
128
- return new Promise((t, a) => {
129
- v.findList(this.query).then(({ data: o }) => {
130
- const r = o.results;
131
- this.values.length = 0, this.values.push(
132
- ...r.map(
133
- (i) => ({
134
- key: i.specId,
135
- value: i.specName,
136
- disabled: i.disabled
137
- })
138
- )
139
- ), t(this.values);
140
- }).catch(a);
141
- });
142
- }
143
- }
144
- class G extends S {
145
- // 实现 useValues 方法
146
- useValues() {
147
- return new Promise((t, a) => {
148
- P.findList(this.query).then(({ data: o }) => {
149
- const r = o.results;
150
- this.values.length = 0, this.values.push(
151
- ...r.map(
152
- (i) => ({
153
- key: i.specValueId,
154
- value: i.valueName
155
- })
156
- )
157
- ), t(this.values);
158
- }).catch(a);
159
- });
160
- }
161
- }
162
- class I extends S {
163
- // 实现 useValues 方法
164
- useValues() {
165
- return new Promise((t, a) => {
166
- U.findList(this.query).then(({ data: o }) => {
167
- const r = o.results;
168
- this.values.length = 0, this.values.push(
169
- ...r.map(
170
- (i) => ({
171
- key: i.brandId,
172
- value: i.brandName
173
- })
174
- )
175
- ), t(this.values);
176
- }).catch(a);
177
- });
178
- }
179
- }
180
- class N extends S {
181
- // 实现 useValues 方法
182
- useValues() {
183
- return new Promise((t, a) => {
184
- D.findList(this.query).then(({ data: o }) => {
185
- const r = o.results;
186
- this.values.length = 0, this.values.push(
187
- ...r.map(
188
- (i) => ({
189
- key: i.labelId,
190
- value: i.labelName
191
- })
192
- )
193
- ), t(this.values);
194
- }).catch(a);
195
- });
196
- }
197
- }
198
- class V extends S {
199
- // 实现 useValues 方法
200
- useValues() {
201
- return new Promise((t, a) => {
202
- T.findList(this.query).then(({ data: o }) => {
203
- const r = o.results;
204
- this.values.length = 0, this.values.push(
205
- ...r.map(
206
- (i) => ({
207
- key: i.spuId,
208
- value: i.spuName
209
- })
210
- )
211
- ), t(this.values);
212
- }).catch(a);
213
- });
214
- }
215
- }
216
- class l {
217
- }
218
- // 店铺列表
219
- s(l, "shopInfoBizDict", new g({})), // 规格列表
220
- s(l, "specInfoDict", new m({})), // 规格值
221
- s(l, "specValueDict", new G({})), // 上架下架
222
- s(l, "shelfDict", new _(e.SHELF_VALUES, {})), // 运费类型
223
- s(l, "freightTypeEnum", new c(
224
- e.MODULE_GOODS,
225
- e.ENUM_FREIGHT_TYPE
226
- )), // 保障服务
227
- s(l, "goodsEnsureDict", new L(e.DICT_GOODS_ENSURE)), // 规格类型
228
- s(l, "specTypeEnum", new c(
229
- e.MODULE_GOODS,
230
- e.ENUM_SPEC_TYPE
231
- )), // 商品查询枚举
232
- s(l, "goodsSpuListSortEnum", new c(
233
- e.MODULE_GOODS,
234
- e.ENUM_GOODS_SPU_List_SORT
235
- )), s(l, "goodsSpuListSortDict", new _(
236
- e.GOODS_SPU_VALUES,
237
- {}
238
- )), // 审核状态
239
- s(l, "approvalStatusEnum", new c(
240
- e.MODULE_GOODS,
241
- e.ENUM_APPROVAL_STATUS
242
- )), // 启用禁用
243
- s(l, "enableDict", new _(e.ENABLE_VALUES, {})), // 商品分类
244
- s(l, "goodsCategoryListBizLayDict", new f(
245
- {}
246
- )), // 品牌列表
247
- s(l, "brandListBizDict", new I({})), // 标签列表
248
- s(l, "labelListBizDict", new N({})), // 商品列表
249
- s(l, "goodsSpuBizDict", new V({})), // 商品品类
250
- s(l, "goodsSupClassEnum", new c(
251
- e.MODULE_GOODS,
252
- e.GOODS_SUP_CLASS
253
- )), // 是或否
254
- s(l, "yesOrNoEnum", new _(e.YES_OR_NO, {})), // 预售类型
255
- s(l, "presaleTypeEnum", new c(
256
- e.MODULE_GOODS,
257
- e.GOODS_PRESALE_TYPE
258
- ));
259
- export {
260
- e as C,
261
- l as D,
262
- G as S,
263
- m as a
264
- };