xyvcard-paper-buyer 0.0.59 → 0.0.60

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.
@@ -5,7 +5,7 @@ import { routerUtil as D } from "jmash-core";
5
5
  import { useRouter as Q, useRoute as W } from "vue-router";
6
6
  import { D as U } from "./index-BsMxZHKS.mjs";
7
7
  import { _ as X, u as Y } from "./userInvoice.vue_vue_type_script_setup_true_lang-CM1wsRXx.mjs";
8
- import { o as Z } from "./index-C-g3Ei_P.mjs";
8
+ import { o as Z } from "./index-DvqcVtci.mjs";
9
9
  import { E as x } from "./el-message-VSzNakoG.mjs";
10
10
  import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
11
11
  const le = { class: "app-container" }, oe = { class: "search-container" }, te = { class: "form-footer" }, ae = /* @__PURE__ */ J({
@@ -0,0 +1,247 @@
1
+ import { defineComponent as O, mergeModels as N, ref as V, reactive as A, useModel as j, resolveComponent as m, createBlock as F, openBlock as K, withCtx as t, createVNode as r, unref as a, createElementVNode as S, createTextVNode as q, toDisplayString as v } from "vue";
2
+ import { ElMessage as w } from "element-plus";
3
+ import { JmashRegionCascader2 as D } from "jmash-region";
4
+ import { useI18n as T } from "vue-i18n";
5
+ import { o as f } from "./index-BP8zUjOw.mjs";
6
+ import { validatePhoneOrLandline as J } from "jmash-core";
7
+ import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
+ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ O({
9
+ __name: "edit",
10
+ props: /* @__PURE__ */ N({
11
+ entityKey: {
12
+ type: Object,
13
+ default: () => {
14
+ }
15
+ }
16
+ }, {
17
+ modelValue: { type: Boolean },
18
+ modelModifiers: {}
19
+ }),
20
+ emits: /* @__PURE__ */ N(["refresh"], ["update:modelValue"]),
21
+ setup(c, { emit: R }) {
22
+ const { t: n } = T(), g = V();
23
+ let o = A({
24
+ requestId: Math.random() * 10 + "",
25
+ updateMask: "note,userName,mobilePhone,areaCode,provinceName,cityName,countyName,detailInfo"
26
+ });
27
+ const C = (e, l, d) => {
28
+ l && (J(l) || d(new Error(n("orderUserAddress.mobilePhoneTrueRequired")))), d();
29
+ }, I = A({
30
+ note: [
31
+ {
32
+ required: !0,
33
+ message: n("orderUserAddress.noteRequired"),
34
+ trigger: "change"
35
+ }
36
+ ],
37
+ userName: [
38
+ {
39
+ required: !0,
40
+ message: n("orderUserAddress.userNameRequired"),
41
+ trigger: "change"
42
+ }
43
+ ],
44
+ mobilePhone: [
45
+ {
46
+ validator: C,
47
+ trigger: "blur"
48
+ },
49
+ {
50
+ required: !0,
51
+ message: n("orderUserAddress.mobilePhoneRequired"),
52
+ trigger: "change"
53
+ }
54
+ ],
55
+ detailInfo: [
56
+ {
57
+ required: !0,
58
+ message: n("orderUserAddress.detailInfoRequired"),
59
+ trigger: "change"
60
+ }
61
+ ],
62
+ provinceName: [
63
+ {
64
+ required: !0,
65
+ message: n("orderUserAddress.provinceNameRequired"),
66
+ trigger: "change"
67
+ }
68
+ ]
69
+ }), i = j(c, "modelValue"), h = c, b = R, P = Object.keys(h.entityKey), y = V(P.length >= 1);
70
+ y.value && f.findById(h.entityKey).then(({ data: e }) => {
71
+ Object.assign(o, e);
72
+ });
73
+ function $(e) {
74
+ e ? (o.provinceName = e.length > 0 ? e[0] : "", o.cityName = e.length > 1 ? e[1] : "", o.countyName = (e.length > 2 ? e[2] : "") + (e.length > 3 ? e[3] : "") + (e.length > 4 ? e[4] : "")) : (o.provinceName = "", o.cityName = "", o.countyName = "");
75
+ }
76
+ const k = async () => {
77
+ var e;
78
+ await ((e = g.value) == null ? void 0 : e.validate((l) => {
79
+ l && (y.value ? (console.log(o), f.update(o).then((d) => {
80
+ d.status === 200 && (w({
81
+ message: n("common.submitSuccess"),
82
+ type: "success"
83
+ }), i.value && (i.value = !1), b("refresh", d.status === 200));
84
+ })) : f.create(o).then((d) => {
85
+ d.status === 200 && (w({
86
+ message: n("common.submitSuccess"),
87
+ type: "success"
88
+ }), i.value && (i.value = !1), b("refresh", d.status === 200));
89
+ }));
90
+ }));
91
+ };
92
+ function _() {
93
+ i.value && (i.value = !1);
94
+ }
95
+ return (e, l) => {
96
+ const d = m("el-input"), u = m("el-form-item"), p = m("el-col"), M = m("el-row"), B = m("el-form"), U = m("el-button"), E = m("el-dialog");
97
+ return K(), F(E, {
98
+ modelValue: i.value,
99
+ "onUpdate:modelValue": l[5] || (l[5] = (s) => i.value = s),
100
+ onClose: _
101
+ }, {
102
+ footer: t(() => [
103
+ S("div", z, [
104
+ r(U, { onClick: _ }, {
105
+ default: t(() => [
106
+ q(v(e.$t("common.cancel")), 1)
107
+ ]),
108
+ _: 1
109
+ }),
110
+ r(U, {
111
+ type: "primary",
112
+ onClick: k
113
+ }, {
114
+ default: t(() => [
115
+ q(v(e.$t("common.confirm")), 1)
116
+ ]),
117
+ _: 1
118
+ })
119
+ ])
120
+ ]),
121
+ default: t(() => [
122
+ r(B, {
123
+ ref_key: "orderUserAddressFormRef",
124
+ ref: g,
125
+ model: a(o),
126
+ "label-position": "top",
127
+ rules: I
128
+ }, {
129
+ default: t(() => [
130
+ r(M, { gutter: 20 }, {
131
+ default: t(() => [
132
+ r(p, { span: 24 }, {
133
+ default: t(() => [
134
+ r(u, {
135
+ label: e.$t("orderUserAddress.note"),
136
+ prop: "note"
137
+ }, {
138
+ default: t(() => [
139
+ r(d, {
140
+ modelValue: a(o).note,
141
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => a(o).note = s),
142
+ placeholder: e.$t("orderUserAddress.noteRequired"),
143
+ "show-word-limit": "",
144
+ clearable: ""
145
+ }, null, 8, ["modelValue", "placeholder"])
146
+ ]),
147
+ _: 1
148
+ }, 8, ["label"])
149
+ ]),
150
+ _: 1
151
+ }),
152
+ r(p, { span: 24 }, {
153
+ default: t(() => [
154
+ r(u, {
155
+ label: e.$t("orderUserAddress.userName"),
156
+ prop: "userName"
157
+ }, {
158
+ default: t(() => [
159
+ r(d, {
160
+ modelValue: a(o).userName,
161
+ "onUpdate:modelValue": l[1] || (l[1] = (s) => a(o).userName = s),
162
+ placeholder: e.$t("orderUserAddress.userNameRequired"),
163
+ "show-word-limit": "",
164
+ clearable: ""
165
+ }, null, 8, ["modelValue", "placeholder"])
166
+ ]),
167
+ _: 1
168
+ }, 8, ["label"])
169
+ ]),
170
+ _: 1
171
+ }),
172
+ r(p, { span: 24 }, {
173
+ default: t(() => [
174
+ r(u, {
175
+ label: e.$t("orderUserAddress.mobilePhone"),
176
+ prop: "mobilePhone"
177
+ }, {
178
+ default: t(() => [
179
+ r(d, {
180
+ modelValue: a(o).mobilePhone,
181
+ "onUpdate:modelValue": l[2] || (l[2] = (s) => a(o).mobilePhone = s),
182
+ placeholder: e.$t("orderUserAddress.mobilePhoneRequired"),
183
+ "show-word-limit": "",
184
+ clearable: ""
185
+ }, null, 8, ["modelValue", "placeholder"])
186
+ ]),
187
+ _: 1
188
+ }, 8, ["label"])
189
+ ]),
190
+ _: 1
191
+ }),
192
+ r(p, { span: 24 }, {
193
+ default: t(() => [
194
+ r(u, {
195
+ prop: "provinceName",
196
+ label: a(n)("orderUserAddress.detailInfo"),
197
+ class: "form-item"
198
+ }, {
199
+ default: t(() => [
200
+ r(a(D), {
201
+ modelValue: a(o).areaCode,
202
+ "onUpdate:modelValue": l[3] || (l[3] = (s) => a(o).areaCode = s),
203
+ placeholder: e.$t("orderUserAddress.provinceNameRequired"),
204
+ clearable: "",
205
+ style: { width: "100%" },
206
+ "check-strictly": !1,
207
+ onChange: $
208
+ }, null, 8, ["modelValue", "placeholder"])
209
+ ]),
210
+ _: 1
211
+ }, 8, ["label"])
212
+ ]),
213
+ _: 1
214
+ }),
215
+ r(p, { span: 24 }, {
216
+ default: t(() => [
217
+ r(u, { prop: "detailInfo" }, {
218
+ default: t(() => [
219
+ r(d, {
220
+ modelValue: a(o).detailInfo,
221
+ "onUpdate:modelValue": l[4] || (l[4] = (s) => a(o).detailInfo = s),
222
+ placeholder: e.$t("orderUserAddress.detailInfoRequired"),
223
+ "show-word-limit": "",
224
+ clearable: "",
225
+ type: "textarea"
226
+ }, null, 8, ["modelValue", "placeholder"])
227
+ ]),
228
+ _: 1
229
+ })
230
+ ]),
231
+ _: 1
232
+ })
233
+ ]),
234
+ _: 1
235
+ })
236
+ ]),
237
+ _: 1
238
+ }, 8, ["model", "rules"])
239
+ ]),
240
+ _: 1
241
+ }, 8, ["modelValue"]);
242
+ };
243
+ }
244
+ }), ee = /* @__PURE__ */ L(G, [["__scopeId", "data-v-2313f5a6"]]);
245
+ export {
246
+ ee as default
247
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as ie, ref as U, onActivated as me, resolveComponent as i, resolveDirective as pe, createElementBlock as _, openBlock as p, createElementVNode as f, createVNode as a, withCtx as r, withKeys as P, unref as n, createTextVNode as u, toDisplayString as l, withDirectives as g, createCommentVNode as v, createBlock as V, isRef as L } from "vue";
2
2
  import { D as I, C as w } from "./index-BsMxZHKS.mjs";
3
- import { o as Q } from "./index-C-g3Ei_P.mjs";
3
+ import { o as Q } from "./index-DvqcVtci.mjs";
4
4
  import { vueMetaEnv as fe, useTableHooks as ce } from "jmash-core";
5
5
  import { useI18n as ye } from "vue-i18n";
6
6
  import { useRouter as be } from "vue-router";