jinhui.wang

接口增加,订单,运单查询修改,申报页面增加

1 +import request from '@/utils/request'
2 +
3 +//获取自定义设置数据
4 +/**
5 + * @param billNo 提运单号
6 + * @param orderNo 订单编号
7 + * @param logisticsNo 运单编号
8 + * @param startCreateTime 创建开始时间
9 + * @param endCreateTime 创建结束时间
10 + * @param receiptType 回执类型
11 + * @param receiptStatus 回执状态
12 + * @param pageNum *
13 + * @param pageSize *
14 + */
15 +export function searchDeclareData(data) {
16 + return request({
17 + url: '/bus-customer/declareData/getDeclareDataList',
18 + method: 'post',
19 + data: data,
20 + })
21 +}
22 +
23 +//申报数据导入
24 +/**
25 + * @param multipartFile * 提运单号
26 + */
27 +export function uploadDeclareData(data) {
28 + let formData = new FormData
29 + formData.append("multipartFile", data.multipartFile);
30 + return request({
31 + url: '/bus-customer/declareData/import',
32 + method: 'post',
33 + data: formData,
34 + })
35 +}
36 +
37 +//数据申报
38 +/**
39 + * @param declareIds * id list
40 + * @param type *
41 + */
42 +export function declareDataUpload(data) {
43 + return request({
44 + url: '/bus-customer/declareData/' + data.type,
45 + method: 'post',
46 + data: data.declareIds,
47 + })
48 +}
49 +
1 +import request from '@/utils/request'
2 +
3 +//获取自定义设置数据
4 +/**
5 + * @param ebccode 电商企业代码
6 + * @param orderNo 电商订单/海外仓订仓单编号
7 + * @param returnStatus 回执状态
8 + * @param createTimeStart 创建开始时间
9 + * @param createTimeEnd 创建结束时间
10 + * @param pageNum *
11 + * @param pageSize *
12 + */
13 +export function getAllExportingBills(data) {
14 + return request({
15 + url: '/bus-customer/exportOrder/search',
16 + method: 'post',
17 + data: data,
18 + })
19 +}
20 +
21 +//获取自定义设置数据
22 +/**
23 + * @param logisticsNo 物流运单编号
24 + * @param logisticsCode 物流企业代码
25 + * @param returnStatus 回执状态
26 + * @param createTimeStart 创建开始时间
27 + * @param createTimeEnd 创建结束时间
28 + * @param pageNum *
29 + * @param pageSize *
30 + */
31 +export function getAllExportingTransportBills(data) {
32 + return request({
33 + url: '/bus-customer/exportWaybill/search',
34 + method: 'post',
35 + data: data,
36 + })
37 +}
...\ No newline at end of file ...\ No newline at end of file
1 -import request from '@/utils/request'
2 -
3 -/**
4 - */
5 -export function queryBills(data) {
6 - return request({
7 - url: '/bus-employees/rde/op/approve/check',
8 - method: 'post',
9 - data: data
10 - })
11 -}
12 -
13 -
14 -/**
15 - * 查询菜单
16 - */
17 -export function getAllMenus() {
18 - return request({
19 - url: '/menu/selectAllMenu',
20 - method: 'get'
21 - })
22 -}
23 -
24 -export function getAllExportingBills(data) {
25 - return request({
26 - url: '/bus-customer/exportOrder/search',
27 - method: 'post',
28 - data
29 - })
30 -}
31 -
32 -export function getAllTransportBills(data) {
33 - return request({
34 - url: '/bus-customer/exportWaybill/search',
35 - method: 'post',
36 - data
37 - })
38 -}
39 -
40 -export function getAllListBills(data) {
41 - return request({
42 - url: '/bus-customer/exportList/search',
43 - method: 'post',
44 - data
45 - })
46 -}
47 -
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
10 10
11 <script> 11 <script>
12 export default { 12 export default {
13 - name: 'AppMain', 13 + name: "AppMain",
14 computed: { 14 computed: {
15 cachedViews() { 15 cachedViews() {
16 - return this.$store.state.tagsView.cachedViews 16 + return this.$store.state.tagsView.cachedViews;
17 }, 17 },
18 key() { 18 key() {
19 - return this.$route.fullPath 19 + return this.$route.fullPath;
20 - } 20 + },
21 - } 21 + },
22 -} 22 +};
23 </script> 23 </script>
24 24
25 <style lang="scss" scoped> 25 <style lang="scss" scoped>
...@@ -31,11 +31,11 @@ export default { ...@@ -31,11 +31,11 @@ export default {
31 min-width: 1080px; 31 min-width: 1080px;
32 position: relative; 32 position: relative;
33 //overflow: hidden; 33 //overflow: hidden;
34 - overflow: auto; 34 + overflow: hidden;
35 background-color: #f2f2f2; 35 background-color: #f2f2f2;
36 } 36 }
37 37
38 -.fixed-header+.app-main { 38 +.fixed-header + .app-main {
39 padding-top: 50px; 39 padding-top: 50px;
40 } 40 }
41 41
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
45 min-height: calc(100vh - 84px); 45 min-height: calc(100vh - 84px);
46 } 46 }
47 47
48 - .fixed-header+.app-main { 48 + .fixed-header + .app-main {
49 padding-top: 84px; 49 padding-top: 84px;
50 } 50 }
51 } 51 }
......
...@@ -99,12 +99,15 @@ export default { ...@@ -99,12 +99,15 @@ export default {
99 watch: { 99 watch: {
100 $route(val) { 100 $route(val) {
101 this.activeRoute = val; 101 this.activeRoute = val;
102 + this.setMainHeight();
102 }, 103 },
103 }, 104 },
104 - mounted() { 105 + mounted() {},
105 -
106 - },
107 methods: { 106 methods: {
107 + setMainHeight(val) {
108 + document.querySelector(".main-container").style.height =
109 + "calc(100% - 64px)";
110 + },
108 handleClickOutside() { 111 handleClickOutside() {
109 this.$store.dispatch("app/closeSideBar", { withoutAnimation: false }); 112 this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
110 }, 113 },
......
...@@ -79,13 +79,13 @@ export const constantRoutes = [ ...@@ -79,13 +79,13 @@ export const constantRoutes = [
79 component: Layout, 79 component: Layout,
80 hidden: false, 80 hidden: false,
81 redirect: 'index', 81 redirect: 'index',
82 - meta: { title: '系统管理', icon: 'fedexSystem' }, 82 + meta: { title: '申报数据管理', icon: 'upload' },
83 children: [ 83 children: [
84 { 84 {
85 path: '/reportingData', 85 path: '/reportingData',
86 - component: (resolve) => require(['@/views/AuditionEntrySearch/index'], resolve), 86 + component: (resolve) => require(['@/views/reportingData/index'], resolve),
87 hidden: false, 87 hidden: false,
88 - meta: { title: '申报数据管理', icon: 'api' } 88 + meta: { title: '申报数据管理', icon: 'upload' }
89 } 89 }
90 ] 90 ]
91 }, 91 },
...@@ -94,76 +94,97 @@ export const constantRoutes = [ ...@@ -94,76 +94,97 @@ export const constantRoutes = [
94 component: Layout, 94 component: Layout,
95 hidden: false, 95 hidden: false,
96 redirect: 'index', 96 redirect: 'index',
97 - meta: { title: '查询管理', icon: 'fedexSystem' }, 97 + meta: { title: '查询管理', icon: 'fedexExportIcon' },
98 children: [ 98 children: [
99 { 99 {
100 path: '/exportBillQuery', 100 path: '/exportBillQuery',
101 component: (resolve) => require(['@/views/exportBillQuery/index'], resolve), 101 component: (resolve) => require(['@/views/exportBillQuery/index'], resolve),
102 hidden: false, 102 hidden: false,
103 - meta: { title: '出口订单查询', icon: 'api' }, 103 + meta: { title: '出口订单查询', icon: '' },
104 }, 104 },
105 { 105 {
106 path: '/exportBillDetail', 106 path: '/exportBillDetail',
107 component: (resolve) => require(['@/views/exportBillDetail/index'], resolve), 107 component: (resolve) => require(['@/views/exportBillDetail/index'], resolve),
108 hidden: true, 108 hidden: true,
109 - meta: { title: '出口订单详情', icon: 'api' }, 109 + meta: { title: '出口订单详情', icon: '' },
110 }, 110 },
111 { 111 {
112 path: '/exportTransportDetail', 112 path: '/exportTransportDetail',
113 component: (resolve) => require(['@/views/exportTransportDetail/index'], resolve), 113 component: (resolve) => require(['@/views/exportTransportDetail/index'], resolve),
114 hidden: true, 114 hidden: true,
115 - meta: { title: '出口运单详情', icon: 'api' }, 115 + meta: { title: '出口运单详情', icon: '' },
116 }, 116 },
117 { 117 {
118 path: '/exportListDetail', 118 path: '/exportListDetail',
119 component: (resolve) => require(['@/views/exportListDetail/index'], resolve), 119 component: (resolve) => require(['@/views/exportListDetail/index'], resolve),
120 hidden: true, 120 hidden: true,
121 - meta: { title: '出口清单详情', icon: 'api' }, 121 + meta: { title: '出口清单详情', icon: '' },
122 }, 122 },
123 { 123 {
124 path: '/exportTransportBillQuery', 124 path: '/exportTransportBillQuery',
125 component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve), 125 component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve),
126 hidden: false, 126 hidden: false,
127 - meta: { title: '出口运单查询', icon: 'api' }, 127 + meta: { title: '出口运单查询', icon: '' },
128 }, 128 },
129 { 129 {
130 path: '/exportListQuery', 130 path: '/exportListQuery',
131 component: (resolve) => require(['@/views/exportListQuery/index'], resolve), 131 component: (resolve) => require(['@/views/exportListQuery/index'], resolve),
132 name: '首页', 132 name: '首页',
133 - meta: { title: '出口清单查询', icon: 'dashboard' } 133 + meta: { title: '出口清单查询', icon: '' }
134 }, 134 },
135 { 135 {
136 path: '/listBranchQuery', 136 path: '/listBranchQuery',
137 component: (resolve) => require(['@/views/listBranchQuery/index'], resolve), 137 component: (resolve) => require(['@/views/listBranchQuery/index'], resolve),
138 name: '首页', 138 name: '首页',
139 hidden: false, 139 hidden: false,
140 - meta: { title: '清单总分单查询', icon: 'dashboard' } 140 + meta: { title: '清单总分单查询', icon: '' }
141 }, 141 },
142 { 142 {
143 path: '/listBranchDetail', 143 path: '/listBranchDetail',
144 component: (resolve) => require(['@/views/listBranchDetail/index'], resolve), 144 component: (resolve) => require(['@/views/listBranchDetail/index'], resolve),
145 name: '首页', 145 name: '首页',
146 hidden: true, 146 hidden: true,
147 - meta: { title: '清单总分单详情', icon: 'dashboard' } 147 + meta: { title: '清单总分单详情', icon: '' }
148 }, 148 },
149 { 149 {
150 path: '/logisticsExitDetail', 150 path: '/logisticsExitDetail',
151 component: (resolve) => require(['@/views/logisticsExitDetail/index'], resolve), 151 component: (resolve) => require(['@/views/logisticsExitDetail/index'], resolve),
152 name: '首页', 152 name: '首页',
153 hidden: true, 153 hidden: true,
154 - meta: { title: '物流离境单详情', icon: 'dashboard' } 154 + meta: { title: '物流离境单详情', icon: '' }
155 }, 155 },
156 { 156 {
157 path: '/logisticsExitQuery', 157 path: '/logisticsExitQuery',
158 component: (resolve) => require(['@/views/logisticsExitQuery/index'], resolve), 158 component: (resolve) => require(['@/views/logisticsExitQuery/index'], resolve),
159 name: '首页', 159 name: '首页',
160 - meta: { title: '物流离境单查询', icon: 'dashboard' } 160 + meta: { title: '物流离境单查询', icon: '' }
161 }, 161 },
162 { 162 {
163 path: 'index', 163 path: 'index',
164 component: (resolve) => require(['@/views/index'], resolve), 164 component: (resolve) => require(['@/views/index'], resolve),
165 name: '首页', 165 name: '首页',
166 - meta: { title: '出口撤销单查询', icon: 'dashboard' } 166 + meta: { title: '出口撤销单查询', icon: '' }
167 + }
168 + ]
169 + },
170 + {
171 + path: '/',
172 + component: Layout,
173 + hidden: false,
174 + redirect: 'index',
175 + meta: { title: '汇总申报', icon: 'fedexSummary' },
176 + children: [
177 + {
178 + path: '/summary',
179 + component: (resolve) => require(['@/views/reportingData/index'], resolve),
180 + hidden: false,
181 + meta: { title: '汇总申报', icon: '' }
182 + },
183 + {
184 + path: '/summaryDataSearch',
185 + component: (resolve) => require(['@/views/reportingData/index'], resolve),
186 + hidden: false,
187 + meta: { title: '汇总申请单查询', icon: '' }
167 } 188 }
168 ] 189 ]
169 }, 190 },
......
...@@ -84,8 +84,8 @@ const user = { ...@@ -84,8 +84,8 @@ const user = {
84 reject(res) 84 reject(res)
85 } else { 85 } else {
86 if (!getToken()) { 86 if (!getToken()) {
87 - setToken(res.data.token) 87 + setToken(res.data)
88 - commit('SET_TOKEN', res.data.token) 88 + commit('SET_TOKEN', res.data)
89 resolve(res) 89 resolve(res)
90 } else { 90 } else {
91 resolve(res) 91 resolve(res)
......
...@@ -37,23 +37,23 @@ export function removeUserId() { ...@@ -37,23 +37,23 @@ export function removeUserId() {
37 } 37 }
38 38
39 export function setCookie(cookie) { 39 export function setCookie(cookie) {
40 - return localStorage.setItem('iClearLoginTIp', cookie) 40 + return localStorage.setItem('EcomLoginTIp', cookie)
41 } 41 }
42 42
43 export function getCookie() { 43 export function getCookie() {
44 - return localStorage.getItem('iClearLoginTIp') 44 + return localStorage.getItem('EcomLoginTIp')
45 } 45 }
46 46
47 export function setTime(date) { 47 export function setTime(date) {
48 - return localStorage.setItem('iClearLoginTime', date) 48 + return localStorage.setItem('EcomLoginTime', date)
49 } 49 }
50 50
51 export function getTime() { 51 export function getTime() {
52 - return localStorage.getItem('iClearLoginTime') 52 + return localStorage.getItem('EcomLoginTime')
53 } 53 }
54 54
55 export function removeTime() { 55 export function removeTime() {
56 - return localStorage.removeItem('iClearLoginTime') 56 + return localStorage.removeItem('EcomLoginTime')
57 } 57 }
58 58
59 export function setLoginType(type) { 59 export function setLoginType(type) {
......
...@@ -18,21 +18,11 @@ const mimeMap = { ...@@ -18,21 +18,11 @@ const mimeMap = {
18 18
19 const apiUrl = { 19 const apiUrl = {
20 //exl 20 //exl
21 - customDownloadXls: '/bus-employees/export/custom/setting',//自定义导出 21 + declareDataModel: '/bus-customer/declareData/downloadTemplate',
22 - epoaDownload: '/bus-employees/port/op/download',//epoa文件下载
23 - pbiListDownload: '/bus-employees/data/report/export/daily',//报表列表导出
24 - pbiLogDownload: '/bus-employees/data/report/export/efficiency',//预审人员效绩统计
25 - osprDownload: '/bus-employees/ospr/download',//opsr文件下载
26 - portCDownload: '/bus-employees/port/op/decC/export',//C类申报导出
27 - //other
28 - portDownloadZip: '/bus-employees/port/op/downLoadZip',//口岸异步下载
29 - staffEntryDownloadZip: '/bus-employees/chm/qry/downLoadZip',//运单查询异步下载
30 - entryUploadData: '/bus-customer/consignment/upload/export',//批量导入数据导出
31 - entryUploadModel: '/bus-customer/upload/excel/template/downLoad',//批量上传模版导出
32 - opsrDownloadZip: '/bus-employees/ospr/export',//opsr批量导出
33 } 22 }
34 23
35 const baseUrl = process.env.VUE_APP_BASE_API 24 const baseUrl = process.env.VUE_APP_BASE_API
25 +
36 export function downLoadZip(urlStatus, str, filename, type, method, data) { 26 export function downLoadZip(urlStatus, str, filename, type, method, data) {
37 return new Promise((resolve, reject) => { 27 return new Promise((resolve, reject) => {
38 var url = '' 28 var url = ''
...@@ -41,6 +31,7 @@ export function downLoadZip(urlStatus, str, filename, type, method, data) { ...@@ -41,6 +31,7 @@ export function downLoadZip(urlStatus, str, filename, type, method, data) {
41 } else if (urlStatus == 'res') { 31 } else if (urlStatus == 'res') {
42 url = str 32 url = str
43 } 33 }
34 + console.log(url);
44 35
45 if (method == 'get' && data) { 36 if (method == 'get' && data) {
46 url = url + '?'; 37 url = url + '?';
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 <template> 1 <template>
2 <div style="width: 100%; height: 100%; position: relative" v-if="imgShow"> 2 <div style="width: 100%; height: 100%; position: relative" v-if="imgShow">
3 - <el-image
4 - :src="url"
5 - fit="fill"
6 - style="display: block; width: 100%; height: 100%; opacity: 0.9"
7 - lazy
8 - ></el-image>
9 <div class="model"></div> 3 <div class="model"></div>
10 </div> 4 </div>
11 </template> 5 </template>
12 <script> 6 <script>
13 -import indexBackground from "@/assets/images/indexBackground.jpg";
14 -import { getLoginType } from "@/utils/auth";
15 export default { 7 export default {
16 props: {}, 8 props: {},
17 data() { 9 data() {
...@@ -22,36 +14,10 @@ export default { ...@@ -22,36 +14,10 @@ export default {
22 }; 14 };
23 }, 15 },
24 created() { 16 created() {
25 - getLoginType() ? (this.fcl = true) : (this.fcl = false); 17 +
26 - this.checkImgType();
27 }, 18 },
28 methods: { 19 methods: {
29 - checkImgType() { 20 +
30 - let interval = setInterval(() => {
31 - if (
32 - this.$store.getters.userData.organization &&
33 - this.$store.getters.userData.organization.code == "customer"
34 - // ||getToken().split(".")[0] == "2"
35 - ) {
36 - clearInterval(interval);
37 - if (this.fcl) {
38 - } else {
39 - this.imgShow = false;
40 - this.url = "";
41 - this.$router.push({
42 - path: "/newui_noentrySreach_parent/newui_noentrySreach_leaf",
43 - });
44 - }
45 - } else if (
46 - this.$store.getters.userData.organization &&
47 - this.$store.getters.userData.organization.code != "customer"
48 - ) {
49 - clearInterval(interval);
50 - this.url = indexBackground;
51 - this.imgShow = true;
52 - }
53 - }, 500);
54 - },
55 }, 21 },
56 }; 22 };
57 </script> 23 </script>
......
...@@ -156,7 +156,10 @@ ...@@ -156,7 +156,10 @@
156 :loading="loadings.downloadLoading2" 156 :loading="loadings.downloadLoading2"
157 @click="downloadBpiData('log')" 157 @click="downloadBpiData('log')"
158 > 158 >
159 - <svg-icon class="el-icon-user-solid" icon-class="fedexUpBlue"></svg-icon> 159 + <svg-icon
160 + class="el-icon-user-solid"
161 + icon-class="fedexUpBlue"
162 + ></svg-icon>
160 导出 163 导出
161 </el-button> 164 </el-button>
162 </div> 165 </div>
...@@ -192,8 +195,6 @@ ...@@ -192,8 +195,6 @@
192 </template> 195 </template>
193 196
194 <script> 197 <script>
195 -import {getAllExportingBills, getAllTransportBills} from "@/api/query/query";
196 -
197 export default { 198 export default {
198 name: "index", 199 name: "index",
199 data() { 200 data() {
...@@ -242,86 +243,76 @@ export default { ...@@ -242,86 +243,76 @@ export default {
242 { 243 {
243 name: "提运单号", 244 name: "提运单号",
244 value: "orderNo", 245 value: "orderNo",
245 - width: '150', 246 + width: "150",
246 - align: 'left' 247 + align: "left",
247 }, 248 },
248 { 249 {
249 - name: '运单编号', 250 + name: "运单编号",
250 - value: 'orderType', 251 + value: "orderType",
251 - width: '150', 252 + width: "150",
252 - align: 'left' 253 + align: "left",
253 }, 254 },
254 { 255 {
255 - name: '物流企业名称', 256 + name: "物流企业名称",
256 - value: 'ebccode', 257 + value: "ebccode",
257 - width: '200', 258 + width: "200",
258 - align: 'left' 259 + align: "left",
259 }, 260 },
260 { 261 {
261 - name: '运输方式', 262 + name: "运输方式",
262 - value: 'ebcname', 263 + value: "ebcname",
263 - width: '200', 264 + width: "200",
264 - align: 'left' 265 + align: "left",
265 }, 266 },
266 { 267 {
267 - name: '运输工具名称', 268 + name: "运输工具名称",
268 - value: 'createTime', 269 + value: "createTime",
269 - width: '150', 270 + width: "150",
270 - align: 'left' 271 + align: "left",
271 }, 272 },
272 { 273 {
273 - name: '航班航次号', 274 + name: "航班航次号",
274 - value: 'declaringEnterprise', 275 + value: "declaringEnterprise",
275 - width: '200', 276 + width: "200",
276 - align: 'left' 277 + align: "left",
277 }, 278 },
278 { 279 {
279 - name: '离境时间', 280 + name: "离境时间",
280 - value: 'declaringEnterprise', 281 + value: "declaringEnterprise",
281 - width: '200', 282 + width: "200",
282 - align: 'left' 283 + align: "left",
283 }, 284 },
284 { 285 {
285 - name: '报送类型', 286 + name: "报送类型",
286 - value: 'declaringEnterprise', 287 + value: "declaringEnterprise",
287 - width: '200', 288 + width: "200",
288 - align: 'left' 289 + align: "left",
289 }, 290 },
290 { 291 {
291 - name: '业务状态', 292 + name: "业务状态",
292 - value: 'declaringType', 293 + value: "declaringType",
293 - width: '100', 294 + width: "100",
294 - align: 'left' 295 + align: "left",
295 }, 296 },
296 { 297 {
297 - name: '申报日期', 298 + name: "申报日期",
298 - value: 'declaringType', 299 + value: "declaringType",
299 - width: '100', 300 + width: "100",
300 - align: 'left' 301 + align: "left",
301 - } 302 + },
302 ], 303 ],
303 dictData: { 304 dictData: {
304 userport: [ 305 userport: [
305 - {name: "Shanghai Port", code: "SH"}, 306 + { name: "Shanghai Port", code: "SH" },
306 - {name: "Beijing Port", code: "BJ"}, 307 + { name: "Beijing Port", code: "BJ" },
307 - {name: "Guangzhou Port", code: "GZ"}, 308 + { name: "Guangzhou Port", code: "GZ" },
308 - {name: "Shenzhen Port", code: "SZ"}, 309 + { name: "Shenzhen Port", code: "SZ" },
309 - {name: "Tianjin Port", code: "TJ"}, 310 + { name: "Tianjin Port", code: "TJ" },
310 ], 311 ],
311 }, 312 },
312 - } 313 + };
313 - },
314 - created() {
315 - getAllTransportBills({
316 - pageIndex: 1,
317 - pageSize: 20
318 - }).then((res) => {
319 - console.log('res', res)
320 - this.tableData = res.data.value;
321 - this.total = res.data.totalItems;
322 - debugger;
323 - })
324 }, 314 },
315 + created() {},
325 methods: { 316 methods: {
326 tableSelect(val) { 317 tableSelect(val) {
327 this.selected = val.selection; 318 this.selected = val.selection;
...@@ -332,15 +323,14 @@ export default { ...@@ -332,15 +323,14 @@ export default {
332 handleRowClick(row) { 323 handleRowClick(row) {
333 const declareId = row.declareId; 324 const declareId = row.declareId;
334 this.$router.push({ 325 this.$router.push({
335 - path: '/logisticsExitDetail', 326 + path: "/logisticsExitDetail",
336 query: { 327 query: {
337 - declareId 328 + declareId,
338 - } 329 + },
339 }); 330 });
340 }, 331 },
341 async search(val) { 332 async search(val) {
342 try { 333 try {
343 -
344 } catch (error) { 334 } catch (error) {
345 console.error("搜索出错:", error); 335 console.error("搜索出错:", error);
346 } finally { 336 } finally {
...@@ -348,8 +338,8 @@ export default { ...@@ -348,8 +338,8 @@ export default {
348 this.loadings.sreachLoading = false; 338 this.loadings.sreachLoading = false;
349 } 339 }
350 }, 340 },
351 - } 341 + },
352 -} 342 +};
353 </script> 343 </script>
354 344
355 <style scoped lang="scss"> 345 <style scoped lang="scss">
......
1 +<template>
2 + <el-dialog
3 + class="entryDialog classCUploadDialog"
4 + title="申报数据导入"
5 + :visible.sync="outerVisible"
6 + :show-close="false"
7 + width="35%"
8 + :close-on-click-modal="false"
9 + v-loading="loadings.dialogLoading"
10 + :element-loading-text="loadingText"
11 + @close="close"
12 + >
13 + <div class="modelItem">
14 + <div class="modelItem-title">
15 + <div>数据导入</div>
16 + <div>
17 + <el-button
18 + type="text"
19 + icon="el-icon-download"
20 + :loadings="$parent.loadings.dwonloadModelLoading"
21 + @click="dwonloadModelFile"
22 + >导入模板下载</el-button
23 + >
24 + </div>
25 + </div>
26 + <div class="uploadItem">
27 + <div class="uploadbox">
28 + <el-button
29 + size="mini"
30 + type="text"
31 + v-loading="loadings.uploadLoading"
32 + @click="uploadFile"
33 + >上传文件
34 + </el-button>
35 + <el-upload
36 + class="upload-demo"
37 + ref="uploadFile"
38 + action="/manager-server/attachment/picImg"
39 + :http-request="fileUpload"
40 + :auto-upload="true"
41 + :show-file-list="false"
42 + :data="{}"
43 + accept=".xlsx"
44 + :before-upload="beforeUpload"
45 + :on-remove="handleRemove"
46 + :on-success="handleSuccess"
47 + :on-change="fileChange"
48 + :file-list="fileList"
49 + @clearFiles="clearFile"
50 + >
51 + </el-upload>
52 + </div>
53 + <div class="fileList" v-if="formData.file != null">
54 + <div class="fileList-item">
55 + <div class="uploadbox-fileName">
56 + <svg-icon
57 + class="el-icon-user-solid"
58 + icon-class="exl"
59 + style="font-size: 18px; color: #de002e"
60 + />
61 + <Tooltip
62 + :content="formData.file.name"
63 + :refName="formData.file.name"
64 + />
65 + </div>
66 + <div class="uploadbox-option">
67 + <el-popconfirm
68 + :title="$t('entry.upload.delTip')"
69 + @confirm="delTypeDFile"
70 + >
71 + <el-button slot="reference" type="text">{{
72 + $t("entry.upload.del")
73 + }}</el-button>
74 + </el-popconfirm>
75 + </div>
76 + </div>
77 + </div>
78 + </div>
79 + </div>
80 + <div class="dialogOption entrySave">
81 + <el-button
82 + class="entrySaveButton"
83 + :disabled="loadings.uploadLoading"
84 + @click="close"
85 + >关闭</el-button
86 + >
87 + </div>
88 + </el-dialog>
89 +</template>
90 +
91 +<script>
92 +import { uploadDeclareData } from "@/api/declareData-api.js";
93 +export default {
94 + props: {
95 + outerVisible: {
96 + type: Boolean,
97 + default: false,
98 + },
99 + },
100 + data() {
101 + return {
102 + formData: {
103 + file: null,
104 + },
105 + searchForm: {},
106 + loadings: {
107 + dialogLoading: false,
108 + uploadLoading: false,
109 + sreachLoading: false,
110 + },
111 + uploadType: false,
112 + fileList: [],
113 + loadingText: "数据导入中,请稍后!",
114 + };
115 + },
116 + watch: {
117 + outerVisible(val) {
118 + if (val) {
119 + this.uploadType = false;
120 + }
121 + },
122 + },
123 + methods: {
124 + dwonloadModelFile() {
125 + this.$emit("dwonloadModelFile");
126 + },
127 + //文件上传
128 + uploadFile() {
129 + this.$refs.uploadFile.$refs["upload-inner"].handleClick();
130 + },
131 + //文件校验
132 + beforeUpload(val) {
133 + if (
134 + val.type !=
135 + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
136 + ) {
137 + this.alertWarningMsg("请上传Excel文件!");
138 + return false;
139 + } else {
140 + return true;
141 + }
142 + },
143 + fileUpload(val) {
144 + const reader = new FileReader();
145 + reader.readAsDataURL(val.file);
146 + reader.onload = (e) => {
147 + this.loadings.dialogLoading = true;
148 + let obj = {
149 + multipartFile: this.base64ConvertFile(e.target.result, val.file.name),
150 + };
151 +
152 + uploadDeclareData(obj)
153 + .then((res) => {
154 + if (res.code === "200") {
155 + this.msgSuccess("上传成功!");
156 + this.handleRemove();
157 + this.close();
158 + this.uploadType = true;
159 + } else {
160 + this.alertWarningMsg(res.message);
161 + this.loadings.dialogLoading = false;
162 + }
163 + })
164 + .catch((err) => {
165 + console.log(err);
166 + this.loadings.dialogLoading = false;
167 + });
168 + };
169 + },
170 + fileChange(val) {},
171 + handleSuccess() {},
172 + handleRemove() {
173 + this.fileList = [];
174 + },
175 + clearFile() {},
176 + close() {
177 + this.handleRemove();
178 + this.$emit("close", this.uploadType);
179 + },
180 + },
181 +};
182 +</script>
183 +
184 +<style lang="scss" scoped>
185 +@import "@/assets/styles/variables.scss";
186 +.modelItem {
187 + width: 100%;
188 + .modelItem-title {
189 + display: flex;
190 + justify-content: space-between;
191 + margin-bottom: 5px;
192 + font-size: 14px;
193 + font-weight: 600;
194 + color: #333;
195 + }
196 +}
197 +
198 +.uploadItem {
199 + margin-bottom: 5px;
200 +
201 + .uploadbox {
202 + width: 100%;
203 + height: 40px;
204 + line-height: 20px;
205 + background-color: $formItemBackgroundColor;
206 + padding: 4px 8px;
207 + margin-top: 5px;
208 + display: flex;
209 + justify-content: space-between;
210 +
211 + .el-button {
212 + font-weight: 400 !important;
213 + }
214 + }
215 +}
216 +
217 +.fileList {
218 + width: 100%;
219 +
220 + .fileList-item {
221 + display: flex;
222 + justify-content: space-between;
223 + padding: 5px 15px 5px 5px;
224 + background-color: $formItemBackgroundColor;
225 + font-size: 14px;
226 +
227 + .uploadbox-fileName {
228 + display: flex;
229 + align-items: center;
230 + }
231 +
232 + .uploadbox-option {
233 + .fileSize {
234 + display: inline-block;
235 + color: #8e8e8e;
236 + font-size: 12px;
237 + }
238 + }
239 +
240 + .svg-icon {
241 + display: inline-block;
242 + color: $fedexError;
243 + }
244 +
245 + .text-tooltip {
246 + max-width: 500px;
247 + display: inline-block;
248 + margin-left: 10px;
249 + }
250 +
251 + .fileList-item-empty {
252 + display: inline-block;
253 + margin: 5px;
254 + height: max-content;
255 + color: #8e8e8e;
256 + }
257 + }
258 +}
259 +
260 +.fedexformSreachBottomBorder {
261 + border-top: 1px solid $fedexBorder;
262 + border-left: 1px solid $fedexBorder;
263 + border-right: 1px solid $fedexBorder;
264 +}
265 +
266 +.textCenter {
267 + .el-button {
268 + font-size: 20px;
269 + }
270 +}
271 +</style>
This diff is collapsed. Click to expand it.