@bytenew/bn-bus-ui 1.1.463 → 1.1.464

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 (167) hide show
  1. package/dist/assocTableSearch-Bfe96864.js +349 -0
  2. package/dist/assocTableSearch.css +1 -0
  3. package/dist/bn-bus-ui.es.js +65 -0
  4. package/dist/bn-bus-ui.umd.js +49 -0
  5. package/dist/chooseIPaasData-COrrvQKZ.js +391 -0
  6. package/dist/chooseIPaasData.css +1 -0
  7. package/dist/defaultSet-CzN1ec_d.js +297 -0
  8. package/dist/defaultSet.css +1 -0
  9. package/dist/fileFormData-D_Q1vylE.js +53 -0
  10. package/dist/formItemFooter-BvptZj_u.js +108 -0
  11. package/dist/formItemFooter.css +1 -0
  12. package/dist/funcExprDialog-BguNs9fl.js +139 -0
  13. package/dist/funcExprDialog.css +1 -0
  14. package/dist/index-0oB7QocU.js +44 -0
  15. package/dist/index-69fRP0M8.js +89 -0
  16. package/dist/index-BdklTJtF.js +66 -0
  17. package/dist/index-Bu3jHlby.js +45 -0
  18. package/dist/index-BxWx5kpG.js +89 -0
  19. package/dist/index-C5LQ0OSs.js +183 -0
  20. package/dist/index-C8YhrrUN.js +51 -0
  21. package/dist/index-COuPCIzB.js +45 -0
  22. package/dist/index-CSvVyjxx.js +178 -0
  23. package/dist/index-DCv51EXX.js +109 -0
  24. package/dist/index-DUSI6MuC.js +135 -0
  25. package/dist/index-DVzxs2vR.js +58 -0
  26. package/dist/index-Dd4b8zNb.js +746 -0
  27. package/dist/index-Md-ZlkCW.js +66 -0
  28. package/dist/index-hsSIY2FP.js +221 -0
  29. package/dist/index-n13-H3_Y.js +118 -0
  30. package/dist/index-wUl5aPUD.js +64 -0
  31. package/dist/index.css +1 -0
  32. package/dist/index2.css +1 -0
  33. package/dist/index3.css +1 -0
  34. package/dist/index4.css +1 -0
  35. package/dist/index5.css +1 -0
  36. package/dist/index6.css +1 -0
  37. package/dist/index7.css +1 -0
  38. package/dist/install-CNjs0u5x.js +23299 -0
  39. package/dist/install.css +1 -0
  40. package/dist/setOption-CXOifQcx.js +329 -0
  41. package/dist/setOption.css +1 -0
  42. package/dist/setRelationOption-C7VDhej7.js +5217 -0
  43. package/dist/setRelationOption.css +1 -0
  44. package/package.json +4 -20
  45. package/install.js +0 -134
  46. package/packages/BnAddress/index.vue +0 -141
  47. package/packages/BnAddressParse/index.vue +0 -75
  48. package/packages/BnAdvancedFilter/BnFilterView.vue +0 -145
  49. package/packages/BnAdvancedFilter/index.vue +0 -345
  50. package/packages/BnAdvancedFilter/util.js +0 -171
  51. package/packages/BnCascader/BnCascader.vue +0 -543
  52. package/packages/BnCascader/BnCascaderPanel.vue +0 -1331
  53. package/packages/BnCascader/cascaderDisplay.js +0 -102
  54. package/packages/BnCheck/BnCheck.vue +0 -253
  55. package/packages/BnColumnConfig/columnConfigDialog.vue +0 -134
  56. package/packages/BnColumnConfig/component/childrenFormSetting/assocTable.vue +0 -143
  57. package/packages/BnColumnConfig/component/childrenFormSetting/assocTableSearch.vue +0 -314
  58. package/packages/BnColumnConfig/component/childrenFormSetting/index.vue +0 -243
  59. package/packages/BnColumnConfig/component/defaultSet/defaultSet.vue +0 -114
  60. package/packages/BnColumnConfig/component/defaultSet/stringDefault.vue +0 -210
  61. package/packages/BnColumnConfig/component/funcExprDialog/funcExprDialog.vue +0 -126
  62. package/packages/BnColumnConfig/component/packageFilter/index.vue +0 -141
  63. package/packages/BnColumnConfig/component/paraExplainSet/index.vue +0 -156
  64. package/packages/BnColumnConfig/component/setOption/setOption.vue +0 -321
  65. package/packages/BnColumnConfig/component/setRelationOption/ConditionList.vue +0 -277
  66. package/packages/BnColumnConfig/component/setRelationOption/LevelHeader.vue +0 -144
  67. package/packages/BnColumnConfig/component/setRelationOption/setRelationOption.vue +0 -642
  68. package/packages/BnColumnConfig/data.js +0 -129
  69. package/packages/BnColumnConfig/index.scss +0 -23
  70. package/packages/BnColumnConfig/index.vue +0 -309
  71. package/packages/BnCondVal/BnCondVal.vue +0 -112
  72. package/packages/BnCondVal/itemVal/dateRegVal.vue +0 -39
  73. package/packages/BnCondVal/itemVal/dateVal.vue +0 -39
  74. package/packages/BnCondVal/itemVal/numRegVal.vue +0 -67
  75. package/packages/BnCondVal/itemVal/numVal.vue +0 -44
  76. package/packages/BnCondVal/itemVal/relationVal.vue +0 -73
  77. package/packages/BnCondVal/itemVal/selectColumnVal.vue +0 -58
  78. package/packages/BnCondVal/itemVal/selectVal.vue +0 -59
  79. package/packages/BnCondVal/itemVal/stringVal.vue +0 -156
  80. package/packages/BnCondition/index.vue +0 -551
  81. package/packages/BnCondition/util.js +0 -232
  82. package/packages/BnDatePicker/BnDatePicker.vue +0 -194
  83. package/packages/BnDrop/BnDrop.vue +0 -917
  84. package/packages/BnEmptyTip/BnEmptyTip.vue +0 -107
  85. package/packages/BnExportOrder/BnExportOrder.vue +0 -241
  86. package/packages/BnExportOrder/validatorCode.vue +0 -94
  87. package/packages/BnFileView/BnFileView.vue +0 -271
  88. package/packages/BnFileView/FileDetail.vue +0 -125
  89. package/packages/BnFileView/videoPreview.vue +0 -70
  90. package/packages/BnFilterOption/BnFilterOption.vue +0 -160
  91. package/packages/BnFunExpr/BnFunExpr.vue +0 -608
  92. package/packages/BnImportOrder/BnImportOrder.vue +0 -323
  93. package/packages/BnImportTemplate/BnImportTemplate.vue +0 -866
  94. package/packages/BnImportTemplate/assets/merge_tip_img.png +0 -0
  95. package/packages/BnImportTemplate/assets/sheet_tip.png +0 -0
  96. package/packages/BnImportTemplate/assets/xls.png +0 -0
  97. package/packages/BnImportTemplate/components/ImportTemplateTrigger.vue +0 -198
  98. package/packages/BnImportTemplate/components/TemplateEditDialog.vue +0 -340
  99. package/packages/BnImportTemplate/components/TemplateFieldsConfig.vue +0 -401
  100. package/packages/BnImportTemplate/components/TemplateListDialog.vue +0 -297
  101. package/packages/BnInpNum/BnInpNum.vue +0 -165
  102. package/packages/BnMenus/BnMenus.vue +0 -502
  103. package/packages/BnMenus/MenuItem.vue +0 -321
  104. package/packages/BnOrderCard/BnOrderCard.vue +0 -389
  105. package/packages/BnOrderCard/orderRemark.vue +0 -178
  106. package/packages/BnOrderCard/util.js +0 -94
  107. package/packages/BnOrderDetail/BnOrderDetail.vue +0 -338
  108. package/packages/BnOrderDetail/filterLogByUser.vue +0 -108
  109. package/packages/BnOrderDetail/orderLogs.vue +0 -53
  110. package/packages/BnOrderDetail/showSubForm/index.vue +0 -41
  111. package/packages/BnOrderDetail/showSubForm/showChildTable.vue +0 -61
  112. package/packages/BnOrderDetail/showSubForm/showTimeLine.vue +0 -131
  113. package/packages/BnOrderDetail/showSubForm/tableCellCopy.vue +0 -84
  114. package/packages/BnOrderShare/index.vue +0 -378
  115. package/packages/BnOrderShare/shareUrlInp.vue +0 -54
  116. package/packages/BnRadio/BnRadio.vue +0 -181
  117. package/packages/BnRelation/BnRelation.vue +0 -120
  118. package/packages/BnSelect/BnSelect.vue +0 -485
  119. package/packages/BnSmartForm/BnBatchForm.vue +0 -334
  120. package/packages/BnSmartForm/BnBatchFormDialog.vue +0 -423
  121. package/packages/BnSmartForm/BnSmartElf/elfLog/index.vue +0 -57
  122. package/packages/BnSmartForm/BnSmartElf/index.vue +0 -95
  123. package/packages/BnSmartForm/BnSmartFormPsychic.js +0 -629
  124. package/packages/BnSmartForm/BnSmartFormUtil.js +0 -524
  125. package/packages/BnSmartForm/addressForm/index.vue +0 -73
  126. package/packages/BnSmartForm/checkboxForm/index.vue +0 -99
  127. package/packages/BnSmartForm/childrenForm/childFormFile.vue +0 -237
  128. package/packages/BnSmartForm/childrenForm/childrenFormBody.vue +0 -260
  129. package/packages/BnSmartForm/childrenForm/index.vue +0 -110
  130. package/packages/BnSmartForm/childrenForm/searchInventory.vue +0 -115
  131. package/packages/BnSmartForm/chooseAssocTable/chooseAssocTable.vue +0 -451
  132. package/packages/BnSmartForm/chooseAssocTable/chooseChildGood.vue +0 -229
  133. package/packages/BnSmartForm/chooseAssocTable/tableCellCopy.vue +0 -84
  134. package/packages/BnSmartForm/chooseChildOrder/chooseChildOrder.vue +0 -158
  135. package/packages/BnSmartForm/chooseIPaasData/chooseIPaasData.vue +0 -307
  136. package/packages/BnSmartForm/chooseIPaasData/tableCellCopy.vue +0 -84
  137. package/packages/BnSmartForm/choosePackage/choosePackage.vue +0 -361
  138. package/packages/BnSmartForm/dateDualForm/index.vue +0 -37
  139. package/packages/BnSmartForm/dateForm/index.vue +0 -38
  140. package/packages/BnSmartForm/fileForm/fileFormData.js +0 -50
  141. package/packages/BnSmartForm/fileForm/index.vue +0 -240
  142. package/packages/BnSmartForm/formItemFooter/formItemFooter.vue +0 -38
  143. package/packages/BnSmartForm/formItemTop/formItemTop.vue +0 -42
  144. package/packages/BnSmartForm/index.vue +0 -1201
  145. package/packages/BnSmartForm/numberForm/index.vue +0 -63
  146. package/packages/BnSmartForm/radioForm/index.vue +0 -72
  147. package/packages/BnSmartForm/receiveForm/index.vue +0 -112
  148. package/packages/BnSmartForm/relationForm/index.vue +0 -82
  149. package/packages/BnSmartForm/scoreForm/index.vue +0 -39
  150. package/packages/BnSmartForm/selectForm/index.vue +0 -55
  151. package/packages/BnSmartForm/showValForm/index.vue +0 -42
  152. package/packages/BnSmartForm/showValForm/showValFormTable.vue +0 -104
  153. package/packages/BnSmartForm/smartFormsCommon.scss +0 -43
  154. package/packages/BnSmartForm/stringForm/index.vue +0 -170
  155. package/packages/BnVirtPopover/index.vue +0 -319
  156. package/packages/BnWebLog/BnWebLog.vue +0 -140
  157. package/packages/BnWorkSettingDrop/advancedOptions.js +0 -112
  158. package/packages/BnWorkSettingDrop/benBenAIUtil.js +0 -89
  159. package/packages/BnWorkSettingDrop/index.vue +0 -292
  160. package/packages/font/iconfont.css +0 -243
  161. package/packages/font/iconfont.ttf +0 -0
  162. package/packages/font/iconfont.woff +0 -0
  163. package/packages/font/iconfont.woff2 +0 -0
  164. package/utils/addressParse-old.js +0 -645
  165. package/utils/addressParse.js +0 -735
  166. package/utils/config.js +0 -68
  167. package/utils/index.js +0 -1171
@@ -0,0 +1,746 @@
1
+ import { debounce as V } from "lodash";
2
+ import { _ as U, a5 as z, a2 as P } from "./install-CNjs0u5x.js";
3
+ import { f as $ } 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 I, withDirectives as x, 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 H } from "./formItemFooter-BvptZj_u.js";
6
+ const R = {
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 || $,
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(a) {
41
+ if (this.column.error = "", this.uploadProgress = 0, a.code)
42
+ this.$message({
43
+ message: a.msg,
44
+ type: "warning"
45
+ });
46
+ else {
47
+ const e = {
48
+ title: a.data.fileName,
49
+ id: a.data.id,
50
+ code: a.data.id,
51
+ size: a.data.fileSize,
52
+ type: a.data.suffix,
53
+ url: a.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(a) {
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 (a.size > t)
72
+ return this.$message({
73
+ message: `上传文件大小不能超出${e}MB`,
74
+ type: "warning"
75
+ }), !1;
76
+ const m = a.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(a) {
83
+ this.uploadProgress = Math.round(a.percent);
84
+ },
85
+ //粘贴图片到编辑器,事件处理方法,主要用于事件销毁
86
+ pasteEvent(a) {
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(a), z(a, 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(a, e, t, m, c, l) {
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": l.beforeUpload,
134
+ multiple: "",
135
+ data: c.uploadData,
136
+ "on-progress": l.handleUploadProgress,
137
+ "on-success": l.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, "最多可上传" + I(c.uploadFileNumber) + "个文件,单个文件不超过" + I(c.showLimit) + "M", 1)
155
+ ]),
156
+ x(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__ */ U(R, [["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(a) {
190
+ this.loading || (this.headData = [], this.inventoryData = [], this.loading = !0, this.postFunc("/v2/elcStock/getStockInfoV2", a).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(a) {
204
+ var m;
205
+ const e = (m = this.column.extraInfo) == null ? void 0 : m.stockSearchColumnCode;
206
+ if (!e) return;
207
+ const t = a[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(a) {
227
+ return !a || !Array.isArray(a) || a.length === 0 ? 0 : a.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(a, e, t, m, c, l) {
235
+ const b = d("vxe-column"), v = d("vxe-table"), g = M("loading");
236
+ return x((i(), p("div", Z, [
237
+ x((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__ */ U(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(a) {
294
+ let e = !0;
295
+ return (!this.taskId && a.extraInfo.isAddable != 1 || this.taskId && a.extraInfo.isEditable != 1) && (e = !1), e;
296
+ },
297
+ /**
298
+ * 根据权限判断是否禁用组件
299
+ * */
300
+ isDisabled(a) {
301
+ let e = !1;
302
+ return (!this.taskId && a.extraInfo.valueAddable == 1 || this.taskId && a.extraInfo.valueEditable == 1) && (e = !0), e;
303
+ },
304
+ /**
305
+ * 向表格内插入数据
306
+ * */
307
+ addDefault(a) {
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] = P(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
+ a ? this.sourceData.value.splice(a, 0, t) : this.sourceData.value.push(t), this.onChange("addRow", { row: t }, null);
317
+ },
318
+ /**
319
+ * 删除数据
320
+ * */
321
+ delItem(a) {
322
+ this.sourceData.value.splice(a, 1), this.onChange("delRow", { delIndx: a }, null);
323
+ },
324
+ /**
325
+ * 输入框Change事件
326
+ * @param {String} type 是否是其他事件类型
327
+ * @param {Object} params 扩展参数
328
+ * */
329
+ onChange: V(function(a, e, t) {
330
+ this.sourceData.error = "", this.sourceData.warning = "", this.$emit("onChange", this.sourceData, { type: a, tableScope: e, childColumn: t });
331
+ }, 500),
332
+ /**
333
+ * 输入框输入事件
334
+ * @param {Object} params 扩展参数
335
+ * */
336
+ onInput(a, 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(a, e, t) {
345
+ this.$emit("focus", this.sourceData, { tableScope: e, childColumn: t });
346
+ },
347
+ /**
348
+ * 输入框失去焦点事件
349
+ * @param {Object} params 扩展参数
350
+ * */
351
+ onBlur(a, e, t) {
352
+ this.$emit("blur", this.sourceData, { tableScope: e, childColumn: t });
353
+ }
354
+ }
355
+ }, ae = { class: "w-default-wrap" }, le = { class: "w-flex-center" }, ne = {
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(a, e, t, m, c, l) {
381
+ const b = d("vxe-column"), v = d("el-input"), g = d("BnInpNum"), w = d("BnSelect"), F = d("BnCascader"), k = d("el-date-picker"), D = d("child-form-file"), C = d("el-popover"), E = d("BnFileView"), A = d("searchInventory"), O = d("vxe-table");
382
+ return i(), p("div", ae, [
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] = (o) => l.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, (o, B) => (i(), p(S, { key: B }, [
405
+ l.isShow(o) ? (i(), _(b, {
406
+ key: 0,
407
+ title: o.name,
408
+ params: o.extraInfo || {},
409
+ "min-width": 240,
410
+ "show-header-overflow": "title"
411
+ }, {
412
+ header: u((n) => [
413
+ r("div", le, [
414
+ n.column.params.valueEmptyCheck == 1 ? (i(), p("span", ne, "*")) : f("", !0),
415
+ r("span", null, I(n.column.title), 1)
416
+ ])
417
+ ]),
418
+ default: u((n) => {
419
+ var L, N;
420
+ return [
421
+ r("div", ie, [
422
+ o.behaviorType == 1 ? (i(), p("div", se, [
423
+ h(v, {
424
+ type: "textarea",
425
+ resize: "none",
426
+ rows: 1,
427
+ placeholder: "请输入",
428
+ disabled: t.disabled || l.isDisabled(o),
429
+ onInput: (s) => l.onInput(s, n, o),
430
+ onFocus: (s) => l.onFocus(s, n, o),
431
+ onBlur: (s) => l.onBlur(s, n, o),
432
+ maxlength: 2e5,
433
+ modelValue: n.row[o.columnCode],
434
+ "onUpdate:modelValue": (s) => n.row[o.columnCode] = s,
435
+ modelModifiers: { trim: !0 }
436
+ }, null, 8, ["disabled", "onInput", "onFocus", "onBlur", "modelValue", "onUpdate:modelValue"])
437
+ ])) : f("", !0),
438
+ o.behaviorType == 2 ? (i(), p("div", re, [
439
+ h(g, {
440
+ onInput: (s) => l.onInput(s, n, o),
441
+ disabled: t.disabled || l.isDisabled(o),
442
+ onFocus: (s) => l.onFocus(s, n, o),
443
+ onBlur: (s) => l.onBlur(s, n, o),
444
+ precision: (L = o.extraInfo) == null ? void 0 : L.valueType,
445
+ modelValue: n.row[o.columnCode],
446
+ "onUpdate:modelValue": (s) => n.row[o.columnCode] = s,
447
+ placeholder: "请输入有效数值"
448
+ }, null, 8, ["onInput", "disabled", "onFocus", "onBlur", "precision", "modelValue", "onUpdate:modelValue"])
449
+ ])) : f("", !0),
450
+ [3, 4, 5].includes(o.behaviorType) ? (i(), p("div", de, [
451
+ h(w, {
452
+ modelValue: n.row[o.columnCode],
453
+ "onUpdate:modelValue": (s) => n.row[o.columnCode] = s,
454
+ clearable: "",
455
+ filterable: "",
456
+ multiple: o.behaviorType == 5,
457
+ optionProps: { value: "code", label: "title" },
458
+ options: o.moduleDefinition,
459
+ disabled: t.disabled || l.isDisabled(o),
460
+ pathUrl: o.pathUrl,
461
+ postData: o.postData,
462
+ postFunc: t.postFunc,
463
+ onChange: (s) => l.onChange("change", n, o)
464
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "multiple", "options", "disabled", "pathUrl", "postData", "postFunc", "onChange"])
465
+ ])) : f("", !0),
466
+ [6, 20].includes(o.behaviorType) ? (i(), p("div", ue, [
467
+ h(F, {
468
+ onChange: (s) => l.onChange("change", n, o),
469
+ modelValue: n.row[o.columnCode],
470
+ "onUpdate:modelValue": (s) => n.row[o.columnCode] = s,
471
+ postFunc: t.postFunc,
472
+ "path-url": o.pathUrl,
473
+ "post-data": o.postData,
474
+ "remote-mode": "tree",
475
+ optionProps: { value: "code", label: "title" },
476
+ "label-in-value": !1,
477
+ options: o.moduleDefinition.optionList,
478
+ "hide-check-to-last": "",
479
+ multiple: o.behaviorType == 20,
480
+ disabled: t.disabled || l.isDisabled(o),
481
+ clearable: ""
482
+ }, null, 8, ["onChange", "modelValue", "onUpdate:modelValue", "postFunc", "path-url", "post-data", "options", "multiple", "disabled"])
483
+ ])) : f("", !0),
484
+ o.behaviorType == 7 ? (i(), p("div", ce, [
485
+ h(k, {
486
+ onChange: (s) => l.onChange("change", n, o),
487
+ disabled: t.disabled || l.isDisabled(o),
488
+ modelValue: n.row[o.columnCode],
489
+ "onUpdate:modelValue": (s) => n.row[o.columnCode] = s,
490
+ type: "datetime",
491
+ format: "YYYY-MM-DD HH:mm:ss",
492
+ "value-format": "YYYY-MM-DD HH:mm:ss"
493
+ }, null, 8, ["onChange", "disabled", "modelValue", "onUpdate:modelValue"])
494
+ ])) : f("", !0),
495
+ o.behaviorType == 10 ? (i(), p("div", he, [
496
+ h(C, {
497
+ placement: "top",
498
+ title: "附件上传",
499
+ width: 400,
500
+ trigger: "click"
501
+ }, {
502
+ reference: u(() => [...e[2] || (e[2] = [
503
+ r("span", { class: "bnUIcon bnUIcon-addFile childFormBody-file-icon" }, null, -1)
504
+ ])]),
505
+ default: u(() => [
506
+ h(D, {
507
+ column: o,
508
+ value: n.row[o.columnCode],
509
+ onChange: (s) => l.onChange("change", n, o)
510
+ }, null, 8, ["column", "value", "onChange"])
511
+ ]),
512
+ _: 2
513
+ }, 1024),
514
+ n.row[o.columnCode] ? (i(), p("div", me, [
515
+ h(E, {
516
+ "file-list": n.row[o.columnCode],
517
+ "is-mini": !0,
518
+ isDel: !0,
519
+ "no-warp": !0,
520
+ onDelFile: (s) => l.onChange("change", n, o)
521
+ }, null, 8, ["file-list", "onDelFile"])
522
+ ])) : f("", !0)
523
+ ])) : f("", !0),
524
+ r("div", pe, [
525
+ (N = o.extraInfo) != null && N.stockSearchColumnCode ? (i(), _(C, {
526
+ key: 0,
527
+ placement: "bottom",
528
+ width: "480"
529
+ }, {
530
+ reference: u(() => [...e[3] || (e[3] = [
531
+ r("span", {
532
+ class: "bnUIcon bnUIcon-inventory w-color-orange w-default-hover w-margin-left4",
533
+ title: "点击查库存"
534
+ }, null, -1)
535
+ ])]),
536
+ default: u(() => [
537
+ (i(), _(A, {
538
+ key: n.row._X_ROW_KEY,
539
+ postFunc: t.postFunc,
540
+ column: o,
541
+ row: n.row
542
+ }, null, 8, ["postFunc", "column", "row"]))
543
+ ]),
544
+ _: 2
545
+ }, 1024)) : f("", !0)
546
+ ])
547
+ ])
548
+ ];
549
+ }),
550
+ _: 2
551
+ }, 1032, ["title", "params"])) : f("", !0)
552
+ ], 64))), 128)),
553
+ t.disabled ? f("", !0) : (i(), _(b, {
554
+ key: 0,
555
+ fixed: "right",
556
+ width: "52"
557
+ }, {
558
+ header: u(({ column: o }) => [
559
+ r("div", fe, [
560
+ t.sourceData.value.length > 0 ? (i(), p("span", {
561
+ key: 0,
562
+ class: "bnUIcon bnUIcon-clear w-color-red w-font-max w-cursor-pointer",
563
+ title: "点击清空子表单",
564
+ onClick: e[1] || (e[1] = (B) => t.sourceData.value = [])
565
+ })) : f("", !0)
566
+ ])
567
+ ]),
568
+ default: u((o) => [
569
+ r("span", {
570
+ class: "bnUIcon bnUIcon-add w-color-blue w-cursor-pointer w-font-max w-margin-right5",
571
+ onClick: (B) => l.addDefault(o.rowIndex + 1)
572
+ }, null, 8, ge),
573
+ r("span", {
574
+ class: "bnUIcon bnUIcon-delete w-color-red w-font-max w-cursor-pointer",
575
+ onClick: (B) => l.delItem(o.rowIndex)
576
+ }, null, 8, be)
577
+ ]),
578
+ _: 1
579
+ }))
580
+ ]),
581
+ _: 1
582
+ }, 8, ["data"])
583
+ ]);
584
+ }
585
+ const _e = /* @__PURE__ */ U(oe, [["render", ve], ["__scopeId", "data-v-30ec2afe"]]), we = {
586
+ name: "childrenForm",
587
+ components: { formItemFooter: H, formItemTop: j, childrenFormBody: _e },
588
+ props: {
589
+ column: {
590
+ type: Object,
591
+ default() {
592
+ return {};
593
+ }
594
+ },
595
+ dataBack: Object,
596
+ // 默认值映射相关规则
597
+ defaultLink: Object,
598
+ componentList: Array,
599
+ disabled: Boolean,
600
+ taskId: [String, Number],
601
+ postFunc: Function
602
+ },
603
+ methods: {
604
+ /**
605
+ * Change事件
606
+ * params:子表单需要增加更多参数,用来表示是自己那个子组件,发生的什么变化
607
+ * */
608
+ onChange: V(function(a, e) {
609
+ this.$emit("onChange", this.column, e);
610
+ }, 500),
611
+ /**
612
+ * 输入框输入事件
613
+ * */
614
+ onInput(a, e) {
615
+ this.$emit("input", this.column, e);
616
+ },
617
+ /**
618
+ * 输入框onFocus事件
619
+ * */
620
+ onFocus(a, e) {
621
+ this.$emit("focus", this.column, e);
622
+ },
623
+ /**
624
+ * 输入框失去焦点事件
625
+ * */
626
+ onBlur(a, e) {
627
+ this.$emit("blur", this.column, e);
628
+ }
629
+ }
630
+ }, ye = { class: "w-default-wrap childrenForm" }, Fe = { class: "childrenForm-behavior" }, Ce = { class: "w-flex-center w-margin-bottom6" };
631
+ function Ie(a, e, t, m, c, l) {
632
+ var k, D;
633
+ const b = d("formItemTop"), v = d("el-button"), g = d("el-popover"), w = d("childrenFormBody"), F = d("formItemFooter");
634
+ return i(), p("div", ye, [
635
+ h(b, { column: t.column }, null, 8, ["column"]),
636
+ r("div", Fe, [
637
+ r("div", Ce, [
638
+ t.dataBack && t.dataBack.order == t.column.columnCode ? (i(), _(g, {
639
+ key: 0,
640
+ placement: "top-start",
641
+ width: 400,
642
+ trigger: "hover",
643
+ "show-arrow": !1
644
+ }, {
645
+ reference: u(() => [
646
+ h(v, {
647
+ link: "",
648
+ type: "primary",
649
+ style: { "padding-left": "0" },
650
+ onClick: e[0] || (e[0] = (C) => a.$emit("operate", this.column, "chooseChildOrder"))
651
+ }, {
652
+ default: u(() => [...e[3] || (e[3] = [
653
+ r("span", { class: "bnUIcon bnUIcon-split" }, null, -1),
654
+ y(" 请选择 ", -1)
655
+ ])]),
656
+ _: 1
657
+ })
658
+ ]),
659
+ default: u(() => [
660
+ e[4] || (e[4] = r("div", { class: "BnSmartForm-title-tip" }, [
661
+ r("span", { class: "w-color-blue" }, "标准ERP子组件"),
662
+ y(",会将选中包裹的子表合并然后在这里列举 ")
663
+ ], -1))
664
+ ]),
665
+ _: 1
666
+ })) : f("", !0),
667
+ (k = t.column.insideDataSourceInfo) != null && k.tableCode ? (i(), _(g, {
668
+ key: 1,
669
+ placement: "top-start",
670
+ width: 440,
671
+ trigger: "hover",
672
+ "show-arrow": !1
673
+ }, {
674
+ reference: u(() => [
675
+ h(v, {
676
+ link: "",
677
+ type: "primary",
678
+ style: { "padding-left": "0" },
679
+ onClick: e[1] || (e[1] = (C) => a.$emit("operate", this.column, "chooseAssocTable"))
680
+ }, {
681
+ default: u(() => [
682
+ e[5] || (e[5] = r("span", { class: "bnUIcon bnUIcon-linkTable" }, null, -1)),
683
+ y("筛选" + I(t.column.name), 1)
684
+ ]),
685
+ _: 1
686
+ })
687
+ ]),
688
+ default: u(() => [
689
+ e[6] || (e[6] = r("div", { class: "BnSmartForm-title-tip" }, [
690
+ r("span", { class: "w-color-blue" }, "关联表组件"),
691
+ y(",可以通过筛选条件,筛选外部表数据进行选择回填 ")
692
+ ], -1))
693
+ ]),
694
+ _: 1
695
+ })) : f("", !0),
696
+ ((D = t.column.outDataSourceInfo[0]) == null ? void 0 : D.platform) == "relation_ipaas" ? (i(), _(g, {
697
+ key: 2,
698
+ placement: "top-start",
699
+ width: 440,
700
+ trigger: "hover",
701
+ "show-arrow": !1
702
+ }, {
703
+ reference: u(() => [
704
+ h(v, {
705
+ link: "",
706
+ type: "primary",
707
+ style: { "padding-left": "0" },
708
+ onClick: e[2] || (e[2] = (C) => a.$emit("operate", this.column, "chooseIPaasData"))
709
+ }, {
710
+ default: u(() => [
711
+ e[7] || (e[7] = r("span", { class: "bnUIcon bnUIcon-api" }, null, -1)),
712
+ y("查询" + I(t.column.name), 1)
713
+ ]),
714
+ _: 1
715
+ })
716
+ ]),
717
+ default: u(() => [
718
+ e[8] || (e[8] = r("div", { class: "BnSmartForm-title-tip" }, [
719
+ r("span", { class: "w-color-blue" }, "关联ipaas查询数据"),
720
+ y(",可以通过班牛ipaas接口筛选外部数据,进行选择回填 ")
721
+ ], -1))
722
+ ]),
723
+ _: 1
724
+ })) : f("", !0)
725
+ ]),
726
+ h(w, {
727
+ sourceData: t.column,
728
+ ref: "childrenFormBody",
729
+ disabled: t.disabled,
730
+ taskId: t.taskId,
731
+ defaultLink: t.defaultLink,
732
+ componentList: t.componentList,
733
+ postFunc: t.postFunc,
734
+ onInput: l.onInput,
735
+ onOnChange: l.onChange,
736
+ onFocus: l.onFocus,
737
+ onBlur: l.onBlur
738
+ }, null, 8, ["sourceData", "disabled", "taskId", "defaultLink", "componentList", "postFunc", "onInput", "onOnChange", "onFocus", "onBlur"])
739
+ ]),
740
+ h(F, { column: t.column }, null, 8, ["column"])
741
+ ]);
742
+ }
743
+ const Se = /* @__PURE__ */ U(we, [["render", Ie]]);
744
+ export {
745
+ Se as default
746
+ };