Showing
6 changed files
with
66 additions
and
29 deletions
| ... | @@ -206,13 +206,10 @@ export function checkFlightRoute(data) { | ... | @@ -206,13 +206,10 @@ export function checkFlightRoute(data) { |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | //更新航线 | 208 | //更新航线 |
| 209 | -/** | 209 | +export function updateRoute(data) { |
| 210 | - * @param id * | ||
| 211 | - */ | ||
| 212 | -export function updateRoute(id) { | ||
| 213 | return request({ | 210 | return request({ |
| 214 | - url: `/dictionary/updateRoute/${id}`, | 211 | + url: `/dictionary/updateRoute`, |
| 215 | method: "post", | 212 | method: "post", |
| 216 | - data: {}, | 213 | + data: data, |
| 217 | }); | 214 | }); |
| 218 | } | 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 { | ... | ... |
| ... | @@ -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,7 +449,7 @@ export function restTableHeight($refs) { | ... | @@ -448,7 +449,7 @@ export function restTableHeight($refs) { |
| 448 | heigth += getPropertyValue($refs[key]); | 449 | heigth += getPropertyValue($refs[key]); |
| 449 | } | 450 | } |
| 450 | }); | 451 | }); |
| 451 | - let topHeaderClientHeight = | 452 | + // 右边栏top-header全局组件的高 |
| 452 | - document.querySelector(".headerRef").clientHeight; | 453 | + let topHeaderClientHeight = document.querySelector(".headerRef").clientHeight; |
| 453 | return heigth + topHeaderClientHeight; | 454 | return heigth + topHeaderClientHeight; |
| 454 | } | 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> | ... | ... |
| ... | @@ -562,7 +562,13 @@ export default { | ... | @@ -562,7 +562,13 @@ export default { |
| 562 | center: true, | 562 | center: true, |
| 563 | }) | 563 | }) |
| 564 | .then(() => { | 564 | .then(() => { |
| 565 | - this.updateRouteSubmit(row.id); | 565 | + let params = { |
| 566 | + id: row.id, | ||
| 567 | + fltNo: row.fltNo, | ||
| 568 | + route: row.route, | ||
| 569 | + isEtesRoute: row.isEtesRoute ? "Y" : "N" | ||
| 570 | + } | ||
| 571 | + this.updateRouteSubmit(params); | ||
| 566 | }) | 572 | }) |
| 567 | .catch(() => { | 573 | .catch(() => { |
| 568 | this.tableData[$index].isEtesRoute = !this.tableData[$index].isEtesRoute; | 574 | this.tableData[$index].isEtesRoute = !this.tableData[$index].isEtesRoute; | ... | ... |
-
Please register or login to post a comment