xyvcard-paper-buyer 0.0.14 → 0.0.16

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,236 +0,0 @@
1
- import { defineComponent as E, mergeModels as v, ref as y, reactive as A, useModel as j, resolveComponent as u, createBlock as F, openBlock as K, withCtx as l, createVNode as e, unref as s, createElementVNode as O, createTextVNode as N, toDisplayString as q } from "vue";
2
- import { ElMessage as w } from "element-plus";
3
- import { JmashRegionTree as S } from "jmash-region";
4
- import { useI18n as T } from "vue-i18n";
5
- import { o as f } from "./index-CIhWvEaK.mjs";
6
- import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
- const J = { class: "dialog-footer" }, z = /* @__PURE__ */ E({
8
- __name: "edit",
9
- props: /* @__PURE__ */ v({
10
- entityKey: {
11
- type: Object,
12
- default: () => {
13
- }
14
- }
15
- }, {
16
- modelValue: { type: Boolean },
17
- modelModifiers: {}
18
- }),
19
- emits: /* @__PURE__ */ v(["refresh"], ["update:modelValue"]),
20
- setup(c, { emit: R }) {
21
- const { t: n } = T(), g = y();
22
- let d = A({
23
- requestId: Math.random() * 10 + "",
24
- updateMask: "note,userName,mobilePhone,provinceName,detailInfo"
25
- });
26
- const I = (r, o, t) => {
27
- o && !/^(((\d{3,4}-)?[0-9]{7,8})|(1(3|4|5|6|7|8|9)\d{9}))$/.test(o) ? t(new Error(n("orderUserAddress.mobilePhoneTrueRequired"))) : t();
28
- }, $ = A({
29
- note: [
30
- {
31
- required: !0,
32
- message: n("orderUserAddress.noteRequired"),
33
- trigger: "change"
34
- }
35
- ],
36
- userName: [
37
- {
38
- required: !0,
39
- message: n("orderUserAddress.userNameRequired"),
40
- trigger: "change"
41
- }
42
- ],
43
- mobilePhone: [
44
- {
45
- required: !0,
46
- validator: I,
47
- trigger: "blur"
48
- }
49
- ],
50
- detailInfo: [
51
- {
52
- required: !0,
53
- message: n("orderUserAddress.detailInfoRequired"),
54
- trigger: "change"
55
- }
56
- ],
57
- provinceName: [
58
- {
59
- required: !0,
60
- message: n("orderUserAddress.provinceNameRequired"),
61
- trigger: "change"
62
- }
63
- ]
64
- }), m = j(c, "modelValue"), b = c, _ = R, P = Object.keys(b.entityKey), h = y(P.length >= 1);
65
- h.value && f.findById(b.entityKey).then(({ data: r }) => {
66
- Object.assign(d, r);
67
- });
68
- const k = async () => {
69
- var r;
70
- await ((r = g.value) == null ? void 0 : r.validate((o) => {
71
- o && (h.value ? f.update(d).then((t) => {
72
- console.log(t), t.status === 200 && (w({
73
- message: n("common.submitSuccess"),
74
- type: "success"
75
- }), m.value && (m.value = !1), _("refresh", t.status === 200));
76
- }) : f.create(d).then((t) => {
77
- console.log(t), t.status === 200 && (w({
78
- message: n("common.submitSuccess"),
79
- type: "success"
80
- }), m.value && (m.value = !1), _("refresh", t.status === 200));
81
- }));
82
- }));
83
- };
84
- function V() {
85
- m.value && (m.value = !1);
86
- }
87
- return (r, o) => {
88
- const t = u("el-input"), i = u("el-form-item"), p = u("el-col"), C = u("el-row"), M = u("el-form"), U = u("el-button"), B = u("el-dialog");
89
- return K(), F(B, {
90
- modelValue: m.value,
91
- "onUpdate:modelValue": o[5] || (o[5] = (a) => m.value = a),
92
- onClose: V
93
- }, {
94
- footer: l(() => [
95
- O("div", J, [
96
- e(U, { onClick: V }, {
97
- default: l(() => [
98
- N(q(r.$t("common.cancel")), 1)
99
- ]),
100
- _: 1
101
- }),
102
- e(U, {
103
- type: "primary",
104
- onClick: k
105
- }, {
106
- default: l(() => [
107
- N(q(r.$t("common.confirm")), 1)
108
- ]),
109
- _: 1
110
- })
111
- ])
112
- ]),
113
- default: l(() => [
114
- e(M, {
115
- ref_key: "orderUserAddressFormRef",
116
- ref: g,
117
- model: s(d),
118
- "label-position": "top",
119
- rules: $
120
- }, {
121
- default: l(() => [
122
- e(C, { gutter: 20 }, {
123
- default: l(() => [
124
- e(p, { span: 24 }, {
125
- default: l(() => [
126
- e(i, {
127
- label: r.$t("orderUserAddress.note"),
128
- prop: "note"
129
- }, {
130
- default: l(() => [
131
- e(t, {
132
- modelValue: s(d).note,
133
- "onUpdate:modelValue": o[0] || (o[0] = (a) => s(d).note = a),
134
- placeholder: r.$t("orderUserAddress.noteRequired"),
135
- "show-word-limit": "",
136
- clearable: ""
137
- }, null, 8, ["modelValue", "placeholder"])
138
- ]),
139
- _: 1
140
- }, 8, ["label"])
141
- ]),
142
- _: 1
143
- }),
144
- e(p, { span: 24 }, {
145
- default: l(() => [
146
- e(i, {
147
- label: r.$t("orderUserAddress.userName"),
148
- prop: "userName"
149
- }, {
150
- default: l(() => [
151
- e(t, {
152
- modelValue: s(d).userName,
153
- "onUpdate:modelValue": o[1] || (o[1] = (a) => s(d).userName = a),
154
- placeholder: r.$t("orderUserAddress.userNameRequired"),
155
- "show-word-limit": "",
156
- clearable: ""
157
- }, null, 8, ["modelValue", "placeholder"])
158
- ]),
159
- _: 1
160
- }, 8, ["label"])
161
- ]),
162
- _: 1
163
- }),
164
- e(p, { span: 24 }, {
165
- default: l(() => [
166
- e(i, {
167
- label: r.$t("orderUserAddress.mobilePhone"),
168
- prop: "mobilePhone"
169
- }, {
170
- default: l(() => [
171
- e(t, {
172
- modelValue: s(d).mobilePhone,
173
- "onUpdate:modelValue": o[2] || (o[2] = (a) => s(d).mobilePhone = a),
174
- placeholder: r.$t("orderUserAddress.mobilePhoneRequired"),
175
- "show-word-limit": "",
176
- clearable: ""
177
- }, null, 8, ["modelValue", "placeholder"])
178
- ]),
179
- _: 1
180
- }, 8, ["label"])
181
- ]),
182
- _: 1
183
- }),
184
- e(p, { span: 24 }, {
185
- default: l(() => [
186
- e(i, {
187
- prop: "provinceName",
188
- label: s(n)("orderUserAddress.detailInfo"),
189
- class: "form-item"
190
- }, {
191
- default: l(() => [
192
- e(s(S), {
193
- modelValue: s(d).provinceName,
194
- "onUpdate:modelValue": o[3] || (o[3] = (a) => s(d).provinceName = a),
195
- placeholder: r.$t("orderUserAddress.provinceNameRequired"),
196
- clearable: ""
197
- }, null, 8, ["modelValue", "placeholder"])
198
- ]),
199
- _: 1
200
- }, 8, ["label"])
201
- ]),
202
- _: 1
203
- }),
204
- e(p, { span: 24 }, {
205
- default: l(() => [
206
- e(i, { prop: "detailInfo" }, {
207
- default: l(() => [
208
- e(t, {
209
- modelValue: s(d).detailInfo,
210
- "onUpdate:modelValue": o[4] || (o[4] = (a) => s(d).detailInfo = a),
211
- placeholder: r.$t("orderUserAddress.detailInfoRequired"),
212
- "show-word-limit": "",
213
- clearable: "",
214
- type: "textarea"
215
- }, null, 8, ["modelValue", "placeholder"])
216
- ]),
217
- _: 1
218
- })
219
- ]),
220
- _: 1
221
- })
222
- ]),
223
- _: 1
224
- })
225
- ]),
226
- _: 1
227
- }, 8, ["model", "rules"])
228
- ]),
229
- _: 1
230
- }, 8, ["modelValue"]);
231
- };
232
- }
233
- }), Y = /* @__PURE__ */ D(z, [["__scopeId", "data-v-f17c5e2b"]]);
234
- export {
235
- Y as default
236
- };
@@ -1,133 +0,0 @@
1
- var P = Object.defineProperty;
2
- var I = (s, t, e) => t in s ? P(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var r = (s, t, e) => I(s, typeof t != "symbol" ? t + "" : t, e);
4
- import { ref as h } from "vue";
5
- import { BizLayDict as l, CustomBizDict as p, EnumDict as v } from "jmash-core";
6
- import { unionOrgApi as n } from "xyvcard-paper-union";
7
- import { EntryDict as T } from "jmash-dict";
8
- class i {
9
- }
10
- //模块
11
- r(i, "PAPER_DICT", "paper"), // 订单状态
12
- r(i, "ENUM_ORDER_STATUS", h([
13
- { key: "unpay", value: "待付款" },
14
- { key: "complete", value: "订阅成功" },
15
- { key: "unpost", value: "完善地址" }
16
- ])), // 订单状态常量
17
- r(i, "UNPAY", "unpay"), r(i, "UNPOST", "unpost"), r(i, "COMPLETE", "complete"), // 支付方式
18
- r(i, "ENUM_PAYMENT_WAY", "xyvcard.order.protobuf.PaymentWay"), // 发票票种
19
- r(i, "LQFP_FPPZ", "Fppz"), // 开票状态
20
- r(i, "INVOICE_STATUS", "xyvcard.order.protobuf.InvoiceStatus"), r(i, "UNINVOICE", "uninvoice"), r(i, "INVOICING", "invoicing"), r(i, "INVOICED", "invoiced"), // 基层工会
21
- r(i, "BASE_UNION", "base"), // 企业
22
- r(i, "GMF_TYPE_ENT", "ent"), // 个人
23
- r(i, "GMF_TYPE_PER", "person"), // 证件类型
24
- r(i, "DICT_TYPE_ID", "TypeID"), // 抬头类型
25
- r(i, "GMF_TYPE_VALUES", h([
26
- { key: "ent", value: "企业" },
27
- { key: "person", value: "个人" }
28
- ]));
29
- class d extends l {
30
- // 实现 useValues 方法
31
- useValues() {
32
- return new Promise((t, e) => {
33
- if (typeof n.findList > "u") {
34
- t(this.values);
35
- return;
36
- }
37
- n.findList(this.query).then(({ data: u }) => {
38
- const o = u.results;
39
- this.values.length = 0, this.values.push(...this.convertToLayEntryArray(o)), t(this.values);
40
- }).catch(e);
41
- });
42
- }
43
- convertToLayEntryArray(t) {
44
- return t.map((e) => ({
45
- value: e.orgId,
46
- label: e.orgName,
47
- parentId: e.parentId || "",
48
- disabled: !e.status,
49
- children: e.children ? this.convertToLayEntryArray(e.children) : []
50
- }));
51
- }
52
- }
53
- class y extends l {
54
- // 实现 useValues 方法
55
- useValues() {
56
- return new Promise((t, e) => {
57
- if (typeof n.findList > "u") {
58
- t(this.values);
59
- return;
60
- }
61
- const u = {
62
- ...this.query,
63
- orgType: i.BASE_UNION
64
- };
65
- n.findList(u).then(({ data: o }) => {
66
- const c = o.results;
67
- this.values.length = 0, this.values.push(...this.convertToLayEntryArray(c)), t(this.values);
68
- }).catch(e);
69
- });
70
- }
71
- convertToLayEntryArray(t) {
72
- return t.filter(
73
- (e) => e.orgId !== void 0 && e.chargePersonMobile !== void 0
74
- ).map((e) => ({
75
- value: e.orgId,
76
- label: e.chargePersonMobile,
77
- parentId: e.parentId || "",
78
- children: e.children ? this.convertToLayEntryArray(e.children) : []
79
- }));
80
- }
81
- }
82
- class m extends l {
83
- // 实现 useValues 方法
84
- useValues() {
85
- return new Promise((t, e) => {
86
- if (typeof n.findList > "u") {
87
- t(this.values);
88
- return;
89
- }
90
- const u = {
91
- ...this.query,
92
- orgType: i.BASE_UNION
93
- };
94
- n.findList(u).then(({ data: o }) => {
95
- const c = o.results;
96
- this.values.length = 0, this.values.push(...this.convertToLayEntryArray(c)), t(this.values);
97
- }).catch(e);
98
- });
99
- }
100
- convertToLayEntryArray(t) {
101
- return t.filter(
102
- (e) => e.orgId !== void 0 && e.chargePersonMobile !== void 0
103
- ).map((e) => ({
104
- value: e.orgId,
105
- label: e.chargePersonMobileIns,
106
- parentId: e.parentId || "",
107
- children: e.children ? this.convertToLayEntryArray(e.children) : []
108
- }));
109
- }
110
- }
111
- class a {
112
- }
113
- // 订单状态
114
- r(a, "orderStatusEnum", new p(
115
- i.ENUM_ORDER_STATUS,
116
- {}
117
- )), // 支付方式
118
- r(a, "paymentWayEnum", new v(
119
- i.PAPER_DICT,
120
- i.ENUM_PAYMENT_WAY
121
- )), // 所属工会
122
- r(a, "unionOrgBizLayDict", new d({})), r(a, "unionOrgPhoneBizLayDict", new y({})), r(a, "unionOrgPhoneInsBizLayDict", new m(
123
- {}
124
- )), // 发票票种
125
- r(a, "fppzDict", new T(i.LQFP_FPPZ)), // 开票状态
126
- r(a, "invoiceStatusEnum", new v(
127
- i.PAPER_DICT,
128
- i.INVOICE_STATUS
129
- )), r(a, "gmfTypeDict", new p(i.GMF_TYPE_VALUES, {}));
130
- export {
131
- i as C,
132
- a as D
133
- };