xyvcard-itsmsys 0.0.10 → 0.0.12
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.
- package/dist/FileSaver.min-BeKvLuyk.mjs +73 -0
- package/dist/{edit-DG_Iw1-J.mjs → edit-BSgQ7aTw.mjs} +1 -1
- package/dist/{edit-DdUUCXSa.mjs → edit-BSllWdRO.mjs} +1 -1
- package/dist/{edit-RSO388mB.mjs → edit-C-Ddf0UV.mjs} +115 -115
- package/dist/{edit-BNe0hNw4.mjs → edit-CNw8JPUb.mjs} +108 -108
- package/dist/{edit-BqPZHwxi.mjs → edit-Cd4dWFsH.mjs} +1 -1
- package/dist/{edit-CyM6IuLb.mjs → edit-aqBMKpoJ.mjs} +118 -118
- package/dist/{edit-CwV1OVfe.mjs → edit-q5TFAMBm.mjs} +1 -1
- package/dist/edit.vue_vue_type_script_setup_true_lang-BA39WCu3.mjs +463 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-BJcLgzvH.mjs +463 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-BV_YHrlE.mjs +482 -0
- package/dist/{edit.vue_vue_type_script_setup_true_lang-DGAgGwVY.mjs → edit.vue_vue_type_script_setup_true_lang-D1lAHFeM.mjs} +79 -56
- package/dist/import-upload-BIT504-g.mjs +4 -0
- package/dist/import-upload-pZG8yku3.mjs +4 -0
- package/dist/import-upload.vue_vue_type_script_setup_true_lang-pjSs3v9e.mjs +162 -0
- package/dist/import-upload.vue_vue_type_script_setup_true_lang-tjMLoB_W.mjs +162 -0
- package/dist/index-B2xwBTw-.mjs +20 -0
- package/dist/{index-NugT80P7.mjs → index-BY5Djw_C.mjs} +7 -7
- package/dist/{index-CI8Z4rNf.mjs → index-BaixQptZ.mjs} +7 -7
- package/dist/index-CoMhbtrg.mjs +449 -0
- package/dist/{index-DirPUdCN.mjs → index-Cz9Xj4Mn.mjs} +1 -1
- package/dist/{index-CNGaGeE7.mjs → index-DPz8be3T.mjs} +32 -32
- package/dist/index-Dno_3GpX.mjs +145 -0
- package/dist/{index-CMBtB1kH.mjs → index-DrBtW9Aj.mjs} +185 -134
- package/dist/{index-DxILUznW.mjs → index-LOMCvxtf.mjs} +1 -1
- package/dist/index.mjs +654 -623
- package/dist/{index.vue_vue_type_script_setup_true_lang-r7jQEFkS.mjs → index.vue_vue_type_script_setup_true_lang-C67sXgs5.mjs} +41 -34
- package/dist/{info-BFZTqoY3.mjs → info-BUDmirQy.mjs} +1 -1
- package/dist/{info-DReeRuaA.mjs → info-BivxW-qV.mjs} +1 -1
- package/dist/{info-Dilg-bji.mjs → info-Bn-BseIm.mjs} +1 -1
- package/dist/{info-C0OHjgoS.mjs → info-C-ga_8K9.mjs} +11 -11
- package/dist/{info-DvYUiSRY.mjs → info-C3knY6l_.mjs} +58 -47
- package/dist/{info-CXx2899k.mjs → info-D0Pwnmsu.mjs} +71 -60
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +0 -6
- package/dts/api/index.d.ts +4 -2
- package/dts/api/itsm-sys-org/types.d.ts +0 -2
- package/dts/api/itsm-sys-org-invoice/types.d.ts +3 -1
- package/dts/api/itsm-sys-user-ext/index.d.ts +3 -1
- package/dts/api/itsm-sys-user-ext/types.d.ts +15 -2
- package/dts/constant.d.ts +14 -0
- package/dts/index.d.ts +1 -1
- package/dts/lang/itsmsys/zh-cn.d.ts +22 -11
- package/dts/views/itsmsys/itsm-sys-user-ops/import-upload.vue.d.ts +31 -0
- package/dts/views/itsmsys/itsm-sys-user-out/import-upload.vue.d.ts +31 -0
- package/package.json +4 -4
- package/dist/common-B2PCBCJ2.mjs +0 -13
- package/dist/edit.vue_vue_type_script_setup_true_lang-BQeZknmJ.mjs +0 -440
- package/dist/edit.vue_vue_type_script_setup_true_lang-CX_5__mh.mjs +0 -438
- package/dist/edit.vue_vue_type_script_setup_true_lang-DsN204D0.mjs +0 -440
- package/dist/index-BRupqW34.mjs +0 -96
- package/dist/index-CQ5Bo5a2.mjs +0 -135
- package/dist/index-w2SWNZRB.mjs +0 -397
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useRoute as
|
|
1
|
+
import { defineComponent as B, mergeModels as k, ref as I, useModel as K, reactive as O, resolveComponent as i, openBlock as E, createBlock as F, withCtx as o, createElementVNode as S, createVNode as e, createTextVNode as h, toDisplayString as R, unref as r } from "vue";
|
|
2
|
+
import { ElMessage as q } from "element-plus";
|
|
3
|
+
import { useI18n as A } from "vue-i18n";
|
|
4
|
+
import { useRoute as L } from "vue-router";
|
|
5
5
|
import { s as b } from "./index-B6vJj_z6.mjs";
|
|
6
|
-
import { D as
|
|
7
|
-
const
|
|
6
|
+
import { D as z } from "./index-Dno_3GpX.mjs";
|
|
7
|
+
const G = { class: "dialog-footer" }, Y = /* @__PURE__ */ B({
|
|
8
8
|
__name: "edit",
|
|
9
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ k({
|
|
10
10
|
entityKey: {
|
|
11
11
|
type: Object,
|
|
12
12
|
default: () => {
|
|
@@ -16,13 +16,13 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
16
16
|
modelValue: { type: Boolean },
|
|
17
17
|
modelModifiers: {}
|
|
18
18
|
}),
|
|
19
|
-
emits: /* @__PURE__ */
|
|
20
|
-
setup(f, { emit:
|
|
21
|
-
const { t: s } =
|
|
22
|
-
let
|
|
19
|
+
emits: /* @__PURE__ */ k(["refresh"], ["update:modelValue"]),
|
|
20
|
+
setup(f, { emit: T }) {
|
|
21
|
+
const { t: s } = A(), w = L(), g = I(), u = K(f, "modelValue"), v = T;
|
|
22
|
+
let a = O({
|
|
23
23
|
requestId: Math.random() * 10 + "",
|
|
24
|
-
updateMask: "invoiceType,invoiceTitle,taxNumber,bankName,backNumber",
|
|
25
|
-
orgId:
|
|
24
|
+
updateMask: "invoiceType,invoiceTitle,taxNumber,bankName,backNumber,taxRate",
|
|
25
|
+
orgId: w.query.entityKey
|
|
26
26
|
});
|
|
27
27
|
const $ = O({
|
|
28
28
|
invoiceType: [
|
|
@@ -68,65 +68,65 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
68
68
|
]
|
|
69
69
|
}), y = f, x = Object.keys(y.entityKey), N = I(x.length >= 1);
|
|
70
70
|
N.value && b.findById(y.entityKey).then(({ data: l }) => {
|
|
71
|
-
Object.assign(
|
|
71
|
+
Object.assign(a, l);
|
|
72
72
|
});
|
|
73
|
-
const
|
|
73
|
+
const U = async () => {
|
|
74
74
|
var l;
|
|
75
|
-
await ((l = g.value) == null ? void 0 : l.validate((
|
|
76
|
-
|
|
77
|
-
m.status === 200 && (
|
|
75
|
+
await ((l = g.value) == null ? void 0 : l.validate((t) => {
|
|
76
|
+
t && (N.value ? b.update(a).then((m) => {
|
|
77
|
+
m.status === 200 && (q({
|
|
78
78
|
message: s("common.submitSuccess"),
|
|
79
79
|
type: "success"
|
|
80
|
-
}),
|
|
81
|
-
}) : b.create(
|
|
82
|
-
m.status === 200 && (
|
|
80
|
+
}), u.value && (u.value = !1), v("refresh", m.status === 200));
|
|
81
|
+
}) : b.create(a).then((m) => {
|
|
82
|
+
m.status === 200 && (q({
|
|
83
83
|
message: s("common.submitSuccess"),
|
|
84
84
|
type: "success"
|
|
85
|
-
}),
|
|
85
|
+
}), u.value && (u.value = !1), v("refresh", m.status === 200));
|
|
86
86
|
}));
|
|
87
87
|
}));
|
|
88
88
|
};
|
|
89
|
-
function
|
|
90
|
-
|
|
89
|
+
function V() {
|
|
90
|
+
u.value && (u.value = !1);
|
|
91
91
|
}
|
|
92
|
-
return (l,
|
|
93
|
-
const m =
|
|
94
|
-
return
|
|
95
|
-
modelValue:
|
|
96
|
-
"onUpdate:modelValue":
|
|
97
|
-
onClose:
|
|
92
|
+
return (l, t) => {
|
|
93
|
+
const m = i("jmash-select"), d = i("el-form-item"), c = i("el-col"), p = i("el-input"), C = i("el-input-number"), M = i("el-row"), j = i("el-form"), _ = i("el-button"), D = i("el-dialog");
|
|
94
|
+
return E(), F(D, {
|
|
95
|
+
modelValue: u.value,
|
|
96
|
+
"onUpdate:modelValue": t[6] || (t[6] = (n) => u.value = n),
|
|
97
|
+
onClose: V
|
|
98
98
|
}, {
|
|
99
99
|
footer: o(() => [
|
|
100
|
-
|
|
101
|
-
e(
|
|
100
|
+
S("div", G, [
|
|
101
|
+
e(_, { onClick: V }, {
|
|
102
102
|
default: o(() => [
|
|
103
|
-
h(
|
|
103
|
+
h(R(l.$t("common.cancel")), 1)
|
|
104
104
|
]),
|
|
105
105
|
_: 1
|
|
106
106
|
}),
|
|
107
|
-
e(
|
|
107
|
+
e(_, {
|
|
108
108
|
type: "primary",
|
|
109
|
-
onClick:
|
|
109
|
+
onClick: U
|
|
110
110
|
}, {
|
|
111
111
|
default: o(() => [
|
|
112
|
-
h(
|
|
112
|
+
h(R(l.$t("common.confirm")), 1)
|
|
113
113
|
]),
|
|
114
114
|
_: 1
|
|
115
115
|
})
|
|
116
116
|
])
|
|
117
117
|
]),
|
|
118
118
|
default: o(() => [
|
|
119
|
-
e(
|
|
119
|
+
e(j, {
|
|
120
120
|
ref_key: "sysOrgInvoiceFormRef",
|
|
121
121
|
ref: g,
|
|
122
|
-
model: r(
|
|
123
|
-
"label-width": "
|
|
122
|
+
model: r(a),
|
|
123
|
+
"label-width": "120px",
|
|
124
124
|
rules: $
|
|
125
125
|
}, {
|
|
126
126
|
default: o(() => [
|
|
127
127
|
e(M, null, {
|
|
128
128
|
default: o(() => [
|
|
129
|
-
e(c, { span:
|
|
129
|
+
e(c, { span: 12 }, {
|
|
130
130
|
default: o(() => [
|
|
131
131
|
e(d, {
|
|
132
132
|
label: l.$t("sysOrgInvoice.invoiceType"),
|
|
@@ -134,10 +134,10 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
134
134
|
}, {
|
|
135
135
|
default: o(() => [
|
|
136
136
|
e(m, {
|
|
137
|
-
modelValue: r(
|
|
138
|
-
"onUpdate:modelValue":
|
|
137
|
+
modelValue: r(a).invoiceType,
|
|
138
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => r(a).invoiceType = n),
|
|
139
139
|
placeholder: l.$t("sysOrgInvoice.invoiceTypeRequired"),
|
|
140
|
-
data: r(
|
|
140
|
+
data: r(z).invoiceTypeDictEnum.values,
|
|
141
141
|
class: "w-full",
|
|
142
142
|
clearable: ""
|
|
143
143
|
}, null, 8, ["modelValue", "placeholder", "data"])
|
|
@@ -147,7 +147,7 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
147
147
|
]),
|
|
148
148
|
_: 1
|
|
149
149
|
}),
|
|
150
|
-
e(c, { span:
|
|
150
|
+
e(c, { span: 12 }, {
|
|
151
151
|
default: o(() => [
|
|
152
152
|
e(d, {
|
|
153
153
|
label: l.$t("sysOrgInvoice.invoiceTitle"),
|
|
@@ -155,8 +155,8 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
155
155
|
}, {
|
|
156
156
|
default: o(() => [
|
|
157
157
|
e(p, {
|
|
158
|
-
modelValue: r(
|
|
159
|
-
"onUpdate:modelValue":
|
|
158
|
+
modelValue: r(a).invoiceTitle,
|
|
159
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => r(a).invoiceTitle = n),
|
|
160
160
|
placeholder: l.$t("sysOrgInvoice.invoiceTitleRequired"),
|
|
161
161
|
maxlength: "50",
|
|
162
162
|
"show-word-limit": "",
|
|
@@ -168,7 +168,7 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
168
168
|
]),
|
|
169
169
|
_: 1
|
|
170
170
|
}),
|
|
171
|
-
e(c, { span:
|
|
171
|
+
e(c, { span: 12 }, {
|
|
172
172
|
default: o(() => [
|
|
173
173
|
e(d, {
|
|
174
174
|
label: l.$t("sysOrgInvoice.taxNumber"),
|
|
@@ -176,8 +176,8 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
176
176
|
}, {
|
|
177
177
|
default: o(() => [
|
|
178
178
|
e(p, {
|
|
179
|
-
modelValue: r(
|
|
180
|
-
"onUpdate:modelValue":
|
|
179
|
+
modelValue: r(a).taxNumber,
|
|
180
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => r(a).taxNumber = n),
|
|
181
181
|
placeholder: l.$t("sysOrgInvoice.taxNumberRequired"),
|
|
182
182
|
maxlength: "50",
|
|
183
183
|
"show-word-limit": "",
|
|
@@ -189,7 +189,7 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
189
189
|
]),
|
|
190
190
|
_: 1
|
|
191
191
|
}),
|
|
192
|
-
e(c, { span:
|
|
192
|
+
e(c, { span: 12 }, {
|
|
193
193
|
default: o(() => [
|
|
194
194
|
e(d, {
|
|
195
195
|
label: l.$t("sysOrgInvoice.bankName"),
|
|
@@ -197,8 +197,8 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
197
197
|
}, {
|
|
198
198
|
default: o(() => [
|
|
199
199
|
e(p, {
|
|
200
|
-
modelValue: r(
|
|
201
|
-
"onUpdate:modelValue":
|
|
200
|
+
modelValue: r(a).bankName,
|
|
201
|
+
"onUpdate:modelValue": t[3] || (t[3] = (n) => r(a).bankName = n),
|
|
202
202
|
placeholder: l.$t("sysOrgInvoice.bankNameRequired"),
|
|
203
203
|
maxlength: "50",
|
|
204
204
|
"show-word-limit": "",
|
|
@@ -210,7 +210,7 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
210
210
|
]),
|
|
211
211
|
_: 1
|
|
212
212
|
}),
|
|
213
|
-
e(c, { span:
|
|
213
|
+
e(c, { span: 12 }, {
|
|
214
214
|
default: o(() => [
|
|
215
215
|
e(d, {
|
|
216
216
|
label: l.$t("sysOrgInvoice.backNumber"),
|
|
@@ -218,8 +218,8 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
218
218
|
}, {
|
|
219
219
|
default: o(() => [
|
|
220
220
|
e(p, {
|
|
221
|
-
modelValue: r(
|
|
222
|
-
"onUpdate:modelValue":
|
|
221
|
+
modelValue: r(a).backNumber,
|
|
222
|
+
"onUpdate:modelValue": t[4] || (t[4] = (n) => r(a).backNumber = n),
|
|
223
223
|
placeholder: l.$t("sysOrgInvoice.backNumberRequired"),
|
|
224
224
|
maxlength: "20",
|
|
225
225
|
"show-word-limit": "",
|
|
@@ -230,6 +230,29 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
230
230
|
}, 8, ["label"])
|
|
231
231
|
]),
|
|
232
232
|
_: 1
|
|
233
|
+
}),
|
|
234
|
+
e(c, { span: 12 }, {
|
|
235
|
+
default: o(() => [
|
|
236
|
+
e(d, {
|
|
237
|
+
label: l.$t("sysOrgInvoice.taxRate"),
|
|
238
|
+
prop: "taxRate"
|
|
239
|
+
}, {
|
|
240
|
+
default: o(() => [
|
|
241
|
+
e(C, {
|
|
242
|
+
modelValue: r(a).taxRate,
|
|
243
|
+
"onUpdate:modelValue": t[5] || (t[5] = (n) => r(a).taxRate = n),
|
|
244
|
+
placeholder: l.$t("sysOrgInvoice.taxRateRequired"),
|
|
245
|
+
precision: 2,
|
|
246
|
+
min: 0,
|
|
247
|
+
max: 1,
|
|
248
|
+
step: 0.01,
|
|
249
|
+
class: "w-full"
|
|
250
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
251
|
+
]),
|
|
252
|
+
_: 1
|
|
253
|
+
}, 8, ["label"])
|
|
254
|
+
]),
|
|
255
|
+
_: 1
|
|
233
256
|
})
|
|
234
257
|
]),
|
|
235
258
|
_: 1
|
|
@@ -244,5 +267,5 @@ const z = { class: "dialog-footer" }, X = /* @__PURE__ */ D({
|
|
|
244
267
|
}
|
|
245
268
|
});
|
|
246
269
|
export {
|
|
247
|
-
|
|
270
|
+
Y as _
|
|
248
271
|
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineComponent as z, ref as c, reactive as V, toRefs as A, resolveComponent as l, openBlock as H, createBlock as G, unref as h, isRef as J, withCtx as e, createElementVNode as s, createVNode as t, createTextVNode as u, toDisplayString as d } from "vue";
|
|
2
|
+
import { useI18n as K } from "vue-i18n";
|
|
3
|
+
import { ElMessage as m } from "element-plus";
|
|
4
|
+
import { fileApi as C, useUserStore as D } from "jmash-core";
|
|
5
|
+
import { D as I } from "./index-Dno_3GpX.mjs";
|
|
6
|
+
const L = { class: "el-upload__text" }, P = { style: { color: "var(--el-color-primary)" } }, Q = { class: "dialog-footer" }, oe = /* @__PURE__ */ z({
|
|
7
|
+
__name: "import-upload",
|
|
8
|
+
props: {
|
|
9
|
+
uploadVisible: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: () => !1
|
|
12
|
+
},
|
|
13
|
+
templateTitle: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
emits: ["templateDown", "importEvents", "uploadClosed"],
|
|
19
|
+
setup(f, { emit: w }) {
|
|
20
|
+
const { t: _ } = K();
|
|
21
|
+
I.sysOutBizDict.useValues();
|
|
22
|
+
const k = c(C.uploadUrl()), U = c(C.authHeader()), b = V({
|
|
23
|
+
tenant: D().user.tenant
|
|
24
|
+
}), $ = c(), a = V({
|
|
25
|
+
tenant: D().user.tenant,
|
|
26
|
+
requestId: Math.random() * 10 + "",
|
|
27
|
+
fileNames: "",
|
|
28
|
+
updateMask: "",
|
|
29
|
+
addFlag: !0,
|
|
30
|
+
// 必填项,true新增,false修改
|
|
31
|
+
orgId: ""
|
|
32
|
+
}), E = f, r = w, { uploadVisible: i } = A(E);
|
|
33
|
+
function N() {
|
|
34
|
+
r("templateDown");
|
|
35
|
+
}
|
|
36
|
+
function R(o) {
|
|
37
|
+
a.fileNames = o.fileSrc, a.addFlag = o.addFlag, a.fileNames && m({
|
|
38
|
+
message: _("common.uploadSuccess"),
|
|
39
|
+
type: "success"
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const S = () => {
|
|
43
|
+
m.warning("当前限制选择 1 个文件");
|
|
44
|
+
};
|
|
45
|
+
function q() {
|
|
46
|
+
if (!a.orgId) {
|
|
47
|
+
m({
|
|
48
|
+
message: _("sysUserOps.orgIdRequired"),
|
|
49
|
+
type: "error"
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
r("importEvents", a);
|
|
54
|
+
}
|
|
55
|
+
function g() {
|
|
56
|
+
r("uploadClosed");
|
|
57
|
+
}
|
|
58
|
+
return (o, n) => {
|
|
59
|
+
const y = l("el-col"), B = l("jmash-select"), F = l("el-form-item"), O = l("el-row"), x = l("upload-filled"), M = l("el-icon"), T = l("el-upload"), v = l("el-button"), j = l("el-dialog");
|
|
60
|
+
return H(), G(j, {
|
|
61
|
+
modelValue: h(i),
|
|
62
|
+
"onUpdate:modelValue": n[1] || (n[1] = (p) => J(i) ? i.value = p : null),
|
|
63
|
+
title: o.$t("common.uploadFiles"),
|
|
64
|
+
width: "500px",
|
|
65
|
+
onClose: g
|
|
66
|
+
}, {
|
|
67
|
+
footer: e(() => [
|
|
68
|
+
s("div", Q, [
|
|
69
|
+
t(v, { onClick: g }, {
|
|
70
|
+
default: e(() => [
|
|
71
|
+
u(d(o.$t("common.cancel")), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}),
|
|
75
|
+
t(v, {
|
|
76
|
+
type: "primary",
|
|
77
|
+
onClick: q
|
|
78
|
+
}, {
|
|
79
|
+
default: e(() => [
|
|
80
|
+
u(d(o.$t("common.confirm")), 1)
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
})
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
default: e(() => [
|
|
87
|
+
t(O, null, {
|
|
88
|
+
default: e(() => [
|
|
89
|
+
t(y, { span: 24 }, {
|
|
90
|
+
default: e(() => [
|
|
91
|
+
t(F, { prop: "orgId" }, {
|
|
92
|
+
default: e(() => [
|
|
93
|
+
t(y, { span: 4 }, {
|
|
94
|
+
default: e(() => [
|
|
95
|
+
n[2] || (n[2] = s("span", { class: "required_red" }, "*", -1)),
|
|
96
|
+
s("span", null, d(o.$t("sysUserOps.orgId")), 1)
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}),
|
|
100
|
+
t(B, {
|
|
101
|
+
modelValue: a.orgId,
|
|
102
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => a.orgId = p),
|
|
103
|
+
data: h(I).sysOutBizDict.values,
|
|
104
|
+
filterable: "",
|
|
105
|
+
"check-strictly": "",
|
|
106
|
+
clearable: "",
|
|
107
|
+
"render-after-expand": !1,
|
|
108
|
+
placeholder: o.$t("sysUserOps.orgIdRequired"),
|
|
109
|
+
class: "w-80"
|
|
110
|
+
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
})
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
})
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}),
|
|
120
|
+
t(T, {
|
|
121
|
+
ref_key: "uploadRef",
|
|
122
|
+
ref: $,
|
|
123
|
+
drag: "",
|
|
124
|
+
action: k.value,
|
|
125
|
+
headers: U.value,
|
|
126
|
+
data: b,
|
|
127
|
+
limit: 1,
|
|
128
|
+
"on-success": R,
|
|
129
|
+
"on-exceed": S,
|
|
130
|
+
style: { "margin-top": "20px" }
|
|
131
|
+
}, {
|
|
132
|
+
tip: e(() => [
|
|
133
|
+
s("div", {
|
|
134
|
+
class: "el-upload__tip",
|
|
135
|
+
onClick: N
|
|
136
|
+
}, [
|
|
137
|
+
s("a", P, d(f.templateTitle), 1)
|
|
138
|
+
])
|
|
139
|
+
]),
|
|
140
|
+
default: e(() => [
|
|
141
|
+
t(M, { class: "el-icon--upload" }, {
|
|
142
|
+
default: e(() => [
|
|
143
|
+
t(x)
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
}),
|
|
147
|
+
s("div", L, [
|
|
148
|
+
u(d(o.$t("common.dragFiles")) + " ", 1),
|
|
149
|
+
s("em", null, d(o.$t("common.uploadEvent")), 1)
|
|
150
|
+
])
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}, 8, ["action", "headers", "data"])
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["modelValue", "title"]);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export {
|
|
161
|
+
oe as _
|
|
162
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineComponent as z, ref as c, reactive as V, toRefs as A, resolveComponent as l, openBlock as H, createBlock as G, unref as h, isRef as J, withCtx as e, createElementVNode as s, createVNode as t, createTextVNode as u, toDisplayString as d } from "vue";
|
|
2
|
+
import { useI18n as K } from "vue-i18n";
|
|
3
|
+
import { ElMessage as m } from "element-plus";
|
|
4
|
+
import { fileApi as C, useUserStore as D } from "jmash-core";
|
|
5
|
+
import { D as I } from "./index-Dno_3GpX.mjs";
|
|
6
|
+
const L = { class: "el-upload__text" }, P = { style: { color: "var(--el-color-primary)" } }, Q = { class: "dialog-footer" }, oe = /* @__PURE__ */ z({
|
|
7
|
+
__name: "import-upload",
|
|
8
|
+
props: {
|
|
9
|
+
uploadVisible: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: () => !1
|
|
12
|
+
},
|
|
13
|
+
templateTitle: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
emits: ["templateDown", "importEvents", "uploadClosed"],
|
|
19
|
+
setup(f, { emit: w }) {
|
|
20
|
+
const { t: _ } = K();
|
|
21
|
+
I.sysOrgBizDict.useValues();
|
|
22
|
+
const k = c(C.uploadUrl()), U = c(C.authHeader()), b = V({
|
|
23
|
+
tenant: D().user.tenant
|
|
24
|
+
}), $ = c(), a = V({
|
|
25
|
+
tenant: D().user.tenant,
|
|
26
|
+
requestId: Math.random() * 10 + "",
|
|
27
|
+
fileNames: "",
|
|
28
|
+
updateMask: "",
|
|
29
|
+
addFlag: !0,
|
|
30
|
+
// 必填项,true新增,false修改
|
|
31
|
+
orgId: ""
|
|
32
|
+
}), E = f, r = w, { uploadVisible: i } = A(E);
|
|
33
|
+
function N() {
|
|
34
|
+
r("templateDown");
|
|
35
|
+
}
|
|
36
|
+
function R(o) {
|
|
37
|
+
a.fileNames = o.fileSrc, a.addFlag = o.addFlag, a.fileNames && m({
|
|
38
|
+
message: _("common.uploadSuccess"),
|
|
39
|
+
type: "success"
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const S = () => {
|
|
43
|
+
m.warning("当前限制选择 1 个文件");
|
|
44
|
+
};
|
|
45
|
+
function q() {
|
|
46
|
+
if (!a.orgId) {
|
|
47
|
+
m({
|
|
48
|
+
message: _("sysUserOps.orgIdRequired"),
|
|
49
|
+
type: "error"
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
r("importEvents", a);
|
|
54
|
+
}
|
|
55
|
+
function g() {
|
|
56
|
+
r("uploadClosed");
|
|
57
|
+
}
|
|
58
|
+
return (o, n) => {
|
|
59
|
+
const y = l("el-col"), B = l("jmash-select"), F = l("el-form-item"), O = l("el-row"), x = l("upload-filled"), M = l("el-icon"), T = l("el-upload"), v = l("el-button"), j = l("el-dialog");
|
|
60
|
+
return H(), G(j, {
|
|
61
|
+
modelValue: h(i),
|
|
62
|
+
"onUpdate:modelValue": n[1] || (n[1] = (p) => J(i) ? i.value = p : null),
|
|
63
|
+
title: o.$t("common.uploadFiles"),
|
|
64
|
+
width: "500px",
|
|
65
|
+
onClose: g
|
|
66
|
+
}, {
|
|
67
|
+
footer: e(() => [
|
|
68
|
+
s("div", Q, [
|
|
69
|
+
t(v, { onClick: g }, {
|
|
70
|
+
default: e(() => [
|
|
71
|
+
u(d(o.$t("common.cancel")), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}),
|
|
75
|
+
t(v, {
|
|
76
|
+
type: "primary",
|
|
77
|
+
onClick: q
|
|
78
|
+
}, {
|
|
79
|
+
default: e(() => [
|
|
80
|
+
u(d(o.$t("common.confirm")), 1)
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
})
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
default: e(() => [
|
|
87
|
+
t(O, null, {
|
|
88
|
+
default: e(() => [
|
|
89
|
+
t(y, { span: 24 }, {
|
|
90
|
+
default: e(() => [
|
|
91
|
+
t(F, { prop: "orgId" }, {
|
|
92
|
+
default: e(() => [
|
|
93
|
+
t(y, { span: 4 }, {
|
|
94
|
+
default: e(() => [
|
|
95
|
+
n[2] || (n[2] = s("span", { class: "required_red" }, "*", -1)),
|
|
96
|
+
s("span", null, d(o.$t("sysUserOps.orgId")), 1)
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}),
|
|
100
|
+
t(B, {
|
|
101
|
+
modelValue: a.orgId,
|
|
102
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => a.orgId = p),
|
|
103
|
+
data: h(I).sysOrgBizDict.values,
|
|
104
|
+
filterable: "",
|
|
105
|
+
"check-strictly": "",
|
|
106
|
+
clearable: "",
|
|
107
|
+
"render-after-expand": !1,
|
|
108
|
+
placeholder: o.$t("sysUserOps.orgIdRequired"),
|
|
109
|
+
class: "w-80"
|
|
110
|
+
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
})
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
})
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}),
|
|
120
|
+
t(T, {
|
|
121
|
+
ref_key: "uploadRef",
|
|
122
|
+
ref: $,
|
|
123
|
+
drag: "",
|
|
124
|
+
action: k.value,
|
|
125
|
+
headers: U.value,
|
|
126
|
+
data: b,
|
|
127
|
+
limit: 1,
|
|
128
|
+
"on-success": R,
|
|
129
|
+
"on-exceed": S,
|
|
130
|
+
style: { "margin-top": "20px" }
|
|
131
|
+
}, {
|
|
132
|
+
tip: e(() => [
|
|
133
|
+
s("div", {
|
|
134
|
+
class: "el-upload__tip",
|
|
135
|
+
onClick: N
|
|
136
|
+
}, [
|
|
137
|
+
s("a", P, d(f.templateTitle), 1)
|
|
138
|
+
])
|
|
139
|
+
]),
|
|
140
|
+
default: e(() => [
|
|
141
|
+
t(M, { class: "el-icon--upload" }, {
|
|
142
|
+
default: e(() => [
|
|
143
|
+
t(x)
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
}),
|
|
147
|
+
s("div", L, [
|
|
148
|
+
u(d(o.$t("common.dragFiles")) + " ", 1),
|
|
149
|
+
s("em", null, d(o.$t("common.uploadEvent")), 1)
|
|
150
|
+
])
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}, 8, ["action", "headers", "data"])
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["modelValue", "title"]);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export {
|
|
161
|
+
oe as _
|
|
162
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as e, openBlock as r, createElementBlock as t, createElementVNode as a } from "vue";
|
|
2
|
+
/*! Element Plus Icons Vue v2.3.1 */
|
|
3
|
+
var _ = /* @__PURE__ */ e({
|
|
4
|
+
name: "Search",
|
|
5
|
+
__name: "search",
|
|
6
|
+
setup(o) {
|
|
7
|
+
return (c, n) => (r(), t("svg", {
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 1024 1024"
|
|
10
|
+
}, [
|
|
11
|
+
a("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
|
|
14
|
+
})
|
|
15
|
+
]));
|
|
16
|
+
}
|
|
17
|
+
}), s = _;
|
|
18
|
+
export {
|
|
19
|
+
s
|
|
20
|
+
};
|