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>
......
This diff is collapsed. Click to expand it.
...@@ -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",
......