Elements-SY

modify

...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
439 type="primary" 439 type="primary"
440 size="small" 440 size="small"
441 :disabled="pageName" 441 :disabled="pageName"
442 - @click="addRouteRule(index)" 442 + @click="addRouteRule(item, index)"
443 >新增规则</el-button 443 >新增规则</el-button
444 > 444 >
445 </el-empty> 445 </el-empty>
...@@ -607,8 +607,8 @@ export default { ...@@ -607,8 +607,8 @@ export default {
607 this.$emit("subCategory", arr); 607 this.$emit("subCategory", arr);
608 }, 608 },
609 // 新增规则 609 // 新增规则
610 - addRouteRule(index) { 610 + addRouteRule(item, index) {
611 - this.$emit("addRlue", index); 611 + this.$emit("addRlue", item, index);
612 }, 612 },
613 // 保存 613 // 保存
614 saveSubmit(item, index) { 614 saveSubmit(item, index) {
......
...@@ -4,9 +4,18 @@ ...@@ -4,9 +4,18 @@
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 ref="ruleForm" :formConfig="formConfig" :queryForm="queryForm" :inline="false" formWidth="auto" 7 + <yl-form
8 - @blur="blurEvent"> 8 + ref="ruleForm"
9 - <route-draggable :routeList="routeList" :dragOptions="dragOptions"></route-draggable> 9 + :formConfig="formConfig"
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>
10 </yl-form> 19 </yl-form>
11 </el-col> 20 </el-col>
12 </el-row> 21 </el-row>
...@@ -16,14 +25,34 @@ ...@@ -16,14 +25,34 @@
16 <el-divider content-position="left">航线维度设置</el-divider> 25 <el-divider content-position="left">航线维度设置</el-divider>
17 </el-col> 26 </el-col>
18 <el-col> 27 <el-col>
19 - <route-info ref="routeInfo" :routesInfo="routesInfo" :cargoType="cargoType" :cargoStatus="cargoStatus" 28 + <route-info
20 - :puporpux="puporpux" :serviceCode="serviceCode" :handlingCode="handlingCode" :subCategory="subCategory" 29 + ref="routeInfo"
21 - :status="getRouter" :loading="loading" @addRlue="addRlue" @save="saveSubmit" @onOff="onOffSubmit" 30 + :routesInfo="routesInfo"
22 - @delete="deleteSubmit" @locRadio="locRadio" @dessiteRadio="dessiteRadio" @locationBur="locationBur" 31 + :cargoType="cargoType"
23 - @notLocationBur="notLocationBur" @destinationSiteBur="destinationSiteBur" 32 + :cargoStatus="cargoStatus"
24 - @notDestinationSiteBur="notDestinationSiteBur" @includeUrsaBur="includeUrsaBur" 33 + :puporpux="puporpux"
25 - @notIncludeUrsaBur="notIncludeUrsaBur" @minNumOfPiecesBur="minNumOfPiecesBur" 34 + :serviceCode="serviceCode"
26 - @maxNumOfPiecesBur="maxNumOfPiecesBur" @minWeightBur="minWeightBur" @maxWeightBur="maxWeightBur"> 35 + :handlingCode="handlingCode"
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 + >
27 </route-info> 56 </route-info>
28 </el-col> 57 </el-col>
29 </el-row> 58 </el-row>
...@@ -98,7 +127,7 @@ export default { ...@@ -98,7 +127,7 @@ export default {
98 // 只负责接收参数和接口调用 127 // 只负责接收参数和接口调用
99 this.queryCondition(parmas); 128 this.queryCondition(parmas);
100 }, 129 },
101 - mounted() { }, 130 + mounted() {},
102 methods: { 131 methods: {
103 // 航班信息维护查询 132 // 航班信息维护查询
104 queryFindAllFltDataApi(parmas) { 133 queryFindAllFltDataApi(parmas) {
...@@ -109,7 +138,7 @@ export default { ...@@ -109,7 +138,7 @@ export default {
109 this.flightRouteList = data.list; 138 this.flightRouteList = data.list;
110 } 139 }
111 }) 140 })
112 - .catch((error) => { }); 141 + .catch((error) => {});
113 }, 142 },
114 // 【通过航班号查询航线】 143 // 【通过航班号查询航线】
115 getQueryRouteByFltNo(parmas) { 144 getQueryRouteByFltNo(parmas) {
...@@ -124,12 +153,13 @@ export default { ...@@ -124,12 +153,13 @@ export default {
124 const routes = []; 153 const routes = [];
125 if (isEtesRoute.length) { 154 if (isEtesRoute.length) {
126 isEtesRoute.map((item) => { 155 isEtesRoute.map((item) => {
156 + item.routePriority = item.ordinal;
127 routes.push({ 157 routes.push({
128 config: false, 158 config: false,
129 fltNo: item.fltNo, 159 fltNo: item.fltNo,
130 route: item.route, 160 route: item.route,
131 etesRule: item.isEtesRoute, 161 etesRule: item.isEtesRoute,
132 - routePriority: item.ordinal, 162 + routePriority: item.routePriority,
133 }); 163 });
134 }); 164 });
135 } else { 165 } else {
...@@ -143,7 +173,7 @@ export default { ...@@ -143,7 +173,7 @@ export default {
143 } 173 }
144 } 174 }
145 }) 175 })
146 - .catch(() => { }); 176 + .catch(() => {});
147 }, 177 },
148 // 航班号输入框失焦事件 178 // 航班号输入框失焦事件
149 blurEvent({ purposeOfFlightNo }) { 179 blurEvent({ purposeOfFlightNo }) {
...@@ -154,36 +184,26 @@ export default { ...@@ -154,36 +184,26 @@ export default {
154 this.queryForm.purposeOfFlightNo = this.upCase(purposeOfFlightNo); 184 this.queryForm.purposeOfFlightNo = this.upCase(purposeOfFlightNo);
155 }, 185 },
156 // 新增规则 186 // 新增规则
157 - addRlue(index) { 187 + addRlue(item, index) {
188 + let currentRoute = this.routeList.filter(
189 + (val) => val.route == item.route
190 + );
158 // 如果当前航班号的航线下没有数据,新增规则给默认数据 191 // 如果当前航班号的航线下没有数据,新增规则给默认数据
159 routeRuleForm.purposeOfFlightNo = this.$route.query.purposeOfFlightNo; 192 routeRuleForm.purposeOfFlightNo = this.$route.query.purposeOfFlightNo;
160 - this.setattrVal(routeRuleForm); 193 + routeRuleForm.routePriority = currentRoute[0].routePriority;
161 - const mergeObj = {
162 - ...this.routesInfo[index],
163 - ...routeRuleForm,
164 - };
165 - if (this.$route.query.dataStatus == "add") {
166 - // mergeObj.routePriority = this.routeList[index].routePriority;
167 let routeSpecifyDateSeq = []; 194 let routeSpecifyDateSeq = [];
168 if (this.routeList.length) { 195 if (this.routeList.length) {
169 this.routeList.map((item) => { 196 this.routeList.map((item) => {
170 routeSpecifyDateSeq.push(item.route); 197 routeSpecifyDateSeq.push(item.route);
171 }); 198 });
172 } 199 }
173 - mergeObj.routeSpecifyDateSeq = routeSpecifyDateSeq.join(";"); 200 + routeRuleForm.routeSpecifyDateSeq = routeSpecifyDateSeq.join(";");
174 - console.log(this.routeList) 201 + this.setattrVal(routeRuleForm);
175 - console.log(this.routesInfo) 202 + const mergeObj = {
176 - // this.routeList.map((item1) => { 203 + ...this.routesInfo[index],
177 - // let currentRoute = this.routesInfo.findIndex((item2) => { 204 + ...routeRuleForm,
178 - // if (item1.route == item2.route) { 205 + };
179 - // item2.routePriority = item1.routePriority;
180 - // }
181 - // });
182 - // return currentRoute;
183 - // });
184 - }
185 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据 206 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据
186 - console.log(this.routesInfo)
187 }, 207 },
188 // 保存 【新增/修改航线规则设置】 208 // 保存 【新增/修改航线规则设置】
189 saveSubmit(item, index) { 209 saveSubmit(item, index) {
...@@ -329,7 +349,7 @@ export default { ...@@ -329,7 +349,7 @@ export default {
329 .then((res) => { 349 .then((res) => {
330 const { code, msg, data } = res; 350 const { code, msg, data } = res;
331 if (code == 200) { 351 if (code == 200) {
332 - console.log(item) 352 + console.log(item);
333 this.$set(this.routesInfo, index, { 353 this.$set(this.routesInfo, index, {
334 route: item.flightRoute, 354 route: item.flightRoute,
335 config: false, 355 config: false,
......