Elements-SY

Merge branch 'et86' into 2023-08-14

...@@ -161,7 +161,6 @@ export default { ...@@ -161,7 +161,6 @@ export default {
161 this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1] 161 this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
162 .children[0].clientHeight; 162 .children[0].clientHeight;
163 this.trHeight = trEl; 163 this.trHeight = trEl;
164 - // console.log(this);
165 }); 164 });
166 }, 800), 165 }, 800),
167 166
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
53 :disabled="scope.row.edit | isEdit" 53 :disabled="scope.row.edit | isEdit"
54 min="-7" 54 min="-7"
55 max="7" 55 max="7"
56 - v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')" 56 + v-input-filter
57 clearable 57 clearable
58 placeholder="" 58 placeholder=""
59 /> 59 />
...@@ -417,6 +417,36 @@ export default { ...@@ -417,6 +417,36 @@ export default {
417 this.PostFindDestinationFltRuleByFlightNo(); 417 this.PostFindDestinationFltRuleByFlightNo();
418 }, 418 },
419 mounted() {}, 419 mounted() {},
420 + directives: {
421 + "input-filter": {
422 + bind: function (el, binding) {
423 + el.handler = function (event) {
424 + let regExp = /[^0-9a-zA-Z_]/g;
425 + let newValue = event.target.value.replace(regExp, "");
426 + if (newValue !== event.target.value) {
427 + event.target.value = newValue;
428 + event.target.dispatchEvent(new Event("input"));
429 + }
430 + };
431 + el.addEventListener("input", el.handler);
432 + },
433 + unbind: function (el) {
434 + el.removeEventListener("input", el.handler);
435 + },
436 + /*
437 + -7 +7
438 + 0~7
439 + 或者 空
440 + 不能输入小数点
441 + Math.abs(-7);
442 + 不能输入和选择未来日期,
443 + 不能输入和选择历史日期,
444 + 选择时间范围,
445 + 只能输入四位正整数,不能够有小数点,
446 + 只能输入四位正整数保留3位小数,
447 + */
448 + },
449 + },
420 filters: { 450 filters: {
421 isEdit: function (value) { 451 isEdit: function (value) {
422 switch (value) { 452 switch (value) {
...@@ -467,8 +497,8 @@ export default { ...@@ -467,8 +497,8 @@ export default {
467 list.map((item) => { 497 list.map((item) => {
468 routeList.push(item); 498 routeList.push(item);
469 }); 499 });
470 - let isEtesRoute = list.filter(item=>item.isEtesRoute == "Y"); // 过滤普通航线 500 + let isEtesRoute = list.filter((item) => item.isEtesRoute == "Y"); // 过滤普通航线
471 - if(isEtesRoute.length == 0){ 501 + if (isEtesRoute.length == 0) {
472 this.msgError("该航班下的航线均为普通航线"); 502 this.msgError("该航班下的航线均为普通航线");
473 } 503 }
474 this.tableData[this.currentIndex].fltRoute = ""; 504 this.tableData[this.currentIndex].fltRoute = "";
......
...@@ -85,11 +85,11 @@ ...@@ -85,11 +85,11 @@
85 </el-col> 85 </el-col>
86 <el-col :span="10"> 86 <el-col :span="10">
87 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" 87 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea"
88 - :rows="4" resize="none" style="width: 500px" placeholder="始发站之间用回车符分隔" 88 + :rows="4" resize="none" style="width: 500px" placeholder="始发站之间用分号分隔"
89 @change="change" @input="change($event)"> 89 @change="change" @input="change($event)">
90 </el-input> 90 </el-input>
91 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" 91 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4"
92 - resize="none" style="width: 500px" placeholder="始发站之间用回车符分隔" @change="change" 92 + resize="none" style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
93 @input="change($event)"> 93 @input="change($event)">
94 </el-input> 94 </el-input>
95 </el-col> 95 </el-col>
...@@ -105,11 +105,11 @@ ...@@ -105,11 +105,11 @@
105 </el-col> 105 </el-col>
106 <el-col :span="10"> 106 <el-col :span="10">
107 <el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea" 107 <el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea"
108 - :rows="4" resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔" 108 + :rows="4" resize="none" style="width: 500px" placeholder="目的站之间用分号分隔"
109 @change="change" @input="change($event)"> 109 @change="change" @input="change($event)">
110 </el-input> 110 </el-input>
111 <el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4" 111 <el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4"
112 - resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔" @change="change" 112 + resize="none" style="width: 500px" placeholder="目的站之间用分号分隔" @change="change"
113 @input="change($event)"> 113 @input="change($event)">
114 </el-input> 114 </el-input>
115 </el-col> 115 </el-col>
...@@ -337,11 +337,11 @@ ...@@ -337,11 +337,11 @@
337 </el-col> 337 </el-col>
338 <el-col :span="10"> 338 <el-col :span="10">
339 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" :rows="4" 339 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" :rows="4"
340 - resize="none" style="width: 500px" placeholder="始发站之间用回车符分隔" @change="change" 340 + resize="none" style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
341 @input="change($event)"> 341 @input="change($event)">
342 </el-input> 342 </el-input>
343 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none" 343 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none"
344 - style="width: 500px" placeholder="始发站之间用回车符分隔" @change="change" 344 + style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
345 @input="change($event)"> 345 @input="change($event)">
346 </el-input> 346 </el-input>
347 </el-col> 347 </el-col>
...@@ -357,11 +357,11 @@ ...@@ -357,11 +357,11 @@
357 </el-col> 357 </el-col>
358 <el-col :span="10"> 358 <el-col :span="10">
359 <el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea" 359 <el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea"
360 - :rows="4" resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔" 360 + :rows="4" resize="none" style="width: 500px" placeholder="目的站之间用分号分隔"
361 @change="change" @input="change($event)"> 361 @change="change" @input="change($event)">
362 </el-input> 362 </el-input>
363 <el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4" 363 <el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4"
364 - resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔" @change="change" 364 + resize="none" style="width: 500px" placeholder="目的站之间用分号分隔" @change="change"
365 @input="change($event)"> 365 @input="change($event)">
366 </el-input> 366 </el-input>
367 </el-col> 367 </el-col>
...@@ -605,7 +605,6 @@ export default { ...@@ -605,7 +605,6 @@ export default {
605 } 605 }
606 }, 606 },
607 created() { 607 created() {
608 - // console.log(this.$route.params)
609 this.dictData() 608 this.dictData()
610 this.status = this.$route.params.handle 609 this.status = this.$route.params.handle
611 this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false 610 this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false
...@@ -720,7 +719,6 @@ export default { ...@@ -720,7 +719,6 @@ export default {
720 this.infoForm.fltDate = res.data.list.ruleDate 719 this.infoForm.fltDate = res.data.list.ruleDate
721 this.infoForm.route = res.data.list.flightRoute 720 this.infoForm.route = res.data.list.flightRoute
722 this.infoForm.list.push(this.dataHandle(res.data.list)) 721 this.infoForm.list.push(this.dataHandle(res.data.list))
723 - console.log('A:',this.infoForm.list)
724 } else { 722 } else {
725 this.isEmpty = true 723 this.isEmpty = true
726 } 724 }
...@@ -760,7 +758,6 @@ export default { ...@@ -760,7 +758,6 @@ export default {
760 res.data.list.forEach(item => { 758 res.data.list.forEach(item => {
761 this.infoForm.list.push(this.dataHandle(item)) 759 this.infoForm.list.push(this.dataHandle(item))
762 }) 760 })
763 - console.log('B:',this.infoForm.list)
764 } else { 761 } else {
765 //航班类型为Purple Tail则显示所有航线维度 762 //航班类型为Purple Tail则显示所有航线维度
766 this.routeList.forEach(route => { 763 this.routeList.forEach(route => {
...@@ -782,7 +779,6 @@ export default { ...@@ -782,7 +779,6 @@ export default {
782 }) 779 })
783 } 780 }
784 }) 781 })
785 - console.log('C:',this.infoForm.list)
786 } 782 }
787 } else { 783 } else {
788 //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度) 784 //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
...@@ -805,7 +801,6 @@ export default { ...@@ -805,7 +801,6 @@ export default {
805 }) 801 })
806 } 802 }
807 }) 803 })
808 - console.log('D:',this.infoForm.list)
809 } 804 }
810 } else { 805 } else {
811 //未请求到数据 806 //未请求到数据
...@@ -833,7 +828,6 @@ export default { ...@@ -833,7 +828,6 @@ export default {
833 }) 828 })
834 this.infoForm.list.push(this.dataHandle(item)) 829 this.infoForm.list.push(this.dataHandle(item))
835 }) 830 })
836 - console.log('E:',this.infoForm.list)
837 } else { 831 } else {
838 //航班类型Purple Tail展示全部航线维度 832 //航班类型Purple Tail展示全部航线维度
839 let routesStatus = 1 833 let routesStatus = 1
...@@ -857,7 +851,6 @@ export default { ...@@ -857,7 +851,6 @@ export default {
857 }) 851 })
858 } 852 }
859 }) 853 })
860 - console.log('F:',this.infoForm.list)
861 } 854 }
862 } else { 855 } else {
863 //未查询到,插入占位基础数据使用户新建 856 //未查询到,插入占位基础数据使用户新建
...@@ -873,7 +866,6 @@ export default { ...@@ -873,7 +866,6 @@ export default {
873 }) 866 })
874 } 867 }
875 }) 868 })
876 - console.log('G:',this.infoForm.list)
877 } else { 869 } else {
878 //航班类型Purple Tail展示全部航线维度 870 //航班类型Purple Tail展示全部航线维度
879 // this.isEmpty = true 871 // this.isEmpty = true
...@@ -885,7 +877,6 @@ export default { ...@@ -885,7 +877,6 @@ export default {
885 routePriority: route.routePriority, 877 routePriority: route.routePriority,
886 }) 878 })
887 }) 879 })
888 - console.log('H:',this.infoForm.list)
889 } 880 }
890 } 881 }
891 }).catch(err => { 882 }).catch(err => {
...@@ -928,7 +919,6 @@ export default { ...@@ -928,7 +919,6 @@ export default {
928 }) 919 })
929 } 920 }
930 }) 921 })
931 - console.log('I:',this.infoForm.list)
932 } else { 922 } else {
933 this.routeList.forEach((route) => { 923 this.routeList.forEach((route) => {
934 this.infoForm.list.push({ 924 this.infoForm.list.push({
...@@ -938,7 +928,6 @@ export default { ...@@ -938,7 +928,6 @@ export default {
938 routePriority: route.routePriority, 928 routePriority: route.routePriority,
939 }) 929 })
940 }) 930 })
941 - console.log('J:',this.infoForm.list)
942 } 931 }
943 }).catch(err => { 932 }).catch(err => {
944 this.isEmpty = true 933 this.isEmpty = true
...@@ -953,7 +942,6 @@ export default { ...@@ -953,7 +942,6 @@ export default {
953 routePriority: route.routePriority, 942 routePriority: route.routePriority,
954 }) 943 })
955 }) 944 })
956 - console.log('K:',this.infoForm.list)
957 } 945 }
958 } 946 }
959 } 947 }
...@@ -985,7 +973,6 @@ export default { ...@@ -985,7 +973,6 @@ export default {
985 routePriority: item.ordinal 973 routePriority: item.ordinal
986 }) 974 })
987 }) 975 })
988 - console.log('L:',this.infoForm.list)
989 } else { 976 } else {
990 this.msgWarning('未查询到航线信息!') 977 this.msgWarning('未查询到航线信息!')
991 this.routeList = [] 978 this.routeList = []
...@@ -1002,6 +989,7 @@ export default { ...@@ -1002,6 +989,7 @@ export default {
1002 }, 989 },
1003 //保存 990 //保存
1004 submit(val) { 991 submit(val) {
992 + console.log('提交:',val)
1005 let routeArr = [] 993 let routeArr = []
1006 let data = this.setDataHandle(JSON.parse(JSON.stringify(this.infoForm.list[val]))) 994 let data = this.setDataHandle(JSON.parse(JSON.stringify(this.infoForm.list[val])))
1007 if (new Number(data.minNumOfPieces) > new Number(data.maxNumOfPieces)) { 995 if (new Number(data.minNumOfPieces) > new Number(data.maxNumOfPieces)) {
...@@ -1011,7 +999,6 @@ export default { ...@@ -1011,7 +999,6 @@ export default {
1011 } 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.notIncludeUrsa == null) && (!data.minNumOfPieces || data.minNumOfPieces == '') && (!data.maxNumOfPieces || data.maxNumOfPieces == '') && (!data.minWeight || data.minWeight == '') && (!data.maxWeight || data.maxWeight == '')) { 999 } 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.notIncludeUrsa == null) && (!data.minNumOfPieces || data.minNumOfPieces == '') && (!data.maxNumOfPieces || data.maxNumOfPieces == '') && (!data.minWeight || data.minWeight == '') && (!data.maxWeight || data.maxWeight == '')) {
1012 this.msgWarning('未添加规则信息,请添加后再保存!') 1000 this.msgWarning('未添加规则信息,请添加后再保存!')
1013 } else { 1001 } else {
1014 - // this.loading = true
1015 this.routeList.forEach((item, idx) => { 1002 this.routeList.forEach((item, idx) => {
1016 routeArr.push(item.route) 1003 routeArr.push(item.route)
1017 }) 1004 })
...@@ -1033,9 +1020,9 @@ export default { ...@@ -1033,9 +1020,9 @@ export default {
1033 this.loading = false 1020 this.loading = false
1034 if (res.code === 200) { 1021 if (res.code === 200) {
1035 this.fltNoDisabled = true 1022 this.fltNoDisabled = true
1036 - this.$forceUpdate()
1037 this.msgSuccess('保存成功!') 1023 this.msgSuccess('保存成功!')
1038 this.infoForm.list[val] = this.dataHandle(res.data) 1024 this.infoForm.list[val] = this.dataHandle(res.data)
1025 + this.$forceUpdate()
1039 } else { 1026 } else {
1040 this.msgWarning(res.msg) 1027 this.msgWarning(res.msg)
1041 } 1028 }
...@@ -1189,12 +1176,15 @@ export default { ...@@ -1189,12 +1176,15 @@ export default {
1189 }, 1176 },
1190 //数据处理 1177 //数据处理
1191 dataHandle(val) { 1178 dataHandle(val) {
1192 - val.isLocation = '1' 1179 +
1180 + val.isLocation = '1' // 始发站 radio
1193 val.location ? val.isLocation = '1' : '' 1181 val.location ? val.isLocation = '1' : ''
1194 val.notLocation ? val.isLocation = '2' : '' 1182 val.notLocation ? val.isLocation = '2' : ''
1195 - val.isDestinationSite = '1' 1183 +
1196 - val.notDestinationSite ? val.isDestinationSite = '1' : '' 1184 + val.isDestinationSite = '1' // 目的站 radio
1197 - val.notLocation ? val.isDestinationSite = '2' : '' 1185 + val.destinationSite ? val.isDestinationSite = '1' : ''
1186 + val.notDestinationSite ? val.isDestinationSite = '2' : ''
1187 +
1198 val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数 1188 val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数
1199 val.maxWeight == null ? val.maxWeight = undefined : val.maxWeight = val.maxWeight//最大重量 1189 val.maxWeight == null ? val.maxWeight = undefined : val.maxWeight = val.maxWeight//最大重量
1200 val.minNumOfPieces == null ? val.minNumOfPieces = undefined : val.minNumOfPieces = val.minNumOfPieces//最小件数 1190 val.minNumOfPieces == null ? val.minNumOfPieces = undefined : val.minNumOfPieces = val.minNumOfPieces//最小件数
......
...@@ -33,7 +33,6 @@ export default { ...@@ -33,7 +33,6 @@ export default {
33 } 33 }
34 }, 34 },
35 created() { 35 created() {
36 - console.log(this.$route)
37 this.tableData = this.$route.query.data 36 this.tableData = this.$route.query.data
38 this.fromRoute = this.$route.query.from 37 this.fromRoute = this.$route.query.from
39 }, 38 },
......
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
85 roleFormDisabled: false, 85 roleFormDisabled: false,
86 tableLoading: false, 86 tableLoading: false,
87 total: 0, 87 total: 0,
88 - tableHeight: null 88 + tableHeight: 300
89 }; 89 };
90 }, 90 },
91 created() { 91 created() {
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
94 } 94 }
95 }, 95 },
96 mounted() { 96 mounted() {
97 - this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250 97 + // this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
98 }, 98 },
99 activated() { 99 activated() {
100 this.selectRoleList(); 100 this.selectRoleList();
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
44 v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{ 44 v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{
45 scope.row.isValid == 1 ? "停用" : "启用" 45 scope.row.isValid == 1 ? "停用" : "启用"
46 }}</el-button> 46 }}</el-button>
47 - <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']" style="margin-top: 5px;margin-left: 0;">删除用户 47 + <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户
48 </el-button> 48 </el-button>
49 </template> 49 </template>
50 </el-table-column> 50 </el-table-column>
......