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