@bytenew/bn-bus-ui 1.1.399

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 (46) hide show
  1. package/README.md +637 -0
  2. package/common.scss +715 -0
  3. package/dist/assocTableSearch-C9KUFIpd.js +349 -0
  4. package/dist/assocTableSearch.css +1 -0
  5. package/dist/bn-bus-ui.es.js +58 -0
  6. package/dist/bn-bus-ui.umd.js +42 -0
  7. package/dist/chooseIPaasData-Bfm58C-0.js +391 -0
  8. package/dist/chooseIPaasData.css +1 -0
  9. package/dist/defaultSet-BA11k622.js +322 -0
  10. package/dist/defaultSet.css +1 -0
  11. package/dist/fileFormData-D_Q1vylE.js +53 -0
  12. package/dist/formItemFooter-B3nlSwnS.js +108 -0
  13. package/dist/formItemFooter.css +1 -0
  14. package/dist/funcExprDialog-DeHPFa-L.js +139 -0
  15. package/dist/funcExprDialog.css +1 -0
  16. package/dist/index-B8KbssVN.js +45 -0
  17. package/dist/index-CTZ-0Tyh.js +45 -0
  18. package/dist/index-CZOFm8wK.js +135 -0
  19. package/dist/index-C_ix9-hS.js +44 -0
  20. package/dist/index-Cov88CtD.js +221 -0
  21. package/dist/index-DAtLc2a1.js +89 -0
  22. package/dist/index-DCbIfKgk.js +66 -0
  23. package/dist/index-DDy1d3BS.js +178 -0
  24. package/dist/index-DJ15iYPg.js +89 -0
  25. package/dist/index-DNHXG3dr.js +62 -0
  26. package/dist/index-Dg5V1uNO.js +740 -0
  27. package/dist/index-Dme97Hra.js +118 -0
  28. package/dist/index-DnzoAsk8.js +109 -0
  29. package/dist/index-DrngruPb.js +64 -0
  30. package/dist/index-Q08paoUN.js +51 -0
  31. package/dist/index-VbL1cqCu.js +58 -0
  32. package/dist/index-aooX1QXm.js +183 -0
  33. package/dist/index.css +1 -0
  34. package/dist/index2.css +1 -0
  35. package/dist/index3.css +1 -0
  36. package/dist/index4.css +1 -0
  37. package/dist/index5.css +1 -0
  38. package/dist/index6.css +1 -0
  39. package/dist/index7.css +1 -0
  40. package/dist/install-DSQCBsd_.js +19155 -0
  41. package/dist/install.css +1 -0
  42. package/dist/setOption-BOD7nAuG.js +329 -0
  43. package/dist/setOption.css +1 -0
  44. package/dist/setRelationOption-D7FqiLWj.js +5217 -0
  45. package/dist/setRelationOption.css +1 -0
  46. package/package.json +57 -0
@@ -0,0 +1,740 @@
1
+ import { debounce as V } from "lodash";
2
+ import { _ as x, p as z, i as $ } from "./install-DSQCBsd_.js";
3
+ import { f as P } from "./fileFormData-D_Q1vylE.js";
4
+ import { resolveComponent as d, openBlock as i, createElementBlock as p, createElementVNode as r, createVNode as h, withCtx as u, createTextVNode as y, toDisplayString as C, withDirectives as U, vShow as Y, createCommentVNode as f, resolveDirective as M, createBlock as _, Fragment as S, renderList as T } from "vue";
5
+ import { a as j, f as R } from "./formItemFooter-B3nlSwnS.js";
6
+ const H = {
7
+ name: "childFormFile",
8
+ props: {
9
+ column: {
10
+ type: Object,
11
+ default: () => ({})
12
+ },
13
+ value: {
14
+ type: Array,
15
+ default: () => []
16
+ }
17
+ },
18
+ data() {
19
+ return {
20
+ fileType: this.column.fileType || P,
21
+ pasteValue: "",
22
+ pasteImgList: [],
23
+ //用来存放粘贴的图片
24
+ // 上传进度
25
+ uploadProgress: 0,
26
+ uploadFileCount: 0,
27
+ //记录上传次数,限制最多上传5个
28
+ uploadFileNumber: 10,
29
+ //可上传附件那个数
30
+ showLimit: 15,
31
+ //单文件最大M数
32
+ uploadAction: "/v2/attachment/upload",
33
+ uploadData: { source: "task" }
34
+ };
35
+ },
36
+ methods: {
37
+ /**
38
+ * 上传成功
39
+ * */
40
+ fileSuccess(o) {
41
+ if (this.column.error = "", this.uploadProgress = 0, o.code)
42
+ this.$message({
43
+ message: o.msg,
44
+ type: "warning"
45
+ });
46
+ else {
47
+ const e = {
48
+ title: o.data.fileName,
49
+ id: o.data.id,
50
+ code: o.data.id,
51
+ size: o.data.fileSize,
52
+ type: o.data.suffix,
53
+ url: o.data.url
54
+ };
55
+ this.value.length < this.uploadFileNumber ? (this.value.push(e), this.$emit("onChange", this.column)) : this.$message({
56
+ message: `上传文件个数不能超过${this.uploadFileNumber}个`,
57
+ type: "warning"
58
+ }), this.uploadFileCount = this.value.length;
59
+ }
60
+ },
61
+ /**
62
+ * 附件上传前
63
+ * */
64
+ beforeUpload(o) {
65
+ if (this.value.length >= this.uploadFileNumber)
66
+ return this.$message({
67
+ message: `上传文件个数不能超过${this.uploadFileNumber}个`,
68
+ type: "warning"
69
+ }), !1;
70
+ const e = 50, t = 1048576 * e;
71
+ if (o.size > t)
72
+ return this.$message({
73
+ message: `上传文件大小不能超出${e}MB`,
74
+ type: "warning"
75
+ }), !1;
76
+ const m = o.name.split(".").pop().toLowerCase();
77
+ return this.fileType.includes(m) ? (this.uploadFileCount++, !0) : (this.$message({
78
+ message: "上传的文件格式不支持",
79
+ type: "warning"
80
+ }), !1);
81
+ },
82
+ handleUploadProgress(o) {
83
+ this.uploadProgress = Math.round(o.percent);
84
+ },
85
+ //粘贴图片到编辑器,事件处理方法,主要用于事件销毁
86
+ pasteEvent(o) {
87
+ if (this.value.length >= this.uploadFileNumber)
88
+ return this.$message({
89
+ message: `上传文件个数不能超过${this.uploadFileNumber}个`,
90
+ type: "warning"
91
+ }), !1;
92
+ this.column.error = "", this.pasteImgList.push(o), z(o, this.column.pathUrl || this.uploadAction).then((e) => {
93
+ if (e.code)
94
+ this.$message({
95
+ message: e.msg,
96
+ type: "warning"
97
+ });
98
+ else {
99
+ const t = {
100
+ title: e.data.fileName,
101
+ id: e.data.id,
102
+ code: e.data.id,
103
+ size: e.data.fileSize,
104
+ type: e.data.suffix,
105
+ url: e.data.url
106
+ };
107
+ this.value.push(t), this.$emit("onChange", this.column), this.value.length >= this.uploadFileNumber && (this.pasteImgList = []);
108
+ }
109
+ });
110
+ }
111
+ },
112
+ mounted() {
113
+ this.$refs.fileUploadInput && this.$refs.fileUploadInput.$el && this.$refs.fileUploadInput.$el.addEventListener("paste", this.pasteEvent);
114
+ },
115
+ //实例销毁前
116
+ beforeDestroy() {
117
+ this.$refs.fileUploadInput && this.$refs.fileUploadInput.$el && this.$refs.fileUploadInput.$el.removeEventListener(
118
+ "paste",
119
+ this.pasteEvent
120
+ );
121
+ }
122
+ }, J = { class: "childFormFile" }, q = { class: "" }, K = { class: "childFormFile-tip" }, W = { key: 0 };
123
+ function X(o, e, t, m, c, n) {
124
+ const b = d("el-upload"), v = d("el-input"), g = d("el-progress"), w = d("BnFileView");
125
+ return i(), p("div", J, [
126
+ r("div", q, [
127
+ h(b, {
128
+ class: "childFormFile-upload",
129
+ ref: "uploadInput",
130
+ drag: "",
131
+ action: t.column.pathUrl || c.uploadAction,
132
+ "show-file-list": !1,
133
+ "before-upload": n.beforeUpload,
134
+ multiple: "",
135
+ data: c.uploadData,
136
+ "on-progress": n.handleUploadProgress,
137
+ "on-success": n.fileSuccess
138
+ }, {
139
+ default: u(() => [...e[1] || (e[1] = [
140
+ r("div", { class: "childFormFile-btn" }, [
141
+ r("span", { class: "bnUIcon bnUIcon-upload" }),
142
+ y(" 选择或拖拽上传文件 ")
143
+ ], -1)
144
+ ])]),
145
+ _: 1
146
+ }, 8, ["action", "before-upload", "data", "on-progress", "on-success"]),
147
+ h(v, {
148
+ modelValue: c.pasteValue,
149
+ "onUpdate:modelValue": e[0] || (e[0] = (F) => c.pasteValue = F),
150
+ ref: "fileUploadInput",
151
+ placeholder: "复制粘贴上传截图",
152
+ class: "childFormFile-input"
153
+ }, null, 8, ["modelValue"]),
154
+ r("span", K, "最多可上传" + C(c.uploadFileNumber) + "个文件,单个文件不超过" + C(c.showLimit) + "M", 1)
155
+ ]),
156
+ U(h(g, {
157
+ style: { width: "100%", "max-width": "444px" },
158
+ percentage: c.uploadProgress,
159
+ class: "childFormFile-progress"
160
+ }, null, 8, ["percentage"]), [
161
+ [Y, c.uploadProgress > 0]
162
+ ]),
163
+ t.value ? (i(), p("div", W, [
164
+ h(w, {
165
+ "file-list": t.value,
166
+ isDel: !0,
167
+ "is-mini": !0
168
+ }, null, 8, ["file-list"])
169
+ ])) : f("", !0)
170
+ ]);
171
+ }
172
+ const G = /* @__PURE__ */ x(H, [["render", X], ["__scopeId", "data-v-a1b3b6de"]]), Q = {
173
+ name: "searchInventory",
174
+ props: {
175
+ row: {},
176
+ column: {},
177
+ postFunc: Function
178
+ },
179
+ data() {
180
+ return {
181
+ loading: !1,
182
+ // 关联查库存的字段的值
183
+ stockSearch: "",
184
+ headData: [],
185
+ inventoryData: []
186
+ };
187
+ },
188
+ beforeCreate() {
189
+ this.searchData = V(function(o) {
190
+ this.loading || (this.headData = [], this.inventoryData = [], this.loading = !0, this.postFunc("/v2/elcStock/getStockInfoV2", o).then((e) => {
191
+ if (this.loading = !1, !e.code && e.data) {
192
+ this.headData = e.data.arrayData[0], this.inventoryData = e.data.data;
193
+ const t = this.calculateTotalStock(this.inventoryData);
194
+ this.row[this.column.columnCode] = t;
195
+ } else
196
+ this.row[this.column.columnCode] = "";
197
+ }));
198
+ }, 500);
199
+ },
200
+ watch: {
201
+ // 只监听用于查询的特定字段,避免被自己修改的总库存字段触发
202
+ row: {
203
+ handler(o) {
204
+ var m;
205
+ const e = (m = this.column.extraInfo) == null ? void 0 : m.stockSearchColumnCode;
206
+ if (!e) return;
207
+ const t = o[e];
208
+ if (this.stockSearch !== t) {
209
+ this.stockSearch = t;
210
+ let c = {
211
+ [e]: this.stockSearch
212
+ };
213
+ this.searchData(c);
214
+ }
215
+ },
216
+ deep: !0,
217
+ immediate: !0
218
+ }
219
+ },
220
+ methods: {
221
+ /**
222
+ * 遍历数组并计算可发库存总和的方法
223
+ * @param {Array} arr - 要遍历的数组,格式如:[{可发库存:10.0000}, {可发库存:10.00}]
224
+ * @returns {Number} 总和
225
+ */
226
+ calculateTotalStock(o) {
227
+ return !o || !Array.isArray(o) || o.length === 0 ? 0 : o.reduce((e, t) => {
228
+ const m = parseFloat(t.可发库存 || 0);
229
+ return e + (isNaN(m) ? 0 : m);
230
+ }, 0);
231
+ }
232
+ }
233
+ }, Z = { class: "inventory" };
234
+ function ee(o, e, t, m, c, n) {
235
+ const b = d("vxe-column"), v = d("vxe-table"), g = M("loading");
236
+ return U((i(), p("div", Z, [
237
+ U((i(), _(v, {
238
+ ref: "assocTable",
239
+ border: "",
240
+ size: "small",
241
+ data: c.inventoryData,
242
+ "row-config": { keyField: "id", isCurrent: !0, isHover: !0 },
243
+ "max-height": 360,
244
+ "min-height": "50",
245
+ "expand-config": { expandAll: !0 },
246
+ "column-config": { resizable: !0 },
247
+ "scroll-x": { enabled: !0, gt: 8 },
248
+ "scroll-y": { enabled: !0, gt: 15 }
249
+ }, {
250
+ empty: u(() => [...e[0] || (e[0] = [
251
+ r("span", null, "未查到库存数据", -1)
252
+ ])]),
253
+ default: u(() => [
254
+ (i(!0), p(S, null, T(c.headData, (w, F) => (i(), _(b, {
255
+ title: w,
256
+ field: w,
257
+ "min-width": "100",
258
+ key: F,
259
+ "show-header-overflow": "title",
260
+ "show-overflow": "title",
261
+ "show-footer-overflow": ""
262
+ }, null, 8, ["title", "field"]))), 128))
263
+ ]),
264
+ _: 1
265
+ }, 8, ["data"])), [
266
+ [g, c.loading]
267
+ ])
268
+ ])), [
269
+ [g, c.loading]
270
+ ]);
271
+ }
272
+ const te = /* @__PURE__ */ x(Q, [["render", ee], ["__scopeId", "data-v-7c5817ba"]]), oe = {
273
+ name: "editLabel",
274
+ components: { childFormFile: G, searchInventory: te },
275
+ props: {
276
+ sourceData: {
277
+ type: Object,
278
+ default: function() {
279
+ return {};
280
+ }
281
+ },
282
+ // 默认值映射相关规则
283
+ defaultLink: Object,
284
+ componentList: Array,
285
+ taskId: [String, Number],
286
+ disabled: Boolean,
287
+ postFunc: Function
288
+ },
289
+ methods: {
290
+ /**
291
+ * 根据权限判断是否限制组件
292
+ * */
293
+ isShow(o) {
294
+ let e = !0;
295
+ return (!this.taskId && o.extraInfo.isAddable != 1 || this.taskId && o.extraInfo.isEditable != 1) && (e = !1), e;
296
+ },
297
+ /**
298
+ * 根据权限判断是否禁用组件
299
+ * */
300
+ isDisabled(o) {
301
+ let e = !1;
302
+ return (!this.taskId && o.extraInfo.valueAddable == 1 || this.taskId && o.extraInfo.valueEditable == 1) && (e = !0), e;
303
+ },
304
+ /**
305
+ * 向表格内插入数据
306
+ * */
307
+ addDefault(o) {
308
+ if (this.sourceData.value.length >= 30)
309
+ return this.$message.warning("最多支持30条"), !1;
310
+ let e = {};
311
+ this.sourceData.moduleDefinition.forEach((m) => {
312
+ var c;
313
+ m.behaviorType == 1 && ((c = this.defaultLink) != null && c.setColumn[`${this.sourceData.columnCode}.${m.columnCode}`]) ? e[m.columnCode] = $(this.componentList, this.defaultLink.setColumn[`${this.sourceData.columnCode}.${m.columnCode}`]) : e[m.columnCode] = m.value;
314
+ });
315
+ let t = JSON.parse(JSON.stringify(e));
316
+ o ? this.sourceData.value.splice(o, 0, t) : this.sourceData.value.push(t), this.onChange("addRow", { row: t }, null);
317
+ },
318
+ /**
319
+ * 删除数据
320
+ * */
321
+ delItem(o) {
322
+ this.sourceData.value.splice(o, 1), this.onChange("delRow", { delIndx: o }, null);
323
+ },
324
+ /**
325
+ * 输入框Change事件
326
+ * @param {String} type 是否是其他事件类型
327
+ * @param {Object} params 扩展参数
328
+ * */
329
+ onChange: V(function(o, e, t) {
330
+ this.sourceData.error = "", this.sourceData.warning = "", this.$emit("onChange", this.sourceData, { type: o, tableScope: e, childColumn: t });
331
+ }, 500),
332
+ /**
333
+ * 输入框输入事件
334
+ * @param {Object} params 扩展参数
335
+ * */
336
+ onInput(o, e, t) {
337
+ this.$emit("input", this.sourceData, { tableScope: e, childColumn: t }), this.onChange("input", e, t);
338
+ },
339
+ /**
340
+ * 输入框onFocus事件
341
+ * @param {Object} params 表格组件行数据
342
+ * @param {Object} column 子组件
343
+ * */
344
+ onFocus(o, e, t) {
345
+ this.$emit("focus", this.sourceData, { tableScope: e, childColumn: t });
346
+ },
347
+ /**
348
+ * 输入框失去焦点事件
349
+ * @param {Object} params 扩展参数
350
+ * */
351
+ onBlur(o, e, t) {
352
+ this.$emit("blur", this.sourceData, { tableScope: e, childColumn: t });
353
+ }
354
+ }
355
+ }, le = { class: "w-default-wrap" }, ne = { class: "w-flex-center" }, ae = {
356
+ key: 0,
357
+ class: "w-color-red w-margin-right4"
358
+ }, ie = { class: "w-flex-left" }, se = {
359
+ key: 0,
360
+ class: "childFormBody-td"
361
+ }, re = {
362
+ key: 1,
363
+ class: "childFormBody-td"
364
+ }, de = {
365
+ key: 2,
366
+ class: "childFormBody-td"
367
+ }, ue = {
368
+ key: 3,
369
+ class: "childFormBody-td"
370
+ }, ce = {
371
+ key: 4,
372
+ class: "childFormBody-td"
373
+ }, he = {
374
+ key: 5,
375
+ class: "childFormBody-file"
376
+ }, me = {
377
+ key: 0,
378
+ class: "childFormBody-file-view"
379
+ }, pe = { class: "childFormBody-operate" }, fe = { class: "w-flex-center" }, ge = ["onClick"], be = ["onClick"];
380
+ function ve(o, e, t, m, c, n) {
381
+ const b = d("vxe-column"), v = d("el-input"), g = d("BnInpNum"), w = d("BnSelect"), F = d("BnRelation"), k = d("el-date-picker"), D = d("child-form-file"), I = d("el-popover"), E = d("BnFileView"), A = d("searchInventory"), O = d("vxe-table");
382
+ return i(), p("div", le, [
383
+ h(O, {
384
+ border: "",
385
+ size: "small",
386
+ data: t.sourceData.value,
387
+ "max-height": 360
388
+ }, {
389
+ empty: u(() => [
390
+ r("span", null, [
391
+ e[4] || (e[4] = y("暂无数据 ", -1)),
392
+ t.disabled ? f("", !0) : (i(), p("span", {
393
+ key: 0,
394
+ class: "w-color-blue w-cursor-pointer",
395
+ onClick: e[0] || (e[0] = (l) => n.addDefault(0))
396
+ }, "点击添加"))
397
+ ])
398
+ ]),
399
+ default: u(() => [
400
+ h(b, {
401
+ type: "seq",
402
+ width: "50"
403
+ }),
404
+ (i(!0), p(S, null, T(t.sourceData.moduleDefinition, (l, B) => (i(), p(S, { key: B }, [
405
+ n.isShow(l) ? (i(), _(b, {
406
+ key: 0,
407
+ title: l.name,
408
+ params: l.extraInfo || {},
409
+ "min-width": 240,
410
+ "show-header-overflow": "title"
411
+ }, {
412
+ header: u((a) => [
413
+ r("div", ne, [
414
+ a.column.params.valueEmptyCheck == 1 ? (i(), p("span", ae, "*")) : f("", !0),
415
+ r("span", null, C(a.column.title), 1)
416
+ ])
417
+ ]),
418
+ default: u((a) => {
419
+ var L, N;
420
+ return [
421
+ r("div", ie, [
422
+ l.behaviorType == 1 ? (i(), p("div", se, [
423
+ h(v, {
424
+ type: "textarea",
425
+ resize: "none",
426
+ rows: 1,
427
+ placeholder: "请输入",
428
+ disabled: t.disabled || n.isDisabled(l),
429
+ onInput: (s) => n.onInput(s, a, l),
430
+ onFocus: (s) => n.onFocus(s, a, l),
431
+ onBlur: (s) => n.onBlur(s, a, l),
432
+ maxlength: 2e5,
433
+ modelValue: a.row[l.columnCode],
434
+ "onUpdate:modelValue": (s) => a.row[l.columnCode] = s,
435
+ modelModifiers: { trim: !0 }
436
+ }, null, 8, ["disabled", "onInput", "onFocus", "onBlur", "modelValue", "onUpdate:modelValue"])
437
+ ])) : f("", !0),
438
+ l.behaviorType == 2 ? (i(), p("div", re, [
439
+ h(g, {
440
+ onInput: (s) => n.onInput(s, a, l),
441
+ disabled: t.disabled || n.isDisabled(l),
442
+ onFocus: (s) => n.onFocus(s, a, l),
443
+ onBlur: (s) => n.onBlur(s, a, l),
444
+ precision: (L = l.extraInfo) == null ? void 0 : L.valueType,
445
+ modelValue: a.row[l.columnCode],
446
+ "onUpdate:modelValue": (s) => a.row[l.columnCode] = s,
447
+ placeholder: "请输入有效数值"
448
+ }, null, 8, ["onInput", "disabled", "onFocus", "onBlur", "precision", "modelValue", "onUpdate:modelValue"])
449
+ ])) : f("", !0),
450
+ [3, 4, 5].includes(l.behaviorType) ? (i(), p("div", de, [
451
+ h(w, {
452
+ modelValue: a.row[l.columnCode],
453
+ "onUpdate:modelValue": (s) => a.row[l.columnCode] = s,
454
+ clearable: "",
455
+ filterable: "",
456
+ multiple: l.behaviorType == 5,
457
+ optionProps: { value: "code", label: "title" },
458
+ options: l.moduleDefinition,
459
+ disabled: t.disabled || n.isDisabled(l),
460
+ pathUrl: l.pathUrl,
461
+ postData: l.postData,
462
+ postFunc: t.postFunc,
463
+ onChange: (s) => n.onChange("change", a, l)
464
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "multiple", "options", "disabled", "pathUrl", "postData", "postFunc", "onChange"])
465
+ ])) : f("", !0),
466
+ [6, 20].includes(l.behaviorType) ? (i(), p("div", ue, [
467
+ h(F, {
468
+ onChange: (s) => n.onChange("change", a, l),
469
+ options: l.moduleDefinition.optionList,
470
+ props: { checkStrictly: !0, value: "code", label: "title" },
471
+ modelValue: a.row[l.columnCode],
472
+ "onUpdate:modelValue": (s) => a.row[l.columnCode] = s,
473
+ multiple: l.behaviorType == 20,
474
+ filterable: "",
475
+ disabled: t.disabled || n.isDisabled(l)
476
+ }, null, 8, ["onChange", "options", "modelValue", "onUpdate:modelValue", "multiple", "disabled"])
477
+ ])) : f("", !0),
478
+ l.behaviorType == 7 ? (i(), p("div", ce, [
479
+ h(k, {
480
+ onChange: (s) => n.onChange("change", a, l),
481
+ disabled: t.disabled || n.isDisabled(l),
482
+ modelValue: a.row[l.columnCode],
483
+ "onUpdate:modelValue": (s) => a.row[l.columnCode] = s,
484
+ type: "datetime",
485
+ format: "YYYY-MM-DD HH:mm:ss",
486
+ "value-format": "YYYY-MM-DD HH:mm:ss"
487
+ }, null, 8, ["onChange", "disabled", "modelValue", "onUpdate:modelValue"])
488
+ ])) : f("", !0),
489
+ l.behaviorType == 10 ? (i(), p("div", he, [
490
+ h(I, {
491
+ placement: "top",
492
+ title: "附件上传",
493
+ width: 400,
494
+ trigger: "click"
495
+ }, {
496
+ reference: u(() => [...e[2] || (e[2] = [
497
+ r("span", { class: "bnUIcon bnUIcon-addFile childFormBody-file-icon" }, null, -1)
498
+ ])]),
499
+ default: u(() => [
500
+ h(D, {
501
+ column: l,
502
+ value: a.row[l.columnCode],
503
+ onChange: (s) => n.onChange("change", a, l)
504
+ }, null, 8, ["column", "value", "onChange"])
505
+ ]),
506
+ _: 2
507
+ }, 1024),
508
+ a.row[l.columnCode] ? (i(), p("div", me, [
509
+ h(E, {
510
+ "file-list": a.row[l.columnCode],
511
+ "is-mini": !0,
512
+ isDel: !0,
513
+ "no-warp": !0,
514
+ onDelFile: (s) => n.onChange("change", a, l)
515
+ }, null, 8, ["file-list", "onDelFile"])
516
+ ])) : f("", !0)
517
+ ])) : f("", !0),
518
+ r("div", pe, [
519
+ (N = l.extraInfo) != null && N.stockSearchColumnCode ? (i(), _(I, {
520
+ key: 0,
521
+ placement: "bottom",
522
+ width: "480"
523
+ }, {
524
+ reference: u(() => [...e[3] || (e[3] = [
525
+ r("span", {
526
+ class: "bnUIcon bnUIcon-inventory w-color-orange w-default-hover w-margin-left4",
527
+ title: "点击查库存"
528
+ }, null, -1)
529
+ ])]),
530
+ default: u(() => [
531
+ (i(), _(A, {
532
+ key: a.row._X_ROW_KEY,
533
+ postFunc: t.postFunc,
534
+ column: l,
535
+ row: a.row
536
+ }, null, 8, ["postFunc", "column", "row"]))
537
+ ]),
538
+ _: 2
539
+ }, 1024)) : f("", !0)
540
+ ])
541
+ ])
542
+ ];
543
+ }),
544
+ _: 2
545
+ }, 1032, ["title", "params"])) : f("", !0)
546
+ ], 64))), 128)),
547
+ t.disabled ? f("", !0) : (i(), _(b, {
548
+ key: 0,
549
+ fixed: "right",
550
+ width: "52"
551
+ }, {
552
+ header: u(({ column: l }) => [
553
+ r("div", fe, [
554
+ t.sourceData.value.length > 0 ? (i(), p("span", {
555
+ key: 0,
556
+ class: "bnUIcon bnUIcon-clear w-color-red w-font-max w-cursor-pointer",
557
+ title: "点击清空子表单",
558
+ onClick: e[1] || (e[1] = (B) => t.sourceData.value = [])
559
+ })) : f("", !0)
560
+ ])
561
+ ]),
562
+ default: u((l) => [
563
+ r("span", {
564
+ class: "bnUIcon bnUIcon-add w-color-blue w-cursor-pointer w-font-max w-margin-right5",
565
+ onClick: (B) => n.addDefault(l.rowIndex + 1)
566
+ }, null, 8, ge),
567
+ r("span", {
568
+ class: "bnUIcon bnUIcon-delete w-color-red w-font-max w-cursor-pointer",
569
+ onClick: (B) => n.delItem(l.rowIndex)
570
+ }, null, 8, be)
571
+ ]),
572
+ _: 1
573
+ }))
574
+ ]),
575
+ _: 1
576
+ }, 8, ["data"])
577
+ ]);
578
+ }
579
+ const _e = /* @__PURE__ */ x(oe, [["render", ve], ["__scopeId", "data-v-60725962"]]), we = {
580
+ name: "childrenForm",
581
+ components: { formItemFooter: R, formItemTop: j, childrenFormBody: _e },
582
+ props: {
583
+ column: {
584
+ type: Object,
585
+ default() {
586
+ return {};
587
+ }
588
+ },
589
+ dataBack: Object,
590
+ // 默认值映射相关规则
591
+ defaultLink: Object,
592
+ componentList: Array,
593
+ disabled: Boolean,
594
+ taskId: [String, Number],
595
+ postFunc: Function
596
+ },
597
+ methods: {
598
+ /**
599
+ * Change事件
600
+ * params:子表单需要增加更多参数,用来表示是自己那个子组件,发生的什么变化
601
+ * */
602
+ onChange: V(function(o, e) {
603
+ this.$emit("onChange", this.column, e);
604
+ }, 500),
605
+ /**
606
+ * 输入框输入事件
607
+ * */
608
+ onInput(o, e) {
609
+ this.$emit("input", this.column, e);
610
+ },
611
+ /**
612
+ * 输入框onFocus事件
613
+ * */
614
+ onFocus(o, e) {
615
+ this.$emit("focus", this.column, e);
616
+ },
617
+ /**
618
+ * 输入框失去焦点事件
619
+ * */
620
+ onBlur(o, e) {
621
+ this.$emit("blur", this.column, e);
622
+ }
623
+ }
624
+ }, ye = { class: "w-default-wrap childrenForm" }, Fe = { class: "childrenForm-behavior" }, Ie = { class: "w-flex-center w-margin-bottom6" };
625
+ function Ce(o, e, t, m, c, n) {
626
+ var k, D;
627
+ const b = d("formItemTop"), v = d("el-button"), g = d("el-popover"), w = d("childrenFormBody"), F = d("formItemFooter");
628
+ return i(), p("div", ye, [
629
+ h(b, { column: t.column }, null, 8, ["column"]),
630
+ r("div", Fe, [
631
+ r("div", Ie, [
632
+ t.dataBack && t.dataBack.order == t.column.columnCode ? (i(), _(g, {
633
+ key: 0,
634
+ placement: "top-start",
635
+ width: 400,
636
+ trigger: "hover",
637
+ "show-arrow": !1
638
+ }, {
639
+ reference: u(() => [
640
+ h(v, {
641
+ link: "",
642
+ type: "primary",
643
+ style: { "padding-left": "0" },
644
+ onClick: e[0] || (e[0] = (I) => o.$emit("operate", this.column, "chooseChildOrder"))
645
+ }, {
646
+ default: u(() => [...e[3] || (e[3] = [
647
+ r("span", { class: "bnUIcon bnUIcon-split" }, null, -1),
648
+ y(" 请选择 ", -1)
649
+ ])]),
650
+ _: 1
651
+ })
652
+ ]),
653
+ default: u(() => [
654
+ e[4] || (e[4] = r("div", { class: "BnSmartForm-title-tip" }, [
655
+ r("span", { class: "w-color-blue" }, "标准ERP子组件"),
656
+ y(",会将选中包裹的子表合并然后在这里列举 ")
657
+ ], -1))
658
+ ]),
659
+ _: 1
660
+ })) : f("", !0),
661
+ (k = t.column.insideDataSourceInfo) != null && k.tableCode ? (i(), _(g, {
662
+ key: 1,
663
+ placement: "top-start",
664
+ width: 440,
665
+ trigger: "hover",
666
+ "show-arrow": !1
667
+ }, {
668
+ reference: u(() => [
669
+ h(v, {
670
+ link: "",
671
+ type: "primary",
672
+ style: { "padding-left": "0" },
673
+ onClick: e[1] || (e[1] = (I) => o.$emit("operate", this.column, "chooseAssocTable"))
674
+ }, {
675
+ default: u(() => [
676
+ e[5] || (e[5] = r("span", { class: "bnUIcon bnUIcon-linkTable" }, null, -1)),
677
+ y("筛选" + C(t.column.name), 1)
678
+ ]),
679
+ _: 1
680
+ })
681
+ ]),
682
+ default: u(() => [
683
+ e[6] || (e[6] = r("div", { class: "BnSmartForm-title-tip" }, [
684
+ r("span", { class: "w-color-blue" }, "关联表组件"),
685
+ y(",可以通过筛选条件,筛选外部表数据进行选择回填 ")
686
+ ], -1))
687
+ ]),
688
+ _: 1
689
+ })) : f("", !0),
690
+ ((D = t.column.outDataSourceInfo[0]) == null ? void 0 : D.platform) == "relation_ipaas" ? (i(), _(g, {
691
+ key: 2,
692
+ placement: "top-start",
693
+ width: 440,
694
+ trigger: "hover",
695
+ "show-arrow": !1
696
+ }, {
697
+ reference: u(() => [
698
+ h(v, {
699
+ link: "",
700
+ type: "primary",
701
+ style: { "padding-left": "0" },
702
+ onClick: e[2] || (e[2] = (I) => o.$emit("operate", this.column, "chooseIPaasData"))
703
+ }, {
704
+ default: u(() => [
705
+ e[7] || (e[7] = r("span", { class: "bnUIcon bnUIcon-api" }, null, -1)),
706
+ y("查询" + C(t.column.name), 1)
707
+ ]),
708
+ _: 1
709
+ })
710
+ ]),
711
+ default: u(() => [
712
+ e[8] || (e[8] = r("div", { class: "BnSmartForm-title-tip" }, [
713
+ r("span", { class: "w-color-blue" }, "关联ipaas查询数据"),
714
+ y(",可以通过班牛ipaas接口筛选外部数据,进行选择回填 ")
715
+ ], -1))
716
+ ]),
717
+ _: 1
718
+ })) : f("", !0)
719
+ ]),
720
+ h(w, {
721
+ sourceData: t.column,
722
+ ref: "childrenFormBody",
723
+ disabled: t.disabled,
724
+ taskId: t.taskId,
725
+ defaultLink: t.defaultLink,
726
+ componentList: t.componentList,
727
+ postFunc: t.postFunc,
728
+ onInput: n.onInput,
729
+ onOnChange: n.onChange,
730
+ onFocus: n.onFocus,
731
+ onBlur: n.onBlur
732
+ }, null, 8, ["sourceData", "disabled", "taskId", "defaultLink", "componentList", "postFunc", "onInput", "onOnChange", "onFocus", "onBlur"])
733
+ ]),
734
+ h(F, { column: t.column }, null, 8, ["column"])
735
+ ]);
736
+ }
737
+ const Se = /* @__PURE__ */ x(we, [["render", Ce]]);
738
+ export {
739
+ Se as default
740
+ };