Elements-SY

modify

...@@ -10,9 +10,9 @@ export function findHsCodeList(data) { ...@@ -10,9 +10,9 @@ export function findHsCodeList(data) {
10 } 10 }
11 11
12 // HScode黑名单删除 12 // HScode黑名单删除
13 -export function delBlackList(data) { 13 +export function delHsCodeListList(data) {
14 return request({ 14 return request({
15 - url: "/etes/delBlackList", 15 + url: "/etes/delHsCodeListList",
16 method: "post", 16 method: "post",
17 data: data, 17 data: data,
18 }); 18 });
......
...@@ -19,9 +19,9 @@ export function uploadShipmentDesc(data) { ...@@ -19,9 +19,9 @@ export function uploadShipmentDesc(data) {
19 } 19 }
20 20
21 // HScode黑名单/英文品名删除 21 // HScode黑名单/英文品名删除
22 -export function delBlackList(data) { 22 +export function delShipmentDescList(data) {
23 return request({ 23 return request({
24 - url: "/etes/delBlackList ", 24 + url: "/etes/delShipmentDescList ",
25 method: "post", 25 method: "post",
26 data: data, 26 data: data,
27 }); 27 });
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
45 <!-- 输入框 --> 45 <!-- 输入框 -->
46 <el-input 46 <el-input
47 v-if="item.type === 'Input'" 47 v-if="item.type === 'Input'"
48 - v-model.trim="tempQueryForm[item.prop]" 48 + v-model="tempQueryForm[item.prop]"
49 :style="{ width: item.inputWidth }" 49 :style="{ width: item.inputWidth }"
50 :disabled="item.disable" 50 :disabled="item.disable"
51 :placeholder=" 51 :placeholder="
......
1 - <template> 1 +<template>
2 <div class="table-container"> 2 <div class="table-container">
3 <el-row 3 <el-row
4 v-if="attrs.btnCofig.isBtn" 4 v-if="attrs.btnCofig.isBtn"
...@@ -161,6 +161,7 @@ export default { ...@@ -161,6 +161,7 @@ export default {
161 // this.columns 161 // this.columns
162 } 162 }
163 }, 163 },
164 +
164 mounted() { 165 mounted() {
165 //阻止火狐拖拽新建新页面 166 //阻止火狐拖拽新建新页面
166 document.body.addEventListener( 167 document.body.addEventListener(
...@@ -171,14 +172,8 @@ export default { ...@@ -171,14 +172,8 @@ export default {
171 }, 172 },
172 false 173 false
173 ); 174 );
174 - if (this.tableData.length) { 175 + this.getTrCurrentHeight();
175 - this.getTrCurrentHeight(); 176 + window.addEventListener("resize", this.getTrCurrentHeight);
176 - window.addEventListener("resize", this.getTrCurrentHeight);
177 - // 拖拽行更新排序
178 - // this.rowDrop();
179 - // 拖拽列更新排序
180 - this.columnDrop();
181 - }
182 }, 177 },
183 destroyed() { 178 destroyed() {
184 if (this.tableData.length) { 179 if (this.tableData.length) {
...@@ -281,22 +276,31 @@ export default { ...@@ -281,22 +276,31 @@ export default {
281 this.useTableFunc("doLayout"); 276 this.useTableFunc("doLayout");
282 }); 277 });
283 }, 278 },
279 + tableData() {
280 + if (this.tableData.length && this.attrs.isDragSort) {
281 + // 拖拽行更新排序
282 + // this.rowDrop();
283 + // 拖拽列更新排序
284 + this.columnDrop();
285 + }
286 + },
284 }, 287 },
285 }; 288 };
286 </script> 289 </script>
287 <style lang="scss"> 290 <style lang="scss">
288 - .el-table { 291 +.el-table {
289 - th { 292 + th {
290 - padding: 0; 293 + padding: 0;
291 - }
292 - td{
293 - padding: 0;
294 - }
295 - }
296 - .first-span,.span{
297 - display: inline-block;
298 } 294 }
299 - .span{ 295 + td {
300 - margin-left: 6px; 296 + padding: 0;
301 } 297 }
298 +}
299 +.first-span,
300 +.span {
301 + display: inline-block;
302 +}
303 +.span {
304 + margin-left: 6px;
305 +}
302 </style> 306 </style>
......
...@@ -21,19 +21,265 @@ export const inputBlurValidate = { ...@@ -21,19 +21,265 @@ export const inputBlurValidate = {
21 }, 21 },
22 // 最小重量失焦事件 22 // 最小重量失焦事件
23 inputBlurMinWeight({ target }) { 23 inputBlurMinWeight({ target }) {
24 - this.validateWeight(target.value, "minWeight"); 24 + // 重量最小值和最大值都为空的情况下
25 + if (this.queryForm.minWeight == "" && this.queryForm.maxWeight == "") {
26 + this.validateForm = true;
27 + this.$refs.minWeight.innerHTML = "";
28 + }
29 + // 鼠标聚焦最小重量,最小重量无值的情况下去校验最大重量
30 + if (target.value == "" && this.queryForm.maxWeight) {
31 + if (
32 + /^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm.maxWeight))
33 + ) {
34 + this.validateForm = true;
35 + this.$refs.minWeight.innerHTML = "";
36 + }
37 + }
38 + // 最小重量有值的情况下
39 + if (target.value && Number(target.value) >= 0) {
40 + if (
41 + /^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm.maxWeight))
42 + ) {
43 + this.validateForm = true;
44 + this.$refs.minWeight.innerHTML = "";
45 + } else {
46 + this.validateForm = false;
47 + this.$refs.minWeight.innerHTML = "请输入有效重量,小数保留5位";
48 + // this.msgError("请输入有效重量,小数保留5位");
49 + }
50 + if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(target.value))) {
51 + this.validateForm = true;
52 + this.$refs.minWeight.innerHTML = "";
53 + } else {
54 + this.validateForm = false;
55 + this.$refs.minWeight.innerHTML = "请输入有效重量,小数保留5位";
56 + // this.msgError("请输入有效重量,小数保留5位");
57 + }
58 + }
59 + // 重量最小值和最大值都不为空的情况下
60 + if (this.queryForm.minWeight && this.queryForm.maxWeight) {
61 + if (
62 + Number(this.queryForm.maxWeight) < Number(this.queryForm.minWeight)
63 + ) {
64 + this.validateForm = false;
65 + this.$refs.minWeight.innerHTML = "最小重量不得大于最大重量";
66 + // this.msgError("最小重量不得大于最大重量");
67 + }
68 + }
25 }, 69 },
26 // 最大重量失焦事件 70 // 最大重量失焦事件
27 inputBlurMaxWeight({ target }) { 71 inputBlurMaxWeight({ target }) {
28 - this.validateWeight(target.value, "maxWeight"); 72 + // 重量最小值和最大值都为空的情况下
73 + if (this.queryForm.minWeight == "" && this.queryForm.maxWeight == "") {
74 + this.validateForm = true;
75 + this.$refs.minWeight.innerHTML = "";
76 + }
77 + // 鼠标聚焦最大重量,最大重量无值的情况下去校验最小重量
78 + if (target.value == "" && this.queryForm.minWeight) {
79 + if (
80 + /^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm.minWeight))
81 + ) {
82 + this.validateForm = true;
83 + this.$refs.minWeight.innerHTML = "";
84 + } else {
85 + this.validateForm = false;
86 + this.$refs.minWeight.innerHTML = "请输入有效重量,小数保留5位";
87 + // this.msgError("请输入有效重量,小数保留5位");
88 + }
89 + }
90 + // 最大重量有值的情况下
91 + if (target.value && Number(target.value) >= 0) {
92 + if (
93 + /^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm.minWeight))
94 + ) {
95 + this.validateForm = true;
96 + this.$refs.minWeight.innerHTML = "";
97 + } else {
98 + this.validateForm = false;
99 + this.$refs.minWeight.innerHTML = "请输入有效重量,小数保留5位";
100 + // this.msgError("请输入有效重量,小数保留5位");
101 + }
102 + if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(target.value))) {
103 + this.validateForm = true;
104 + this.$refs.minWeight.innerHTML = "";
105 + } else {
106 + this.validateForm = false;
107 + this.$refs.minWeight.innerHTML = "请输入有效重量,小数保留5位";
108 + // this.msgError("请输入有效重量,小数保留5位");
109 + }
110 + }
111 + // 重量最小值和最大值都不为空的情况下
112 + if (this.queryForm.minWeight && this.queryForm.maxWeight) {
113 + if (
114 + Number(this.queryForm.maxWeight) < Number(this.queryForm.minWeight)
115 + ) {
116 + this.validateForm = false;
117 + this.$refs.minWeight.innerHTML = "最小重量不得大于最大重量";
118 + // this.msgError("最小重量不得大于最大重量");
119 + }
120 + }
121 + },
122 + // 人民币最小申报价值
123 + inputCNYBlurMin({ target }, customVal) {
124 + // 申报价值最小值和最大值都为空的情况下
125 + if (this.queryForm.minCustomVal == "" && this.queryForm.maxCustomVal == "") {
126 + this.validateForm = true;
127 + this.$refs.minCNYCustomVal.innerHTML = "";
128 + }
129 + // 鼠标聚焦最小申报价值,最小申报价值无值的情况下去校验最大申报价值
130 + if (target.value == "" && this.queryForm.maxCustomVal) {
131 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.maxCustomVal))) {
132 + this.validateForm = true;
133 + this.$refs.minCNYCustomVal.innerHTML = "";
134 + }
135 + }
136 + // 最小申报价值有值的情况下
137 + if (target.value && Number(target.value) >= 0) {
138 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.maxCustomVal))) {
139 + this.validateForm = true;
140 + this.$refs.minCNYCustomVal.innerHTML = "";
141 + } else {
142 + this.validateForm = false;
143 + this.$refs.minCNYCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
144 + }
145 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(target.value))) {
146 + this.validateForm = true;
147 + this.$refs.minCNYCustomVal.innerHTML = "";
148 + } else {
149 + this.validateForm = false;
150 + this.$refs.minCNYCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
151 + }
152 + }
153 + // 申报价值最小值和最大值都不为空的情况下
154 + if (this.queryForm.minCustomVal && this.queryForm.maxCustomVal) {
155 + if (Number(this.queryForm.maxCustomVal) < Number(this.queryForm.minCustomVal)) {
156 + this.validateForm = false;
157 + this.$refs.minCNYCustomVal.innerHTML = "最小申报价值不得大于最大申报价值";
158 + }
159 + }
160 + },
161 + // 人民币最大申报价值
162 + inputCNYBlurMax({ target }, customVal) {
163 + // 申报价值最小值和最大值都为空的情况下
164 + if (this.queryForm.minCustomVal == "" && this.queryForm.maxCustomVal == "") {
165 + this.validateForm = true;
166 + this.$refs.minCNYCustomVal.innerHTML = "";
167 + }
168 + // 鼠标聚焦最大申报价值,最大申报价值无值的情况下去校验最小申报价值
169 + if (target.value == "" && this.queryForm.minCustomVal) {
170 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.minCustomVal))) {
171 + this.validateForm = true;
172 + this.$refs.minCNYCustomVal.innerHTML = "";
173 + } else {
174 + this.validateForm = false;
175 + this.$refs.minCNYCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
176 + }
177 + }
178 + // 最大申报价值有值的情况下
179 + if (target.value && Number(target.value) >= 0) {
180 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.minCustomVal))) {
181 + this.validateForm = true;
182 + this.$refs.minCNYCustomVal.innerHTML = "";
183 + } else {
184 + this.validateForm = false;
185 + this.$refs.minCNYCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
186 + }
187 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(target.value))) {
188 + this.validateForm = true;
189 + this.$refs.minCNYCustomVal.innerHTML = "";
190 + } else {
191 + this.validateForm = false;
192 + this.$refs.minCNYCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
193 + }
194 + }
195 + // 申报价值最小值和最大值都不为空的情况下
196 + if (this.queryForm.minCustomVal && this.queryForm.maxCustomVal) {
197 + if (Number(this.queryForm.maxCustomVal) < Number(this.queryForm.minCustomVal)) {
198 + this.validateForm = false;
199 + this.$refs.minCNYCustomVal.innerHTML = "最小申报价值不得大于最大申报价值";
200 + }
201 + }
29 }, 202 },
30 - // 最小申报价值 203 + // 美元最小申报价值
31 - inputBlurMin({ target }, customVal) { 204 + inputSUDBlurMin({ target }, customVal) {
32 - this.validateCustomVal(target.value, customVal); 205 + // 申报价值最小值和最大值都为空的情况下
206 + if (this.queryForm.minUsdCustomVal == "" && this.queryForm.maxUsdCustomVal == "") {
207 + this.validateForm = true;
208 + this.$refs.minSUDCustomVal.innerHTML = "";
209 + }
210 + // 鼠标聚焦最小申报价值,最小申报价值无值的情况下去校验最大申报价值
211 + if (target.value == "" && this.queryForm.maxUsdCustomVal) {
212 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.maxUsdCustomVal))) {
213 + this.validateForm = true;
214 + this.$refs.minSUDCustomVal.innerHTML = "";
215 + }
216 + }
217 + // 最小申报价值有值的情况下
218 + if (target.value && Number(target.value) >= 0) {
219 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.maxUsdCustomVal))) {
220 + this.validateForm = true;
221 + this.$refs.minSUDCustomVal.innerHTML = "";
222 + } else {
223 + this.validateForm = false;
224 + this.$refs.minSUDCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
225 + }
226 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(target.value))) {
227 + this.validateForm = true;
228 + this.$refs.minSUDCustomVal.innerHTML = "";
229 + } else {
230 + this.validateForm = false;
231 + this.$refs.minSUDCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
232 + }
233 + }
234 + // 申报价值最小值和最大值都不为空的情况下
235 + if (this.queryForm.minUsdCustomVal && this.queryForm.maxUsdCustomVal) {
236 + if (Number(this.queryForm.maxUsdCustomVal) < Number(this.queryForm.minUsdCustomVal)) {
237 + this.validateForm = false;
238 + this.$refs.minSUDCustomVal.innerHTML = "最小申报价值不得大于最大申报价值";
239 + }
240 + }
33 }, 241 },
34 - // 最大申报价值 242 + // 美元最大申报价值
35 - inputBlurMax({ target }, customVal) { 243 + inputSUDBlurMax({ target }, customVal) {
36 - this.validateCustomVal(target.value, customVal); 244 + // 申报价值最小值和最大值都为空的情况下
245 + if (this.queryForm.minUsdCustomVal == "" && this.queryForm.maxUsdCustomVal == "") {
246 + this.validateForm = true;
247 + this.$refs.minSUDCustomVal.innerHTML = "";
248 + }
249 + // 鼠标聚焦最大申报价值,最大申报价值无值的情况下去校验最小申报价值
250 + if (target.value == "" && this.queryForm.minUsdCustomVal) {
251 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.minUsdCustomVal))) {
252 + this.validateForm = true;
253 + this.$refs.minSUDCustomVal.innerHTML = "";
254 + } else {
255 + this.validateForm = false;
256 + this.$refs.minSUDCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
257 + }
258 + }
259 + // 最大申报价值有值的情况下
260 + if (target.value && Number(target.value) >= 0) {
261 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm.minUsdCustomVal))) {
262 + this.validateForm = true;
263 + this.$refs.minSUDCustomVal.innerHTML = "";
264 + } else {
265 + this.validateForm = false;
266 + this.$refs.minSUDCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
267 + }
268 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(target.value))) {
269 + this.validateForm = true;
270 + this.$refs.minSUDCustomVal.innerHTML = "";
271 + } else {
272 + this.validateForm = false;
273 + this.$refs.minSUDCustomVal.innerHTML = "请输入有效申报价值,小数保留2位";
274 + }
275 + }
276 + // 申报价值最小值和最大值都不为空的情况下
277 + if (this.queryForm.minUsdCustomVal && this.queryForm.maxUsdCustomVal) {
278 + if (Number(this.queryForm.maxUsdCustomVal) < Number(this.queryForm.minUsdCustomVal)) {
279 + this.validateForm = false;
280 + this.$refs.minSUDCustomVal.innerHTML = "最小申报价值不得大于最大申报价值";
281 + }
282 + }
37 }, 283 },
38 // 校验件数方法 【件数可以为空但件数不得为0】只能输入正整数 284 // 校验件数方法 【件数可以为空但件数不得为0】只能输入正整数
39 validateNumOfPieces(value, pieces) { 285 validateNumOfPieces(value, pieces) {
...@@ -151,170 +397,5 @@ export const inputBlurValidate = { ...@@ -151,170 +397,5 @@ export const inputBlurValidate = {
151 } 397 }
152 return this.validateForm; 398 return this.validateForm;
153 }, 399 },
154 - // 校验重量方法 【重量可以为空为0 && 最小/大重量的范围0~34KG】允许保留1~5位小数。
155 - validateWeight(value, weight) {
156 - if (value.length) {
157 - this.queryForm[weight] = Number(value);
158 - let markWeight = false;
159 - if (weight == "minWeight" || weight == "maxWeight") {
160 - if (this.queryForm.minWeight && this.queryForm.maxWeight) {
161 - markWeight =
162 - Number(this.queryForm.maxWeight) <
163 - Number(this.queryForm.minWeight);
164 - }
165 - }
166 - if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(this.queryForm[weight])) {
167 - if (this.queryForm[weight] >= 0) {
168 - if (markWeight) {
169 - if (Array.isArray(this.$refs.minWeight)) {
170 - this.validateForm = false;
171 - this.msgError("最小重量不得大于最大重量");
172 - } else {
173 - this.validateForm = false;
174 - this.$refs.minWeight.innerHTML = "";
175 - this.$refs.minWeight.innerHTML = "最小重量不得大于最大重量";
176 - }
177 - }
178 - // else if (this.queryForm[weight] > 34) {
179 - // this.validateForm = false;
180 - // if (Array.isArray(this.$refs.minWeight)) {
181 - // this.msgError("最大重量不能大于34KG");
182 - // } else {
183 - // this.validateForm = false;
184 - // this.$refs.minWeight.innerHTML = "";
185 - // this.$refs.minWeight.innerHTML = "最大重量不能大于34KG";
186 - // }
187 - // }
188 - else {
189 - if (!Array.isArray(this.$refs.minWeight)) {
190 - this.validateForm = true;
191 - this.$refs.minWeight.innerHTML = "";
192 - }
193 - }
194 - } else {
195 - if (value.length) {
196 - if (Number(value) > 34) {
197 - if (Array.isArray(this.$refs.minWeight)) {
198 - this.validateForm = false;
199 - this.msgError("最大重量不能大于34KG");
200 - } else {
201 - this.validateForm = false;
202 - this.$refs.minWeight.innerHTML = "";
203 - this.$refs.minWeight.innerHTML = "最大重量不能大于34KG";
204 - }
205 - } else {
206 - if (!Array.isArray(this.$refs.minWeight)) {
207 - this.validateForm = true;
208 - this.$refs.minWeight.innerHTML = "";
209 - }
210 - }
211 - }
212 - }
213 - } else {
214 - if (Array.isArray(this.$refs.minWeight)) {
215 - this.validateForm = false;
216 - this.msgError("请输入正整数,小数保留5位");
217 - } else {
218 - this.queryForm[weight] = value;
219 - this.validateForm = false;
220 - this.$refs.minWeight.innerHTML = "";
221 - this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位";
222 - }
223 - }
224 - } else {
225 - this.validateForm = true;
226 - this.$refs.minWeight.innerHTML = "";
227 - }
228 - return this.validateForm;
229 - },
230 - // 报价值【申报价值可以为空为0】
231 - validateCustomVal(value, customVal) {
232 - // 先判断输入的值是否符合符合规则,再判断申报价值区间
233 - let coin = {
234 - minCNYCustomVal: "minCNYCustomVal",
235 - maxCNYCustomVal: "minCNYCustomVal",
236 - minSUDCustomVal: "minSUDCustomVal",
237 - maxSUDCustomVal: "minSUDCustomVal",
238 - };
239 - // 区间范围
240 - let currency = {
241 - minCNYCustomVal: 2000,
242 - maxCNYCustomVal: 2000,
243 - minSUDCustomVal: 600,
244 - maxSUDCustomVal: 600,
245 - };
246 - if (value.length) {
247 - this[customVal] = Number(value);
248 - if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this[customVal])) {
249 - // 其中一个有值的情况下人民币
250 - if (
251 - customVal == "minCNYCustomVal" ||
252 - customVal == "maxCNYCustomVal"
253 - ) {
254 - // 如果人民币两个都有值的情况下
255 - if (this.minCNYCustomVal && this.maxCNYCustomVal) {
256 - // 判断右区间是否大于左区间
257 - if (Number(this.maxCNYCustomVal) < Number(this.minCNYCustomVal)) {
258 - this.$refs[coin[customVal]].innerHTML =
259 - "最小申报价值不得大于最大申报价值";
260 - this.validateForm = false;
261 - } else {
262 - this.$refs[coin[customVal]].innerHTML = "";
263 - this.validateForm = true;
264 - }
265 - } else {
266 - this.$refs[coin[customVal]].innerHTML = "";
267 - this.validateForm = true;
268 - }
269 - // 如果人民币其中任何一个有值,去判断美元是否有值,如果有值把美元值清空
270 - if (this.minCNYCustomVal || this.maxCNYCustomVal) {
271 - if (this.minSUDCustomVal || this.maxSUDCustomVal) {
272 - this.$refs.minSUDCustomVal.innerHTML = "";
273 - this.validateForm = true;
274 - this.minSUDCustomVal = this.maxSUDCustomVal = "";
275 - }
276 - }
277 - }
278 - // 其中一个有值的情况下美元
279 - if (
280 - customVal == "minSUDCustomVal" ||
281 - customVal == "maxSUDCustomVal"
282 - ) {
283 - // 如果美元两个都有值的情况下
284 - if (this.minSUDCustomVal && this.maxSUDCustomVal) {
285 - // 判断右区间是否大于左区间
286 - if (Number(this.maxSUDCustomVal) < Number(this.minSUDCustomVal)) {
287 - this.$refs[coin[customVal]].innerHTML =
288 - "最小申报价值不得大于最大申报价值";
289 - this.validateForm = false;
290 - } else {
291 - this.$refs[coin[customVal]].innerHTML = "";
292 - this.validateForm = true;
293 - }
294 - } else {
295 - this.$refs[coin[customVal]].innerHTML = "";
296 - this.validateForm = true;
297 - }
298 - // 如果美元其中任何一个有值,去判断人民币是否有值,如果有值把人民币值清空
299 - if (this.minSUDCustomVal || this.maxSUDCustomVal) {
300 - if (this.minCNYCustomVal || this.maxCNYCustomVal) {
301 - this.$refs.minCNYCustomVal.innerHTML = "";
302 - this.validateForm = true;
303 - this.minCNYCustomVal = this.maxCNYCustomVal = "";
304 - }
305 - }
306 - }
307 - } else {
308 - this[customVal] = value;
309 - this.validateForm = false;
310 - this.$refs[coin[customVal]].innerHTML = "";
311 - this.$refs[coin[customVal]].innerHTML = "请输入正确申报价值";
312 - }
313 - } else {
314 - this.validateForm = true;
315 - this.$refs[coin[customVal]].innerHTML = "";
316 - }
317 - return this.validateForm;
318 - },
319 }, 400 },
320 }; 401 };
......
...@@ -546,6 +546,9 @@ export default { ...@@ -546,6 +546,9 @@ export default {
546 ) { 546 ) {
547 // 航班配舱设置非日期级别情况下 547 // 航班配舱设置非日期级别情况下
548 return true; 548 return true;
549 + } else if (item.status == "1" && this.$route.query.dataStatus == "add") {
550 + // 添加航班配舱设置非日期级别情况下
551 + return true;
549 } else if (item.status == "2") { 552 } else if (item.status == "2") {
550 return true; 553 return true;
551 } else { 554 } else {
......
...@@ -280,7 +280,7 @@ export default { ...@@ -280,7 +280,7 @@ export default {
280 }, 280 },
281 // 保存 281 // 保存
282 saveSubmit(item, index) { 282 saveSubmit(item, index) {
283 - item.flightRoute = item.route; 283 + item.flightRoute = item.route || item.flightRoute;
284 let parmas = JSON.parse(JSON.stringify(item)); 284 let parmas = JSON.parse(JSON.stringify(item));
285 this.returnString(parmas, "cargoType"); 285 this.returnString(parmas, "cargoType");
286 this.returnString(parmas, "typeOfGoods"); 286 this.returnString(parmas, "typeOfGoods");
...@@ -289,11 +289,7 @@ export default { ...@@ -289,11 +289,7 @@ export default {
289 this.returnString(parmas, "handlingCode"); 289 this.returnString(parmas, "handlingCode");
290 this.returnString(parmas, "subCategory"); 290 this.returnString(parmas, "subCategory");
291 if (parmas.minWeight || parmas.maxWeight) { 291 if (parmas.minWeight || parmas.maxWeight) {
292 - if ( 292 + if (!/^(0|[1-9]\d*)(.\d{1,5})?$/.test(parmas.minWeight || parmas.maxWeight)) {
293 - !/^(0|[1-9]\d*)(.\d{1,5})?$/.test(
294 - parmas.minWeight || parmas.maxWeight
295 - )
296 - ) {
297 this.msgWarning("请输入有效重量,小数保留5位"); 293 this.msgWarning("请输入有效重量,小数保留5位");
298 return; 294 return;
299 } 295 }
...@@ -336,7 +332,8 @@ export default { ...@@ -336,7 +332,8 @@ export default {
336 ]; 332 ];
337 let validate = keys.some((key) => parmas[key]); 333 let validate = keys.some((key) => parmas[key]);
338 if (validate) { 334 if (validate) {
339 - this.loading = true; 335 + // this.loading = true;
336 + if(parmas.flightRoute == null)return
340 updateOrAddFlight(parmas) 337 updateOrAddFlight(parmas)
341 .then((res) => { 338 .then((res) => {
342 const { code, msg, data } = res; 339 const { code, msg, data } = res;
......
...@@ -369,16 +369,15 @@ ...@@ -369,16 +369,15 @@
369 @blur="blurRoute" 369 @blur="blurRoute"
370 :loading="routeLoading" 370 :loading="routeLoading"
371 :multiple="true" 371 :multiple="true"
372 - :key="routeMultiple"
373 > 372 >
374 <el-option 373 <el-option
375 v-for="item in routeList" 374 v-for="item in routeList"
376 - :key="item.id" 375 + :key="item.route"
377 :label="item.route" 376 :label="item.route"
378 - :value="item.isEtesRoute" 377 + :value="item.route"
379 > 378 >
380 <span style="float: left">{{ item.route }}</span> 379 <span style="float: left">{{ item.route }}</span>
381 - <span style="float: right; color: #8492a6; font-size: 13px">{{ 380 + <span style="float: right; margin-right: 30px; color: #8492a6; font-size: 13px">{{
382 item.isEtesRoute == 'Y' ? '(ET86)' : '' 381 item.isEtesRoute == 'Y' ? '(ET86)' : ''
383 }}</span> 382 }}</span>
384 </el-option> 383 </el-option>
...@@ -395,16 +394,15 @@ ...@@ -395,16 +394,15 @@
395 @blur="blurRoute" 394 @blur="blurRoute"
396 :loading="routeLoading" 395 :loading="routeLoading"
397 :multiple="false" 396 :multiple="false"
398 - :key="routeMultiple"
399 > 397 >
400 <el-option 398 <el-option
401 v-for="item in routeList" 399 v-for="item in routeList"
402 :key="item.id" 400 :key="item.id"
403 :label="item.route" 401 :label="item.route"
404 - :value="item.isEtesRoute" 402 + :value="item.route"
405 > 403 >
406 <span style="float: left">{{ item.route }}</span> 404 <span style="float: left">{{ item.route }}</span>
407 - <span style="float: right; color: #8492a6; font-size: 13px">{{ 405 + <span style="float: right; margin-right: 30px; color: #8492a6; font-size: 13px">{{
408 item.isEtesRoute == 'Y' ? '(ET86)' : '' 406 item.isEtesRoute == 'Y' ? '(ET86)' : ''
409 }}</span> 407 }}</span>
410 </el-option> 408 </el-option>
......
...@@ -38,7 +38,7 @@ import { tableAttr, columnHeader } from "./tableConfig"; ...@@ -38,7 +38,7 @@ import { tableAttr, columnHeader } from "./tableConfig";
38 import { restTableHeight } from "@/utils"; 38 import { restTableHeight } from "@/utils";
39 import { 39 import {
40 findHsCodeList, // ShipmentDesc查询 40 findHsCodeList, // ShipmentDesc查询
41 - delBlackList, // ShipmentDesc删除 41 + delHsCodeListList, // ShipmentDesc删除
42 downLoadTemplate, // ShipmentDesc下载模板 42 downLoadTemplate, // ShipmentDesc下载模板
43 uploadHsCode, // ShipmentDesc导入 43 uploadHsCode, // ShipmentDesc导入
44 } from "@/api/et86HsCodeBlack"; 44 } from "@/api/et86HsCodeBlack";
...@@ -105,8 +105,8 @@ export default { ...@@ -105,8 +105,8 @@ export default {
105 .catch(() => {}); 105 .catch(() => {});
106 }, 106 },
107 // 删除黑名单 107 // 删除黑名单
108 - toDelBlackList(params) { 108 + toDelHsCodeListList(params) {
109 - delBlackList(params) 109 + delHsCodeListList(params)
110 .then((res) => { 110 .then((res) => {
111 const { code, msg } = res; 111 const { code, msg } = res;
112 if (code == 200) { 112 if (code == 200) {
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
149 if (res) { 149 if (res) {
150 const blob = new Blob([res]); 150 const blob = new Blob([res]);
151 const link = document.createElement("a"); //创建a标签 151 const link = document.createElement("a"); //创建a标签
152 - link.download = "HSCODE黑名单.xlsx"; //a标签添加属性 152 + link.download = "HSCODE黑名单模板.xlsx"; //a标签添加属性
153 link.style.display = "none"; 153 link.style.display = "none";
154 link.href = URL.createObjectURL(blob); 154 link.href = URL.createObjectURL(blob);
155 document.body.appendChild(link); 155 document.body.appendChild(link);
...@@ -176,10 +176,6 @@ export default { ...@@ -176,10 +176,6 @@ export default {
176 // 删除 176 // 删除
177 deleteData(row) { 177 deleteData(row) {
178 if (this.multipleSelection.length) { 178 if (this.multipleSelection.length) {
179 - let params = [];
180 - this.multipleSelection.map((item) => {
181 - params.push(item.id);
182 - });
183 this.$confirm("是否确认删除?", "提示", { 179 this.$confirm("是否确认删除?", "提示", {
184 confirmButtonText: "确定", 180 confirmButtonText: "确定",
185 cancelButtonText: "取消", 181 cancelButtonText: "取消",
...@@ -187,7 +183,7 @@ export default { ...@@ -187,7 +183,7 @@ export default {
187 center: true, 183 center: true,
188 }) 184 })
189 .then(() => { 185 .then(() => {
190 - this.toDelBlackList(params); 186 + this.toDelHsCodeListList(this.multipleSelection);
191 }) 187 })
192 .catch(() => {}); 188 .catch(() => {});
193 } else { 189 } else {
...@@ -232,7 +228,7 @@ export default { ...@@ -232,7 +228,7 @@ export default {
232 center: true, 228 center: true,
233 }) 229 })
234 .then(() => { 230 .then(() => {
235 - this.toDelBlackList([row.id]); 231 + this.toDelHsCodeListList([row]);
236 }) 232 })
237 .catch(() => {}); 233 .catch(() => {});
238 }, 234 },
......
...@@ -74,6 +74,12 @@ export const columnHeader = (indexAdd, deleteRow) => [ ...@@ -74,6 +74,12 @@ export const columnHeader = (indexAdd, deleteRow) => [
74 index: indexAdd, 74 index: indexAdd,
75 }, 75 },
76 { 76 {
77 + label: "口岸",
78 + prop: "portName",
79 + align: "center",
80 + minWidth: 100,
81 + },
82 + {
77 label: "HSCODE", 83 label: "HSCODE",
78 prop: "blackValue", 84 prop: "blackValue",
79 align: "center", 85 align: "center",
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
170 </el-col> 170 </el-col>
171 <el-col :span="14"> 171 <el-col :span="14">
172 <el-form-item label=""> 172 <el-form-item label="">
173 - <el-col :span="4" style="text-align: end; width: 8%"> 173 + <el-col :span="4" style="text-align: end; width: 9%">
174 <span 174 <span
175 style=" 175 style="
176 width: 10%; 176 width: 10%;
...@@ -235,12 +235,13 @@ ...@@ -235,12 +235,13 @@
235 :rows="4" 235 :rows="4"
236 placeholder="URSA之间用分号分隔,例:F2;F3;P_" 236 placeholder="URSA之间用分号分隔,例:F2;F3;P_"
237 :disabled="!getRouter" 237 :disabled="!getRouter"
238 + @blur="includeUrsa"
238 ></el-input> 239 ></el-input>
239 </el-form-item> 240 </el-form-item>
240 </el-col> 241 </el-col>
241 <el-col :span="14"> 242 <el-col :span="14">
242 <el-form-item label=""> 243 <el-form-item label="">
243 - <el-col :span="8" style="text-align: end; width: 27%" 244 + <el-col :span="8" style="text-align: end; width: 28%"
244 ><span 245 ><span
245 class="ursa-label" 246 class="ursa-label"
246 style=" 247 style="
...@@ -262,6 +263,7 @@ ...@@ -262,6 +263,7 @@
262 :rows="4" 263 :rows="4"
263 placeholder="URSA之间用分号分隔,例:F2;F3;P_" 264 placeholder="URSA之间用分号分隔,例:F2;F3;P_"
264 :disabled="!getRouter" 265 :disabled="!getRouter"
266 + @blur="notIncludeUrsa"
265 ></el-input> 267 ></el-input>
266 </el-col> 268 </el-col>
267 </el-form-item> 269 </el-form-item>
...@@ -302,7 +304,8 @@ ...@@ -302,7 +304,8 @@
302 </el-form-item> 304 </el-form-item>
303 </el-col> 305 </el-col>
304 <el-col :span="8"> 306 <el-col :span="8">
305 - <el-form-item label="件数" class="custom-label-pieces"> 307 + <el-form-item label="" class="custom-label">
308 + <span class="custom-label-title">件数</span>
306 <el-col :span="10"> 309 <el-col :span="10">
307 <el-input 310 <el-input
308 v-model.trim="queryForm.minNumOfPieces" 311 v-model.trim="queryForm.minNumOfPieces"
...@@ -357,9 +360,9 @@ ...@@ -357,9 +360,9 @@
357 <span class="custom-label-title">人民币</span> 360 <span class="custom-label-title">人民币</span>
358 <el-col :span="10"> 361 <el-col :span="10">
359 <el-input 362 <el-input
360 - v-model.trim="minCNYCustomVal" 363 + v-model.trim="queryForm.minCustomVal"
361 placeholder="最小申报价值" 364 placeholder="最小申报价值"
362 - @blur="inputBlurMin($event, 'minCNYCustomVal')" 365 + @blur="inputCNYBlurMin($event, 'minCNYCustomVal')"
363 :disabled="!getRouter" 366 :disabled="!getRouter"
364 ></el-input> 367 ></el-input>
365 <span 368 <span
...@@ -370,21 +373,22 @@ ...@@ -370,21 +373,22 @@
370 <el-col style="text-align: center" :span="1">-</el-col> 373 <el-col style="text-align: center" :span="1">-</el-col>
371 <el-col :span="10"> 374 <el-col :span="10">
372 <el-input 375 <el-input
373 - v-model.trim="maxCNYCustomVal" 376 + v-model.trim="queryForm.maxCustomVal"
374 placeholder="最大申报价值" 377 placeholder="最大申报价值"
375 - @blur="inputBlurMax($event, 'maxCNYCustomVal')" 378 + @blur="inputCNYBlurMax($event, 'maxCNYCustomVal')"
376 :disabled="!getRouter" 379 :disabled="!getRouter"
377 ></el-input> 380 ></el-input>
378 </el-col> 381 </el-col>
379 </el-form-item> 382 </el-form-item>
380 </el-col> 383 </el-col>
381 <el-col :span="8"> 384 <el-col :span="8">
382 - <el-form-item label="美元" class="custom-label-pieces"> 385 + <el-form-item label="" class="custom-label">
386 + <span class="custom-label-title">美元</span>
383 <el-col :span="10"> 387 <el-col :span="10">
384 <el-input 388 <el-input
385 - v-model.trim="minSUDCustomVal" 389 + v-model.trim="queryForm.minUsdCustomVal"
386 placeholder="最小申报价值" 390 placeholder="最小申报价值"
387 - @blur="inputBlurMin($event, 'minSUDCustomVal')" 391 + @blur="inputSUDBlurMin($event, 'minSUDCustomVal')"
388 :disabled="!getRouter" 392 :disabled="!getRouter"
389 ></el-input> 393 ></el-input>
390 <span 394 <span
...@@ -395,9 +399,9 @@ ...@@ -395,9 +399,9 @@
395 <el-col style="text-align: center" :span="1">-</el-col> 399 <el-col style="text-align: center" :span="1">-</el-col>
396 <el-col :span="10"> 400 <el-col :span="10">
397 <el-input 401 <el-input
398 - v-model.trim="maxSUDCustomVal" 402 + v-model.trim="queryForm.maxUsdCustomVal"
399 placeholder="最大申报价值" 403 placeholder="最大申报价值"
400 - @blur="inputBlurMax($event, 'maxSUDCustomVal')" 404 + @blur="inputSUDBlurMax($event, 'maxSUDCustomVal')"
401 :disabled="!getRouter" 405 :disabled="!getRouter"
402 ></el-input> 406 ></el-input>
403 </el-col> 407 </el-col>
...@@ -458,9 +462,12 @@ export default { ...@@ -458,9 +462,12 @@ export default {
458 maxWeight: "", 462 maxWeight: "",
459 minNumOfPieces: "", // 最小件数 463 minNumOfPieces: "", // 最小件数
460 maxNumOfPieces: "", 464 maxNumOfPieces: "",
461 - currencyCd: "", // 币种 465 + currencyCd: "CNY", // 人民币种
462 - minCustomVal: "", // 最小申报值 466 + currencyCdUsd: "SUD", // 美元币种
463 - maxCustomVal: "", 467 + minCustomVal: "", // 人民币最小申报值
468 + maxCustomVal: "", // 人民币最大申报值
469 + minUsdCustomVal: "", // 美元最小申报值
470 + maxUsdCustomVal: "" // 美元最大申报值
464 }, 471 },
465 tableAttr: tableAttr, // table配置项 472 tableAttr: tableAttr, // table配置项
466 tableData: [], // ET86配舱航班顺位 473 tableData: [], // ET86配舱航班顺位
...@@ -492,6 +499,11 @@ export default { ...@@ -492,6 +499,11 @@ export default {
492 }, 499 },
493 created() { 500 created() {
494 this.getAllDictData(); // 获取全部字典 501 this.getAllDictData(); // 获取全部字典
502 + if (this.$route.query.name == "view"){
503 + tableAttr.isDragSort = false;
504 + }else{
505 + tableAttr.isDragSort = true;
506 + }
495 if (this.$route.query.name == "view" || this.$route.query.name == "edit") { 507 if (this.$route.query.name == "view" || this.$route.query.name == "edit") {
496 this.queryFindEtesRuleById(this.$route.query); // ET86详情 508 this.queryFindEtesRuleById(this.$route.query); // ET86详情
497 } else { 509 } else {
...@@ -568,15 +580,13 @@ export default { ...@@ -568,15 +580,13 @@ export default {
568 } else { 580 } else {
569 this.checkboxClassType = []; 581 this.checkboxClassType = [];
570 } 582 }
571 - // 人民币 583 + // 服务种类
572 - if (data.list.fltRuleDto.currencyCd == "CNY") { 584 + if(data.list.fltRuleDto.includeServiceType){
573 - this.minCNYCustomVal = data.list.fltRuleDto.minCustomVal; 585 + this.isServiceCode = "1";
574 - this.maxCNYCustomVal = data.list.fltRuleDto.maxCustomVal; 586 + }else if(data.list.fltRuleDto.notIncludeServiceType){
575 - } 587 + this.isServiceCode = "2";
576 - // 美元 588 + }else{
577 - if (data.list.fltRuleDto.currencyCd == "USD") { 589 + this.isServiceCode = "1";
578 - this.minSUDCustomVal = data.list.fltRuleDto.minCustomVal;
579 - this.maxSUDCustomVal = data.list.fltRuleDto.maxCustomVal;
580 } 590 }
581 this.queryForm = data.list.fltRuleDto; // ET86配舱航班顺位维度 591 this.queryForm = data.list.fltRuleDto; // ET86配舱航班顺位维度
582 } else { 592 } else {
...@@ -721,6 +731,9 @@ export default { ...@@ -721,6 +731,9 @@ export default {
721 submitForm(formName) { 731 submitForm(formName) {
722 this.$refs[formName].validate((valid) => { 732 this.$refs[formName].validate((valid) => {
723 if (valid) { 733 if (valid) {
734 + this.tableData.map((item,i)=>{
735 + item.priority = ++i
736 + })
724 // 爆仓是否继续配舱 737 // 爆仓是否继续配舱
725 const newtTableData = JSON.parse(JSON.stringify(this.tableData)); 738 const newtTableData = JSON.parse(JSON.stringify(this.tableData));
726 const tableData = newtTableData; 739 const tableData = newtTableData;
...@@ -732,23 +745,6 @@ export default { ...@@ -732,23 +745,6 @@ export default {
732 } 745 }
733 }); 746 });
734 // 校验ET86配舱航班顺位维度 747 // 校验ET86配舱航班顺位维度
735 - if (
736 - this.minCNYCustomVal.length != "" ||
737 - this.maxCNYCustomVal.length != ""
738 - ) {
739 - this.queryForm.currencyCd = "CNY";
740 - this.queryForm.minCustomVal = this.minCNYCustomVal;
741 - this.queryForm.maxCustomVal = this.maxCNYCustomVal;
742 - } else if (
743 - this.minSUDCustomVal.length != "" ||
744 - this.maxSUDCustomVal.length != ""
745 - ) {
746 - this.queryForm.currencyCd = "USD";
747 - this.queryForm.minCustomVal = this.minSUDCustomVal;
748 - this.queryForm.maxCustomVal = this.maxSUDCustomVal;
749 - } else {
750 - this.queryForm.currencyCd = null;
751 - }
752 let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号 748 let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号
753 let fltNoRoute = this.tableData.some( 749 let fltNoRoute = this.tableData.some(
754 (item) => item.flightRoute == "" 750 (item) => item.flightRoute == ""
...@@ -765,14 +761,12 @@ export default { ...@@ -765,14 +761,12 @@ export default {
765 this.msgError("原航班号不可为空"); 761 this.msgError("原航班号不可为空");
766 return; 762 return;
767 } 763 }
768 - this.queryForm.includeServiceType = 764 + // 服务种类包含不包含二选一
769 - this.isServiceCode == "1" && this.serviceCode.length > 0 765 + if(this.isServiceCode == "1"){
770 - ? this.serviceCode 766 + this.queryForm.notIncludeServiceType = "";
771 - : ""; // 包含服务种类 767 + }else{
772 - this.queryForm.notIncludeServiceType = 768 + this.queryForm.includeServiceType = "";
773 - this.isServiceCode == "2" && this.serviceCode.length > 0 769 + }
774 - ? this.serviceCode
775 - : ""; // 不包含服务种类
776 let parmas = { 770 let parmas = {
777 flightRankDtoList: tableData, // ET86配舱航班顺位 771 flightRankDtoList: tableData, // ET86配舱航班顺位
778 fltRuleDto: this.queryForm, 772 fltRuleDto: this.queryForm,
...@@ -871,9 +865,4 @@ export default { ...@@ -871,9 +865,4 @@ export default {
871 } 865 }
872 } 866 }
873 } 867 }
874 -::v-deep .custom-label-pieces {
875 - .el-form-item__content {
876 - width: 80%;
877 - }
878 -}
879 </style> 868 </style>
......
...@@ -52,7 +52,12 @@ export default { ...@@ -52,7 +52,12 @@ export default {
52 }, 52 },
53 // 处理serviceCode包不包含 53 // 处理serviceCode包不包含
54 serviceCodeCofig() { 54 serviceCodeCofig() {
55 - let str = this.serviceCode.replace(/;|;/g, ","); 55 + let str = "";
56 + if (this.isServiceCode == "1") {
57 + str = this.queryForm.includeServiceType.replace(/;|;/g, ",");
58 + } else {
59 + str = this.queryForm.notIncludeServiceType.replace(/;|;/g, ",");
60 + }
56 let arr = str.split(","); 61 let arr = str.split(",");
57 if (arr[arr.length - 1] == "") { 62 if (arr[arr.length - 1] == "") {
58 arr.splice(arr.length - 1, 1); 63 arr.splice(arr.length - 1, 1);
...@@ -75,12 +80,12 @@ export default { ...@@ -75,12 +80,12 @@ export default {
75 if (val == 1) { 80 if (val == 1) {
76 if (this.serviceCodeCofig().noInclude.length) { 81 if (this.serviceCodeCofig().noInclude.length) {
77 let tip = this.serviceCodeCofig().noInclude.toString(); 82 let tip = this.serviceCodeCofig().noInclude.toString();
78 - this.msgError(`${tip} 不包含`); 83 + // this.msgError(`${tip} 不包含`);
79 } 84 }
80 } else { 85 } else {
81 if (this.serviceCodeCofig().include.length) { 86 if (this.serviceCodeCofig().include.length) {
82 let tip = this.serviceCodeCofig().include.toString(); 87 let tip = this.serviceCodeCofig().include.toString();
83 - this.msgError(`${tip} 已包含`); 88 + // this.msgError(`${tip} 已包含`);
84 } 89 }
85 } 90 }
86 }, 91 },
...@@ -98,5 +103,31 @@ export default { ...@@ -98,5 +103,31 @@ export default {
98 } 103 }
99 } 104 }
100 }, 105 },
106 + // 不包含
107 + includeUrsa() {
108 + let inUrsa = this.queryForm.includeUrsa.split(";");
109 + // 校验开头以字母开头下划线结尾的
110 + // let _inUrsa = inUrsa.every((item) => {
111 + // if (item) {
112 + // return /^[a-zA-Z]*_$/.test(item);
113 + // }
114 + // });
115 + // console.log(_inUrsa);
116 +
117 + // function hasDuplicate(arr) {
118 + // return new Set(arr).size !== arr.length;
119 + // }
120 +
121 + /*
122 + 使用JavaScript写一个只能开头以字母开头下划线和分号结尾的正则表达式;
123 + 使用JavaScript写一个判断数组中有重复的字符返回true,
124 + */
125 + // 要有下划线且不能出现重复的
126 + // console.log(this.queryForm.includeUrsa.split(";"));
127 + },
128 + // 不包含
129 + notIncludeUrsa() {
130 + // 不要有下划线且不能出现重复的
131 + },
101 }, 132 },
102 }; 133 };
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
19 :tableData="tableData" 19 :tableData="tableData"
20 :pageConfig="pageConfig" 20 :pageConfig="pageConfig"
21 @search="searchBtn" 21 @search="searchBtn"
22 + @download="downloadTemplate"
22 @upload="toUpload" 23 @upload="toUpload"
23 @export="exportTemplate" 24 @export="exportTemplate"
24 @delete="deleteData" 25 @delete="deleteData"
...@@ -38,8 +39,11 @@ import { restTableHeight } from "@/utils"; ...@@ -38,8 +39,11 @@ import { restTableHeight } from "@/utils";
38 import { 39 import {
39 findShipmentDescList, // HScode英文品名黑名单查询 40 findShipmentDescList, // HScode英文品名黑名单查询
40 uploadShipmentDesc, // HScode英文品名黑名单导入 41 uploadShipmentDesc, // HScode英文品名黑名单导入
41 - delBlackList, // HScode黑名单/英文品名删除 42 + delShipmentDescList, // HScode黑名单/英文品名删除
42 } from "@/api/et86ShipmentDesc"; 43 } from "@/api/et86ShipmentDesc";
44 +import {
45 + downLoadTemplate, // ShipmentDesc/英文品名黑名下载模板
46 +} from "@/api/et86HsCodeBlack";
43 import { downLoadXlsx } from "@/utils/zipdownload"; 47 import { downLoadXlsx } from "@/utils/zipdownload";
44 export default { 48 export default {
45 name: "et86ShipmentDesc", 49 name: "et86ShipmentDesc",
...@@ -103,8 +107,8 @@ export default { ...@@ -103,8 +107,8 @@ export default {
103 .catch(() => {}); 107 .catch(() => {});
104 }, 108 },
105 // 删除黑名单 109 // 删除黑名单
106 - toDelBlackList(params) { 110 + toDelShipmentDescList(params) {
107 - delBlackList(params) 111 + delShipmentDescList(params)
108 .then((res) => { 112 .then((res) => {
109 const { code, msg } = res; 113 const { code, msg } = res;
110 if (code == 200) { 114 if (code == 200) {
...@@ -140,13 +144,33 @@ export default { ...@@ -140,13 +144,33 @@ export default {
140 }) 144 })
141 .catch(() => {}); 145 .catch(() => {});
142 }, 146 },
147 + // 下载【英文品名黑名单下载模板】
148 + downloadTemplate() {
149 + downLoadTemplate("shipmentDesc")
150 + .then((res) => {
151 + if (res) {
152 + const blob = new Blob([res]);
153 + const link = document.createElement("a"); //创建a标签
154 + link.download = "英文品名黑名单模板.xlsx"; //a标签添加属性
155 + link.style.display = "none";
156 + link.href = URL.createObjectURL(blob);
157 + document.body.appendChild(link);
158 + link.click(); //执行下载
159 + URL.revokeObjectURL(link.href); //释放url
160 + document.body.removeChild(link); //释放标签
161 + } else {
162 + this.$message.error("下载失败");
163 + }
164 + })
165 + .catch(() => {});
166 + },
143 // 导出 167 // 导出
144 exportTemplate(row, i) { 168 exportTemplate(row, i) {
145 this.tableAttr.btnCofig.btnGroup[i].loading = true; 169 this.tableAttr.btnCofig.btnGroup[i].loading = true;
146 downLoadXlsx( 170 downLoadXlsx(
147 "/etes/exportShipmentDescList", 171 "/etes/exportShipmentDescList",
148 this.queryForm, 172 this.queryForm,
149 - "HSCODE英文品名黑名单表" 173 + "英文品名黑名单表"
150 ) 174 )
151 .then(() => { 175 .then(() => {
152 this.tableAttr.btnCofig.btnGroup[i].loading = false; 176 this.tableAttr.btnCofig.btnGroup[i].loading = false;
...@@ -158,10 +182,6 @@ export default { ...@@ -158,10 +182,6 @@ export default {
158 // 删除 182 // 删除
159 deleteData(row) { 183 deleteData(row) {
160 if (this.multipleSelection.length) { 184 if (this.multipleSelection.length) {
161 - let params = [];
162 - this.multipleSelection.map((item) => {
163 - params.push(item.id);
164 - });
165 this.$confirm("是否确认删除?", "提示", { 185 this.$confirm("是否确认删除?", "提示", {
166 confirmButtonText: "确定", 186 confirmButtonText: "确定",
167 cancelButtonText: "取消", 187 cancelButtonText: "取消",
...@@ -169,7 +189,7 @@ export default { ...@@ -169,7 +189,7 @@ export default {
169 center: true, 189 center: true,
170 }) 190 })
171 .then(() => { 191 .then(() => {
172 - this.toDelBlackList(params); 192 + this.toDelShipmentDescList(this.multipleSelection);
173 }) 193 })
174 .catch(() => {}); 194 .catch(() => {});
175 } else { 195 } else {
...@@ -185,10 +205,10 @@ export default { ...@@ -185,10 +205,10 @@ export default {
185 }); 205 });
186 }, 206 },
187 // 翻页序号递增 207 // 翻页序号递增
188 - indexAdd(index){ 208 + indexAdd(index) {
189 - const page = this.pageConfig.pageData.page // 当前页码 209 + const page = this.pageConfig.pageData.page; // 当前页码
190 - const pagesize = this.pageConfig.pageData.size // 每页条数 210 + const pagesize = this.pageConfig.pageData.size; // 每页条数
191 - return index + 1 + (page - 1) * pagesize 211 + return index + 1 + (page - 1) * pagesize;
192 }, 212 },
193 //条数变化 213 //条数变化
194 handleSizeChange(e) { 214 handleSizeChange(e) {
...@@ -214,7 +234,7 @@ export default { ...@@ -214,7 +234,7 @@ export default {
214 center: true, 234 center: true,
215 }) 235 })
216 .then(() => { 236 .then(() => {
217 - this.toDelBlackList([row.id]); 237 + this.toDelShipmentDescList([row]);
218 }) 238 })
219 .catch(() => {}); 239 .catch(() => {});
220 }, 240 },
......
...@@ -17,6 +17,15 @@ export const tableAttr = { ...@@ -17,6 +17,15 @@ export const tableAttr = {
17 }, 17 },
18 { 18 {
19 type: "primary", 19 type: "primary",
20 + icon: "el-icon-download",
21 + btnName: "下载模板",
22 + size: "mini",
23 + round: false,
24 + loading: false,
25 + event: "download",
26 + },
27 + {
28 + type: "primary",
20 icon: "el-icon-upload", 29 icon: "el-icon-upload",
21 btnName: "导入", 30 btnName: "导入",
22 size: "mini", 31 size: "mini",
...@@ -65,6 +74,12 @@ export const columnHeader = (indexAdd, deleteRow) => [ ...@@ -65,6 +74,12 @@ export const columnHeader = (indexAdd, deleteRow) => [
65 index: indexAdd, 74 index: indexAdd,
66 }, 75 },
67 { 76 {
77 + label: "口岸",
78 + prop: "portName",
79 + align: "center",
80 + minWidth: 100,
81 + },
82 + {
68 label: "ShipmentDesc", 83 label: "ShipmentDesc",
69 prop: "blackValue", 84 prop: "blackValue",
70 align: "center", 85 align: "center",
......