jinhui.wang

组件增加,回执状态增加,字典表增加

...@@ -55,7 +55,6 @@ export default { ...@@ -55,7 +55,6 @@ export default {
55 }; 55 };
56 }, 56 },
57 created() { 57 created() {
58 - this.$store.dispatch("GetLink");
59 localStorage.getItem("EcomLang") 58 localStorage.getItem("EcomLang")
60 ? (this.$i18n.locale = localStorage.getItem("EcomLang")) 59 ? (this.$i18n.locale = localStorage.getItem("EcomLang"))
61 : localStorage.setItem("EcomLang", this.$i18n.locale); 60 : localStorage.setItem("EcomLang", this.$i18n.locale);
......
1 +<template>
2 + <div>
3 + <el-popover
4 + placement="bottom"
5 + width="320"
6 + trigger="manual"
7 + :popper-class="`popover${dataKey}`"
8 + v-model="textareaVisible"
9 + >
10 + <el-input
11 + :name="`${dataKey}-textarea`"
12 + type="textarea"
13 + :rows="5"
14 + :id="`popoverInput${dataKey}`"
15 + class="inputShadow textareaPopover"
16 + v-model="formData[dataKey]"
17 + resize="none"
18 + maxlength="13000"
19 + placeholder=""
20 + @blur="textareaBlur"
21 + @input="input"
22 + ></el-input>
23 + <el-input
24 + slot="reference"
25 + :name="dataKey"
26 + type="textarea"
27 + :rows="1"
28 + class="inputShadow"
29 + :id="`inputInner--${dataKey}`"
30 + v-model="formData[dataKey]"
31 + resize="none"
32 + placeholder=""
33 + @focus="textareaFocus"
34 + @input="input"
35 + ></el-input>
36 + </el-popover>
37 + <el-badge
38 + v-if="
39 + !textareaVisible &&
40 + textareaLength({
41 + key: dataKey,
42 + value: formData[dataKey],
43 + }) > 1
44 + "
45 + type="info"
46 + :value="`+${textareaLength({
47 + key: dataKey,
48 + value: formData[dataKey],
49 + })}`"
50 + class="item texttareaTip"
51 + />
52 + </div>
53 +</template>
54 +
55 +<script>
56 +export default {
57 + props: {
58 + formData: {
59 + type: Object,
60 + default: null,
61 + },
62 + dataKey: {
63 + type: String,
64 + default: "",
65 + },
66 + },
67 + data() {
68 + return {
69 + textareaVisible: false,
70 + };
71 + },
72 + methods: {
73 + //文本域展示状态切换
74 + textareaFocus(val) {
75 + this.textareaVisible = true;
76 + this.$nextTick(() => {
77 + document
78 + .querySelector("#popoverInput" + val.target.name.split("-")[0])
79 + .focus();
80 + document.querySelector(
81 + "#inputInner--" + val.target.name.split("-")[0]
82 + ).style.display = "none";
83 + });
84 + },
85 + textareaBlur(val) {
86 + let inputInner = document.querySelector(
87 + "#inputInner--" + val.target.name.split("-")[0]
88 + );
89 + this.textareaVisible = false;
90 + inputInner.style.display = "block";
91 + this.$nextTick(() => {
92 + inputInner.blur();
93 + if (
94 + inputInner.value != undefined &&
95 + inputInner.value != "" &&
96 + inputInner.value != null
97 + ) {
98 + inputInner.classList.add("inputFocus");
99 + } else {
100 + inputInner.classList.remove("inputFocus");
101 + }
102 + });
103 + let arr = [];
104 + this.formData[val.target.name.split("-")[0]]
105 + .replace(/[\n\,\;\;]/g, ",")
106 + .replace(/[\t]/g, "")
107 + .split(",")
108 + .forEach((str, index) => {
109 + if (str != null && str != "" && index <= 1000) {
110 + arr.push(str.trim());
111 + }
112 + });
113 + this.formData[val.target.name.split("-")[0]] = arr.join("\n");
114 + this.$emit("formChange", this.formData);
115 + this.$forceUpdate();
116 + },
117 + //文本域输入内容数量处理
118 + textareaLength(val) {
119 + if (val.value != "" && val.value != null) {
120 + let arr = [];
121 + val.value
122 + .trim()
123 + .replace(/[\n\,\;\;]/g, ",")
124 + .split(",")
125 + .forEach((item) => {
126 + if (item != "" && item != null) {
127 + arr.push(item);
128 + }
129 + });
130 + return arr.length;
131 + } else {
132 + return 0;
133 + }
134 + },
135 + input() {
136 + this.$forceUpdate();
137 + },
138 + },
139 +};
140 +</script>
141 +
142 +<style scoped lang="scss">
143 +@import "@/assets/styles/variables.scss";
144 +.texttareaTip {
145 + position: absolute;
146 + top: 52%;
147 + right: 20px;
148 + transform: translate(0, -50%);
149 + z-index: 10;
150 +}
151 +</style>
1 +<template>
2 + <el-popover
3 + :popper-class="`popper${dataKey}${rowData.declareId} portLogPopper`"
4 + placement="left"
5 + :visible-arrow="false"
6 + title=""
7 + width="750"
8 + trigger="manual"
9 + v-model="rowData[`${dataKey}PopoverType`]"
10 + >
11 + <div style="text-align: right">
12 + <i
13 + class="el-icon-close"
14 + style="cursor: pointer; font-size: 20px; font-weight: 700"
15 + @click.stop="popoverClose"
16 + ></i>
17 + </div>
18 + <div v-loading="rowData.popoverLoading">
19 + <slot name="title"></slot>
20 + <Table
21 + class="fedexDetialTable mt20"
22 + :data="rowData[`${dataKey}PopoverData`]"
23 + :headerData="receiptDataHead"
24 + :selection="false"
25 + :selectFixed="false"
26 + :order="false"
27 + :border="true"
28 + :rowSelectDataType="false"
29 + :pagination="false"
30 + :page="1"
31 + :pageSizes="[20, 30, 50, 100]"
32 + :totalCount="0"
33 + :emptyText="$t('portEntry.emptyText')"
34 + height="350px"
35 + maxHeight="500px"
36 + rowKey="id"
37 + >
38 + </Table>
39 + </div>
40 + <el-button
41 + slot="reference"
42 + type="text"
43 + @click.stop="popoverChange(rowData, dataKey)"
44 + >
45 + <slot name="buttonLabel"></slot>
46 + </el-button>
47 + </el-popover>
48 +</template>
49 +
50 +<script>
51 +export default {
52 + props: {
53 + dataKey: {
54 + type: String,
55 + default: "",
56 + },
57 + rowData: {
58 + tpye: Object,
59 + default: null,
60 + },
61 + tableData: {
62 + type: Array,
63 + default() {
64 + return [];
65 + },
66 + },
67 + receiptDataHead: {
68 + type: Array,
69 + default() {
70 + return [];
71 + },
72 + },
73 + parentDom: {
74 + type: Object,
75 + default: null,
76 + },
77 + },
78 + data() {
79 + return {};
80 + },
81 + methods: {
82 + //弹框关闭
83 + popoverClose() {
84 + this.$emit("popoverClose");
85 + this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
86 + },
87 + //弹框状态改版
88 + popoverChange(data, type) {
89 + this.popoverClose();
90 + let arr = JSON.parse(JSON.stringify(this.tableData));
91 + arr.forEach((item) => {
92 + item[`${type}PopoverData`] = [];
93 + if (data.declareId != item.declareId) {
94 + // item[`${type}PopoverLoading`] = false;
95 + item[`${type}PopoverType`] = false;
96 + } else {
97 + // item[`${type}PopoverLoading`] = true;
98 + item[`${type}PopoverType`] = !JSON.parse(
99 + JSON.stringify(item[`${type}PopoverType`])
100 + );
101 + }
102 + });
103 + if (!data[`${type}PopoverType`]) {
104 + this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY =
105 + "hidden";
106 + } else {
107 + this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
108 + }
109 + this.$emit("popoverChange", {
110 + tableData: arr,
111 + data: data,
112 + type: !data[`${type}PopoverType`],
113 + status: type,
114 + });
115 +
116 + this.$nextTick(() => {
117 + document.getElementsByClassName("el-table__row").forEach((dom1, i) => {
118 + if (i == data.index) {
119 + dom1.classList.add("activeRow");
120 + } else {
121 + dom1.classList.remove("hover-row");
122 + dom1.classList.remove("activeRow");
123 + }
124 + });
125 + let interval = setInterval(() => {
126 + if (
127 + document.getElementsByClassName(`popper${type}${data.declareId}`)
128 + .length == 1
129 + ) {
130 + clearInterval(interval);
131 + }
132 + document
133 + .getElementsByClassName(`popper${type}${data.declareId}`)
134 + .forEach((dom, index) => {
135 + if (index > 0) {
136 + dom.style.display = "none";
137 + dom.remove();
138 + }
139 + });
140 + }, 100);
141 + });
142 + },
143 + },
144 +};
145 +</script>
146 +
147 +<style></style>
...@@ -19,6 +19,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, ...@@ -19,6 +19,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,
19 import { formatDate, debounce, alertWarningMsg, alertSuccessMsg, alertErrorMsg, alertInfoMsg, toHead, compare, createRandom, ctho, base64ConvertFile } from "@/utils/index"; 19 import { formatDate, debounce, alertWarningMsg, alertSuccessMsg, alertErrorMsg, alertInfoMsg, toHead, compare, createRandom, ctho, base64ConvertFile } from "@/utils/index";
20 import * as fileDownload from '@/utils/zipdownload.js' 20 import * as fileDownload from '@/utils/zipdownload.js'
21 import * as filters from '@/utils/filters.js' 21 import * as filters from '@/utils/filters.js'
22 +import dictData from '@/utils/dict.js'
22 import regExp from '@/utils/regExp.js' 23 import regExp from '@/utils/regExp.js'
23 import Pagination from "@/components/Pagination"; 24 import Pagination from "@/components/Pagination";
24 // 自定义表格工具扩展 25 // 自定义表格工具扩展
...@@ -35,6 +36,8 @@ import CustomTransfer from '@/components/CustomTransfer' ...@@ -35,6 +36,8 @@ import CustomTransfer from '@/components/CustomTransfer'
35 import CustomForm from '@/components/CustomForm' 36 import CustomForm from '@/components/CustomForm'
36 import CustomTable from '@/components/CustomTable' 37 import CustomTable from '@/components/CustomTable'
37 import EditTag from '@/components/EditTag' 38 import EditTag from '@/components/EditTag'
39 +import TablePopover from '@/components/TablePopover'
40 +import FormTextareaInput from '@/components/FormTextareaInput'
38 (function () { 41 (function () {
39 if (typeof EventTarget !== "undefined") { 42 if (typeof EventTarget !== "undefined") {
40 let func = EventTarget.prototype.addEventListener; 43 let func = EventTarget.prototype.addEventListener;
...@@ -85,6 +88,7 @@ Vue.prototype.approvalPortType = approvalPortType ...@@ -85,6 +88,7 @@ Vue.prototype.approvalPortType = approvalPortType
85 Vue.prototype.getSystemOption = getSystemOption 88 Vue.prototype.getSystemOption = getSystemOption
86 Vue.prototype.currencySystemDisableType = currencySystemDisableType 89 Vue.prototype.currencySystemDisableType = currencySystemDisableType
87 Vue.prototype.imageTaskStatusShowType = imageTaskStatusShowType 90 Vue.prototype.imageTaskStatusShowType = imageTaskStatusShowType
91 +Vue.prototype.dictData = dictData
88 92
89 Vue.prototype.msgSuccess = function (msg) { 93 Vue.prototype.msgSuccess = function (msg) {
90 this.$message({ showClose: true, message: msg, type: "success" }); 94 this.$message({ showClose: true, message: msg, type: "success" });
...@@ -117,6 +121,8 @@ Vue.component('CustomTransfer', CustomTransfer) ...@@ -117,6 +121,8 @@ Vue.component('CustomTransfer', CustomTransfer)
117 Vue.component('CustomForm', CustomForm) 121 Vue.component('CustomForm', CustomForm)
118 Vue.component('CustomTable', CustomTable) 122 Vue.component('CustomTable', CustomTable)
119 Vue.component('EditTag', EditTag) 123 Vue.component('EditTag', EditTag)
124 +Vue.component('TablePopover', TablePopover)
125 +Vue.component('FormTextareaInput', FormTextareaInput)
120 126
121 Vue.use(permission) 127 Vue.use(permission)
122 128
......
1 +export default {
2 + returnStatus: [
3 + { code: 'RECEIPT_CUSTOMS_CLEARANCE', name: '结关', value: '899' },
4 + { code: 'RECEIPT_RELEASE', name: '放行', value: '800' },
5 + { code: 'RECEIPT_MANUAL_REVIEW', name: '人工审核', value: '300' },
6 + { code: 'RECEIPT_CUSTOMS_WAREHOUSING', name: '海关入库', value: '120' },
7 + { code: 'RECEIPT_AUDIT_COMPLETED', name: '海关审结', value: '399' },
8 + { code: 'RECEIPT_CUSTOMS_REFUND', name: '海关退单', value: '100' },
9 + { code: 'RECEIPT_FAIL_SEND', name: '发送海关失败', value: '4' },
10 + { code: 'RECEIPT_SUCCESSFULLY_SENT', name: '发送海关成功', value: '3' },
11 + { code: 'RECEIPT_DECLARE_IN_PROGRESS', name: '电子口岸申报中', value: '2' },
12 + { code: 'RECEIPT_TEMPORARILY_STORE', name: '电子口岸已暂存', value: '1' },
13 + ],
14 + appType: [
15 + { code: 'DECLARE_APPTYPE_CHANGE', name: '变更', value: '2' },
16 + { code: 'DECLARE_APPTYPE_ADD', name: '新增', value: '1' },
17 + ],
18 + currency: [
19 + { code: 'AED', name: '阿联酋迪拉姆', value: '138' },
20 + { code: 'ZAR', name: '南非兰特', value: '244' },
21 + { code: 'CAD', name: '加拿大元', value: '501' },
22 + { code: 'CHF', name: '瑞士法郎', value: '331' },
23 + { code: 'CNY', name: '人民币', value: '142' },
24 + { code: 'DKK', name: '丹麦克朗', value: '302' },
25 + { code: 'EUR', name: '欧元', value: '300' },
26 + { code: 'GBP', name: '英镑', value: '303' },
27 + { code: 'HKD', name: '港币', value: '110' },
28 + { code: 'HUF', name: '匈牙利福林', value: '321' },
29 + { code: 'JPY', name: '日本元', value: '116' },
30 + { code: 'KRW', name: '韩国圆', value: '133' },
31 + { code: 'MOP', name: '澳门元', value: '121' },
32 + { code: 'MXN', name: '墨西哥比索', value: '429' },
33 + { code: 'MYR', name: '马来西亚林吉特', value: '122' },
34 + ],
35 + unit: [
36 + {
37 + "code": "083",
38 + "name": "盎司"
39 + },
40 + {
41 +
42 + "code": "016",
43 + "name": "把"
44 + },
45 + {
46 + "code": "042",
47 + "name": "百把"
48 + },
49 + {
50 + "code": "040",
51 + "name": "百副"
52 + },
53 + {
54 + "code": "043",
55 + "name": "百个"
56 + },
57 + {
58 + "code": "044",
59 + "name": "百片"
60 + },
61 + {
62 + "code": "149",
63 + "name": "百万贝可"
64 + },
65 + {
66 + "code": "049",
67 + "name": "百枝"
68 + },
69 + {
70 + "code": "041",
71 + "name": "百支"
72 + },
73 + {
74 + "code": "076",
75 + "name": "磅"
76 + },
77 + {
78 + "code": "125",
79 + "name": "包"
80 + },
81 + {
82 + "code": "132",
83 + "name": "本"
84 + },
85 + {
86 + "code": "163",
87 + "name": "部"
88 + },
89 + {
90 + "code": "131",
91 + "name": "册"
92 + },
93 + {
94 + "code": "071",
95 + "name": "长吨"
96 + },
97 + {
98 + "code": "089",
99 + "name": "寸"
100 + },
101 + {
102 + "code": "127",
103 + "name": "打"
104 + },
105 + {
106 + "code": "136",
107 + "name": "袋"
108 + },
109 + {
110 + "code": "077",
111 + "name": "担"
112 + },
113 + {
114 + "code": "045",
115 + "name": "刀"
116 + },
117 + {
118 + "code": "079",
119 + "name": "短担"
120 + },
121 + {
122 + "code": "072",
123 + "name": "短吨"
124 + },
125 + {
126 + "code": "026",
127 + "name": "对"
128 + },
129 + {
130 + "code": "070",
131 + "name": "吨"
132 + },
133 + {
134 + "code": "133",
135 + "name": "发"
136 + },
137 + {
138 + "code": "022",
139 + "name": "份"
140 + },
141 + {
142 + "code": "023",
143 + "name": "幅"
144 + },
145 + {
146 + "code": "019",
147 + "name": "副"
148 + },
149 + {
150 + "code": "007",
151 + "name": "个"
152 + },
153 + {
154 + "code": "014",
155 + "name": "根"
156 + },
157 + {
158 + "code": "047",
159 + "name": "公担"
160 + },
161 + {
162 + "code": "116",
163 + "name": "公制马力"
164 + },
165 + {
166 + "code": "122",
167 + "name": "罐"
168 + },
169 + {
170 + "code": "096",
171 + "name": "毫升"
172 + },
173 + {
174 + "code": "141",
175 + "name": "合"
176 + },
177 + {
178 + "code": "140",
179 + "name": "盒"
180 + },
181 + {
182 + "code": "005",
183 + "name": "架"
184 + },
185 + {
186 + "code": "011",
187 + "name": "件"
188 + },
189 + {
190 + "code": "075",
191 + "name": "斤"
192 + },
193 + {
194 + "code": "029",
195 + "name": "井"
196 + },
197 + {
198 + "code": "039",
199 + "name": "具"
200 + },
201 + {
202 + "code": "018",
203 + "name": "卷"
204 + },
205 + {
206 + "code": "027",
207 + "name": "棵"
208 + },
209 + {
210 + "code": "036",
211 + "name": "克"
212 + },
213 + {
214 + "code": "084",
215 + "name": "克拉"
216 + },
217 + {
218 + "code": "017",
219 + "name": "块"
220 + },
221 + {
222 + "code": "128",
223 + "name": "筐"
224 + },
225 + {
226 + "code": "135",
227 + "name": "捆"
228 + },
229 + {
230 + "code": "101",
231 + "name": "立方尺"
232 + },
233 + {
234 + "code": "033",
235 + "name": "立方米"
236 + },
237 + {
238 + "code": "099",
239 + "name": "立方英尺"
240 + },
241 + {
242 + "code": "139",
243 + "name": "粒"
244 + },
245 + {
246 + "code": "080",
247 + "name": "两"
248 + },
249 + {
250 + "code": "003",
251 + "name": "辆"
252 + },
253 + {
254 + "code": "118",
255 + "name": "令"
256 + },
257 + {
258 + "code": "129",
259 + "name": "罗"
260 + },
261 + {
262 + "code": "126",
263 + "name": "箩"
264 + },
265 + {
266 + "code": "086",
267 + "name": "码"
268 + },
269 + {
270 + "code": "134",
271 + "name": "枚"
272 + },
273 + {
274 + "code": "098",
275 + "name": "美加仑"
276 + },
277 + {
278 + "code": "030",
279 + "name": "米"
280 + },
281 + {
282 + "code": "031",
283 + "name": "盘"
284 + },
285 + {
286 + "code": "037",
287 + "name": "盆"
288 + },
289 + {
290 + "code": "121",
291 + "name": "批"
292 + },
293 + {
294 + "code": "130",
295 + "name": "匹"
296 + },
297 + {
298 + "code": "020",
299 + "name": "片"
300 + },
301 + {
302 + "code": "112",
303 + "name": "平方尺"
304 + },
305 + {
306 + "code": "110",
307 + "name": "平方码"
308 + },
309 + {
310 + "code": "032",
311 + "name": "平方米"
312 + },
313 + {
314 + "code": "111",
315 + "name": "平方英尺"
316 + },
317 + {
318 + "code": "142",
319 + "name": "瓶"
320 + },
321 + {
322 + "code": "060",
323 + "name": "千伏安"
324 + },
325 + {
326 + "code": "054",
327 + "name": "千个"
328 + },
329 + {
330 + "code": "052",
331 + "name": "千盒"
332 + },
333 + {
334 + "code": "035",
335 + "name": "千克"
336 + },
337 + {
338 + "code": "051",
339 + "name": "千块"
340 + },
341 + {
342 + "code": "146",
343 + "name": "千粒"
344 + },
345 + {
346 + "code": "147",
347 + "name": "千米"
348 + },
349 + {
350 + "code": "063",
351 + "name": "千升"
352 + },
353 + {
354 + "code": "061",
355 + "name": "千瓦"
356 + },
357 + {
358 + "code": "062",
359 + "ext6": "KWH",
360 + "name": "千瓦时"
361 + },
362 + {
363 + "code": "148",
364 + "name": "千英尺"
365 + },
366 + {
367 + "code": "058",
368 + "name": "千张"
369 + },
370 + {
371 + "code": "053",
372 + "name": "千枝"
373 + },
374 + {
375 + "code": "143",
376 + "name": "千支"
377 + },
378 + {
379 + "code": "050",
380 + "name": "千只"
381 + },
382 + {
383 + "code": "170",
384 + "name": "人份"
385 + },
386 + {
387 + "code": "048",
388 + "name": "扇"
389 + },
390 + {
391 + "code": "095",
392 + "name": "升"
393 + },
394 + {
395 + "code": "085",
396 + "name": "市尺"
397 + },
398 + {
399 + "code": "081",
400 + "name": "市担"
401 + },
402 + {
403 + "code": "025",
404 + "name": "双"
405 + },
406 + {
407 + "code": "073",
408 + "name": "司马担"
409 + },
410 + {
411 + "code": "074",
412 + "name": "司马斤"
413 + },
414 + {
415 + "code": "004",
416 + "name": "艘"
417 + },
418 + {
419 + "code": "001",
420 + "name": "台"
421 + },
422 + {
423 + "code": "006",
424 + "name": "套"
425 + },
426 + {
427 + "code": "015",
428 + "name": "条"
429 + },
430 + {
431 + "code": "123",
432 + "name": "桶"
433 + },
434 + {
435 + "code": "034",
436 + "name": "筒"
437 + },
438 + {
439 + "code": "009",
440 + "name": "头"
441 + },
442 + {
443 + "code": "038",
444 + "name": "万个"
445 + },
446 + {
447 + "code": "145",
448 + "name": "万粒"
449 + },
450 + {
451 + "code": "144",
452 + "name": "万双"
453 + },
454 + {
455 + "code": "057",
456 + "name": "万套"
457 + },
458 + {
459 +
460 + "code": "059",
461 + "name": "万张"
462 + },
463 + {
464 + "code": "120",
465 + "name": "箱"
466 + },
467 + {
468 + "code": "056",
469 + "name": "亿个"
470 + },
471 + {
472 + "code": "055",
473 + "name": "亿支"
474 + },
475 + {
476 + "code": "067",
477 + "name": "英尺"
478 + },
479 + {
480 + "code": "088",
481 + "name": "英寸"
482 + },
483 + {
484 + "code": "078",
485 + "name": "英担"
486 + },
487 + {
488 + "code": "097",
489 + "name": "英加仑"
490 + },
491 + {
492 + "code": "115",
493 + "name": "英制马力"
494 + },
495 + {
496 + "code": "124",
497 + "name": "扎"
498 + },
499 + {
500 + "code": "010",
501 + "name": "张"
502 + },
503 + {
504 + "code": "013",
505 + "name": "枝"
506 + },
507 + {
508 + "code": "012",
509 + "name": "支"
510 + },
511 + {
512 + "code": "008",
513 + "name": "只"
514 + },
515 + {
516 + "code": "028",
517 + "name": "株"
518 + },
519 + {
520 + "code": "021",
521 + "name": "组"
522 + },
523 + {
524 + "code": "002",
525 + "name": "座"
526 + },
527 + {
528 + "code": "046",
529 + "name": "疋"
530 + }
531 + ]
532 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -18,7 +18,15 @@ ...@@ -18,7 +18,15 @@
18 }" 18 }"
19 :expandRowKeys="expandRowKeys" 19 :expandRowKeys="expandRowKeys"
20 > 20 >
21 - <template slot="optionColumn"> 21 + <template v-slot:unit="scope">
22 + <span>{{ selectDictLabel(scope.row.unit, "unit", "code") }}</span>
23 + </template>
24 + <template v-slot:currency="scope">
25 + <span>{{
26 + selectDictLabel(scope.row.currency, "currency", "value")
27 + }}</span>
28 + </template>
29 + <!-- <template slot="optionColumn">
22 <el-table-column 30 <el-table-column
23 header-align="center" 31 header-align="center"
24 align="center" 32 align="center"
...@@ -26,7 +34,6 @@ ...@@ -26,7 +34,6 @@
26 width="120" 34 width="120"
27 > 35 >
28 <template slot-scope="scope"> 36 <template slot-scope="scope">
29 - <!-- 展开/收起 -->
30 <el-button 37 <el-button
31 type="text" 38 type="text"
32 @click=" 39 @click="
...@@ -35,12 +42,10 @@ ...@@ -35,12 +42,10 @@
35 : editDetail(scope.row) 42 : editDetail(scope.row)
36 " 43 "
37 > 44 >
38 - <!-- 收起 -->
39 <span v-show="expandRowKeys.includes(scope.row.index)"> 45 <span v-show="expandRowKeys.includes(scope.row.index)">
40 <svg-icon icon-class="upIcon" /> 46 <svg-icon icon-class="upIcon" />
41 {{ $t("entry.detial.form.up") }} 47 {{ $t("entry.detial.form.up") }}
42 </span> 48 </span>
43 - <!-- 展开 -->
44 <span v-show="!expandRowKeys.includes(scope.row.index)" 49 <span v-show="!expandRowKeys.includes(scope.row.index)"
45 ><svg-icon icon-class="downIcon" /> 50 ><svg-icon icon-class="downIcon" />
46 {{ $t("entry.detial.form.down") }} 51 {{ $t("entry.detial.form.down") }}
...@@ -48,7 +53,7 @@ ...@@ -48,7 +53,7 @@
48 </el-button> 53 </el-button>
49 </template> 54 </template>
50 </el-table-column> 55 </el-table-column>
51 - </template> 56 + </template> -->
52 </Table> 57 </Table>
53 </template> 58 </template>
54 59
...@@ -73,7 +78,23 @@ export default { ...@@ -73,7 +78,23 @@ export default {
73 expandRowKeys: [], 78 expandRowKeys: [],
74 }; 79 };
75 }, 80 },
76 - methods: {}, 81 + methods: {
82 + editDetail(val) {
83 + this.expandRowKeys = [val.index];
84 + },
85 + closeEdit() {
86 + this.expandRowKeys = [];
87 + },
88 + selectDictLabel(value, dictkey, key) {
89 + let str = value;
90 + this.dictData[dictkey].forEach((item) => {
91 + if (value == item[key]) {
92 + str = item.name;
93 + }
94 + });
95 + return str;
96 + },
97 + },
77 }; 98 };
78 </script> 99 </script>
79 100
......
...@@ -123,15 +123,20 @@ ...@@ -123,15 +123,20 @@
123 </el-col> 123 </el-col>
124 <el-col :span="3"> 124 <el-col :span="3">
125 <Formitem label="币制" prop="currency"> 125 <Formitem label="币制" prop="currency">
126 - <el-input 126 + <el-select
127 type="text" 127 type="text"
128 - class="inputShadow"
129 id="inputInner--currency" 128 id="inputInner--currency"
130 - resize="none"
131 v-model="formData.currency" 129 v-model="formData.currency"
132 clearable 130 clearable
133 placeholder="" 131 placeholder=""
134 - ></el-input> 132 + >
133 + <el-option
134 + v-for="(item, index) in dictData.currency"
135 + :key="index"
136 + :label="item.name"
137 + :value="item.value"
138 + ></el-option>
139 + </el-select>
135 </Formitem> 140 </Formitem>
136 </el-col> 141 </el-col>
137 <!-- <el-col :span="3"> 142 <!-- <el-col :span="3">
...@@ -149,15 +154,20 @@ ...@@ -149,15 +154,20 @@
149 </el-col> --> 154 </el-col> -->
150 <el-col :span="3"> 155 <el-col :span="3">
151 <Formitem label="申报类型" prop="appType"> 156 <Formitem label="申报类型" prop="appType">
152 - <el-input 157 + <el-select
153 type="text" 158 type="text"
154 - class="inputShadow"
155 id="inputInner--appType" 159 id="inputInner--appType"
156 - resize="none"
157 v-model="formData.appType" 160 v-model="formData.appType"
158 clearable 161 clearable
159 placeholder="" 162 placeholder=""
160 - ></el-input> 163 + >
164 + <el-option
165 + v-for="(item, index) in dictData.appType"
166 + :key="index"
167 + :label="item.name"
168 + :value="item.value"
169 + ></el-option>
170 + </el-select>
161 </Formitem> 171 </Formitem>
162 </el-col> 172 </el-col>
163 <el-col :span="3"> 173 <el-col :span="3">
...@@ -250,61 +260,63 @@ export default { ...@@ -250,61 +260,63 @@ export default {
250 detialHeaderData: [ 260 detialHeaderData: [
251 { 261 {
252 name: "企业商品货号", 262 name: "企业商品货号",
253 - value: "", 263 + value: "itemNo",
254 width: "", 264 width: "",
255 align: "left", 265 align: "left",
256 }, 266 },
257 { 267 {
258 name: "商品企业商品名称", 268 name: "商品企业商品名称",
259 - value: "", 269 + value: "itemName",
260 width: "", 270 width: "",
261 align: "left", 271 align: "left",
262 }, 272 },
263 { 273 {
264 name: "企业商品描述", 274 name: "企业商品描述",
265 - value: "", 275 + value: "itemDescribe",
266 width: "", 276 width: "",
267 align: "left", 277 align: "left",
268 }, 278 },
269 { 279 {
270 name: "条码", 280 name: "条码",
271 - value: "", 281 + value: "barCode",
272 width: "", 282 width: "",
273 align: "left", 283 align: "left",
274 }, 284 },
275 { 285 {
276 name: "计量单位", 286 name: "计量单位",
277 - value: "", 287 + value: "unit",
278 width: "", 288 width: "",
279 align: "left", 289 align: "left",
290 + slot: true,
280 }, 291 },
281 { 292 {
282 name: "币制", 293 name: "币制",
283 - value: "", 294 + value: "currency",
284 width: "", 295 width: "",
285 align: "left", 296 align: "left",
297 + slot: true,
286 }, 298 },
287 { 299 {
288 name: "数量", 300 name: "数量",
289 - value: "", 301 + value: "qty",
290 width: "", 302 width: "",
291 align: "left", 303 align: "left",
292 }, 304 },
293 { 305 {
294 name: "单价", 306 name: "单价",
295 - value: "", 307 + value: "price",
296 width: "", 308 width: "",
297 align: "left", 309 align: "left",
298 }, 310 },
299 { 311 {
300 name: "总价", 312 name: "总价",
301 - value: "", 313 + value: "totalPrice",
302 width: "", 314 width: "",
303 align: "left", 315 align: "left",
304 }, 316 },
305 { 317 {
306 name: "备注", 318 name: "备注",
307 - value: "", 319 + value: "note",
308 width: "", 320 width: "",
309 align: "left", 321 align: "left",
310 }, 322 },
......
...@@ -11,74 +11,25 @@ ...@@ -11,74 +11,25 @@
11 <!-- 订单编号 --> 11 <!-- 订单编号 -->
12 <el-col :span="5"> 12 <el-col :span="5">
13 <Formitem label="订单编号" prop="orderNo"> 13 <Formitem label="订单编号" prop="orderNo">
14 - <el-popover 14 + <FormTextareaInput
15 - placement="bottom" 15 + :formData="sreachFormData"
16 - width="320" 16 + dataKey="orderNo"
17 - trigger="manual" 17 + @formChange="formChange"
18 - popper-class="popoverorderNo"
19 - v-model="textareaVisible.formItemorderNo"
20 - >
21 - <el-input
22 - name="orderNo-textarea"
23 - type="textarea"
24 - :rows="5"
25 - id="popoverInputorderNo"
26 - class="inputShadow textareaPopover"
27 - v-model="sreachFormData.orderNo"
28 - resize="none"
29 - maxlength="13000"
30 - placeholder=""
31 - @blur="textareaBlur"
32 - @input="input"
33 - ></el-input>
34 - <el-input
35 - slot="reference"
36 - name="orderNo"
37 - type="textarea"
38 - :rows="1"
39 - class="inputShadow"
40 - id="inputInner--orderNo"
41 - v-model="sreachFormData.orderNo"
42 - resize="none"
43 - placeholder=""
44 - @focus="textareaFocus"
45 - @input="input"
46 - ></el-input>
47 - </el-popover>
48 - <el-badge
49 - v-if="
50 - !textareaVisible.formItemorderNo &&
51 - textareaLength({
52 - key: 'orderNo',
53 - value: sreachFormData.orderNo,
54 - }) > 1
55 - "
56 - type="info"
57 - :value="`+${textareaLength({
58 - key: 'orderNo',
59 - value: sreachFormData.orderNo,
60 - })}`"
61 - class="item texttareaTip"
62 /> 18 />
63 </Formitem> 19 </Formitem>
64 </el-col> 20 </el-col>
65 <!-- 电商企业代码 --> 21 <!-- 电商企业代码 -->
66 <el-col :span="5"> 22 <el-col :span="5">
67 <Formitem label="电商企业代码" prop="ebccode"> 23 <Formitem label="电商企业代码" prop="ebccode">
68 - <el-select 24 + <el-input
69 type="text" 25 type="text"
26 + class="inputShadow"
70 id="inputInner--ebccode" 27 id="inputInner--ebccode"
28 + resize="none"
71 v-model="sreachFormData.ebccode" 29 v-model="sreachFormData.ebccode"
72 clearable 30 clearable
73 placeholder="" 31 placeholder=""
74 - > 32 + ></el-input>
75 - <el-option
76 - v-for="(item, index) in dictData.ebccode"
77 - :key="index"
78 - :label="item.name"
79 - :value="item.code"
80 - ></el-option>
81 - </el-select>
82 </Formitem> 33 </Formitem>
83 </el-col> 34 </el-col>
84 <!-- 回执状态 --> 35 <!-- 回执状态 -->
...@@ -171,7 +122,23 @@ ...@@ -171,7 +122,23 @@
171 :rowSelectDataType="false" 122 :rowSelectDataType="false"
172 > 123 >
173 <template v-slot:returnStatus="scope"> 124 <template v-slot:returnStatus="scope">
174 - <span>{{ scope.row.returnStatus }}</span> 125 + <TablePopover
126 + dataKey="returnStatus"
127 + :parentDom="$refs.entryTable"
128 + :receiptDataHead="receiptDataHead"
129 + :rowData="scope.row"
130 + :tableData="tableData"
131 + @popoverChange="popoverChange"
132 + @popoverClose="popoverClose"
133 + >
134 + <div slot="title">
135 + <span style="font-weight: 700; color: #515a6e">订单编号:</span
136 + >{{ scope.row.orderno }}
137 + </div>
138 + <div slot="buttonLabel">
139 + {{ scope.row.returnStatus }}
140 + </div>
141 + </TablePopover>
175 </template> 142 </template>
176 <template v-slot:orderNo="scope"> 143 <template v-slot:orderNo="scope">
177 <el-button type="text" @click="view(scope.row)">{{ 144 <el-button type="text" @click="view(scope.row)">{{
...@@ -259,6 +226,26 @@ export default { ...@@ -259,6 +226,26 @@ export default {
259 align: "left", 226 align: "left",
260 }, 227 },
261 ], 228 ],
229 + receiptDataHead: [
230 + {
231 + name: "回执状态",
232 + value: "",
233 + width: "",
234 + align: "left",
235 + },
236 + {
237 + name: "状态时间",
238 + value: "",
239 + width: "",
240 + align: "left",
241 + },
242 + {
243 + name: "回执描述",
244 + value: "",
245 + width: "",
246 + align: "left",
247 + },
248 + ],
262 dictData: { 249 dictData: {
263 ebccode: [], 250 ebccode: [],
264 returnStatus: [], 251 returnStatus: [],
...@@ -304,7 +291,7 @@ export default { ...@@ -304,7 +291,7 @@ export default {
304 item.index = idx; 291 item.index = idx;
305 item.popoverLoading = false; 292 item.popoverLoading = false;
306 item.returnStatusPopoverType = false; 293 item.returnStatusPopoverType = false;
307 - item.returnStatusPopoverData = false; 294 + item.returnStatusPopoverData = [];
308 }); 295 });
309 } else { 296 } else {
310 this.alertWarningMsg(res.message); 297 this.alertWarningMsg(res.message);
...@@ -334,66 +321,21 @@ export default { ...@@ -334,66 +321,21 @@ export default {
334 params: { data: val }, 321 params: { data: val },
335 }); 322 });
336 }, 323 },
337 - //文本域展示状态切换 324 + popoverChange(val) {
338 - textareaFocus(val) { 325 + this.tableData = val.tableData;
339 - this.textareaVisible["formItem" + val.target.name.split("-")[0]] = true; 326 + console.log(this.tableData);
340 - this.$nextTick(() => {
341 - document
342 - .querySelector("#popoverInput" + val.target.name.split("-")[0])
343 - .focus();
344 - document.querySelector(
345 - "#inputInner--" + val.target.name.split("-")[0]
346 - ).style.display = "none";
347 - });
348 }, 327 },
349 - textareaBlur(val) { 328 + popoverClose(val) {
350 - let inputInner = document.querySelector( 329 + this.tableData.forEach((item) => {
351 - "#inputInner--" + val.target.name.split("-")[0] 330 + item.popoverLoading = false;
352 - ); 331 + item.returnStatusPopoverType = false;
353 - this.textareaVisible["formItem" + val.target.name.split("-")[0]] = false; 332 + item.returnStatusPopoverData = [];
354 - inputInner.style.display = "block";
355 - this.$nextTick(() => {
356 - inputInner.blur();
357 - if (
358 - inputInner.value != undefined &&
359 - inputInner.value != "" &&
360 - inputInner.value != null
361 - ) {
362 - inputInner.classList.add("inputFocus");
363 - } else {
364 - inputInner.classList.remove("inputFocus");
365 - }
366 - });
367 - let arr = [];
368 - this.sreachFormData[val.target.name.split("-")[0]]
369 - .replace(/[\n\,\;\;]/g, ",")
370 - .replace(/[\t]/g, "")
371 - .split(",")
372 - .forEach((str, index) => {
373 - if (str != null && str != "" && index <= 1000) {
374 - arr.push(str.trim());
375 - }
376 }); 333 });
377 - this.sreachFormData[val.target.name.split("-")[0]] = arr.join("\n"); 334 + this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
378 - this.$forceUpdate(); 335 + "auto";
379 }, 336 },
380 - //文本域输入内容数量处理 337 + formChange(val) {
381 - textareaLength(val) { 338 + this.sreachFormData = val;
382 - if (val.value != "" && val.value != null) {
383 - let arr = [];
384 - val.value
385 - .trim()
386 - .replace(/[\n\,\;\;]/g, ",")
387 - .split(",")
388 - .forEach((item) => {
389 - if (item != "" && item != null) {
390 - arr.push(item);
391 - }
392 - });
393 - return arr.length;
394 - } else {
395 - return 0;
396 - }
397 }, 339 },
398 //分页 340 //分页
399 currentChange(val) { 341 currentChange(val) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <div class="modelItem-title"> 14 <div class="modelItem-title">
15 - <div>数据导入</div> 15 + <div>申报数据导入</div>
16 <div> 16 <div>
17 <el-button 17 <el-button
18 type="text" 18 type="text"
...@@ -76,6 +76,30 @@ ...@@ -76,6 +76,30 @@
76 </div> 76 </div>
77 </div> 77 </div>
78 </div> 78 </div>
79 + <div class="modelItem-title" v-if="errorData.length > 0">
80 + <div>导入结果</div>
81 + </div>
82 + <Table
83 + v-if="errorData.length > 0"
84 + class="fedexDetialTable"
85 + ref="entryTable"
86 + :data="errorData"
87 + :headerData="headerData"
88 + :maxHeight="200"
89 + :border="false"
90 + :pagination="false"
91 + :order="false"
92 + :page="1"
93 + :pageSizes="[20, 30, 50, 100]"
94 + :totalCount="0"
95 + :selection="false"
96 + :selectFixed="false"
97 + :rowSelectDataType="false"
98 + >
99 + <template v-slot:message="scope">
100 + <div class="errorMessage">{{ scope.row.message }}</div>
101 + </template>
102 + </Table>
79 </div> 103 </div>
80 <div class="dialogOption entrySave"> 104 <div class="dialogOption entrySave">
81 <el-button 105 <el-button
...@@ -103,6 +127,34 @@ export default { ...@@ -103,6 +127,34 @@ export default {
103 file: null, 127 file: null,
104 }, 128 },
105 searchForm: {}, 129 searchForm: {},
130 + errorData: [],
131 + headerData: [
132 + {
133 + name: "sheet",
134 + value: "sheetName",
135 + width: "100",
136 + align: "left",
137 + },
138 + {
139 + name: "行号",
140 + value: "rowIndex",
141 + width: "50",
142 + align: "left",
143 + },
144 + {
145 + name: "清单编号",
146 + value: "orderNo",
147 + width: "150",
148 + align: "left",
149 + },
150 + {
151 + name: "校验结果",
152 + value: "message",
153 + width: "",
154 + align: "left",
155 + slot: true,
156 + },
157 + ],
106 loadings: { 158 loadings: {
107 dialogLoading: false, 159 dialogLoading: false,
108 uploadLoading: false, 160 uploadLoading: false,
...@@ -116,6 +168,7 @@ export default { ...@@ -116,6 +168,7 @@ export default {
116 watch: { 168 watch: {
117 outerVisible(val) { 169 outerVisible(val) {
118 if (val) { 170 if (val) {
171 + this.loadings.dialogLoading = false;
119 this.uploadType = false; 172 this.uploadType = false;
120 } 173 }
121 }, 174 },
...@@ -152,11 +205,22 @@ export default { ...@@ -152,11 +205,22 @@ export default {
152 uploadDeclareData(obj) 205 uploadDeclareData(obj)
153 .then((res) => { 206 .then((res) => {
154 if (res.code === "200") { 207 if (res.code === "200") {
208 + let arr = [];
209 + res.data.forEach((item) => {
210 + if (item.message != null && item.message != "") {
211 + arr.push(item);
212 + }
213 + });
214 + if (arr.length == 0) {
155 this.msgSuccess("上传成功!"); 215 this.msgSuccess("上传成功!");
156 this.handleRemove(); 216 this.handleRemove();
157 this.close(); 217 this.close();
158 this.uploadType = true; 218 this.uploadType = true;
159 } else { 219 } else {
220 + this.errorData = arr;
221 + this.loadings.dialogLoading = false;
222 + }
223 + } else {
160 this.alertWarningMsg(res.message); 224 this.alertWarningMsg(res.message);
161 this.loadings.dialogLoading = false; 225 this.loadings.dialogLoading = false;
162 } 226 }
...@@ -268,4 +332,8 @@ export default { ...@@ -268,4 +332,8 @@ export default {
268 font-size: 20px; 332 font-size: 20px;
269 } 333 }
270 } 334 }
335 +
336 +.errorMessage {
337 + color: $fedexError;
338 +}
271 </style> 339 </style>
......
...@@ -26,73 +26,24 @@ ...@@ -26,73 +26,24 @@
26 <el-col :span="5"> 26 <el-col :span="5">
27 <!-- 订单编号 --> 27 <!-- 订单编号 -->
28 <Formitem label="订单编号" prop="orderNo"> 28 <Formitem label="订单编号" prop="orderNo">
29 - <el-select 29 + <el-input
30 type="text" 30 type="text"
31 + class="inputShadow"
31 id="inputInner--orderNo" 32 id="inputInner--orderNo"
33 + resize="none"
32 v-model="sreachFormData.orderNo" 34 v-model="sreachFormData.orderNo"
33 clearable 35 clearable
34 placeholder="" 36 placeholder=""
35 - > 37 + ></el-input>
36 - <el-option
37 - v-for="(item, index) in dictData.logisticsNo"
38 - :key="index"
39 - :label="item.name"
40 - :value="item.code"
41 - ></el-option>
42 - </el-select>
43 </Formitem> 38 </Formitem>
44 </el-col> 39 </el-col>
45 <el-col :span="5"> 40 <el-col :span="5">
46 <!-- 运单编号 --> 41 <!-- 运单编号 -->
47 <Formitem label="运单编号" prop="logisticsNo"> 42 <Formitem label="运单编号" prop="logisticsNo">
48 - <el-popover 43 + <FormTextareaInput
49 - placement="bottom" 44 + :formData="sreachFormData"
50 - width="320" 45 + dataKey="logisticsNo"
51 - trigger="manual" 46 + @formChange="formChange"
52 - popper-class="popoverlogisticsNo"
53 - v-model="textareaVisible.formItemlogisticsNo"
54 - >
55 - <el-input
56 - name="logisticsNo-textarea"
57 - type="textarea"
58 - :rows="5"
59 - id="popoverInputlogisticsNo"
60 - class="inputShadow textareaPopover"
61 - v-model="sreachFormData.logisticsNo"
62 - resize="none"
63 - maxlength="13000"
64 - placeholder=""
65 - @blur="textareaBlur"
66 - @input="input"
67 - ></el-input>
68 - <el-input
69 - slot="reference"
70 - name="logisticsNo"
71 - type="textarea"
72 - :rows="1"
73 - class="inputShadow"
74 - id="inputInner--logisticsNo"
75 - v-model="sreachFormData.logisticsNo"
76 - resize="none"
77 - placeholder=""
78 - @focus="textareaFocus"
79 - @input="input"
80 - ></el-input>
81 - </el-popover>
82 - <el-badge
83 - v-if="
84 - !textareaVisible.formItemlogisticsNo &&
85 - textareaLength({
86 - key: 'logisticsNo',
87 - value: sreachFormData.logisticsNo,
88 - }) > 1
89 - "
90 - type="info"
91 - :value="`+${textareaLength({
92 - key: 'logisticsNo',
93 - value: sreachFormData.logisticsNo,
94 - })}`"
95 - class="item texttareaTip"
96 /> 47 />
97 </Formitem> 48 </Formitem>
98 </el-col> 49 </el-col>
...@@ -138,9 +89,9 @@ ...@@ -138,9 +89,9 @@
138 </el-col> 89 </el-col>
139 </el-row> 90 </el-row>
140 <el-row class="backgroundRow"> 91 <el-row class="backgroundRow">
141 - <el-col :span="5"> 92 + <!-- <el-col :span="5"> -->
142 <!-- 回执类型 --> 93 <!-- 回执类型 -->
143 - <Formitem label="回执类型" prop="receiptType"> 94 + <!-- <Formitem label="回执类型" prop="receiptType">
144 <el-select 95 <el-select
145 type="text" 96 type="text"
146 id="inputInner--receiptType" 97 id="inputInner--receiptType"
...@@ -149,14 +100,14 @@ ...@@ -149,14 +100,14 @@
149 placeholder="" 100 placeholder=""
150 > 101 >
151 <el-option 102 <el-option
152 - v-for="(item, index) in dictData.receiptType" 103 + v-for="(item, index) in dictData.returnStatus"
153 :key="index" 104 :key="index"
154 :label="item.name" 105 :label="item.name"
155 :value="item.code" 106 :value="item.code"
156 ></el-option> 107 ></el-option>
157 </el-select> 108 </el-select>
158 - </Formitem> 109 + </Formitem> -->
159 - </el-col> 110 + <!-- </el-col> -->
160 <el-col :span="5"> 111 <el-col :span="5">
161 <!-- 回执状态 --> 112 <!-- 回执状态 -->
162 <Formitem label="回执状态" prop="receiptStatus"> 113 <Formitem label="回执状态" prop="receiptStatus">
...@@ -168,7 +119,7 @@ ...@@ -168,7 +119,7 @@
168 placeholder="" 119 placeholder=""
169 > 120 >
170 <el-option 121 <el-option
171 - v-for="(item, index) in dictData.receiptStatus" 122 + v-for="(item, index) in dictData.returnStatus"
172 :key="index" 123 :key="index"
173 :label="item.name" 124 :label="item.name"
174 :value="item.code" 125 :value="item.code"
...@@ -217,9 +168,9 @@ ...@@ -217,9 +168,9 @@
217 <el-dropdown-item :command="{ code: 'full', name: '一键申报' }" 168 <el-dropdown-item :command="{ code: 'full', name: '一键申报' }"
218 >一键申报</el-dropdown-item 169 >一键申报</el-dropdown-item
219 > 170 >
220 - <el-dropdown-item 171 + <el-dropdown-item :command="{ code: 'order', name: '订单申报' }"
221 - :command="{ code: 'order', name: '订单申报' }" 172 + >订单申报</el-dropdown-item
222 - >订单申报</el-dropdown-item> 173 + >
223 <el-dropdown-item :command="{ code: 'waybill', name: '物流单申报' }" 174 <el-dropdown-item :command="{ code: 'waybill', name: '物流单申报' }"
224 >物流单申报</el-dropdown-item 175 >物流单申报</el-dropdown-item
225 > 176 >
...@@ -274,80 +225,61 @@ ...@@ -274,80 +225,61 @@
274 :selected="selected" 225 :selected="selected"
275 > 226 >
276 <template v-slot:orderReceiptStatus="scope"> 227 <template v-slot:orderReceiptStatus="scope">
277 - <el-popover 228 + <TablePopover
278 - :popper-class="`poppercustoms${scope.row.consignmentId} portLogPopper`" 229 + dataKey="orderReceiptStatus"
279 - placement="left" 230 + :parentDom="$refs.entryTable"
280 - :visible-arrow="false" 231 + :receiptDataHead="receiptDataHead"
281 - title="" 232 + :rowData="scope.row"
282 - width="750" 233 + :tableData="tableData"
283 - trigger="manual" 234 + @popoverChange="popoverChange"
284 - v-model="scope.row.orderReceiptStatusPopoverType" 235 + @popoverClose="popoverClose"
285 > 236 >
286 - <div style="text-align: right"> 237 + <div slot="title">
287 - <i
288 - class="el-icon-close"
289 - style="cursor: pointer; font-size: 20px; font-weight: 700"
290 - @click.stop="popoverClose"
291 - ></i>
292 - </div>
293 - <div v-loading="scope.row.popoverLoading">
294 - <div>
295 <span style="font-weight: 700; color: #515a6e">订单编号:</span 238 <span style="font-weight: 700; color: #515a6e">订单编号:</span
296 >{{ scope.row.orderno }} 239 >{{ scope.row.orderno }}
297 </div> 240 </div>
298 - <Table 241 + <div slot="buttonLabel">
299 - ref="customsClearanceReceiptStatusTable" 242 + {{ scope.row.orderReceiptStatus }}
300 - class="fedexDetialTable mt20"
301 - :data="scope.row.orderReceiptStatusPopoverData"
302 - :headerData="receiptDataHead"
303 - :selection="false"
304 - :selectFixed="false"
305 - :order="false"
306 - :border="true"
307 - :rowSelectDataType="false"
308 - :loading="loadings.logTableLoading"
309 - :pagination="false"
310 - :page="1"
311 - :pageSizes="[20, 30, 50, 100]"
312 - :totalCount="0"
313 - :emptyText="$t('portEntry.emptyText')"
314 - height="350px"
315 - maxHeight="500px"
316 - rowKey="id"
317 - >
318 - <template v-slot:createTime="scoped">
319 - <span>{{ formatDate(scoped.row.createTime) }}</span>
320 - </template>
321 - </Table>
322 </div> 243 </div>
323 - <el-button 244 + </TablePopover>
324 - slot="reference"
325 - type="text"
326 - @click.stop="popoverChange(scope.row, 'orderReceiptStatus')"
327 - >{{
328 - scope.row.orderReceiptStatus == null ||
329 - scope.row.orderReceiptStatus == ""
330 - ? "-"
331 - : scope.row.orderReceiptStatus
332 - }}</el-button
333 - >
334 - </el-popover>
335 </template> 245 </template>
336 <template v-slot:logisticsReceiptStatus="scope"> 246 <template v-slot:logisticsReceiptStatus="scope">
337 - <span>{{ 247 + <TablePopover
338 - scope.row.orderReceiptStatus == null || 248 + dataKey="logisticsReceiptStatus"
339 - scope.row.orderReceiptStatus == "" 249 + :parentDom="$refs.entryTable"
340 - ? "-" 250 + :receiptDataHead="receiptDataHead"
341 - : scope.row.orderReceiptStatus 251 + :rowData="scope.row"
342 - }}</span> 252 + :tableData="tableData"
253 + @popoverChange="popoverChange"
254 + @popoverClose="popoverClose"
255 + >
256 + <div slot="title">
257 + <span style="font-weight: 700; color: #515a6e">订单编号:</span
258 + >{{ scope.row.orderno }}
259 + </div>
260 + <div slot="buttonLabel">
261 + {{ scope.row.logisticsReceiptStatus }}
262 + </div>
263 + </TablePopover>
343 </template> 264 </template>
344 <template v-slot:listReceiptStatus="scope"> 265 <template v-slot:listReceiptStatus="scope">
345 - <span>{{ 266 + <TablePopover
346 - scope.row.orderReceiptStatus == null || 267 + dataKey="listReceiptStatus"
347 - scope.row.orderReceiptStatus == "" 268 + :parentDom="$refs.entryTable"
348 - ? "-" 269 + :receiptDataHead="receiptDataHead"
349 - : scope.row.orderReceiptStatus 270 + :rowData="scope.row"
350 - }}</span> 271 + :tableData="tableData"
272 + @popoverChange="popoverChange"
273 + @popoverClose="popoverClose"
274 + >
275 + <div slot="title">
276 + <span style="font-weight: 700; color: #515a6e">订单编号:</span
277 + >{{ scope.row.orderno }}
278 + </div>
279 + <div slot="buttonLabel">
280 + {{ scope.row.listReceiptStatus }}
281 + </div>
282 + </TablePopover>
351 </template> 283 </template>
352 </Table> 284 </Table>
353 <DialogVue 285 <DialogVue
...@@ -464,16 +396,17 @@ export default { ...@@ -464,16 +396,17 @@ export default {
464 }, 396 },
465 ], 397 ],
466 selected: [], 398 selected: [],
467 - dictData: { 399 + // dictData: {
468 - logisticsNo: [], 400 + // logisticsNo: [],
469 - receiptStatus: [], 401 + // receiptStatus: [],
470 - receiptType: [], 402 + // receiptType: [],
471 - }, 403 + // },
472 loadings: { 404 loadings: {
473 templateLoading: false, 405 templateLoading: false,
474 sreachLoading: false, 406 sreachLoading: false,
475 dwonloadModelLoading: false, 407 dwonloadModelLoading: false,
476 dropDownLoading: false, 408 dropDownLoading: false,
409 + logTableLoading: false,
477 }, 410 },
478 textareaVisible: {}, 411 textareaVisible: {},
479 tableMaxheight: null, 412 tableMaxheight: null,
...@@ -530,6 +463,36 @@ export default { ...@@ -530,6 +463,36 @@ export default {
530 this.loadings.sreachLoading = false; 463 this.loadings.sreachLoading = false;
531 }); 464 });
532 }, 465 },
466 + //查询清关回执
467 + searchLog(data) {
468 + let arr = JSON.parse(JSON.stringify(data.tableData));
469 + if (data.type) {
470 + this.$refs.classCPortEntry.style.overflowY = "hidden";
471 + this.tableData = arr;
472 + if (data.status == "customs") {
473 + arr[data.data.idx][`${data.status}PopoverLoading`] = true;
474 + getClassCPortLog({ chmId: Number(data.data.consignmentId) })
475 + .then((res) => {
476 + if (res.code === "200") {
477 + arr[data.data.idx][`${data.status}PopoverData`] =
478 + this.logDataInfo(res.data.records);
479 + } else {
480 + this.alertWarningMsg(res.message);
481 + }
482 + arr[data.data.idx][`${data.status}PopoverLoading`] = false;
483 + this.tableData = arr;
484 + })
485 + .catch((err) => {
486 + console.log(err);
487 + arr[data.data.idx][`${data.status}PopoverLoading`] = false;
488 + this.tableData = arr;
489 + });
490 + }
491 + } else {
492 + this.$refs.classCPortEntry.style.overflowY = "auto";
493 + this.tableData = arr;
494 + }
495 + },
533 //重置数据 496 //重置数据
534 clear() { 497 clear() {
535 this.sreachFormData = { 498 this.sreachFormData = {
...@@ -564,7 +527,7 @@ export default { ...@@ -564,7 +527,7 @@ export default {
564 downloadData() {}, 527 downloadData() {},
565 //申报 528 //申报
566 declareData() { 529 declareData() {
567 - if(this.selected.length > 0){ 530 + if (this.selected.length > 0) {
568 this.loadings.dropDownLoading = true; 531 this.loadings.dropDownLoading = true;
569 let obj = { 532 let obj = {
570 declareIds: [], 533 declareIds: [],
...@@ -586,8 +549,8 @@ export default { ...@@ -586,8 +549,8 @@ export default {
586 console.log(err); 549 console.log(err);
587 this.loadings.dropDownLoading = false; 550 this.loadings.dropDownLoading = false;
588 }); 551 });
589 - }else{ 552 + } else {
590 - this.alertWarningMsg('请选择数据!') 553 + this.alertWarningMsg("请选择数据!");
591 } 554 }
592 }, 555 },
593 //切换申报模式 556 //切换申报模式
...@@ -601,7 +564,10 @@ export default { ...@@ -601,7 +564,10 @@ export default {
601 } 564 }
602 this.outerVisible = false; 565 this.outerVisible = false;
603 }, 566 },
604 - //弹框关闭 567 + popoverChange(val) {
568 + this.tableData = val.tableData;
569 + console.log(this.tableData);
570 + },
605 popoverClose(val) { 571 popoverClose(val) {
606 this.tableData.forEach((item) => { 572 this.tableData.forEach((item) => {
607 item.popoverLoading = false; 573 item.popoverLoading = false;
...@@ -615,62 +581,6 @@ export default { ...@@ -615,62 +581,6 @@ export default {
615 this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY = 581 this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
616 "auto"; 582 "auto";
617 }, 583 },
618 - //弹框状态改版
619 - popoverChange(data, type) {
620 - this.popoverClose(type);
621 - let arr = JSON.parse(JSON.stringify(this.tableData));
622 - arr.forEach((item) => {
623 - item[`${type}PopoverData`] = [];
624 - if (data.declareId != item.declareId) {
625 - item[`${type}PopoverLoading`] = false;
626 - item[`${type}PopoverType`] = false;
627 - } else {
628 - item[`${type}PopoverLoading`] = true;
629 - item[`${type}PopoverType`] = !JSON.parse(
630 - JSON.stringify(item[`${type}PopoverType`])
631 - );
632 - }
633 - });
634 - if (!data[`${type}PopoverType`]) {
635 - this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
636 - "hidden";
637 - } else {
638 - this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
639 - "auto";
640 - }
641 - // this.searchLog({
642 - // tableData: arr,
643 - // data: data,
644 - // type: !data[`${type}PopoverType`],
645 - // status: type,
646 - // });
647 - this.$nextTick(() => {
648 - document.getElementsByClassName("el-table__row").forEach((dom1, i) => {
649 - if (i == data.idx) {
650 - dom1.classList.add("activeRow");
651 - } else {
652 - dom1.classList.remove("hover-row");
653 - dom1.classList.remove("activeRow");
654 - }
655 - });
656 - let interval = setInterval(() => {
657 - if (
658 - document.getElementsByClassName(`popper${type}${data.declareId}`)
659 - .length == 1
660 - ) {
661 - clearInterval(interval);
662 - }
663 - document
664 - .getElementsByClassName(`popper${type}${data.declareId}`)
665 - .forEach((dom, index) => {
666 - if (index > 0) {
667 - dom.style.display = "none";
668 - dom.remove();
669 - }
670 - });
671 - }, 100);
672 - });
673 - },
674 tableSelect(val) { 584 tableSelect(val) {
675 this.selected = val.selection; 585 this.selected = val.selection;
676 }, 586 },
...@@ -686,67 +596,11 @@ export default { ...@@ -686,67 +596,11 @@ export default {
686 this.page.pageSize = val; 596 this.page.pageSize = val;
687 this.search(1); 597 this.search(1);
688 }, 598 },
689 - cellClick() {}, 599 + cellClick() {
690 - //文本域展示状态切换 600 + this.popoverClose();
691 - textareaFocus(val) {
692 - this.textareaVisible["formItem" + val.target.name.split("-")[0]] = true;
693 - this.$nextTick(() => {
694 - document
695 - .querySelector("#popoverInput" + val.target.name.split("-")[0])
696 - .focus();
697 - document.querySelector(
698 - "#inputInner--" + val.target.name.split("-")[0]
699 - ).style.display = "none";
700 - });
701 }, 601 },
702 - textareaBlur(val) { 602 + formChange(val) {
703 - let inputInner = document.querySelector( 603 + this.sreachFormData = val;
704 - "#inputInner--" + val.target.name.split("-")[0]
705 - );
706 - this.textareaVisible["formItem" + val.target.name.split("-")[0]] = false;
707 - inputInner.style.display = "block";
708 - this.$nextTick(() => {
709 - inputInner.blur();
710 - if (
711 - inputInner.value != undefined &&
712 - inputInner.value != "" &&
713 - inputInner.value != null
714 - ) {
715 - inputInner.classList.add("inputFocus");
716 - } else {
717 - inputInner.classList.remove("inputFocus");
718 - }
719 - });
720 - let arr = [];
721 - this.sreachFormData[val.target.name.split("-")[0]]
722 - .replace(/[\n\,\;\;]/g, ",")
723 - .replace(/[\t]/g, "")
724 - .split(",")
725 - .forEach((str, index) => {
726 - if (str != null && str != "" && index <= 1000) {
727 - arr.push(str.trim());
728 - }
729 - });
730 - this.sreachFormData[val.target.name.split("-")[0]] = arr.join("\n");
731 - this.$forceUpdate();
732 - },
733 - //文本域输入内容数量处理
734 - textareaLength(val) {
735 - if (val.value != "" && val.value != null) {
736 - let arr = [];
737 - val.value
738 - .trim()
739 - .replace(/[\n\,\;\;]/g, ",")
740 - .split(",")
741 - .forEach((item) => {
742 - if (item != "" && item != null) {
743 - arr.push(item);
744 - }
745 - });
746 - return arr.length;
747 - } else {
748 - return 0;
749 - }
750 }, 604 },
751 input() { 605 input() {
752 this.$forceUpdate(); 606 this.$forceUpdate();
......
...@@ -178,6 +178,7 @@ export default { ...@@ -178,6 +178,7 @@ export default {
178 dialogClose() { 178 dialogClose() {
179 this.outerVisible = false; 179 this.outerVisible = false;
180 this.activeData = null; 180 this.activeData = null;
181 + this.search(1);
181 }, 182 },
182 //分页 183 //分页
183 currentChange(val) { 184 currentChange(val) {
......