@bytenew/bn-bus-ui 1.1.461 → 1.1.463

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/install.js +134 -0
  2. package/package.json +20 -4
  3. package/packages/BnAddress/index.vue +141 -0
  4. package/packages/BnAddressParse/index.vue +75 -0
  5. package/packages/BnAdvancedFilter/BnFilterView.vue +145 -0
  6. package/packages/BnAdvancedFilter/index.vue +345 -0
  7. package/packages/BnAdvancedFilter/util.js +171 -0
  8. package/packages/BnCascader/BnCascader.vue +543 -0
  9. package/packages/BnCascader/BnCascaderPanel.vue +1331 -0
  10. package/packages/BnCascader/cascaderDisplay.js +102 -0
  11. package/packages/BnCheck/BnCheck.vue +253 -0
  12. package/packages/BnColumnConfig/columnConfigDialog.vue +134 -0
  13. package/packages/BnColumnConfig/component/childrenFormSetting/assocTable.vue +143 -0
  14. package/packages/BnColumnConfig/component/childrenFormSetting/assocTableSearch.vue +314 -0
  15. package/packages/BnColumnConfig/component/childrenFormSetting/index.vue +243 -0
  16. package/packages/BnColumnConfig/component/defaultSet/defaultSet.vue +114 -0
  17. package/packages/BnColumnConfig/component/defaultSet/stringDefault.vue +210 -0
  18. package/packages/BnColumnConfig/component/funcExprDialog/funcExprDialog.vue +126 -0
  19. package/packages/BnColumnConfig/component/packageFilter/index.vue +141 -0
  20. package/packages/BnColumnConfig/component/paraExplainSet/index.vue +156 -0
  21. package/packages/BnColumnConfig/component/setOption/setOption.vue +321 -0
  22. package/packages/BnColumnConfig/component/setRelationOption/ConditionList.vue +277 -0
  23. package/packages/BnColumnConfig/component/setRelationOption/LevelHeader.vue +144 -0
  24. package/packages/BnColumnConfig/component/setRelationOption/setRelationOption.vue +642 -0
  25. package/packages/BnColumnConfig/data.js +129 -0
  26. package/packages/BnColumnConfig/index.scss +23 -0
  27. package/packages/BnColumnConfig/index.vue +309 -0
  28. package/packages/BnCondVal/BnCondVal.vue +112 -0
  29. package/packages/BnCondVal/itemVal/dateRegVal.vue +39 -0
  30. package/packages/BnCondVal/itemVal/dateVal.vue +39 -0
  31. package/packages/BnCondVal/itemVal/numRegVal.vue +67 -0
  32. package/packages/BnCondVal/itemVal/numVal.vue +44 -0
  33. package/packages/BnCondVal/itemVal/relationVal.vue +73 -0
  34. package/packages/BnCondVal/itemVal/selectColumnVal.vue +58 -0
  35. package/packages/BnCondVal/itemVal/selectVal.vue +59 -0
  36. package/packages/BnCondVal/itemVal/stringVal.vue +156 -0
  37. package/packages/BnCondition/index.vue +551 -0
  38. package/packages/BnCondition/util.js +232 -0
  39. package/packages/BnDatePicker/BnDatePicker.vue +194 -0
  40. package/packages/BnDrop/BnDrop.vue +917 -0
  41. package/packages/BnEmptyTip/BnEmptyTip.vue +107 -0
  42. package/packages/BnExportOrder/BnExportOrder.vue +241 -0
  43. package/packages/BnExportOrder/validatorCode.vue +94 -0
  44. package/packages/BnFileView/BnFileView.vue +271 -0
  45. package/packages/BnFileView/FileDetail.vue +125 -0
  46. package/packages/BnFileView/videoPreview.vue +70 -0
  47. package/packages/BnFilterOption/BnFilterOption.vue +160 -0
  48. package/packages/BnFunExpr/BnFunExpr.vue +608 -0
  49. package/packages/BnImportOrder/BnImportOrder.vue +323 -0
  50. package/packages/BnImportTemplate/BnImportTemplate.vue +866 -0
  51. package/packages/BnImportTemplate/assets/merge_tip_img.png +0 -0
  52. package/packages/BnImportTemplate/assets/sheet_tip.png +0 -0
  53. package/packages/BnImportTemplate/assets/xls.png +0 -0
  54. package/packages/BnImportTemplate/components/ImportTemplateTrigger.vue +198 -0
  55. package/packages/BnImportTemplate/components/TemplateEditDialog.vue +340 -0
  56. package/packages/BnImportTemplate/components/TemplateFieldsConfig.vue +401 -0
  57. package/packages/BnImportTemplate/components/TemplateListDialog.vue +297 -0
  58. package/packages/BnInpNum/BnInpNum.vue +165 -0
  59. package/packages/BnMenus/BnMenus.vue +502 -0
  60. package/packages/BnMenus/MenuItem.vue +321 -0
  61. package/packages/BnOrderCard/BnOrderCard.vue +389 -0
  62. package/packages/BnOrderCard/orderRemark.vue +178 -0
  63. package/packages/BnOrderCard/util.js +94 -0
  64. package/packages/BnOrderDetail/BnOrderDetail.vue +338 -0
  65. package/packages/BnOrderDetail/filterLogByUser.vue +108 -0
  66. package/packages/BnOrderDetail/orderLogs.vue +53 -0
  67. package/packages/BnOrderDetail/showSubForm/index.vue +41 -0
  68. package/packages/BnOrderDetail/showSubForm/showChildTable.vue +61 -0
  69. package/packages/BnOrderDetail/showSubForm/showTimeLine.vue +131 -0
  70. package/packages/BnOrderDetail/showSubForm/tableCellCopy.vue +84 -0
  71. package/packages/BnOrderShare/index.vue +378 -0
  72. package/packages/BnOrderShare/shareUrlInp.vue +54 -0
  73. package/packages/BnRadio/BnRadio.vue +181 -0
  74. package/packages/BnRelation/BnRelation.vue +120 -0
  75. package/packages/BnSelect/BnSelect.vue +485 -0
  76. package/packages/BnSmartForm/BnBatchForm.vue +334 -0
  77. package/packages/BnSmartForm/BnBatchFormDialog.vue +423 -0
  78. package/packages/BnSmartForm/BnSmartElf/elfLog/index.vue +57 -0
  79. package/packages/BnSmartForm/BnSmartElf/index.vue +95 -0
  80. package/packages/BnSmartForm/BnSmartFormPsychic.js +629 -0
  81. package/packages/BnSmartForm/BnSmartFormUtil.js +524 -0
  82. package/packages/BnSmartForm/addressForm/index.vue +73 -0
  83. package/packages/BnSmartForm/checkboxForm/index.vue +99 -0
  84. package/packages/BnSmartForm/childrenForm/childFormFile.vue +237 -0
  85. package/packages/BnSmartForm/childrenForm/childrenFormBody.vue +260 -0
  86. package/packages/BnSmartForm/childrenForm/index.vue +110 -0
  87. package/packages/BnSmartForm/childrenForm/searchInventory.vue +115 -0
  88. package/packages/BnSmartForm/chooseAssocTable/chooseAssocTable.vue +451 -0
  89. package/packages/BnSmartForm/chooseAssocTable/chooseChildGood.vue +229 -0
  90. package/packages/BnSmartForm/chooseAssocTable/tableCellCopy.vue +84 -0
  91. package/packages/BnSmartForm/chooseChildOrder/chooseChildOrder.vue +158 -0
  92. package/packages/BnSmartForm/chooseIPaasData/chooseIPaasData.vue +307 -0
  93. package/packages/BnSmartForm/chooseIPaasData/tableCellCopy.vue +84 -0
  94. package/packages/BnSmartForm/choosePackage/choosePackage.vue +361 -0
  95. package/packages/BnSmartForm/dateDualForm/index.vue +37 -0
  96. package/packages/BnSmartForm/dateForm/index.vue +38 -0
  97. package/packages/BnSmartForm/fileForm/fileFormData.js +50 -0
  98. package/packages/BnSmartForm/fileForm/index.vue +240 -0
  99. package/packages/BnSmartForm/formItemFooter/formItemFooter.vue +38 -0
  100. package/packages/BnSmartForm/formItemTop/formItemTop.vue +42 -0
  101. package/packages/BnSmartForm/index.vue +1201 -0
  102. package/packages/BnSmartForm/numberForm/index.vue +63 -0
  103. package/packages/BnSmartForm/radioForm/index.vue +72 -0
  104. package/packages/BnSmartForm/receiveForm/index.vue +112 -0
  105. package/packages/BnSmartForm/relationForm/index.vue +82 -0
  106. package/packages/BnSmartForm/scoreForm/index.vue +39 -0
  107. package/packages/BnSmartForm/selectForm/index.vue +55 -0
  108. package/packages/BnSmartForm/showValForm/index.vue +42 -0
  109. package/packages/BnSmartForm/showValForm/showValFormTable.vue +104 -0
  110. package/packages/BnSmartForm/smartFormsCommon.scss +43 -0
  111. package/packages/BnSmartForm/stringForm/index.vue +170 -0
  112. package/packages/BnVirtPopover/index.vue +319 -0
  113. package/packages/BnWebLog/BnWebLog.vue +140 -0
  114. package/packages/BnWorkSettingDrop/advancedOptions.js +112 -0
  115. package/packages/BnWorkSettingDrop/benBenAIUtil.js +89 -0
  116. package/packages/BnWorkSettingDrop/index.vue +292 -0
  117. package/packages/font/iconfont.css +243 -0
  118. package/packages/font/iconfont.ttf +0 -0
  119. package/packages/font/iconfont.woff +0 -0
  120. package/packages/font/iconfont.woff2 +0 -0
  121. package/utils/addressParse-old.js +645 -0
  122. package/utils/addressParse.js +735 -0
  123. package/utils/config.js +68 -0
  124. package/utils/index.js +1171 -0
  125. package/dist/assocTableSearch-C14i_zJO.js +0 -349
  126. package/dist/assocTableSearch.css +0 -1
  127. package/dist/bn-bus-ui.es.js +0 -65
  128. package/dist/bn-bus-ui.umd.js +0 -49
  129. package/dist/chooseIPaasData-Cl_5qkFA.js +0 -391
  130. package/dist/chooseIPaasData.css +0 -1
  131. package/dist/defaultSet-I4xpf8a4.js +0 -297
  132. package/dist/defaultSet.css +0 -1
  133. package/dist/fileFormData-D_Q1vylE.js +0 -53
  134. package/dist/formItemFooter-CTA7rDtV.js +0 -108
  135. package/dist/formItemFooter.css +0 -1
  136. package/dist/funcExprDialog-Cm5BiRM3.js +0 -139
  137. package/dist/funcExprDialog.css +0 -1
  138. package/dist/index-B6b4uj8v.js +0 -51
  139. package/dist/index-BWdkDTbz.js +0 -109
  140. package/dist/index-BdZ1zOap.js +0 -89
  141. package/dist/index-BdzNjjMC.js +0 -64
  142. package/dist/index-BfpZqab2.js +0 -66
  143. package/dist/index-BmkiB4hr.js +0 -66
  144. package/dist/index-Br1sqCoo.js +0 -58
  145. package/dist/index-C9qrl-yc.js +0 -183
  146. package/dist/index-CXFJXCn5.js +0 -746
  147. package/dist/index-DF114jZq.js +0 -135
  148. package/dist/index-DFPfZ_Il.js +0 -178
  149. package/dist/index-DSEtu7TN.js +0 -44
  150. package/dist/index-Did0UUWV.js +0 -221
  151. package/dist/index-DrPj-tmI.js +0 -45
  152. package/dist/index-DzDf9s2W.js +0 -89
  153. package/dist/index-LnjudNEI.js +0 -118
  154. package/dist/index-ObCfCmDT.js +0 -45
  155. package/dist/index.css +0 -1
  156. package/dist/index2.css +0 -1
  157. package/dist/index3.css +0 -1
  158. package/dist/index4.css +0 -1
  159. package/dist/index5.css +0 -1
  160. package/dist/index6.css +0 -1
  161. package/dist/index7.css +0 -1
  162. package/dist/install-C-scqkds.js +0 -23103
  163. package/dist/install.css +0 -1
  164. package/dist/setOption-CSnWzOny.js +0 -329
  165. package/dist/setOption.css +0 -1
  166. package/dist/setRelationOption-CJcHdfaa.js +0 -5217
  167. package/dist/setRelationOption.css +0 -1
@@ -0,0 +1,323 @@
1
+ <template>
2
+ <el-dialog v-model="importTaskShow" width="600px" top="50px" title="批量导入" destroy-on-close>
3
+ <div class="workOrderImport" v-loading="loading">
4
+ <div class="w-tip w-margin-bottom10">
5
+ <div class="w-margin-bottom8">
6
+ <span class="w-tip-num">1.</span>为了保证数据导入顺利,推荐您使用标准模板
7
+ <a class="w-color-blue" :href="downloadTemplateUrl">下载模板</a>
8
+ </div>
9
+ <div class="w-margin-bottom8">
10
+ <span class="w-tip-num">2.</span>文件大小:数据不能超过 {{ maxImportNum }} 条
11
+ </div>
12
+ <div>
13
+ <span class="w-tip-num">3.</span>文件格式:Excel(.xls)、Excel (.xlsx)
14
+ </div>
15
+ </div>
16
+ <div v-if="hasTemplateSupport" class="w-flex-center w-margin-bottom10">
17
+ <div class="w-margin-right10 w-line-height22">选择导入模板</div>
18
+ <el-select
19
+ v-model="importSetting.templateId"
20
+ class="workOrderImport-templateSelect"
21
+ placeholder="请选择导入模板"
22
+ clearable
23
+ filterable
24
+ :empty-values="[null, undefined]"
25
+ :loading="templateLoading"
26
+ no-data-text="暂无导入模板">
27
+ <el-option
28
+ v-for="item in templateOptions"
29
+ :key="item.id"
30
+ :label="item.templateName"
31
+ :value="item.id"/>
32
+ </el-select>
33
+ </div>
34
+ <div class="w-flex-left w-margin-bottom10">
35
+ <div class="w-margin-right10 w-line-height22">选择导入方式</div>
36
+ <div>
37
+ <div class="w-margin-bottom8">
38
+ <BnRadio v-model="importSetting.type" class="w-margin-right10" :true-data="1" label="导入新增" :disabled="isImportTypeDisabled"/>
39
+ <BnRadio v-model="importSetting.type" :true-data="2" label="导入更新" :disabled="isImportTypeDisabled"/>
40
+ </div>
41
+ <div v-if="!hasSelectedTemplate" class="w-flex-center w-margin-bottom8">
42
+ <BnCheck v-model="importSetting.ext.mergeImport" trueData="1" falseData="0"
43
+ label="导入未合并的多行数据(组件:子表单、子订单)"/>
44
+ <el-popover placement="bottom" :width="350">
45
+ <div>
46
+ 导入创建时以订单号进行工单合并
47
+ <img
48
+ src="https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_4e9963ba94f1bed53dab1680e6f3e4d5.png"
49
+ alt="" style="height: 92px">
50
+ </div>
51
+ <template #reference>
52
+ <span class="bnUIcon bnUIcon-question"></span>
53
+ </template>
54
+ </el-popover>
55
+ </div>
56
+ <div v-if="!hasSelectedTemplate" class="w-margin-bottom8">
57
+ <BnCheck v-model="importSetting.ext.checkMust" trueData="0" falseData="1" label="导入时不做必填校验"/>
58
+ </div>
59
+ <div class="w-margin-bottom8">
60
+ <BnCheck v-model="importSetting.ext.submitCheck" trueData="1" falseData="0" label="导入校验提交校验开启中规则"/>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <el-upload
65
+ ref="uploader" drag
66
+ class="workOrderImport-file"
67
+ :action="`${baseUrl}/v2/attachment/upload/importTask`"
68
+ :on-success="uploadSuccess"
69
+ :before-upload="beforeUpload"
70
+ :multiple="false"
71
+ :show-file-list="false">
72
+ <div v-if="!fileData">
73
+ 拖拽文件到这里上传,或<span class="w-color-blue w-margin-left5"><i class="anwIcon aIcon-download"></i> 文件上传</span>
74
+ </div>
75
+ <div v-if="fileData">
76
+ <div><i class="anwIcon aIcon-success w-color-green-min"></i>上传文件成功</div>
77
+ <div><i class="anwIcon aIcon-excel w-color-green-min"></i>{{ fileData.fileName }}</div>
78
+ <div class="w-color-blue w-cursor-pointer w-margin-top5">重新上传</div>
79
+ </div>
80
+ </el-upload>
81
+ </div>
82
+ <div class="workOrderImport-footer">
83
+ <el-button @click="importTaskShow = false">取消</el-button>
84
+ <el-button type="primary" @click="importFile()">确认</el-button>
85
+ </div>
86
+ </el-dialog>
87
+ </template>
88
+
89
+ <script>
90
+ import {getApiBaseUrl} from "../../utils/config.js";
91
+
92
+ export default {
93
+ name: "BnImportOrder",
94
+ props: {
95
+ postFunc: Function,
96
+ postData: {
97
+ type: Object,
98
+ default() {
99
+ return {}
100
+ },
101
+ },
102
+ pathUrl: {
103
+ type: String,
104
+ default: '/biztable/io/import'
105
+ },
106
+ },
107
+ data() {
108
+ return {
109
+ loading: false,
110
+ templateLoading: false,
111
+ baseUrl: getApiBaseUrl(),
112
+ importTaskShow: false, // 弹窗显示与否
113
+ fileData: null, // 上传好的文件信息
114
+ templateList: [], // 导入模板下拉列表
115
+ maxImportNum:30000,//最多导入条数
116
+ importSetting: {
117
+ type: '1', // 导入方式 1 导入新增 2 导入更新 物流单号导入
118
+ templateId: '', // 当前选择的导入模板ID
119
+ ext: {
120
+ mergeImport: '0',//导入未合并的多行数据(组件:子表单、子订单)
121
+ checkMust: '1',//导入时不做必填校验
122
+ submitCheck: '0',//导入校验提交校验开启中规则
123
+ },
124
+ }
125
+ };
126
+ },
127
+ watch: {
128
+ 'importSetting.templateId': {
129
+ handler(newVal) {
130
+ if (newVal) {
131
+ const template = this.templateList.find(item => item.id === newVal);
132
+ if (template && template.type !== undefined) {
133
+ this.importSetting.type = template.type === 1 ? '1' : '2';
134
+ }
135
+ }
136
+ },
137
+ immediate: false
138
+ }
139
+ },
140
+ computed: {
141
+ hasTemplateSupport() {
142
+ const { appId, tableId } = this.postData || {};
143
+ return appId && tableId;
144
+ },
145
+ hasSelectedTemplate() {
146
+ return Boolean(this.importSetting.templateId);
147
+ },
148
+ templateOptions() {
149
+ return [
150
+ {
151
+ id: '',
152
+ templateName: '默认模板',
153
+ },
154
+ ...this.templateList,
155
+ ];
156
+ },
157
+ downloadTemplateUrl() {
158
+ const tableCode = this.postData?.tableCode || '';
159
+ const templateId = this.importSetting.templateId;
160
+ const type = this.importSetting.type;
161
+ const url = `/biztable/io/buildTemplate?tableCode=${tableCode}&type=${type}`;
162
+ return templateId ? `${url}&templateId=${templateId}` : url;
163
+ },
164
+ // 当前选中模板的 type 字段
165
+ selectedTemplateType() {
166
+ const templateId = this.importSetting.templateId;
167
+ if (!templateId) return null;
168
+ const template = this.templateList.find(item => item.id === templateId);
169
+ return template?.type ?? null;
170
+ },
171
+ // 是否禁用导入方式选择
172
+ isImportTypeDisabled() {
173
+ return this.hasSelectedTemplate && this.selectedTemplateType !== null;
174
+ },
175
+ },
176
+ methods: {
177
+ /**
178
+ * 打开导入弹框
179
+ * */
180
+ open(template) {
181
+ this.fileData = null;
182
+ this.importSetting.templateId = template?.id || '';
183
+ if (template?.id) {
184
+ this.templateList = [template];
185
+ // 根据模板 type 自动设置导入方式
186
+ this.importSetting.type = template.type === 1 ? '1' : '2';
187
+ }
188
+ this.getVersion();
189
+ this.getImportTemplateList();
190
+ this.importTaskShow = true;
191
+ },
192
+ /**
193
+ * 获取当前表可用的导入模板列表,供批量导入弹框中的模板下拉选择。
194
+ *
195
+ * @return 请求完成后无显式返回值。
196
+ */
197
+ getImportTemplateList() {
198
+ const {appId, tableId} = this.postData || {};
199
+ if (!this.importSetting.templateId) {
200
+ this.templateList = [];
201
+ }
202
+ if (!this.postFunc || !appId || !tableId) {
203
+ return;
204
+ }
205
+ this.templateLoading = true;
206
+ this.postFunc(`/excelImportTemplate/${appId}/${tableId}/1/80?source=biztable`, null, 'get').then(res => {
207
+ this.templateLoading = false;
208
+ if (!res?.code) {
209
+ this.templateList = res.data?.results || [];
210
+ }
211
+ }).catch(() => {
212
+ this.templateLoading = false;
213
+ })
214
+ },
215
+ /**
216
+ * 选择文件上传成功后
217
+ * */
218
+ uploadSuccess(file) {
219
+ this.loading = false;
220
+ if (!file.code) {
221
+ //步骤
222
+ this.fileData = file.data;
223
+ } else {
224
+ this.fileData = null;
225
+ // 上传失败清空文件
226
+ if (this.$refs.uploader) this.$refs.uploader.clearFiles();
227
+ }
228
+ },
229
+ /**
230
+ * 上传文件前
231
+ * */
232
+ beforeUpload(file) {
233
+ let s = 30;
234
+ let sizeNumber = 1048576 * s
235
+ let sizeMsg = `请检查导入数据是否超过${this.maxImportNum}条的导入上限,并且文件不能大于30M.若导入行数没有超过上限,请将导入数据框选(不要框选空白行列)从原文件复制->黏贴到导入模板,重新上传`;
236
+ if (file.size > sizeNumber) {
237
+ this.$message.warning(sizeMsg)
238
+ return false;
239
+ }
240
+ this.loading = true;
241
+ },
242
+ /**
243
+ * 确定导入
244
+ * */
245
+ importFile() {
246
+ if (!this.fileData) {
247
+ this.$message.warning('请先上传文件');
248
+ return;
249
+ }
250
+ this.loading = true;
251
+ let postData = {
252
+ ...this.importSetting,
253
+ url: this.fileData.url,
254
+ ...this.postData
255
+ }
256
+ if (!postData.templateId) {
257
+ delete postData.templateId;
258
+ }
259
+ this.postFunc(this.pathUrl, postData).then(res => {
260
+ this.loading = false;
261
+ if (!res.code) {
262
+ this.$message.success(res.msg)
263
+ this.$emit("importOver", postData, res)
264
+ this.importTaskShow = false;
265
+ }
266
+ })
267
+ },
268
+ /**
269
+ * 获取版本查看导入最多支持多少条
270
+ * */
271
+ getVersion() {
272
+ this.postFunc('v2/logins/checkSession', {}).then(res => {
273
+ if (!res.code) {
274
+ this.maxImportNum = res.data.capacity.exportImportMax
275
+ }
276
+ })
277
+ }
278
+ },
279
+ }
280
+ </script>
281
+
282
+ <style scoped lang="scss">
283
+
284
+ .workOrderImport {
285
+ padding:0 0 12px 0;
286
+
287
+
288
+ &-templateSelect {
289
+ width: 280px;
290
+ }
291
+
292
+ &-footer {
293
+ border-top: 1px solid rgba(0, 0, 0, 0.06);
294
+ height: 52px;
295
+ display: flex;
296
+ justify-content: flex-end;
297
+ align-items: center;
298
+ padding: 0 24px;
299
+ }
300
+ }
301
+
302
+ :deep(.workOrderImport-file) {
303
+ position: relative;
304
+ height: 140px;
305
+ border: 1px dashed #E1E1E1;
306
+ border-radius: 4px;
307
+
308
+ .el-upload {
309
+ width: 100%;
310
+ height: 138px;
311
+
312
+ .el-upload-dragger {
313
+ border: none;
314
+ width: 100%;
315
+ height: 100%;
316
+ border-radius: 0;
317
+ display: flex;
318
+ justify-content: space-around;
319
+ align-items: center;
320
+ }
321
+ }
322
+ }
323
+ </style>