@bytenew/bn-bus-ui 1.1.462 → 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.
- package/install.js +134 -0
- package/package.json +20 -4
- package/packages/BnAddress/index.vue +141 -0
- package/packages/BnAddressParse/index.vue +75 -0
- package/packages/BnAdvancedFilter/BnFilterView.vue +145 -0
- package/packages/BnAdvancedFilter/index.vue +345 -0
- package/packages/BnAdvancedFilter/util.js +171 -0
- package/packages/BnCascader/BnCascader.vue +543 -0
- package/packages/BnCascader/BnCascaderPanel.vue +1331 -0
- package/packages/BnCascader/cascaderDisplay.js +102 -0
- package/packages/BnCheck/BnCheck.vue +253 -0
- package/packages/BnColumnConfig/columnConfigDialog.vue +134 -0
- package/packages/BnColumnConfig/component/childrenFormSetting/assocTable.vue +143 -0
- package/packages/BnColumnConfig/component/childrenFormSetting/assocTableSearch.vue +314 -0
- package/packages/BnColumnConfig/component/childrenFormSetting/index.vue +243 -0
- package/packages/BnColumnConfig/component/defaultSet/defaultSet.vue +114 -0
- package/packages/BnColumnConfig/component/defaultSet/stringDefault.vue +210 -0
- package/packages/BnColumnConfig/component/funcExprDialog/funcExprDialog.vue +126 -0
- package/packages/BnColumnConfig/component/packageFilter/index.vue +141 -0
- package/packages/BnColumnConfig/component/paraExplainSet/index.vue +156 -0
- package/packages/BnColumnConfig/component/setOption/setOption.vue +321 -0
- package/packages/BnColumnConfig/component/setRelationOption/ConditionList.vue +277 -0
- package/packages/BnColumnConfig/component/setRelationOption/LevelHeader.vue +144 -0
- package/packages/BnColumnConfig/component/setRelationOption/setRelationOption.vue +642 -0
- package/packages/BnColumnConfig/data.js +129 -0
- package/packages/BnColumnConfig/index.scss +23 -0
- package/packages/BnColumnConfig/index.vue +309 -0
- package/packages/BnCondVal/BnCondVal.vue +112 -0
- package/packages/BnCondVal/itemVal/dateRegVal.vue +39 -0
- package/packages/BnCondVal/itemVal/dateVal.vue +39 -0
- package/packages/BnCondVal/itemVal/numRegVal.vue +67 -0
- package/packages/BnCondVal/itemVal/numVal.vue +44 -0
- package/packages/BnCondVal/itemVal/relationVal.vue +73 -0
- package/packages/BnCondVal/itemVal/selectColumnVal.vue +58 -0
- package/packages/BnCondVal/itemVal/selectVal.vue +59 -0
- package/packages/BnCondVal/itemVal/stringVal.vue +156 -0
- package/packages/BnCondition/index.vue +551 -0
- package/packages/BnCondition/util.js +232 -0
- package/packages/BnDatePicker/BnDatePicker.vue +194 -0
- package/packages/BnDrop/BnDrop.vue +917 -0
- package/packages/BnEmptyTip/BnEmptyTip.vue +107 -0
- package/packages/BnExportOrder/BnExportOrder.vue +241 -0
- package/packages/BnExportOrder/validatorCode.vue +94 -0
- package/packages/BnFileView/BnFileView.vue +271 -0
- package/packages/BnFileView/FileDetail.vue +125 -0
- package/packages/BnFileView/videoPreview.vue +70 -0
- package/packages/BnFilterOption/BnFilterOption.vue +160 -0
- package/packages/BnFunExpr/BnFunExpr.vue +608 -0
- package/packages/BnImportOrder/BnImportOrder.vue +323 -0
- package/packages/BnImportTemplate/BnImportTemplate.vue +866 -0
- package/packages/BnImportTemplate/assets/merge_tip_img.png +0 -0
- package/packages/BnImportTemplate/assets/sheet_tip.png +0 -0
- package/packages/BnImportTemplate/assets/xls.png +0 -0
- package/packages/BnImportTemplate/components/ImportTemplateTrigger.vue +198 -0
- package/packages/BnImportTemplate/components/TemplateEditDialog.vue +340 -0
- package/packages/BnImportTemplate/components/TemplateFieldsConfig.vue +401 -0
- package/packages/BnImportTemplate/components/TemplateListDialog.vue +297 -0
- package/packages/BnInpNum/BnInpNum.vue +165 -0
- package/packages/BnMenus/BnMenus.vue +502 -0
- package/packages/BnMenus/MenuItem.vue +321 -0
- package/packages/BnOrderCard/BnOrderCard.vue +389 -0
- package/packages/BnOrderCard/orderRemark.vue +178 -0
- package/packages/BnOrderCard/util.js +94 -0
- package/packages/BnOrderDetail/BnOrderDetail.vue +338 -0
- package/packages/BnOrderDetail/filterLogByUser.vue +108 -0
- package/packages/BnOrderDetail/orderLogs.vue +53 -0
- package/packages/BnOrderDetail/showSubForm/index.vue +41 -0
- package/packages/BnOrderDetail/showSubForm/showChildTable.vue +61 -0
- package/packages/BnOrderDetail/showSubForm/showTimeLine.vue +131 -0
- package/packages/BnOrderDetail/showSubForm/tableCellCopy.vue +84 -0
- package/packages/BnOrderShare/index.vue +378 -0
- package/packages/BnOrderShare/shareUrlInp.vue +54 -0
- package/packages/BnRadio/BnRadio.vue +181 -0
- package/packages/BnRelation/BnRelation.vue +120 -0
- package/packages/BnSelect/BnSelect.vue +485 -0
- package/packages/BnSmartForm/BnBatchForm.vue +334 -0
- package/packages/BnSmartForm/BnBatchFormDialog.vue +423 -0
- package/packages/BnSmartForm/BnSmartElf/elfLog/index.vue +57 -0
- package/packages/BnSmartForm/BnSmartElf/index.vue +95 -0
- package/packages/BnSmartForm/BnSmartFormPsychic.js +629 -0
- package/packages/BnSmartForm/BnSmartFormUtil.js +524 -0
- package/packages/BnSmartForm/addressForm/index.vue +73 -0
- package/packages/BnSmartForm/checkboxForm/index.vue +99 -0
- package/packages/BnSmartForm/childrenForm/childFormFile.vue +237 -0
- package/packages/BnSmartForm/childrenForm/childrenFormBody.vue +260 -0
- package/packages/BnSmartForm/childrenForm/index.vue +110 -0
- package/packages/BnSmartForm/childrenForm/searchInventory.vue +115 -0
- package/packages/BnSmartForm/chooseAssocTable/chooseAssocTable.vue +451 -0
- package/packages/BnSmartForm/chooseAssocTable/chooseChildGood.vue +229 -0
- package/packages/BnSmartForm/chooseAssocTable/tableCellCopy.vue +84 -0
- package/packages/BnSmartForm/chooseChildOrder/chooseChildOrder.vue +158 -0
- package/packages/BnSmartForm/chooseIPaasData/chooseIPaasData.vue +307 -0
- package/packages/BnSmartForm/chooseIPaasData/tableCellCopy.vue +84 -0
- package/packages/BnSmartForm/choosePackage/choosePackage.vue +361 -0
- package/packages/BnSmartForm/dateDualForm/index.vue +37 -0
- package/packages/BnSmartForm/dateForm/index.vue +38 -0
- package/packages/BnSmartForm/fileForm/fileFormData.js +50 -0
- package/packages/BnSmartForm/fileForm/index.vue +240 -0
- package/packages/BnSmartForm/formItemFooter/formItemFooter.vue +38 -0
- package/packages/BnSmartForm/formItemTop/formItemTop.vue +42 -0
- package/packages/BnSmartForm/index.vue +1201 -0
- package/packages/BnSmartForm/numberForm/index.vue +63 -0
- package/packages/BnSmartForm/radioForm/index.vue +72 -0
- package/packages/BnSmartForm/receiveForm/index.vue +112 -0
- package/packages/BnSmartForm/relationForm/index.vue +82 -0
- package/packages/BnSmartForm/scoreForm/index.vue +39 -0
- package/packages/BnSmartForm/selectForm/index.vue +55 -0
- package/packages/BnSmartForm/showValForm/index.vue +42 -0
- package/packages/BnSmartForm/showValForm/showValFormTable.vue +104 -0
- package/packages/BnSmartForm/smartFormsCommon.scss +43 -0
- package/packages/BnSmartForm/stringForm/index.vue +170 -0
- package/packages/BnVirtPopover/index.vue +319 -0
- package/packages/BnWebLog/BnWebLog.vue +140 -0
- package/packages/BnWorkSettingDrop/advancedOptions.js +112 -0
- package/packages/BnWorkSettingDrop/benBenAIUtil.js +89 -0
- package/packages/BnWorkSettingDrop/index.vue +292 -0
- package/packages/font/iconfont.css +243 -0
- package/packages/font/iconfont.ttf +0 -0
- package/packages/font/iconfont.woff +0 -0
- package/packages/font/iconfont.woff2 +0 -0
- package/utils/addressParse-old.js +645 -0
- package/utils/addressParse.js +735 -0
- package/utils/config.js +68 -0
- package/utils/index.js +1171 -0
- package/dist/assocTableSearch-CmzOXI5w.js +0 -349
- package/dist/assocTableSearch.css +0 -1
- package/dist/bn-bus-ui.es.js +0 -65
- package/dist/bn-bus-ui.umd.js +0 -49
- package/dist/chooseIPaasData-jkTJEMKT.js +0 -391
- package/dist/chooseIPaasData.css +0 -1
- package/dist/defaultSet-CiYuSOzT.js +0 -297
- package/dist/defaultSet.css +0 -1
- package/dist/fileFormData-D_Q1vylE.js +0 -53
- package/dist/formItemFooter-BpnVUUgV.js +0 -108
- package/dist/formItemFooter.css +0 -1
- package/dist/funcExprDialog-BMc-n5FL.js +0 -139
- package/dist/funcExprDialog.css +0 -1
- package/dist/index-8GQJARcF.js +0 -44
- package/dist/index-8apT0r8m.js +0 -66
- package/dist/index-BOFu3qAH.js +0 -183
- package/dist/index-BSKXuSid.js +0 -89
- package/dist/index-BhYvDd_Q.js +0 -45
- package/dist/index-BhqkeVFc.js +0 -45
- package/dist/index-CK7_Ou7F.js +0 -89
- package/dist/index-Cfb8D3Fg.js +0 -58
- package/dist/index-D1fGD0mX.js +0 -51
- package/dist/index-DE_eQGbT.js +0 -746
- package/dist/index-DfgiBqzS.js +0 -221
- package/dist/index-Dobi0ms9.js +0 -66
- package/dist/index-DuyQNxe0.js +0 -118
- package/dist/index-DxpJkrN7.js +0 -64
- package/dist/index-FGHeG46m.js +0 -109
- package/dist/index-P2M7CUTe.js +0 -178
- package/dist/index-xCz2zysE.js +0 -135
- package/dist/index.css +0 -1
- package/dist/index2.css +0 -1
- package/dist/index3.css +0 -1
- package/dist/index4.css +0 -1
- package/dist/index5.css +0 -1
- package/dist/index6.css +0 -1
- package/dist/index7.css +0 -1
- package/dist/install--7IU60oV.js +0 -23103
- package/dist/install.css +0 -1
- package/dist/setOption-DehYZpZr.js +0 -329
- package/dist/setOption.css +0 -1
- package/dist/setRelationOption-BL-AFUoF.js +0 -5217
- 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>
|