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