Elements-SY

modify

...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 <div class="row"> 3 <div class="row">
4 <div class="col-6"> 4 <div class="col-6">
5 <draggable class="list-group" tag="ul" v-model="routeList" v-bind="dragOptions" @start="dragStart" @end="dragEnd"> 5 <draggable class="list-group" tag="ul" v-model="routeList" v-bind="dragOptions" @start="dragStart" @end="dragEnd">
6 - <transition-group type="transition" :name="!drag ? 'flip-list' : null"> 6 + <transition-group type="transition" name="flip-list">
7 <li class="list-group-item" v-for="item in routeList" :key="item.routePriority"> 7 <li class="list-group-item" v-for="item in routeList" :key="item.routePriority">
8 <i :class="item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin' 8 <i :class="item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
9 " @click="item.fixed = !item.fixed" aria-hidden="true"></i> 9 " @click="item.fixed = !item.fixed" aria-hidden="true"></i>
......
...@@ -24,30 +24,31 @@ ...@@ -24,30 +24,31 @@
24 <el-button 24 <el-button
25 type="primary" 25 type="primary"
26 size="mini" 26 size="mini"
27 - :disabled="item.status == '3'" 27 + :disabled="item.status == '3' || status"
28 :loading="item.loading" 28 :loading="item.loading"
29 - v-if="item.status == '1'"
30 >保 存</el-button 29 >保 存</el-button
31 > 30 >
32 <el-button 31 <el-button
32 + v-if="showBtnRule(item)"
33 type="primary" 33 type="primary"
34 size="mini" 34 size="mini"
35 icon="el-icon-video-pause" 35 icon="el-icon-video-pause"
36 - :disabled="item.status == '3'"
37 :loading="item.loading" 36 :loading="item.loading"
38 - v-if="item.status == '1' && item.ruleDate" 37 + :disabled="status"
39 - >{{ item.status == '1' ? '停 用' : item.status == '3' ? '启 用' : '停 用'}}</el-button 38 + >{{ item.status | statusBtn }}</el-button
40 > 39 >
41 <el-button 40 <el-button
41 + v-if="showBtnRule(item)"
42 type="danger" 42 type="danger"
43 size="mini" 43 size="mini"
44 icon="el-icon-delete" 44 icon="el-icon-delete"
45 - :disabled="item.disabled" 45 + :disabled="item.status !== '3' || status"
46 :loading="item.loading" 46 :loading="item.loading"
47 - v-if="item.status == '1' && item.ruleDate"
48 >删 除</el-button 47 >删 除</el-button
49 > 48 >
50 - <span class="flight-route-title">普通规则</span> 49 + <span class="flight-route-title">
50 + {{ item.ruleDate ? "日期级别规则" : "普通规则" }}</span
51 + >
51 </div> 52 </div>
52 <el-divider></el-divider> 53 <el-divider></el-divider>
53 <div class="route-config-info"> 54 <div class="route-config-info">
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
59 <el-radio-group 60 <el-radio-group
60 v-model="item.isLocation" 61 v-model="item.isLocation"
61 @change="changeLocation" 62 @change="changeLocation"
63 + :disabled="status"
62 > 64 >
63 <el-radio label="1">包含始发站</el-radio> 65 <el-radio label="1">包含始发站</el-radio>
64 <el-radio label="2">不包含始发站</el-radio> 66 <el-radio label="2">不包含始发站</el-radio>
...@@ -67,6 +69,7 @@ ...@@ -67,6 +69,7 @@
67 <el-col :span="10"> 69 <el-col :span="10">
68 <el-input 70 <el-input
69 v-if="item.isLocation == '1'" 71 v-if="item.isLocation == '1'"
72 + :disabled="status"
70 type="textarea" 73 type="textarea"
71 v-model="item.location" 74 v-model="item.location"
72 :rows="4" 75 :rows="4"
...@@ -76,6 +79,7 @@ ...@@ -76,6 +79,7 @@
76 </el-input> 79 </el-input>
77 <el-input 80 <el-input
78 v-else 81 v-else
82 + :disabled="status"
79 type="textarea" 83 type="textarea"
80 v-model="item.notLocation" 84 v-model="item.notLocation"
81 :rows="4" 85 :rows="4"
...@@ -90,6 +94,7 @@ ...@@ -90,6 +94,7 @@
90 <el-form-item label="目的站"> 94 <el-form-item label="目的站">
91 <el-col :span="2"> 95 <el-col :span="2">
92 <el-radio-group 96 <el-radio-group
97 + :disabled="status"
93 v-model="item.isDestinationSite" 98 v-model="item.isDestinationSite"
94 @change="changeDestinationSite" 99 @change="changeDestinationSite"
95 > 100 >
...@@ -100,6 +105,7 @@ ...@@ -100,6 +105,7 @@
100 <el-col :span="10"> 105 <el-col :span="10">
101 <el-input 106 <el-input
102 v-if="item.isDestinationSite == '1'" 107 v-if="item.isDestinationSite == '1'"
108 + :disabled="status"
103 type="textarea" 109 type="textarea"
104 v-model="item.destinationSite" 110 v-model="item.destinationSite"
105 :rows="4" 111 :rows="4"
...@@ -109,6 +115,7 @@ ...@@ -109,6 +115,7 @@
109 </el-input> 115 </el-input>
110 <el-input 116 <el-input
111 v-else 117 v-else
118 + :disabled="status"
112 type="textarea" 119 type="textarea"
113 v-model="item.notDestinationSite" 120 v-model="item.notDestinationSite"
114 :rows="4" 121 :rows="4"
...@@ -123,6 +130,7 @@ ...@@ -123,6 +130,7 @@
123 <el-col :span="10"> 130 <el-col :span="10">
124 <el-form-item label="URSA包含"> 131 <el-form-item label="URSA包含">
125 <el-input 132 <el-input
133 + :disabled="status"
126 type="textarea" 134 type="textarea"
127 v-model="item.includeUrsa" 135 v-model="item.includeUrsa"
128 :rows="4" 136 :rows="4"
...@@ -134,6 +142,7 @@ ...@@ -134,6 +142,7 @@
134 <el-col :span="10"> 142 <el-col :span="10">
135 <el-form-item label="URSA不包含"> 143 <el-form-item label="URSA不包含">
136 <el-input 144 <el-input
145 + :disabled="status"
137 type="textarea" 146 type="textarea"
138 v-model="item.notIncludeUrsa" 147 v-model="item.notIncludeUrsa"
139 :rows="4" 148 :rows="4"
...@@ -148,6 +157,7 @@ ...@@ -148,6 +157,7 @@
148 <el-form-item label="件数"> 157 <el-form-item label="件数">
149 <el-col :span="10"> 158 <el-col :span="10">
150 <el-input 159 <el-input
160 + :disabled="status"
151 class="numberInput" 161 class="numberInput"
152 v-model.trim="item.minNumOfPieces" 162 v-model.trim="item.minNumOfPieces"
153 > 163 >
...@@ -162,6 +172,7 @@ ...@@ -162,6 +172,7 @@
162 > 172 >
163 <el-col :span="10"> 173 <el-col :span="10">
164 <el-input 174 <el-input
175 + :disabled="status"
165 class="numberInput" 176 class="numberInput"
166 v-model.trim="item.maxNumOfPieces" 177 v-model.trim="item.maxNumOfPieces"
167 > 178 >
...@@ -173,6 +184,7 @@ ...@@ -173,6 +184,7 @@
173 <el-form-item label="重量(KG)"> 184 <el-form-item label="重量(KG)">
174 <el-col :span="10"> 185 <el-col :span="10">
175 <el-input 186 <el-input
187 + :disabled="status"
176 class="numberInput" 188 class="numberInput"
177 v-model.trim="item.minWeight" 189 v-model.trim="item.minWeight"
178 > 190 >
...@@ -187,6 +199,7 @@ ...@@ -187,6 +199,7 @@
187 > 199 >
188 <el-col :span="10"> 200 <el-col :span="10">
189 <el-input 201 <el-input
202 + :disabled="status"
190 class="numberInput" 203 class="numberInput"
191 v-model.trim="item.maxWeight" 204 v-model.trim="item.maxWeight"
192 > 205 >
...@@ -199,6 +212,7 @@ ...@@ -199,6 +212,7 @@
199 <el-form-item label="申报类别"> 212 <el-form-item label="申报类别">
200 <el-card shadow="never" style="width: 95%"> 213 <el-card shadow="never" style="width: 95%">
201 <el-checkbox-group 214 <el-checkbox-group
215 + :disabled="status"
202 v-model="item.typeOfGoods" 216 v-model="item.typeOfGoods"
203 @change="changeCargoType" 217 @change="changeCargoType"
204 > 218 >
...@@ -229,6 +243,7 @@ ...@@ -229,6 +243,7 @@
229 <el-form-item label="货物类型"> 243 <el-form-item label="货物类型">
230 <el-card shadow="never" style="width: 95%"> 244 <el-card shadow="never" style="width: 95%">
231 <el-checkbox-group 245 <el-checkbox-group
246 + :disabled="status"
232 v-model="item.cargoType" 247 v-model="item.cargoType"
233 @change="changeCargoStatus" 248 @change="changeCargoStatus"
234 > 249 >
...@@ -260,6 +275,7 @@ ...@@ -260,6 +275,7 @@
260 <el-form-item label="取件扫描号"> 275 <el-form-item label="取件扫描号">
261 <el-card shadow="never" style="width: 95%"> 276 <el-card shadow="never" style="width: 95%">
262 <el-checkbox-group 277 <el-checkbox-group
278 + :disabled="status"
263 v-model="item.puporpuxCode" 279 v-model="item.puporpuxCode"
264 @change="changePuporpux" 280 @change="changePuporpux"
265 > 281 >
...@@ -290,6 +306,7 @@ ...@@ -290,6 +306,7 @@
290 <el-form-item label="Service Code"> 306 <el-form-item label="Service Code">
291 <el-card shadow="never" style="width: 95%"> 307 <el-card shadow="never" style="width: 95%">
292 <el-checkbox-group 308 <el-checkbox-group
309 + :disabled="status"
293 v-model="item.serviceCode" 310 v-model="item.serviceCode"
294 @change="changeServiceCode" 311 @change="changeServiceCode"
295 > 312 >
...@@ -320,6 +337,7 @@ ...@@ -320,6 +337,7 @@
320 <el-form-item label="Handling Code"> 337 <el-form-item label="Handling Code">
321 <el-card shadow="never" style="width: 95%"> 338 <el-card shadow="never" style="width: 95%">
322 <el-checkbox-group 339 <el-checkbox-group
340 + :disabled="status"
323 v-model="item.handlingCode" 341 v-model="item.handlingCode"
324 @change="changeHandlingCode" 342 @change="changeHandlingCode"
325 > 343 >
...@@ -350,6 +368,7 @@ ...@@ -350,6 +368,7 @@
350 <el-form-item label="Sub Category"> 368 <el-form-item label="Sub Category">
351 <el-card shadow="never" style="width: 95%"> 369 <el-card shadow="never" style="width: 95%">
352 <el-checkbox-group 370 <el-checkbox-group
371 + :disabled="status"
353 v-model="item.subCategory" 372 v-model="item.subCategory"
354 @change="changeSubCategory" 373 @change="changeSubCategory"
355 > 374 >
...@@ -436,6 +455,11 @@ export default { ...@@ -436,6 +455,11 @@ export default {
436 type: Array, 455 type: Array,
437 default: () => [], 456 default: () => [],
438 }, 457 },
458 + status: {
459 + // 标识是详情还是编辑
460 + type: Boolean,
461 + default: false,
462 + },
439 }, 463 },
440 data() { 464 data() {
441 return { 465 return {
...@@ -444,12 +468,46 @@ export default { ...@@ -444,12 +468,46 @@ export default {
444 }, 468 },
445 computed: {}, 469 computed: {},
446 filters: { 470 filters: {
447 - statusBtn(status){ 471 + // 状态:0 无效,1 有效 2 配置中 3 停用
448 - 472 + statusBtn(status) {
473 + // console.log(this)
474 + if (status == "0") {
475 + return "无 效";
476 + } else if (status == "1") {
477 + return "停 用";
478 + } else if (status == "3") {
479 + return "开 启";
480 + } else {
481 + return "保 存";
482 + }
449 }, 483 },
450 }, 484 },
451 mounted() {}, 485 mounted() {},
452 methods: { 486 methods: {
487 + showBtnRule(item) {
488 + /*
489 + 展示保存按钮、开启按钮/停用按钮、删除按钮逻辑如下:
490 + 1:当status状态等于3的时候展示:保存按钮、开启按钮/停用按钮、删除按钮;
491 + 2:当status状态等于1并且ruleDate字段有值的时候展示:保存按钮、开启按钮/停用按钮、删除按钮;
492 + 3:当从航班配置设置不查询日期的时候“查看&修改”的时候,
493 + 有效的航线也就是status状态等于1的时候也要展示:保存按钮、开启按钮/停用按钮、删除按钮;
494 + 4:那么问题来了当从航班配置设置不查询日期的时候状态为1的时候也要展示:保存按钮、开启按钮/停用按钮、删除按钮;
495 + 那么要么跳转的时候传过来一个参数;
496 + 5:如果是从【航班顺位】和【DM数据处理】跳转过来,那么航班航线设置维度只作为详情查看,禁用所有的操作。
497 + 所以展示不展示保存按钮、开启按钮/停用按钮、删除按钮毫无意义
498 + */
499 + if (item.status == "3" || (item.status == "1" && item.ruleDate)) {
500 + return true;
501 + } else if (item.status == "1" && item.remark) {
502 + // 航班配舱设置非日期级别情况下
503 + return true;
504 + } else if (item.status == "2") {
505 + // 航班配舱设置非日期级别情况下
506 + return true;
507 + } else {
508 + return false;
509 + }
510 + },
453 // 当前激活面板改变时触发 511 // 当前激活面板改变时触发
454 collapseChange(name) { 512 collapseChange(name) {
455 this.$emit("collapse", name); 513 this.$emit("collapse", name);
......
...@@ -22,8 +22,8 @@ export const formConfig = [ ...@@ -22,8 +22,8 @@ export const formConfig = [
22 { 22 {
23 label: "航线", 23 label: "航线",
24 type: "Input", 24 type: "Input",
25 - name: "flightRoute", 25 + name: "flightRouteListStr",
26 - prop: "flightRoute", 26 + prop: "flightRouteListStr",
27 placeholder: "", 27 placeholder: "",
28 span: 5, 28 span: 5,
29 labelWidth: "40px", 29 labelWidth: "40px",
...@@ -43,6 +43,7 @@ export const formConfig = [ ...@@ -43,6 +43,7 @@ export const formConfig = [
43 // 航线规则表单 43 // 航线规则表单
44 export const routeRuleForm = { 44 export const routeRuleForm = {
45 config: true, 45 config: true,
46 + remark: true,
46 flightRoute: "", // 飞行航线 47 flightRoute: "", // 飞行航线
47 location: null, // 包含始发站 48 location: null, // 包含始发站
48 notLocation: null, // 不包含始发站 49 notLocation: null, // 不包含始发站
......
...@@ -147,27 +147,15 @@ export default { ...@@ -147,27 +147,15 @@ export default {
147 this.$router.push({ 147 this.$router.push({
148 path: "/routeInfo", 148 path: "/routeInfo",
149 query: { 149 query: {
150 - purposeOfFlightNo: purposeOfFlightNo,
151 flightDate: ruleDate, 150 flightDate: ruleDate,
152 - flightRoute: flightRoute, 151 + purposeOfFlightNo: purposeOfFlightNo,
152 + flightRouteListStr: flightRoute,
153 status: status, 153 status: status,
154 - name: name, 154 + pageName: "flightAllocConfig",
155 + dataStatus: name,
156 + querySpecifyData: this.queryParams.querySpecifyData
155 }, 157 },
156 }); 158 });
157 - // let obj = {
158 - // id: ' ',
159 - // handle: handle,
160 - // fltNo: fltNo,
161 - // fltDate: fltDate != null ? fltDate : ' ',
162 - // route: ' ',
163 - // routeStatus: 'FlightAllocConfig',
164 - // status: status == '3' ? '3' : ' ',
165 - // createStatus: 1
166 - // }
167 - // this.$router.push({
168 - // name: "FlightAllocConfigInfo",
169 - // params: obj,
170 - // });
171 }, 159 },
172 //航班优先级修改 160 //航班优先级修改
173 toRouteOrder(val) { 161 toRouteOrder(val) {
......
1 +export default {
2 + computed: {
3 + // 获取路由参数
4 + getRouter() {
5 + if (this.$route.query.dataStatus == "view") {
6 + return true;
7 + } else if (this.$route.query.dataStatus == "edit") {
8 + return false;
9 + } else {
10 + return false;
11 + }
12 + },
13 + },
14 + methods: {
15 + // 获取所有数据字典
16 + getAllDictData() {
17 + allDictData()
18 + .then((res) => {
19 + if (res.code != 200) {
20 + this.msgError(res.msg);
21 + return;
22 + }
23 + // 给checkBox表单赋值做展示信息
24 + const { data } = res;
25 + this.cargoType = data.cargoType; // 申报类别
26 + this.cargoStatus = data.cargoStatus; // 货物类型
27 + this.puporpux = data.puporpux; // 取件扫描号
28 + this.serviceCode = data.serviceCode; // Service Code
29 + this.handlingCode = data.handlingCode; // Handling Code
30 + this.subCategory = data.subCategory; // Sub Category
31 + })
32 + .catch(() => {});
33 + },
34 + // 判断对象是否存在某个属性,并且把这个属性值使用分号分隔
35 + hasOwnProperty(item, key) {
36 + if (item.hasOwnProperty(key)) {
37 + if (item[key]) {
38 + item[key] = item[key].split(";");
39 + } else {
40 + item[key] = [];
41 + }
42 + }
43 + },
44 + // 设置属性值
45 + setattrVal(item) {
46 + if (item.location) {
47 + // 始发站
48 + item.isLocation = "1";
49 + }
50 + if (item.notLocation) {
51 + item.isLocation = "2";
52 + }
53 + if (item.location == null && item.notLocation == null) {
54 + item.isLocation = "1";
55 + }
56 + if (item.destinationSite) {
57 + // 目的站
58 + item.isDestinationSite = "1";
59 + }
60 + if (item.notDestinationSite) {
61 + item.isDestinationSite = "2";
62 + }
63 + if (item.destinationSite == null && item.notDestinationSite == null) {
64 + item.isDestinationSite = "1";
65 + }
66 + },
67 + // 失焦事件
68 + blurEvent({ originOfFlightNo }) {
69 + this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo);
70 + },
71 + // 当前激活面板改变时触发
72 + collapseChange(name) {
73 + // console.log(name);
74 + },
75 + // 始发站
76 + changeLocation(val) {
77 + console.log("始发站:", val);
78 + },
79 + // 目的站
80 + changeDestinationSite(val) {
81 + console.log("目的站:", val);
82 + },
83 + // 申报类别
84 + changeCargoType(arr) {
85 + console.log("申报类别:", arr);
86 + },
87 + // 货物类型
88 + changeCargoStatus(arr) {
89 + console.log("货物类型:", arr);
90 + },
91 + // 取件扫描号
92 + changePuporpux(arr) {
93 + console.log("取件扫描号:", arr);
94 + },
95 + // Service Code
96 + changeServiceCode(arr) {
97 + console.log("Service Code:", arr);
98 + },
99 + // Handling Code
100 + changeHandlingCode(arr) {
101 + console.log("Handling Code:", arr);
102 + },
103 + // Sub Category
104 + changeSubCategory(arr) {
105 + console.log("Sub Category:", arr);
106 + },
107 + },
108 +};
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> 67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
68 <template slot-scope="scope"> 68 <template slot-scope="scope">
69 <el-button size="mini" type="text" icon="el-icon-edit" 69 <el-button size="mini" type="text" icon="el-icon-edit"
70 - @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度 70 + @click="handleClick(scope.row)">查看配置维度
71 </el-button> 71 </el-button>
72 </template> 72 </template>
73 </el-table-column> 73 </el-table-column>
...@@ -275,21 +275,17 @@ export default { ...@@ -275,21 +275,17 @@ export default {
275 }, 275 },
276 methods: { 276 methods: {
277 //跳转到查看,修改页面 277 //跳转到查看,修改页面
278 - handleClick(fltNo, handle, fltDate, route, status) { 278 + handleClick({ actualFlight, flightDate, route }) {
279 this.openFlightDate = false; 279 this.openFlightDate = false;
280 - let obj = {
281 - id: ' ',
282 - handle: handle,
283 - fltNo: fltNo,
284 - fltDate: fltDate != null ? fltDate : ' ',
285 - route: route,
286 - routeStatus: 'FlightRandConfig',
287 - status: status,
288 - createStatus: 1,
289 - }
290 this.$router.push({ 280 this.$router.push({
291 - name: "FlightAllocConfigInfo", 281 + path: "/routeInfo",
292 - params: obj, 282 + query: {
283 + flightDate: flightDate,
284 + purposeOfFlightNo: actualFlight,
285 + flightRouteListStr: route,
286 + status: "",
287 + pageName: "flightRandConfig",
288 + },
293 }); 289 });
294 }, 290 },
295 /** 查询原航班顺位规则*/ 291 /** 查询原航班顺位规则*/
......
...@@ -893,20 +893,68 @@ export default { ...@@ -893,20 +893,68 @@ export default {
893 this.msgError("已删除不可操作"); 893 this.msgError("已删除不可操作");
894 return 894 return
895 } 895 }
896 - let obj = { 896 + /*
897 - id: ' ', 897 + 航班信息维护跳转过来,不管是White Tail还是Purple Tail:
898 - handle: 'updated', 898 + Purple Tail
899 - fltNo: val.fltNo, 899 + {
900 - fltDate: val.fltDate ? val.fltDate : null, 900 + purposeOfFlightNo: "LK002",
901 - route: val.route, 901 + flightDate: "2023-09-27",
902 - routeStatus: 'flightInformationMaintenance' + val.flightKindName, 902 + flightRouteListStr: "PVG;PEK;PVG-PEK",
903 - status: ' ', 903 + status: ""
904 - createStatus: 1, 904 + }
905 - } 905 + White Tail
906 - this.$router.push({ 906 + {
907 - name: 'FlightAllocConfigInfo', 907 + purposeOfFlightNo: "LK002",
908 - params: obj 908 + flightRouteListStr: "PVG;PEK;PVG-PEK",
909 - }) 909 + status: ""
910 + }
911 + 航班配舱设置:
912 + 非日期级别
913 + {
914 + flightDate: ""
915 + flightRoute: ""
916 + purposeOfFlightNo: "A381"
917 + status: ""
918 + }
919 + 有日期级别
920 + {
921 + flightDate: ""
922 + flightRoute: ""
923 + purposeOfFlightNo: "A381"
924 + status: ""
925 + }
926 + {
927 + flightDate: "2023-09-21"
928 + flightRoute: ""
929 + flightRouteListStr: "",
930 + purposeOfFlightNo: "A381"
931 + status: ""
932 + }
933 + 航班顺位
934 + {
935 + flightDate: "2023-07-01"
936 + flightRoute: ""
937 + purposeOfFlightNo: "LP003"
938 + status: ""
939 + }
940 + {
941 + flightRoute: ""
942 + flightRouteListStr: "",
943 + purposeOfFlightNo: "LP003"
944 + status: ""
945 + }
946 + */
947 + this.$router.push({
948 + path: "/routeInfo",
949 + query: {
950 + flightDate: val.fltDate,
951 + purposeOfFlightNo: val.fltNo,
952 + flightRouteListStr: val.route,
953 + status: val.status,
954 + flightKindName: val.flightKindName,
955 + pageName: "flightInformationMaintenance",
956 + },
957 + });
910 }, 958 },
911 // 航班状态 959 // 航班状态
912 flightState(multipleSelection, statusName) { 960 flightState(multipleSelection, statusName) {
......