sooyie-material 0.0.3 → 0.0.5

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