yu.sun

modify

...@@ -4,18 +4,9 @@ ...@@ -4,18 +4,9 @@
4 <!-- 航线设置规则信息查询条件 --> 4 <!-- 航线设置规则信息查询条件 -->
5 <el-row style="padding: 0 50px"> 5 <el-row style="padding: 0 50px">
6 <el-col> 6 <el-col>
7 - <yl-form 7 + <yl-form ref="ruleForm" :formConfig="formConfig" :queryForm="queryForm" :inline="false" formWidth="auto"
8 - ref="ruleForm" 8 + @blur="blurEvent">
9 - :formConfig="formConfig" 9 + <route-draggable :routeList="routeList" :dragOptions="dragOptions"></route-draggable>
10 - :queryForm="queryForm"
11 - :inline="false"
12 - formWidth="auto"
13 - @blur="blurEvent"
14 - >
15 - <route-draggable
16 - :routeList="routeList"
17 - :dragOptions="dragOptions"
18 - ></route-draggable>
19 </yl-form> 10 </yl-form>
20 </el-col> 11 </el-col>
21 </el-row> 12 </el-row>
...@@ -25,34 +16,14 @@ ...@@ -25,34 +16,14 @@
25 <el-divider content-position="left">航线维度设置</el-divider> 16 <el-divider content-position="left">航线维度设置</el-divider>
26 </el-col> 17 </el-col>
27 <el-col> 18 <el-col>
28 - <route-info 19 + <route-info ref="routeInfo" :routesInfo="routesInfo" :cargoType="cargoType" :cargoStatus="cargoStatus"
29 - ref="routeInfo" 20 + :puporpux="puporpux" :serviceCode="serviceCode" :handlingCode="handlingCode" :subCategory="subCategory"
30 - :routesInfo="routesInfo" 21 + :status="getRouter" :loading="loading" @addRlue="addRlue" @save="saveSubmit" @onOff="onOffSubmit"
31 - :cargoType="cargoType" 22 + @delete="deleteSubmit" @locRadio="locRadio" @dessiteRadio="dessiteRadio" @locationBur="locationBur"
32 - :cargoStatus="cargoStatus" 23 + @notLocationBur="notLocationBur" @destinationSiteBur="destinationSiteBur"
33 - :puporpux="puporpux" 24 + @notDestinationSiteBur="notDestinationSiteBur" @includeUrsaBur="includeUrsaBur"
34 - :serviceCode="serviceCode" 25 + @notIncludeUrsaBur="notIncludeUrsaBur" @minNumOfPiecesBur="minNumOfPiecesBur"
35 - :handlingCode="handlingCode" 26 + @maxNumOfPiecesBur="maxNumOfPiecesBur" @minWeightBur="minWeightBur" @maxWeightBur="maxWeightBur">
36 - :subCategory="subCategory"
37 - :status="getRouter"
38 - :loading="loading"
39 - @addRlue="addRlue"
40 - @save="saveSubmit"
41 - @onOff="onOffSubmit"
42 - @delete="deleteSubmit"
43 - @locRadio="locRadio"
44 - @dessiteRadio="dessiteRadio"
45 - @locationBur="locationBur"
46 - @notLocationBur="notLocationBur"
47 - @destinationSiteBur="destinationSiteBur"
48 - @notDestinationSiteBur="notDestinationSiteBur"
49 - @includeUrsaBur="includeUrsaBur"
50 - @notIncludeUrsaBur="notIncludeUrsaBur"
51 - @minNumOfPiecesBur="minNumOfPiecesBur"
52 - @maxNumOfPiecesBur="maxNumOfPiecesBur"
53 - @minWeightBur="minWeightBur"
54 - @maxWeightBur="maxWeightBur"
55 - >
56 </route-info> 27 </route-info>
57 </el-col> 28 </el-col>
58 </el-row> 29 </el-row>
...@@ -127,7 +98,7 @@ export default { ...@@ -127,7 +98,7 @@ export default {
127 // 只负责接收参数和接口调用 98 // 只负责接收参数和接口调用
128 this.queryCondition(parmas); 99 this.queryCondition(parmas);
129 }, 100 },
130 - mounted() {}, 101 + mounted() { },
131 methods: { 102 methods: {
132 // 航班信息维护查询 103 // 航班信息维护查询
133 queryFindAllFltDataApi(parmas) { 104 queryFindAllFltDataApi(parmas) {
...@@ -138,7 +109,7 @@ export default { ...@@ -138,7 +109,7 @@ export default {
138 this.flightRouteList = data.list; 109 this.flightRouteList = data.list;
139 } 110 }
140 }) 111 })
141 - .catch((error) => {}); 112 + .catch((error) => { });
142 }, 113 },
143 // 【通过航班号查询航线】 114 // 【通过航班号查询航线】
144 getQueryRouteByFltNo(parmas) { 115 getQueryRouteByFltNo(parmas) {
...@@ -153,7 +124,13 @@ export default { ...@@ -153,7 +124,13 @@ export default {
153 const routes = []; 124 const routes = [];
154 if (isEtesRoute.length) { 125 if (isEtesRoute.length) {
155 isEtesRoute.map((item) => { 126 isEtesRoute.map((item) => {
156 - routes.push({ config: false, route: item.route }); 127 + routes.push({
128 + config: false,
129 + fltNo: item.fltNo,
130 + route: item.route,
131 + etesRule: item.isEtesRoute,
132 + routePriority: item.ordinal,
133 + });
157 }); 134 });
158 } else { 135 } else {
159 this.msgWarning("暂无航线"); 136 this.msgWarning("暂无航线");
...@@ -166,7 +143,7 @@ export default { ...@@ -166,7 +143,7 @@ export default {
166 } 143 }
167 } 144 }
168 }) 145 })
169 - .catch(() => {}); 146 + .catch(() => { });
170 }, 147 },
171 // 航班号输入框失焦事件 148 // 航班号输入框失焦事件
172 blurEvent({ purposeOfFlightNo }) { 149 blurEvent({ purposeOfFlightNo }) {
...@@ -185,10 +162,28 @@ export default { ...@@ -185,10 +162,28 @@ export default {
185 ...this.routesInfo[index], 162 ...this.routesInfo[index],
186 ...routeRuleForm, 163 ...routeRuleForm,
187 }; 164 };
188 - if (this.routeList[index].hasOwnProperty("ordinal")) { 165 + if (this.$route.query.dataStatus == "add") {
189 - mergeObj.routePriority = this.routeList[index].ordinal; 166 + // mergeObj.routePriority = this.routeList[index].routePriority;
167 + let routeSpecifyDateSeq = [];
168 + if (this.routeList.length) {
169 + this.routeList.map((item) => {
170 + routeSpecifyDateSeq.push(item.route);
171 + });
172 + }
173 + mergeObj.routeSpecifyDateSeq = routeSpecifyDateSeq.join(";");
174 + console.log(this.routeList)
175 + console.log(this.routesInfo)
176 + // this.routeList.map((item1) => {
177 + // let currentRoute = this.routesInfo.findIndex((item2) => {
178 + // if (item1.route == item2.route) {
179 + // item2.routePriority = item1.routePriority;
180 + // }
181 + // });
182 + // return currentRoute;
183 + // });
190 } 184 }
191 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据 185 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据
186 + console.log(this.routesInfo)
192 }, 187 },
193 // 保存 【新增/修改航线规则设置】 188 // 保存 【新增/修改航线规则设置】
194 saveSubmit(item, index) { 189 saveSubmit(item, index) {
...@@ -334,11 +329,12 @@ export default { ...@@ -334,11 +329,12 @@ export default {
334 .then((res) => { 329 .then((res) => {
335 const { code, msg, data } = res; 330 const { code, msg, data } = res;
336 if (code == 200) { 331 if (code == 200) {
332 + console.log(item)
337 this.$set(this.routesInfo, index, { 333 this.$set(this.routesInfo, index, {
338 route: item.flightRoute, 334 route: item.flightRoute,
339 config: false, 335 config: false,
340 - fltNo: this.routeList[0].fltNo, 336 + fltNo: item.fltNo,
341 - etesRule: this.routeList[0].etesRule, 337 + etesRule: item.etesRule,
342 routePriority: item.routePriority, 338 routePriority: item.routePriority,
343 }); 339 });
344 this.msgSuccess(msg); 340 this.msgSuccess(msg);
......