Elements-SY

modify

...@@ -143,15 +143,9 @@ export function delFlight(data) { ...@@ -143,15 +143,9 @@ export function delFlight(data) {
143 143
144 //查询航线 144 //查询航线
145 /** 145 /**
146 -<<<<<<< HEAD
147 * @param fltNo 航班号 146 * @param fltNo 航班号
148 * @param page 页数 147 * @param page 页数
149 * @param size 页长 148 * @param size 页长
150 -=======
151 - * @param fltNo 航班号
152 - * @param page 页数
153 - * @param size 页长
154 ->>>>>>> test
155 */ 149 */
156 export function queryRoute(data) { 150 export function queryRoute(data) {
157 return request({ 151 return request({
...@@ -211,3 +205,11 @@ export function checkFlightRoute(data) { ...@@ -211,3 +205,11 @@ export function checkFlightRoute(data) {
211 }) 205 })
212 } 206 }
213 207
208 +//更新航线
209 +export function updateRoute(data) {
210 + return request({
211 + url: `/dictionary/updateRoute`,
212 + method: "post",
213 + data: data,
214 + });
215 +}
......
...@@ -418,8 +418,11 @@ export default { ...@@ -418,8 +418,11 @@ export default {
418 418
419 <style lang="scss"> 419 <style lang="scss">
420 .tablePagination { 420 .tablePagination {
421 - margin-top: 10px; 421 + text-align: right;
422 - text-align: right; 422 + height: 25px;
423 + margin-bottom: 10px;
424 + margin-top: 15px;
425 + padding: 10px 20px !important;
423 } 426 }
424 427
425 .w-table { 428 .w-table {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 <sidebar class="sidebar-container" 4 <sidebar class="sidebar-container"
5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> 5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
6 <div :class="{ hasTagsView: needTagsView }" class="main-container"> 6 <div :class="{ hasTagsView: needTagsView }" class="main-container">
7 - <div :class="{ 'fixed-header': fixedHeader }" ref="headerRef"> 7 + <div class="headerRef" :class="{ 'fixed-header': fixedHeader }" ref="headerRef">
8 <navbar /> 8 <navbar />
9 <tags-view v-if="needTagsView" /> 9 <tags-view v-if="needTagsView" />
10 </div> 10 </div>
......
...@@ -416,7 +416,8 @@ function getPropertyValue(el) { ...@@ -416,7 +416,8 @@ function getPropertyValue(el) {
416 ); 416 );
417 } 417 }
418 418
419 -// 获取页面内除了table其他模块所占的高 419 +// 获取页面内除了table其他模块所占的高,
420 +// 以及margin-top margin-bottom padding-top padding-bottom
420 export function restTableHeight($refs) { 421 export function restTableHeight($refs) {
421 let heigth = 0; 422 let heigth = 0;
422 Object.keys($refs).map((key) => { 423 Object.keys($refs).map((key) => {
...@@ -448,5 +449,7 @@ export function restTableHeight($refs) { ...@@ -448,5 +449,7 @@ export function restTableHeight($refs) {
448 heigth += getPropertyValue($refs[key]); 449 heigth += getPropertyValue($refs[key]);
449 } 450 }
450 }); 451 });
451 - return heigth; 452 + // 右边栏top-header全局组件的高
453 + let topHeaderClientHeight = document.querySelector(".headerRef").clientHeight;
454 + return heigth + topHeaderClientHeight;
452 } 455 }
......
...@@ -674,7 +674,6 @@ export default { ...@@ -674,7 +674,6 @@ export default {
674 } else { 674 } else {
675 obj.route = this.$route.params.route ? this.$route.params.route : '' 675 obj.route = this.$route.params.route ? this.$route.params.route : ''
676 } 676 }
677 -
678 this.getRouteDimension(obj) 677 this.getRouteDimension(obj)
679 } 678 }
680 } 679 }
...@@ -691,7 +690,7 @@ export default { ...@@ -691,7 +690,7 @@ export default {
691 }, 690 },
692 activated() { 691 activated() {
693 this.routeSatus = this.$route.params.routeStatus 692 this.routeSatus = this.$route.params.routeStatus
694 - if (!this.$route.params.createStatus) { 693 + if (!this.$route.params.createStatus && this.$route.params.createStatus !== undefined) {
695 if (this.$route.params.handle == 'add') { 694 if (this.$route.params.handle == 'add') {
696 if (this.infoForm.fltNo && this.infoForm.fltNo != null && this.infoForm.fltNo != '') { 695 if (this.infoForm.fltNo && this.infoForm.fltNo != null && this.infoForm.fltNo != '') {
697 this.getRoutes(this.infoForm.fltNo) 696 this.getRoutes(this.infoForm.fltNo)
...@@ -715,7 +714,6 @@ export default { ...@@ -715,7 +714,6 @@ export default {
715 } else { 714 } else {
716 obj.route = this.$route.params.route ? this.$route.params.route : '' 715 obj.route = this.$route.params.route ? this.$route.params.route : ''
717 } 716 }
718 -
719 this.getRouteDimension(obj) 717 this.getRouteDimension(obj)
720 } 718 }
721 } 719 }
...@@ -776,11 +774,14 @@ export default { ...@@ -776,11 +774,14 @@ export default {
776 this.infoForm.list = [] 774 this.infoForm.list = []
777 let obj = { 775 let obj = {
778 purposeOfFlightNo: val.fltNo, 776 purposeOfFlightNo: val.fltNo,
779 - flightDate: val.fltDate, 777 + flightDate: val.fltDate, //
780 flightRoute: val.route, 778 flightRoute: val.route,
781 flightRouteListStr: val.flightRouteListStr, 779 flightRouteListStr: val.flightRouteListStr,
782 status: val.status ? val.status : '' 780 status: val.status ? val.status : ''
783 } 781 }
782 + if(this.$route.params.handle == "updated"){
783 + delete obj.flightRoute
784 + }
784 if (this.$route.params.handle != 'add') { 785 if (this.$route.params.handle != 'add') {
785 findDestinationFltRuleByFlightNo(obj).then(res => { 786 findDestinationFltRuleByFlightNo(obj).then(res => {
786 if (res.code === 200) { 787 if (res.code === 200) {
...@@ -841,7 +842,8 @@ export default { ...@@ -841,7 +842,8 @@ export default {
841 } 842 }
842 }) 843 })
843 } 844 }
844 - } else { 845 + }
846 + else {
845 //未请求到数据 847 //未请求到数据
846 if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') { 848 if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') {
847 let params = { 849 let params = {
...@@ -977,13 +979,41 @@ export default { ...@@ -977,13 +979,41 @@ export default {
977 console.log(err) 979 console.log(err)
978 }) 980 })
979 } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') { 981 } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
980 - this.routeList.forEach((route) => { 982 + let query = {
981 - this.infoForm.list.push({ 983 + purposeOfFlightNo: val.fltNo,
982 - purposeOfFlightNo: this.infoForm.fltNo, 984 + flightRoute: val.route,
983 - ruleDate: this.infoForm.fltDate, 985 + flightRouteListStr: val.flightRouteListStr,
984 - flightRoute: route.route, 986 + status: val.status ? val.status : ''
985 - routePriority: route.routePriority, 987 + }
986 - }) 988 + //航班类型Purple Tail展示全部航线维度
989 + findDestinationFltRuleByFlightNo(query).then(result => {
990 + const { code, data } = result;
991 + if(code == 200){
992 + this.routeList = data.routeList;
993 + let routesStatus = 1
994 + if(data.routeList.length){
995 + this.routeList.forEach(route => {
996 + data.list.forEach(item => {
997 + if (route.route === item.flightRoute) {
998 + routesStatus = 2
999 + // item.id = undefined
1000 + // item.status = undefined
1001 + // item.flightRoute = this.infoForm.route
1002 + // item.routePriority = route.routePriority
1003 + this.infoForm.list.push(this.dataHandle(item))
1004 + }
1005 + })
1006 + if (routesStatus == 1) {
1007 + this.infoForm.list.push({
1008 + purposeOfFlightNo: this.infoForm.fltNo,
1009 + ruleDate: this.infoForm.fltDate,
1010 + flightRoute: route.route,
1011 + routePriority: route.routePriority,
1012 + })
1013 + }
1014 + })
1015 + }
1016 + }
987 }) 1017 })
988 } 1018 }
989 } 1019 }
......
...@@ -42,24 +42,24 @@ ...@@ -42,24 +42,24 @@
42 <el-col :span="6"> 42 <el-col :span="6">
43 <el-form-item label="运单号"> 43 <el-form-item label="运单号">
44 <el-input ref='userInfo' type="textarea" v-model="formData.waybillNo" class="formItem" 44 <el-input ref='userInfo' type="textarea" v-model="formData.waybillNo" class="formItem"
45 - placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input> 45 + placeholder="请输入运单号(回车间隔)" :rows="1" :maxlength="12000" clearable></el-input>
46 </el-form-item> 46 </el-form-item>
47 </el-col> 47 </el-col>
48 <el-col :span="6"> 48 <el-col :span="6">
49 <el-form-item label="配载航班号"> 49 <el-form-item label="配载航班号">
50 - <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="4" 50 + <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="1"
51 clearable @change="planeNoChange"></el-input> 51 clearable @change="planeNoChange"></el-input>
52 </el-form-item> 52 </el-form-item>
53 </el-col> 53 </el-col>
54 <el-col :span="6"> 54 <el-col :span="6">
55 <el-form-item label="URSA"> 55 <el-form-item label="URSA">
56 - <el-input type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" :rows="4" clearable> 56 + <el-input type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" :rows="1" clearable>
57 </el-input> 57 </el-input>
58 </el-form-item> 58 </el-form-item>
59 </el-col> 59 </el-col>
60 <el-col :span="6"> 60 <el-col :span="6">
61 <el-form-item label="始发站"> 61 <el-form-item label="始发站">
62 - <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="4" clearable> 62 + <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="1" clearable>
63 </el-input> 63 </el-input>
64 </el-form-item> 64 </el-form-item>
65 </el-col> 65 </el-col>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
156 <el-col :span="6"> 156 <el-col :span="6">
157 <el-form-item label="发件人账号"> 157 <el-form-item label="发件人账号">
158 <el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem" 158 <el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem"
159 - placeholder="请输入发件人账号(;间隔)" :rows="4" :maxlength="12000" clearable></el-input> 159 + placeholder="请输入发件人账号(;间隔)" :rows="1" :maxlength="12000" clearable></el-input>
160 </el-form-item> 160 </el-form-item>
161 </el-col> 161 </el-col>
162 </el-row> 162 </el-row>
......
1 +<template>
2 + <div ref="formHeaderRef" class="form-header container">
3 + <el-row>
4 + <el-col>
5 + <yl-form
6 + ref="ruleForm"
7 + :formConfig="formConfig"
8 + :queryForm="queryForm"
9 + :inline="false"
10 + formWidth="auto"
11 + @blur="blurEvent"
12 + />
13 + </el-col>
14 + </el-row>
15 + <yl-table
16 + ref="ylTable"
17 + :attrs="tableAttr"
18 + :loadingTable="tableAttr.loadingTable"
19 + :columns="columns"
20 + :tableData="tableData"
21 + :pageConfig="pageConfig"
22 + @sizeChange="handleSizeChange"
23 + @currentChange="handleCurrentChange"
24 + @search="searchBtn"
25 + @add="addBtn"
26 + >
27 + </yl-table>
28 + </div>
29 +</template>
30 +<script>
31 +import YlForm from "@/components/YlForm";
32 +import YlTable from "@/components/YlTable";
33 +import { formConfig } from "./formConfig";
34 +import { tableAttr, columnHeader } from "./tableConfig";
35 +import { restTableHeight, sortList } from "@/utils";
36 +import store from '@/store'
37 +import {
38 + findAllEtesRules, // ET86查询
39 + deleteEtesRuleById, // 删除
40 +} from "@/api/et86";
41 +export default {
42 + components: {
43 + YlForm,
44 + YlTable,
45 + },
46 + data() {
47 + return {
48 + formConfig: formConfig, // 表单配置项
49 + queryForm: {
50 + // 表单参数
51 + status: "有效",
52 + },
53 + pageConfig: {
54 + // 分页配置项
55 + isPagination: true,
56 + total: 0,
57 + pageData: {
58 + page: 1,
59 + size: 10,
60 + },
61 + },
62 + tableAttr: tableAttr, // table配置项
63 + columns: columnHeader(this.indexAdd, this.viewRow, this.editRow, this.deleteRow), // 表头
64 + tableData: [], // 表格数据
65 + };
66 + },
67 + created() {
68 + // ET86查询
69 + this.$nextTick(() => {
70 + this.searchBtn();
71 + });
72 + },
73 + mounted() {
74 + this.$nextTick(() => {
75 + this.tableAttr.maxHeight =
76 + window.innerHeight - restTableHeight(this.$refs);
77 + });
78 + },
79 + methods: {
80 + // ET86查询
81 + queryFindAllEtesRules() {
82 + const { page, size } = this.pageConfig.pageData;
83 + let params = {
84 + originOfFlightNo: this.queryForm.originOfFlightNo,
85 + updateTimeStart: this.queryForm.startTime
86 + ? this.queryForm.startTime
87 + : "",
88 + updateTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "",
89 + limitStart: (page - 1) * size,
90 + limitSize: size,
91 + status: this.queryForm.status,
92 + };
93 + if (this.queryForm.status == "有效") {
94 + params.status = "1";
95 + }
96 + this.tableAttr.loadingTable = true;
97 + findAllEtesRules(params)
98 + .then((res) => {
99 + this.tableAttr.loadingTable = false;
100 + const { code, data } = res;
101 + if (code == 200) {
102 + const valid = data.list.filter((item) => item.status == "1"); // 有效
103 + const invalid = data.list.filter((item) => item.status == "0"); // 无效
104 + this.tableData = valid.concat(invalid);
105 + this.pageConfig.total = data.total;
106 + }
107 + })
108 + .catch(() => {});
109 + },
110 + // 失焦事件
111 + blurEvent({ originOfFlightNo }) {
112 + this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo);
113 + },
114 + // 搜索
115 + searchBtn() {
116 + this.pageConfig.pageData.page = 1;
117 + this.pageConfig.pageData.size = 10;
118 + this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
119 + this.queryFindAllEtesRules();
120 + });
121 + },
122 + // 翻页序号递增
123 + indexAdd(index){
124 + const page = this.pageConfig.pageData.page // 当前页码
125 + const pagesize = this.pageConfig.pageData.size // 每页条数
126 + return index + 1 + (page - 1) * pagesize
127 + },
128 + //条数变化
129 + handleSizeChange(e) {
130 + this.pageConfig.pageData.size = e;
131 + this.pageConfig.pageData.page = 1;
132 + this.queryFindAllEtesRules();
133 + },
134 + //页码变化
135 + handleCurrentChange(e) {
136 + this.pageConfig.pageData.page = e;
137 + this.queryFindAllEtesRules();
138 + },
139 + // 添加
140 + addBtn(item) {
141 + this.$router.push({
142 + path: "/edit",
143 + query: {
144 + name: "add",
145 + },
146 + });
147 + },
148 + // 重置表单
149 + restForm() {
150 + this.$refs.ruleForm.resetFields("ruleForm");
151 + },
152 + // 查看
153 + viewRow({ row }) {
154 + this.$router.push({
155 + path: "/edit",
156 + query: {
157 + name: "view",
158 + id: row.id,
159 + status: row.status,
160 + },
161 + });
162 + },
163 + // 编辑
164 + editRow({ row }) {
165 + this.$router.push({
166 + path: "/edit",
167 + query: {
168 + name: "edit",
169 + id: row.id,
170 + status: row.status,
171 + },
172 + });
173 + },
174 + // 删除
175 + deleteRow({ row }) {
176 + this.$confirm("是否确认删除? 删除后该规则设置为无效,不可恢复", "提示", {
177 + confirmButtonText: "确定",
178 + cancelButtonText: "取消",
179 + type: "warning",
180 + center: true,
181 + })
182 + .then(() => {
183 + deleteEtesRuleById({ id: row.id }).then((res) => {
184 + const { code, msg } = res;
185 + if (code == 200) {
186 + this.searchBtn();
187 + this.msgSuccess("删除成功!");
188 + } else {
189 + this.msgError(msg || "删除失败");
190 + }
191 + });
192 + })
193 + .catch(() => {});
194 + },
195 + },
196 +};
197 +</script>
198 +<style lang="scss" scoped></style>
...@@ -506,6 +506,44 @@ export default { ...@@ -506,6 +506,44 @@ export default {
506 serviceCodeTableSelectAll(val) { 506 serviceCodeTableSelectAll(val) {
507 this.nowSelect = val 507 this.nowSelect = val
508 }, 508 },
509 +<<<<<<< HEAD
510 +=======
511 + // 确认消息提示
512 + confirmHandle($index, row){
513 + this.$confirm(row.msg, "提示", {
514 + confirmButtonText: "确定",
515 + cancelButtonText: "取消",
516 + type: "warning",
517 + center: true,
518 + })
519 + .then(() => {
520 + let params = {
521 + id: row.id,
522 + fltNo: row.fltNo,
523 + route: row.route,
524 + isEtesRoute: row.isEtesRoute ? "Y" : "N"
525 + }
526 + this.updateRouteSubmit(params);
527 + })
528 + .catch(() => {
529 + this.tableData[$index].isEtesRoute = !this.tableData[$index].isEtesRoute;
530 + });
531 + },
532 + // checkBox是否设置ET86航线
533 + checkboxIsEtesRoute({ $index, row }){
534 + if(!row.isEtesRoute){
535 + /*
536 + 将ET86设置成普通航线要查询校验该航线有没有设置维度,
537 + 如果该航线设置了ET86维度是否考虑将该航线下的维度删掉再进行操作;
538 + */
539 + row.msg = "是否将该航线设置为非ET86航线?";
540 + this.confirmHandle($index, row)
541 + }else{
542 + row.msg = "是否将该航线设置为ET86航线?";
543 + this.confirmHandle($index, row)
544 + }
545 + }
546 +>>>>>>> test
509 } 547 }
510 } 548 }
511 </script> 549 </script>
......