xyvcard-itsmsys 0.0.26 → 0.0.27

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.
@@ -0,0 +1,410 @@
1
+ import { defineComponent as E, getCurrentInstance as F, ref as f, reactive as w, onMounted as z, resolveComponent as u, createElementBlock as J, openBlock as y, createVNode as e, withCtx as t, createBlock as q, createCommentVNode as $, unref as a, createTextVNode as H, toDisplayString as Q } from "vue";
2
+ import { ElMessage as R } from "element-plus";
3
+ import { s as W } from "./index-RF4VErgF.mjs";
4
+ import { useI18n as X } from "vue-i18n";
5
+ import { useRoute as Z, useRouter as x } from "vue-router";
6
+ import { validatePhoneOrLandline as ee, routerUtil as I } from "jmash-core";
7
+ import { C as b, D as k } from "./index-dIcRC4jE.mjs";
8
+ import { sysOrgApi as _ } from "./index.mjs";
9
+ import { _ as oe } from "./index.vue_vue_type_script_setup_true_lang-B2_RWC8z.mjs";
10
+ const le = { class: "app-container" }, ce = /* @__PURE__ */ E({
11
+ __name: "edit",
12
+ setup(te) {
13
+ const { t: m } = X(), p = Z(), v = x(), { proxy: C } = F(), V = f(), g = f("first");
14
+ let o = w({
15
+ requestId: Math.random() * 10 + "",
16
+ updateMask: "orgName,address,contactPerson,contactPersonPosi,contactPersonTel,contactPersonMobile,parentId,geoLongitude,geoLatitude",
17
+ orgType: b.orgType.hall,
18
+ annual: C.$moment.formatDate(/* @__PURE__ */ new Date(), "YYYY")
19
+ });
20
+ const P = f("");
21
+ function T(l) {
22
+ g.value = l.props.name;
23
+ }
24
+ const h = (l, n, c) => {
25
+ n && (ee(n) || c(new Error(m("sysGov.contactPersonMobileRequireds")))), c();
26
+ }, M = w({
27
+ orgName: [
28
+ {
29
+ required: !0,
30
+ message: m("sysGov.orgNameRequired"),
31
+ trigger: "blur"
32
+ }
33
+ ],
34
+ address: [
35
+ {
36
+ required: !0,
37
+ message: m("sysGov.addressRequired"),
38
+ trigger: "blur"
39
+ }
40
+ ],
41
+ geoLongitude: [
42
+ {
43
+ required: !0,
44
+ message: m("sysGov.geoLongitudeRequired"),
45
+ trigger: "change"
46
+ }
47
+ ],
48
+ geoLatitude: [
49
+ {
50
+ required: !0,
51
+ message: m("sysGov.geoLatitudeRequired"),
52
+ trigger: "change"
53
+ }
54
+ ],
55
+ contactPersonMobile: [
56
+ {
57
+ validator: h,
58
+ trigger: "blur"
59
+ }
60
+ ],
61
+ contactPersonTel: [
62
+ {
63
+ validator: h,
64
+ trigger: "blur"
65
+ }
66
+ ]
67
+ });
68
+ function N() {
69
+ P.value = o.address;
70
+ }
71
+ function U(l) {
72
+ o.geoLatitude = l[0], o.geoLongitude = l[1];
73
+ }
74
+ function Y(l) {
75
+ o.address = l;
76
+ }
77
+ p.query.entityKey && _.findById({ orgId: p.query.entityKey }).then(({ data: l }) => {
78
+ Object.assign(o, l), o.parentId === "00000000-0000-0000-0000-000000000000" && (o.parentId = "");
79
+ });
80
+ const D = async () => {
81
+ var l;
82
+ await ((l = V.value) == null ? void 0 : l.validate((n) => {
83
+ var c, s;
84
+ n && (o.geoLongitude = (c = o.geoLongitude) == null ? void 0 : c.toString(), o.geoLatitude = (s = o.geoLatitude) == null ? void 0 : s.toString(), o.orgId ? _.update(o).then((d) => {
85
+ d.status === 200 && (R({
86
+ message: m("common.submitSuccess"),
87
+ type: "success"
88
+ }), I.closeTagView(p.fullPath, v, !1));
89
+ }) : _.create(o).then((d) => {
90
+ d.status === 200 && (R({
91
+ message: m("common.submitSuccess"),
92
+ type: "success"
93
+ }), I.closeTagView(p.fullPath, v, !1));
94
+ }));
95
+ }));
96
+ };
97
+ return z(() => {
98
+ const l = p.query.entityKey;
99
+ k.parentIdBizDict.useValues(l);
100
+ }), (l, n) => {
101
+ const c = u("el-date-picker"), s = u("el-form-item"), d = u("el-col"), i = u("el-input"), S = u("el-tree-select"), G = u("el-button"), B = u("jmash-amap"), K = u("el-row"), j = u("el-form"), L = u("el-tab-pane"), O = u("el-tabs"), A = u("el-card");
102
+ return y(), J("div", le, [
103
+ e(A, { shadow: "never" }, {
104
+ default: t(() => [
105
+ e(O, {
106
+ modelValue: g.value,
107
+ "onUpdate:modelValue": n[10] || (n[10] = (r) => g.value = r),
108
+ onTabClick: T
109
+ }, {
110
+ default: t(() => [
111
+ e(L, {
112
+ label: "厅局信息",
113
+ name: "first"
114
+ }, {
115
+ default: t(() => [
116
+ e(j, {
117
+ ref_key: "sysGovFormRef",
118
+ ref: V,
119
+ model: a(o),
120
+ "label-width": "120px",
121
+ rules: M
122
+ }, {
123
+ default: t(() => [
124
+ e(K, null, {
125
+ default: t(() => [
126
+ e(d, { span: 12 }, {
127
+ default: t(() => [
128
+ e(s, {
129
+ label: l.$t("sysGov.annual"),
130
+ prop: "annual"
131
+ }, {
132
+ default: t(() => [
133
+ e(c, {
134
+ modelValue: a(o).annual,
135
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => a(o).annual = r),
136
+ type: "year",
137
+ placeholder: l.$t("sysGov.annualRequired"),
138
+ format: "YYYY",
139
+ "value-format": "YYYY",
140
+ class: "w-full",
141
+ disabled: a(p).query.entityKey
142
+ }, null, 8, ["modelValue", "placeholder", "disabled"])
143
+ ]),
144
+ _: 1
145
+ }, 8, ["label"])
146
+ ]),
147
+ _: 1
148
+ }),
149
+ e(d, { span: 12 }, {
150
+ default: t(() => [
151
+ e(s, {
152
+ label: l.$t("sysGov.orgName"),
153
+ prop: "orgName"
154
+ }, {
155
+ default: t(() => [
156
+ e(i, {
157
+ modelValue: a(o).orgName,
158
+ "onUpdate:modelValue": n[1] || (n[1] = (r) => a(o).orgName = r),
159
+ placeholder: l.$t("sysGov.orgNameRequired"),
160
+ maxlength: "50",
161
+ "show-word-limit": "",
162
+ clearable: ""
163
+ }, null, 8, ["modelValue", "placeholder"])
164
+ ]),
165
+ _: 1
166
+ }, 8, ["label"])
167
+ ]),
168
+ _: 1
169
+ }),
170
+ e(d, { span: 12 }, {
171
+ default: t(() => [
172
+ e(s, {
173
+ label: l.$t("sysGov.parentId"),
174
+ prop: "parentId"
175
+ }, {
176
+ default: t(() => [
177
+ e(S, {
178
+ modelValue: a(o).parentId,
179
+ "onUpdate:modelValue": n[2] || (n[2] = (r) => a(o).parentId = r),
180
+ data: a(k).parentIdBizDict.values,
181
+ filterable: "",
182
+ clearable: "",
183
+ "check-strictly": "",
184
+ "allow-create": "",
185
+ "render-after-expand": !1,
186
+ class: "w-full",
187
+ placeholder: l.$t("sysGov.parentIdRequired")
188
+ }, null, 8, ["modelValue", "data", "placeholder"])
189
+ ]),
190
+ _: 1
191
+ }, 8, ["label"])
192
+ ]),
193
+ _: 1
194
+ }),
195
+ e(d, { span: 12 }, {
196
+ default: t(() => [
197
+ e(s, {
198
+ label: l.$t("sysGov.contactPerson"),
199
+ prop: "contactPerson"
200
+ }, {
201
+ default: t(() => [
202
+ e(i, {
203
+ modelValue: a(o).contactPerson,
204
+ "onUpdate:modelValue": n[3] || (n[3] = (r) => a(o).contactPerson = r),
205
+ placeholder: l.$t("sysGov.contactPersonRequired"),
206
+ maxlength: "20",
207
+ "show-word-limit": "",
208
+ clearable: ""
209
+ }, null, 8, ["modelValue", "placeholder"])
210
+ ]),
211
+ _: 1
212
+ }, 8, ["label"])
213
+ ]),
214
+ _: 1
215
+ }),
216
+ e(d, { span: 12 }, {
217
+ default: t(() => [
218
+ e(s, {
219
+ label: l.$t("sysGov.contactPersonPosi"),
220
+ prop: "contactPersonPosi"
221
+ }, {
222
+ default: t(() => [
223
+ e(i, {
224
+ modelValue: a(o).contactPersonPosi,
225
+ "onUpdate:modelValue": n[4] || (n[4] = (r) => a(o).contactPersonPosi = r),
226
+ placeholder: l.$t("sysGov.contactPersonPosiRequired"),
227
+ maxlength: "30",
228
+ "show-word-limit": "",
229
+ clearable: ""
230
+ }, null, 8, ["modelValue", "placeholder"])
231
+ ]),
232
+ _: 1
233
+ }, 8, ["label"])
234
+ ]),
235
+ _: 1
236
+ }),
237
+ e(d, { span: 12 }, {
238
+ default: t(() => [
239
+ e(s, {
240
+ label: l.$t("sysGov.contactPersonTel"),
241
+ prop: "contactPersonTel"
242
+ }, {
243
+ default: t(() => [
244
+ e(i, {
245
+ modelValue: a(o).contactPersonTel,
246
+ "onUpdate:modelValue": n[5] || (n[5] = (r) => a(o).contactPersonTel = r),
247
+ placeholder: l.$t("sysGov.contactPersonTelRequired"),
248
+ maxlength: "12",
249
+ "show-word-limit": "",
250
+ clearable: ""
251
+ }, null, 8, ["modelValue", "placeholder"])
252
+ ]),
253
+ _: 1
254
+ }, 8, ["label"])
255
+ ]),
256
+ _: 1
257
+ }),
258
+ e(d, { span: 12 }, {
259
+ default: t(() => [
260
+ e(s, {
261
+ label: l.$t("sysGov.contactPersonMobile"),
262
+ prop: "contactPersonMobile"
263
+ }, {
264
+ default: t(() => [
265
+ e(i, {
266
+ modelValue: a(o).contactPersonMobile,
267
+ "onUpdate:modelValue": n[6] || (n[6] = (r) => a(o).contactPersonMobile = r),
268
+ placeholder: l.$t("sysGov.contactPersonMobileRequired"),
269
+ maxlength: "11",
270
+ "show-word-limit": "",
271
+ clearable: ""
272
+ }, null, 8, ["modelValue", "placeholder"])
273
+ ]),
274
+ _: 1
275
+ }, 8, ["label"])
276
+ ]),
277
+ _: 1
278
+ }),
279
+ e(d, { span: 24 }, {
280
+ default: t(() => [
281
+ e(s, {
282
+ label: l.$t("sysGov.address"),
283
+ prop: "address"
284
+ }, {
285
+ default: t(() => [
286
+ e(i, {
287
+ modelValue: a(o).address,
288
+ "onUpdate:modelValue": n[7] || (n[7] = (r) => a(o).address = r),
289
+ placeholder: l.$t("sysGov.addressRequired"),
290
+ maxlength: "120",
291
+ "show-word-limit": "",
292
+ clearable: ""
293
+ }, {
294
+ append: t(() => [
295
+ e(G, {
296
+ icon: a(W),
297
+ onClick: N
298
+ }, null, 8, ["icon"])
299
+ ]),
300
+ _: 1
301
+ }, 8, ["modelValue", "placeholder"])
302
+ ]),
303
+ _: 1
304
+ }, 8, ["label"])
305
+ ]),
306
+ _: 1
307
+ }),
308
+ e(d, { span: 24 }, {
309
+ default: t(() => [
310
+ e(s, null, {
311
+ default: t(() => [
312
+ e(B, {
313
+ "security-js-code": a(b).amapConfig.securityJsCode,
314
+ "api-key": a(b).amapConfig.apiKey,
315
+ address: P.value,
316
+ lat: a(o).geoLatitude,
317
+ lng: a(o).geoLongitude,
318
+ onGetLatLng: U,
319
+ onGetAddress: Y
320
+ }, null, 8, ["security-js-code", "api-key", "address", "lat", "lng"])
321
+ ]),
322
+ _: 1
323
+ })
324
+ ]),
325
+ _: 1
326
+ }),
327
+ e(d, { span: 12 }, {
328
+ default: t(() => [
329
+ e(s, {
330
+ label: l.$t("sysGov.geoLongitude"),
331
+ prop: "geoLongitude"
332
+ }, {
333
+ default: t(() => [
334
+ e(i, {
335
+ modelValue: a(o).geoLongitude,
336
+ "onUpdate:modelValue": n[8] || (n[8] = (r) => a(o).geoLongitude = r),
337
+ clearable: "",
338
+ disabled: !0
339
+ }, null, 8, ["modelValue"])
340
+ ]),
341
+ _: 1
342
+ }, 8, ["label"])
343
+ ]),
344
+ _: 1
345
+ }),
346
+ e(d, { span: 12 }, {
347
+ default: t(() => [
348
+ e(s, {
349
+ label: l.$t("sysGov.geoLatitude"),
350
+ prop: "geoLatitude"
351
+ }, {
352
+ default: t(() => [
353
+ e(i, {
354
+ modelValue: a(o).geoLatitude,
355
+ "onUpdate:modelValue": n[9] || (n[9] = (r) => a(o).geoLatitude = r),
356
+ clearable: "",
357
+ disabled: !0
358
+ }, null, 8, ["modelValue"])
359
+ ]),
360
+ _: 1
361
+ }, 8, ["label"])
362
+ ]),
363
+ _: 1
364
+ })
365
+ ]),
366
+ _: 1
367
+ }),
368
+ e(s, null, {
369
+ default: t(() => [
370
+ e(G, {
371
+ type: "primary",
372
+ onClick: D
373
+ }, {
374
+ default: t(() => [
375
+ H(Q(l.$t("common.save")), 1)
376
+ ]),
377
+ _: 1
378
+ })
379
+ ]),
380
+ _: 1
381
+ })
382
+ ]),
383
+ _: 1
384
+ }, 8, ["model", "rules"])
385
+ ]),
386
+ _: 1
387
+ }),
388
+ a(p).query.entityKey ? (y(), q(L, {
389
+ key: 0,
390
+ label: "发票信息",
391
+ name: "second"
392
+ }, {
393
+ default: t(() => [
394
+ g.value === "second" ? (y(), q(oe, { key: 0 })) : $("", !0)
395
+ ]),
396
+ _: 1
397
+ })) : $("", !0)
398
+ ]),
399
+ _: 1
400
+ }, 8, ["modelValue"])
401
+ ]),
402
+ _: 1
403
+ })
404
+ ]);
405
+ };
406
+ }
407
+ });
408
+ export {
409
+ ce as default
410
+ };