zhanbo.xu

feat: 根据需求优化

...@@ -35,9 +35,9 @@ export function getHsCodeList(data) { ...@@ -35,9 +35,9 @@ export function getHsCodeList(data) {
35 // GET 35 // GET
36 // ​/hsCodeMgr​/hsCodeIncr 36 // ​/hsCodeMgr​/hsCodeIncr
37 // 增量数据同步 37 // 增量数据同步
38 -export function getHsCodeIncr() { 38 +export function getHsCodeIncr({ beginDate }) {
39 return request({ 39 return request({
40 - url: "/bus-customer/hsCodeMgr/hsCodeIncr", 40 + url: `/bus-customer/hsCodeMgr/hsCodeIncr/${beginDate}`,
41 method: "get", 41 method: "get",
42 }); 42 });
43 } 43 }
......
...@@ -283,3 +283,12 @@ export function modifyWeight(data) { ...@@ -283,3 +283,12 @@ export function modifyWeight(data) {
283 data: data, 283 data: data,
284 }); 284 });
285 } 285 }
286 +
287 +// GET /declareData/getTotalDocumentsLevelLog​/{billNo}
288 +export function getTotalDocumentsLevelLog(data) {
289 + return request({
290 + url: "/bus-customer/declareData/getTotalDocumentsLevelLog/" + data.billNo,
291 + method: "get",
292 + data: data,
293 + });
294 +}
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
37 @header-dragend="headerDragend" 37 @header-dragend="headerDragend"
38 @cell-mouse-leave="cellMouseLeave" 38 @cell-mouse-leave="cellMouseLeave"
39 @cell-mouse-enter="cellMouseEnter" 39 @cell-mouse-enter="cellMouseEnter"
40 + @filter-change="filterChange"
40 > 41 >
41 <!-- 多选框 --> 42 <!-- 多选框 -->
42 <el-table-column 43 <el-table-column
...@@ -78,6 +79,9 @@ ...@@ -78,6 +79,9 @@
78 :header-align="item.align" 79 :header-align="item.align"
79 :sort-orders="['descending', 'ascending', null]" 80 :sort-orders="['descending', 'ascending', null]"
80 :key="index" 81 :key="index"
82 + :filters="item.filters"
83 + :filter-method="item.filterMethod"
84 + :column-key="item.columnKey || index.toString()"
81 > 85 >
82 <template slot="header" slot-scope="scope"> 86 <template slot="header" slot-scope="scope">
83 <Tooltip 87 <Tooltip
...@@ -101,7 +105,7 @@ ...@@ -101,7 +105,7 @@
101 :align="item.align ? item.align : 'center'" 105 :align="item.align ? item.align : 'center'"
102 :fixed="item.fixed ? item.fixed : false" 106 :fixed="item.fixed ? item.fixed : false"
103 :sortable="item.sorTable ? true : false" 107 :sortable="item.sorTable ? true : false"
104 - :column-key="index.toString()" 108 + :column-key="item.columnKey || index.toString()"
105 :show-overflow-tooltip=" 109 :show-overflow-tooltip="
106 item.showOverflowTooltip != undefined 110 item.showOverflowTooltip != undefined
107 ? item.showOverflowTooltip 111 ? item.showOverflowTooltip
...@@ -110,6 +114,8 @@ ...@@ -110,6 +114,8 @@
110 :header-align="item.align" 114 :header-align="item.align"
111 :sort-orders="['descending', 'ascending', null]" 115 :sort-orders="['descending', 'ascending', null]"
112 :formatter="formatter" 116 :formatter="formatter"
117 + :filters="item.filters"
118 + :filter-method="item.filterMethod"
113 :key="index" 119 :key="index"
114 > 120 >
115 <template slot="header" slot-scope="scope"> 121 <template slot="header" slot-scope="scope">
...@@ -133,7 +139,7 @@ ...@@ -133,7 +139,7 @@
133 :align="item.align ? item.align : 'center'" 139 :align="item.align ? item.align : 'center'"
134 :fixed="item.fixed ? item.fixed : false" 140 :fixed="item.fixed ? item.fixed : false"
135 :sortable="item.sorTable ? true : false" 141 :sortable="item.sorTable ? true : false"
136 - :column-key="index.toString()" 142 + :column-key="item.columnKey || index.toString()"
137 :show-overflow-tooltip=" 143 :show-overflow-tooltip="
138 item.showOverflowTooltip != undefined 144 item.showOverflowTooltip != undefined
139 ? item.showOverflowTooltip 145 ? item.showOverflowTooltip
...@@ -142,6 +148,8 @@ ...@@ -142,6 +148,8 @@
142 :header-align="item.align" 148 :header-align="item.align"
143 :sort-orders="['descending', 'ascending', null]" 149 :sort-orders="['descending', 'ascending', null]"
144 :formatter="formatter" 150 :formatter="formatter"
151 + :filters="item.filters"
152 + :filter-method="item.filterMethod"
145 :key="index" 153 :key="index"
146 > 154 >
147 <template slot="header" slot-scope="scope"> 155 <template slot="header" slot-scope="scope">
...@@ -541,6 +549,11 @@ export default { ...@@ -541,6 +549,11 @@ export default {
541 this.selectTable = []; 549 this.selectTable = [];
542 this.$emit("sortChange", { prop: prop, order: order }); 550 this.$emit("sortChange", { prop: prop, order: order });
543 }, 551 },
552 + //
553 + filterChange(filters) {
554 + console.log(filters);
555 + this.$emit("filterChange", filters);
556 + },
544 //双击行 557 //双击行
545 dblclick(val) { 558 dblclick(val) {
546 this.$emit("dblclick", val); 559 this.$emit("dblclick", val);
......
1 -import { parseTime } from './iClearExp' 1 +import { parseTime } from "./iClearExp";
2 -import { Message, MessageBox } from 'element-ui' 2 +import { MessageBox } from "element-ui";
3 -import i18n from '@/assets/languages' 3 +import i18n from "@/assets/languages";
4 4
5 /** 5 /**
6 * 表格时间格式化 6 * 表格时间格式化
7 */ 7 */
8 export function formatDate(cellValue) { 8 export function formatDate(cellValue) {
9 if (cellValue == null || cellValue == "") return ""; 9 if (cellValue == null || cellValue == "") return "";
10 - var date = new Date(cellValue) 10 + var date = new Date(cellValue);
11 - var year = date.getFullYear() 11 + var year = date.getFullYear();
12 - var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 12 + var month =
13 - var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() 13 + date.getMonth() + 1 < 10
14 - var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() 14 + ? "0" + (date.getMonth() + 1)
15 - var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() 15 + : date.getMonth() + 1;
16 - var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() 16 + var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
17 - return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds 17 + var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
18 + var minutes =
19 + date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
20 + var seconds =
21 + date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
22 + return (
23 + year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds
24 + );
25 +}
26 +export function formatDateNew(cellValue) {
27 + if (cellValue == null || cellValue == "") return "";
28 + var date = new Date(cellValue);
29 + var year = date.getFullYear();
30 + var month =
31 + date.getMonth() + 1 < 10
32 + ? "0" + (date.getMonth() + 1)
33 + : date.getMonth() + 1;
34 + var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
35 + var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
36 + var minutes =
37 + date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
38 + var seconds =
39 + date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
40 + return `${year}${month}${day}${hours}${minutes}${seconds}`;
41 +}
42 +// 获取昨天 年月日 时分秒
43 +export function getYesterday() {
44 + return parseTime(new Date().getTime() - 24 * 60 * 60 * 1000);
18 } 45 }
19 46
20 /** 47 /**
...@@ -23,40 +50,40 @@ export function formatDate(cellValue) { ...@@ -23,40 +50,40 @@ export function formatDate(cellValue) {
23 * @returns {string} 50 * @returns {string}
24 */ 51 */
25 export function formatTime(time, option) { 52 export function formatTime(time, option) {
26 - if (('' + time).length === 10) { 53 + if (("" + time).length === 10) {
27 - time = parseInt(time) * 1000 54 + time = parseInt(time) * 1000;
28 } else { 55 } else {
29 - time = +time 56 + time = +time;
30 } 57 }
31 - const d = new Date(time) 58 + const d = new Date(time);
32 - const now = Date.now() 59 + const now = Date.now();
33 60
34 - const diff = (now - d) / 1000 61 + const diff = (now - d) / 1000;
35 62
36 if (diff < 30) { 63 if (diff < 30) {
37 - return '刚刚' 64 + return "刚刚";
38 } else if (diff < 3600) { 65 } else if (diff < 3600) {
39 // less 1 hour 66 // less 1 hour
40 - return Math.ceil(diff / 60) + '分钟前' 67 + return Math.ceil(diff / 60) + "分钟前";
41 } else if (diff < 3600 * 24) { 68 } else if (diff < 3600 * 24) {
42 - return Math.ceil(diff / 3600) + '小时前' 69 + return Math.ceil(diff / 3600) + "小时前";
43 } else if (diff < 3600 * 24 * 2) { 70 } else if (diff < 3600 * 24 * 2) {
44 - return '1天前' 71 + return "1天前";
45 } 72 }
46 if (option) { 73 if (option) {
47 - return parseTime(time, option) 74 + return parseTime(time, option);
48 } else { 75 } else {
49 return ( 76 return (
50 d.getMonth() + 77 d.getMonth() +
51 1 + 78 1 +
52 - '月' + 79 + "月" +
53 d.getDate() + 80 d.getDate() +
54 - '日' + 81 + "日" +
55 d.getHours() + 82 d.getHours() +
56 - '时' + 83 + "时" +
57 d.getMinutes() + 84 d.getMinutes() +
58 - '分' 85 + "分"
59 - ) 86 + );
60 } 87 }
61 } 88 }
62 89
...@@ -65,18 +92,18 @@ export function formatTime(time, option) { ...@@ -65,18 +92,18 @@ export function formatTime(time, option) {
65 * @returns {Object} 92 * @returns {Object}
66 */ 93 */
67 export function getQueryObject(url) { 94 export function getQueryObject(url) {
68 - url = url == null ? window.location.href : url 95 + url = url == null ? window.location.href : url;
69 - const search = url.substring(url.lastIndexOf('?') + 1) 96 + const search = url.substring(url.lastIndexOf("?") + 1);
70 - const obj = {} 97 + const obj = {};
71 - const reg = /([^?&=]+)=([^?&=]*)/g 98 + const reg = /([^?&=]+)=([^?&=]*)/g;
72 search.replace(reg, (rs, $1, $2) => { 99 search.replace(reg, (rs, $1, $2) => {
73 - const name = decodeURIComponent($1) 100 + const name = decodeURIComponent($1);
74 - let val = decodeURIComponent($2) 101 + let val = decodeURIComponent($2);
75 - val = String(val) 102 + val = String(val);
76 - obj[name] = val 103 + obj[name] = val;
77 - return rs 104 + return rs;
78 - }) 105 + });
79 - return obj 106 + return obj;
80 } 107 }
81 108
82 /** 109 /**
...@@ -85,14 +112,14 @@ export function getQueryObject(url) { ...@@ -85,14 +112,14 @@ export function getQueryObject(url) {
85 */ 112 */
86 export function byteLength(str) { 113 export function byteLength(str) {
87 // returns the byte length of an utf8 string 114 // returns the byte length of an utf8 string
88 - let s = str.length 115 + let s = str.length;
89 for (var i = str.length - 1; i >= 0; i--) { 116 for (var i = str.length - 1; i >= 0; i--) {
90 - const code = str.charCodeAt(i) 117 + const code = str.charCodeAt(i);
91 - if (code > 0x7f && code <= 0x7ff) s++ 118 + if (code > 0x7f && code <= 0x7ff) s++;
92 - else if (code > 0x7ff && code <= 0xffff) s += 2 119 + else if (code > 0x7ff && code <= 0xffff) s += 2;
93 - if (code >= 0xDC00 && code <= 0xDFFF) i-- 120 + if (code >= 0xdc00 && code <= 0xdfff) i--;
94 } 121 }
95 - return s 122 + return s;
96 } 123 }
97 124
98 /** 125 /**
...@@ -100,13 +127,13 @@ export function byteLength(str) { ...@@ -100,13 +127,13 @@ export function byteLength(str) {
100 * @returns {Array} 127 * @returns {Array}
101 */ 128 */
102 export function cleanArray(actual) { 129 export function cleanArray(actual) {
103 - const newArray = [] 130 + const newArray = [];
104 for (let i = 0; i < actual.length; i++) { 131 for (let i = 0; i < actual.length; i++) {
105 if (actual[i]) { 132 if (actual[i]) {
106 - newArray.push(actual[i]) 133 + newArray.push(actual[i]);
107 } 134 }
108 } 135 }
109 - return newArray 136 + return newArray;
110 } 137 }
111 138
112 /** 139 /**
...@@ -114,13 +141,13 @@ export function cleanArray(actual) { ...@@ -114,13 +141,13 @@ export function cleanArray(actual) {
114 * @returns {Array} 141 * @returns {Array}
115 */ 142 */
116 export function param(json) { 143 export function param(json) {
117 - if (!json) return '' 144 + if (!json) return "";
118 return cleanArray( 145 return cleanArray(
119 - Object.keys(json).map(key => { 146 + Object.keys(json).map((key) => {
120 - if (json[key] === undefined) return '' 147 + if (json[key] === undefined) return "";
121 - return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) 148 + return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]);
122 }) 149 })
123 - ).join('&') 150 + ).join("&");
124 } 151 }
125 152
126 /** 153 /**
...@@ -128,21 +155,21 @@ export function param(json) { ...@@ -128,21 +155,21 @@ export function param(json) {
128 * @returns {Object} 155 * @returns {Object}
129 */ 156 */
130 export function param2Obj(url) { 157 export function param2Obj(url) {
131 - const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') 158 + const search = decodeURIComponent(url.split("?")[1]).replace(/\+/g, " ");
132 if (!search) { 159 if (!search) {
133 - return {} 160 + return {};
134 } 161 }
135 - const obj = {} 162 + const obj = {};
136 - const searchArr = search.split('&') 163 + const searchArr = search.split("&");
137 - searchArr.forEach(v => { 164 + searchArr.forEach((v) => {
138 - const index = v.indexOf('=') 165 + const index = v.indexOf("=");
139 if (index !== -1) { 166 if (index !== -1) {
140 - const name = v.substring(0, index) 167 + const name = v.substring(0, index);
141 - const val = v.substring(index + 1, v.length) 168 + const val = v.substring(index + 1, v.length);
142 - obj[name] = val 169 + obj[name] = val;
143 } 170 }
144 - }) 171 + });
145 - return obj 172 + return obj;
146 } 173 }
147 174
148 /** 175 /**
...@@ -150,9 +177,9 @@ export function param2Obj(url) { ...@@ -150,9 +177,9 @@ export function param2Obj(url) {
150 * @returns {string} 177 * @returns {string}
151 */ 178 */
152 export function html2Text(val) { 179 export function html2Text(val) {
153 - const div = document.createElement('div') 180 + const div = document.createElement("div");
154 - div.innerHTML = val 181 + div.innerHTML = val;
155 - return div.textContent || div.innerText 182 + return div.textContent || div.innerText;
156 } 183 }
157 184
158 /** 185 /**
...@@ -162,21 +189,21 @@ export function html2Text(val) { ...@@ -162,21 +189,21 @@ export function html2Text(val) {
162 * @returns {Object} 189 * @returns {Object}
163 */ 190 */
164 export function objectMerge(target, source) { 191 export function objectMerge(target, source) {
165 - if (typeof target !== 'object') { 192 + if (typeof target !== "object") {
166 - target = {} 193 + target = {};
167 } 194 }
168 if (Array.isArray(source)) { 195 if (Array.isArray(source)) {
169 - return source.slice() 196 + return source.slice();
170 } 197 }
171 - Object.keys(source).forEach(property => { 198 + Object.keys(source).forEach((property) => {
172 - const sourceProperty = source[property] 199 + const sourceProperty = source[property];
173 - if (typeof sourceProperty === 'object') { 200 + if (typeof sourceProperty === "object") {
174 - target[property] = objectMerge(target[property], sourceProperty) 201 + target[property] = objectMerge(target[property], sourceProperty);
175 } else { 202 } else {
176 - target[property] = sourceProperty 203 + target[property] = sourceProperty;
177 } 204 }
178 - }) 205 + });
179 - return target 206 + return target;
180 } 207 }
181 208
182 /** 209 /**
...@@ -185,18 +212,18 @@ export function objectMerge(target, source) { ...@@ -185,18 +212,18 @@ export function objectMerge(target, source) {
185 */ 212 */
186 export function toggleClass(element, className) { 213 export function toggleClass(element, className) {
187 if (!element || !className) { 214 if (!element || !className) {
188 - return 215 + return;
189 } 216 }
190 - let classString = element.className 217 + let classString = element.className;
191 - const nameIndex = classString.indexOf(className) 218 + const nameIndex = classString.indexOf(className);
192 if (nameIndex === -1) { 219 if (nameIndex === -1) {
193 - classString += '' + className 220 + classString += "" + className;
194 } else { 221 } else {
195 classString = 222 classString =
196 classString.substr(0, nameIndex) + 223 classString.substr(0, nameIndex) +
197 - classString.substr(nameIndex + className.length) 224 + classString.substr(nameIndex + className.length);
198 } 225 }
199 - element.className = classString 226 + element.className = classString;
200 } 227 }
201 228
202 /** 229 /**
...@@ -204,10 +231,10 @@ export function toggleClass(element, className) { ...@@ -204,10 +231,10 @@ export function toggleClass(element, className) {
204 * @returns {Date} 231 * @returns {Date}
205 */ 232 */
206 export function getTime(type) { 233 export function getTime(type) {
207 - if (type === 'start') { 234 + if (type === "start") {
208 - return new Date().getTime() - 3600 * 1000 * 24 * 90 235 + return new Date().getTime() - 3600 * 1000 * 24 * 90;
209 } else { 236 } else {
210 - return new Date(new Date().toDateString()) 237 + return new Date(new Date().toDateString());
211 } 238 }
212 } 239 }
213 240
...@@ -218,38 +245,38 @@ export function getTime(type) { ...@@ -218,38 +245,38 @@ export function getTime(type) {
218 * @return {*} 245 * @return {*}
219 */ 246 */
220 export function debounce(func, wait, immediate) { 247 export function debounce(func, wait, immediate) {
221 - let timeout, args, context, timestamp, result 248 + let timeout, args, context, timestamp, result;
222 249
223 const later = function () { 250 const later = function () {
224 // 据上一次触发时间间隔 251 // 据上一次触发时间间隔
225 - const last = +new Date() - timestamp 252 + const last = +new Date() - timestamp;
226 253
227 // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait 254 // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
228 if (last < wait && last > 0) { 255 if (last < wait && last > 0) {
229 - timeout = setTimeout(later, wait - last) 256 + timeout = setTimeout(later, wait - last);
230 } else { 257 } else {
231 - timeout = null 258 + timeout = null;
232 // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 259 // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
233 if (!immediate) { 260 if (!immediate) {
234 - result = func.apply(context, args) 261 + result = func.apply(context, args);
235 - if (!timeout) context = args = null 262 + if (!timeout) context = args = null;
236 - }
237 } 263 }
238 } 264 }
265 + };
239 266
240 return function (...args) { 267 return function (...args) {
241 - context = this 268 + context = this;
242 - timestamp = +new Date() 269 + timestamp = +new Date();
243 - const callNow = immediate && !timeout 270 + const callNow = immediate && !timeout;
244 // 如果延时不存在,重新设定延时 271 // 如果延时不存在,重新设定延时
245 - if (!timeout) timeout = setTimeout(later, wait) 272 + if (!timeout) timeout = setTimeout(later, wait);
246 if (callNow) { 273 if (callNow) {
247 - result = func.apply(context, args) 274 + result = func.apply(context, args);
248 - context = args = null 275 + context = args = null;
249 } 276 }
250 277
251 - return result 278 + return result;
252 - } 279 + };
253 } 280 }
254 281
255 /** 282 /**
...@@ -260,18 +287,18 @@ export function debounce(func, wait, immediate) { ...@@ -260,18 +287,18 @@ export function debounce(func, wait, immediate) {
260 * @returns {Object} 287 * @returns {Object}
261 */ 288 */
262 export function deepClone(source) { 289 export function deepClone(source) {
263 - if (!source && typeof source !== 'object') { 290 + if (!source && typeof source !== "object") {
264 - throw new Error('error arguments', 'deepClone') 291 + throw new Error("error arguments", "deepClone");
265 } 292 }
266 - const targetObj = source.constructor === Array ? [] : {} 293 + const targetObj = source.constructor === Array ? [] : {};
267 - Object.keys(source).forEach(keys => { 294 + Object.keys(source).forEach((keys) => {
268 - if (source[keys] && typeof source[keys] === 'object') { 295 + if (source[keys] && typeof source[keys] === "object") {
269 - targetObj[keys] = deepClone(source[keys]) 296 + targetObj[keys] = deepClone(source[keys]);
270 } else { 297 } else {
271 - targetObj[keys] = source[keys] 298 + targetObj[keys] = source[keys];
272 } 299 }
273 - }) 300 + });
274 - return targetObj 301 + return targetObj;
275 } 302 }
276 303
277 /** 304 /**
...@@ -279,16 +306,16 @@ export function deepClone(source) { ...@@ -279,16 +306,16 @@ export function deepClone(source) {
279 * @returns {Array} 306 * @returns {Array}
280 */ 307 */
281 export function uniqueArr(arr) { 308 export function uniqueArr(arr) {
282 - return Array.from(new Set(arr)) 309 + return Array.from(new Set(arr));
283 } 310 }
284 311
285 /** 312 /**
286 * @returns {string} 313 * @returns {string}
287 */ 314 */
288 export function createUniqueString() { 315 export function createUniqueString() {
289 - const timestamp = +new Date() + '' 316 + const timestamp = +new Date() + "";
290 - const randomNum = parseInt((1 + Math.random()) * 65536) + '' 317 + const randomNum = parseInt((1 + Math.random()) * 65536) + "";
291 - return (+(randomNum + timestamp)).toString(32) 318 + return (+(randomNum + timestamp)).toString(32);
292 } 319 }
293 320
294 /** 321 /**
...@@ -298,7 +325,7 @@ export function createUniqueString() { ...@@ -298,7 +325,7 @@ export function createUniqueString() {
298 * @returns {boolean} 325 * @returns {boolean}
299 */ 326 */
300 export function hasClass(ele, cls) { 327 export function hasClass(ele, cls) {
301 - return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) 328 + return !!ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)"));
302 } 329 }
303 330
304 /** 331 /**
...@@ -307,7 +334,7 @@ export function hasClass(ele, cls) { ...@@ -307,7 +334,7 @@ export function hasClass(ele, cls) {
307 * @param {string} cls 334 * @param {string} cls
308 */ 335 */
309 export function addClass(ele, cls) { 336 export function addClass(ele, cls) {
310 - if (!hasClass(ele, cls)) ele.className += ' ' + cls 337 + if (!hasClass(ele, cls)) ele.className += " " + cls;
311 } 338 }
312 339
313 /** 340 /**
...@@ -317,181 +344,208 @@ export function addClass(ele, cls) { ...@@ -317,181 +344,208 @@ export function addClass(ele, cls) {
317 */ 344 */
318 export function removeClass(ele, cls) { 345 export function removeClass(ele, cls) {
319 if (hasClass(ele, cls)) { 346 if (hasClass(ele, cls)) {
320 - const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') 347 + const reg = new RegExp("(\\s|^)" + cls + "(\\s|$)");
321 - ele.className = ele.className.replace(reg, ' ') 348 + ele.className = ele.className.replace(reg, " ");
322 } 349 }
323 } 350 }
324 351
325 export function makeMap(str, expectsLowerCase) { 352 export function makeMap(str, expectsLowerCase) {
326 - const map = Object.create(null) 353 + const map = Object.create(null);
327 - const list = str.split(',') 354 + const list = str.split(",");
328 for (let i = 0; i < list.length; i++) { 355 for (let i = 0; i < list.length; i++) {
329 - map[list[i]] = true 356 + map[list[i]] = true;
330 } 357 }
331 - return expectsLowerCase 358 + return expectsLowerCase ? (val) => map[val.toLowerCase()] : (val) => map[val];
332 - ? val => map[val.toLowerCase()]
333 - : val => map[val]
334 } 359 }
335 360
336 -export const exportDefault = 'export default ' 361 +export const exportDefault = "export default ";
337 362
338 export const beautifierConf = { 363 export const beautifierConf = {
339 html: { 364 html: {
340 - indent_size: '2', 365 + indent_size: "2",
341 - indent_char: ' ', 366 + indent_char: " ",
342 - max_preserve_newlines: '-1', 367 + max_preserve_newlines: "-1",
343 preserve_newlines: false, 368 preserve_newlines: false,
344 keep_array_indentation: false, 369 keep_array_indentation: false,
345 break_chained_methods: false, 370 break_chained_methods: false,
346 - indent_scripts: 'separate', 371 + indent_scripts: "separate",
347 - brace_style: 'end-expand', 372 + brace_style: "end-expand",
348 space_before_conditional: true, 373 space_before_conditional: true,
349 unescape_strings: false, 374 unescape_strings: false,
350 jslint_happy: false, 375 jslint_happy: false,
351 end_with_newline: true, 376 end_with_newline: true,
352 - wrap_line_length: '110', 377 + wrap_line_length: "110",
353 indent_inner_html: true, 378 indent_inner_html: true,
354 comma_first: false, 379 comma_first: false,
355 e4x: true, 380 e4x: true,
356 - indent_empty_lines: true 381 + indent_empty_lines: true,
357 }, 382 },
358 js: { 383 js: {
359 - indent_size: '2', 384 + indent_size: "2",
360 - indent_char: ' ', 385 + indent_char: " ",
361 - max_preserve_newlines: '-1', 386 + max_preserve_newlines: "-1",
362 preserve_newlines: false, 387 preserve_newlines: false,
363 keep_array_indentation: false, 388 keep_array_indentation: false,
364 break_chained_methods: false, 389 break_chained_methods: false,
365 - indent_scripts: 'normal', 390 + indent_scripts: "normal",
366 - brace_style: 'end-expand', 391 + brace_style: "end-expand",
367 space_before_conditional: true, 392 space_before_conditional: true,
368 unescape_strings: false, 393 unescape_strings: false,
369 jslint_happy: true, 394 jslint_happy: true,
370 end_with_newline: true, 395 end_with_newline: true,
371 - wrap_line_length: '110', 396 + wrap_line_length: "110",
372 indent_inner_html: true, 397 indent_inner_html: true,
373 comma_first: false, 398 comma_first: false,
374 e4x: true, 399 e4x: true,
375 - indent_empty_lines: true 400 + indent_empty_lines: true,
376 - } 401 + },
377 -} 402 +};
378 403
379 // 首字母大小 404 // 首字母大小
380 -export function titleCase(str, type = 'up') { 405 +export function titleCase(str, type = "up") {
381 - if (type == 'up') { 406 + if (type == "up") {
382 - return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) 407 + return str.replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
383 - } else if (type == 'low') { 408 + } else if (type == "low") {
384 - return str.replace(/( |^)[A-Z]/g, L => L.toLowerCase()) 409 + return str.replace(/( |^)[A-Z]/g, (L) => L.toLowerCase());
385 } 410 }
386 } 411 }
387 412
388 // 下划转驼峰 413 // 下划转驼峰
389 export function camelCase(str) { 414 export function camelCase(str) {
390 - return str.replace(/-[a-z]/g, str1 => str1.substr(-1).toUpperCase()) 415 + return str.replace(/-[a-z]/g, (str1) => str1.substr(-1).toUpperCase());
391 } 416 }
392 417
393 export function isNumberStr(str) { 418 export function isNumberStr(str) {
394 - return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) 419 + return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str);
395 } 420 }
396 421
397 export function toHead(domName) { 422 export function toHead(domName) {
398 this.$nextTick(() => { 423 this.$nextTick(() => {
399 - document.getElementsByClassName(domName)[0] ? document.getElementsByClassName(domName)[0].scrollTop = 0 : '' 424 + document.getElementsByClassName(domName)[0]
400 - }) 425 + ? (document.getElementsByClassName(domName)[0].scrollTop = 0)
426 + : "";
427 + });
401 } 428 }
402 429
403 export function createRandom(length) { 430 export function createRandom(length) {
404 - let randomNumber = Math.floor(Math.random() * 10 ** length).toString().padStart(length, '0'); 431 + let randomNumber = Math.floor(Math.random() * 10 ** length)
432 + .toString()
433 + .padStart(length, "0");
405 return randomNumber; 434 return randomNumber;
406 } 435 }
407 436
408 -export function alertWarningMsg(msg, title = i18n.t('system.tip'), showCancelButton = false, center = false, buttonName = { confirm: '确定', cancel: '取消' }) { 437 +export function alertWarningMsg(
438 + msg,
439 + title = i18n.t("system.tip"),
440 + showCancelButton = false,
441 + center = false,
442 + buttonName = { confirm: "确定", cancel: "取消" }
443 +) {
409 return new Promise((resolve, reject) => { 444 return new Promise((resolve, reject) => {
410 - MessageBox.alert(msg, title, 445 + MessageBox.alert(msg, title, {
411 - {
412 dangerouslyUseHTMLString: true, 446 dangerouslyUseHTMLString: true,
413 showCancelButton: showCancelButton, 447 showCancelButton: showCancelButton,
414 - type: 'warning', 448 + type: "warning",
415 cancelButtonText: buttonName.cancel, 449 cancelButtonText: buttonName.cancel,
416 confirmButtonText: buttonName.confirm, 450 confirmButtonText: buttonName.confirm,
417 - center: center 451 + center: center,
418 - }
419 - ).then(() => {
420 - resolve()
421 - }).catch(() => {
422 - reject()
423 }) 452 })
453 + .then(() => {
454 + resolve();
424 }) 455 })
456 + .catch(() => {
457 + reject();
458 + });
459 + });
425 } 460 }
426 461
427 -export function alertSuccessMsg(msg, title = i18n.t('system.tip'), showCancelButton = false, center = false, buttonName = { confirm: '确定', cancel: '取消' }) { 462 +export function alertSuccessMsg(
463 + msg,
464 + title = i18n.t("system.tip"),
465 + showCancelButton = false,
466 + center = false,
467 + buttonName = { confirm: "确定", cancel: "取消" }
468 +) {
428 return new Promise((resolve, reject) => { 469 return new Promise((resolve, reject) => {
429 - MessageBox.alert(msg, title, 470 + MessageBox.alert(msg, title, {
430 - {
431 dangerouslyUseHTMLString: true, 471 dangerouslyUseHTMLString: true,
432 showCancelButton: showCancelButton, 472 showCancelButton: showCancelButton,
433 - type: 'success', 473 + type: "success",
434 cancelButtonText: buttonName.cancel, 474 cancelButtonText: buttonName.cancel,
435 confirmButtonText: buttonName.confirm, 475 confirmButtonText: buttonName.confirm,
436 - center: center 476 + center: center,
437 - }
438 - ).then(() => {
439 - resolve()
440 - }).catch(() => {
441 - reject()
442 }) 477 })
478 + .then(() => {
479 + resolve();
443 }) 480 })
481 + .catch(() => {
482 + reject();
483 + });
484 + });
444 } 485 }
445 486
446 -export function alertErrorMsg(msg, title = i18n.t('system.tip'), showCancelButton = false, center = false, buttonName = { confirm: '确定', cancel: '取消' }) { 487 +export function alertErrorMsg(
488 + msg,
489 + title = i18n.t("system.tip"),
490 + showCancelButton = false,
491 + center = false,
492 + buttonName = { confirm: "确定", cancel: "取消" }
493 +) {
447 return new Promise((resolve, reject) => { 494 return new Promise((resolve, reject) => {
448 - MessageBox.alert(msg, title, 495 + MessageBox.alert(msg, title, {
449 - {
450 dangerouslyUseHTMLString: true, 496 dangerouslyUseHTMLString: true,
451 showCancelButton: showCancelButton, 497 showCancelButton: showCancelButton,
452 - type: 'error', 498 + type: "error",
453 cancelButtonText: buttonName.cancel, 499 cancelButtonText: buttonName.cancel,
454 confirmButtonText: buttonName.confirm, 500 confirmButtonText: buttonName.confirm,
455 - center: center 501 + center: center,
456 - }
457 - ).then(() => {
458 - resolve()
459 - }).catch(() => {
460 - reject()
461 }) 502 })
503 + .then(() => {
504 + resolve();
462 }) 505 })
506 + .catch(() => {
507 + reject();
508 + });
509 + });
463 } 510 }
464 511
465 -export function alertInfoMsg(msg, title = '', showCancelButton = false, center = false, buttonName = { confirm: '确定', cancel: '取消' }) { 512 +export function alertInfoMsg(
513 + msg,
514 + title = "",
515 + showCancelButton = false,
516 + center = false,
517 + buttonName = { confirm: "确定", cancel: "取消" }
518 +) {
466 return new Promise((resolve, reject) => { 519 return new Promise((resolve, reject) => {
467 - MessageBox.alert(msg, title, 520 + MessageBox.alert(msg, title, {
468 - {
469 dangerouslyUseHTMLString: true, 521 dangerouslyUseHTMLString: true,
470 showCancelButton: showCancelButton, 522 showCancelButton: showCancelButton,
471 - type: 'info', 523 + type: "info",
472 cancelButtonText: buttonName.cancel, 524 cancelButtonText: buttonName.cancel,
473 confirmButtonText: buttonName.confirm, 525 confirmButtonText: buttonName.confirm,
474 - center: center 526 + center: center,
475 - }
476 - ).then(() => {
477 - resolve()
478 - }).catch(() => {
479 - reject()
480 }) 527 })
528 + .then(() => {
529 + resolve();
481 }) 530 })
531 + .catch(() => {
532 + reject();
533 + });
534 + });
482 } 535 }
483 536
484 export function compare(prop) { 537 export function compare(prop) {
485 return function (obj1, obj2) { 538 return function (obj1, obj2) {
486 var val1 = obj1[prop]; 539 var val1 = obj1[prop];
487 - var val2 = obj2[prop]; if (val1 < val2) { 540 + var val2 = obj2[prop];
541 + if (val1 < val2) {
488 return -1; 542 return -1;
489 } else if (val1 > val2) { 543 } else if (val1 > val2) {
490 return 1; 544 return 1;
491 } else { 545 } else {
492 return 0; 546 return 0;
493 } 547 }
494 - } 548 + };
495 } 549 }
496 550
497 export function ctho(val) { 551 export function ctho(val) {
...@@ -512,8 +566,8 @@ export function ctho(val) { ...@@ -512,8 +566,8 @@ export function ctho(val) {
512 export function getNavigatorVersion(params) { 566 export function getNavigatorVersion(params) {
513 const ua = navigator.userAgent; 567 const ua = navigator.userAgent;
514 const browser = { 568 const browser = {
515 - name: 'unknown', 569 + name: "unknown",
516 - version: '0' 570 + version: "0",
517 }; 571 };
518 572
519 // 主要浏览器及其版本号的正则表达式 573 // 主要浏览器及其版本号的正则表达式
...@@ -549,7 +603,7 @@ export function getNavigatorVersion(params) { ...@@ -549,7 +603,7 @@ export function getNavigatorVersion(params) {
549 const match = ua.match(data.reg); 603 const match = ua.match(data.reg);
550 if (match) { 604 if (match) {
551 browser.name = data.name; 605 browser.name = data.name;
552 - browser.version = match[1] || '0'; 606 + browser.version = match[1] || "0";
553 } 607 }
554 }); 608 });
555 609
......
...@@ -147,6 +147,24 @@ ...@@ -147,6 +147,24 @@
147 离境单申报 147 离境单申报
148 </el-button> 148 </el-button>
149 </div> 149 </div>
150 + <section style="position: fixed; top: 35%; right: 10%">
151 + <TablePopover
152 + ref="allLogDataStatusPopover"
153 + dataKey="allLogDataStatus"
154 + idKey="declareId"
155 + :parentDom="$refs.entryTable"
156 + :receiptDataHead="logDataHead"
157 + :rowData="selectedLogRow"
158 + :tableData="tableData"
159 + @popoverChange="popoverChange"
160 + @popoverClose="popoverClose"
161 + >
162 + <div slot="title">
163 + <span style="font-weight: 700; color: #515a6e">提运单号:</span>
164 + {{ selectedLogRow.billNo }}
165 + </div>
166 + </TablePopover>
167 + </section>
150 <Table 168 <Table
151 class="fedexDetialTable fedexSreachTable" 169 class="fedexDetialTable fedexSreachTable"
152 ref="entryTable" 170 ref="entryTable"
...@@ -263,6 +281,15 @@ ...@@ -263,6 +281,15 @@
263 </div> 281 </div>
264 </TablePopover> 282 </TablePopover>
265 </template> 283 </template>
284 + <template slot="optionColumn">
285 + <el-table-column label="操作" width="80">
286 + <template slot-scope="scope">
287 + <el-button type="text" @click="showTotalLog(scope.row)">
288 + 日志
289 + </el-button>
290 + </template>
291 + </el-table-column>
292 + </template>
266 </Table> 293 </Table>
267 <DialogVue 294 <DialogVue
268 :outerVisible="outerVisible" 295 :outerVisible="outerVisible"
...@@ -290,6 +317,7 @@ import { ...@@ -290,6 +317,7 @@ import {
290 declareDataUpload, 317 declareDataUpload,
291 getLogisticsReceipt, 318 getLogisticsReceipt,
292 getTotalReceipt, 319 getTotalReceipt,
320 + getTotalDocumentsLevelLog,
293 } from "@/api/declareData-api.js"; 321 } from "@/api/declareData-api.js";
294 import DialogVue from "./dialog.vue"; 322 import DialogVue from "./dialog.vue";
295 import DataPreview from "../reportingData/data-preview.vue"; 323 import DataPreview from "../reportingData/data-preview.vue";
...@@ -308,7 +336,7 @@ export default { ...@@ -308,7 +336,7 @@ export default {
308 portList: [], 336 portList: [],
309 activePortType: false, 337 activePortType: false,
310 // 控制日志弹窗的显示和隐藏 338 // 控制日志弹窗的显示和隐藏
311 - allLogDataReceiptStatusPopoverType: false, 339 + allLogDataStatusPopoverType: false,
312 // 存储选中的日志数据 340 // 存储选中的日志数据
313 selectedLogRow: {}, 341 selectedLogRow: {},
314 selected: [], 342 selected: [],
...@@ -325,6 +353,32 @@ export default { ...@@ -325,6 +353,32 @@ export default {
325 total: 0, 353 total: 0,
326 }, 354 },
327 tableData: [], 355 tableData: [],
356 + logDataHead: [
357 + {
358 + name: "回执类型",
359 + value: "receiptType",
360 + width: "",
361 + align: "left",
362 + },
363 + {
364 + name: "回执状态",
365 + value: "receiptStatus",
366 + width: "",
367 + align: "left",
368 + },
369 + {
370 + name: "状态时间",
371 + value: "statusTime",
372 + width: "",
373 + align: "left",
374 + },
375 + {
376 + name: "回执描述",
377 + value: "receiptDescription",
378 + width: "",
379 + align: "left",
380 + },
381 + ],
328 headerData: [ 382 headerData: [
329 { 383 {
330 name: "提运单号", 384 name: "提运单号",
...@@ -422,6 +476,28 @@ export default { ...@@ -422,6 +476,28 @@ export default {
422 this.searchPortDictData(); 476 this.searchPortDictData();
423 }, 477 },
424 methods: { 478 methods: {
479 + //申报日志
480 + showTotalLog(row) {
481 + this.$store.state.viewOption.loadingDatas = true;
482 + this.selectedLogRow = row;
483 + this.$set(row, "logLoading", true);
484 +
485 + this.receiptApi(row.declareId, "allLogDataStatus").then((logData) => {
486 + this.$set(row, "popoverData", logData);
487 +
488 + if (!this.selectedLogRow.popoverData.length) {
489 + this.$store.state.viewOption.loadingDatas = false;
490 + }
491 +
492 + // 手动触发状态更新
493 + this.$nextTick(() => {
494 + // 强制设置弹窗状态为true
495 + row.allLogDataStatusPopoverType = true;
496 + // 强制更新表格
497 + this.tableData = [...this.tableData];
498 + });
499 + });
500 + },
425 //获取口岸子字典 501 //获取口岸子字典
426 searchPortDictData() { 502 searchPortDictData() {
427 getPortInfo() 503 getPortInfo()
...@@ -530,7 +606,7 @@ export default { ...@@ -530,7 +606,7 @@ export default {
530 item.totalReceiptStatusPopoverType = false; 606 item.totalReceiptStatusPopoverType = false;
531 item.popoverData = []; 607 item.popoverData = [];
532 }); 608 });
533 - this.selectedLogRow.allLogDataReceiptStatusPopoverType = false; 609 + this.selectedLogRow.allLogDataStatusPopoverType = false;
534 this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY = 610 this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
535 "auto"; 611 "auto";
536 }, 612 },
...@@ -594,6 +670,20 @@ export default { ...@@ -594,6 +670,20 @@ export default {
594 console.log(err); 670 console.log(err);
595 reject(); 671 reject();
596 }); 672 });
673 + } else if (type == "allLogDataStatus") {
674 + let objVal = { billNo: billNo };
675 + getTotalDocumentsLevelLog(objVal)
676 + .then((res) => {
677 + if (res.code === "200") {
678 + resolve(res.data);
679 + } else {
680 + reject();
681 + }
682 + })
683 + .catch((err) => {
684 + console.log(err);
685 + reject();
686 + });
597 } 687 }
598 }); 688 });
599 }, 689 },
...@@ -618,6 +708,7 @@ export default { ...@@ -618,6 +708,7 @@ export default {
618 this.$refs.arrivalInReceiptStatusPopover.tableLoading = false; //运抵单回执 708 this.$refs.arrivalInReceiptStatusPopover.tableLoading = false; //运抵单回执
619 this.$refs.logisticsDepartureReceiptStatusPopover.tableLoading = false; // 离境单回执 709 this.$refs.logisticsDepartureReceiptStatusPopover.tableLoading = false; // 离境单回执
620 this.$refs.totalReceiptStatusPopover.tableLoading = false; 710 this.$refs.totalReceiptStatusPopover.tableLoading = false;
711 + this.$refs.allLogDataStatusPopoverType = false;
621 }); 712 });
622 }); 713 });
623 }, 714 },
...@@ -697,7 +788,7 @@ export default { ...@@ -697,7 +788,7 @@ export default {
697 // item.logLoading = false; 788 // item.logLoading = false;
698 item.popoverData = []; 789 item.popoverData = [];
699 }); 790 });
700 - this.selectedLogRow.allLogDataReceiptStatusPopoverType = false; 791 + this.selectedLogRow.allLogDataStatusPopoverType = false;
701 } else { 792 } else {
702 this.alertWarningMsg(res.message); 793 this.alertWarningMsg(res.message);
703 } 794 }
...@@ -752,8 +843,9 @@ export default { ...@@ -752,8 +843,9 @@ export default {
752 843
753 .optionButton { 844 .optionButton {
754 padding: 10px; 845 padding: 10px;
755 - text-align: left; 846 + text-align: right;
756 - 847 + display: flex;
848 + justify-content: flex-end;
757 .el-button.dropdown-style-button { 849 .el-button.dropdown-style-button {
758 background-color: #ffffff !important; 850 background-color: #ffffff !important;
759 border: 2px solid $fedexBottonColor !important; /* 设置边框颜色 */ 851 border: 2px solid $fedexBottonColor !important; /* 设置边框颜色 */
......
...@@ -216,8 +216,10 @@ ...@@ -216,8 +216,10 @@
216 </el-select> 216 </el-select>
217 </Formitem> 217 </Formitem>
218 </el-col> 218 </el-col>
219 + </el-row>
220 + <el-row :gutter="5" v-if="formData.orderRequester == '2'">
219 <!-- 口岸选择--> 221 <!-- 口岸选择-->
220 - <el-col :span="8" v-if="formData.orderRequester == '2'"> 222 + <el-col :span="8">
221 <Formitem label="申报地区" prop="choosePortCode" type="edit"> 223 <Formitem label="申报地区" prop="choosePortCode" type="edit">
222 <el-select 224 <el-select
223 type="text" 225 type="text"
...@@ -245,6 +247,54 @@ ...@@ -245,6 +247,54 @@
245 > 247 >
246 <div class="dlTitle">青岛</div> 248 <div class="dlTitle">青岛</div>
247 <el-row :gutter="5"> 249 <el-row :gutter="5">
250 + <!-- 订单申报通道 orderDeclareChannel -->
251 + <el-col :span="8" :key="dateKey">
252 + <Formitem
253 + label="订单申报通道"
254 + prop="orderDeclareChannel"
255 + type="edit"
256 + >
257 + <el-select
258 + type="text"
259 + id="inputInner-edit-orderDeclareChannel"
260 + v-model="portConfig.TAO.orderDeclareChannel"
261 + clearable
262 + maxlength="4"
263 + placeholder=""
264 + @change="changeOrderDeclareChannel"
265 + >
266 + <el-option
267 + v-for="(item, index) in $store.getters.dict
268 + .ORDER_DECLARE_CHANNEL"
269 + :key="index"
270 + :label="item.itemChineseName"
271 + :value="item.itemValue"
272 + ></el-option>
273 + </el-select>
274 + </Formitem>
275 + </el-col>
276 + <!-- 加签方式 -->
277 + <el-col :span="8" :key="dateKey">
278 + <Formitem label="加签方式" prop="methodOfSignature" type="edit">
279 + <el-select
280 + type="text"
281 + id="inputInner-edit-methodOfSignature"
282 + v-model="portConfig.TAO.methodOfSignature"
283 + clearable
284 + maxlength="4"
285 + placeholder=""
286 + >
287 + <el-option
288 + v-for="(item, index) in $store.getters.dict
289 + .METHOD_OF_SIGNATURE"
290 + :key="index"
291 + :label="item.itemChineseName"
292 + :value="item.itemValue"
293 + ></el-option>
294 + </el-select>
295 + </Formitem>
296 + </el-col>
297 +
248 <!-- 公服DXPID --> 298 <!-- 公服DXPID -->
249 <el-col 299 <el-col
250 :span="8" 300 :span="8"
...@@ -359,53 +409,6 @@ ...@@ -359,53 +409,6 @@
359 ></el-input> 409 ></el-input>
360 </Formitem> 410 </Formitem>
361 </el-col> 411 </el-col>
362 - <!-- 加签方式 -->
363 - <el-col :span="8" :key="dateKey">
364 - <Formitem label="加签方式" prop="methodOfSignature" type="edit">
365 - <el-select
366 - type="text"
367 - id="inputInner-edit-methodOfSignature"
368 - v-model="portConfig.TAO.methodOfSignature"
369 - clearable
370 - maxlength="4"
371 - placeholder=""
372 - >
373 - <el-option
374 - v-for="(item, index) in $store.getters.dict
375 - .METHOD_OF_SIGNATURE"
376 - :key="index"
377 - :label="item.itemChineseName"
378 - :value="item.itemValue"
379 - ></el-option>
380 - </el-select>
381 - </Formitem>
382 - </el-col>
383 - <!-- 订单申报通道 orderDeclareChannel -->
384 - <el-col :span="8" :key="dateKey">
385 - <Formitem
386 - label="订单申报通道"
387 - prop="orderDeclareChannel"
388 - type="edit"
389 - >
390 - <el-select
391 - type="text"
392 - id="inputInner-edit-orderDeclareChannel"
393 - v-model="portConfig.TAO.orderDeclareChannel"
394 - clearable
395 - maxlength="4"
396 - placeholder=""
397 - @change="changeOrderDeclareChannel"
398 - >
399 - <el-option
400 - v-for="(item, index) in $store.getters.dict
401 - .ORDER_DECLARE_CHANNEL"
402 - :key="index"
403 - :label="item.itemChineseName"
404 - :value="item.itemValue"
405 - ></el-option>
406 - </el-select>
407 - </Formitem>
408 - </el-col>
409 412
410 <el-col 413 <el-col
411 :span="16" 414 :span="16"
...@@ -983,6 +986,13 @@ export default { ...@@ -983,6 +986,13 @@ export default {
983 message: "订单申报方不能为空!", 986 message: "订单申报方不能为空!",
984 }, 987 },
985 ], 988 ],
989 + declareBusinessType: [
990 + {
991 + required: true,
992 + trigger: "change",
993 + message: "申报业务类型不能为空!",
994 + },
995 + ],
986 996
987 // methodOfSignature: [ 997 // methodOfSignature: [
988 // { 998 // {
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
88 </el-col> 88 </el-col>
89 </el-row> 89 </el-row>
90 <el-row> 90 <el-row>
91 - <!-- 电商企业代码 --> 91 + <!-- 电商企业名称 -->
92 <el-col :span="5"> 92 <el-col :span="5">
93 <Formitem label="电商企业名称" prop="ebcName"> 93 <Formitem label="电商企业名称" prop="ebcName">
94 <el-input 94 <el-input
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
173 @click="customDialogShow = true" 173 @click="customDialogShow = true"
174 > 174 >
175 <svg-icon class="el-icon-user-solid" icon-class="zidingyi"></svg-icon> 175 <svg-icon class="el-icon-user-solid" icon-class="zidingyi"></svg-icon>
176 - 自定义内容 176 + 导出字段
177 </el-button> 177 </el-button>
178 178
179 <el-button 179 <el-button
...@@ -241,6 +241,7 @@ ...@@ -241,6 +241,7 @@
241 <script> 241 <script>
242 import { getAllexportList, getListReceiptData } from "@/api/exportList-api.js"; 242 import { getAllexportList, getListReceiptData } from "@/api/exportList-api.js";
243 import CustomDialog from "./custom-dialog.vue"; 243 import CustomDialog from "./custom-dialog.vue";
244 +import { formatDateNew } from "../../utils";
244 245
245 export default { 246 export default {
246 name: "ExportBillQuery", 247 name: "ExportBillQuery",
...@@ -453,8 +454,9 @@ export default { ...@@ -453,8 +454,9 @@ export default {
453 // // 2. 清单查询 454 // // 2. 清单查询
454 // console.log(res); 455 // console.log(res);
455 // }); 456 // });
457 + const fileName = `${formatDateNew(new Date())}.xlsx`;
456 this.fileDownload 458 this.fileDownload
457 - .downLoadZip("api", "listExport", "清单查询.xlsx", "xlsx", "post", { 459 + .downLoadZip("api", "listExport", fileName, "xlsx", "post", {
458 ...obj, 460 ...obj,
459 }) 461 })
460 .finally(() => { 462 .finally(() => {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 </el-col> 36 </el-col>
37 <!-- 创建时间 --> 37 <!-- 创建时间 -->
38 <el-col :span="5"> 38 <el-col :span="5">
39 - <Formitem label="操作时间" prop="createTime" :activeType="true"> 39 + <Formitem label="更新时间" prop="createTime" :activeType="true">
40 <el-date-picker 40 <el-date-picker
41 class="inputInner--createTime" 41 class="inputInner--createTime"
42 id="inputInner-edit-createTime" 42 id="inputInner-edit-createTime"
...@@ -139,24 +139,25 @@ ...@@ -139,24 +139,25 @@
139 :selected="selected" 139 :selected="selected"
140 @close="dialogClose" 140 @close="dialogClose"
141 /> 141 />
142 + <!-- -->
143 + <TimeDialog :timeVisible="timeVisible" @close="timeClose" />
142 </div> 144 </div>
143 </template> 145 </template>
144 146
145 <script> 147 <script>
146 -import { 148 +import { getHsCodeList, getHsCodeSingleSync } from "@/api/arrivalList-api.js";
147 - getHsCodeList,
148 - getHsCodeIncr,
149 - getHsCodeSingleSync,
150 -} from "@/api/arrivalList-api.js";
151 import DialogVue from "./dialog.vue"; 149 import DialogVue from "./dialog.vue";
150 +import TimeDialog from "./time-dialog.vue";
152 export default { 151 export default {
153 name: "SupervisePlaceManage", 152 name: "SupervisePlaceManage",
154 components: { 153 components: {
155 DialogVue, 154 DialogVue,
155 + TimeDialog,
156 }, 156 },
157 data() { 157 data() {
158 return { 158 return {
159 selected: {}, 159 selected: {},
160 + timeVisible: false,
160 sreachFormData: { 161 sreachFormData: {
161 skuCode: "", 162 skuCode: "",
162 skuname: "", 163 skuname: "",
...@@ -289,32 +290,39 @@ export default { ...@@ -289,32 +290,39 @@ export default {
289 console.log("finally"); 290 console.log("finally");
290 }); 291 });
291 }, 292 },
293 + timeClose() {
294 + console.log("===");
295 + this.loadings.postLoading = false;
296 + this.timeVisible = false;
297 + },
292 addDeclare() { 298 addDeclare() {
293 this.loadings.postLoading = true; 299 this.loadings.postLoading = true;
294 - this.$confirm("是否确认操作增量数据同步?", "提示", { 300 + this.timeVisible = true;
295 - confirmButtonText: "确定", 301 + // loadings.postLoading
296 - cancelButtonText: "取消", 302 + // this.$confirm("是否确认操作增量数据同步?", "提示", {
297 - type: "warning", 303 + // confirmButtonText: "确定",
298 - }) 304 + // cancelButtonText: "取消",
299 - .then(() => { 305 + // type: "warning",
300 - getHsCodeIncr() 306 + // })
301 - .then((res) => { 307 + // .then(() => {
302 - if (res.code === "200") { 308 + // getHsCodeIncr()
303 - this.alertSuccessMsg(res.message); 309 + // .then((res) => {
304 - } else { 310 + // if (res.code === "200") {
305 - this.alertWarningMsg(res.message); 311 + // this.alertSuccessMsg(res.message);
306 - } 312 + // } else {
307 - this.loadings.postLoading = false; 313 + // this.alertWarningMsg(res.message);
308 - }) 314 + // }
309 - .catch((err) => { 315 + // this.loadings.postLoading = false;
310 - console.log(err); 316 + // })
311 - this.loadings.postLoading = false; 317 + // .catch((err) => {
312 - }) 318 + // console.log(err);
313 - .finally(() => { 319 + // this.loadings.postLoading = false;
314 - // console.log("finally"); 320 + // })
315 - }); 321 + // .finally(() => {
316 - }) 322 + // // console.log("finally");
317 - .catch(() => {}); 323 + // });
324 + // })
325 + // .catch(() => {});
318 }, 326 },
319 detail(record) { 327 detail(record) {
320 this.selected = JSON.parse(JSON.stringify(record)); 328 this.selected = JSON.parse(JSON.stringify(record));
......
1 +<template>
2 + <el-dialog
3 + class="entryDialog classCUploadDialog"
4 + title="增量数据同步"
5 + :visible.sync="timeVisibleConfig"
6 + :show-close="false"
7 + width="450px"
8 + :close-on-click-modal="false"
9 + :destroy-on-close="true"
10 + v-loading="loadings.dialogLoading"
11 + @close="close(false)"
12 + >
13 + <div class="modelItem" style="margin-bottom: 10px">
14 + <el-form
15 + class="fedexFormStyle"
16 + ref="formData"
17 + :model="formData"
18 + label-position="top"
19 + size="small"
20 + :rules="rules"
21 + >
22 + <el-row :gutter="5">
23 + <el-col :span="24">
24 + <Formitem label="同步日期" prop="beginDate" type="edit">
25 + <el-date-picker
26 + class="inputInner--beginDate"
27 + id="inputInner-edit-beginDate"
28 + v-model="formData.beginDate"
29 + format="yyyy-MM-dd"
30 + prefix-icon="none"
31 + value-format="yyyy-MM-dd"
32 + />
33 + </Formitem>
34 + </el-col>
35 + </el-row>
36 + </el-form>
37 + </div>
38 +
39 + <div class="dialogOption entrySave">
40 + <el-button
41 + class="entrySaveButton"
42 + :disabled="loadings.submitLoading"
43 + @click="submit"
44 + >确 定</el-button
45 + >
46 + <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
47 + </div>
48 + </el-dialog>
49 +</template>
50 +
51 +<script>
52 +import { getHsCodeIncr } from "@/api/arrivalList-api.js";
53 +import { getYesterday } from "@/utils/index.js";
54 +export default {
55 + props: {
56 + timeVisible: {
57 + type: Boolean,
58 + default: false,
59 + },
60 + },
61 +
62 + data() {
63 + return {
64 + formData: {
65 + beginDate: "",
66 + },
67 + timeVisibleConfig: false,
68 + loadings: {
69 + dialogLoading: false,
70 + submitLoading: false,
71 + },
72 + loadingText: "",
73 + logisticsTotal: 0,
74 + rules: {
75 + beginDate: [
76 + {
77 + required: true,
78 + trigger: "change",
79 + message: "同步日期不能为空!",
80 + },
81 + ],
82 + },
83 + };
84 + },
85 + watch: {
86 + timeVisible(val) {
87 + if (val) {
88 + console.log(getYesterday().substring(0, 10));
89 + const time = getYesterday().substring(0, 10);
90 + this.timeVisibleConfig = val;
91 + this.formData = {
92 + beginDate: time,
93 + };
94 + }
95 + },
96 + },
97 + methods: {
98 + //数据保存
99 + submit() {
100 + let obj = {
101 + ...this.formData,
102 + };
103 + this.$refs.formData.validate((valid) => {
104 + if (valid) {
105 + this.addapi(obj);
106 + }
107 + });
108 + },
109 +
110 + //新增 getHsCodeIncr
111 + addapi(val) {
112 + this.loadings.dialogLoading = true;
113 + getHsCodeIncr(val)
114 + .then((res) => {
115 + if (res.code === "200") {
116 + this.msgSuccess(res.message);
117 + this.close(true);
118 + } else {
119 + this.alertWarningMsg(res.message);
120 + this.loadings.dialogLoading = false;
121 + }
122 + })
123 + .catch((err) => {
124 + console.log(err);
125 + this.loadings.dialogLoading = false;
126 + });
127 + },
128 +
129 + close(flag) {
130 + this.formData = {
131 + beginDate: "",
132 + };
133 + this.loadings.dialogLoading = false;
134 + this.timeVisibleConfig = false;
135 + this.$emit("close", flag);
136 + },
137 + },
138 +};
139 +</script>
140 +
141 +<style lang="scss" scoped>
142 +@import "@/assets/styles/variables.scss";
143 +</style>
...@@ -100,6 +100,20 @@ ...@@ -100,6 +100,20 @@
100 </el-col> 100 </el-col>
101 </el-row> 101 </el-row>
102 <el-row class="backgroundRow"> 102 <el-row class="backgroundRow">
103 + <!-- 电商企业名称 -->
104 + <el-col :span="5">
105 + <Formitem label="电商企业名称" prop="ebcName">
106 + <el-input
107 + type="text"
108 + class="inputShadow"
109 + id="inputInner--ebcName"
110 + resize="none"
111 + v-model="sreachFormData.ebcName"
112 + clearable
113 + placeholder=""
114 + ></el-input>
115 + </Formitem>
116 + </el-col>
103 <!-- 创建时间 --> 117 <!-- 创建时间 -->
104 <el-col :span="5"> 118 <el-col :span="5">
105 <Formitem label="创建时间" prop="createTime" :activeType="true"> 119 <Formitem label="创建时间" prop="createTime" :activeType="true">
...@@ -273,7 +287,7 @@ ...@@ -273,7 +287,7 @@
273 </el-button> 287 </el-button>
274 </div> 288 </div>
275 </div> 289 </div>
276 - <section style="position: fixed; top: 350px; left: 500px"> 290 + <section style="position: fixed; top: 35%; right: 10%">
277 <TablePopover 291 <TablePopover
278 ref="allLogDataReceiptStatusPopover" 292 ref="allLogDataReceiptStatusPopover"
279 dataKey="allLogDataReceiptStatus" 293 dataKey="allLogDataReceiptStatus"
...@@ -292,7 +306,7 @@ ...@@ -292,7 +306,7 @@
292 </TablePopover> 306 </TablePopover>
293 </section> 307 </section>
294 <Table 308 <Table
295 - class="fedexDetialTable fedexSreachTable" 309 + class="fedexDetialTable fedexSreachTable fedexTable_new"
296 ref="entryTable" 310 ref="entryTable"
297 :data="tableData" 311 :data="tableData"
298 :headerData="headerData" 312 :headerData="headerData"
...@@ -312,6 +326,8 @@ ...@@ -312,6 +326,8 @@
312 :rowSelectDataType="false" 326 :rowSelectDataType="false"
313 @cellClick="cellClick" 327 @cellClick="cellClick"
314 :selected="selected" 328 :selected="selected"
329 + @filterChange="filterChange"
330 + rowKey="declareId"
315 > 331 >
316 <template v-slot:orderReceiptStatus="scope"> 332 <template v-slot:orderReceiptStatus="scope">
317 <TablePopover 333 <TablePopover
...@@ -326,8 +342,8 @@ ...@@ -326,8 +342,8 @@
326 @popoverClose="popoverClose" 342 @popoverClose="popoverClose"
327 > 343 >
328 <div slot="title"> 344 <div slot="title">
329 - <span style="font-weight: 700; color: #515a6e">订单编号:</span 345 + <span style="font-weight: 700; color: #515a6e">订单编号:</span>
330 - >{{ scope.row.orderno }} 346 + {{ scope.row.orderno }}
331 </div> 347 </div>
332 <div slot="buttonLabel"> 348 <div slot="buttonLabel">
333 {{ scope.row.orderReceiptStatus }} 349 {{ scope.row.orderReceiptStatus }}
...@@ -440,7 +456,7 @@ ...@@ -440,7 +456,7 @@
440 </TablePopover> 456 </TablePopover>
441 </template> 457 </template>
442 <template slot="optionColumn"> 458 <template slot="optionColumn">
443 - <el-table-column align="center" label="操作" width="150"> 459 + <el-table-column label="操作" width="120">
444 <template slot-scope="scope"> 460 <template slot-scope="scope">
445 <el-button type="text" @click="update(scope.row)"> 修改 </el-button> 461 <el-button type="text" @click="update(scope.row)"> 修改 </el-button>
446 <el-button type="text" @click="showTotalLog(scope.row)"> 462 <el-button type="text" @click="showTotalLog(scope.row)">
...@@ -548,6 +564,7 @@ export default { ...@@ -548,6 +564,7 @@ export default {
548 receiptType: null, 564 receiptType: null,
549 createTime: [], 565 createTime: [],
550 dataSource: [], 566 dataSource: [],
567 + ebcName: "",
551 }, 568 },
552 page: { 569 page: {
553 pageIndex: 1, 570 pageIndex: 1,
...@@ -555,6 +572,7 @@ export default { ...@@ -555,6 +572,7 @@ export default {
555 total: 0, 572 total: 0,
556 }, 573 },
557 tableData: [], 574 tableData: [],
575 + orderStatus: [],
558 headerData: [ 576 headerData: [
559 { 577 {
560 name: "提运单号", 578 name: "提运单号",
...@@ -598,6 +616,46 @@ export default { ...@@ -598,6 +616,46 @@ export default {
598 width: "", 616 width: "",
599 align: "left", 617 align: "left",
600 slot: true, 618 slot: true,
619 + columnKey: "orderReceiptStatus",
620 + filters: [
621 + {
622 + text: "已提交",
623 + value: "0",
624 + },
625 + {
626 + text: "xml报文加签失败",
627 + value: "-2",
628 + },
629 + {
630 + text: "xml报文上传失败",
631 + value: "-3",
632 + },
633 + {
634 + text: "电子口岸申报中",
635 + value: "2",
636 + },
637 + {
638 + text: "发送海关成功",
639 + value: "3",
640 + },
641 + {
642 + text: "发送海关失败",
643 + value: "4",
644 + },
645 + {
646 + text: "海关退单",
647 + value: "100",
648 + },
649 + {
650 + text: "海关入库",
651 + value: "120",
652 + },
653 + {
654 + text: "回执异常",
655 + value: "-1",
656 + },
657 + ],
658 + // filterMethod: this.filterMethodFn,
601 }, 659 },
602 // { 660 // {
603 // name: "收款单回执", 661 // name: "收款单回执",
...@@ -636,13 +694,13 @@ export default { ...@@ -636,13 +694,13 @@ export default {
636 // align: "left", 694 // align: "left",
637 // slot: true, 695 // slot: true,
638 // }, 696 // },
639 - { 697 + // {
640 - name: "离境单回执", 698 + // name: "离境单回执",
641 - value: "logisticsReceiptStatus", 699 + // value: "logisticsReceiptStatus",
642 - width: "", 700 + // width: "",
643 - align: "left", 701 + // align: "left",
644 - slot: true, 702 + // slot: true,
645 - }, 703 + // },
646 ], 704 ],
647 receiptDataHead: [ 705 receiptDataHead: [
648 { 706 {
...@@ -759,6 +817,11 @@ export default { ...@@ -759,6 +817,11 @@ export default {
759 }); 817 });
760 }, 818 },
761 methods: { 819 methods: {
820 + filterChange(value) {
821 + this.orderStatus = value.orderReceiptStatus;
822 + console.log(value, this.orderStatus);
823 + this.search(0);
824 + },
762 //获取口岸子字典 825 //获取口岸子字典
763 searchPortDictData() { 826 searchPortDictData() {
764 getPortInfo() 827 getPortInfo()
...@@ -855,6 +918,7 @@ export default { ...@@ -855,6 +918,7 @@ export default {
855 obj.startCreateTime = obj.createTime[0]; 918 obj.startCreateTime = obj.createTime[0];
856 obj.endCreateTime = obj.createTime[1]; 919 obj.endCreateTime = obj.createTime[1];
857 } 920 }
921 + obj.orderStatus = this.orderStatus;
858 searchDeclareData(obj) 922 searchDeclareData(obj)
859 .then((res) => { 923 .then((res) => {
860 if (res.code === "200") { 924 if (res.code === "200") {
...@@ -892,6 +956,7 @@ export default { ...@@ -892,6 +956,7 @@ export default {
892 receiptType: null, 956 receiptType: null,
893 createTime: [], 957 createTime: [],
894 dataSource: [], 958 dataSource: [],
959 + ebcName: "",
895 }; 960 };
896 this.clearPort(); 961 this.clearPort();
897 this.clearStatus(); 962 this.clearStatus();
...@@ -1381,4 +1446,17 @@ export default { ...@@ -1381,4 +1446,17 @@ export default {
1381 margin-right: 30px; 1446 margin-right: 30px;
1382 } 1447 }
1383 } 1448 }
1449 +::v-deep {
1450 + .fedexTable_new {
1451 + .el-table th.el-table__cell > .cell {
1452 + display: flex;
1453 + align-items: center;
1454 + gap: 30px;
1455 + justify-content: space-between;
1456 + &.highlight {
1457 + color: #007ab7;
1458 + }
1459 + }
1460 + }
1461 +}
1384 </style> 1462 </style>
......