xyvcard-itsm-flow 0.0.8 → 0.0.10

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.
Files changed (27) hide show
  1. package/dist/{common--K4gGsNT.mjs → common-Cwl5jzlM.mjs} +1 -1
  2. package/dist/{edit-B621RtNS.mjs → edit-BnJnxvY6.mjs} +1 -1
  3. package/dist/{edit-CoRzQ2SK.mjs → edit-D8J1Znw_.mjs} +1 -1
  4. package/dist/{edit-Czk64Yon.mjs → edit-har-8Y54.mjs} +1 -1
  5. package/dist/{edit.vue_vue_type_script_setup_true_lang-D-UzvXtU.mjs → edit.vue_vue_type_script_setup_true_lang-BZ-prpPo.mjs} +94 -96
  6. package/dist/{edit.vue_vue_type_script_setup_true_lang-AhC28_ys.mjs → edit.vue_vue_type_script_setup_true_lang-QsTI3qOD.mjs} +1 -1
  7. package/dist/edit.vue_vue_type_script_setup_true_lang-TXBAzoPS.mjs +553 -0
  8. package/dist/{el-message-FfNjxLv_.mjs → el-message-CIdVBT5R.mjs} +1 -1
  9. package/dist/{index-BCP5cBN6.mjs → index-BAHlhmvh.mjs} +60 -61
  10. package/dist/{index-DX1PURJy.mjs → index-BjBTIknS.mjs} +115 -114
  11. package/dist/{index-B5vmtcUk.mjs → index-C6XFHtva.mjs} +92 -95
  12. package/dist/{index-CVbpEq7V.mjs → index-CF0oM0UA.mjs} +139 -100
  13. package/dist/{index-CdzhLCkX.mjs → index-Cp3csR1g.mjs} +3 -3
  14. package/dist/{index-Dld6YbIV.mjs → index-DBIF93AC.mjs} +177 -150
  15. package/dist/{index-BlBkHqXR.mjs → index-DKIrRXT5.mjs} +2 -2
  16. package/dist/{index-CRHpl0qA.mjs → index-DnFWLmFk.mjs} +58 -59
  17. package/dist/{index-DY7ZV5kq.mjs → index-DugZK_BS.mjs} +96 -78
  18. package/dist/{index-BJl7xHYx.mjs → index-bMREgnhp.mjs} +14 -14
  19. package/dist/index.mjs +63 -60
  20. package/dts/api/itsm-flow-acceptance/index.d.ts +3 -1
  21. package/dts/api/itsm-flow-acceptance/types.d.ts +24 -1
  22. package/dts/api/itsm-flow-entrust/index.d.ts +0 -3
  23. package/dts/constant.d.ts +3 -0
  24. package/dts/lang/itsm-flow/zh-cn.d.ts +3 -0
  25. package/dts/views/itsm-flow-acceptance/edit.vue.d.ts +4 -4
  26. package/package.json +1 -1
  27. package/dist/edit.vue_vue_type_script_setup_true_lang-BYz7O3Xi.mjs +0 -523
@@ -1,13 +1,12 @@
1
- import { defineComponent as ae, mergeModels as ne, ref as g, useModel as se, reactive as E, computed as de, resolveComponent as i, openBlock as k, createElementBlock as D, Fragment as B, createVNode as t, withCtx as a, createElementVNode as r, unref as d, renderList as re, createBlock as O, createTextVNode as N, toDisplayString as w, createCommentVNode as ie } from "vue";
1
+ import { defineComponent as ne, mergeModels as se, ref as g, useModel as de, reactive as C, computed as re, resolveComponent as u, openBlock as k, createElementBlock as E, Fragment as D, createVNode as t, withCtx as a, createElementVNode as r, unref as d, renderList as ue, createBlock as B, createTextVNode as N, toDisplayString as I, createCommentVNode as ie } from "vue";
2
2
  import "element-plus";
3
- import { useRoute as ue } from "vue-router";
4
3
  import { useI18n as ce } from "vue-i18n";
5
- import { g as me, C as M, D as I, e as pe, h as fe, p as be } from "./index-DY7ZV5kq.mjs";
6
- import { i as z, t as ve, a as ge } from "./common--K4gGsNT.mjs";
7
- import { E as Ne } from "./el-message-FfNjxLv_.mjs";
8
- const Ue = /* @__PURE__ */ ae({
4
+ import { g as me, C as O, D as U, h as M, p as pe, e as fe } from "./index-DugZK_BS.mjs";
5
+ import { i as z, t as be, a as ve } from "./common-Cwl5jzlM.mjs";
6
+ import { E as ge } from "./el-message-CIdVBT5R.mjs";
7
+ const _e = /* @__PURE__ */ ne({
9
8
  __name: "index",
10
- props: /* @__PURE__ */ ne({
9
+ props: /* @__PURE__ */ se({
11
10
  task: {
12
11
  type: Object,
13
12
  default: () => {
@@ -20,18 +19,18 @@ const Ue = /* @__PURE__ */ ae({
20
19
  emits: ["update:modelValue"],
21
20
  setup(_, { expose: A }) {
22
21
  const { t: h } = ce(), R = g([]), F = new me({
23
- applyStatus: M.applyStatus.finished
22
+ applyStatus: O.applyStatus.finished
24
23
  });
25
- F.useValues(), I.orgIdBizDict.useValues();
26
- const P = ue(), U = _, V = g({
24
+ F.useValues(), U.orgIdBizDict.useValues();
25
+ const w = _, V = g({
27
26
  curPage: 1,
28
27
  pageSize: 10,
29
- reckoningId: P.query.applyId
30
- }), f = se(_, "modelValue"), $ = g();
31
- let n = E({
28
+ reckoningId: w.task.businessKey
29
+ }), f = de(_, "modelValue"), $ = g();
30
+ let n = C({
32
31
  requestId: Math.random() * 10 + ""
33
32
  });
34
- const S = de(() => p.value.map((l) => ({
33
+ const P = re(() => p.value.map((l) => ({
35
34
  cost: typeof l.cost == "number" ? l.cost : 0,
36
35
  duration: typeof l.duration == "number" ? l.duration : 0
37
36
  }))), p = g([
@@ -43,7 +42,7 @@ const Ue = /* @__PURE__ */ ae({
43
42
  entrustUserId: ""
44
43
  }
45
44
  ]);
46
- function j() {
45
+ function S() {
47
46
  p.value.push({
48
47
  userId: "",
49
48
  idNo: "",
@@ -52,11 +51,11 @@ const Ue = /* @__PURE__ */ ae({
52
51
  entrustUserId: ""
53
52
  });
54
53
  }
55
- function L(l) {
54
+ function j(l) {
56
55
  const e = p.value.indexOf(l.row);
57
56
  e !== 0 && p.value.splice(e, 1);
58
57
  }
59
- const T = E({
58
+ const L = C({
60
59
  acceptanceNo: [
61
60
  {
62
61
  required: !0,
@@ -72,63 +71,65 @@ const Ue = /* @__PURE__ */ ae({
72
71
  }
73
72
  ]
74
73
  });
75
- U.task.businessKey && K(), A({
76
- changeModel: () => J()
74
+ w.task.businessKey && K(), A({
75
+ changeModel: () => Q()
77
76
  });
78
- function K() {
79
- V.value.reckoningId = U.task.businessKey, z.findById({ reckoningId: V.value.reckoningId }).then(({ data: l }) => {
80
- Object.assign(n, l), y(l.acceptanceNo), pe.findList({ actionId: l.entrustId }).then(({ data: e }) => {
81
- const s = e.results.map(
82
- (c) => ({
83
- ...c
84
- // duration:
85
- // typeof item.duration === "string"
86
- // ? ((item.duration.split(",") || []) as string[])
87
- // : [],
88
- })
89
- );
90
- p.value = s;
91
- });
77
+ function T() {
78
+ fe.findList({ actionId: V.value.reckoningId }).then(({ data: l }) => {
79
+ const e = l.results.map(
80
+ (s) => ({
81
+ ...s,
82
+ duration: Number(s.duration)
83
+ })
84
+ );
85
+ p.value = e;
92
86
  });
93
87
  }
88
+ function K() {
89
+ z.findById({ reckoningId: V.value.reckoningId }).then(({ data: l }) => {
90
+ Object.assign(n, l), b.value = new M({
91
+ actionId: (l == null ? void 0 : l.entrustId) ?? ""
92
+ }), b.value.useValues();
93
+ }), T();
94
+ }
94
95
  function W() {
95
- v.value = { values: [] }, p.value.forEach((l) => {
96
+ b.value = { values: [] }, p.value.forEach((l) => {
96
97
  l.userId = "", l.idNo = "", l.cost = 0, l.duration = 0;
97
98
  });
98
99
  }
99
- const v = g({});
100
- function y(l) {
100
+ const b = g({});
101
+ function G(l) {
101
102
  const e = F.values.find(
102
103
  (s) => s.key === l
103
104
  );
104
- n.contractName = (e == null ? void 0 : e.contractName) ?? "", n.contractNo = (e == null ? void 0 : e.contractNo) ?? "", n.serviceOrg = (e == null ? void 0 : e.serviceOrg) ?? "", n.entrustName = (e == null ? void 0 : e.entrustName) ?? "", n.orderNo = (e == null ? void 0 : e.orderNo) ?? "", n.serviceContent = (e == null ? void 0 : e.serviceContent) ?? "", n.entrustId = (e == null ? void 0 : e.entrustId) ?? "", n.acceptanceId = (e == null ? void 0 : e.acceptanceId) ?? "", W(), v.value = new fe({
105
- actionId: e.entrustId
106
- }), v.value.useValues();
105
+ n.contractName = (e == null ? void 0 : e.contractName) ?? "", n.contractNo = (e == null ? void 0 : e.contractNo) ?? "", n.serviceOrg = (e == null ? void 0 : e.serviceOrg) ?? "", n.entrustName = (e == null ? void 0 : e.entrustName) ?? "", n.orderNo = (e == null ? void 0 : e.orderNo) ?? "", n.serviceContent = (e == null ? void 0 : e.serviceContent) ?? "", n.entrustId = (e == null ? void 0 : e.entrustId) ?? "", n.acceptanceId = (e == null ? void 0 : e.acceptanceId) ?? "", W(), b.value = new M({
106
+ actionId: (e == null ? void 0 : e.entrustId) ?? ""
107
+ }), b.value.useValues();
107
108
  }
108
- function G(l, e) {
109
- const s = v.value.values.find(
109
+ function H(l, e) {
110
+ const s = b.value.values.find(
110
111
  (c) => c.key === l
111
112
  );
112
113
  s ? (e.userName = s.value ?? "", e.idNo = s.idNo ?? "", e.cost = Number(s.cost) || 0, e.entrustUserId = s.entrustUserId ?? "") : (e.userName = "", e.idNo = "", e.cost = 0, e.entrustUserId = "");
113
114
  }
114
- function H() {
115
+ function J() {
115
116
  R.value = p.value.map((l) => ({
116
117
  entrustUserId: l.entrustUserId,
117
118
  duration: (l.duration ?? 0).toString()
118
119
  })).filter((l) => l.entrustUserId && l.duration !== "0");
119
120
  }
120
- function J() {
121
+ function Q() {
121
122
  return f.value && (f.value.selectActions = [
122
123
  { key: "true", value: "同意" },
123
124
  { key: "false", value: "不同意" }
124
- ], f.value.varName = "approved", f.value.module = "", f.value.module = M.MODULE_ITSMFLOW), new Promise((l, e) => {
125
+ ], f.value.varName = "approved", f.value.module = "", f.value.module = O.MODULE_ITSMFLOW), new Promise((l, e) => {
125
126
  var s;
126
127
  (s = $.value) == null || s.validate((c) => {
127
- c ? f.value && (f.value.comment = "", H(), n.requestId = Math.random() * 10 + "", z.save({
128
+ c ? f.value && (f.value.comment = "", J(), n.requestId = Math.random() * 10 + "", z.save({
128
129
  ...n,
129
130
  entrustUser: R.value
130
131
  }).then((m) => {
131
- m.status === 200 ? l(!0) : (Ne({
132
+ m.status === 200 ? l(!0) : (ge({
132
133
  message: "保存失败,请联系管理员!",
133
134
  type: "error"
134
135
  }), e(!1));
@@ -137,20 +138,20 @@ const Ue = /* @__PURE__ */ ae({
137
138
  });
138
139
  }
139
140
  return (l, e) => {
140
- const s = i("el-col"), c = i("el-input"), m = i("el-form-item"), Q = i("jmash-dict-select"), q = i("jmash-select"), C = i("el-row"), b = i("el-table-column"), X = i("el-option"), Y = i("el-select"), Z = i("el-input-number"), x = i("DeleteFilled"), ee = i("el-icon"), le = i("el-table"), te = i("el-button"), oe = i("el-form");
141
- return k(), D(B, null, [
141
+ const s = u("el-col"), c = u("el-input"), m = u("el-form-item"), X = u("jmash-dict-select"), y = u("jmash-select"), q = u("el-row"), v = u("el-table-column"), Y = u("el-option"), Z = u("el-select"), x = u("el-input-number"), ee = u("DeleteFilled"), le = u("el-icon"), te = u("el-table"), oe = u("el-button"), ae = u("el-form");
142
+ return k(), E(D, null, [
142
143
  t(s, { span: 24 }, {
143
144
  default: a(() => e[8] || (e[8] = [
144
145
  r("div", { class: "title" }, "委托服务合同结算清单", -1)
145
146
  ])),
146
147
  _: 1
147
148
  }),
148
- t(oe, {
149
+ t(ae, {
149
150
  ref_key: "taskFormRef",
150
151
  ref: $,
151
152
  model: d(n),
152
153
  "label-width": "150px",
153
- rules: T,
154
+ rules: L,
154
155
  class: "custom-table-form custom-form"
155
156
  }, {
156
157
  default: a(() => [
@@ -199,11 +200,11 @@ const Ue = /* @__PURE__ */ ae({
199
200
  prop: "entrustName"
200
201
  }, {
201
202
  default: a(() => [
202
- t(Q, {
203
+ t(X, {
203
204
  modelValue: d(n).entrustName,
204
205
  "onUpdate:modelValue": e[2] || (e[2] = (o) => d(n).entrustName = o),
205
206
  placeholder: l.$t("itsmFlowReckoning.acceptanceNoRequired"),
206
- data: d(I).projectNameDict.values,
207
+ data: d(U).projectNameDict.values,
207
208
  disabled: "",
208
209
  class: "w-full"
209
210
  }, null, 8, ["modelValue", "placeholder", "data"])
@@ -220,11 +221,11 @@ const Ue = /* @__PURE__ */ ae({
220
221
  prop: "serviceOrg"
221
222
  }, {
222
223
  default: a(() => [
223
- t(q, {
224
+ t(y, {
224
225
  modelValue: d(n).serviceOrg,
225
226
  "onUpdate:modelValue": e[3] || (e[3] = (o) => d(n).serviceOrg = o),
226
227
  placeholder: l.$t("itsmFlowReckoning.acceptanceNoRequired"),
227
- data: d(I).orgIdBizDict.values,
228
+ data: d(U).orgIdBizDict.values,
228
229
  disabled: "",
229
230
  class: "w-full"
230
231
  }, null, 8, ["modelValue", "placeholder", "data"])
@@ -241,7 +242,7 @@ const Ue = /* @__PURE__ */ ae({
241
242
  prop: "acceptanceNo"
242
243
  }, {
243
244
  default: a(() => [
244
- t(q, {
245
+ t(y, {
245
246
  modelValue: d(n).acceptanceNo,
246
247
  "onUpdate:modelValue": e[4] || (e[4] = (o) => d(n).acceptanceNo = o),
247
248
  placeholder: l.$t("itsmFlowReckoning.acceptanceNoRequireds"),
@@ -249,7 +250,7 @@ const Ue = /* @__PURE__ */ ae({
249
250
  clearable: "",
250
251
  filterable: "",
251
252
  class: "w-full",
252
- onChange: y
253
+ onChange: G
253
254
  }, null, 8, ["modelValue", "placeholder", "data"])
254
255
  ]),
255
256
  _: 1
@@ -257,7 +258,7 @@ const Ue = /* @__PURE__ */ ae({
257
258
  ]),
258
259
  _: 1
259
260
  }),
260
- t(C, null, {
261
+ t(q, null, {
261
262
  default: a(() => [
262
263
  t(s, { span: 24 }, {
263
264
  default: a(() => [
@@ -324,39 +325,38 @@ const Ue = /* @__PURE__ */ ae({
324
325
  ]),
325
326
  _: 1
326
327
  }),
327
- t(le, {
328
+ t(te, {
328
329
  data: p.value,
329
330
  border: "",
330
331
  style: { width: "100%" }
331
332
  }, {
332
333
  default: a(() => [
333
- t(b, {
334
+ t(v, {
334
335
  type: "index",
335
336
  label: l.$t("itsmFlowEntrustUser.index"),
336
337
  width: "60",
337
338
  align: "center"
338
339
  }, null, 8, ["label"]),
339
- t(b, {
340
+ t(v, {
340
341
  prop: "userId",
341
342
  label: l.$t("itsmFlowEntrustUser.userId"),
342
- "header-align": "center",
343
- width: "150"
343
+ "header-align": "center"
344
344
  }, {
345
345
  default: a(({ row: o }) => [
346
- t(Y, {
346
+ t(Z, {
347
347
  modelValue: o.userId,
348
- "onUpdate:modelValue": (u) => o.userId = u,
348
+ "onUpdate:modelValue": (i) => o.userId = i,
349
349
  placeholder: l.$t("itsmFlowEntrustUser.userIdRequired"),
350
350
  class: "w-full",
351
351
  filterable: "",
352
352
  clearable: "",
353
- onChange: (u) => G(u, o)
353
+ onChange: (i) => H(i, o)
354
354
  }, {
355
355
  default: a(() => [
356
- (k(!0), D(B, null, re(v.value.values, (u) => (k(), O(X, {
357
- key: u.key,
358
- label: u.value,
359
- value: u.key
356
+ (k(!0), E(D, null, ue(b.value.values, (i) => (k(), B(Y, {
357
+ key: i.key,
358
+ label: i.value,
359
+ value: i.key
360
360
  }, null, 8, ["label", "value"]))), 128))
361
361
  ]),
362
362
  _: 2
@@ -364,46 +364,43 @@ const Ue = /* @__PURE__ */ ae({
364
364
  ]),
365
365
  _: 1
366
366
  }, 8, ["label"]),
367
- t(b, {
367
+ t(v, {
368
368
  label: l.$t("itsmFlowEntrustUser.idNo"),
369
- "header-align": "center",
370
- width: "190"
369
+ "header-align": "center"
371
370
  }, {
372
371
  default: a(({ row: o }) => [
373
372
  t(c, {
374
373
  modelValue: o.idNo,
375
- "onUpdate:modelValue": (u) => o.idNo = u,
374
+ "onUpdate:modelValue": (i) => o.idNo = i,
376
375
  placeholder: l.$t("itsmFlowEntrustUser.userIdRequireds"),
377
376
  disabled: ""
378
377
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
379
378
  ]),
380
379
  _: 1
381
380
  }, 8, ["label"]),
382
- t(b, {
381
+ t(v, {
383
382
  label: l.$t("itsmFlowEntrustUser.cost"),
384
- "header-align": "center",
385
- width: "130"
383
+ "header-align": "center"
386
384
  }, {
387
385
  default: a(({ row: o }) => [
388
386
  t(c, {
389
387
  modelValue: o.cost,
390
- "onUpdate:modelValue": (u) => o.cost = u,
388
+ "onUpdate:modelValue": (i) => o.cost = i,
391
389
  placeholder: l.$t("itsmFlowEntrustUser.userIdRequireds"),
392
390
  disabled: ""
393
391
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
394
392
  ]),
395
393
  _: 1
396
394
  }, 8, ["label"]),
397
- t(b, {
395
+ t(v, {
398
396
  prop: "duration",
399
397
  label: l.$t("itsmFlowReckoning.serviceTime"),
400
- "header-align": "center",
401
- width: "140"
398
+ "header-align": "center"
402
399
  }, {
403
400
  default: a(({ row: o }) => [
404
- t(Z, {
401
+ t(x, {
405
402
  modelValue: o.duration,
406
- "onUpdate:modelValue": (u) => o.duration = u,
403
+ "onUpdate:modelValue": (i) => o.duration = i,
407
404
  precision: 1,
408
405
  step: 0.1,
409
406
  min: 0,
@@ -412,31 +409,31 @@ const Ue = /* @__PURE__ */ ae({
412
409
  ]),
413
410
  _: 1
414
411
  }, 8, ["label"]),
415
- t(b, {
412
+ t(v, {
416
413
  prop: "totalAmount",
417
414
  label: l.$t("itsmFlowReckoning.totalAmount"),
418
415
  "header-align": "center"
419
416
  }, {
420
417
  default: a(({ row: o }) => [
421
- N(w(d(ve)(o.cost, o.duration)), 1)
418
+ N(I(d(be)(o.cost, o.duration)) + "元 ", 1)
422
419
  ]),
423
420
  _: 1
424
421
  }, 8, ["label"]),
425
- t(b, {
422
+ t(v, {
426
423
  label: l.$t("common.operate"),
427
424
  width: "60",
428
425
  align: "center"
429
426
  }, {
430
427
  default: a((o) => [
431
- o.$index !== 0 ? (k(), O(ee, {
428
+ o.$index !== 0 ? (k(), B(le, {
432
429
  key: 0,
433
- onClick: (u) => L(o),
430
+ onClick: (i) => j(o),
434
431
  size: "18",
435
432
  style: { cursor: "pointer", color: "inherit" },
436
433
  class: "hover-blue"
437
434
  }, {
438
435
  default: a(() => [
439
- t(x)
436
+ t(ee)
440
437
  ]),
441
438
  _: 2
442
439
  }, 1032, ["onClick"])) : ie("", !0)
@@ -446,13 +443,13 @@ const Ue = /* @__PURE__ */ ae({
446
443
  ]),
447
444
  _: 1
448
445
  }, 8, ["data"]),
449
- t(te, {
450
- icon: d(be),
446
+ t(oe, {
447
+ icon: d(pe),
451
448
  class: "addButton",
452
- onClick: j
449
+ onClick: S
453
450
  }, {
454
451
  default: a(() => [
455
- N(w(d(h)("common.add")), 1)
452
+ N(I(d(h)("common.add")), 1)
456
453
  ]),
457
454
  _: 1
458
455
  }, 8, ["icon"]),
@@ -465,14 +462,14 @@ const Ue = /* @__PURE__ */ ae({
465
462
  label: l.$t("itsmFlowReckoning.totalPrice")
466
463
  }, {
467
464
  default: a(() => [
468
- N(w(d(ge)(S.value)), 1)
465
+ N(I(d(ve)(P.value)) + "元 ", 1)
469
466
  ]),
470
467
  _: 1
471
468
  }, 8, ["label"])
472
469
  ]),
473
470
  _: 1
474
471
  }),
475
- t(C, { class: "bordered-row" }, {
472
+ t(q, { class: "bordered-row" }, {
476
473
  default: a(() => [
477
474
  t(s, { span: 12 }, {
478
475
  default: a(() => e[9] || (e[9] = [
@@ -524,5 +521,5 @@ const Ue = /* @__PURE__ */ ae({
524
521
  }
525
522
  });
526
523
  export {
527
- Ue as default
524
+ _e as default
528
525
  };