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