sooyie-material 0.0.5 → 0.0.7
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/{edit-CLZT5pcT.mjs → edit-BcFpISQ4.mjs} +1 -1
- package/dist/{edit-ChiRu1yh.mjs → edit-DU3x8xdk.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-DjKM67re.mjs → edit.vue_vue_type_script_setup_true_lang-B-EZ_8-e.mjs} +133 -125
- package/dist/{edit.vue_vue_type_script_setup_true_lang-7q1-KhGp.mjs → edit.vue_vue_type_script_setup_true_lang-BTsxrugA.mjs} +1 -1
- package/dist/index-B6o7GKec.mjs +1906 -0
- package/dist/{index-B0yZc4hJ.mjs → index-BUKVaWqd.mjs} +69 -68
- package/dist/{index-CWpIpj4L.mjs → index-jMDq0b49.mjs} +117 -116
- package/dist/index.mjs +1 -1
- package/package.json +3 -2
- package/dist/index-CuXtDR2y.mjs +0 -5046
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
import { useI18n as
|
|
1
|
+
import { defineComponent as Z, mergeModels as F, ref as c, reactive as j, useModel as x, onMounted as ee, resolveComponent as d, createBlock as I, openBlock as p, withCtx as o, createVNode as t, unref as n, createElementBlock as h, Fragment as q, renderList as $, createElementVNode as E, createTextVNode as K, toDisplayString as O } from "vue";
|
|
2
|
+
import { ElMessage as S } from "element-plus";
|
|
3
|
+
import { useI18n as le } from "vue-i18n";
|
|
4
4
|
import "jmash-core";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { userApi as T } from "jmash-rbac";
|
|
6
|
+
import { D as z, a as g } from "./index-B6o7GKec.mjs";
|
|
7
|
+
const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Z({
|
|
7
8
|
__name: "edit",
|
|
8
9
|
props: /* @__PURE__ */ F({
|
|
9
10
|
entityKey: {
|
|
@@ -16,143 +17,149 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
16
17
|
modelModifiers: {}
|
|
17
18
|
}),
|
|
18
19
|
emits: /* @__PURE__ */ F(["refresh"], ["update:modelValue"]),
|
|
19
|
-
setup(
|
|
20
|
-
const { t:
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
let r =
|
|
20
|
+
setup(w, { emit: A }) {
|
|
21
|
+
const { t: m } = le();
|
|
22
|
+
z.materialCategoryBizDict.useValues();
|
|
23
|
+
const k = c(), b = c([]);
|
|
24
|
+
let r = j({
|
|
24
25
|
requestId: Math.random() * 10 + "",
|
|
25
|
-
updateMask: "categoryId,materialCode,materialName,specInfo,unit,unitPrice,plannerId"
|
|
26
|
+
updateMask: "categoryId,materialCode,materialName,specInfo,unit,unitPrice,plannerId,operatorId"
|
|
26
27
|
});
|
|
27
|
-
const
|
|
28
|
+
const J = j({
|
|
28
29
|
materialCode: [
|
|
29
30
|
{
|
|
30
31
|
required: !0,
|
|
31
|
-
message:
|
|
32
|
+
message: m("materialInfo.materialCodeRequired"),
|
|
32
33
|
trigger: "blur"
|
|
33
34
|
}
|
|
34
35
|
],
|
|
35
36
|
materialName: [
|
|
36
37
|
{
|
|
37
38
|
required: !0,
|
|
38
|
-
message:
|
|
39
|
+
message: m("materialInfo.materialNameRequired"),
|
|
39
40
|
trigger: "blur"
|
|
40
41
|
}
|
|
41
42
|
],
|
|
42
43
|
categoryId: [
|
|
43
44
|
{
|
|
44
45
|
required: !0,
|
|
45
|
-
message:
|
|
46
|
+
message: m("materialInfo.categoryIdRequired"),
|
|
46
47
|
trigger: "change"
|
|
47
48
|
}
|
|
48
49
|
],
|
|
49
50
|
specInfo: [
|
|
50
51
|
{
|
|
51
52
|
required: !0,
|
|
52
|
-
message:
|
|
53
|
+
message: m("materialInfo.specInfoRequired"),
|
|
53
54
|
trigger: "blur"
|
|
54
55
|
}
|
|
55
56
|
],
|
|
56
57
|
unit: [
|
|
57
58
|
{
|
|
58
59
|
required: !0,
|
|
59
|
-
message:
|
|
60
|
+
message: m("materialInfo.unitRequired"),
|
|
60
61
|
trigger: "change"
|
|
61
62
|
}
|
|
62
63
|
],
|
|
63
64
|
unitPrice: [
|
|
64
65
|
{
|
|
65
66
|
required: !0,
|
|
66
|
-
message:
|
|
67
|
+
message: m("materialInfo.unitPriceRequired"),
|
|
67
68
|
trigger: "change"
|
|
68
69
|
}
|
|
69
70
|
]
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
b.value =
|
|
71
|
+
}), C = c([]), s = x(w, "modelValue"), R = w, N = A, y = (e = "") => {
|
|
72
|
+
console.log(e), T.findPage({ loginName: e }).then(({ data: l }) => {
|
|
73
|
+
b.value = l.results;
|
|
73
74
|
});
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
y();
|
|
76
77
|
let P;
|
|
77
78
|
const U = (e) => {
|
|
78
79
|
clearTimeout(P), P = setTimeout(() => {
|
|
79
|
-
|
|
80
|
+
y(e);
|
|
80
81
|
}, 300);
|
|
81
|
-
},
|
|
82
|
-
|
|
82
|
+
}, B = (e) => e.realName || e.nickName, G = Object.keys(R.entityKey), M = c(G.length >= 1);
|
|
83
|
+
M.value && g.findById(R.entityKey).then(({ data: e }) => {
|
|
83
84
|
Object.assign(r, e);
|
|
85
|
+
const l = [];
|
|
86
|
+
r.plannerId && l.push(r.plannerId), r.operatorId && l.push(r.operatorId), l.length !== 0 && l.map((u) => {
|
|
87
|
+
T.findById({ userId: u }).then(({ data: i }) => {
|
|
88
|
+
y(i.realName);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
84
91
|
});
|
|
85
|
-
const
|
|
92
|
+
const H = async () => {
|
|
86
93
|
var e;
|
|
87
|
-
await ((e =
|
|
88
|
-
|
|
89
|
-
console.log(
|
|
90
|
-
message:
|
|
94
|
+
await ((e = k.value) == null ? void 0 : e.validate((l) => {
|
|
95
|
+
l && (M.value ? g.update(r).then((u) => {
|
|
96
|
+
console.log(u), u.status === 200 && (S({
|
|
97
|
+
message: m("common.submitSuccess"),
|
|
91
98
|
type: "success"
|
|
92
|
-
}),
|
|
93
|
-
}) : g.create(r).then((
|
|
94
|
-
console.log(
|
|
95
|
-
message:
|
|
99
|
+
}), s.value && (s.value = !1), N("refresh", u.status === 200));
|
|
100
|
+
}) : g.create(r).then((u) => {
|
|
101
|
+
console.log(u), u.status === 200 && (S({
|
|
102
|
+
message: m("common.submitSuccess"),
|
|
96
103
|
type: "success"
|
|
97
|
-
}),
|
|
104
|
+
}), s.value && (s.value = !1), N("refresh", u.status === 200));
|
|
98
105
|
}));
|
|
99
106
|
}));
|
|
100
107
|
};
|
|
101
108
|
function D() {
|
|
102
|
-
|
|
109
|
+
s.value && (s.value = !1);
|
|
103
110
|
}
|
|
104
|
-
return
|
|
111
|
+
return ee(() => {
|
|
105
112
|
g.findUnitList().then(({ data: e }) => {
|
|
106
|
-
|
|
113
|
+
C.value = e.values;
|
|
107
114
|
});
|
|
108
|
-
}), (e,
|
|
109
|
-
const
|
|
110
|
-
return p(), I(
|
|
111
|
-
modelValue:
|
|
112
|
-
"onUpdate:modelValue":
|
|
115
|
+
}), (e, l) => {
|
|
116
|
+
const u = d("el-tree-select"), i = d("el-form-item"), f = d("el-col"), V = d("el-input"), _ = d("el-option"), v = d("el-select"), Q = d("el-input-number"), W = d("el-row"), X = d("el-form"), L = d("el-button"), Y = d("el-dialog");
|
|
117
|
+
return p(), I(Y, {
|
|
118
|
+
modelValue: s.value,
|
|
119
|
+
"onUpdate:modelValue": l[8] || (l[8] = (a) => s.value = a),
|
|
113
120
|
onClose: D
|
|
114
121
|
}, {
|
|
115
|
-
footer:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
default:
|
|
119
|
-
|
|
122
|
+
footer: o(() => [
|
|
123
|
+
E("div", ae, [
|
|
124
|
+
t(L, { onClick: D }, {
|
|
125
|
+
default: o(() => [
|
|
126
|
+
K(O(e.$t("common.cancel")), 1)
|
|
120
127
|
]),
|
|
121
128
|
_: 1
|
|
122
129
|
}),
|
|
123
|
-
|
|
130
|
+
t(L, {
|
|
124
131
|
type: "primary",
|
|
125
|
-
onClick:
|
|
132
|
+
onClick: H
|
|
126
133
|
}, {
|
|
127
|
-
default:
|
|
128
|
-
|
|
134
|
+
default: o(() => [
|
|
135
|
+
K(O(e.$t("common.confirm")), 1)
|
|
129
136
|
]),
|
|
130
137
|
_: 1
|
|
131
138
|
})
|
|
132
139
|
])
|
|
133
140
|
]),
|
|
134
|
-
default:
|
|
135
|
-
|
|
141
|
+
default: o(() => [
|
|
142
|
+
t(X, {
|
|
136
143
|
ref_key: "materialInfoFormRef",
|
|
137
|
-
ref:
|
|
144
|
+
ref: k,
|
|
138
145
|
model: n(r),
|
|
139
146
|
"label-width": "120px",
|
|
140
|
-
rules:
|
|
147
|
+
rules: J
|
|
141
148
|
}, {
|
|
142
|
-
default:
|
|
143
|
-
|
|
144
|
-
default:
|
|
145
|
-
|
|
146
|
-
default:
|
|
147
|
-
|
|
149
|
+
default: o(() => [
|
|
150
|
+
t(W, null, {
|
|
151
|
+
default: o(() => [
|
|
152
|
+
t(f, { span: 12 }, {
|
|
153
|
+
default: o(() => [
|
|
154
|
+
t(i, {
|
|
148
155
|
label: e.$t("materialInfo.categoryId"),
|
|
149
156
|
prop: "categoryId"
|
|
150
157
|
}, {
|
|
151
|
-
default:
|
|
152
|
-
|
|
158
|
+
default: o(() => [
|
|
159
|
+
t(u, {
|
|
153
160
|
modelValue: n(r).categoryId,
|
|
154
|
-
"onUpdate:modelValue":
|
|
155
|
-
data: n(
|
|
161
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => n(r).categoryId = a),
|
|
162
|
+
data: n(z).materialCategoryBizDict.values,
|
|
156
163
|
filterable: "",
|
|
157
164
|
clearable: "",
|
|
158
165
|
"check-strictly": "",
|
|
@@ -166,16 +173,16 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
166
173
|
]),
|
|
167
174
|
_: 1
|
|
168
175
|
}),
|
|
169
|
-
|
|
170
|
-
default:
|
|
171
|
-
|
|
176
|
+
t(f, { span: 12 }, {
|
|
177
|
+
default: o(() => [
|
|
178
|
+
t(i, {
|
|
172
179
|
label: e.$t("materialInfo.materialCode"),
|
|
173
180
|
prop: "materialCode"
|
|
174
181
|
}, {
|
|
175
|
-
default:
|
|
176
|
-
|
|
182
|
+
default: o(() => [
|
|
183
|
+
t(V, {
|
|
177
184
|
modelValue: n(r).materialCode,
|
|
178
|
-
"onUpdate:modelValue":
|
|
185
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => n(r).materialCode = a),
|
|
179
186
|
placeholder: e.$t("materialInfo.materialCodeRequired"),
|
|
180
187
|
maxlength: "60",
|
|
181
188
|
"show-word-limit": "",
|
|
@@ -187,16 +194,16 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
187
194
|
]),
|
|
188
195
|
_: 1
|
|
189
196
|
}),
|
|
190
|
-
|
|
191
|
-
default:
|
|
192
|
-
|
|
197
|
+
t(f, { span: 12 }, {
|
|
198
|
+
default: o(() => [
|
|
199
|
+
t(i, {
|
|
193
200
|
label: e.$t("materialInfo.materialName"),
|
|
194
201
|
prop: "materialName"
|
|
195
202
|
}, {
|
|
196
|
-
default:
|
|
197
|
-
|
|
203
|
+
default: o(() => [
|
|
204
|
+
t(V, {
|
|
198
205
|
modelValue: n(r).materialName,
|
|
199
|
-
"onUpdate:modelValue":
|
|
206
|
+
"onUpdate:modelValue": l[2] || (l[2] = (a) => n(r).materialName = a),
|
|
200
207
|
placeholder: e.$t("materialInfo.materialNameRequired"),
|
|
201
208
|
maxlength: "120",
|
|
202
209
|
"show-word-limit": "",
|
|
@@ -208,16 +215,16 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
208
215
|
]),
|
|
209
216
|
_: 1
|
|
210
217
|
}),
|
|
211
|
-
|
|
212
|
-
default:
|
|
213
|
-
|
|
218
|
+
t(f, { span: 12 }, {
|
|
219
|
+
default: o(() => [
|
|
220
|
+
t(i, {
|
|
214
221
|
label: e.$t("materialInfo.specInfo"),
|
|
215
222
|
prop: "specInfo"
|
|
216
223
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
|
|
224
|
+
default: o(() => [
|
|
225
|
+
t(V, {
|
|
219
226
|
modelValue: n(r).specInfo,
|
|
220
|
-
"onUpdate:modelValue":
|
|
227
|
+
"onUpdate:modelValue": l[3] || (l[3] = (a) => n(r).specInfo = a),
|
|
221
228
|
placeholder: e.$t("materialInfo.specInfoRequired"),
|
|
222
229
|
maxlength: "30",
|
|
223
230
|
"show-word-limit": "",
|
|
@@ -229,26 +236,26 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
229
236
|
]),
|
|
230
237
|
_: 1
|
|
231
238
|
}),
|
|
232
|
-
|
|
233
|
-
default:
|
|
234
|
-
|
|
239
|
+
t(f, { span: 12 }, {
|
|
240
|
+
default: o(() => [
|
|
241
|
+
t(i, {
|
|
235
242
|
label: e.$t("materialInfo.unit"),
|
|
236
243
|
prop: "unit"
|
|
237
244
|
}, {
|
|
238
|
-
default:
|
|
239
|
-
|
|
245
|
+
default: o(() => [
|
|
246
|
+
t(v, {
|
|
240
247
|
modelValue: n(r).unit,
|
|
241
|
-
"onUpdate:modelValue":
|
|
248
|
+
"onUpdate:modelValue": l[4] || (l[4] = (a) => n(r).unit = a),
|
|
242
249
|
placeholder: e.$t("materialInfo.unitRequired"),
|
|
243
250
|
filterable: "",
|
|
244
251
|
"allow-create": "",
|
|
245
252
|
class: "w-full"
|
|
246
253
|
}, {
|
|
247
|
-
default:
|
|
248
|
-
(p(!0),
|
|
249
|
-
key:
|
|
250
|
-
label:
|
|
251
|
-
value:
|
|
254
|
+
default: o(() => [
|
|
255
|
+
(p(!0), h(q, null, $(C.value, (a) => (p(), I(_, {
|
|
256
|
+
key: a.key,
|
|
257
|
+
label: a.value,
|
|
258
|
+
value: a.key
|
|
252
259
|
}, null, 8, ["label", "value"]))), 128))
|
|
253
260
|
]),
|
|
254
261
|
_: 1
|
|
@@ -259,16 +266,16 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
259
266
|
]),
|
|
260
267
|
_: 1
|
|
261
268
|
}),
|
|
262
|
-
|
|
263
|
-
default:
|
|
264
|
-
|
|
269
|
+
t(f, { span: 12 }, {
|
|
270
|
+
default: o(() => [
|
|
271
|
+
t(i, {
|
|
265
272
|
label: e.$t("materialInfo.unitPrice"),
|
|
266
273
|
prop: "unitPrice"
|
|
267
274
|
}, {
|
|
268
|
-
default:
|
|
269
|
-
|
|
275
|
+
default: o(() => [
|
|
276
|
+
t(Q, {
|
|
270
277
|
modelValue: n(r).unitPrice,
|
|
271
|
-
"onUpdate:modelValue":
|
|
278
|
+
"onUpdate:modelValue": l[5] || (l[5] = (a) => n(r).unitPrice = a),
|
|
272
279
|
precision: 2,
|
|
273
280
|
min: 0,
|
|
274
281
|
controls: !1,
|
|
@@ -276,8 +283,8 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
276
283
|
placeholder: e.$t("materialInfo.unitPriceRequired"),
|
|
277
284
|
class: "w-full"
|
|
278
285
|
}, {
|
|
279
|
-
suffix:
|
|
280
|
-
|
|
286
|
+
suffix: o(() => [...l[9] || (l[9] = [
|
|
287
|
+
E("span", null, "元", -1)
|
|
281
288
|
])]),
|
|
282
289
|
_: 1
|
|
283
290
|
}, 8, ["modelValue", "placeholder"])
|
|
@@ -287,27 +294,28 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
287
294
|
]),
|
|
288
295
|
_: 1
|
|
289
296
|
}),
|
|
290
|
-
|
|
291
|
-
default:
|
|
292
|
-
|
|
297
|
+
t(f, { span: 12 }, {
|
|
298
|
+
default: o(() => [
|
|
299
|
+
t(i, {
|
|
293
300
|
label: e.$t("materialInfo.plannerId"),
|
|
294
301
|
prop: "plannerId"
|
|
295
302
|
}, {
|
|
296
|
-
default:
|
|
297
|
-
|
|
303
|
+
default: o(() => [
|
|
304
|
+
t(v, {
|
|
298
305
|
modelValue: n(r).plannerId,
|
|
299
|
-
"onUpdate:modelValue":
|
|
306
|
+
"onUpdate:modelValue": l[6] || (l[6] = (a) => n(r).plannerId = a),
|
|
300
307
|
placeholder: e.$t("materialInfo.plannerIdRequired"),
|
|
308
|
+
remote: "",
|
|
301
309
|
clearable: "",
|
|
302
310
|
filterable: "",
|
|
303
311
|
"filter-method": U,
|
|
304
312
|
class: "w-full"
|
|
305
313
|
}, {
|
|
306
|
-
default:
|
|
307
|
-
(p(!0),
|
|
308
|
-
key:
|
|
309
|
-
label:
|
|
310
|
-
value:
|
|
314
|
+
default: o(() => [
|
|
315
|
+
(p(!0), h(q, null, $(b.value, (a) => (p(), I(_, {
|
|
316
|
+
key: a.userId,
|
|
317
|
+
label: B(a),
|
|
318
|
+
value: a.userId
|
|
311
319
|
}, null, 8, ["label", "value"]))), 128))
|
|
312
320
|
]),
|
|
313
321
|
_: 1
|
|
@@ -318,27 +326,27 @@ const ae = { class: "dialog-footer" }, ie = /* @__PURE__ */ Y({
|
|
|
318
326
|
]),
|
|
319
327
|
_: 1
|
|
320
328
|
}),
|
|
321
|
-
|
|
322
|
-
default:
|
|
323
|
-
|
|
329
|
+
t(f, { span: 12 }, {
|
|
330
|
+
default: o(() => [
|
|
331
|
+
t(i, {
|
|
324
332
|
label: e.$t("materialInfo.operatorId"),
|
|
325
333
|
prop: "operatorId"
|
|
326
334
|
}, {
|
|
327
|
-
default:
|
|
328
|
-
|
|
335
|
+
default: o(() => [
|
|
336
|
+
t(v, {
|
|
329
337
|
modelValue: n(r).operatorId,
|
|
330
|
-
"onUpdate:modelValue":
|
|
338
|
+
"onUpdate:modelValue": l[7] || (l[7] = (a) => n(r).operatorId = a),
|
|
331
339
|
placeholder: e.$t("materialInfo.operatorIdRequired"),
|
|
332
340
|
clearable: "",
|
|
333
341
|
filterable: "",
|
|
334
342
|
"filter-method": U,
|
|
335
343
|
class: "w-full"
|
|
336
344
|
}, {
|
|
337
|
-
default:
|
|
338
|
-
(p(!0),
|
|
339
|
-
key:
|
|
340
|
-
label:
|
|
341
|
-
value:
|
|
345
|
+
default: o(() => [
|
|
346
|
+
(p(!0), h(q, null, $(b.value, (a) => (p(), I(_, {
|
|
347
|
+
key: a.userId,
|
|
348
|
+
label: B(a),
|
|
349
|
+
value: a.userId
|
|
342
350
|
}, null, 8, ["label", "value"]))), 128))
|
|
343
351
|
]),
|
|
344
352
|
_: 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as j, mergeModels as C, ref as v, reactive as h, useModel as F, resolveComponent as i, createBlock as K, openBlock as O, withCtx as m, createVNode as o, unref as n, createElementVNode as S, createTextVNode as N, toDisplayString as k } from "vue";
|
|
2
2
|
import { ElMessage as I } from "element-plus";
|
|
3
3
|
import { useI18n as z } from "vue-i18n";
|
|
4
|
-
import { D as w, m as c } from "./index-
|
|
4
|
+
import { D as w, m as c } from "./index-B6o7GKec.mjs";
|
|
5
5
|
const E = { class: "dialog-footer" }, H = /* @__PURE__ */ j({
|
|
6
6
|
__name: "edit",
|
|
7
7
|
props: /* @__PURE__ */ C({
|