Elements-SY

Merge branch 'test' into uat

1 +export const inputBlurValidate = {
2 + data(){
3 + return {
4 + queryForm: {
5 + minWeight: "",
6 + maxWeight: "",
7 + minNumOfPieces: "",
8 + maxNumOfPieces: "",
9 + },
10 + };
11 + },
12 + methods: {
13 + // 最小件数失焦事件
14 + inputBlurMinPieces({ target }) {
15 + this.validateNumOfPieces(target.value, "minNumOfPieces");
16 + },
17 + // 最大件数失焦事件
18 + inputBlurMaxPieces({ target }) {
19 + this.validateNumOfPieces(target.value, "maxNumOfPieces");
20 + },
21 + // 最小重量失焦事件
22 + inputBlurMinWeight({ target }) {
23 + this.validateWeight(target.value, "minWeight");
24 + },
25 + // 最大重量失焦事件
26 + inputBlurMaxWeight({ target }) {
27 + this.validateWeight(target.value, "maxWeight");
28 + },
29 + // 最小申报价值
30 + inputBlurMin({ target }, customVal) {
31 + this.validateCustomVal(target.value, customVal);
32 + },
33 + // 最大申报价值
34 + inputBlurMax({ target }, customVal) {
35 + this.validateCustomVal(target.value, customVal);
36 + },
37 + // 校验件数方法 【件数可以为空但件数不得为0】只能输入正整数
38 + validateNumOfPieces(value, pieces) {
39 + if (value.length) {
40 + this.queryForm[pieces] = Number(value);
41 + let markPieces = false;
42 + if (pieces == "minNumOfPieces" || pieces == "maxNumOfPieces") {
43 + if (this.queryForm.minNumOfPieces && this.queryForm.maxNumOfPieces) {
44 + markPieces = Number(this.queryForm.maxNumOfPieces) < Number(this.queryForm.minNumOfPieces);
45 + }
46 + }
47 + if (/^\d+$/.test(this.queryForm[pieces])) {
48 + if (markPieces) {
49 + if (this.queryForm.maxNumOfPieces < this.queryForm.minNumOfPieces) {
50 + if (Array.isArray(this.$refs.minNumOfPieces)) {
51 + this.msgError("最小件数不得大于最大件数");
52 + } else {
53 + this.$refs.minNumOfPieces.innerHTML = "";
54 + this.$refs.minNumOfPieces.innerHTML = "最小件数不得大于最大件数";
55 + }
56 + } else if (
57 + this.queryForm.minNumOfPieces < 1 || this.queryForm.maxNumOfPieces < 1
58 + ) {
59 + if (Array.isArray(this.$refs.minNumOfPieces)) {
60 + this.msgError("最小件数和最大件数不能小于1");
61 + } else {
62 + this.$refs.minNumOfPieces.innerHTML = "";
63 + this.$refs.minNumOfPieces.innerHTML = "最小件数和最大件数不能小于1";
64 + }
65 + } else {
66 + if (!Array.isArray(this.$refs.minNumOfPieces)) {
67 + this.$refs.minNumOfPieces.innerHTML = "";
68 + }
69 + }
70 + } else {
71 + if (value.length) {
72 + if (Number(value) < 1) {
73 + if (Array.isArray(this.$refs.minNumOfPieces)) {
74 + this.msgError("件数不得小于1");
75 + } else {
76 + this.$refs.minNumOfPieces.innerHTML = "";
77 + this.$refs.minNumOfPieces.innerHTML = "件数不得小于1";
78 + }
79 + } else {
80 + if (!Array.isArray(this.$refs.minNumOfPieces)) {
81 + this.$refs.minNumOfPieces.innerHTML = "";
82 + }
83 + }
84 + }
85 + }
86 + } else {
87 + if (Array.isArray(this.$refs.minNumOfPieces)) {
88 + this.msgError("请输入有效件数");
89 + } else {
90 + this.$refs.minNumOfPieces.innerHTML = "";
91 + this.$refs.minNumOfPieces.innerHTML = "请输入有效件数";
92 + }
93 + return false;
94 + }
95 + }
96 + },
97 + // 校验重量方法 【重量可以为空为0 && 最小/大重量的范围0~34KG】允许保留1~5位小数。
98 + validateWeight(value, weight) {
99 + if (value.length) {
100 + this.queryForm[weight] = Number(value);
101 + let markWeight = false;
102 + if (weight == "minWeight" || weight == "maxWeight") {
103 + if (this.queryForm.minWeight && this.queryForm.maxWeight) {
104 + markWeight = Number(this.queryForm.maxWeight) < Number(this.queryForm.minWeight);
105 + }
106 + }
107 + if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(this.queryForm[weight])) {
108 + if (this.queryForm[weight] >= 0) {
109 + if (markWeight) {
110 + if (Array.isArray(this.$refs.minWeight)) {
111 + this.msgError("最小重量不得大于最大重量");
112 + } else {
113 + this.$refs.minWeight.innerHTML = "";
114 + this.$refs.minWeight.innerHTML = "最小重量不得大于最大重量";
115 + }
116 + } else if (this.queryForm[weight] > 34) {
117 + if (Array.isArray(this.$refs.minWeight)) {
118 + this.msgError("最大重量不能大于34KG");
119 + } else {
120 + this.$refs.minWeight.innerHTML = "";
121 + this.$refs.minWeight.innerHTML = "最大重量不能大于34KG";
122 + }
123 + } else {
124 + if (!Array.isArray(this.$refs.minWeight)) {
125 + this.$refs.minWeight.innerHTML = "";
126 + }
127 + }
128 + } else {
129 + if (value.length) {
130 + if (Number(value) > 34) {
131 + if (Array.isArray(this.$refs.minWeight)) {
132 + this.msgError("最大重量不能大于34KG");
133 + } else {
134 + this.$refs.minWeight.innerHTML = "";
135 + this.$refs.minWeight.innerHTML = "最大重量不能大于34KG";
136 + }
137 + } else {
138 + if (!Array.isArray(this.$refs.minWeight)) {
139 + this.$refs.minWeight.innerHTML = "";
140 + }
141 + }
142 + }
143 + }
144 + } else {
145 + if (Array.isArray(this.$refs.minWeight)) {
146 + this.msgError("请输入正整数,小数保留5位");
147 + } else {
148 + this.$refs.minWeight.innerHTML = "";
149 + this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位";
150 + }
151 + return false;
152 + }
153 + }
154 + },
155 + // 报价值【申报价值可以为空为0】
156 + validateCustomVal(value, customVal) {
157 + if (value.length) {
158 + this.queryForm[customVal] = Number(value);
159 + let coin = {
160 + minCNYCustomVal: "minCNYCustomVal",
161 + maxCNYCustomVal: "minCNYCustomVal",
162 + minSUDCustomVal: "minSUDCustomVal",
163 + maxSUDCustomVal: "minSUDCustomVal",
164 + };
165 + let currency = {
166 + minCNYCustomVal: 2000,
167 + maxCNYCustomVal: 2000,
168 + minSUDCustomVal: 600,
169 + maxSUDCustomVal: 600,
170 + };
171 + let markCoin = false;
172 + if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") {
173 + if (this.queryForm.minCNYCustomVal && this.queryForm.maxCNYCustomVal) {
174 + markCoin = Number(this.queryForm.maxCNYCustomVal) < Number(this.queryForm.minCNYCustomVal);
175 + }
176 + } else {
177 + if (this.queryForm.minSUDCustomVal && this.queryForm.maxSUDCustomVal) {
178 + markCoin = Number(this.queryForm.maxSUDCustomVal) < Number(this.queryForm.minSUDCustomVal);
179 + }
180 + }
181 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this.queryForm[customVal])) {
182 + if (this.queryForm[customVal] >= 0) {
183 + if (markCoin) {
184 + this.$refs[coin[customVal]].innerHTML = "";
185 + this.$refs[coin[customVal]].innerHTML = "最小申报价值不得大于最大申报价值";
186 + } else if (this.queryForm[customVal] > currency[customVal]) {
187 + this.$refs[coin[customVal]].innerHTML = "";
188 + this.$refs[coin[customVal]].innerHTML = `最大申报值不得大于${currency[customVal]}`;
189 + } else {
190 + this.$refs[coin[customVal]].innerHTML = "";
191 + }
192 + } else {
193 + if (value.length) {
194 + if (Number(value) > currency[customVal]) {
195 + this.$refs[coin[customVal]].innerHTML = "";
196 + this.$refs[coin[customVal]].innerHTML = `最大申报值不得大于${currency[customVal]}`;
197 + } else {
198 + this.$refs[coin[customVal]].innerHTML = "";
199 + }
200 + }
201 + }
202 + } else {
203 + this.$refs[coin[customVal]].innerHTML = "";
204 + this.$refs[coin[customVal]].innerHTML = "请输入正确申报价值";
205 + return false;
206 + }
207 + }
208 + },
209 + },
210 +};
...@@ -303,7 +303,7 @@ export default { ...@@ -303,7 +303,7 @@ export default {
303 this.shiftKey = false; 303 this.shiftKey = false;
304 } 304 }
305 }); 305 });
306 - // this.tableHeight = window.innerHeight - this.$refs.form.$el.offsetHeight - 60; 306 + this.tableHeight = window.innerHeight - this.$refs.form.$el.offsetHeight - 60;
307 }, 307 },
308 methods: { 308 methods: {
309 //查询条件 309 //查询条件
......
...@@ -71,7 +71,11 @@ ...@@ -71,7 +71,11 @@
71 align="center" 71 align="center"
72 > 72 >
73 <template slot-scope="scope"> 73 <template slot-scope="scope">
74 - <el-select v-model="scope.row.fltRoute" placeholder="请选择" size="small"> 74 + <el-select
75 + v-model="scope.row.fltRoute"
76 + placeholder="请选择"
77 + size="small"
78 + >
75 <el-option 79 <el-option
76 v-for="item in scope.row.routeList" 80 v-for="item in scope.row.routeList"
77 :key="item.id" 81 :key="item.id"
...@@ -231,7 +235,7 @@ ...@@ -231,7 +235,7 @@
231 v-model.trim="queryForm.minWeight" 235 v-model.trim="queryForm.minWeight"
232 clearable 236 clearable
233 placeholder="最小重量" 237 placeholder="最小重量"
234 - @blur="inputBlur('minWeight')" 238 + @blur="inputBlurMinWeight($event)"
235 ></el-input> 239 ></el-input>
236 <span ref="minWeight" class="el-form-item__error"></span> 240 <span ref="minWeight" class="el-form-item__error"></span>
237 </el-col> 241 </el-col>
...@@ -241,7 +245,7 @@ ...@@ -241,7 +245,7 @@
241 v-model.trim="queryForm.maxWeight" 245 v-model.trim="queryForm.maxWeight"
242 clearable 246 clearable
243 placeholder="最大重量" 247 placeholder="最大重量"
244 - @blur="inputBlur('maxWeight')" 248 + @blur="inputBlurMaxWeight($event)"
245 ></el-input> 249 ></el-input>
246 </el-col> 250 </el-col>
247 </el-form-item> 251 </el-form-item>
...@@ -254,7 +258,7 @@ ...@@ -254,7 +258,7 @@
254 v-model.trim="queryForm.minNumOfPieces" 258 v-model.trim="queryForm.minNumOfPieces"
255 clearable 259 clearable
256 placeholder="最少件数" 260 placeholder="最少件数"
257 - @blur="inputBlur('minNumOfPieces')" 261 + @blur="inputBlurMinPieces($event)"
258 ></el-input> 262 ></el-input>
259 <span ref="minNumOfPieces" class="el-form-item__error"></span> 263 <span ref="minNumOfPieces" class="el-form-item__error"></span>
260 </el-col> 264 </el-col>
...@@ -264,7 +268,7 @@ ...@@ -264,7 +268,7 @@
264 v-model.trim="queryForm.maxNumOfPieces" 268 v-model.trim="queryForm.maxNumOfPieces"
265 clearable 269 clearable
266 placeholder="最多件数" 270 placeholder="最多件数"
267 - @blur="inputBlur('maxNumOfPieces')" 271 + @blur="inputBlurMaxPieces($event)"
268 ></el-input> 272 ></el-input>
269 </el-col> 273 </el-col>
270 </el-form-item> 274 </el-form-item>
...@@ -283,7 +287,7 @@ ...@@ -283,7 +287,7 @@
283 v-model.trim="queryForm.minCNYCustomVal" 287 v-model.trim="queryForm.minCNYCustomVal"
284 clearable 288 clearable
285 placeholder="最小申报价值" 289 placeholder="最小申报价值"
286 - @blur="inputBlur('minCNYCustomVal')" 290 + @blur="inputBlurMin($event, 'minCNYCustomVal')"
287 ></el-input> 291 ></el-input>
288 <span 292 <span
289 ref="minCNYCustomVal" 293 ref="minCNYCustomVal"
...@@ -296,7 +300,7 @@ ...@@ -296,7 +300,7 @@
296 v-model.trim="queryForm.maxCNYCustomVal" 300 v-model.trim="queryForm.maxCNYCustomVal"
297 clearable 301 clearable
298 placeholder="最大申报价值" 302 placeholder="最大申报价值"
299 - @blur="inputBlur('maxCNYCustomVal')" 303 + @blur="inputBlurMax($event, 'maxCNYCustomVal')"
300 ></el-input> 304 ></el-input>
301 </el-col> 305 </el-col>
302 </el-form-item> 306 </el-form-item>
...@@ -308,7 +312,7 @@ ...@@ -308,7 +312,7 @@
308 v-model.trim="queryForm.minSUDCustomVal" 312 v-model.trim="queryForm.minSUDCustomVal"
309 clearable 313 clearable
310 placeholder="最小申报价值" 314 placeholder="最小申报价值"
311 - @blur="inputBlur('minSUDCustomVal')" 315 + @blur="inputBlurMin($event, 'minSUDCustomVal')"
312 ></el-input> 316 ></el-input>
313 <span 317 <span
314 ref="minSUDCustomVal" 318 ref="minSUDCustomVal"
...@@ -321,7 +325,7 @@ ...@@ -321,7 +325,7 @@
321 v-model.trim="queryForm.maxSUDCustomVal" 325 v-model.trim="queryForm.maxSUDCustomVal"
322 clearable 326 clearable
323 placeholder="最大申报价值" 327 placeholder="最大申报价值"
324 - @blur="inputBlur('maxSUDCustomVal')" 328 + @blur="inputBlurMax($event, 'maxSUDCustomVal')"
325 ></el-input> 329 ></el-input>
326 </el-col> 330 </el-col>
327 </el-form-item> 331 </el-form-item>
...@@ -345,6 +349,7 @@ import YlForm from "@/components/YlForm"; ...@@ -345,6 +349,7 @@ import YlForm from "@/components/YlForm";
345 import YlTable from "@/components/YlTable"; 349 import YlTable from "@/components/YlTable";
346 import { formConfig } from "./formConfig"; 350 import { formConfig } from "./formConfig";
347 import { debounce } from "@/utils"; 351 import { debounce } from "@/utils";
352 +import { inputBlurValidate } from "@/utils/mixins";
348 import { tableAttr } from "./tableConfig"; 353 import { tableAttr } from "./tableConfig";
349 import { 354 import {
350 allDictData, // 获取全部字典 355 allDictData, // 获取全部字典
...@@ -358,7 +363,7 @@ export default { ...@@ -358,7 +363,7 @@ export default {
358 YlForm, 363 YlForm,
359 YlTable, 364 YlTable,
360 }, 365 },
361 - mixins: [indexMixins], 366 + mixins: [indexMixins, inputBlurValidate],
362 data() { 367 data() {
363 return { 368 return {
364 formConfig: formConfig, // 表单配置项 369 formConfig: formConfig, // 表单配置项
...@@ -372,10 +377,10 @@ export default { ...@@ -372,10 +377,10 @@ export default {
372 cargoType: [], // 申报类别调用接口获取所有的申报类别 377 cargoType: [], // 申报类别调用接口获取所有的申报类别
373 checkboxCargoType: [], // 已勾选申报类别的数据 378 checkboxCargoType: [], // 已勾选申报类别的数据
374 singleName: false, // 单品名 379 singleName: false, // 单品名
375 - minWeight: null, 380 + minWeight: "",
376 - maxWeight: null, 381 + maxWeight: "",
377 - minNumOfPieces: null, 382 + minNumOfPieces: "",
378 - maxNumOfPieces: null, 383 + maxNumOfPieces: "",
379 minCNYCustomVal: "", // 384 minCNYCustomVal: "", //
380 maxCNYCustomVal: "", // 385 maxCNYCustomVal: "", //
381 minSUDCustomVal: "", // 386 minSUDCustomVal: "", //
...@@ -556,45 +561,6 @@ export default { ...@@ -556,45 +561,6 @@ export default {
556 this.queryForm.checkboxCargoType = include; //已勾选申报类别的数据 561 this.queryForm.checkboxCargoType = include; //已勾选申报类别的数据
557 // console.log(arr, include); 562 // console.log(arr, include);
558 }, 563 },
559 - // 重量、件数、申报值input失焦事件
560 - inputBlur(name) {
561 - let coin = {
562 - minCNYCustomVal: "CNY",
563 - maxCNYCustomVal: "CNY",
564 - minSUDCustomVal: "USD",
565 - maxSUDCustomVal: "USD",
566 - };
567 - if (name == "minWeight") {
568 - // 最小重量
569 - this.validateMaxWeight("maxWeight");
570 - this.validateMinWeight(name);
571 - }
572 - if (name == "maxWeight") {
573 - // 最大重量
574 - this.validateMinWeight("minWeight");
575 - this.validateMaxWeight(name);
576 - }
577 - if (name == "minNumOfPieces") {
578 - // 最小件数
579 - this.validateMaxPieces("maxNumOfPieces");
580 - this.validateMinPieces(name);
581 - }
582 - if (name == "maxNumOfPieces") {
583 - // 最大件数
584 - this.validateMinPieces("minNumOfPieces");
585 - this.validateMaxPieces(name);
586 - }
587 - if (name == "minCNYCustomVal" || name == "minSUDCustomVal") {
588 - // 最小申报值(CNY/USD)
589 - this.validateMaxCustomVal(coin[name]);
590 - this.validateMinCustomVal(coin[name]);
591 - }
592 - if (name == "maxCNYCustomVal" || name == "maxSUDCustomVal") {
593 - // 最大申报值(CNY/USD)
594 - this.validateMinCustomVal(coin[name]);
595 - this.validateMaxCustomVal(coin[name]);
596 - }
597 - },
598 // 表单提交 564 // 表单提交
599 submitForm(formName) { 565 submitForm(formName) {
600 this.$refs[formName].validate((valid) => { 566 this.$refs[formName].validate((valid) => {
...@@ -602,8 +568,8 @@ export default { ...@@ -602,8 +568,8 @@ export default {
602 let parmas = { 568 let parmas = {
603 fltInfoList: this.tableData, 569 fltInfoList: this.tableData,
604 ...this.queryForm, 570 ...this.queryForm,
605 - } 571 + };
606 - parmas.singleName = this.queryForm.singleName ? 'Y' : 'N'; // N为单品名,Y为多品名 572 + parmas.singleName = this.queryForm.singleName ? "Y" : "N"; // N为单品名,Y为多品名
607 console.log(parmas); 573 console.log(parmas);
608 } else { 574 } else {
609 console.log("error submit!!"); 575 console.log("error submit!!");
......
...@@ -56,303 +56,5 @@ export default { ...@@ -56,303 +56,5 @@ export default {
56 } 56 }
57 } 57 }
58 }, 58 },
59 -
60 - // 最小重量 【重量可以为空为0 && 最小/大重量的范围0~34KG】允许保留1~5位小数。
61 - validateMinWeight(name) {
62 - if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm[name]))) {
63 - if (this.queryForm[name] && this.queryForm.maxWeight) {
64 - if (Number(this.queryForm[name]) > Number(this.queryForm.maxWeight)) {
65 - this.$refs.minWeight.innerHTML = "";
66 - this.$refs.minWeight.innerHTML = "最小重量不得大于最大重量";
67 - return false;
68 - } else if (Number(this.queryForm[name]) > 34) {
69 - this.$refs.minWeight.innerHTML = "";
70 - this.$refs.minWeight.innerHTML = "最大重量34KG";
71 - return false;
72 - } else {
73 - this.$refs.minWeight.innerHTML = "";
74 - }
75 - }
76 - else if (Number(this.queryForm[name]) > 34) {
77 - this.$refs.minWeight.innerHTML = "";
78 - this.$refs.minWeight.innerHTML =
79 - "最小重量大于0~34,并且最小重量不得大于最大重量";
80 - return false;
81 - } else {
82 - this.$refs.minWeight.innerHTML = "";
83 - }
84 - } else {
85 - this.$refs.minWeight.innerHTML = "";
86 - this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位";
87 - return false;
88 - }
89 - },
90 - // 最大重量 【重量可以为空为0 && 最小/大重量的范围0~34KG】允许保留1~5位小数。
91 - validateMaxWeight(name) {
92 - if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm[name]))) {
93 - if (this.queryForm[name] && this.queryForm.minWeight) {
94 - if (Number(this.queryForm[name]) < Number(this.queryForm.minWeight)) {
95 - this.$refs.minWeight.innerHTML = "";
96 - this.$refs.minWeight.innerHTML =
97 - "最大重量大于0~34,并且最大重量不得小于最小重量";
98 - return false;
99 - } else {
100 - this.$refs.minWeight.innerHTML = "";
101 - }
102 - if (Number(this.queryForm[name]) > 34) {
103 - this.$refs.minWeight.innerHTML = "";
104 - this.$refs.minWeight.innerHTML = "最大重量34KG";
105 - return false;
106 - }
107 - }
108 - else if (Number(this.queryForm[name]) > 34) {
109 - this.$refs.minWeight.innerHTML = "";
110 - this.$refs.minWeight.innerHTML =
111 - "最大重量大于0~34,并且最大重量不得小于最小重量";
112 - return false;
113 - }
114 - else {
115 - this.$refs.minWeight.innerHTML = "";
116 - }
117 - } else {
118 - this.$refs.minWeight.innerHTML = "";
119 - this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位";
120 - return false;
121 - }
122 - },
123 - // 最小件数 【件数可以为空但件数不得为0】只能输入正整数
124 - validateMinPieces(name) {
125 - if (/^\d+$/.test(Number(this.queryForm[name]))) {
126 - if (this.queryForm[name] && this.queryForm.maxNumOfPieces) {
127 - if (
128 - Number(this.queryForm[name]) > Number(this.queryForm.maxNumOfPieces)
129 - ) {
130 - this.$refs.minNumOfPieces.innerHTML = "";
131 - this.$refs.minNumOfPieces.innerHTML = "最小件数不得大于最大件数";
132 - } else if (
133 - Number(this.queryForm[name]) < 1 ||
134 - Number(this.queryForm.maxNumOfPieces) < 1
135 - ) {
136 - this.$refs.minNumOfPieces.innerHTML = "";
137 - this.$refs.minNumOfPieces.innerHTML = "最小件数和最大件数不能小于1";
138 - } else {
139 - this.$refs.minNumOfPieces.innerHTML = "";
140 - return true;
141 - }
142 - } else if (
143 - this.queryForm[name] !== null &&
144 - this.queryForm[name] !== ""
145 - ) {
146 - if (Number(this.queryForm[name]) < 1) {
147 - this.$refs.minNumOfPieces.innerHTML = "";
148 - this.$refs.minNumOfPieces.innerHTML = "最小件数和最大件数不能小于1";
149 - } else if (Number(this.queryForm[name]) > 100) {
150 - this.$refs.minNumOfPieces.innerHTML = "";
151 - this.$refs.minNumOfPieces.innerHTML =
152 - "最小件数和最大件数不能大于100";
153 - } else {
154 - this.$refs.minNumOfPieces.innerHTML = "";
155 - return true;
156 - }
157 - } else {
158 - this.$refs.minNumOfPieces.innerHTML = "";
159 - }
160 - } else {
161 - this.$refs.minNumOfPieces.innerHTML = "";
162 - this.$refs.minNumOfPieces.innerHTML = "请输入有效件数";
163 - return false;
164 - }
165 - },
166 - // 最大件数【件数可以为空但件数不得为0】只能输入正整数
167 - validateMaxPieces(name) {
168 - if (/^\d+$/.test(Number(this.queryForm[name]))) {
169 - if (this.queryForm[name] && this.queryForm.minNumOfPieces) {
170 - if (
171 - Number(this.queryForm[name]) < Number(this.queryForm.minNumOfPieces)
172 - ) {
173 - this.$refs.minNumOfPieces.innerHTML = "";
174 - this.$refs.minNumOfPieces.innerHTML = "最大件数不得小于最小件数";
175 - } else if (
176 - Number(this.queryForm[name]) < 1 ||
177 - Number(this.queryForm.minNumOfPieces) < 1
178 - ) {
179 - this.$refs.minNumOfPieces.innerHTML = "";
180 - this.$refs.minNumOfPieces.innerHTML = "最小件数和最大件数不能小于1";
181 - return false;
182 - } else {
183 - this.$refs.minNumOfPieces.innerHTML = "";
184 - return true;
185 - }
186 - } else if (
187 - this.queryForm[name] !== null &&
188 - this.queryForm[name] !== ""
189 - ) {
190 - if (Number(this.queryForm[name]) < 1) {
191 - this.$refs.minNumOfPieces.innerHTML = "";
192 - this.$refs.minNumOfPieces.innerHTML = "最小件数和最大件数不能小于1";
193 - } else if (Number(this.queryForm[name]) > 100) {
194 - this.$refs.minNumOfPieces.innerHTML = "";
195 - this.$refs.minNumOfPieces.innerHTML =
196 - "最小件数和最大件数不能大于100";
197 - } else {
198 - this.$refs.minNumOfPieces.innerHTML = "";
199 - return true;
200 - }
201 - } else {
202 - this.$refs.minNumOfPieces.innerHTML = "";
203 - }
204 - } else {
205 - this.$refs.minNumOfPieces.innerHTML = "";
206 - this.$refs.minNumOfPieces.innerHTML = "请输入有效件数";
207 - return false;
208 - }
209 - },
210 -
211 - // 最小申报价值【申报价值可以为空为0】
212 - validateMinCustomVal(name) {
213 - // 申报价值
214 - let value =
215 - this.queryForm.minCNYCustomVal || this.queryForm.minSUDCustomVal;
216 - let regexp = /^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(value));
217 - if (regexp) {
218 - if (name == "USD" || name == "美元") {
219 - // 申报价值(美元)0~600
220 - if (
221 - this.queryForm.minSUDCustomVal &&
222 - this.queryForm.maxSUDCustomVal
223 - ) {
224 - if (
225 - Number(this.queryForm.minSUDCustomVal) >
226 - Number(this.queryForm.maxSUDCustomVal)
227 - ) {
228 - this.$refs.minSUDCustomVal.innerHTML =
229 - "最小申报价值不得大于最大申报价值";
230 - return false;
231 - } else {
232 - this.$refs.minSUDCustomVal.innerHTML = "";
233 - }
234 - if (Number(this.queryForm.minSUDCustomVal) > 600) {
235 - this.$refs.minSUDCustomVal.innerHTML = "";
236 - this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
237 - return false;
238 - }
239 - }
240 - else if (Number(this.queryForm.minSUDCustomVal) > 600) {
241 - this.$refs.minSUDCustomVal.innerHTML = "";
242 - this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
243 - return false;
244 - } else {
245 - this.$refs.minSUDCustomVal.innerHTML = "";
246 - return true;
247 - }
248 - } else {
249 - // 申报价值(人民币)0~2000
250 - if (
251 - this.queryForm.minCNYCustomVal &&
252 - this.queryForm.maxCNYCustomVal
253 - ) {
254 - if (
255 - Number(this.queryForm.minCNYCustomVal) >
256 - Number(this.queryForm.maxCNYCustomVal)
257 - ) {
258 - this.$refs.minCNYCustomVal.innerHTML =
259 - "最小申报价值不得大于最大申报价值";
260 - return false;
261 - } else {
262 - this.$refs.minCNYCustomVal.innerHTML = "";
263 - }
264 - if (Number(this.queryForm.minCNYCustomVal) > 2000) {
265 - this.$refs.minCNYCustomVal.innerHTML = "";
266 - this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
267 - return false;
268 - }
269 - }
270 - else if (Number(this.queryForm.minCNYCustomVal) > 2000) {
271 - this.$refs.minCNYCustomVal.innerHTML = "";
272 - this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
273 - return false;
274 - } else {
275 - this.$refs.minCNYCustomVal.innerHTML = "";
276 - return true;
277 - }
278 - }
279 - } else {
280 - this.$refs.minCNYCustomVal.innerHTML = "";
281 - this.$refs.minCNYCustomVal.innerHTML = "请输入正确申报价值";
282 - return false;
283 - }
284 - },
285 - // 最大申报价值【申报价值可以为空为0】
286 - validateMaxCustomVal(name) {
287 - let value =
288 - this.queryForm.maxCNYCustomVal || this.queryForm.maxSUDCustomVal;
289 - let regexp = /^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(value));
290 - if (regexp) {
291 - if (name == "USD" || name == "美元") { // 申报价值(美元)0~600
292 - if (
293 - this.queryForm.minSUDCustomVal &&
294 - this.queryForm.maxSUDCustomVal
295 - ) {
296 - if (
297 - Number(this.queryForm.minSUDCustomVal) >
298 - Number(this.queryForm.maxSUDCustomVal)
299 - ) {
300 - this.$refs.minSUDCustomVal.innerHTML =
301 - "最小申报价值不得大于最大申报价值";
302 - return false;
303 - } else {
304 - this.$refs.minSUDCustomVal.innerHTML = "";
305 - }
306 - if (Number(this.queryForm.maxSUDCustomVal) > 600) {
307 - this.$refs.minSUDCustomVal.innerHTML = "";
308 - this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
309 - return false;
310 - }
311 - }
312 - else if (Number(this.queryForm.maxSUDCustomVal) > 600) {
313 - this.$refs.minSUDCustomVal.innerHTML = "";
314 - this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
315 - return false;
316 - } else {
317 - this.$refs.minSUDCustomVal.innerHTML = "";
318 - return true;
319 - }
320 - } else {
321 - // 申报价值(人民币)0~2000
322 - if (
323 - this.queryForm.minCNYCustomVal &&
324 - this.queryForm.maxCNYCustomVal
325 - ) {
326 - if (
327 - Number(this.queryForm.minCNYCustomVal) >
328 - Number(this.queryForm.maxCNYCustomVal)
329 - ) {
330 - this.$refs.minCNYCustomVal.innerHTML =
331 - "最小申报价值不得大于最大申报价值";
332 - return false;
333 - } else {
334 - this.$refs.minCNYCustomVal.innerHTML = "";
335 - }
336 - if (Number(this.queryForm.maxCNYCustomVal) > 2000) {
337 - this.$refs.minCNYCustomVal.innerHTML = "";
338 - this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
339 - return false;
340 - }
341 - }
342 - else if (Number(this.queryForm.maxCNYCustomVal) > 2000) {
343 - this.$refs.minCNYCustomVal.innerHTML = "";
344 - this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
345 - return false;
346 - } else {
347 - this.$refs.minCNYCustomVal.innerHTML = "";
348 - return true;
349 - }
350 - }
351 - } else {
352 - this.$refs.minCNYCustomVal.innerHTML = "";
353 - this.$refs.maxCNYCustomVal.innerHTML = "请输入正确申报价值";
354 - return false;
355 - }
356 - },
357 }, 59 },
358 }; 60 };
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
106 } 106 }
107 }, 107 },
108 mounted() { 108 mounted() {
109 - // this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200; 109 + this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200;
110 }, 110 },
111 activated() { 111 activated() {
112 this.getList() 112 this.getList()
......
...@@ -150,14 +150,19 @@ ...@@ -150,14 +150,19 @@
150 <el-col :span="10"> 150 <el-col :span="10">
151 <el-input class="numberInput" v-model.trim="val.minNumOfPieces" 151 <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
152 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 152 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
153 - @input="change($event)"> 153 + @input="change($event)"
154 + @blur="inputBlurMinPieces($event)"
155 + >
154 </el-input> 156 </el-input>
157 + <span ref="minNumOfPieces" class="el-form-item__error"></span>
155 </el-col> 158 </el-col>
156 <el-col style="text-align: center" :span="1">-</el-col> 159 <el-col style="text-align: center" :span="1">-</el-col>
157 <el-col :span="10"> 160 <el-col :span="10">
158 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" 161 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
159 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 162 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
160 - @input="change($event)"> 163 + @input="change($event)"
164 + @blur="inputBlurMaxPieces($event)"
165 + >
161 </el-input> 166 </el-input>
162 </el-col> 167 </el-col>
163 </el-form-item> 168 </el-form-item>
...@@ -167,14 +172,19 @@ ...@@ -167,14 +172,19 @@
167 <el-col :span="10"> 172 <el-col :span="10">
168 <el-input class="numberInput" v-model.trim="val.minWeight" 173 <el-input class="numberInput" v-model.trim="val.minWeight"
169 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 174 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
170 - @input="change($event)"> 175 + @input="change($event)"
176 + @blur="inputBlurMinWeight($event)"
177 + >
171 </el-input> 178 </el-input>
179 + <span ref="minWeight" class="el-form-item__error"></span>
172 </el-col> 180 </el-col>
173 <el-col style="text-align: center" :span="1">-</el-col> 181 <el-col style="text-align: center" :span="1">-</el-col>
174 <el-col :span="10"> 182 <el-col :span="10">
175 <el-input class="numberInput" v-model.trim="val.maxWeight" 183 <el-input class="numberInput" v-model.trim="val.maxWeight"
176 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 184 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
177 - @input="change($event)"> 185 + @input="change($event)"
186 + @blur="inputBlurMaxWeight($event)"
187 + >
178 </el-input> 188 </el-input>
179 </el-col> 189 </el-col>
180 </el-form-item> 190 </el-form-item>
...@@ -409,14 +419,19 @@ ...@@ -409,14 +419,19 @@
409 <el-col :span="10"> 419 <el-col :span="10">
410 <el-input class="numberInput" v-model.trim="val.minNumOfPieces" 420 <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
411 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 421 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
412 - @input="change($event)"> 422 + @input="change($event)"
423 + @blur="inputBlurMinPieces($event)"
424 + >
413 </el-input> 425 </el-input>
426 + <span ref="minNumOfPieces" class="el-form-item__error"></span>
414 </el-col> 427 </el-col>
415 <el-col style="text-align: center" :span="1">-</el-col> 428 <el-col style="text-align: center" :span="1">-</el-col>
416 <el-col :span="10"> 429 <el-col :span="10">
417 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" 430 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
418 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 431 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
419 - @input="change($event)"> 432 + @input="change($event)"
433 + @blur="inputBlurMaxPieces($event)"
434 + >
420 </el-input> 435 </el-input>
421 </el-col> 436 </el-col>
422 </el-form-item> 437 </el-form-item>
...@@ -426,14 +441,19 @@ ...@@ -426,14 +441,19 @@
426 <el-col :span="10"> 441 <el-col :span="10">
427 <el-input class="numberInput" v-model.trim="val.minWeight" 442 <el-input class="numberInput" v-model.trim="val.minWeight"
428 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 443 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
429 - @input="change($event)"> 444 + @input="change($event)"
445 + @blur="inputBlurMinWeight($event)"
446 + >
430 </el-input> 447 </el-input>
448 + <span ref="minWeight" class="el-form-item__error"></span>
431 </el-col> 449 </el-col>
432 <el-col style="text-align: center" :span="1">-</el-col> 450 <el-col style="text-align: center" :span="1">-</el-col>
433 <el-col :span="10"> 451 <el-col :span="10">
434 <el-input class="numberInput" v-model.trim="val.maxWeight" 452 <el-input class="numberInput" v-model.trim="val.maxWeight"
435 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 453 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
436 - @input="change($event)"> 454 + @input="change($event)"
455 + @blur="inputBlurMaxWeight($event)"
456 + >
437 </el-input> 457 </el-input>
438 </el-col> 458 </el-col>
439 </el-form-item> 459 </el-form-item>
...@@ -584,9 +604,10 @@ import { ...@@ -584,9 +604,10 @@ import {
584 findByFlightId, 604 findByFlightId,
585 queryRouteByFltNo 605 queryRouteByFltNo
586 } from "@/api/destinationFlight"; 606 } from "@/api/destinationFlight";
587 - 607 +import { inputBlurValidate } from "@/utils/mixins";
588 export default { 608 export default {
589 name: 'FlightAllocConfigInfo', 609 name: 'FlightAllocConfigInfo',
610 + mixins: [inputBlurValidate],
590 data() { 611 data() {
591 return { 612 return {
592 infoForm: { 613 infoForm: {
...@@ -623,7 +644,6 @@ export default { ...@@ -623,7 +644,6 @@ export default {
623 } 644 }
624 }, 645 },
625 created() { 646 created() {
626 - // console.log(this.$route.params)
627 this.dictData() 647 this.dictData()
628 this.status = this.$route.params.handle 648 this.status = this.$route.params.handle
629 this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false 649 this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false
...@@ -738,7 +758,6 @@ export default { ...@@ -738,7 +758,6 @@ export default {
738 this.infoForm.fltDate = res.data.list.ruleDate 758 this.infoForm.fltDate = res.data.list.ruleDate
739 this.infoForm.route = res.data.list.flightRoute 759 this.infoForm.route = res.data.list.flightRoute
740 this.infoForm.list.push(this.dataHandle(res.data.list)) 760 this.infoForm.list.push(this.dataHandle(res.data.list))
741 - console.log('A:', this.infoForm.list)
742 } else { 761 } else {
743 this.isEmpty = true 762 this.isEmpty = true
744 } 763 }
...@@ -778,7 +797,6 @@ export default { ...@@ -778,7 +797,6 @@ export default {
778 res.data.list.forEach(item => { 797 res.data.list.forEach(item => {
779 this.infoForm.list.push(this.dataHandle(item)) 798 this.infoForm.list.push(this.dataHandle(item))
780 }) 799 })
781 - console.log('B:', this.infoForm.list)
782 } else { 800 } else {
783 //航班类型为Purple Tail则显示所有航线维度 801 //航班类型为Purple Tail则显示所有航线维度
784 this.routeList.forEach(route => { 802 this.routeList.forEach(route => {
...@@ -800,7 +818,6 @@ export default { ...@@ -800,7 +818,6 @@ export default {
800 }) 818 })
801 } 819 }
802 }) 820 })
803 - console.log('C:', this.infoForm.list)
804 } 821 }
805 } else { 822 } else {
806 //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度) 823 //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
...@@ -823,7 +840,6 @@ export default { ...@@ -823,7 +840,6 @@ export default {
823 }) 840 })
824 } 841 }
825 }) 842 })
826 - console.log('D:', this.infoForm.list)
827 } 843 }
828 } else { 844 } else {
829 //未请求到数据 845 //未请求到数据
...@@ -851,7 +867,6 @@ export default { ...@@ -851,7 +867,6 @@ export default {
851 }) 867 })
852 this.infoForm.list.push(this.dataHandle(item)) 868 this.infoForm.list.push(this.dataHandle(item))
853 }) 869 })
854 - console.log('E:', this.infoForm.list)
855 } else { 870 } else {
856 //航班类型Purple Tail展示全部航线维度 871 //航班类型Purple Tail展示全部航线维度
857 let routesStatus = 1 872 let routesStatus = 1
...@@ -875,7 +890,6 @@ export default { ...@@ -875,7 +890,6 @@ export default {
875 }) 890 })
876 } 891 }
877 }) 892 })
878 - console.log('F:', this.infoForm.list)
879 } 893 }
880 } else { 894 } else {
881 //未查询到,插入占位基础数据使用户新建 895 //未查询到,插入占位基础数据使用户新建
...@@ -891,7 +905,6 @@ export default { ...@@ -891,7 +905,6 @@ export default {
891 }) 905 })
892 } 906 }
893 }) 907 })
894 - console.log('G:', this.infoForm.list)
895 } else { 908 } else {
896 //航班类型Purple Tail展示全部航线维度 909 //航班类型Purple Tail展示全部航线维度
897 // this.isEmpty = true 910 // this.isEmpty = true
...@@ -903,7 +916,6 @@ export default { ...@@ -903,7 +916,6 @@ export default {
903 routePriority: route.routePriority, 916 routePriority: route.routePriority,
904 }) 917 })
905 }) 918 })
906 - console.log('H:', this.infoForm.list)
907 } 919 }
908 } 920 }
909 }).catch(err => { 921 }).catch(err => {
...@@ -946,7 +958,6 @@ export default { ...@@ -946,7 +958,6 @@ export default {
946 }) 958 })
947 } 959 }
948 }) 960 })
949 - console.log('I:', this.infoForm.list)
950 } else { 961 } else {
951 this.routeList.forEach((route) => { 962 this.routeList.forEach((route) => {
952 this.infoForm.list.push({ 963 this.infoForm.list.push({
...@@ -956,7 +967,6 @@ export default { ...@@ -956,7 +967,6 @@ export default {
956 routePriority: route.routePriority, 967 routePriority: route.routePriority,
957 }) 968 })
958 }) 969 })
959 - console.log('J:', this.infoForm.list)
960 } 970 }
961 }).catch(err => { 971 }).catch(err => {
962 this.isEmpty = true 972 this.isEmpty = true
...@@ -971,7 +981,6 @@ export default { ...@@ -971,7 +981,6 @@ export default {
971 routePriority: route.routePriority, 981 routePriority: route.routePriority,
972 }) 982 })
973 }) 983 })
974 - console.log('K:', this.infoForm.list)
975 } 984 }
976 } 985 }
977 } 986 }
...@@ -1003,7 +1012,6 @@ export default { ...@@ -1003,7 +1012,6 @@ export default {
1003 routePriority: item.ordinal 1012 routePriority: item.ordinal
1004 }) 1013 })
1005 }) 1014 })
1006 - console.log('L:', this.infoForm.list)
1007 } else { 1015 } else {
1008 this.msgWarning('未查询到航线信息!') 1016 this.msgWarning('未查询到航线信息!')
1009 this.routeList = [] 1017 this.routeList = []
...@@ -1026,7 +1034,7 @@ export default { ...@@ -1026,7 +1034,7 @@ export default {
1026 this.msgWarning('件数前区间不能大于后区间') 1034 this.msgWarning('件数前区间不能大于后区间')
1027 } else if (new Number(data.minWeight) > new Number(data.maxWeight)) { 1035 } else if (new Number(data.minWeight) > new Number(data.maxWeight)) {
1028 this.msgWarning('重量前区间不能大于后区间') 1036 this.msgWarning('重量前区间不能大于后区间')
1029 - } else if (data.handlingCode == '' && data.serviceCode == '' && data.subCategory == '' && data.typeOfGoods == '' && data.puporpuxCode == '' && (!data.location || data.location == '') && data.notLocation == '' && (data.includeUrsa == null || data.includeUrsa == '') && (data.notIncludeUrsa == null || data.notIncludeUrsa == '') && (!data.minNumOfPieces || data.minNumOfPieces == '') && (!data.maxNumOfPieces || data.maxNumOfPieces == '') && (!data.minWeight || data.minWeight == '') && (!data.maxWeight || data.maxWeight == '') && (data.destinationSite == null || destinationSite == '') && (data.notDestinationSite == null || data.notDestinationSite == '')) { 1037 + } else if (data.handlingCode == '' && data.serviceCode == '' && data.subCategory == '' && data.typeOfGoods == '' && data.puporpuxCode == '' && (!data.location || data.location == '') && data.notLocation == '' && (!data.destinationSite || data.destinationSite == '') && data.notDestinationSite && (data.includeUrsa == null || data.includeUrsa == '') && (data.notIncludeUrsa == null || data.notIncludeUrsa == '') && (!data.minNumOfPieces || data.minNumOfPieces == '') && (!data.maxNumOfPieces || data.maxNumOfPieces == '') && (!data.minWeight || data.minWeight == '') && (!data.maxWeight || data.maxWeight == '')) {
1030 this.msgWarning('未添加规则信息,请添加后再保存!') 1038 this.msgWarning('未添加规则信息,请添加后再保存!')
1031 } else { 1039 } else {
1032 // this.loading = true 1040 // this.loading = true
......
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
249 } 249 }
250 }, 250 },
251 mounted() { 251 mounted() {
252 - // this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 200; 252 + this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 200;
253 }, 253 },
254 activated() { 254 activated() {
255 this.findSourceFlightRules(); 255 this.findSourceFlightRules();
......
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
113 } 113 }
114 }, 114 },
115 mounted() { 115 mounted() {
116 - // this.tableHeight = window.innerHeight - this.$refs.preReviewOptions.offsetHeight - 300; 116 + this.tableHeight = window.innerHeight - this.$refs.preReviewOptions.offsetHeight - 300;
117 }, 117 },
118 methods: { 118 methods: {
119 //搜索 119 //搜索
......
...@@ -502,7 +502,7 @@ export default { ...@@ -502,7 +502,7 @@ export default {
502 this.shiftKey = false; 502 this.shiftKey = false;
503 } 503 }
504 }); 504 });
505 - // this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120; 505 + this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
506 }, 506 },
507 methods: { 507 methods: {
508 //输入航班号后 508 //输入航班号后
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
92 92
93 }, 93 },
94 mounted() { 94 mounted() {
95 - // this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200; 95 + this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200;
96 this.selection(1) 96 this.selection(1)
97 }, 97 },
98 watch: { 98 watch: {
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
92 92
93 }, 93 },
94 mounted() { 94 mounted() {
95 - // this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200; 95 + this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200;
96 this.selection(1) 96 this.selection(1)
97 }, 97 },
98 watch: { 98 watch: {
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
73 created() { 73 created() {
74 }, 74 },
75 mounted() { 75 mounted() {
76 - // this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200; 76 + this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200;
77 this.selection(1) 77 this.selection(1)
78 }, 78 },
79 watch: { 79 watch: {
......
...@@ -441,7 +441,7 @@ export default { ...@@ -441,7 +441,7 @@ export default {
441 this.shiftKey = false; 441 this.shiftKey = false;
442 } 442 }
443 }); 443 });
444 - // this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50 444 + this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50
445 }, 445 },
446 watch: { 446 watch: {
447 $route: { 447 $route: {
...@@ -489,7 +489,7 @@ export default { ...@@ -489,7 +489,7 @@ export default {
489 } 489 }
490 }, 490 },
491 formShow(val, oldVal) { 491 formShow(val, oldVal) {
492 - // this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120 492 + this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120
493 }, 493 },
494 }, 494 },
495 methods: { 495 methods: {
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
109 // this.getFlight() 109 // this.getFlight()
110 // }, 110 // },
111 mounted() { 111 mounted() {
112 - // this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350 112 + this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350
113 this.getFlight() 113 this.getFlight()
114 }, 114 },
115 methods: { 115 methods: {
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
99 created() { 99 created() {
100 }, 100 },
101 mounted() { 101 mounted() {
102 - // this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170; 102 + this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
103 this.selection(1) 103 this.selection(1)
104 }, 104 },
105 activated() { 105 activated() {
......
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
139 this.selectOptionData() 139 this.selectOptionData()
140 }, 140 },
141 mounted() { 141 mounted() {
142 - // this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150; 142 + this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150;
143 this.select(0) 143 this.select(0)
144 }, 144 },
145 watch: { 145 watch: {
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
100 created() { 100 created() {
101 }, 101 },
102 mounted() { 102 mounted() {
103 - // this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170; 103 + this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
104 this.selection(1) 104 this.selection(1)
105 }, 105 },
106 activated() { 106 activated() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 <el-card style="margin-bottom:10px"> 3 <el-card style="margin-bottom:10px">
4 <!-- cardHeader --> 4 <!-- cardHeader -->
5 <div slot="header" class="clearfix"> 5 <div slot="header" class="clearfix">
6 - <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '始发站' : 6 + <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
7 tableName == 7 tableName ==
8 '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" 8 '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
9 }}</span> 9 }}</span>
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
220 // } 220 // }
221 }, 221 },
222 mounted() { 222 mounted() {
223 - // this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270 223 + this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270
224 }, 224 },
225 filters: { 225 filters: {
226 // 是否为ET86航线 226 // 是否为ET86航线
......
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
86 } 86 }
87 }, 87 },
88 mounted() { 88 mounted() {
89 - // this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250 89 + this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
90 }, 90 },
91 activated() { 91 activated() {
92 this.selectRoleList(); 92 this.selectRoleList();
......
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
80 created() { 80 created() {
81 }, 81 },
82 mounted() { 82 mounted() {
83 - // this.tableHeight = window.innerHeight - this.$refs.supserAllocation.$el.offsetHeight - 250 83 + this.tableHeight = window.innerHeight - this.$refs.supserAllocation.$el.offsetHeight - 250
84 this.selection(1) 84 this.selection(1)
85 }, 85 },
86 methods: { 86 methods: {
......
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
113 } 113 }
114 }, 114 },
115 mounted() { 115 mounted() {
116 - // this.tableHeight = window.innerHeight - this.$refs.selectionUserForm.$el.offsetHeight - 250; 116 + this.tableHeight = window.innerHeight - this.$refs.selectionUserForm.$el.offsetHeight - 250;
117 }, 117 },
118 activated() { 118 activated() {
119 this.selectUser(); 119 this.selectUser();
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
64 this.selectLog() 64 this.selectLog()
65 }, 65 },
66 mounted() { 66 mounted() {
67 - // this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200 67 + this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200
68 }, 68 },
69 methods: { 69 methods: {
70 selectLog(val) { 70 selectLog(val) {
......
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
130 this.data = []; 130 this.data = [];
131 }, 131 },
132 mounted() { 132 mounted() {
133 - // this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130; 133 + this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
134 }, 134 },
135 methods: { 135 methods: {
136 //数据查询 136 //数据查询
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
109 this.selectLog(); 109 this.selectLog();
110 }, 110 },
111 mounted() { 111 mounted() {
112 - // this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240 112 + this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240
113 }, 113 },
114 methods: { 114 methods: {
115 getModule() { 115 getModule() {
......