Elements-SY

UI页面调整

...@@ -320,7 +320,7 @@ export default { ...@@ -320,7 +320,7 @@ export default {
320 }, 320 },
321 marginBottom: { 321 marginBottom: {
322 type: Number, 322 type: Number,
323 - default: 30, 323 + default: 0,
324 }, 324 },
325 view: { 325 view: {
326 type: Boolean, 326 type: Boolean,
......
1 export const inputBlurValidate = { 1 export const inputBlurValidate = {
2 - data(){ 2 + data() {
3 return { 3 return {
4 queryForm: { 4 queryForm: {
5 minWeight: "", 5 minWeight: "",
...@@ -7,6 +7,7 @@ export const inputBlurValidate = { ...@@ -7,6 +7,7 @@ export const inputBlurValidate = {
7 minNumOfPieces: "", 7 minNumOfPieces: "",
8 maxNumOfPieces: "", 8 maxNumOfPieces: "",
9 }, 9 },
10 + validateForm: true,
10 }; 11 };
11 }, 12 },
12 methods: { 13 methods: {
...@@ -36,49 +37,76 @@ export const inputBlurValidate = { ...@@ -36,49 +37,76 @@ export const inputBlurValidate = {
36 }, 37 },
37 // 校验件数方法 【件数可以为空但件数不得为0】只能输入正整数 38 // 校验件数方法 【件数可以为空但件数不得为0】只能输入正整数
38 validateNumOfPieces(value, pieces) { 39 validateNumOfPieces(value, pieces) {
39 - if (value.length) { 40 + if (value.toString().length) {
41 + // 获取当前输入框有值的情况下
40 this.queryForm[pieces] = Number(value); 42 this.queryForm[pieces] = Number(value);
41 let markPieces = false; 43 let markPieces = false;
42 if (pieces == "minNumOfPieces" || pieces == "maxNumOfPieces") { 44 if (pieces == "minNumOfPieces" || pieces == "maxNumOfPieces") {
43 - if (this.queryForm.minNumOfPieces && this.queryForm.maxNumOfPieces) { 45 + // 最大件数和最小件数都不为空的情况下
44 - markPieces = Number(this.queryForm.maxNumOfPieces) < Number(this.queryForm.minNumOfPieces); 46 + if (
47 + this.queryForm.minNumOfPieces.toString() != "" &&
48 + this.queryForm.maxNumOfPieces.toString() != ""
49 + ) {
50 + this.validateForm = true;
51 + this.$refs.minNumOfPieces.innerHTML = "";
52 + markPieces = true;
53 + } else {
54 + markPieces = false;
45 } 55 }
46 } 56 }
47 if (/^\d+$/.test(this.queryForm[pieces])) { 57 if (/^\d+$/.test(this.queryForm[pieces])) {
48 if (markPieces) { 58 if (markPieces) {
59 + //当最大件数和最小件数都不为空的情况下,最大件数小于最小件数的时候
49 if (this.queryForm.maxNumOfPieces < this.queryForm.minNumOfPieces) { 60 if (this.queryForm.maxNumOfPieces < this.queryForm.minNumOfPieces) {
50 if (Array.isArray(this.$refs.minNumOfPieces)) { 61 if (Array.isArray(this.$refs.minNumOfPieces)) {
51 this.msgError("最小件数不得大于最大件数"); 62 this.msgError("最小件数不得大于最大件数");
63 + this.validateForm = false;
52 } else { 64 } else {
53 this.$refs.minNumOfPieces.innerHTML = ""; 65 this.$refs.minNumOfPieces.innerHTML = "";
54 - this.$refs.minNumOfPieces.innerHTML = "最小件数不得大于最大件数"; 66 + this.$refs.minNumOfPieces.innerHTML =
67 + "最小件数不得大于最大件数";
68 + this.validateForm = false;
55 } 69 }
56 - } else if ( 70 + }
57 - this.queryForm.minNumOfPieces < 1 || this.queryForm.maxNumOfPieces < 1 71 + //当最大件数和最小件数都不为空的情况下,最大件数和最小件数小于1的时候
72 + else if (
73 + this.queryForm.minNumOfPieces < 1 ||
74 + this.queryForm.maxNumOfPieces < 1
58 ) { 75 ) {
59 if (Array.isArray(this.$refs.minNumOfPieces)) { 76 if (Array.isArray(this.$refs.minNumOfPieces)) {
60 this.msgError("最小件数和最大件数不能小于1"); 77 this.msgError("最小件数和最大件数不能小于1");
78 + this.validateForm = false;
61 } else { 79 } else {
62 this.$refs.minNumOfPieces.innerHTML = ""; 80 this.$refs.minNumOfPieces.innerHTML = "";
63 - this.$refs.minNumOfPieces.innerHTML = "最小件数和最大件数不能小于1"; 81 + this.$refs.minNumOfPieces.innerHTML =
82 + "最小件数和最大件数不能小于1";
83 + this.validateForm = false;
64 } 84 }
65 - } else {
66 - if (!Array.isArray(this.$refs.minNumOfPieces)) {
67 - this.$refs.minNumOfPieces.innerHTML = "";
68 } 85 }
86 + //当最大件数和最小件数都不为空的情况下,最大件数和最小件数满足大于1左区间小于等于右区间的时候
87 + else {
88 + this.$refs.minNumOfPieces.innerHTML = "";
89 + this.validateForm = true;
69 } 90 }
70 } else { 91 } else {
92 + // 当左右区间其中一个有值的情况下
71 if (value.length) { 93 if (value.length) {
72 if (Number(value) < 1) { 94 if (Number(value) < 1) {
73 if (Array.isArray(this.$refs.minNumOfPieces)) { 95 if (Array.isArray(this.$refs.minNumOfPieces)) {
74 this.msgError("件数不得小于1"); 96 this.msgError("件数不得小于1");
97 + this.$refs.minNumOfPieces.innerHTML = "";
98 + this.$refs.minNumOfPieces.innerHTML = "件数不得小于1";
99 + this.validateForm = false;
75 } else { 100 } else {
101 + this.msgError("件数不得小于1");
76 this.$refs.minNumOfPieces.innerHTML = ""; 102 this.$refs.minNumOfPieces.innerHTML = "";
77 this.$refs.minNumOfPieces.innerHTML = "件数不得小于1"; 103 this.$refs.minNumOfPieces.innerHTML = "件数不得小于1";
104 + this.validateForm = false;
78 } 105 }
79 } else { 106 } else {
80 if (!Array.isArray(this.$refs.minNumOfPieces)) { 107 if (!Array.isArray(this.$refs.minNumOfPieces)) {
81 this.$refs.minNumOfPieces.innerHTML = ""; 108 this.$refs.minNumOfPieces.innerHTML = "";
109 + this.validateForm = true;
82 } 110 }
83 } 111 }
84 } 112 }
...@@ -90,9 +118,38 @@ export const inputBlurValidate = { ...@@ -90,9 +118,38 @@ export const inputBlurValidate = {
90 this.$refs.minNumOfPieces.innerHTML = ""; 118 this.$refs.minNumOfPieces.innerHTML = "";
91 this.$refs.minNumOfPieces.innerHTML = "请输入有效件数"; 119 this.$refs.minNumOfPieces.innerHTML = "请输入有效件数";
92 } 120 }
93 - return false; 121 + this.validateForm = false;
122 + }
123 + } else {
124 + // 【左右区间不是都有值的情况下】
125 + // 最小件数为空最大件数有值的情况下
126 + if (pieces == "minNumOfPieces" && this.queryForm.maxNumOfPieces > 0) {
127 + this.$refs.minNumOfPieces.innerHTML = "";
128 + this.validateForm = true;
129 + } else {
130 + this.$refs.minNumOfPieces.innerHTML = "";
131 + this.$refs.minNumOfPieces.innerHTML = "件数不得小于1";
132 + this.validateForm = false;
133 + }
134 + // 最大件数为空最小件数有值的情况下
135 + if (pieces == "maxNumOfPieces" && this.queryForm.minNumOfPieces > 0) {
136 + this.$refs.minNumOfPieces.innerHTML = "";
137 + this.validateForm = true;
138 + } else {
139 + this.$refs.minNumOfPieces.innerHTML = "";
140 + this.$refs.minNumOfPieces.innerHTML = "件数不得小于1";
141 + this.validateForm = false;
142 + }
143 + // 左右区间 都为空的情况下
144 + if (
145 + this.queryForm.minNumOfPieces.toString().length == 0 &&
146 + this.queryForm.maxNumOfPieces.toString().length == 0
147 + ) {
148 + this.$refs.minNumOfPieces.innerHTML = "";
149 + this.validateForm = true;
94 } 150 }
95 } 151 }
152 + return this.validateForm;
96 }, 153 },
97 // 校验重量方法 【重量可以为空为0 && 最小/大重量的范围0~34KG】允许保留1~5位小数。 154 // 校验重量方法 【重量可以为空为0 && 最小/大重量的范围0~34KG】允许保留1~5位小数。
98 validateWeight(value, weight) { 155 validateWeight(value, weight) {
...@@ -101,27 +158,34 @@ export const inputBlurValidate = { ...@@ -101,27 +158,34 @@ export const inputBlurValidate = {
101 let markWeight = false; 158 let markWeight = false;
102 if (weight == "minWeight" || weight == "maxWeight") { 159 if (weight == "minWeight" || weight == "maxWeight") {
103 if (this.queryForm.minWeight && this.queryForm.maxWeight) { 160 if (this.queryForm.minWeight && this.queryForm.maxWeight) {
104 - markWeight = Number(this.queryForm.maxWeight) < Number(this.queryForm.minWeight); 161 + markWeight =
162 + Number(this.queryForm.maxWeight) <
163 + Number(this.queryForm.minWeight);
105 } 164 }
106 } 165 }
107 if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(this.queryForm[weight])) { 166 if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(this.queryForm[weight])) {
108 if (this.queryForm[weight] >= 0) { 167 if (this.queryForm[weight] >= 0) {
109 if (markWeight) { 168 if (markWeight) {
110 if (Array.isArray(this.$refs.minWeight)) { 169 if (Array.isArray(this.$refs.minWeight)) {
170 + this.validateForm = false;
111 this.msgError("最小重量不得大于最大重量"); 171 this.msgError("最小重量不得大于最大重量");
112 } else { 172 } else {
173 + this.validateForm = false;
113 this.$refs.minWeight.innerHTML = ""; 174 this.$refs.minWeight.innerHTML = "";
114 this.$refs.minWeight.innerHTML = "最小重量不得大于最大重量"; 175 this.$refs.minWeight.innerHTML = "最小重量不得大于最大重量";
115 } 176 }
116 } else if (this.queryForm[weight] > 34) { 177 } else if (this.queryForm[weight] > 34) {
178 + this.validateForm = false;
117 if (Array.isArray(this.$refs.minWeight)) { 179 if (Array.isArray(this.$refs.minWeight)) {
118 this.msgError("最大重量不能大于34KG"); 180 this.msgError("最大重量不能大于34KG");
119 } else { 181 } else {
182 + this.validateForm = false;
120 this.$refs.minWeight.innerHTML = ""; 183 this.$refs.minWeight.innerHTML = "";
121 this.$refs.minWeight.innerHTML = "最大重量不能大于34KG"; 184 this.$refs.minWeight.innerHTML = "最大重量不能大于34KG";
122 } 185 }
123 } else { 186 } else {
124 if (!Array.isArray(this.$refs.minWeight)) { 187 if (!Array.isArray(this.$refs.minWeight)) {
188 + this.validateForm = true;
125 this.$refs.minWeight.innerHTML = ""; 189 this.$refs.minWeight.innerHTML = "";
126 } 190 }
127 } 191 }
...@@ -129,13 +193,16 @@ export const inputBlurValidate = { ...@@ -129,13 +193,16 @@ export const inputBlurValidate = {
129 if (value.length) { 193 if (value.length) {
130 if (Number(value) > 34) { 194 if (Number(value) > 34) {
131 if (Array.isArray(this.$refs.minWeight)) { 195 if (Array.isArray(this.$refs.minWeight)) {
196 + this.validateForm = false;
132 this.msgError("最大重量不能大于34KG"); 197 this.msgError("最大重量不能大于34KG");
133 } else { 198 } else {
199 + this.validateForm = false;
134 this.$refs.minWeight.innerHTML = ""; 200 this.$refs.minWeight.innerHTML = "";
135 this.$refs.minWeight.innerHTML = "最大重量不能大于34KG"; 201 this.$refs.minWeight.innerHTML = "最大重量不能大于34KG";
136 } 202 }
137 } else { 203 } else {
138 if (!Array.isArray(this.$refs.minWeight)) { 204 if (!Array.isArray(this.$refs.minWeight)) {
205 + this.validateForm = true;
139 this.$refs.minWeight.innerHTML = ""; 206 this.$refs.minWeight.innerHTML = "";
140 } 207 }
141 } 208 }
...@@ -143,14 +210,16 @@ export const inputBlurValidate = { ...@@ -143,14 +210,16 @@ export const inputBlurValidate = {
143 } 210 }
144 } else { 211 } else {
145 if (Array.isArray(this.$refs.minWeight)) { 212 if (Array.isArray(this.$refs.minWeight)) {
213 + this.validateForm = false;
146 this.msgError("请输入正整数,小数保留5位"); 214 this.msgError("请输入正整数,小数保留5位");
147 } else { 215 } else {
216 + this.validateForm = false;
148 this.$refs.minWeight.innerHTML = ""; 217 this.$refs.minWeight.innerHTML = "";
149 this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位"; 218 this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位";
150 } 219 }
151 - return false;
152 } 220 }
153 } 221 }
222 + return this.validateForm;
154 }, 223 },
155 // 报价值【申报价值可以为空为0】 224 // 报价值【申报价值可以为空为0】
156 validateCustomVal(value, customVal) { 225 validateCustomVal(value, customVal) {
...@@ -171,40 +240,55 @@ export const inputBlurValidate = { ...@@ -171,40 +240,55 @@ export const inputBlurValidate = {
171 let markCoin = false; 240 let markCoin = false;
172 if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") { 241 if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") {
173 if (this.minCNYCustomVal && this.maxCNYCustomVal) { 242 if (this.minCNYCustomVal && this.maxCNYCustomVal) {
174 - markCoin = Number(this.maxCNYCustomVal) < Number(this.minCNYCustomVal); 243 + this.validateForm = false;
244 + markCoin =
245 + Number(this.maxCNYCustomVal) < Number(this.minCNYCustomVal);
175 } 246 }
176 } else { 247 } else {
177 if (this.minSUDCustomVal && this.maxSUDCustomVal) { 248 if (this.minSUDCustomVal && this.maxSUDCustomVal) {
178 - markCoin = Number(this.maxSUDCustomVal) < Number(this.minSUDCustomVal); 249 + this.validateForm = false;
250 + markCoin =
251 + Number(this.maxSUDCustomVal) < Number(this.minSUDCustomVal);
179 } 252 }
180 } 253 }
181 if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this[customVal])) { 254 if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this[customVal])) {
182 if (this[customVal] >= 0) { 255 if (this[customVal] >= 0) {
183 if (markCoin) { 256 if (markCoin) {
257 + this.validateForm = false;
184 this.$refs[coin[customVal]].innerHTML = ""; 258 this.$refs[coin[customVal]].innerHTML = "";
185 - this.$refs[coin[customVal]].innerHTML = "最小申报价值不得大于最大申报价值"; 259 + this.$refs[coin[customVal]].innerHTML =
260 + "最小申报价值不得大于最大申报价值";
186 } else if (this[customVal] > currency[customVal]) { 261 } else if (this[customVal] > currency[customVal]) {
262 + this.validateForm = false;
187 this.$refs[coin[customVal]].innerHTML = ""; 263 this.$refs[coin[customVal]].innerHTML = "";
188 - this.$refs[coin[customVal]].innerHTML = `最大申报值不得大于${currency[customVal]}`; 264 + this.$refs[
265 + coin[customVal]
266 + ].innerHTML = `最大申报值不得大于${currency[customVal]}`;
189 } else { 267 } else {
268 + this.validateForm = true;
190 this.$refs[coin[customVal]].innerHTML = ""; 269 this.$refs[coin[customVal]].innerHTML = "";
191 } 270 }
192 } else { 271 } else {
193 if (value.length) { 272 if (value.length) {
194 if (Number(value) > currency[customVal]) { 273 if (Number(value) > currency[customVal]) {
274 + this.validateForm = false;
195 this.$refs[coin[customVal]].innerHTML = ""; 275 this.$refs[coin[customVal]].innerHTML = "";
196 - this.$refs[coin[customVal]].innerHTML = `最大申报值不得大于${currency[customVal]}`; 276 + this.$refs[
277 + coin[customVal]
278 + ].innerHTML = `最大申报值不得大于${currency[customVal]}`;
197 } else { 279 } else {
280 + this.validateForm = true;
198 this.$refs[coin[customVal]].innerHTML = ""; 281 this.$refs[coin[customVal]].innerHTML = "";
199 } 282 }
200 } 283 }
201 } 284 }
202 } else { 285 } else {
286 + this.validateForm = false;
203 this.$refs[coin[customVal]].innerHTML = ""; 287 this.$refs[coin[customVal]].innerHTML = "";
204 this.$refs[coin[customVal]].innerHTML = "请输入正确申报价值"; 288 this.$refs[coin[customVal]].innerHTML = "请输入正确申报价值";
205 - return false;
206 } 289 }
207 } 290 }
291 + return this.validateForm;
208 }, 292 },
209 }, 293 },
210 }; 294 };
......
...@@ -147,7 +147,13 @@ export default { ...@@ -147,7 +147,13 @@ export default {
147 }, 147 },
148 methods: { 148 methods: {
149 // HScode黑名单查询 149 // HScode黑名单查询
150 - queryFindHsCodeList(params) { 150 + queryFindHsCodeList() {
151 + const { page, size } = this.pageConfig.pageData;
152 + let params = {
153 + limitStart: (page - 1) * size,
154 + limitSize: size,
155 + ...this.queryForm,
156 + };
151 this.tableAttr.loadingTable = true; 157 this.tableAttr.loadingTable = true;
152 findHsCodeList(params) 158 findHsCodeList(params)
153 .then((res) => { 159 .then((res) => {
...@@ -206,14 +212,10 @@ export default { ...@@ -206,14 +212,10 @@ export default {
206 }, 212 },
207 // 搜索 213 // 搜索
208 searchBtn() { 214 searchBtn() {
209 - const { page, size } = this.pageConfig.pageData; 215 + this.pageConfig.pageData.page = 1;
216 + this.pageConfig.pageData.size = 10;
210 this.$refs.ruleForm.handleSearch("ruleForm", (val) => { 217 this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
211 - let params = { 218 + this.queryFindHsCodeList();
212 - limitStart: (page - 1) * size,
213 - limitSize: size,
214 - ...this.queryForm,
215 - };
216 - this.queryFindHsCodeList(params);
217 }); 219 });
218 }, 220 },
219 // 确认对话框 221 // 确认对话框
...@@ -278,12 +280,12 @@ export default { ...@@ -278,12 +280,12 @@ export default {
278 handleSizeChange(e) { 280 handleSizeChange(e) {
279 this.pageConfig.pageData.size = e; 281 this.pageConfig.pageData.size = e;
280 this.pageConfig.pageData.page = 1; 282 this.pageConfig.pageData.page = 1;
281 - this.searchBtn(); 283 + this.queryFindHsCodeList();
282 }, 284 },
283 //页码变化 285 //页码变化
284 handleCurrentChange(e) { 286 handleCurrentChange(e) {
285 this.pageConfig.pageData.page = e; 287 this.pageConfig.pageData.page = e;
286 - this.searchBtn(); 288 + this.queryFindHsCodeList();
287 }, 289 },
288 // table勾选 290 // table勾选
289 tableSelectionChange(val) { 291 tableSelectionChange(val) {
......
...@@ -27,7 +27,7 @@ export const tableAttr = { ...@@ -27,7 +27,7 @@ export const tableAttr = {
27 { 27 {
28 type: "primary", 28 type: "primary",
29 icon: "el-icon-upload", 29 icon: "el-icon-upload",
30 - btnName: "增加", 30 + btnName: "导入",
31 size: "mini", 31 size: "mini",
32 round: false, 32 round: false,
33 loading: false, 33 loading: false,
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
149 maxlength="1000" 149 maxlength="1000"
150 show-word-limit 150 show-word-limit
151 :rows="4" 151 :rows="4"
152 - placeholder="请输入原航班号" 152 + placeholder="原航班号之间用分号分隔,例:LP001;LP002"
153 @blur="blurEvent" 153 @blur="blurEvent"
154 :disabled="!getRouter" 154 :disabled="!getRouter"
155 ></el-input> 155 ></el-input>
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
170 <el-col :span="10" :offset="1"> 170 <el-col :span="10" :offset="1">
171 <el-input 171 <el-input
172 type="textarea" 172 type="textarea"
173 - v-model="serviceCode" 173 + v-model="queryForm.includeServiceType"
174 size="medium" 174 size="medium"
175 maxlength="1000" 175 maxlength="1000"
176 show-word-limit 176 show-word-limit
...@@ -253,7 +253,6 @@ ...@@ -253,7 +253,6 @@
253 <el-col :span="10"> 253 <el-col :span="10">
254 <el-input 254 <el-input
255 v-model.trim="queryForm.minWeight" 255 v-model.trim="queryForm.minWeight"
256 - clearable
257 placeholder="最小重量" 256 placeholder="最小重量"
258 @blur="inputBlurMinWeight($event)" 257 @blur="inputBlurMinWeight($event)"
259 :disabled="!getRouter" 258 :disabled="!getRouter"
...@@ -264,7 +263,6 @@ ...@@ -264,7 +263,6 @@
264 <el-col :span="10"> 263 <el-col :span="10">
265 <el-input 264 <el-input
266 v-model.trim="queryForm.maxWeight" 265 v-model.trim="queryForm.maxWeight"
267 - clearable
268 placeholder="最大重量" 266 placeholder="最大重量"
269 @blur="inputBlurMaxWeight($event)" 267 @blur="inputBlurMaxWeight($event)"
270 :disabled="!getRouter" 268 :disabled="!getRouter"
...@@ -278,7 +276,6 @@ ...@@ -278,7 +276,6 @@
278 <el-col :span="10"> 276 <el-col :span="10">
279 <el-input 277 <el-input
280 v-model.trim="queryForm.minNumOfPieces" 278 v-model.trim="queryForm.minNumOfPieces"
281 - clearable
282 placeholder="最少件数" 279 placeholder="最少件数"
283 @blur="inputBlurMinPieces($event)" 280 @blur="inputBlurMinPieces($event)"
284 :disabled="!getRouter" 281 :disabled="!getRouter"
...@@ -289,7 +286,6 @@ ...@@ -289,7 +286,6 @@
289 <el-col :span="10"> 286 <el-col :span="10">
290 <el-input 287 <el-input
291 v-model.trim="queryForm.maxNumOfPieces" 288 v-model.trim="queryForm.maxNumOfPieces"
292 - clearable
293 placeholder="最多件数" 289 placeholder="最多件数"
294 @blur="inputBlurMaxPieces($event)" 290 @blur="inputBlurMaxPieces($event)"
295 :disabled="!getRouter" 291 :disabled="!getRouter"
...@@ -309,7 +305,6 @@ ...@@ -309,7 +305,6 @@
309 <el-col :span="10"> 305 <el-col :span="10">
310 <el-input 306 <el-input
311 v-model.trim="minCNYCustomVal" 307 v-model.trim="minCNYCustomVal"
312 - clearable
313 placeholder="最小申报价值" 308 placeholder="最小申报价值"
314 @blur="inputBlurMin($event, 'minCNYCustomVal')" 309 @blur="inputBlurMin($event, 'minCNYCustomVal')"
315 :disabled="!getRouter" 310 :disabled="!getRouter"
...@@ -323,7 +318,6 @@ ...@@ -323,7 +318,6 @@
323 <el-col :span="10"> 318 <el-col :span="10">
324 <el-input 319 <el-input
325 v-model.trim="maxCNYCustomVal" 320 v-model.trim="maxCNYCustomVal"
326 - clearable
327 placeholder="最大申报价值" 321 placeholder="最大申报价值"
328 @blur="inputBlurMax($event, 'maxCNYCustomVal')" 322 @blur="inputBlurMax($event, 'maxCNYCustomVal')"
329 :disabled="!getRouter" 323 :disabled="!getRouter"
...@@ -336,7 +330,6 @@ ...@@ -336,7 +330,6 @@
336 <el-col :span="10"> 330 <el-col :span="10">
337 <el-input 331 <el-input
338 v-model.trim="minSUDCustomVal" 332 v-model.trim="minSUDCustomVal"
339 - clearable
340 placeholder="最小申报价值" 333 placeholder="最小申报价值"
341 @blur="inputBlurMin($event, 'minSUDCustomVal')" 334 @blur="inputBlurMin($event, 'minSUDCustomVal')"
342 :disabled="!getRouter" 335 :disabled="!getRouter"
...@@ -350,7 +343,6 @@ ...@@ -350,7 +343,6 @@
350 <el-col :span="10"> 343 <el-col :span="10">
351 <el-input 344 <el-input
352 v-model.trim="maxSUDCustomVal" 345 v-model.trim="maxSUDCustomVal"
353 - clearable
354 placeholder="最大申报价值" 346 placeholder="最大申报价值"
355 @blur="inputBlurMax($event, 'maxSUDCustomVal')" 347 @blur="inputBlurMax($event, 'maxSUDCustomVal')"
356 :disabled="!getRouter" 348 :disabled="!getRouter"
...@@ -538,9 +530,9 @@ export default { ...@@ -538,9 +530,9 @@ export default {
538 Object.keys(data.list.fltRuleDto).map((key) => { 530 Object.keys(data.list.fltRuleDto).map((key) => {
539 if (key == "multiHs") { 531 if (key == "multiHs") {
540 if (data.list.fltRuleDto[key] == "N") { 532 if (data.list.fltRuleDto[key] == "N") {
541 - data.list.fltRuleDto[key] = false;
542 - } else {
543 data.list.fltRuleDto[key] = true; 533 data.list.fltRuleDto[key] = true;
534 + } else {
535 + data.list.fltRuleDto[key] = false;
544 } 536 }
545 } 537 }
546 // 将详情获取为null的字段设置为空字符串,目的是为了判断的时候少些为null的判断,保持空数据同一的判断条件; 538 // 将详情获取为null的字段设置为空字符串,目的是为了判断的时候少些为null的判断,保持空数据同一的判断条件;
...@@ -548,6 +540,11 @@ export default { ...@@ -548,6 +540,11 @@ export default {
548 data.list.fltRuleDto[key] = ""; 540 data.list.fltRuleDto[key] = "";
549 } 541 }
550 }); 542 });
543 + if(data.list.fltRuleDto.declarationCategory){
544 + this.checkboxClassType = data.list.fltRuleDto.declarationCategory.split(';');
545 + }else{
546 + this.checkboxClassType = []
547 + }
551 this.queryForm = data.list.fltRuleDto; // ET86配舱航班顺位维度 548 this.queryForm = data.list.fltRuleDto; // ET86配舱航班顺位维度
552 } else { 549 } else {
553 this.msgError(msg || "获取查看失败"); 550 this.msgError(msg || "获取查看失败");
...@@ -743,12 +740,29 @@ export default { ...@@ -743,12 +740,29 @@ export default {
743 flightRankDtoList: tableData, // ET86配舱航班顺位 740 flightRankDtoList: tableData, // ET86配舱航班顺位
744 fltRuleDto: this.queryForm, 741 fltRuleDto: this.queryForm,
745 }; 742 };
746 - parmas.fltRuleDto.multiHs = this.queryForm.multiHs ? "Y" : "N"; // N为单品名,Y为多品名 743 + // 筛选重复的航班
747 - if (this.$route.query.name == "add") { 744 + let repeat = tableData.filter(
745 + (item) =>
746 + item.flightNo == tableData[this.currentIndex].flightNo &&
747 + item.calculateDay == tableData[this.currentIndex].calculateDay &&
748 + item.flightRoute == tableData[this.currentIndex].flightRoute
749 + );
750 + if (tableData.length > 100) {
751 + this.msgError("最多添加100条,请删除后再添加");
752 + return;
753 + }
754 + if (repeat.length > 1) {
755 + this.msgError("ET86配舱航班顺位中存在重复设置");
756 + return;
757 + }
758 + parmas.fltRuleDto.multiHs = this.queryForm.multiHs ? "N" : "Y"; // N为单品名,Y为多品名
759 + if (this.validateForm && this.$route.query.name == "add") {
748 this.postAdd(parmas); // 新增 760 this.postAdd(parmas); // 新增
749 } else { 761 } else {
762 + if (this.validateForm) {
750 this.postUpdate(parmas); // 修改 763 this.postUpdate(parmas); // 修改
751 } 764 }
765 + }
752 } else { 766 } else {
753 console.log("error submit!!"); 767 console.log("error submit!!");
754 return false; 768 return false;
......
...@@ -5,8 +5,9 @@ export const formConfig = [ ...@@ -5,8 +5,9 @@ export const formConfig = [
5 name: "originOfFlightNo", 5 name: "originOfFlightNo",
6 prop: "originOfFlightNo", 6 prop: "originOfFlightNo",
7 placeholder: "请输入原航班号", 7 placeholder: "请输入原航班号",
8 - span: 6, 8 + span: 5,
9 trigger: "blur", 9 trigger: "blur",
10 + labelWidth: "55px",
10 }, 11 },
11 { 12 {
12 label: "修改时间 从", 13 label: "修改时间 从",
...@@ -16,7 +17,7 @@ export const formConfig = [ ...@@ -16,7 +17,7 @@ export const formConfig = [
16 placeholder: "请选择开始时间", 17 placeholder: "请选择开始时间",
17 // rules: { required: true, message: "请选择开始时间", trigger: "blur" }, 18 // rules: { required: true, message: "请选择开始时间", trigger: "blur" },
18 format: "yyyy-MM-dd", 19 format: "yyyy-MM-dd",
19 - colWidth: "25%", 20 + colWidth: "23%",
20 inputWidth: "100%", 21 inputWidth: "100%",
21 }, 22 },
22 { 23 {
...@@ -27,7 +28,7 @@ export const formConfig = [ ...@@ -27,7 +28,7 @@ export const formConfig = [
27 placeholder: "请选择结束时间", 28 placeholder: "请选择结束时间",
28 // rules: { required: true, message: "请选择结束时间", trigger: "blur" }, 29 // rules: { required: true, message: "请选择结束时间", trigger: "blur" },
29 format: "yyyy-MM-dd", 30 format: "yyyy-MM-dd",
30 - colWidth: "19%", 31 + colWidth: "20%",
31 labelWidth: "20px", 32 labelWidth: "20px",
32 inputWidth: "100%", 33 inputWidth: "100%",
33 }, 34 },
...@@ -42,7 +43,8 @@ export const formConfig = [ ...@@ -42,7 +43,8 @@ export const formConfig = [
42 { 43 {
43 value: "1", 44 value: "1",
44 label: "有效", 45 label: "有效",
45 - }, { 46 + },
47 + {
46 value: "0", 48 value: "0",
47 label: "无效", 49 label: "无效",
48 }, 50 },
...@@ -50,7 +52,7 @@ export const formConfig = [ ...@@ -50,7 +52,7 @@ export const formConfig = [
50 label: "有效", 52 label: "有效",
51 value: "1", 53 value: "1",
52 }, 54 },
53 - colWidth: "20%", 55 + colWidth: "18%",
54 labelWidth: "70px", 56 labelWidth: "70px",
55 inputWidth: "100%", 57 inputWidth: "100%",
56 }, 58 },
......
...@@ -71,12 +71,27 @@ export default { ...@@ -71,12 +71,27 @@ export default {
71 }, 71 },
72 mounted() { 72 mounted() {
73 this.$nextTick(() => { 73 this.$nextTick(() => {
74 - this.tableAttr.maxHeight = window.innerHeight - restTableHeight(this.$refs); 74 + this.tableAttr.maxHeight =
75 + window.innerHeight - restTableHeight(this.$refs);
75 }); 76 });
76 }, 77 },
77 methods: { 78 methods: {
78 // ET86查询 79 // ET86查询
79 - queryFindAllEtesRules(params) { 80 + queryFindAllEtesRules() {
81 + const { page, size } = this.pageConfig.pageData;
82 + let params = {
83 + originOfFlightNo: this.queryForm.originOfFlightNo,
84 + updateTimeStart: this.queryForm.startTime
85 + ? this.queryForm.startTime
86 + : "",
87 + updateTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "",
88 + limitStart: (page - 1) * size,
89 + limitSize: size,
90 + status: this.queryForm.status,
91 + };
92 + if (this.queryForm.status == "有效") {
93 + params.status = "1";
94 + }
80 this.tableAttr.loadingTable = true; 95 this.tableAttr.loadingTable = true;
81 findAllEtesRules(params) 96 findAllEtesRules(params)
82 .then((res) => { 97 .then((res) => {
...@@ -101,34 +116,22 @@ export default { ...@@ -101,34 +116,22 @@ export default {
101 }, 116 },
102 // 搜索 117 // 搜索
103 searchBtn() { 118 searchBtn() {
104 - const { page, size } = this.pageConfig.pageData; 119 + this.pageConfig.pageData.page = 1;
105 - let params = { 120 + this.pageConfig.pageData.size = 10;
106 - originOfFlightNo: this.queryForm.originOfFlightNo,
107 - updateTimeStart: this.queryForm.startTime
108 - ? this.queryForm.startTime
109 - : "",
110 - updateTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "",
111 - limitStart: (page - 1) * size,
112 - limitSize: size,
113 - status: this.queryForm.status,
114 - };
115 - if (this.queryForm.status == "有效") {
116 - params.status = "1";
117 - }
118 this.$refs.ruleForm.handleSearch("ruleForm", (val) => { 121 this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
119 - this.queryFindAllEtesRules(params); 122 + this.queryFindAllEtesRules();
120 }); 123 });
121 }, 124 },
122 //条数变化 125 //条数变化
123 handleSizeChange(e) { 126 handleSizeChange(e) {
124 this.pageConfig.pageData.size = e; 127 this.pageConfig.pageData.size = e;
125 this.pageConfig.pageData.page = 1; 128 this.pageConfig.pageData.page = 1;
126 - this.searchBtn(); 129 + this.queryFindAllEtesRules();
127 }, 130 },
128 //页码变化 131 //页码变化
129 handleCurrentChange(e) { 132 handleCurrentChange(e) {
130 this.pageConfig.pageData.page = e; 133 this.pageConfig.pageData.page = e;
131 - this.searchBtn(); 134 + this.queryFindAllEtesRules();
132 }, 135 },
133 // 添加 136 // 添加
134 addBtn(item) { 137 addBtn(item) {
...@@ -167,7 +170,7 @@ export default { ...@@ -167,7 +170,7 @@ export default {
167 }, 170 },
168 // 删除 171 // 删除
169 deleteRow({ row }) { 172 deleteRow({ row }) {
170 - this.$confirm("是否确认删除", "提示", { 173 + this.$confirm("是否确认删除? 删除后该规则设置为无效,不可恢复", "提示", {
171 confirmButtonText: "确定", 174 confirmButtonText: "确定",
172 cancelButtonText: "取消", 175 cancelButtonText: "取消",
173 type: "warning", 176 type: "warning",
......
...@@ -50,19 +50,19 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ ...@@ -50,19 +50,19 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
50 label: "配载航班", 50 label: "配载航班",
51 prop: "rankFltNoStr", 51 prop: "rankFltNoStr",
52 align: "center", 52 align: "center",
53 - minWidth: 100, 53 + minWidth: 120,
54 }, 54 },
55 { 55 {
56 label: "航线", 56 label: "航线",
57 prop: "rankFltRouteStr", 57 prop: "rankFltRouteStr",
58 align: "center", 58 align: "center",
59 - minWidth: 100, 59 + minWidth: 140,
60 }, 60 },
61 { 61 {
62 label: "状态", 62 label: "状态",
63 prop: "status", 63 prop: "status",
64 align: "center", 64 align: "center",
65 - minWidth: 80, 65 + minWidth: 50,
66 render: (h, params) => { 66 render: (h, params) => {
67 const { row } = params; 67 const { row } = params;
68 return h("div", `${state[row.status]}`); 68 return h("div", `${state[row.status]}`);
...@@ -72,7 +72,7 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ ...@@ -72,7 +72,7 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
72 label: "修改时间", 72 label: "修改时间",
73 prop: "updateTime", 73 prop: "updateTime",
74 align: "center", 74 align: "center",
75 - minWidth: 120, 75 + minWidth: 80,
76 // sortable: true, 76 // sortable: true,
77 // "sort-method": (a, b) => a.createTime - b.createTime, 77 // "sort-method": (a, b) => a.createTime - b.createTime,
78 }, 78 },
...@@ -80,13 +80,13 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ ...@@ -80,13 +80,13 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
80 label: "修改人", 80 label: "修改人",
81 prop: "updateUserName", 81 prop: "updateUserName",
82 align: "center", 82 align: "center",
83 - minWidth: 80, 83 + minWidth: 60,
84 }, 84 },
85 { 85 {
86 label: "操作", 86 label: "操作",
87 prop: "operate", 87 prop: "operate",
88 align: "center", 88 align: "center",
89 - minWidth: 125, 89 + minWidth: 90,
90 fixed: "right", 90 fixed: "right",
91 render: (h, params) => { 91 render: (h, params) => {
92 let operateData = [] 92 let operateData = []
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
115 }, 115 },
116 rules: { 116 rules: {
117 skuName: [ 117 skuName: [
118 - { required: true, message: "请输入商品名称", trigger: "blur" }, 118 + { required: true, message: "请输入ShipmentDesc", trigger: "blur" },
119 ], 119 ],
120 }, 120 },
121 pageConfig: { 121 pageConfig: {
...@@ -141,12 +141,19 @@ export default { ...@@ -141,12 +141,19 @@ export default {
141 }, 141 },
142 mounted() { 142 mounted() {
143 this.$nextTick(() => { 143 this.$nextTick(() => {
144 - this.tableAttr.maxHeight = window.innerHeight - restTableHeight(this.$refs); 144 + this.tableAttr.maxHeight =
145 + window.innerHeight - restTableHeight(this.$refs);
145 }); 146 });
146 }, 147 },
147 methods: { 148 methods: {
148 // HScode黑名单查询 149 // HScode黑名单查询
149 - queryFindHsCodeList(params) { 150 + queryFindHsCodeList() {
151 + const { page, size } = this.pageConfig.pageData;
152 + let params = {
153 + limitStart: (page - 1) * size,
154 + limitSize: size,
155 + ...this.queryForm,
156 + };
150 this.tableAttr.loadingTable = true; 157 this.tableAttr.loadingTable = true;
151 findHsCodeList(params) 158 findHsCodeList(params)
152 .then((res) => { 159 .then((res) => {
...@@ -205,14 +212,10 @@ export default { ...@@ -205,14 +212,10 @@ export default {
205 }, 212 },
206 // 搜索 213 // 搜索
207 searchBtn() { 214 searchBtn() {
208 - const { page, size } = this.pageConfig.pageData; 215 + this.pageConfig.pageData.page = 1;
216 + this.pageConfig.pageData.size = 10;
209 this.$refs.ruleForm.handleSearch("ruleForm", (val) => { 217 this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
210 - let params = { 218 + this.queryFindHsCodeList();
211 - limitStart: (page - 1) * size,
212 - limitSize: size,
213 - ...this.queryForm,
214 - };
215 - this.queryFindHsCodeList(params);
216 }); 219 });
217 }, 220 },
218 // 确认对话框 221 // 确认对话框
...@@ -277,12 +280,12 @@ export default { ...@@ -277,12 +280,12 @@ export default {
277 handleSizeChange(e) { 280 handleSizeChange(e) {
278 this.pageConfig.pageData.size = e; 281 this.pageConfig.pageData.size = e;
279 this.pageConfig.pageData.page = 1; 282 this.pageConfig.pageData.page = 1;
280 - this.searchBtn(); 283 + this.queryFindHsCodeList();
281 }, 284 },
282 //页码变化 285 //页码变化
283 handleCurrentChange(e) { 286 handleCurrentChange(e) {
284 this.pageConfig.pageData.page = e; 287 this.pageConfig.pageData.page = e;
285 - this.searchBtn(); 288 + this.queryFindHsCodeList();
286 }, 289 },
287 // table勾选 290 // table勾选
288 tableSelectionChange(val) { 291 tableSelectionChange(val) {
......
...@@ -27,7 +27,7 @@ export const tableAttr = { ...@@ -27,7 +27,7 @@ export const tableAttr = {
27 { 27 {
28 type: "primary", 28 type: "primary",
29 icon: "el-icon-upload", 29 icon: "el-icon-upload",
30 - btnName: "增加", 30 + btnName: "导入",
31 size: "mini", 31 size: "mini",
32 round: false, 32 round: false,
33 loading: false, 33 loading: false,
......