Showing
17 changed files
with
1473 additions
and
943 deletions
| ... | @@ -16,7 +16,6 @@ | ... | @@ -16,7 +16,6 @@ |
| 16 | </div> | 16 | </div> |
| 17 | <el-dropdown-menu slot="dropdown"> | 17 | <el-dropdown-menu slot="dropdown"> |
| 18 | <router-link to="/user/profile"> | 18 | <router-link to="/user/profile"> |
| 19 | - <!-- <el-dropdown-item>个人中心</el-dropdown-item> --> | ||
| 20 | </router-link> | 19 | </router-link> |
| 21 | <el-dropdown-item @click.native="logout"> | 20 | <el-dropdown-item @click.native="logout"> |
| 22 | <span>退出登录</span> | 21 | <span>退出登录</span> | ... | ... |
| ... | @@ -12,6 +12,7 @@ const service = axios.create({ | ... | @@ -12,6 +12,7 @@ const service = axios.create({ |
| 12 | // baseURL: `http://47.103.140.98:7001/iMAC`, | 12 | // baseURL: `http://47.103.140.98:7001/iMAC`, |
| 13 | baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', | 13 | baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', |
| 14 | // baseURL: 'http://192.168.1.133:7001/iMAC', | 14 | // baseURL: 'http://192.168.1.133:7001/iMAC', |
| 15 | + // baseURL: 'http://192.168.1.133:7001/iMAC',//生产 | ||
| 15 | 16 | ||
| 16 | // 超时 | 17 | // 超时 |
| 17 | timeout: 30000, | 18 | timeout: 30000, |
| ... | @@ -82,7 +83,7 @@ service.interceptors.response.use(res => { | ... | @@ -82,7 +83,7 @@ service.interceptors.response.use(res => { |
| 82 | type: 'error' | 83 | type: 'error' |
| 83 | }) | 84 | }) |
| 84 | return Promise.reject(new Error(msg)) | 85 | return Promise.reject(new Error(msg)) |
| 85 | - } else if (code !== 200 && code !== 201 && code !== 202) { | 86 | + } else if (code !== 200 && code !== 201 && code !== 202 && code !== 603) { |
| 86 | Message({ | 87 | Message({ |
| 87 | message: msg, | 88 | message: msg, |
| 88 | type: 'error' | 89 | type: 'error' | ... | ... |
| ... | @@ -8,6 +8,7 @@ const mimeMap = { | ... | @@ -8,6 +8,7 @@ const mimeMap = { |
| 8 | const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器 | 8 | const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器 |
| 9 | // const baseUrl = 'http://47.103.140.98:7001/iMAC' //阿里云服务器 | 9 | // const baseUrl = 'http://47.103.140.98:7001/iMAC' //阿里云服务器 |
| 10 | // const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器 | 10 | // const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器 |
| 11 | +// const baseUrl = 'http://192.168.1.133:7001/iMAC' //生产 | ||
| 11 | 12 | ||
| 12 | export function downLoadZip(str, filename) { | 13 | export function downLoadZip(str, filename) { |
| 13 | var url = baseUrl + str | 14 | var url = baseUrl + str | ... | ... |
| ... | @@ -852,7 +852,7 @@ export default { | ... | @@ -852,7 +852,7 @@ export default { |
| 852 | .catch(() => {}); | 852 | .catch(() => {}); |
| 853 | }, | 853 | }, |
| 854 | //查询 | 854 | //查询 |
| 855 | - select() { | 855 | + async select() { |
| 856 | this.loading = true; | 856 | this.loading = true; |
| 857 | this.dataInfo(); | 857 | this.dataInfo(); |
| 858 | findCargoAllocationData(this.formData) | 858 | findCargoAllocationData(this.formData) | ... | ... |
| ... | @@ -129,8 +129,6 @@ import { | ... | @@ -129,8 +129,6 @@ import { |
| 129 | enableOrDisable, | 129 | enableOrDisable, |
| 130 | } from "@/api/destinationFlight"; | 130 | } from "@/api/destinationFlight"; |
| 131 | 131 | ||
| 132 | -import { parseTime } from "@/utils/FedEx"; | ||
| 133 | - | ||
| 134 | export default { | 132 | export default { |
| 135 | name: "FlightAllocConfig", | 133 | name: "FlightAllocConfig", |
| 136 | data() { | 134 | data() { | ... | ... |
| ... | @@ -391,7 +391,6 @@ export default { | ... | @@ -391,7 +391,6 @@ export default { |
| 391 | } | 391 | } |
| 392 | } | 392 | } |
| 393 | }); | 393 | }); |
| 394 | - console.log(errorList); | ||
| 395 | if (errorList.length != 0) { | 394 | if (errorList.length != 0) { |
| 396 | this.$message({ | 395 | this.$message({ |
| 397 | showClose: true, | 396 | showClose: true, | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | <el-form :model="queryParams" ref="queryForm" :inline="true"> | 3 | <el-form :model="queryParams" ref="queryForm" :inline="true"> |
| 4 | - | ||
| 5 | <el-form-item label="ACCS原航班"> | 4 | <el-form-item label="ACCS原航班"> |
| 6 | - <el-input type="text" v-model="upCase" placeholder="请输入ACCS原航班" clearable class="formItem"></el-input> | 5 | + <el-input |
| 6 | + type="text" | ||
| 7 | + v-model="upCase" | ||
| 8 | + placeholder="请输入ACCS原航班" | ||
| 9 | + clearable | ||
| 10 | + class="formItem" | ||
| 11 | + ></el-input> | ||
| 7 | <!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> --> | 12 | <!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> --> |
| 8 | </el-form-item> | 13 | </el-form-item> |
| 9 | <el-form-item label="状态" prop="status"> | 14 | <el-form-item label="状态" prop="status"> |
| 10 | - <el-select v-model="queryParams.status" placeholder="请选择" clearable size="small"> | 15 | + <el-select |
| 11 | - <el-option v-for="dict in statusList" :key="dict.id" :label="dict.name" :value="dict.id" /> | 16 | + v-model="queryParams.status" |
| 17 | + placeholder="请选择" | ||
| 18 | + clearable | ||
| 19 | + size="small" | ||
| 20 | + > | ||
| 21 | + <el-option | ||
| 22 | + v-for="dict in statusList" | ||
| 23 | + :key="dict.id" | ||
| 24 | + :label="dict.name" | ||
| 25 | + :value="dict.id" | ||
| 26 | + /> | ||
| 12 | </el-select> | 27 | </el-select> |
| 13 | - | ||
| 14 | </el-form-item> | 28 | </el-form-item> |
| 15 | 29 | ||
| 16 | <el-form-item> | 30 | <el-form-item> |
| 17 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询ACCS原航班配置</el-button> | 31 | + <el-button |
| 32 | + type="primary" | ||
| 33 | + icon="el-icon-search" | ||
| 34 | + size="mini" | ||
| 35 | + @click="handleQuery" | ||
| 36 | + >查询ACCS原航班配置</el-button | ||
| 37 | + > | ||
| 18 | </el-form-item> | 38 | </el-form-item> |
| 19 | <br /> | 39 | <br /> |
| 20 | <el-form-item label="日期" prop="flightDate"> | 40 | <el-form-item label="日期" prop="flightDate"> |
| 21 | - | 41 | + <el-date-picker |
| 22 | - <el-date-picker value-format="yyyy-MM-dd" v-model="queryParams.flightDate" type="date" placeholder="选择日期"> | 42 | + value-format="yyyy-MM-dd" |
| 43 | + v-model="queryParams.flightDate" | ||
| 44 | + type="date" | ||
| 45 | + placeholder="选择日期" | ||
| 46 | + > | ||
| 23 | </el-date-picker> | 47 | </el-date-picker> |
| 24 | </el-form-item> | 48 | </el-form-item> |
| 25 | 49 | ||
| 26 | <el-form-item> | 50 | <el-form-item> |
| 27 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="findSourceFlightAndFlightDate">查询实际配载航班 | 51 | + <el-button |
| 28 | - </el-button>  | 52 | + type="primary" |
| 29 | - <span style="color: red;">注:ACCS原航班+日期查询该日期的航班实际情况</span> | 53 | + icon="el-icon-search" |
| 54 | + size="mini" | ||
| 55 | + @click="findSourceFlightAndFlightDate" | ||
| 56 | + >查询实际配载航班 </el-button | ||
| 57 | + >  | ||
| 58 | + <span style="color: ff4949" | ||
| 59 | + >注:ACCS原航班+日期查询该日期的航班实际情况</span | ||
| 60 | + > | ||
| 30 | </el-form-item> | 61 | </el-form-item> |
| 31 | <br /> | 62 | <br /> |
| 32 | <el-form-item> | 63 | <el-form-item> |
| 33 | <el-col :span="1.5"> | 64 | <el-col :span="1.5"> |
| 34 | - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">添加规则</el-button> | 65 | + <el-button |
| 66 | + type="primary" | ||
| 67 | + icon="el-icon-plus" | ||
| 68 | + size="mini" | ||
| 69 | + @click="handleAdd" | ||
| 70 | + >添加规则</el-button | ||
| 71 | + > | ||
| 35 | </el-col> | 72 | </el-col> |
| 36 | -   <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 73 | +   |
| 74 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" | ||
| 75 | + >重置</el-button | ||
| 76 | + > | ||
| 37 | </el-form-item> | 77 | </el-form-item> |
| 38 | </el-form> | 78 | </el-form> |
| 39 | 79 | ||
| 40 | - | ||
| 41 | <el-table v-loading="loading" :data="sourceFlightRulesList"> | 80 | <el-table v-loading="loading" :data="sourceFlightRulesList"> |
| 42 | <el-table-column type="index" label="序号" align="center"> | 81 | <el-table-column type="index" label="序号" align="center"> |
| 43 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> | 82 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> |
| 44 | </el-table-column> | 83 | </el-table-column> |
| 45 | - <el-table-column label="ACCS原航班" align="center" prop="sourceFlightNo" /> | 84 | + <el-table-column |
| 46 | - <el-table-column label="配载航班排序" align="center" prop="flightRank" width="280" /> | 85 | + label="ACCS原航班" |
| 86 | + align="center" | ||
| 87 | + prop="sourceFlightNo" | ||
| 88 | + /> | ||
| 89 | + <el-table-column | ||
| 90 | + label="配载航班排序" | ||
| 91 | + align="center" | ||
| 92 | + prop="flightRank" | ||
| 93 | + width="280" | ||
| 94 | + /> | ||
| 47 | <!-- <el-table-column label="优先级" align="center" prop="priority" /> --> | 95 | <!-- <el-table-column label="优先级" align="center" prop="priority" /> --> |
| 48 | - <el-table-column label="周期" align="center" prop="dayOfWeek" width="180" /> | 96 | + <el-table-column |
| 49 | - <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" /> | 97 | + label="周期" |
| 50 | - <el-table-column label="开始时间" align="center" prop="startDate" width="100" /> | 98 | + align="center" |
| 51 | - <el-table-column label="结束时间" align="center" prop="endDate" width="100" /> | 99 | + prop="dayOfWeek" |
| 52 | - <el-table-column label="最后修改人" align="center" prop="updateUserName" width="100" /> | 100 | + width="180" |
| 53 | - <el-table-column label="最后修改时间" align="center" prop="updateTime" width="100" /> | 101 | + /> |
| 54 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right"> | 102 | + <el-table-column |
| 103 | + label="状态" | ||
| 104 | + align="center" | ||
| 105 | + prop="status" | ||
| 106 | + :formatter="statusFormat" | ||
| 107 | + /> | ||
| 108 | + <el-table-column | ||
| 109 | + label="开始时间" | ||
| 110 | + align="center" | ||
| 111 | + prop="startDate" | ||
| 112 | + width="100" | ||
| 113 | + /> | ||
| 114 | + <el-table-column | ||
| 115 | + label="结束时间" | ||
| 116 | + align="center" | ||
| 117 | + prop="endDate" | ||
| 118 | + width="100" | ||
| 119 | + /> | ||
| 120 | + <el-table-column | ||
| 121 | + label="最后修改人" | ||
| 122 | + align="center" | ||
| 123 | + prop="updateUserName" | ||
| 124 | + width="100" | ||
| 125 | + /> | ||
| 126 | + <el-table-column | ||
| 127 | + label="最后修改时间" | ||
| 128 | + align="center" | ||
| 129 | + prop="updateTime" | ||
| 130 | + width="100" | ||
| 131 | + /> | ||
| 132 | + <el-table-column | ||
| 133 | + label="操作" | ||
| 134 | + align="center" | ||
| 135 | + class-name="small-padding fixed-width" | ||
| 136 | + width="180" | ||
| 137 | + fixed="right" | ||
| 138 | + > | ||
| 55 | <template slot-scope="scope"> | 139 | <template slot-scope="scope"> |
| 56 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> | 140 | + <el-button |
| 57 | - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteorPlayorpause(scope.row,0,'删除')"> | 141 | + size="mini" |
| 58 | - 删除</el-button> | 142 | + type="text" |
| 59 | - <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'" | 143 | + icon="el-icon-edit" |
| 60 | - @click="handleDeleteorPlayorpause(scope.row,1,'启用')">启用</el-button> | 144 | + @click="handleUpdate(scope.row)" |
| 61 | - <el-button size="mini" type="text" icon="el-icon-video-pause" v-if="scope.row.status != '3'" | 145 | + >修改</el-button |
| 62 | - @click="handleDeleteorPlayorpause(scope.row,3,'停用')">停用</el-button> | 146 | + > |
| 147 | + <el-button | ||
| 148 | + size="mini" | ||
| 149 | + type="text" | ||
| 150 | + icon="el-icon-delete" | ||
| 151 | + @click="handleDeleteorPlayorpause(scope.row, 0, '删除')" | ||
| 152 | + > | ||
| 153 | + 删除</el-button | ||
| 154 | + > | ||
| 155 | + <el-button | ||
| 156 | + size="mini" | ||
| 157 | + type="text" | ||
| 158 | + icon="el-icon-video-play" | ||
| 159 | + v-if="scope.row.status == '3'" | ||
| 160 | + @click="handleDeleteorPlayorpause(scope.row, 1, '启用')" | ||
| 161 | + >启用</el-button | ||
| 162 | + > | ||
| 163 | + <el-button | ||
| 164 | + size="mini" | ||
| 165 | + type="text" | ||
| 166 | + icon="el-icon-video-pause" | ||
| 167 | + v-if="scope.row.status != '3'" | ||
| 168 | + @click="handleDeleteorPlayorpause(scope.row, 3, '停用')" | ||
| 169 | + >停用</el-button | ||
| 170 | + > | ||
| 63 | </template> | 171 | </template> |
| 64 | </el-table-column> | 172 | </el-table-column> |
| 65 | </el-table> | 173 | </el-table> |
| 66 | 174 | ||
| 67 | - <pagination v-show="total>0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | 175 | + <pagination |
| 68 | - :page.sync="queryParams.pageNum" :limit.sync="queryParams.limit" @pagination="findSourceFlightRules" /> | 176 | + v-show="total > 0" |
| 69 | - | 177 | + :total="total" |
| 178 | + layout=" prev, pager, next, jumper, sizes,total" | ||
| 179 | + :page.sync="queryParams.pageNum" | ||
| 180 | + :limit.sync="queryParams.limit" | ||
| 181 | + @pagination="findSourceFlightRules" | ||
| 182 | + /> | ||
| 70 | 183 | ||
| 71 | <!-- 查看目的航班对话框 --> | 184 | <!-- 查看目的航班对话框 --> |
| 72 | - <el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" :append-to-body="true"> | 185 | + <el-dialog |
| 186 | + title="实际配载航班" | ||
| 187 | + :visible.sync="openFlightDate" | ||
| 188 | + width="70%" | ||
| 189 | + :close-on-click-modal="false" | ||
| 190 | + :append-to-body="true" | ||
| 191 | + > | ||
| 73 | <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate"> | 192 | <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate"> |
| 74 | <el-table-column type="index" label="序号" align="center"> | 193 | <el-table-column type="index" label="序号" align="center"> |
| 75 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> | 194 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> |
| 76 | </el-table-column> | 195 | </el-table-column> |
| 77 | - <el-table-column label="ACCS原航班" align="center" prop="sourceFlightNo" /> | 196 | + <el-table-column |
| 78 | - <el-table-column label="实际配载航班" align="center" prop="actualFlight" width="280" /> | 197 | + label="ACCS原航班" |
| 198 | + align="center" | ||
| 199 | + prop="sourceFlightNo" | ||
| 200 | + /> | ||
| 201 | + <el-table-column | ||
| 202 | + label="实际配载航班" | ||
| 203 | + align="center" | ||
| 204 | + prop="actualFlight" | ||
| 205 | + width="280" | ||
| 206 | + /> | ||
| 79 | <el-table-column label="航班日期" align="center" prop="flightDate" /> | 207 | <el-table-column label="航班日期" align="center" prop="flightDate" /> |
| 80 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200"> | 208 | + <el-table-column |
| 209 | + label="操作" | ||
| 210 | + align="center" | ||
| 211 | + class-name="small-padding fixed-width" | ||
| 212 | + width="200" | ||
| 213 | + > | ||
| 81 | <template slot-scope="scope"> | 214 | <template slot-scope="scope"> |
| 82 | - <el-button size="mini" type="text" icon="el-icon-edit" | 215 | + <el-button |
| 83 | - @click="handleClick(scope.row.actualFlight, 'detail')">查看配置维度</el-button> | 216 | + size="mini" |
| 217 | + type="text" | ||
| 218 | + icon="el-icon-edit" | ||
| 219 | + @click="handleClick(scope.row.actualFlight, 'detail')" | ||
| 220 | + >查看配置维度</el-button | ||
| 221 | + > | ||
| 84 | </template> | 222 | </template> |
| 85 | </el-table-column> | 223 | </el-table-column> |
| 86 | </el-table> | 224 | </el-table> |
| ... | @@ -89,50 +227,84 @@ | ... | @@ -89,50 +227,84 @@ |
| 89 | </div> | 227 | </div> |
| 90 | </el-dialog> | 228 | </el-dialog> |
| 91 | 229 | ||
| 92 | - | ||
| 93 | <!-- 添加或修改对话框 --> | 230 | <!-- 添加或修改对话框 --> |
| 94 | - <el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false"> | 231 | + <el-dialog |
| 232 | + :title="title" | ||
| 233 | + :visible.sync="open" | ||
| 234 | + width="55%" | ||
| 235 | + :append-to-body="true" | ||
| 236 | + :close-on-click-modal="false" | ||
| 237 | + > | ||
| 95 | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> | 238 | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| 96 | <el-row> | 239 | <el-row> |
| 97 | <el-col :span="10"> | 240 | <el-col :span="10"> |
| 98 | <el-form-item label="ACCS原航班" prop="sourceFlightNo"> | 241 | <el-form-item label="ACCS原航班" prop="sourceFlightNo"> |
| 99 | - <el-input v-model="form.sourceFlightNo" placeholder="请输入ACCS原航班号" /> | 242 | + <el-input |
| 243 | + v-model="form.sourceFlightNo" | ||
| 244 | + placeholder="请输入ACCS原航班号" | ||
| 245 | + /> | ||
| 100 | </el-form-item> | 246 | </el-form-item> |
| 101 | </el-col> | 247 | </el-col> |
| 102 | </el-row> | 248 | </el-row> |
| 103 | <el-row> | 249 | <el-row> |
| 104 | <el-col :span="8"> | 250 | <el-col :span="8"> |
| 105 | <el-form-item label="有效开始时间" prop="startDate"> | 251 | <el-form-item label="有效开始时间" prop="startDate"> |
| 106 | - <el-date-picker clearable size="small" :picker-options="pickerOptionsStart" v-model="form.startDate" | 252 | + <el-date-picker |
| 107 | - type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间"> | 253 | + clearable |
| 254 | + size="small" | ||
| 255 | + :picker-options="pickerOptionsStart" | ||
| 256 | + v-model="form.startDate" | ||
| 257 | + type="date" | ||
| 258 | + value-format="yyyy-MM-dd" | ||
| 259 | + placeholder="选择开始时间" | ||
| 260 | + > | ||
| 108 | </el-date-picker> | 261 | </el-date-picker> |
| 109 | </el-form-item> | 262 | </el-form-item> |
| 110 | </el-col> | 263 | </el-col> |
| 111 | <el-col :span="12"> | 264 | <el-col :span="12"> |
| 112 | <el-form-item label="有效结束时间" prop="endDate"> | 265 | <el-form-item label="有效结束时间" prop="endDate"> |
| 113 | - <el-date-picker clearable size="small" :picker-options="pickerOptionsEnd" v-model="form.endDate" | 266 | + <el-date-picker |
| 114 | - type="date" value-format="yyyy-MM-dd" placeholder="选择结束时间"> | 267 | + clearable |
| 268 | + size="small" | ||
| 269 | + :picker-options="pickerOptionsEnd" | ||
| 270 | + v-model="form.endDate" | ||
| 271 | + type="date" | ||
| 272 | + value-format="yyyy-MM-dd" | ||
| 273 | + placeholder="选择结束时间" | ||
| 274 | + > | ||
| 115 | </el-date-picker> | 275 | </el-date-picker> |
| 116 | </el-form-item> | 276 | </el-form-item> |
| 117 | </el-col> | 277 | </el-col> |
| 118 | 278 | ||
| 119 | - <el-col :span="24" style="margin-bottom: 5%;"> | 279 | + <el-col :span="24" style="margin-bottom: 5%"> |
| 120 | - <span style="color: red;margin-left: 10%;">提示:配载航班之同请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span><br /> | 280 | + <span style="color: ff4949; margin-left: 10%" |
| 121 | - <span style="color: red;margin-left: 10%;">提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1;CZ433-1</span> | 281 | + >提示:配载航班之同请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span |
| 282 | + ><br /> | ||
| 283 | + <span style="color: ff4949; margin-left: 10%" | ||
| 284 | + >提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1;CZ433-1</span | ||
| 285 | + > | ||
| 122 | </el-col> | 286 | </el-col> |
| 123 | <el-col :span="24"> | 287 | <el-col :span="24"> |
| 124 | <el-form-item label="配载航班" prop="flightRank"> | 288 | <el-form-item label="配载航班" prop="flightRank"> |
| 125 | - <el-input type="textarea" v-model="form.flightRank" :rows="4"></el-input> | 289 | + <el-input |
| 290 | + type="textarea" | ||
| 291 | + v-model="form.flightRank" | ||
| 292 | + :rows="4" | ||
| 293 | + ></el-input> | ||
| 126 | </el-form-item> | 294 | </el-form-item> |
| 127 | </el-col> | 295 | </el-col> |
| 128 | <el-col :span="24"> | 296 | <el-col :span="24"> |
| 129 | <el-form-item label="周期段"> | 297 | <el-form-item label="周期段"> |
| 130 | <el-checkbox-group v-model="dayOfWeek"> | 298 | <el-checkbox-group v-model="dayOfWeek"> |
| 131 | - <el-checkbox v-for="item in dayOfWeekList" :key="item" :label="item" :name="item"></el-checkbox> | 299 | + <el-checkbox |
| 300 | + v-for="item in dayOfWeekList" | ||
| 301 | + :key="item" | ||
| 302 | + :label="item" | ||
| 303 | + :name="item" | ||
| 304 | + ></el-checkbox> | ||
| 132 | </el-checkbox-group> | 305 | </el-checkbox-group> |
| 133 | </el-form-item> | 306 | </el-form-item> |
| 134 | </el-col> | 307 | </el-col> |
| 135 | - | ||
| 136 | </el-row> | 308 | </el-row> |
| 137 | </el-form> | 309 | </el-form> |
| 138 | <div slot="footer" class="dialog-footer"> | 310 | <div slot="footer" class="dialog-footer"> |
| ... | @@ -143,296 +315,299 @@ | ... | @@ -143,296 +315,299 @@ |
| 143 | </div> | 315 | </div> |
| 144 | </template> | 316 | </template> |
| 145 | <script> | 317 | <script> |
| 146 | - import { | 318 | +import { |
| 147 | - findSourceFlightRulesApi, | 319 | + findSourceFlightRulesApi, |
| 148 | - sourceFlightRulesSaveApi, | 320 | + sourceFlightRulesSaveApi, |
| 149 | - delOrEnableORDisableApi, | 321 | + delOrEnableORDisableApi, |
| 150 | - findSourceFlightAndFlightDateApi | 322 | + findSourceFlightAndFlightDateApi, |
| 151 | - } from "@/api/sourceFlightRules"; | 323 | +} from "@/api/sourceFlightRules"; |
| 152 | - export default { | 324 | +export default { |
| 153 | - name: "FlightRandConfig", | 325 | + name: "FlightRandConfig", |
| 154 | - data() { | 326 | + data() { |
| 155 | - return { | 327 | + return { |
| 156 | - // data 中设定 | 328 | + // data 中设定 |
| 157 | - pickerOptionsStart: { | 329 | + pickerOptionsStart: { |
| 158 | - disabledDate: time => { | 330 | + disabledDate: (time) => { |
| 159 | - let endDateVal = this.form.endDate; | 331 | + let endDateVal = this.form.endDate; |
| 160 | - if (endDateVal) { | 332 | + if (endDateVal) { |
| 161 | - return time.getTime() > new Date(endDateVal).getTime() || time.getTime() < new Date().getTime() - 24 * | 333 | + return ( |
| 162 | - 60 * 60 * 1000; | 334 | + time.getTime() > new Date(endDateVal).getTime() || |
| 163 | - } else { | 335 | + time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000 |
| 164 | - return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; | 336 | + ); |
| 165 | - } | 337 | + } else { |
| 338 | + return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; | ||
| 166 | } | 339 | } |
| 167 | }, | 340 | }, |
| 168 | - pickerOptionsEnd: { | 341 | + }, |
| 169 | - disabledDate: time => { | 342 | + pickerOptionsEnd: { |
| 170 | - let beginDateVal = this.form.startDate; | 343 | + disabledDate: (time) => { |
| 171 | - if (beginDateVal) { | 344 | + let beginDateVal = this.form.startDate; |
| 172 | - return time.getTime() < new Date(beginDateVal).getTime(); | 345 | + if (beginDateVal) { |
| 173 | - } else { | 346 | + return time.getTime() < new Date(beginDateVal).getTime(); |
| 174 | - return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; | 347 | + } else { |
| 175 | - } | 348 | + return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; |
| 176 | } | 349 | } |
| 177 | }, | 350 | }, |
| 351 | + }, | ||
| 178 | 352 | ||
| 179 | - //周期段 | 353 | + //周期段 |
| 180 | - dayOfWeekList: ['D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7'], | 354 | + dayOfWeekList: ["D1", "D2", "D3", "D4", "D5", "D6", "D7"], |
| 181 | - // 遮罩层 | 355 | + // 遮罩层 |
| 182 | - loading: false, | 356 | + loading: false, |
| 183 | - // 遮罩层 | 357 | + // 遮罩层 |
| 184 | - loadingFlightDate: false, | 358 | + loadingFlightDate: false, |
| 185 | - // 弹出层标题 | 359 | + // 弹出层标题 |
| 186 | - title: "", | 360 | + title: "", |
| 187 | - // 总条数 | 361 | + // 总条数 |
| 188 | - total: 0, | 362 | + total: 0, |
| 189 | - // 原航班规则数据 | 363 | + // 原航班规则数据 |
| 190 | - sourceFlightRulesList: [], | 364 | + sourceFlightRulesList: [], |
| 191 | - //目的航班数据 | 365 | + //目的航班数据 |
| 192 | - sourceFlightAndFlightDate: [], | 366 | + sourceFlightAndFlightDate: [], |
| 193 | - statusList: [{ | 367 | + statusList: [ |
| 194 | - 'id': 1, | 368 | + { |
| 195 | - 'name': '有效' | 369 | + id: 1, |
| 196 | - }, { | 370 | + name: "有效", |
| 197 | - 'id': 3, | ||
| 198 | - 'name': '停用' | ||
| 199 | - }], | ||
| 200 | - // 新增修改查看规则弹出层 | ||
| 201 | - open: false, | ||
| 202 | - // 是否显示查看目的航班弹出层 | ||
| 203 | - openFlightDate: false, | ||
| 204 | - // 查询参数 | ||
| 205 | - queryParams: { | ||
| 206 | - start: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 207 | - pageNum: 1, | ||
| 208 | - limit: 20, //一页显示多少条数据 | ||
| 209 | - sourceFlightNo: undefined, //原航班号 | ||
| 210 | - status: undefined, //状态 | ||
| 211 | - flightDate: undefined //日期 | ||
| 212 | }, | 371 | }, |
| 213 | - dayOfWeek: [], | 372 | + { |
| 214 | - // 表单参数 | 373 | + id: 3, |
| 215 | - form: { | 374 | + name: "停用", |
| 216 | - dayOfWeek: [] | ||
| 217 | }, | 375 | }, |
| 218 | - // 表单校验 | 376 | + ], |
| 219 | - rules: { | 377 | + // 新增修改查看规则弹出层 |
| 220 | - sourceFlightNo: [{ | 378 | + open: false, |
| 379 | + // 是否显示查看目的航班弹出层 | ||
| 380 | + openFlightDate: false, | ||
| 381 | + // 查询参数 | ||
| 382 | + queryParams: { | ||
| 383 | + start: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 384 | + pageNum: 1, | ||
| 385 | + limit: 20, //一页显示多少条数据 | ||
| 386 | + sourceFlightNo: undefined, //原航班号 | ||
| 387 | + status: undefined, //状态 | ||
| 388 | + flightDate: undefined, //日期 | ||
| 389 | + }, | ||
| 390 | + dayOfWeek: [], | ||
| 391 | + // 表单参数 | ||
| 392 | + form: { | ||
| 393 | + dayOfWeek: [], | ||
| 394 | + }, | ||
| 395 | + // 表单校验 | ||
| 396 | + rules: { | ||
| 397 | + sourceFlightNo: [ | ||
| 398 | + { | ||
| 221 | required: true, | 399 | required: true, |
| 222 | message: "ACCS原航班号不能为空", | 400 | message: "ACCS原航班号不能为空", |
| 223 | - trigger: "blur" | 401 | + trigger: "blur", |
| 224 | - }], | 402 | + }, |
| 225 | - flightRank: [{ | 403 | + ], |
| 404 | + flightRank: [ | ||
| 405 | + { | ||
| 226 | required: true, | 406 | required: true, |
| 227 | message: "配载航班不能为空", | 407 | message: "配载航班不能为空", |
| 228 | - trigger: "blur" | 408 | + trigger: "blur", |
| 229 | - }], | ||
| 230 | - } | ||
| 231 | - }; | ||
| 232 | - }, | ||
| 233 | - created() { | ||
| 234 | - this.findSourceFlightRules(); | ||
| 235 | - }, | ||
| 236 | - methods: { | ||
| 237 | - //跳转到查看,修改页面 | ||
| 238 | - handleClick(flightiId, handle) { | ||
| 239 | - this.openFlightDate = false; | ||
| 240 | - this.$router.push({ | ||
| 241 | - name: "FlightAllocConfigInfo", | ||
| 242 | - params: { | ||
| 243 | - handle: handle, | ||
| 244 | - id: flightiId | ||
| 245 | }, | 409 | }, |
| 246 | - }); | 410 | + ], |
| 247 | - | ||
| 248 | }, | 411 | }, |
| 249 | - /** 查询原航班顺位规则*/ | 412 | + }; |
| 250 | - findSourceFlightRules() { | 413 | + }, |
| 251 | - this.loading = true; | 414 | + created() { |
| 252 | - if (this.queryParams.pageNum > 1) { | 415 | + this.findSourceFlightRules(); |
| 253 | - this.queryParams.start = (this.queryParams.pageNum - 1) * this.queryParams.limit | 416 | + }, |
| 417 | + methods: { | ||
| 418 | + //跳转到查看,修改页面 | ||
| 419 | + handleClick(flightiId, handle) { | ||
| 420 | + this.openFlightDate = false; | ||
| 421 | + this.$router.push({ | ||
| 422 | + name: "FlightAllocConfigInfo", | ||
| 423 | + params: { | ||
| 424 | + handle: handle, | ||
| 425 | + id: flightiId, | ||
| 426 | + }, | ||
| 427 | + }); | ||
| 428 | + }, | ||
| 429 | + /** 查询原航班顺位规则*/ | ||
| 430 | + findSourceFlightRules() { | ||
| 431 | + this.loading = true; | ||
| 432 | + if (this.queryParams.pageNum > 1) { | ||
| 433 | + this.queryParams.start = | ||
| 434 | + (this.queryParams.pageNum - 1) * this.queryParams.limit; | ||
| 435 | + } else { | ||
| 436 | + this.queryParams.start = 0; | ||
| 437 | + } | ||
| 438 | + findSourceFlightRulesApi(this.queryParams).then((response) => { | ||
| 439 | + if (response.code == 200) { | ||
| 440 | + this.sourceFlightRulesList = response.data.list; | ||
| 441 | + this.total = response.data.totalCount; | ||
| 442 | + this.loading = false; | ||
| 254 | } else { | 443 | } else { |
| 255 | - this.queryParams.start = 0; | 444 | + this.msgError(response.msg); |
| 256 | } | 445 | } |
| 257 | - findSourceFlightRulesApi(this.queryParams).then(response => { | 446 | + }); |
| 258 | - if (response.code == 200) { | 447 | + }, |
| 259 | - this.sourceFlightRulesList = response.data.list; | 448 | + /** 新增按钮操作 */ |
| 260 | - this.total = response.data.totalCount; | 449 | + handleAdd() { |
| 261 | - this.loading = false; | 450 | + this.form = {}; |
| 262 | - } else { | 451 | + this.open = true; |
| 263 | - this.msgError(response.msg); | 452 | + this.title = "添加ACCS原航班顺位规则"; |
| 264 | - } | 453 | + this.form.id = -1; |
| 265 | - | 454 | + this.dayOfWeek = []; |
| 455 | + }, | ||
| 456 | + /** 修改按钮操作 */ | ||
| 457 | + handleUpdate(row) { | ||
| 458 | + this.form = {}; | ||
| 459 | + this.dayOfWeek = []; | ||
| 460 | + this.open = true; | ||
| 461 | + this.title = "修改ACCS原航班顺位规则"; | ||
| 462 | + this.form = JSON.parse(JSON.stringify(row)); | ||
| 463 | + this.dayOfWeek = this.form.dayOfWeek | ||
| 464 | + ? this.form.dayOfWeek.split(";") | ||
| 465 | + : []; | ||
| 466 | + //this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : []; | ||
| 467 | + }, | ||
| 468 | + /** 删除 启用 停用按钮操作 */ | ||
| 469 | + handleDeleteorPlayorpause(row, status, statusText) { | ||
| 470 | + //删除前需要停用 | ||
| 471 | + if (status === 0 && row.status != "3") { | ||
| 472 | + this.$message({ | ||
| 473 | + message: "请停用后删除", | ||
| 474 | + type: "warning", | ||
| 266 | }); | 475 | }); |
| 267 | - | 476 | + return; |
| 268 | - }, | 477 | + } |
| 269 | - /** 新增按钮操作 */ | 478 | + |
| 270 | - handleAdd() { | 479 | + this.$confirm("是否确认" + statusText + "此数据项?", "警告", { |
| 271 | - this.form = {}; | 480 | + confirmButtonText: "确定", |
| 272 | - this.open = true; | 481 | + cancelButtonText: "取消", |
| 273 | - this.title = "添加ACCS原航班顺位规则"; | 482 | + type: "warning", |
| 274 | - this.form.id = -1; | 483 | + }).then(() => { |
| 275 | - this.dayOfWeek = []; | 484 | + let disable = { |
| 276 | - | 485 | + id: row.id, |
| 277 | - }, | 486 | + status: status, |
| 278 | - /** 修改按钮操作 */ | 487 | + }; |
| 279 | - handleUpdate(row) { | 488 | + delOrEnableORDisableApi(disable) |
| 280 | - | 489 | + .then((response) => { |
| 281 | - this.form = {}; | 490 | + if (response.code == 200) { |
| 282 | - this.dayOfWeek = []; | 491 | + this.findSourceFlightRules(); |
| 283 | - this.open = true; | 492 | + this.msgSuccess(statusText + "成功"); |
| 284 | - this.title = "修改ACCS原航班顺位规则"; | 493 | + } else { |
| 285 | - this.form = JSON.parse(JSON.stringify(row)); | 494 | + this.msgError(response.msg); |
| 286 | - this.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : []; | ||
| 287 | - //this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : []; | ||
| 288 | - | ||
| 289 | - }, | ||
| 290 | - /** 删除 启用 停用按钮操作 */ | ||
| 291 | - handleDeleteorPlayorpause(row, status, statusText) { | ||
| 292 | - //删除前需要停用 | ||
| 293 | - if (status === 0 && row.status != '3') { | ||
| 294 | - this.$message({ | ||
| 295 | - message: '请停用后删除', | ||
| 296 | - type: 'warning' | ||
| 297 | - }); | ||
| 298 | - return; | ||
| 299 | - } | ||
| 300 | - | ||
| 301 | - this.$confirm('是否确认' + statusText + '此数据项?', "警告", { | ||
| 302 | - confirmButtonText: "确定", | ||
| 303 | - cancelButtonText: "取消", | ||
| 304 | - type: "warning" | ||
| 305 | - }).then(function() { | ||
| 306 | - | ||
| 307 | - let disable = { | ||
| 308 | - id: row.id, | ||
| 309 | - status: status | ||
| 310 | - }; | ||
| 311 | - | ||
| 312 | - return delOrEnableORDisableApi(disable); | ||
| 313 | - }).then(response => { | ||
| 314 | - if (response.code == 200) { | ||
| 315 | - this.findSourceFlightRules(); | ||
| 316 | - this.msgSuccess(statusText + "成功"); | ||
| 317 | - } else { | ||
| 318 | - this.msgError(response.msg); | ||
| 319 | - } | ||
| 320 | - | ||
| 321 | - }).catch(function() {}); | ||
| 322 | - }, | ||
| 323 | - /** 提交按钮 */ | ||
| 324 | - submitForm: function() { | ||
| 325 | - this.$refs["form"].validate(valid => { | ||
| 326 | - if (valid) { | ||
| 327 | - this.form.dayOfWeek = this.dayOfWeek.sort(); | ||
| 328 | - let formdata = JSON.parse(JSON.stringify(this.form)); | ||
| 329 | - formdata.sourceFlightNo=formdata.sourceFlightNo.trim().toUpperCase(); | ||
| 330 | - formdata.flightRank=formdata.flightRank.trim().toUpperCase(); | ||
| 331 | - if (formdata.startDate === undefined || formdata.startDate == null) { | ||
| 332 | - formdata.startDate = ""; | ||
| 333 | - } | ||
| 334 | - if (formdata.endDate === undefined || formdata.endDate == null) { | ||
| 335 | - formdata.endDate = ""; | ||
| 336 | } | 495 | } |
| 337 | - //处理数据 | 496 | + }) |
| 338 | - sourceFlightRulesSaveApi(formdata).then(response => { | 497 | + .catch(() => {}); |
| 339 | - if (response.code === 200) { | 498 | + }); |
| 340 | - this.msgSuccess("保存成功"); | 499 | + }, |
| 341 | - this.open = false; | 500 | + /** 提交按钮 */ |
| 342 | - this.findSourceFlightRules(); | 501 | + submitForm: function () { |
| 343 | - } else { | 502 | + this.$refs["form"].validate((valid) => { |
| 344 | - this.msgError(response.msg); | 503 | + if (valid) { |
| 345 | - } | 504 | + this.form.dayOfWeek = this.dayOfWeek.sort(); |
| 346 | - }); | 505 | + let formdata = JSON.parse(JSON.stringify(this.form)); |
| 347 | - | 506 | + formdata.sourceFlightNo = formdata.sourceFlightNo |
| 507 | + .trim() | ||
| 508 | + .toUpperCase(); | ||
| 509 | + formdata.flightRank = formdata.flightRank.trim().toUpperCase(); | ||
| 510 | + if (formdata.startDate === undefined || formdata.startDate == null) { | ||
| 511 | + formdata.startDate = ""; | ||
| 348 | } | 512 | } |
| 349 | - }); | 513 | + if (formdata.endDate === undefined || formdata.endDate == null) { |
| 350 | - }, | 514 | + formdata.endDate = ""; |
| 351 | - // 表单重置 | ||
| 352 | - reset() { | ||
| 353 | - this.form = { | ||
| 354 | - | ||
| 355 | - dayOfWeek: [] | ||
| 356 | - | ||
| 357 | - }; | ||
| 358 | - this.resetForm("form"); | ||
| 359 | - }, | ||
| 360 | - /** 查询目的航班*/ | ||
| 361 | - findSourceFlightAndFlightDate() { | ||
| 362 | - //校验原航班号非空 | ||
| 363 | - if (this.queryParams.sourceFlightNo === null || this.queryParams.sourceFlightNo === undefined || this | ||
| 364 | - .queryParams.sourceFlightNo.trim() === '') { | ||
| 365 | - this.$message.warning("ACCS原航班号为空"); | ||
| 366 | - return | ||
| 367 | - } | ||
| 368 | - //校验原日期非空 | ||
| 369 | - if (this.queryParams.flightDate === null || this.queryParams.flightDate === undefined) { | ||
| 370 | - this.$message.warning("日期为空"); | ||
| 371 | - return | ||
| 372 | - } | ||
| 373 | - this.openFlightDate = true; | ||
| 374 | - this.loadingFlightDate = true; | ||
| 375 | - this.sourceFlightAndFlightDate = []; | ||
| 376 | - findSourceFlightAndFlightDateApi(this.queryParams).then(response => { | ||
| 377 | - if (response.code === 200) { | ||
| 378 | - this.sourceFlightAndFlightDate = response.data; | ||
| 379 | - this.loadingFlightDate = false; | ||
| 380 | - } else { | ||
| 381 | - this.msgError(response.msg); | ||
| 382 | } | 515 | } |
| 383 | - | 516 | + //处理数据 |
| 384 | - }); | 517 | + sourceFlightRulesSaveApi(formdata).then((response) => { |
| 385 | - | 518 | + if (response.code === 200) { |
| 386 | - | 519 | + this.msgSuccess("保存成功"); |
| 387 | - }, | 520 | + this.open = false; |
| 388 | - // 目的航班弹出框返回 | 521 | + this.findSourceFlightRules(); |
| 389 | - cancelFlightDate() { | 522 | + } else { |
| 390 | - this.openFlightDate = false; | 523 | + this.msgError(response.msg); |
| 391 | - }, | 524 | + } |
| 392 | - // 取消按钮 | 525 | + }); |
| 393 | - cancel() { | ||
| 394 | - this.open = false; | ||
| 395 | - //this.reset(); | ||
| 396 | - }, | ||
| 397 | - // 状态字典翻译 | ||
| 398 | - statusFormat(row) { | ||
| 399 | - | ||
| 400 | - if (row.status === '1') { | ||
| 401 | - return '有效' | ||
| 402 | - } else if (row.status === '0') { | ||
| 403 | - return '执行中' | ||
| 404 | - } else if (row.status === '3') { | ||
| 405 | - return '停用' | ||
| 406 | } | 526 | } |
| 407 | - return row.status; | 527 | + }); |
| 408 | - }, | ||
| 409 | - /** 重置按钮操作 */ | ||
| 410 | - resetQuery() { | ||
| 411 | - this.queryParams.sourceFlightNo = undefined | ||
| 412 | - this.resetForm("queryForm"); | ||
| 413 | - this.handleQuery(); | ||
| 414 | - }, | ||
| 415 | - /** 搜索按钮操作 */ | ||
| 416 | - handleQuery() { | ||
| 417 | - this.queryParams.pageNum = 1; | ||
| 418 | - this.queryParams.start = 0; | ||
| 419 | - this.findSourceFlightRules(); | ||
| 420 | - }, | ||
| 421 | - | ||
| 422 | }, | 528 | }, |
| 423 | - computed: { | 529 | + // 表单重置 |
| 424 | - upCase: { | 530 | + reset() { |
| 425 | - get: function() { | 531 | + this.form = { |
| 426 | - return this.queryParams.sourceFlightNo; | 532 | + dayOfWeek: [], |
| 427 | - }, | 533 | + }; |
| 428 | - set: function(val) { | 534 | + this.resetForm("form"); |
| 429 | - this.queryParams.sourceFlightNo = val.toUpperCase(); | 535 | + }, |
| 430 | - }, | 536 | + /** 查询目的航班*/ |
| 537 | + findSourceFlightAndFlightDate() { | ||
| 538 | + //校验原航班号非空 | ||
| 539 | + if ( | ||
| 540 | + this.queryParams.sourceFlightNo === null || | ||
| 541 | + this.queryParams.sourceFlightNo === undefined || | ||
| 542 | + this.queryParams.sourceFlightNo.trim() === "" | ||
| 543 | + ) { | ||
| 544 | + this.$message.warning("ACCS原航班号为空"); | ||
| 545 | + return; | ||
| 546 | + } | ||
| 547 | + //校验原日期非空 | ||
| 548 | + if ( | ||
| 549 | + this.queryParams.flightDate === null || | ||
| 550 | + this.queryParams.flightDate === undefined | ||
| 551 | + ) { | ||
| 552 | + this.$message.warning("日期为空"); | ||
| 553 | + return; | ||
| 554 | + } | ||
| 555 | + this.openFlightDate = true; | ||
| 556 | + this.loadingFlightDate = true; | ||
| 557 | + this.sourceFlightAndFlightDate = []; | ||
| 558 | + findSourceFlightAndFlightDateApi(this.queryParams).then((response) => { | ||
| 559 | + if (response.code === 200) { | ||
| 560 | + this.sourceFlightAndFlightDate = response.data; | ||
| 561 | + this.loadingFlightDate = false; | ||
| 562 | + } else { | ||
| 563 | + this.msgError(response.msg); | ||
| 564 | + } | ||
| 565 | + }); | ||
| 566 | + }, | ||
| 567 | + // 目的航班弹出框返回 | ||
| 568 | + cancelFlightDate() { | ||
| 569 | + this.openFlightDate = false; | ||
| 570 | + }, | ||
| 571 | + // 取消按钮 | ||
| 572 | + cancel() { | ||
| 573 | + this.open = false; | ||
| 574 | + //this.reset(); | ||
| 575 | + }, | ||
| 576 | + // 状态字典翻译 | ||
| 577 | + statusFormat(row) { | ||
| 578 | + if (row.status === "1") { | ||
| 579 | + return "有效"; | ||
| 580 | + } else if (row.status === "0") { | ||
| 581 | + return "执行中"; | ||
| 582 | + } else if (row.status === "3") { | ||
| 583 | + return "停用"; | ||
| 584 | + } | ||
| 585 | + return row.status; | ||
| 586 | + }, | ||
| 587 | + /** 重置按钮操作 */ | ||
| 588 | + resetQuery() { | ||
| 589 | + this.queryParams.sourceFlightNo = undefined; | ||
| 590 | + this.resetForm("queryForm"); | ||
| 591 | + this.handleQuery(); | ||
| 592 | + }, | ||
| 593 | + /** 搜索按钮操作 */ | ||
| 594 | + handleQuery() { | ||
| 595 | + this.queryParams.pageNum = 1; | ||
| 596 | + this.queryParams.start = 0; | ||
| 597 | + this.findSourceFlightRules(); | ||
| 598 | + }, | ||
| 599 | + }, | ||
| 600 | + computed: { | ||
| 601 | + upCase: { | ||
| 602 | + get: function () { | ||
| 603 | + return this.queryParams.sourceFlightNo; | ||
| 604 | + }, | ||
| 605 | + set: function (val) { | ||
| 606 | + this.queryParams.sourceFlightNo = val.toUpperCase(); | ||
| 431 | }, | 607 | }, |
| 432 | }, | 608 | }, |
| 433 | - }; | 609 | + }, |
| 610 | +}; | ||
| 434 | </script> | 611 | </script> |
| 435 | <style> | 612 | <style> |
| 436 | - | ||
| 437 | - | ||
| 438 | </style> | 613 | </style> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="medium"> | 3 | + <el-form |
| 4 | + class="form-header" | ||
| 5 | + :model="queryParams" | ||
| 6 | + label-position="right" | ||
| 7 | + label-width="auto" | ||
| 8 | + size="medium" | ||
| 9 | + > | ||
| 4 | <el-row> | 10 | <el-row> |
| 5 | <el-col :span="6"> | 11 | <el-col :span="6"> |
| 6 | <el-form-item label="航班日期从" prop="fltDateStart"> | 12 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| ... | @@ -87,27 +93,26 @@ | ... | @@ -87,27 +93,26 @@ |
| 87 | </el-switch> | 93 | </el-switch> |
| 88 | </el-col> | 94 | </el-col> |
| 89 | </el-row> | 95 | </el-row> |
| 90 | - <div style="margin-top:25px"> | 96 | + <div style="margin-top: 25px"> |
| 91 | - <el-button | 97 | + <el-button |
| 92 | - type="primary" | 98 | + type="primary" |
| 93 | - icon="el-icon-search" | 99 | + icon="el-icon-search" |
| 94 | - size="mini" | 100 | + size="mini" |
| 95 | - @click="handleQuery" | 101 | + @click="handleQuery" |
| 96 | - >搜索</el-button | 102 | + >搜索</el-button |
| 97 | - > | 103 | + > |
| 98 | - <el-button | 104 | + <el-button |
| 99 | - type="warning" | 105 | + type="warning" |
| 100 | - :disabled="tableData.length == 0" | 106 | + :disabled="tableData.length == 0" |
| 101 | - @click="xlse()" | 107 | + @click="xlse()" |
| 102 | - :loading="downLoadingTip.downloading" | 108 | + :loading="downLoadingTip.downloading" |
| 103 | - icon="el-icon-download" | 109 | + icon="el-icon-download" |
| 104 | - size="mini" | 110 | + size="mini" |
| 105 | - >{{ | 111 | + >{{ |
| 106 | - downLoadingTip.downloading ? downLoadingTip.tip : "导出" | 112 | + downLoadingTip.downloading ? downLoadingTip.tip : "导出" |
| 107 | - }}</el-button | 113 | + }}</el-button |
| 108 | - > | 114 | + > |
| 109 | </div> | 115 | </div> |
| 110 | - | ||
| 111 | </el-form> | 116 | </el-form> |
| 112 | 117 | ||
| 113 | <el-table | 118 | <el-table | ... | ... |
| ... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
| 13 | </el-form-item> | 13 | </el-form-item> |
| 14 | </el-form> | 14 | </el-form> |
| 15 | <div style="font-size: 12px; font-weight: 700"> | 15 | <div style="font-size: 12px; font-weight: 700"> |
| 16 | - 提示:<span style="color: #0000ff">以下为所提交的数据或出错信息</span> | 16 | + 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> |
| 17 | </div> | 17 | </div> |
| 18 | <el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" border> | 18 | <el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" border> |
| 19 | <el-table-column label="行号" prop="line" fixed width="50" align="center"> | 19 | <el-table-column label="行号" prop="line" fixed width="50" align="center"> |
| ... | @@ -81,7 +81,6 @@ | ... | @@ -81,7 +81,6 @@ |
| 81 | uploadExcel(option) { | 81 | uploadExcel(option) { |
| 82 | //上传excel | 82 | //上传excel |
| 83 | const file = option.file; | 83 | const file = option.file; |
| 84 | - console.log(option); | ||
| 85 | this.loading=true; | 84 | this.loading=true; |
| 86 | importcaPreReview(file, this.form.type).then((res) => { | 85 | importcaPreReview(file, this.form.type).then((res) => { |
| 87 | this.loading=false; | 86 | this.loading=false; | ... | ... |
| ... | @@ -34,7 +34,7 @@ | ... | @@ -34,7 +34,7 @@ |
| 34 | </el-form-item> | 34 | </el-form-item> |
| 35 | </el-form> | 35 | </el-form> |
| 36 | <div style="font-size: 12px; font-weight: 700"> | 36 | <div style="font-size: 12px; font-weight: 700"> |
| 37 | - 提示:<span style="color: #0000ff">以下为所提交的数据或出错信息</span> | 37 | + 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> |
| 38 | </div> | 38 | </div> |
| 39 | <el-table | 39 | <el-table |
| 40 | ref="filterTable" | 40 | ref="filterTable" |
| ... | @@ -64,8 +64,7 @@ | ... | @@ -64,8 +64,7 @@ |
| 64 | </el-table> | 64 | </el-table> |
| 65 | </div> | 65 | </div> |
| 66 | </template> | 66 | </template> |
| 67 | - </div> | 67 | + |
| 68 | -</template> | ||
| 69 | <script> | 68 | <script> |
| 70 | import { | 69 | import { |
| 71 | filghtKindData, | 70 | filghtKindData, |
| ... | @@ -73,7 +72,7 @@ import { | ... | @@ -73,7 +72,7 @@ import { |
| 73 | importFlight, | 72 | importFlight, |
| 74 | } from "@/api/flightInfoImport"; | 73 | } from "@/api/flightInfoImport"; |
| 75 | export default { | 74 | export default { |
| 76 | - name:"FlightInformationImport", | 75 | + name: "FlightInformationImport", |
| 77 | data() { | 76 | data() { |
| 78 | return { | 77 | return { |
| 79 | flightType: [], | 78 | flightType: [], |
| ... | @@ -126,15 +125,14 @@ export default { | ... | @@ -126,15 +125,14 @@ export default { |
| 126 | uploadExcel(option) { | 125 | uploadExcel(option) { |
| 127 | //上传excel | 126 | //上传excel |
| 128 | const file = option.file; | 127 | const file = option.file; |
| 129 | - console.log(option); | ||
| 130 | importFlight(file, this.form.type).then((res) => { | 128 | importFlight(file, this.form.type).then((res) => { |
| 131 | if (res.code != 200) { | 129 | if (res.code != 200) { |
| 132 | if (res.code == 603) { | 130 | if (res.code == 603) { |
| 133 | - this.$alert(res.msg , "提示", { | 131 | + this.$alert(res.msg, "提示", { |
| 134 | confirmButtonText: "确定", | 132 | confirmButtonText: "确定", |
| 135 | type: "warning", | 133 | type: "warning", |
| 136 | }); | 134 | }); |
| 137 | - }else { | 135 | + } else { |
| 138 | this.$message.error(res.msg); | 136 | this.$message.error(res.msg); |
| 139 | this.tableData = res.data; | 137 | this.tableData = res.data; |
| 140 | } | 138 | } | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium"> | 3 | + <el-form |
| 4 | + class="form-header" | ||
| 5 | + :model="queryParams" | ||
| 6 | + ref="queryForm" | ||
| 7 | + label-position="right" | ||
| 8 | + label-width="auto" | ||
| 9 | + size="medium" | ||
| 10 | + > | ||
| 4 | <el-row> | 11 | <el-row> |
| 5 | <el-col :span="6"> | 12 | <el-col :span="6"> |
| 6 | <el-form-item label="航班日期从" prop="fltDateStart"> | 13 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| 7 | - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" placeholder="选择日期"> | 14 | + <el-date-picker |
| 15 | + class="formItem" | ||
| 16 | + value-format="yyyy-MM-dd" | ||
| 17 | + v-model="queryParams.fltDateStart" | ||
| 18 | + type="date" | ||
| 19 | + placeholder="选择日期" | ||
| 20 | + > | ||
| 8 | </el-date-picker> | 21 | </el-date-picker> |
| 9 | </el-form-item> | 22 | </el-form-item> |
| 10 | </el-col> | 23 | </el-col> |
| 11 | 24 | ||
| 12 | <el-col :span="6"> | 25 | <el-col :span="6"> |
| 13 | <el-form-item label="到" prop="fltDateEnd"> | 26 | <el-form-item label="到" prop="fltDateEnd"> |
| 14 | - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" placeholder="选择日期"> | 27 | + <el-date-picker |
| 28 | + class="formItem" | ||
| 29 | + value-format="yyyy-MM-dd" | ||
| 30 | + v-model="queryParams.fltDateEnd" | ||
| 31 | + type="date" | ||
| 32 | + placeholder="选择日期" | ||
| 33 | + > | ||
| 15 | </el-date-picker> | 34 | </el-date-picker> |
| 16 | </el-form-item> | 35 | </el-form-item> |
| 17 | </el-col> | 36 | </el-col> |
| 18 | 37 | ||
| 19 | <el-col :span="6"> | 38 | <el-col :span="6"> |
| 20 | <el-form-item label="航班号" prop="fltNo"> | 39 | <el-form-item label="航班号" prop="fltNo"> |
| 21 | - <el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable /> | 40 | + <el-input |
| 41 | + class="formItem" | ||
| 42 | + v-model="queryParams.fltNo" | ||
| 43 | + placeholder="请输入航班号" | ||
| 44 | + clearable | ||
| 45 | + /> | ||
| 22 | </el-form-item> | 46 | </el-form-item> |
| 23 | </el-col> | 47 | </el-col> |
| 24 | 48 | ||
| 25 | <el-col :span="6"> | 49 | <el-col :span="6"> |
| 26 | <el-form-item label="航班类型" prop="typeId"> | 50 | <el-form-item label="航班类型" prop="typeId"> |
| 27 | - <el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable> | 51 | + <el-select |
| 28 | - <el-option v-for="dict in flightTypelist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 52 | + class="formItem" |
| 53 | + v-model="queryParams.typeId" | ||
| 54 | + placeholder="请选择航班类型" | ||
| 55 | + clearable | ||
| 56 | + > | ||
| 57 | + <el-option | ||
| 58 | + v-for="dict in flightTypelist" | ||
| 59 | + :key="dict.id" | ||
| 60 | + :label="dict.chineseName" | ||
| 61 | + :value="dict.id" | ||
| 62 | + /> | ||
| 29 | </el-select> | 63 | </el-select> |
| 30 | </el-form-item> | 64 | </el-form-item> |
| 31 | </el-col> | 65 | </el-col> |
| 32 | 66 | ||
| 33 | <el-col :span="6"> | 67 | <el-col :span="6"> |
| 34 | <el-form-item label="航班状态" prop="statusId"> | 68 | <el-form-item label="航班状态" prop="statusId"> |
| 35 | - <el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable> | 69 | + <el-select |
| 36 | - <el-option v-for="dict in flightStatuslist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 70 | + class="formItem" |
| 71 | + v-model="queryParams.statusId" | ||
| 72 | + placeholder="请选择航班状态" | ||
| 73 | + clearable | ||
| 74 | + > | ||
| 75 | + <el-option | ||
| 76 | + v-for="dict in flightStatuslist" | ||
| 77 | + :key="dict.id" | ||
| 78 | + :label="dict.chineseName" | ||
| 79 | + :value="dict.id" | ||
| 80 | + /> | ||
| 37 | </el-select> | 81 | </el-select> |
| 38 | </el-form-item> | 82 | </el-form-item> |
| 39 | </el-col> | 83 | </el-col> |
| 40 | 84 | ||
| 41 | <el-col :span="6"> | 85 | <el-col :span="6"> |
| 42 | <el-form-item label="航班种类" prop="flightKindId"> | 86 | <el-form-item label="航班种类" prop="flightKindId"> |
| 43 | - <el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable> | 87 | + <el-select |
| 44 | - <el-option v-for="dict in flightKindlist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 88 | + class="formItem" |
| 89 | + v-model="queryParams.flightKindId" | ||
| 90 | + placeholder="请选择航班种类" | ||
| 91 | + clearable | ||
| 92 | + > | ||
| 93 | + <el-option | ||
| 94 | + v-for="dict in flightKindlist" | ||
| 95 | + :key="dict.id" | ||
| 96 | + :label="dict.chineseName" | ||
| 97 | + :value="dict.id" | ||
| 98 | + /> | ||
| 45 | </el-select> | 99 | </el-select> |
| 46 | </el-form-item> | 100 | </el-form-item> |
| 47 | </el-col> | 101 | </el-col> |
| 48 | - | ||
| 49 | </el-row> | 102 | </el-row> |
| 50 | 103 | ||
| 51 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 104 | + <el-button |
| 52 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 105 | + type="primary" |
| 53 | - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> | 106 | + icon="el-icon-search" |
| 54 | - <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除 | 107 | + size="mini" |
| 55 | - </el-button> | 108 | + @click="handleQuery" |
| 56 | - <el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">自动配舱开启</el-button> | 109 | + >搜索</el-button |
| 57 | - <el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">自动配舱关闭</el-button> | 110 | + > |
| 58 | - | 111 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| 112 | + >重置</el-button | ||
| 113 | + > | ||
| 114 | + <el-button | ||
| 115 | + type="primary" | ||
| 116 | + icon="el-icon-plus" | ||
| 117 | + size="mini" | ||
| 118 | + @click="handleAdd" | ||
| 119 | + >新增</el-button | ||
| 120 | + > | ||
| 121 | + <el-button | ||
| 122 | + type="danger" | ||
| 123 | + icon="el-icon-delete" | ||
| 124 | + size="mini" | ||
| 125 | + :disabled="multiple" | ||
| 126 | + @click="handleDelete" | ||
| 127 | + >删除 | ||
| 128 | + </el-button> | ||
| 129 | + <el-button | ||
| 130 | + type="primary" | ||
| 131 | + icon="el-icon-circle-check" | ||
| 132 | + size="mini" | ||
| 133 | + @click="handleFlightStatus('flightStatus10')" | ||
| 134 | + >自动配舱开启</el-button | ||
| 135 | + > | ||
| 136 | + <el-button | ||
| 137 | + type="primary" | ||
| 138 | + icon="el-icon-circle-close" | ||
| 139 | + size="mini" | ||
| 140 | + @click="handleFlightStatus('flightStatus80')" | ||
| 141 | + >自动配舱关闭</el-button | ||
| 142 | + > | ||
| 59 | </el-form> | 143 | </el-form> |
| 60 | <!-- <el-row :gutter="10" class="mb8"> | 144 | <!-- <el-row :gutter="10" class="mb8"> |
| 61 | <el-col :span="1.5"> | 145 | <el-col :span="1.5"> |
| ... | @@ -70,94 +154,253 @@ | ... | @@ -70,94 +154,253 @@ |
| 70 | </el-button> | 154 | </el-button> |
| 71 | </el-col> | 155 | </el-col> |
| 72 | </el-row> --> | 156 | </el-row> --> |
| 73 | - <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="findAllFltDatList" | 157 | + <el-table |
| 74 | - @selection-change="handleSelectionChange"> | 158 | + max-height="500" |
| 159 | + highlight-current-row | ||
| 160 | + border | ||
| 161 | + stripe | ||
| 162 | + v-loading="loading" | ||
| 163 | + :data="findAllFltDatList" | ||
| 164 | + @selection-change="handleSelectionChange" | ||
| 165 | + > | ||
| 75 | <el-table-column type="selection" width="55" align="center" /> | 166 | <el-table-column type="selection" width="55" align="center" /> |
| 76 | - <el-table-column label="航班日期" align="center" prop="fltDate" width="120" /> | 167 | + <el-table-column |
| 77 | - <el-table-column label="航班起飞时间" align="center" prop="takeOffTime" width="120" /> | 168 | + label="航班日期" |
| 169 | + align="center" | ||
| 170 | + prop="fltDate" | ||
| 171 | + width="120" | ||
| 172 | + /> | ||
| 173 | + <el-table-column | ||
| 174 | + label="航班起飞时间" | ||
| 175 | + align="center" | ||
| 176 | + prop="takeOffTime" | ||
| 177 | + width="120" | ||
| 178 | + /> | ||
| 78 | <el-table-column label="航班号" align="center" prop="fltNo" /> | 179 | <el-table-column label="航班号" align="center" prop="fltNo" /> |
| 79 | <el-table-column label="航班路线" align="center" prop="route" /> | 180 | <el-table-column label="航班路线" align="center" prop="route" /> |
| 80 | - <el-table-column label="航班类型" align="center" prop="typeName" width="100" /> | 181 | + <el-table-column |
| 81 | - <el-table-column label="航班种类" align="center" prop="flightKindName" width="130" /> | 182 | + label="航班类型" |
| 183 | + align="center" | ||
| 184 | + prop="typeName" | ||
| 185 | + width="100" | ||
| 186 | + /> | ||
| 187 | + <el-table-column | ||
| 188 | + label="航班种类" | ||
| 189 | + align="center" | ||
| 190 | + prop="flightKindName" | ||
| 191 | + width="130" | ||
| 192 | + /> | ||
| 82 | <el-table-column label="航班状态" align="center" prop="statusName" /> | 193 | <el-table-column label="航班状态" align="center" prop="statusName" /> |
| 83 | - <el-table-column label="总重量" align="center" prop="totalWeight" width="130" /> | 194 | + <el-table-column |
| 84 | - <el-table-column label="原始重量(KG)" align="center" prop="originalWeight" width="130" /> | 195 | + label="总重量" |
| 85 | - <el-table-column label="总体积(cm³)" align="center" prop="totalVolume" width="130" /> | 196 | + align="center" |
| 86 | - <el-table-column label="是否限制一票一件" align="center" prop="ticketToPiece" width="150" | 197 | + prop="totalWeight" |
| 87 | - :formatter="ticketToPieceFormat" /> | 198 | + width="130" |
| 88 | - <el-table-column label="是否需要预审" align="center" prop="needRequired" width="150" :formatter="needRequiredFormat" /> | 199 | + /> |
| 89 | - <el-table-column label="额外增重百分比" align="center" prop="extraWeightPercent" width="150" /> | 200 | + <el-table-column |
| 90 | - <el-table-column label="高价百分比" align="center" prop="highPriceWeightPercent" width="150" /> | 201 | + label="原始重量(KG)" |
| 91 | - <el-table-column label="低价百分比" align="center" prop="lowPriceWeightPercent" width="150" /> | 202 | + align="center" |
| 92 | - <el-table-column label="是否开启高地价" align="center" prop="highLowPriceFlg" width="150" | 203 | + prop="originalWeight" |
| 93 | - :formatter="highLowPriceFlgFormat" /> | 204 | + width="130" |
| 94 | - <el-table-column label="已配重量" align="center" prop="alloctedWeight" width="150" /> | 205 | + /> |
| 95 | - <el-table-column label="已配体积(cm³)" align="center" prop="alloctedVolume" width="150" /> | 206 | + <el-table-column |
| 96 | - <el-table-column label="航班优先级" align="center" prop="priorityName" width="150" /> | 207 | + label="总体积(cm³)" |
| 97 | - <el-table-column label="配舱优先级" align="center" prop="priorityRuleName" width="150" /> | 208 | + align="center" |
| 98 | - <el-table-column label="创建人" align="center" prop="createUserName" width="120" /> | 209 | + prop="totalVolume" |
| 99 | - <el-table-column label="创建时间" align="center" prop="createTime" width="155" /> | 210 | + width="130" |
| 211 | + /> | ||
| 212 | + <el-table-column | ||
| 213 | + label="是否限制一票一件" | ||
| 214 | + align="center" | ||
| 215 | + prop="ticketToPiece" | ||
| 216 | + width="150" | ||
| 217 | + :formatter="ticketToPieceFormat" | ||
| 218 | + /> | ||
| 219 | + <el-table-column | ||
| 220 | + label="是否需要预审" | ||
| 221 | + align="center" | ||
| 222 | + prop="needRequired" | ||
| 223 | + width="150" | ||
| 224 | + :formatter="needRequiredFormat" | ||
| 225 | + /> | ||
| 226 | + <el-table-column | ||
| 227 | + label="额外增重百分比" | ||
| 228 | + align="center" | ||
| 229 | + prop="extraWeightPercent" | ||
| 230 | + width="150" | ||
| 231 | + /> | ||
| 232 | + <el-table-column | ||
| 233 | + label="高价百分比" | ||
| 234 | + align="center" | ||
| 235 | + prop="highPriceWeightPercent" | ||
| 236 | + width="150" | ||
| 237 | + /> | ||
| 238 | + <el-table-column | ||
| 239 | + label="低价百分比" | ||
| 240 | + align="center" | ||
| 241 | + prop="lowPriceWeightPercent" | ||
| 242 | + width="150" | ||
| 243 | + /> | ||
| 244 | + <el-table-column | ||
| 245 | + label="是否开启高地价" | ||
| 246 | + align="center" | ||
| 247 | + prop="highLowPriceFlg" | ||
| 248 | + width="150" | ||
| 249 | + :formatter="highLowPriceFlgFormat" | ||
| 250 | + /> | ||
| 251 | + <el-table-column | ||
| 252 | + label="已配重量" | ||
| 253 | + align="center" | ||
| 254 | + prop="alloctedWeight" | ||
| 255 | + width="150" | ||
| 256 | + /> | ||
| 257 | + <el-table-column | ||
| 258 | + label="已配体积(cm³)" | ||
| 259 | + align="center" | ||
| 260 | + prop="alloctedVolume" | ||
| 261 | + width="150" | ||
| 262 | + /> | ||
| 263 | + <el-table-column | ||
| 264 | + label="航班优先级" | ||
| 265 | + align="center" | ||
| 266 | + prop="priorityName" | ||
| 267 | + width="150" | ||
| 268 | + /> | ||
| 269 | + <el-table-column | ||
| 270 | + label="配舱优先级" | ||
| 271 | + align="center" | ||
| 272 | + prop="priorityRuleName" | ||
| 273 | + width="150" | ||
| 274 | + /> | ||
| 275 | + <el-table-column | ||
| 276 | + label="创建人" | ||
| 277 | + align="center" | ||
| 278 | + prop="createUserName" | ||
| 279 | + width="120" | ||
| 280 | + /> | ||
| 281 | + <el-table-column | ||
| 282 | + label="创建时间" | ||
| 283 | + align="center" | ||
| 284 | + prop="createTime" | ||
| 285 | + width="155" | ||
| 286 | + /> | ||
| 100 | 287 | ||
| 101 | <!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155"> | 288 | <!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155"> |
| 102 | <template slot-scope="scope"> | 289 | <template slot-scope="scope"> |
| 103 | <span>{{ renderTime(scope.row.createTime) }}</span> | 290 | <span>{{ renderTime(scope.row.createTime) }}</span> |
| 104 | </template> | 291 | </template> |
| 105 | </el-table-column> --> | 292 | </el-table-column> --> |
| 106 | - <el-table-column label="最后修改人" align="center" prop="lastModifyUserName" width="155" /> | 293 | + <el-table-column |
| 294 | + label="最后修改人" | ||
| 295 | + align="center" | ||
| 296 | + prop="lastModifyUserName" | ||
| 297 | + width="155" | ||
| 298 | + /> | ||
| 107 | <!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155"> | 299 | <!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155"> |
| 108 | <template slot-scope="scope"> | 300 | <template slot-scope="scope"> |
| 109 | <span>{{ renderTime(scope.row.lastModifyTime) }}</span> | 301 | <span>{{ renderTime(scope.row.lastModifyTime) }}</span> |
| 110 | </template> | 302 | </template> |
| 111 | </el-table-column> --> | 303 | </el-table-column> --> |
| 112 | - <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="120" /> | 304 | + <el-table-column |
| 113 | - | 305 | + label="最后修改时间" |
| 114 | - <el-table-column v-if="findAllFltDatList.length>0" label="操作" align="center" | 306 | + align="center" |
| 115 | - class-name="small-padding fixed-width" width="130" fixed="right"> | 307 | + prop="lastModifyTime" |
| 308 | + width="120" | ||
| 309 | + /> | ||
| 310 | + | ||
| 311 | + <el-table-column | ||
| 312 | + v-if="findAllFltDatList.length > 0" | ||
| 313 | + label="操作" | ||
| 314 | + align="center" | ||
| 315 | + class-name="small-padding fixed-width" | ||
| 316 | + width="130" | ||
| 317 | + fixed="right" | ||
| 318 | + > | ||
| 116 | <template slot-scope="scope"> | 319 | <template slot-scope="scope"> |
| 117 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> | 320 | + <el-button |
| 118 | - <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')"> | 321 | + size="mini" |
| 322 | + type="text" | ||
| 323 | + icon="el-icon-edit" | ||
| 324 | + @click="handleUpdate(scope.row)" | ||
| 325 | + >修改</el-button | ||
| 326 | + > | ||
| 327 | + <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')"> | ||
| 119 | 删除</el-button> --> | 328 | 删除</el-button> --> |
| 120 | </template> | 329 | </template> |
| 121 | </el-table-column> | 330 | </el-table-column> |
| 122 | </el-table> | 331 | </el-table> |
| 123 | 332 | ||
| 124 | - <pagination v-show="total>0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | 333 | + <pagination |
| 125 | - :page.sync="queryParams.pageNum" :limit.sync="queryParams.limitSize" @pagination="findAllFltData" /> | 334 | + v-show="total > 0" |
| 126 | - | 335 | + :total="total" |
| 127 | - | 336 | + layout=" prev, pager, next, jumper, sizes,total" |
| 128 | - | 337 | + :page.sync="queryParams.pageNum" |
| 338 | + :limit.sync="queryParams.limitSize" | ||
| 339 | + @pagination="findAllFltData" | ||
| 340 | + /> | ||
| 129 | 341 | ||
| 130 | <!-- 添加或修改对话框 --> | 342 | <!-- 添加或修改对话框 --> |
| 131 | - <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"> | 343 | + <el-dialog |
| 132 | - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> | 344 | + :title="title" |
| 345 | + :visible.sync="open" | ||
| 346 | + width="60%" | ||
| 347 | + :close-on-click-modal="false" | ||
| 348 | + :append-to-body="true" | ||
| 349 | + > | ||
| 350 | + <el-form | ||
| 351 | + ref="form" | ||
| 352 | + :model="form" | ||
| 353 | + :rules="rules" | ||
| 354 | + label-position="right" | ||
| 355 | + label-width="auto" | ||
| 356 | + > | ||
| 133 | <el-row> | 357 | <el-row> |
| 134 | <el-col :span="12"> | 358 | <el-col :span="12"> |
| 135 | <el-form-item label="航班号" prop="fltNo"> | 359 | <el-form-item label="航班号" prop="fltNo"> |
| 136 | - <el-input @blur="blurfltNo" :disabled="formdisabled.fltNo" style="width:93%;" v-model="form.fltNo" | 360 | + <el-input |
| 137 | - placeholder="请输入航班号" /> | 361 | + @blur="blurfltNo" |
| 362 | + :disabled="formdisabled.fltNo" | ||
| 363 | + style="width: 93%" | ||
| 364 | + v-model="form.fltNo" | ||
| 365 | + placeholder="请输入航班号" | ||
| 366 | + /> | ||
| 138 | </el-form-item> | 367 | </el-form-item> |
| 139 | </el-col> | 368 | </el-col> |
| 140 | <!-- <el-col :span="1">  </el-col> --> | 369 | <!-- <el-col :span="1">  </el-col> --> |
| 141 | <el-col :span="12"> | 370 | <el-col :span="12"> |
| 142 | <el-form-item label="航班日期" prop="fltDate"> | 371 | <el-form-item label="航班日期" prop="fltDate"> |
| 143 | - | 372 | + <el-date-picker |
| 144 | - <el-date-picker :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate" type="date" | 373 | + :disabled="formdisabled.fltDate" |
| 145 | - value-format="yyyy-MM-dd" placeholder="选择航班日期"> | 374 | + clearable |
| 375 | + size="small" | ||
| 376 | + v-model="form.fltDate" | ||
| 377 | + type="date" | ||
| 378 | + value-format="yyyy-MM-dd" | ||
| 379 | + placeholder="选择航班日期" | ||
| 380 | + > | ||
| 146 | </el-date-picker> | 381 | </el-date-picker> |
| 147 | </el-form-item> | 382 | </el-form-item> |
| 148 | </el-col> | 383 | </el-col> |
| 149 | 384 | ||
| 150 | - | ||
| 151 | <el-col :span="12"> | 385 | <el-col :span="12"> |
| 152 | <el-form-item label="航班路线" prop="route"> | 386 | <el-form-item label="航班路线" prop="route"> |
| 153 | - <el-input style="width:93%" v-model="form.route" placeholder="请输入航班路线" /> | 387 | + <el-input |
| 388 | + style="width: 93%" | ||
| 389 | + v-model="form.route" | ||
| 390 | + placeholder="请输入航班路线" | ||
| 391 | + /> | ||
| 154 | </el-form-item> | 392 | </el-form-item> |
| 155 | </el-col> | 393 | </el-col> |
| 156 | 394 | ||
| 157 | <el-col :span="12"> | 395 | <el-col :span="12"> |
| 158 | <el-form-item label="航班种类" prop="kindId"> | 396 | <el-form-item label="航班种类" prop="kindId"> |
| 159 | <el-select v-model="form.kindId" placeholder="请选择航班种类"> | 397 | <el-select v-model="form.kindId" placeholder="请选择航班种类"> |
| 160 | - <el-option v-for="item in flightKindlist" :key="item.id" :label="item.chineseName" :value="item.id"> | 398 | + <el-option |
| 399 | + v-for="item in flightKindlist" | ||
| 400 | + :key="item.id" | ||
| 401 | + :label="item.chineseName" | ||
| 402 | + :value="item.id" | ||
| 403 | + > | ||
| 161 | </el-option> | 404 | </el-option> |
| 162 | </el-select> | 405 | </el-select> |
| 163 | </el-form-item> | 406 | </el-form-item> |
| ... | @@ -165,36 +408,62 @@ | ... | @@ -165,36 +408,62 @@ |
| 165 | <el-col :span="12"> | 408 | <el-col :span="12"> |
| 166 | <el-form-item label="航班类型" prop="typeId"> | 409 | <el-form-item label="航班类型" prop="typeId"> |
| 167 | <el-select v-model="form.typeId" placeholder="请选择航班类型"> | 410 | <el-select v-model="form.typeId" placeholder="请选择航班类型"> |
| 168 | - <el-option v-for="item in flightTypelist" :key="item.id" :label="item.chineseName" :value="item.id"> | 411 | + <el-option |
| 412 | + v-for="item in flightTypelist" | ||
| 413 | + :key="item.id" | ||
| 414 | + :label="item.chineseName" | ||
| 415 | + :value="item.id" | ||
| 416 | + > | ||
| 169 | </el-option> | 417 | </el-option> |
| 170 | </el-select> | 418 | </el-select> |
| 171 | </el-form-item> | 419 | </el-form-item> |
| 172 | </el-col> | 420 | </el-col> |
| 173 | <el-col :span="12"> | 421 | <el-col :span="12"> |
| 174 | <el-form-item label="航班状态" prop="statusId"> | 422 | <el-form-item label="航班状态" prop="statusId"> |
| 175 | - <el-select :disabled="true" v-model="form.statusId" placeholder="请选择航班状态"> | 423 | + <el-select |
| 176 | - <el-option v-for="item in flightStatuslist" :key="item.id" :label="item.chineseName" :value="item.id"> | 424 | + :disabled="true" |
| 425 | + v-model="form.statusId" | ||
| 426 | + placeholder="请选择航班状态" | ||
| 427 | + > | ||
| 428 | + <el-option | ||
| 429 | + v-for="item in flightStatuslist" | ||
| 430 | + :key="item.id" | ||
| 431 | + :label="item.chineseName" | ||
| 432 | + :value="item.id" | ||
| 433 | + > | ||
| 177 | </el-option> | 434 | </el-option> |
| 178 | </el-select> | 435 | </el-select> |
| 179 | </el-form-item> | 436 | </el-form-item> |
| 180 | </el-col> | 437 | </el-col> |
| 181 | <el-col :span="12"> | 438 | <el-col :span="12"> |
| 182 | <el-form-item label="原始重量(KG)" prop="originalWeight"> | 439 | <el-form-item label="原始重量(KG)" prop="originalWeight"> |
| 183 | - <el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%" | 440 | + <el-input-number |
| 184 | - v-model="form.originalWeight"></el-input-number> | 441 | + @change="LowHighAvailable" |
| 442 | + placeholder="请输入原始重量(KG)" | ||
| 443 | + style="width: 93%" | ||
| 444 | + v-model="form.originalWeight" | ||
| 445 | + ></el-input-number> | ||
| 185 | </el-form-item> | 446 | </el-form-item> |
| 186 | </el-col> | 447 | </el-col> |
| 187 | 448 | ||
| 188 | <el-col :span="12"> | 449 | <el-col :span="12"> |
| 189 | <el-form-item label="额外增重百分比" prop="extraWeightPercent"> | 450 | <el-form-item label="额外增重百分比" prop="extraWeightPercent"> |
| 190 | - <el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%" | 451 | + <el-input-number |
| 191 | - v-model="form.extraWeightPercent"></el-input-number> | 452 | + @change="LowHighAvailable" |
| 453 | + placeholder="请输入额外增重百分比" | ||
| 454 | + style="width: 93%" | ||
| 455 | + v-model="form.extraWeightPercent" | ||
| 456 | + ></el-input-number> | ||
| 192 | </el-form-item> | 457 | </el-form-item> |
| 193 | </el-col> | 458 | </el-col> |
| 194 | 459 | ||
| 195 | <el-col :span="12"> | 460 | <el-col :span="12"> |
| 196 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> | 461 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> |
| 197 | - <el-switch @change='LowHighAvailable' v-model="form.highLowPriceFlg" active-color="#13ce66"> | 462 | + <el-switch |
| 463 | + @change="LowHighAvailable" | ||
| 464 | + v-model="form.highLowPriceFlg" | ||
| 465 | + active-color="#13ce66" | ||
| 466 | + > | ||
| 198 | </el-switch> | 467 | </el-switch> |
| 199 | </el-form-item> | 468 | </el-form-item> |
| 200 | </el-col> | 469 | </el-col> |
| ... | @@ -202,65 +471,95 @@ | ... | @@ -202,65 +471,95 @@ |
| 202 | <!-- 是否需要预审,1:预审,0:取消预审 --> | 471 | <!-- 是否需要预审,1:预审,0:取消预审 --> |
| 203 | <el-col :span="12"> | 472 | <el-col :span="12"> |
| 204 | <el-form-item label="是否预审" prop="isNeedRequired"> | 473 | <el-form-item label="是否预审" prop="isNeedRequired"> |
| 205 | - <el-switch :disabled="true" v-model="form.isNeedRequired" active-color="#13ce66"> | 474 | + <el-switch |
| 475 | + :disabled="true" | ||
| 476 | + v-model="form.isNeedRequired" | ||
| 477 | + active-color="#13ce66" | ||
| 478 | + > | ||
| 206 | </el-switch> | 479 | </el-switch> |
| 207 | </el-form-item> | 480 | </el-form-item> |
| 208 | </el-col> | 481 | </el-col> |
| 209 | 482 | ||
| 210 | <el-col :span="12"> | 483 | <el-col :span="12"> |
| 211 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> | 484 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> |
| 212 | - <el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%" | 485 | + <el-input-number |
| 213 | - v-model="form.highPriceWeightPercent"></el-input-number> | 486 | + :disabled="ishighPriceWeightPercent" |
| 487 | + @change="LowHighAvailable" | ||
| 488 | + placeholder="请输入高价百分比" | ||
| 489 | + style="width: 93%" | ||
| 490 | + v-model="form.highPriceWeightPercent" | ||
| 491 | + ></el-input-number> | ||
| 214 | </el-form-item> | 492 | </el-form-item> |
| 215 | </el-col> | 493 | </el-col> |
| 216 | 494 | ||
| 217 | <el-col :span="12"> | 495 | <el-col :span="12"> |
| 218 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> | 496 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> |
| 219 | - <el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%" | 497 | + <el-input-number |
| 220 | - v-model="form.lowPriceWeightPercent"></el-input-number> | 498 | + :disabled="true" |
| 499 | + placeholder="请输入低价百分比" | ||
| 500 | + style="width: 93%" | ||
| 501 | + v-model="form.lowPriceWeightPercent" | ||
| 502 | + ></el-input-number> | ||
| 221 | </el-form-item> | 503 | </el-form-item> |
| 222 | </el-col> | 504 | </el-col> |
| 223 | 505 | ||
| 224 | <el-col :span="12"> | 506 | <el-col :span="12"> |
| 225 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> | 507 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> |
| 226 | - | 508 | + <el-input-number |
| 227 | - <el-input-number :disabled="true" placeholder="请输入高价可配重量" style="width:93%" | 509 | + :disabled="true" |
| 228 | - v-model="form.highAvailableWeight" :precision="2"></el-input-number> | 510 | + placeholder="请输入高价可配重量" |
| 511 | + style="width: 93%" | ||
| 512 | + v-model="form.highAvailableWeight" | ||
| 513 | + :precision="2" | ||
| 514 | + ></el-input-number> | ||
| 229 | </el-form-item> | 515 | </el-form-item> |
| 230 | </el-col> | 516 | </el-col> |
| 231 | <el-col :span="12"> | 517 | <el-col :span="12"> |
| 232 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> | 518 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> |
| 233 | - <el-input-number :disabled="true" placeholder="请输入低价可配重量" style="width:93%" | 519 | + <el-input-number |
| 234 | - v-model="form.lowAvailableWeight" :precision="2"></el-input-number> | 520 | + :disabled="true" |
| 521 | + placeholder="请输入低价可配重量" | ||
| 522 | + style="width: 93%" | ||
| 523 | + v-model="form.lowAvailableWeight" | ||
| 524 | + :precision="2" | ||
| 525 | + ></el-input-number> | ||
| 235 | </el-form-item> | 526 | </el-form-item> |
| 236 | </el-col> | 527 | </el-col> |
| 237 | 528 | ||
| 238 | - | ||
| 239 | <el-col :span="12"> | 529 | <el-col :span="12"> |
| 240 | <el-form-item label="高价已配重量" prop="highAllocatedWeight"> | 530 | <el-form-item label="高价已配重量" prop="highAllocatedWeight"> |
| 241 | - <el-input-number :disabled="true" placeholder="请输入高价已配重量" style="width:93%" | 531 | + <el-input-number |
| 242 | - v-model="form.highAllocatedWeight" :precision="2"></el-input-number> | 532 | + :disabled="true" |
| 533 | + placeholder="请输入高价已配重量" | ||
| 534 | + style="width: 93%" | ||
| 535 | + v-model="form.highAllocatedWeight" | ||
| 536 | + :precision="2" | ||
| 537 | + ></el-input-number> | ||
| 243 | </el-form-item> | 538 | </el-form-item> |
| 244 | </el-col> | 539 | </el-col> |
| 245 | <el-col :span="12"> | 540 | <el-col :span="12"> |
| 246 | <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> | 541 | <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> |
| 247 | - <el-input-number :disabled="true" placeholder="请输入低价已配重量" style="width:93%" | 542 | + <el-input-number |
| 248 | - v-model="form.lowAllocatedWeight" :precision="2"></el-input-number> | 543 | + :disabled="true" |
| 544 | + placeholder="请输入低价已配重量" | ||
| 545 | + style="width: 93%" | ||
| 546 | + v-model="form.lowAllocatedWeight" | ||
| 547 | + :precision="2" | ||
| 548 | + ></el-input-number> | ||
| 249 | </el-form-item> | 549 | </el-form-item> |
| 250 | </el-col> | 550 | </el-col> |
| 251 | <el-col :span="12"> | 551 | <el-col :span="12"> |
| 252 | <el-form-item label="已配总重量" prop="alloctedWeight"> | 552 | <el-form-item label="已配总重量" prop="alloctedWeight"> |
| 253 | - | 553 | + <el-input-number |
| 254 | - <el-input-number :disabled="true" placeholder="请输入已配总重量" style="width:93%" v-model="form.alloctedWeight" | 554 | + :disabled="true" |
| 255 | - :precision="2"></el-input-number> | 555 | + placeholder="请输入已配总重量" |
| 256 | - | 556 | + style="width: 93%" |
| 557 | + v-model="form.alloctedWeight" | ||
| 558 | + :precision="2" | ||
| 559 | + ></el-input-number> | ||
| 257 | </el-form-item> | 560 | </el-form-item> |
| 258 | </el-col> | 561 | </el-col> |
| 259 | - | ||
| 260 | - | ||
| 261 | </el-row> | 562 | </el-row> |
| 262 | - | ||
| 263 | - | ||
| 264 | </el-form> | 563 | </el-form> |
| 265 | <div slot="footer" class="dialog-footer"> | 564 | <div slot="footer" class="dialog-footer"> |
| 266 | <el-button type="primary" @click="submitForm">确 定</el-button> | 565 | <el-button type="primary" @click="submitForm">确 定</el-button> |
| ... | @@ -268,501 +567,597 @@ | ... | @@ -268,501 +567,597 @@ |
| 268 | </div> | 567 | </div> |
| 269 | </el-dialog> | 568 | </el-dialog> |
| 270 | 569 | ||
| 271 | - <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible"> | 570 | + <el-dialog |
| 571 | + title="未删除成功航班" | ||
| 572 | + width="40%" | ||
| 573 | + center | ||
| 574 | + :visible.sync="dialogTableVisible" | ||
| 575 | + > | ||
| 272 | <el-table :data="gridData"> | 576 | <el-table :data="gridData"> |
| 273 | - <el-table-column property="fltNo" label="航班号" width="150"></el-table-column> | 577 | + <el-table-column |
| 274 | - <el-table-column property="fltDate" label="航班日期" width="200"></el-table-column> | 578 | + property="fltNo" |
| 275 | - <el-table-column property="alloctedWeight" label="已配重量" width="200"></el-table-column> | 579 | + label="航班号" |
| 580 | + width="150" | ||
| 581 | + ></el-table-column> | ||
| 582 | + <el-table-column | ||
| 583 | + property="fltDate" | ||
| 584 | + label="航班日期" | ||
| 585 | + width="200" | ||
| 586 | + ></el-table-column> | ||
| 587 | + <el-table-column | ||
| 588 | + property="alloctedWeight" | ||
| 589 | + label="已配重量" | ||
| 590 | + width="200" | ||
| 591 | + ></el-table-column> | ||
| 276 | </el-table> | 592 | </el-table> |
| 277 | </el-dialog> | 593 | </el-dialog> |
| 278 | </div> | 594 | </div> |
| 279 | </template> | 595 | </template> |
| 280 | <script> | 596 | <script> |
| 281 | - import { | 597 | +import { |
| 282 | - delFlight, | 598 | + delFlight, |
| 283 | - findFltConditionDataApi, | 599 | + findFltConditionDataApi, |
| 284 | - findAllFltDataApi, | 600 | + findAllFltDataApi, |
| 285 | - findFltById, | 601 | + findFltById, |
| 286 | - saveOrUpdate, | 602 | + saveOrUpdate, |
| 287 | - findFltCommonConf, | 603 | + findFltCommonConf, |
| 288 | - updateStatusBatch | 604 | + updateStatusBatch, |
| 289 | - | 605 | +} from "@/api/findAllFltData"; |
| 290 | - } from "@/api/findAllFltData"; | 606 | +export default { |
| 291 | - export default { | 607 | + name: "FlightInformationMaintenance", |
| 292 | - name: "FlightInformationMaintenance", | 608 | + data() { |
| 293 | - data() { | 609 | + return { |
| 294 | - return { | 610 | + gridData: [], |
| 295 | - gridData:[], | 611 | + dialogTableVisible: false, |
| 296 | - dialogTableVisible: false, | 612 | + //高价百分比是否打开 |
| 297 | - //高价百分比是否打开 | 613 | + ishighPriceWeightPercent: true, |
| 298 | - ishighPriceWeightPercent:true, | 614 | + //form属性禁用状态 |
| 299 | - //form属性禁用状态 | 615 | + formdisabled: { |
| 300 | - formdisabled: { | 616 | + //航班号 |
| 301 | - //航班号 | 617 | + fltNo: false, |
| 302 | - fltNo: false, | 618 | + //航班日期 |
| 303 | - //航班日期 | 619 | + fltDate: false, |
| 304 | - fltDate: false, | 620 | + //航班路线 |
| 305 | - //航班路线 | 621 | + route: false, |
| 306 | - route: false, | ||
| 307 | - //航班种类 | ||
| 308 | - kindId: false, | ||
| 309 | - //航班类型 | ||
| 310 | - typeId: false, | ||
| 311 | - //原始重量 | ||
| 312 | - originalWeight: false | ||
| 313 | - }, | ||
| 314 | - | ||
| 315 | //航班种类 | 622 | //航班种类 |
| 316 | - flightKindlist: [], | 623 | + kindId: false, |
| 317 | - //航班状态 | ||
| 318 | - flightStatuslist: [], | ||
| 319 | //航班类型 | 624 | //航班类型 |
| 320 | - flightTypelist: [], | 625 | + typeId: false, |
| 321 | - // 选中数组 | 626 | + //原始重量 |
| 322 | - ids: [], | 627 | + originalWeight: false, |
| 323 | - // 非单个禁用 | 628 | + }, |
| 324 | - single: true, | ||
| 325 | - // 非多个禁用 | ||
| 326 | - multiple: true, | ||
| 327 | - | ||
| 328 | - // 遮罩层 | ||
| 329 | - loading: false, | ||
| 330 | - // 遮罩层 | ||
| 331 | - loadingFlightDate: false, | ||
| 332 | - // 弹出层标题 | ||
| 333 | - title: "", | ||
| 334 | - // 总条数 | ||
| 335 | - total: 0, | ||
| 336 | - // 原航班规则数据 | ||
| 337 | - findAllFltDatList: [], | ||
| 338 | - //目的航班数据 | ||
| 339 | - sourceFlightAndFlightDate: [], | ||
| 340 | - statusList: [{ | ||
| 341 | - 'id': 1, | ||
| 342 | - 'name': '有效' | ||
| 343 | - }, { | ||
| 344 | - 'id': 3, | ||
| 345 | - 'name': '停用' | ||
| 346 | - }], | ||
| 347 | - // 新增修改查看规则弹出层 | ||
| 348 | - open: false, | ||
| 349 | - // 是否显示查看目的航班弹出层 | ||
| 350 | - openFlightDate: false, | ||
| 351 | - // 查询参数 | ||
| 352 | - queryParams: { | ||
| 353 | - limitStart: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 354 | - pageNum: 1, | ||
| 355 | - limitSize: 20, //一页显示多少条数据 | ||
| 356 | - fltDateStart: undefined, //航班日期开始 | ||
| 357 | - fltDateEnd: undefined, //航班日期结束 | ||
| 358 | - typeId: undefined, //航班类型 | ||
| 359 | - statusId: undefined, //航班状态 | ||
| 360 | - flightKindId: undefined, //航班种类 | ||
| 361 | - fltNo: undefined //航班号,要大写 | ||
| 362 | - }, | ||
| 363 | - | ||
| 364 | - // 表单参数 | ||
| 365 | - form: { | ||
| 366 | - | ||
| 367 | 629 | ||
| 630 | + //航班种类 | ||
| 631 | + flightKindlist: [], | ||
| 632 | + //航班状态 | ||
| 633 | + flightStatuslist: [], | ||
| 634 | + //航班类型 | ||
| 635 | + flightTypelist: [], | ||
| 636 | + // 选中数组 | ||
| 637 | + ids: [], | ||
| 638 | + // 非单个禁用 | ||
| 639 | + single: true, | ||
| 640 | + // 非多个禁用 | ||
| 641 | + multiple: true, | ||
| 642 | + | ||
| 643 | + // 遮罩层 | ||
| 644 | + loading: false, | ||
| 645 | + // 遮罩层 | ||
| 646 | + loadingFlightDate: false, | ||
| 647 | + // 弹出层标题 | ||
| 648 | + title: "", | ||
| 649 | + // 总条数 | ||
| 650 | + total: 0, | ||
| 651 | + // 原航班规则数据 | ||
| 652 | + findAllFltDatList: [], | ||
| 653 | + //目的航班数据 | ||
| 654 | + sourceFlightAndFlightDate: [], | ||
| 655 | + statusList: [ | ||
| 656 | + { | ||
| 657 | + id: 1, | ||
| 658 | + name: "有效", | ||
| 659 | + }, | ||
| 660 | + { | ||
| 661 | + id: 3, | ||
| 662 | + name: "停用", | ||
| 368 | }, | 663 | }, |
| 369 | - // 表单校验 | 664 | + ], |
| 370 | - rules: { | 665 | + // 新增修改查看规则弹出层 |
| 371 | - fltNo: [{ | 666 | + open: false, |
| 667 | + // 是否显示查看目的航班弹出层 | ||
| 668 | + openFlightDate: false, | ||
| 669 | + // 查询参数 | ||
| 670 | + queryParams: { | ||
| 671 | + limitStart: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 672 | + pageNum: 1, | ||
| 673 | + limitSize: 20, //一页显示多少条数据 | ||
| 674 | + fltDateStart: undefined, //航班日期开始 | ||
| 675 | + fltDateEnd: undefined, //航班日期结束 | ||
| 676 | + typeId: undefined, //航班类型 | ||
| 677 | + statusId: undefined, //航班状态 | ||
| 678 | + flightKindId: undefined, //航班种类 | ||
| 679 | + fltNo: undefined, //航班号,要大写 | ||
| 680 | + }, | ||
| 681 | + | ||
| 682 | + // 表单参数 | ||
| 683 | + form: {}, | ||
| 684 | + // 表单校验 | ||
| 685 | + rules: { | ||
| 686 | + fltNo: [ | ||
| 687 | + { | ||
| 372 | required: true, | 688 | required: true, |
| 373 | message: "ACCS原航班号不能为空", | 689 | message: "ACCS原航班号不能为空", |
| 374 | - trigger: "blur" | 690 | + trigger: "blur", |
| 375 | - }], | 691 | + }, |
| 376 | - fltDate: [{ | 692 | + ], |
| 693 | + fltDate: [ | ||
| 694 | + { | ||
| 377 | required: true, | 695 | required: true, |
| 378 | message: "航班日期不能为空", | 696 | message: "航班日期不能为空", |
| 379 | - trigger: "blur" | 697 | + trigger: "blur", |
| 380 | - }], | 698 | + }, |
| 381 | - kindId: [{ | 699 | + ], |
| 700 | + kindId: [ | ||
| 701 | + { | ||
| 382 | required: true, | 702 | required: true, |
| 383 | message: "航班种类不能为空", | 703 | message: "航班种类不能为空", |
| 384 | - trigger: "change" | 704 | + trigger: "change", |
| 385 | - }], | 705 | + }, |
| 386 | - originalWeight: [{ | 706 | + ], |
| 707 | + originalWeight: [ | ||
| 708 | + { | ||
| 387 | required: true, | 709 | required: true, |
| 388 | message: "原始重量(KG)不能为空", | 710 | message: "原始重量(KG)不能为空", |
| 389 | - trigger: "blur" | 711 | + trigger: "blur", |
| 390 | - }], | 712 | + }, |
| 391 | - } | 713 | + ], |
| 392 | - }; | ||
| 393 | - }, | ||
| 394 | - created() { | ||
| 395 | - //查询条件数据源 | ||
| 396 | - this.findFltConditionData(); | ||
| 397 | - this.findAllFltData(); | ||
| 398 | - }, | ||
| 399 | - methods: { | ||
| 400 | - //输入航班号后 | ||
| 401 | - blurfltNo() { | ||
| 402 | - if (this.form.fltNo != null && this.form.fltNo != undefined && this.form.fltNo != "") { | ||
| 403 | - this.form.fltNo = this.form.fltNo.toUpperCase(); | ||
| 404 | - findFltCommonConf(this.form).then(response => { | ||
| 405 | - if (response.code == 200) { | ||
| 406 | - //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 | ||
| 407 | - if (response.data!=null && response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) { | ||
| 408 | - this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent); | ||
| 409 | - // this.form.extraWeightPercent=response.data.extraWeightPercent; | ||
| 410 | - } else { | ||
| 411 | - this.$set(this.form, "extraWeightPercent", 0); | ||
| 412 | - //this.form.extraWeightPercent=response.data.extraWeightPercent=0; | ||
| 413 | - } | ||
| 414 | - //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 | ||
| 415 | - if (response.data!=null &&response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) { | ||
| 416 | - this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false; | ||
| 417 | - } else { | ||
| 418 | - this.$set(this.form, "highLowPriceFlg", true); | ||
| 419 | - //this.form.highLowPriceFlg = true; | ||
| 420 | - } | ||
| 421 | - //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; | ||
| 422 | - if (response.data!=null &&response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) { | ||
| 423 | - this.form.isNeedRequired = response.data.isNeedRequired === 1 ? true : false; | ||
| 424 | - } else { | ||
| 425 | - this.form.isNeedRequired = false; | ||
| 426 | - } | ||
| 427 | - //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 | ||
| 428 | - if (response.data!=null &&response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent != | ||
| 429 | - undefined) { | ||
| 430 | - this.form.highPriceWeightPercent = response.data.highPriceWeightPercent; | ||
| 431 | - } else { | ||
| 432 | - this.form.highPriceWeightPercent = 60; | ||
| 433 | - } | ||
| 434 | - if (response.data!=null &&response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) { | ||
| 435 | - this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent; | ||
| 436 | - } else { | ||
| 437 | - this.form.lowPriceWeightPercent = 40; | ||
| 438 | - } | ||
| 439 | - this.LowHighAvailable(); | ||
| 440 | - } else { | ||
| 441 | - this.msgError(response.msg); | ||
| 442 | - } | ||
| 443 | - | ||
| 444 | - }); | ||
| 445 | - | ||
| 446 | - } | ||
| 447 | - | ||
| 448 | - | ||
| 449 | - }, | ||
| 450 | - // 是否一票一件 | ||
| 451 | - ticketToPieceFormat(row) { | ||
| 452 | - if (row.ticketToPiece === 1) { | ||
| 453 | - return '是' | ||
| 454 | - } else { | ||
| 455 | - return '否' | ||
| 456 | - } | ||
| 457 | - return row.ticketToPiece; | ||
| 458 | }, | 714 | }, |
| 459 | - // 是否需要预审 1 预审 0 取消预审 | 715 | + }; |
| 460 | - needRequiredFormat(row) { | 716 | + }, |
| 461 | - if (row.needRequired === 1) { | 717 | + created() { |
| 462 | - return '是' | 718 | + //查询条件数据源 |
| 463 | - } else { | 719 | + this.findFltConditionData(); |
| 464 | - return '否' | 720 | + this.findAllFltData(); |
| 465 | - } | 721 | + }, |
| 466 | - return row.ticketToPiece; | 722 | + methods: { |
| 467 | - }, | 723 | + //输入航班号后 |
| 468 | - //是否开启高低价 | 724 | + blurfltNo() { |
| 469 | - highLowPriceFlgFormat(row) { | 725 | + if ( |
| 470 | - if (row.highLowPriceFlg === 1) { | 726 | + this.form.fltNo != null && |
| 471 | - return '开启' | 727 | + this.form.fltNo != undefined && |
| 472 | - } else { | 728 | + this.form.fltNo != "" |
| 473 | - return '未开启' | 729 | + ) { |
| 474 | - } | 730 | + this.form.fltNo = this.form.fltNo.toUpperCase(); |
| 475 | - return row.ticketToPiece; | 731 | + findFltCommonConf(this.form).then((response) => { |
| 476 | - }, | ||
| 477 | - //时间格式化 | ||
| 478 | - renderTime(date) { | ||
| 479 | - var dateee = new Date(date).toJSON(); | ||
| 480 | - return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') | ||
| 481 | - }, | ||
| 482 | - //查询条件数据源 | ||
| 483 | - findFltConditionData() { | ||
| 484 | - findFltConditionDataApi().then(response => { | ||
| 485 | if (response.code == 200) { | 732 | if (response.code == 200) { |
| 486 | - //航班种类 | 733 | + //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 |
| 487 | - this.flightKindlist = response.data.flightKind; | 734 | + if ( |
| 488 | - //航班类型 | 735 | + response.data != null && |
| 489 | - this.flightTypelist = response.data.flightType; | 736 | + response.data.extraWeightPercent != null && |
| 490 | - //航班状态 | 737 | + response.data.extraWeightPercent != undefined |
| 491 | - this.flightStatuslist = response.data.flightStatus; | 738 | + ) { |
| 492 | - | 739 | + this.$set( |
| 740 | + this.form, | ||
| 741 | + "extraWeightPercent", | ||
| 742 | + response.data.extraWeightPercent | ||
| 743 | + ); | ||
| 744 | + // this.form.extraWeightPercent=response.data.extraWeightPercent; | ||
| 745 | + } else { | ||
| 746 | + this.$set(this.form, "extraWeightPercent", 0); | ||
| 747 | + //this.form.extraWeightPercent=response.data.extraWeightPercent=0; | ||
| 748 | + } | ||
| 749 | + //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 | ||
| 750 | + if ( | ||
| 751 | + response.data != null && | ||
| 752 | + response.data.highLowPriceFlg != null && | ||
| 753 | + response.data.highLowPriceFlg != undefined | ||
| 754 | + ) { | ||
| 755 | + this.form.highLowPriceFlg = | ||
| 756 | + response.data.highLowPriceFlg === 1 ? true : false; | ||
| 757 | + } else { | ||
| 758 | + this.$set(this.form, "highLowPriceFlg", true); | ||
| 759 | + //this.form.highLowPriceFlg = true; | ||
| 760 | + } | ||
| 761 | + //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; | ||
| 762 | + if ( | ||
| 763 | + response.data != null && | ||
| 764 | + response.data.isNeedRequired != null && | ||
| 765 | + response.data.isNeedRequired != undefined | ||
| 766 | + ) { | ||
| 767 | + this.form.isNeedRequired = | ||
| 768 | + response.data.isNeedRequired === 1 ? true : false; | ||
| 769 | + } else { | ||
| 770 | + this.form.isNeedRequired = false; | ||
| 771 | + } | ||
| 772 | + //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 | ||
| 773 | + if ( | ||
| 774 | + response.data != null && | ||
| 775 | + response.data.highPriceWeightPercent != null && | ||
| 776 | + response.data.highPriceWeightPercent != undefined | ||
| 777 | + ) { | ||
| 778 | + this.form.highPriceWeightPercent = | ||
| 779 | + response.data.highPriceWeightPercent; | ||
| 780 | + } else { | ||
| 781 | + this.form.highPriceWeightPercent = 60; | ||
| 782 | + } | ||
| 783 | + if ( | ||
| 784 | + response.data != null && | ||
| 785 | + response.data.lowPriceWeightPercent != null && | ||
| 786 | + response.data.lowPriceWeightPercent != undefined | ||
| 787 | + ) { | ||
| 788 | + this.form.lowPriceWeightPercent = | ||
| 789 | + response.data.lowPriceWeightPercent; | ||
| 790 | + } else { | ||
| 791 | + this.form.lowPriceWeightPercent = 40; | ||
| 792 | + } | ||
| 793 | + this.LowHighAvailable(); | ||
| 493 | } else { | 794 | } else { |
| 494 | this.msgError(response.msg); | 795 | this.msgError(response.msg); |
| 495 | } | 796 | } |
| 496 | - | ||
| 497 | }); | 797 | }); |
| 498 | - }, | 798 | + } |
| 799 | + }, | ||
| 800 | + // 是否一票一件 | ||
| 801 | + ticketToPieceFormat(row) { | ||
| 802 | + if (row.ticketToPiece === 1) { | ||
| 803 | + return "是"; | ||
| 804 | + } else { | ||
| 805 | + return "否"; | ||
| 806 | + } | ||
| 807 | + return row.ticketToPiece; | ||
| 808 | + }, | ||
| 809 | + // 是否需要预审 1 预审 0 取消预审 | ||
| 810 | + needRequiredFormat(row) { | ||
| 811 | + if (row.needRequired === 1) { | ||
| 812 | + return "是"; | ||
| 813 | + } else { | ||
| 814 | + return "否"; | ||
| 815 | + } | ||
| 816 | + return row.ticketToPiece; | ||
| 817 | + }, | ||
| 818 | + //是否开启高低价 | ||
| 819 | + highLowPriceFlgFormat(row) { | ||
| 820 | + if (row.highLowPriceFlg === 1) { | ||
| 821 | + return "开启"; | ||
| 822 | + } else { | ||
| 823 | + return "未开启"; | ||
| 824 | + } | ||
| 825 | + return row.ticketToPiece; | ||
| 826 | + }, | ||
| 827 | + //时间格式化 | ||
| 828 | + renderTime(date) { | ||
| 829 | + var dateee = new Date(date).toJSON(); | ||
| 830 | + return new Date(+new Date(dateee) + 8 * 3600 * 1000) | ||
| 831 | + .toISOString() | ||
| 832 | + .replace(/T/g, " ") | ||
| 833 | + .replace(/\.[\d]{3}Z/, ""); | ||
| 834 | + }, | ||
| 835 | + //查询条件数据源 | ||
| 836 | + findFltConditionData() { | ||
| 837 | + findFltConditionDataApi().then((response) => { | ||
| 838 | + if (response.code == 200) { | ||
| 839 | + //航班种类 | ||
| 840 | + this.flightKindlist = response.data.flightKind; | ||
| 841 | + //航班类型 | ||
| 842 | + this.flightTypelist = response.data.flightType; | ||
| 843 | + //航班状态 | ||
| 844 | + this.flightStatuslist = response.data.flightStatus; | ||
| 845 | + } else { | ||
| 846 | + this.msgError(response.msg); | ||
| 847 | + } | ||
| 848 | + }); | ||
| 849 | + }, | ||
| 499 | 850 | ||
| 500 | - // 多选框选中数据 | 851 | + // 多选框选中数据 |
| 501 | - handleSelectionChange(selection) { | 852 | + handleSelectionChange(selection) { |
| 502 | - this.ids = selection.map(item => item.id) | 853 | + this.ids = selection.map((item) => item.id); |
| 503 | - this.single = selection.length != 1 | 854 | + this.single = selection.length != 1; |
| 504 | - this.multiple = !selection.length | 855 | + this.multiple = !selection.length; |
| 505 | - }, | 856 | + }, |
| 857 | + | ||
| 858 | + /** 航班信息维护查询*/ | ||
| 859 | + findAllFltData() { | ||
| 860 | + this.loading = true; | ||
| 861 | + if (this.queryParams.pageNum > 1) { | ||
| 862 | + this.queryParams.limitStart = | ||
| 863 | + (this.queryParams.pageNum - 1) * this.queryParams.limitSize; | ||
| 864 | + } else { | ||
| 865 | + this.queryParams.limitStart = 0; | ||
| 866 | + } | ||
| 867 | + if ( | ||
| 868 | + this.queryParams.fltNo != null && | ||
| 869 | + this.queryParams.fltNo != undefined && | ||
| 870 | + this.queryParams.fltNo != "" | ||
| 871 | + ) { | ||
| 872 | + this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase(); | ||
| 873 | + } | ||
| 506 | 874 | ||
| 507 | - /** 航班信息维护查询*/ | 875 | + findAllFltDataApi(this.queryParams).then((response) => { |
| 508 | - findAllFltData() { | 876 | + if (response.code == 200) { |
| 509 | - this.loading = true; | 877 | + this.findAllFltDatList = response.data.list; |
| 510 | - if (this.queryParams.pageNum > 1) { | 878 | + this.total = response.data.totalCount; |
| 511 | - this.queryParams.limitStart = (this.queryParams.pageNum - 1) * this.queryParams.limitSize | 879 | + this.loading = false; |
| 512 | } else { | 880 | } else { |
| 513 | - this.queryParams.limitStart = 0; | 881 | + this.msgError(response.msg); |
| 514 | } | 882 | } |
| 515 | - if (this.queryParams.fltNo != null && this.queryParams.fltNo != undefined && this.queryParams.fltNo != '') { | 883 | + }); |
| 516 | - this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase(); | 884 | + }, |
| 885 | + /** 新增按钮操作 */ | ||
| 886 | + handleAdd() { | ||
| 887 | + this.reset(); | ||
| 888 | + this.open = true; | ||
| 889 | + this.title = "添加航班信息"; | ||
| 890 | + this.form.id = null; | ||
| 891 | + this.form.statusId = this.flightStatuslist[0].id; | ||
| 892 | + this.form.alloctedWeight = 0; //已配重量 | ||
| 893 | + this.form.lowAllocatedWeight = 0; //低价已配重量 | ||
| 894 | + this.form.highAllocatedWeight = 0; //高价已配重量 | ||
| 895 | + | ||
| 896 | + //航班号 | ||
| 897 | + this.formdisabled.fltNo = false; | ||
| 898 | + //航班日期 | ||
| 899 | + this.formdisabled.fltDate = false; | ||
| 900 | + //航班路线 | ||
| 901 | + this.formdisabled.route = false; | ||
| 902 | + //航班种类 | ||
| 903 | + this.formdisabled.kindId = false; | ||
| 904 | + //航班类型 | ||
| 905 | + this.formdisabled.typeId = false; | ||
| 906 | + //原始重量 | ||
| 907 | + this.formdisabled.originalWeight = false; | ||
| 908 | + }, | ||
| 909 | + //计算高地价可配 | ||
| 910 | + LowHighAvailable() { | ||
| 911 | + //判断是否开启高地价 | ||
| 912 | + if (this.form.highLowPriceFlg) { | ||
| 913 | + this.ishighPriceWeightPercent = false; | ||
| 914 | + let Weight = 0; | ||
| 915 | + //计算实际重量 | ||
| 916 | + if ( | ||
| 917 | + this.form.highPriceWeightPercent > 0 || | ||
| 918 | + this.form.lowPriceWeightPercent > 0 | ||
| 919 | + ) { | ||
| 920 | + Weight = this.Weightall(); | ||
| 517 | } | 921 | } |
| 518 | - | 922 | + //高价可配 |
| 519 | - findAllFltDataApi(this.queryParams).then(response => { | 923 | + if (this.form.highPriceWeightPercent > 0) { |
| 520 | - if (response.code == 200) { | 924 | + this.$set( |
| 521 | - | 925 | + this.form, |
| 522 | - this.findAllFltDatList = response.data.list; | 926 | + "lowPriceWeightPercent", |
| 523 | - this.total = response.data.totalCount; | 927 | + 100 - this.form.highPriceWeightPercent |
| 524 | - this.loading = false; | 928 | + ); |
| 929 | + this.$set( | ||
| 930 | + this.form, | ||
| 931 | + "highAvailableWeight", | ||
| 932 | + (Weight - this.form.alloctedWeight) * | ||
| 933 | + (this.form.highPriceWeightPercent / 100) | ||
| 934 | + ); | ||
| 935 | + // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) | ||
| 936 | + } else if ( | ||
| 937 | + this.title == "修改航班信息" && | ||
| 938 | + this.form.highPriceWeightPercent > 0 | ||
| 939 | + ) { | ||
| 940 | + if (this.form.highAvailableWeight) { | ||
| 941 | + this.$set( | ||
| 942 | + this.form, | ||
| 943 | + "highAvailableWeight", | ||
| 944 | + this.form.highAvailableWeight | ||
| 945 | + ); | ||
| 525 | } else { | 946 | } else { |
| 526 | - this.msgError(response.msg); | 947 | + this.$set( |
| 527 | - } | 948 | + this.form, |
| 528 | - | 949 | + "highAvailableWeight", |
| 529 | - }); | 950 | + (Weight - this.form.alloctedWeight) * |
| 530 | - | 951 | + (this.form.highPriceWeightPercent / 100) |
| 531 | - }, | 952 | + ); |
| 532 | - /** 新增按钮操作 */ | ||
| 533 | - handleAdd() { | ||
| 534 | - this.reset(); | ||
| 535 | - this.open = true; | ||
| 536 | - this.title = "添加航班信息"; | ||
| 537 | - this.form.id = null; | ||
| 538 | - this.form.statusId = this.flightStatuslist[0].id; | ||
| 539 | - this.form.alloctedWeight = 0; //已配重量 | ||
| 540 | - this.form.lowAllocatedWeight = 0; //低价已配重量 | ||
| 541 | - this.form.highAllocatedWeight = 0; //高价已配重量 | ||
| 542 | - | ||
| 543 | - //航班号 | ||
| 544 | - this.formdisabled.fltNo = false; | ||
| 545 | - //航班日期 | ||
| 546 | - this.formdisabled.fltDate = false; | ||
| 547 | - //航班路线 | ||
| 548 | - this.formdisabled.route = false; | ||
| 549 | - //航班种类 | ||
| 550 | - this.formdisabled.kindId = false; | ||
| 551 | - //航班类型 | ||
| 552 | - this.formdisabled.typeId = false; | ||
| 553 | - //原始重量 | ||
| 554 | - this.formdisabled.originalWeight = false; | ||
| 555 | - }, | ||
| 556 | - //计算高地价可配 | ||
| 557 | - LowHighAvailable() { | ||
| 558 | - //判断是否开启高地价 | ||
| 559 | - if (this.form.highLowPriceFlg) { | ||
| 560 | - this.ishighPriceWeightPercent=false; | ||
| 561 | - let Weight = 0; | ||
| 562 | - //计算实际重量 | ||
| 563 | - if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) { | ||
| 564 | - Weight = this.Weightall(); | ||
| 565 | } | 953 | } |
| 566 | - //高价可配 | 954 | + } else { |
| 567 | - if (this.form.highPriceWeightPercent > 0) { | 955 | + this.$set(this.form, "highAvailableWeight", 0); |
| 568 | - this.$set(this.form, "lowPriceWeightPercent", 100-this.form.highPriceWeightPercent); | 956 | + // this.form.HighAvailableWeight = 0; |
| 569 | - this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form | 957 | + } |
| 570 | - .highPriceWeightPercent / 100)); | 958 | + //低价可配 |
| 571 | - // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) | 959 | + if (this.form.lowPriceWeightPercent > 0) { |
| 572 | - }else if(this.title == "修改航班信息" && this.form.highPriceWeightPercent > 0){ | 960 | + this.$set( |
| 573 | - if(this.form.highAvailableWeight){ | 961 | + this.form, |
| 574 | - this.$set(this.form, 'highAvailableWeight', this.form.highAvailableWeight) | 962 | + "lowAvailableWeight", |
| 575 | - }else{ | 963 | + Weight - this.form.alloctedWeight - this.form.highAvailableWeight |
| 576 | - this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form | 964 | + ); |
| 577 | - .highPriceWeightPercent / 100)); | 965 | + //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; |
| 578 | - } | 966 | + } else if ( |
| 579 | - }else { | 967 | + this.title == "修改航班信息" && |
| 580 | - this.$set(this.form, "highAvailableWeight", 0); | 968 | + this.form.lowPriceWeightPercent > 0 |
| 581 | - // this.form.HighAvailableWeight = 0; | 969 | + ) { |
| 582 | - } | 970 | + if (this.form.lowAvailableWeight) { |
| 583 | - //低价可配 | 971 | + this.$set( |
| 584 | - if (this.form.lowPriceWeightPercent > 0) { | 972 | + this.form, |
| 585 | - this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form | 973 | + "lowAvailableWeight", |
| 586 | - .highAvailableWeight); | 974 | + this.form.lowAvailableWeight |
| 587 | - //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; | 975 | + ); |
| 588 | - }else if(this.title == "修改航班信息" && this.form.lowPriceWeightPercent > 0){ | 976 | + } else { |
| 589 | - if(this.form.lowAvailableWeight){ | 977 | + this.$set( |
| 590 | - this.$set(this.form, 'lowAvailableWeight', this.form.lowAvailableWeight) | 978 | + this.form, |
| 591 | - }else{ | 979 | + "lowAvailableWeight", |
| 592 | - this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form | 980 | + Weight - this.form.alloctedWeight - this.form.highAvailableWeight |
| 593 | - .highAvailableWeight); | 981 | + ); |
| 594 | - } | ||
| 595 | - }else { | ||
| 596 | - this.$set(this.form, "lowAvailableWeight", 0); | ||
| 597 | - // this.form.lowAvailableWeight = 0; | ||
| 598 | } | 982 | } |
| 599 | - }else{ | 983 | + } else { |
| 600 | - this.ishighPriceWeightPercent=true; | 984 | + this.$set(this.form, "lowAvailableWeight", 0); |
| 985 | + // this.form.lowAvailableWeight = 0; | ||
| 601 | } | 986 | } |
| 987 | + } else { | ||
| 988 | + this.ishighPriceWeightPercent = true; | ||
| 989 | + } | ||
| 990 | + }, | ||
| 991 | + //计算实际重量 | ||
| 992 | + Weightall() { | ||
| 993 | + let Weight = 0; | ||
| 994 | + if (this.form.extraWeightPercent > 0) { | ||
| 995 | + Weight = | ||
| 996 | + this.form.originalWeight + | ||
| 997 | + this.form.originalWeight * (this.form.extraWeightPercent / 100); | ||
| 998 | + } else { | ||
| 999 | + Weight = this.form.originalWeight; | ||
| 1000 | + } | ||
| 1001 | + return Weight; | ||
| 1002 | + }, | ||
| 602 | 1003 | ||
| 603 | - }, | 1004 | + /** 修改按钮操作 */ |
| 604 | - //计算实际重量 | 1005 | + handleUpdate(row) { |
| 605 | - Weightall() { | 1006 | + this.reset(); |
| 606 | - let Weight = 0; | 1007 | + this.open = true; |
| 607 | - if (this.form.extraWeightPercent > 0) { | 1008 | + this.title = "修改航班信息"; |
| 608 | - Weight = this.form.originalWeight + this.form.originalWeight * (this.form.extraWeightPercent / 100) | 1009 | + //航班号 |
| 609 | - }else { | 1010 | + this.formdisabled.fltNo = true; |
| 610 | - Weight = this.form.originalWeight; | 1011 | + //航班日期 |
| 1012 | + this.formdisabled.fltDate = true; | ||
| 1013 | + //根据ID查item | ||
| 1014 | + findFltById(row).then((response) => { | ||
| 1015 | + if (response.code == 200) { | ||
| 1016 | + this.form = response.data; | ||
| 1017 | + //是否开启高地价 | ||
| 1018 | + this.form.highLowPriceFlg = | ||
| 1019 | + this.form.highLowPriceFlg === 1 ? true : false; | ||
| 1020 | + //是否预审 | ||
| 1021 | + this.form.isNeedRequired = | ||
| 1022 | + this.form.isNeedRequired === 1 ? true : false; | ||
| 1023 | + // 计算高地价可配 | ||
| 1024 | + this.LowHighAvailable(); | ||
| 1025 | + } else { | ||
| 1026 | + this.msgError(response.msg); | ||
| 611 | } | 1027 | } |
| 612 | - return Weight; | 1028 | + }); |
| 613 | - }, | 1029 | + }, |
| 614 | - | 1030 | + /** 删除按钮操作 */ |
| 615 | - /** 修改按钮操作 */ | 1031 | + handleDelete(row) { |
| 616 | - handleUpdate(row) { | 1032 | + const fIds = this.ids; |
| 617 | - this.reset(); | 1033 | + this.$confirm("是否确认删除所选数据?", "警告", { |
| 618 | - this.open = true; | 1034 | + confirmButtonText: "确定", |
| 619 | - this.title = "修改航班信息"; | 1035 | + cancelButtonText: "取消", |
| 620 | - //航班号 | 1036 | + type: "warning", |
| 621 | - this.formdisabled.fltNo = true; | 1037 | + }) |
| 622 | - //航班日期 | 1038 | + .then(() => { |
| 623 | - this.formdisabled.fltDate = true; | 1039 | + return delFlight(fIds); |
| 624 | - //根据ID查item | 1040 | + }) |
| 625 | - findFltById(row).then(response => { | 1041 | + .then((response) => { |
| 626 | - if (response.code == 200) { | 1042 | + this.findAllFltData(); |
| 627 | - this.form = response.data; | 1043 | + if (response.data.length > 0) { |
| 628 | - //是否开启高地价 | 1044 | + this.gridData = response.data; |
| 629 | - this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; | 1045 | + this.$confirm(response.msg, "提示", { |
| 630 | - //是否预审 | 1046 | + confirmButtonText: "查看删除失败航班信息", |
| 631 | - this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; | 1047 | + cancelButtonText: "取消", |
| 632 | - // 计算高地价可配 | 1048 | + type: "warning", |
| 633 | - this.LowHighAvailable(); | 1049 | + center: true, |
| 634 | - | 1050 | + }) |
| 1051 | + .then(() => { | ||
| 1052 | + this.dialogTableVisible = true; | ||
| 1053 | + }) | ||
| 1054 | + .catch(() => {}); | ||
| 635 | } else { | 1055 | } else { |
| 636 | - this.msgError(response.msg); | 1056 | + this.msgSuccess(response.msg); |
| 637 | } | 1057 | } |
| 1058 | + }) | ||
| 1059 | + .catch(() => {}); | ||
| 1060 | + }, | ||
| 638 | 1061 | ||
| 639 | - }); | 1062 | + /** 提交按钮 */ |
| 640 | - }, | 1063 | + submitForm: function () { |
| 641 | - /** 删除按钮操作 */ | 1064 | + this.$refs["form"].validate((valid) => { |
| 642 | - handleDelete(row) { | 1065 | + if (valid) { |
| 643 | - const fIds =this.ids; | 1066 | + let formdata = JSON.parse(JSON.stringify(this.form)); |
| 644 | - this.$confirm('是否确认删除所选数据?', "警告", { | 1067 | + |
| 645 | - confirmButtonText: "确定", | 1068 | + //高价百分比和低价百分比和不可以大于100 |
| 646 | - cancelButtonText: "取消", | 1069 | + if ( |
| 647 | - type: "warning" | 1070 | + this.form.highLowPriceFlg && |
| 648 | - }).then(function() { | 1071 | + (formdata.highPriceWeightPercent > 100 || |
| 649 | - return delFlight(fIds); | 1072 | + formdata.highPriceWeightPercent < 0) |
| 650 | - }).then(response => { | 1073 | + ) { |
| 651 | - this.findAllFltData(); | 1074 | + this.$message.warning("请正确填写高低价百分比"); |
| 652 | - if(response.data.length>0){ | 1075 | + return; |
| 653 | - this.gridData=response.data; | 1076 | + } |
| 654 | - this.$confirm(response.msg, '提示', { | 1077 | + //已删除的无法修改 |
| 655 | - confirmButtonText: '查看删除失败航班信息', | 1078 | + //拿到已删除的id |
| 656 | - cancelButtonText: '取消', | 1079 | + let statusId = 0; |
| 657 | - type: 'warning', | 1080 | + this.flightStatuslist.map((item) => { |
| 658 | - center: true | 1081 | + // this.unitList 是你 select option遍历的集合 e 是选中的id |
| 659 | - }).then(() => { | 1082 | + if (item.chineseName === "已删除") { |
| 660 | - this.dialogTableVisible=true; | 1083 | + statusId = item.id; |
| 661 | - }).catch(function() { }); | ||
| 662 | - | ||
| 663 | - }else{ | ||
| 664 | - this.msgSuccess(response.msg); | ||
| 665 | - } | ||
| 666 | - }).catch(function() {}); | ||
| 667 | - }, | ||
| 668 | - | ||
| 669 | - /** 提交按钮 */ | ||
| 670 | - submitForm: function() { | ||
| 671 | - this.$refs["form"].validate(valid => { | ||
| 672 | - if (valid) { | ||
| 673 | - let formdata = JSON.parse(JSON.stringify(this.form)); | ||
| 674 | - | ||
| 675 | - //高价百分比和低价百分比和不可以大于100 | ||
| 676 | - if (this.form.highLowPriceFlg && (formdata.highPriceWeightPercent>100||formdata.highPriceWeightPercent<0) ) { | ||
| 677 | - this.$message.warning("请正确填写高低价百分比"); | ||
| 678 | - return; | ||
| 679 | - } | ||
| 680 | - //已删除的无法修改 | ||
| 681 | - //拿到已删除的id | ||
| 682 | - let statusId=0; | ||
| 683 | - this.flightStatuslist.map((item) => { | ||
| 684 | - // this.unitList 是你 select option遍历的集合 e 是选中的id | ||
| 685 | - if (item.chineseName === "已删除") { | ||
| 686 | - statusId=item.id; | ||
| 687 | - return; | ||
| 688 | - } | ||
| 689 | - }) | ||
| 690 | - if (statusId === formdata.statusId) { | ||
| 691 | - this.$message.warning("已删除的航班无法修改"); | ||
| 692 | return; | 1084 | return; |
| 693 | } | 1085 | } |
| 694 | - //是否开启高地价 | 1086 | + }); |
| 695 | - formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0; | 1087 | + if (statusId === formdata.statusId) { |
| 696 | - //是否预审 | 1088 | + this.$message.warning("已删除的航班无法修改"); |
| 697 | - formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; | 1089 | + return; |
| 698 | - //处理数据 | ||
| 699 | - saveOrUpdate(formdata).then(response => { | ||
| 700 | - if (response.code === 200) { | ||
| 701 | - this.msgSuccess("保存成功"); | ||
| 702 | - this.open = false; | ||
| 703 | - this.findAllFltData(); | ||
| 704 | - } else { | ||
| 705 | - this.msgError(response.msg); | ||
| 706 | - } | ||
| 707 | - }); | ||
| 708 | - | ||
| 709 | } | 1090 | } |
| 710 | - }); | 1091 | + //是否开启高地价 |
| 711 | - }, | 1092 | + formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0; |
| 712 | - // 表单重置 | 1093 | + //是否预审 |
| 713 | - reset() { | 1094 | + formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; |
| 714 | - this.form = {}; | 1095 | + //处理数据 |
| 715 | - this.resetForm("form"); | 1096 | + saveOrUpdate(formdata).then((response) => { |
| 716 | - }, | 1097 | + if (response.code === 200) { |
| 717 | - // 取消按钮 | 1098 | + this.msgSuccess("保存成功"); |
| 718 | - cancel() { | 1099 | + this.open = false; |
| 719 | - this.open = false; | 1100 | + this.findAllFltData(); |
| 720 | - this.reset(); | 1101 | + } else { |
| 721 | - }, | 1102 | + this.msgError(response.msg); |
| 722 | - | 1103 | + } |
| 723 | - /** 重置按钮操作 */ | 1104 | + }); |
| 724 | - resetQuery() { | ||
| 725 | - this.resetForm("queryForm"); | ||
| 726 | - this.handleQuery(); | ||
| 727 | - }, | ||
| 728 | - /** 搜索按钮操作 */ | ||
| 729 | - handleQuery() { | ||
| 730 | - this.queryParams.pageNum = 1; | ||
| 731 | - this.queryParams.start = 0; | ||
| 732 | - this.findAllFltData(); | ||
| 733 | - }, | ||
| 734 | - //批量开启/关闭航班 | ||
| 735 | - handleFlightStatus(status){ | ||
| 736 | - let handle = status == 'flightStatus80' ? '关闭' : '开启' | ||
| 737 | - if (this.ids.length == 0){ | ||
| 738 | - this.msgError('请选择批量' + handle + '的航班') | ||
| 739 | - return; | ||
| 740 | } | 1105 | } |
| 741 | - let data = {}; | 1106 | + }); |
| 742 | - data.status = status; | 1107 | + }, |
| 743 | - data.updateIds = this.ids; | 1108 | + // 表单重置 |
| 744 | - | 1109 | + reset() { |
| 745 | - updateStatusBatch(data).then(response => { | 1110 | + this.form = {}; |
| 746 | - if (response.code === 200) { | 1111 | + this.resetForm("form"); |
| 747 | - this.msgSuccess( handle + "成功"); | 1112 | + }, |
| 748 | - this.findAllFltData(); | 1113 | + // 取消按钮 |
| 749 | - } else { | 1114 | + cancel() { |
| 750 | - this.msgError(response.msg); | 1115 | + this.open = false; |
| 751 | - } | 1116 | + this.reset(); |
| 752 | - }); | 1117 | + }, |
| 753 | - } | ||
| 754 | 1118 | ||
| 755 | - } | 1119 | + /** 重置按钮操作 */ |
| 756 | - }; | 1120 | + resetQuery() { |
| 1121 | + this.resetForm("queryForm"); | ||
| 1122 | + this.handleQuery(); | ||
| 1123 | + }, | ||
| 1124 | + /** 搜索按钮操作 */ | ||
| 1125 | + handleQuery() { | ||
| 1126 | + this.queryParams.pageNum = 1; | ||
| 1127 | + this.queryParams.start = 0; | ||
| 1128 | + this.findAllFltData(); | ||
| 1129 | + }, | ||
| 1130 | + //批量开启/关闭航班 | ||
| 1131 | + handleFlightStatus(status) { | ||
| 1132 | + let handle = status == "flightStatus80" ? "关闭" : "开启"; | ||
| 1133 | + if (this.ids.length == 0) { | ||
| 1134 | + this.msgError("请选择批量" + handle + "的航班"); | ||
| 1135 | + return; | ||
| 1136 | + } | ||
| 1137 | + let data = {}; | ||
| 1138 | + data.status = status; | ||
| 1139 | + data.updateIds = this.ids; | ||
| 1140 | + | ||
| 1141 | + updateStatusBatch(data).then((response) => { | ||
| 1142 | + if (response.code === 200) { | ||
| 1143 | + this.msgSuccess(handle + "成功"); | ||
| 1144 | + this.findAllFltData(); | ||
| 1145 | + } else { | ||
| 1146 | + this.msgError(response.msg); | ||
| 1147 | + } | ||
| 1148 | + }); | ||
| 1149 | + }, | ||
| 1150 | + }, | ||
| 1151 | +}; | ||
| 757 | </script> | 1152 | </script> |
| 758 | <style> | 1153 | <style> |
| 759 | - .el-table--striped .el-table__body tr.el-table__row--striped.current-row td, | 1154 | +.el-table--striped .el-table__body tr.el-table__row--striped.current-row td, |
| 760 | - .el-table__body tr.current-row>td { | 1155 | +.el-table__body tr.current-row > td { |
| 761 | - background-color: #a0cfff; | 1156 | + background-color: #a0cfff; |
| 762 | - } | 1157 | +} |
| 763 | - | 1158 | + |
| 764 | - .el-table--striped .el-table__body tr.hover-row.el-table__row--striped>td, | 1159 | +.el-table--striped .el-table__body tr.hover-row.el-table__row--striped > td, |
| 765 | - .el-table__body tr.hover-row>td { | 1160 | +.el-table__body tr.hover-row > td { |
| 766 | - background-color: #d9ecff !important; | 1161 | + background-color: #d9ecff !important; |
| 767 | - } | 1162 | +} |
| 768 | </style> | 1163 | </style> | ... | ... |
| ... | @@ -37,6 +37,7 @@ module.exports = { | ... | @@ -37,6 +37,7 @@ module.exports = { |
| 37 | target: `https://imacuat.zmd.apac.fedex.com/iMAC`, | 37 | target: `https://imacuat.zmd.apac.fedex.com/iMAC`, |
| 38 | // target: `http://47.103.140.98:7001/iMAC`, | 38 | // target: `http://47.103.140.98:7001/iMAC`, |
| 39 | // target: `http://192.168.1.134:18080`, | 39 | // target: `http://192.168.1.134:18080`, |
| 40 | + // target: `http://47.103.140.98:7001/IMAC2`, //生产 | ||
| 40 | changeOrigin: true, | 41 | changeOrigin: true, |
| 41 | pathRewrite: { | 42 | pathRewrite: { |
| 42 | ['^' + process.env.VUE_APP_BASE_API]: '' | 43 | ['^' + process.env.VUE_APP_BASE_API]: '' | ... | ... |
-
Please register or login to post a comment