sooyie-material 0.0.2 → 0.0.3
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-BwUVt41m.mjs → edit-DhSV_pw8.mjs} +1 -1
- package/dist/edit-Dx2IO6kT.mjs +335 -0
- package/dist/{edit.vue_vue_type_script_setup_true_lang-aB2_di1J.mjs → edit.vue_vue_type_script_setup_true_lang-4b_9pBbW.mjs} +1 -1
- package/dist/index-B54kJjCF.mjs +5044 -0
- package/dist/{index-Mo5kukd_.mjs → index-C2MhXzJW.mjs} +2 -2
- package/dist/index-CjiIzlQc.mjs +384 -0
- package/dist/index.mjs +5 -66
- package/dist/style.css +1 -0
- package/dts/src/api/mat-material-info/types.d.ts +1 -1
- package/dts/src/components/MaterialModalSelector/index.vue.d.ts +11 -0
- package/dts/src/index.d.ts +4 -0
- package/package.json +7 -6
- package/dist/edit-DJxSeb24.mjs +0 -4
- package/dist/edit.vue_vue_type_script_setup_true_lang-Dx7mFloi.mjs +0 -1889
- package/dist/index-CW8xN0Yq.mjs +0 -389
- package/dist/index-YdYarUAc.mjs +0 -3260
package/dist/index-CW8xN0Yq.mjs
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, ref as V, reactive as U, onActivated as ee, resolveComponent as m, resolveDirective as le, createElementBlock as N, openBlock as d, createElementVNode as _, createVNode as o, createBlock as f, createCommentVNode as R, withCtx as a, unref as n, withKeys as P, createTextVNode as p, toDisplayString as u, withDirectives as I, isRef as T } from "vue";
|
|
2
|
-
import { useTableHooks as te } from "jmash-core";
|
|
3
|
-
import { useI18n as ae } from "vue-i18n";
|
|
4
|
-
import { m as oe, _ as ne } from "./edit.vue_vue_type_script_setup_true_lang-Dx7mFloi.mjs";
|
|
5
|
-
import { D as w } from "./index-YdYarUAc.mjs";
|
|
6
|
-
const re = { class: "app-container" }, ie = { class: "search-container" }, me = ["onClick"], ue = ["onClick"], ye = /* @__PURE__ */ x({
|
|
7
|
-
__name: "index",
|
|
8
|
-
setup(de) {
|
|
9
|
-
const { t: c } = ae();
|
|
10
|
-
w.materialCategoryBizDict.useValues(), w.userDict.useValues();
|
|
11
|
-
const i = V({}), {
|
|
12
|
-
tableHooks: r,
|
|
13
|
-
multipleTableRef: j,
|
|
14
|
-
queryFormRef: z,
|
|
15
|
-
listLoading: q,
|
|
16
|
-
tableData: E,
|
|
17
|
-
total: $
|
|
18
|
-
} = te(c, oe, i);
|
|
19
|
-
let g = V([
|
|
20
|
-
{
|
|
21
|
-
label: "materialInfo.categoryId",
|
|
22
|
-
prop: "categoryId",
|
|
23
|
-
width: "110",
|
|
24
|
-
slotName: "categoryId",
|
|
25
|
-
columnType: "slot",
|
|
26
|
-
isColumn: !0
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "materialInfo.materialCode",
|
|
30
|
-
prop: "materialCode",
|
|
31
|
-
width: "110",
|
|
32
|
-
sortable: "custom",
|
|
33
|
-
isColumn: !0
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: "materialInfo.materialName",
|
|
37
|
-
prop: "materialName",
|
|
38
|
-
width: "200",
|
|
39
|
-
isColumn: !0
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: "materialInfo.specInfo",
|
|
43
|
-
prop: "specInfo",
|
|
44
|
-
isColumn: !0
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: "materialInfo.unit",
|
|
48
|
-
prop: "unit",
|
|
49
|
-
width: "110",
|
|
50
|
-
sortable: "custom",
|
|
51
|
-
isColumn: !0
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: "materialInfo.unitPrice",
|
|
55
|
-
prop: "unitPrice",
|
|
56
|
-
width: "80",
|
|
57
|
-
sortable: "custom",
|
|
58
|
-
slotName: "unitPrice",
|
|
59
|
-
columnType: "slot",
|
|
60
|
-
isColumn: !0
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
label: "materialInfo.plannerId",
|
|
64
|
-
prop: "plannerId",
|
|
65
|
-
width: "100",
|
|
66
|
-
slotName: "plannerId",
|
|
67
|
-
columnType: "slot",
|
|
68
|
-
isColumn: !0
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: "common.operate",
|
|
72
|
-
width: "130",
|
|
73
|
-
slotName: "operation",
|
|
74
|
-
columnType: "slot",
|
|
75
|
-
fixed: "right",
|
|
76
|
-
isColumn: !0
|
|
77
|
-
}
|
|
78
|
-
]);
|
|
79
|
-
const s = V({
|
|
80
|
-
title: c("common.edit"),
|
|
81
|
-
visible: !1
|
|
82
|
-
}), C = V(!1);
|
|
83
|
-
let h = U({});
|
|
84
|
-
function B() {
|
|
85
|
-
h = U({}), s.value.title = c("common.add"), s.value.visible = !0;
|
|
86
|
-
}
|
|
87
|
-
function K(t) {
|
|
88
|
-
h.materialId = t.materialId, s.value.title = c("common.edit"), s.value.visible = !0;
|
|
89
|
-
}
|
|
90
|
-
function L(t) {
|
|
91
|
-
r.selectionRows.value = t;
|
|
92
|
-
}
|
|
93
|
-
function Q(t) {
|
|
94
|
-
r.handleSort(t.prop, t.order);
|
|
95
|
-
}
|
|
96
|
-
function M(t) {
|
|
97
|
-
t && r.getList();
|
|
98
|
-
}
|
|
99
|
-
function A() {
|
|
100
|
-
C.value = !1;
|
|
101
|
-
}
|
|
102
|
-
function F(t) {
|
|
103
|
-
t.updateMask = "", r.importExcel(t).then((e) => {
|
|
104
|
-
C.value = !1;
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return ee(() => {
|
|
108
|
-
r.getList();
|
|
109
|
-
}), (t, e) => {
|
|
110
|
-
const H = m("el-tree-select"), k = m("el-form-item"), v = m("el-col"), D = m("el-input"), S = m("el-row"), y = m("el-button"), G = m("el-form"), J = m("jmash-column-select"), O = m("jmash-table"), W = m("jmash-pagination"), X = m("el-card"), Y = m("jmash-import-upload"), b = le("hasPerm");
|
|
111
|
-
return d(), N("div", re, [
|
|
112
|
-
_("div", ie, [
|
|
113
|
-
o(G, {
|
|
114
|
-
ref_key: "queryFormRef",
|
|
115
|
-
ref: z,
|
|
116
|
-
model: i.value,
|
|
117
|
-
inline: !0
|
|
118
|
-
}, {
|
|
119
|
-
default: a(() => [
|
|
120
|
-
o(S, null, {
|
|
121
|
-
default: a(() => [
|
|
122
|
-
o(v, { span: 6 }, {
|
|
123
|
-
default: a(() => [
|
|
124
|
-
o(k, {
|
|
125
|
-
label: t.$t("materialInfo.categoryId"),
|
|
126
|
-
prop: "categoryId"
|
|
127
|
-
}, {
|
|
128
|
-
default: a(() => [
|
|
129
|
-
o(H, {
|
|
130
|
-
modelValue: i.value.categoryId,
|
|
131
|
-
"onUpdate:modelValue": e[0] || (e[0] = (l) => i.value.categoryId = l),
|
|
132
|
-
data: n(w).materialCategoryBizDict.values,
|
|
133
|
-
filterable: "",
|
|
134
|
-
clearable: "",
|
|
135
|
-
"check-strictly": "",
|
|
136
|
-
"render-after-expand": !1,
|
|
137
|
-
class: "w-full",
|
|
138
|
-
placeholder: t.$t("materialInfo.categoryIdRequired")
|
|
139
|
-
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
140
|
-
]),
|
|
141
|
-
_: 1
|
|
142
|
-
}, 8, ["label"])
|
|
143
|
-
]),
|
|
144
|
-
_: 1
|
|
145
|
-
}),
|
|
146
|
-
o(v, { span: 6 }, {
|
|
147
|
-
default: a(() => [
|
|
148
|
-
o(k, {
|
|
149
|
-
label: t.$t("materialInfo.materialCode"),
|
|
150
|
-
prop: "likeMaterialCode"
|
|
151
|
-
}, {
|
|
152
|
-
default: a(() => [
|
|
153
|
-
o(D, {
|
|
154
|
-
modelValue: i.value.likeMaterialCode,
|
|
155
|
-
"onUpdate:modelValue": e[1] || (e[1] = (l) => i.value.likeMaterialCode = l),
|
|
156
|
-
placeholder: t.$t("materialInfo.materialCodeRequired"),
|
|
157
|
-
onKeyup: e[2] || (e[2] = P((l) => n(r).handleQuery(), ["enter"])),
|
|
158
|
-
class: "!w-[203px]"
|
|
159
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
160
|
-
]),
|
|
161
|
-
_: 1
|
|
162
|
-
}, 8, ["label"])
|
|
163
|
-
]),
|
|
164
|
-
_: 1
|
|
165
|
-
}),
|
|
166
|
-
o(v, { span: 6 }, {
|
|
167
|
-
default: a(() => [
|
|
168
|
-
o(k, {
|
|
169
|
-
label: t.$t("materialInfo.materialName"),
|
|
170
|
-
prop: "likeCategoryName"
|
|
171
|
-
}, {
|
|
172
|
-
default: a(() => [
|
|
173
|
-
o(D, {
|
|
174
|
-
modelValue: i.value.likeCategoryName,
|
|
175
|
-
"onUpdate:modelValue": e[3] || (e[3] = (l) => i.value.likeCategoryName = l),
|
|
176
|
-
placeholder: t.$t("materialInfo.materialNameRequired"),
|
|
177
|
-
onKeyup: e[4] || (e[4] = P((l) => n(r).handleQuery(), ["enter"])),
|
|
178
|
-
class: "!w-[203px]"
|
|
179
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
180
|
-
]),
|
|
181
|
-
_: 1
|
|
182
|
-
}, 8, ["label"])
|
|
183
|
-
]),
|
|
184
|
-
_: 1
|
|
185
|
-
}),
|
|
186
|
-
o(v, { span: 6 }, {
|
|
187
|
-
default: a(() => [
|
|
188
|
-
o(k, {
|
|
189
|
-
label: t.$t("materialInfo.specInfo"),
|
|
190
|
-
prop: "likeSpecInfo"
|
|
191
|
-
}, {
|
|
192
|
-
default: a(() => [
|
|
193
|
-
o(D, {
|
|
194
|
-
modelValue: i.value.likeSpecInfo,
|
|
195
|
-
"onUpdate:modelValue": e[5] || (e[5] = (l) => i.value.likeSpecInfo = l),
|
|
196
|
-
placeholder: t.$t("materialInfo.specInfoRequired"),
|
|
197
|
-
onKeyup: e[6] || (e[6] = P((l) => n(r).handleQuery(), ["enter"])),
|
|
198
|
-
class: "!w-[203px]"
|
|
199
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}, 8, ["label"])
|
|
203
|
-
]),
|
|
204
|
-
_: 1
|
|
205
|
-
})
|
|
206
|
-
]),
|
|
207
|
-
_: 1
|
|
208
|
-
}),
|
|
209
|
-
o(k, { class: "search-btn" }, {
|
|
210
|
-
default: a(() => [
|
|
211
|
-
o(y, {
|
|
212
|
-
type: "primary",
|
|
213
|
-
onClick: e[7] || (e[7] = (l) => n(r).handleQuery())
|
|
214
|
-
}, {
|
|
215
|
-
default: a(() => [
|
|
216
|
-
p(u(t.$t("common.search")), 1)
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
}),
|
|
220
|
-
o(y, {
|
|
221
|
-
onClick: e[8] || (e[8] = (l) => n(r).resetQuery())
|
|
222
|
-
}, {
|
|
223
|
-
default: a(() => [
|
|
224
|
-
p(u(t.$t("common.reset")), 1)
|
|
225
|
-
]),
|
|
226
|
-
_: 1
|
|
227
|
-
})
|
|
228
|
-
]),
|
|
229
|
-
_: 1
|
|
230
|
-
})
|
|
231
|
-
]),
|
|
232
|
-
_: 1
|
|
233
|
-
}, 8, ["model"]),
|
|
234
|
-
e[19] || (e[19] = _("div", { class: "clear" }, null, -1))
|
|
235
|
-
]),
|
|
236
|
-
o(X, {
|
|
237
|
-
shadow: "never",
|
|
238
|
-
class: "table-container"
|
|
239
|
-
}, {
|
|
240
|
-
header: a(() => [
|
|
241
|
-
o(S, null, {
|
|
242
|
-
default: a(() => [
|
|
243
|
-
o(v, { span: 17 }, {
|
|
244
|
-
default: a(() => [
|
|
245
|
-
I((d(), f(y, {
|
|
246
|
-
type: "primary",
|
|
247
|
-
onClick: B
|
|
248
|
-
}, {
|
|
249
|
-
default: a(() => [
|
|
250
|
-
p(u(t.$t("common.add")), 1)
|
|
251
|
-
]),
|
|
252
|
-
_: 1
|
|
253
|
-
})), [
|
|
254
|
-
[b, ["material:material_info:add"]]
|
|
255
|
-
]),
|
|
256
|
-
I((d(), f(y, {
|
|
257
|
-
type: "primary",
|
|
258
|
-
onClick: e[9] || (e[9] = (l) => n(r).deleteRecords())
|
|
259
|
-
}, {
|
|
260
|
-
default: a(() => [
|
|
261
|
-
p(u(t.$t("common.batchDelete")), 1)
|
|
262
|
-
]),
|
|
263
|
-
_: 1
|
|
264
|
-
})), [
|
|
265
|
-
[b, ["material:material_info:delete"]]
|
|
266
|
-
])
|
|
267
|
-
]),
|
|
268
|
-
_: 1
|
|
269
|
-
}),
|
|
270
|
-
o(v, {
|
|
271
|
-
span: 7,
|
|
272
|
-
class: "container-float"
|
|
273
|
-
}, {
|
|
274
|
-
default: a(() => [
|
|
275
|
-
I((d(), f(y, {
|
|
276
|
-
plain: "",
|
|
277
|
-
type: "primary",
|
|
278
|
-
onClick: e[10] || (e[10] = (l) => C.value = !0)
|
|
279
|
-
}, {
|
|
280
|
-
default: a(() => [
|
|
281
|
-
p(u(t.$t("common.import")), 1)
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
})), [
|
|
285
|
-
[b, ["material:material_info:import"]]
|
|
286
|
-
]),
|
|
287
|
-
I((d(), f(y, {
|
|
288
|
-
plain: "",
|
|
289
|
-
type: "primary",
|
|
290
|
-
onClick: e[11] || (e[11] = (l) => n(r).handleExport(n(c)("materialInfo.name")))
|
|
291
|
-
}, {
|
|
292
|
-
default: a(() => [
|
|
293
|
-
p(u(t.$t("common.export")), 1)
|
|
294
|
-
]),
|
|
295
|
-
_: 1
|
|
296
|
-
})), [
|
|
297
|
-
[b, ["material:material_info:export"]]
|
|
298
|
-
]),
|
|
299
|
-
o(J, {
|
|
300
|
-
modelValue: n(g),
|
|
301
|
-
"onUpdate:modelValue": e[12] || (e[12] = (l) => T(g) ? g.value = l : g = l),
|
|
302
|
-
"label-name": "mat-material-info"
|
|
303
|
-
}, null, 8, ["modelValue"])
|
|
304
|
-
]),
|
|
305
|
-
_: 1
|
|
306
|
-
})
|
|
307
|
-
]),
|
|
308
|
-
_: 1
|
|
309
|
-
})
|
|
310
|
-
]),
|
|
311
|
-
footer: a(() => [
|
|
312
|
-
n($) > 0 ? (d(), f(W, {
|
|
313
|
-
key: 0,
|
|
314
|
-
total: n($),
|
|
315
|
-
"onUpdate:total": e[13] || (e[13] = (l) => T($) ? $.value = l : null),
|
|
316
|
-
"current-page": i.value.curPage,
|
|
317
|
-
"onUpdate:currentPage": e[14] || (e[14] = (l) => i.value.curPage = l),
|
|
318
|
-
"page-size": i.value.pageSize,
|
|
319
|
-
"onUpdate:pageSize": e[15] || (e[15] = (l) => i.value.pageSize = l),
|
|
320
|
-
onPagination: e[16] || (e[16] = (l) => n(r).getList())
|
|
321
|
-
}, null, 8, ["total", "current-page", "page-size"])) : R("", !0)
|
|
322
|
-
]),
|
|
323
|
-
default: a(() => [
|
|
324
|
-
o(O, {
|
|
325
|
-
ref_key: "multipleTableRef",
|
|
326
|
-
ref: j,
|
|
327
|
-
"row-key": "materialId",
|
|
328
|
-
"list-loading": n(q),
|
|
329
|
-
data: n(E),
|
|
330
|
-
"table-label": n(g),
|
|
331
|
-
onSelectionChange: L,
|
|
332
|
-
onSortChange: Q
|
|
333
|
-
}, {
|
|
334
|
-
categoryId: a((l) => [
|
|
335
|
-
_("span", null, u(n(w).materialCategoryBizDict.getValue(l.data.row.categoryId)), 1)
|
|
336
|
-
]),
|
|
337
|
-
unitPrice: a((l) => [
|
|
338
|
-
_("span", null, u(l.data.row.unitPrice | 0) + "元 ", 1)
|
|
339
|
-
]),
|
|
340
|
-
plannerId: a((l) => [
|
|
341
|
-
_("span", null, u(n(w).userDict.getValue(l.data.row.plannerId)), 1)
|
|
342
|
-
]),
|
|
343
|
-
operation: a((l) => [
|
|
344
|
-
I((d(), N("span", {
|
|
345
|
-
class: "el-button-color",
|
|
346
|
-
onClick: (Z) => K(l.data.row)
|
|
347
|
-
}, [
|
|
348
|
-
p(u(t.$t("common.edit")), 1)
|
|
349
|
-
], 8, me)), [
|
|
350
|
-
[b, ["material:material_info:update"]]
|
|
351
|
-
]),
|
|
352
|
-
I((d(), N("span", {
|
|
353
|
-
class: "el-button-color dropdown-left",
|
|
354
|
-
onClick: (Z) => n(r).deleteRecord(l.data.row)
|
|
355
|
-
}, [
|
|
356
|
-
p(u(t.$t("common.delete")), 1)
|
|
357
|
-
], 8, ue)), [
|
|
358
|
-
[b, ["material:material_info:delete"]]
|
|
359
|
-
])
|
|
360
|
-
]),
|
|
361
|
-
_: 1
|
|
362
|
-
}, 8, ["list-loading", "data", "table-label"])
|
|
363
|
-
]),
|
|
364
|
-
_: 1
|
|
365
|
-
}),
|
|
366
|
-
s.value.visible ? (d(), f(ne, {
|
|
367
|
-
key: 0,
|
|
368
|
-
modelValue: s.value.visible,
|
|
369
|
-
"onUpdate:modelValue": e[17] || (e[17] = (l) => s.value.visible = l),
|
|
370
|
-
title: s.value.title,
|
|
371
|
-
"entity-key": n(h),
|
|
372
|
-
onRefresh: M,
|
|
373
|
-
width: "900px"
|
|
374
|
-
}, null, 8, ["modelValue", "title", "entity-key"])) : R("", !0),
|
|
375
|
-
C.value ? (d(), f(Y, {
|
|
376
|
-
key: 1,
|
|
377
|
-
"upload-visible": C.value,
|
|
378
|
-
"template-title": t.$t("sysUser.templateDownload"),
|
|
379
|
-
onTemplateDown: e[18] || (e[18] = (l) => n(r).downloadTemplate(n(c)("materialInfo.name"))),
|
|
380
|
-
onImportEvents: F,
|
|
381
|
-
onUploadClosed: A
|
|
382
|
-
}, null, 8, ["upload-visible", "template-title"])) : R("", !0)
|
|
383
|
-
]);
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
export {
|
|
388
|
-
ye as default
|
|
389
|
-
};
|