Showing
12 changed files
with
294 additions
and
297 deletions
src/api/et86.js
0 → 100644
| 1 | +import request from "@/utils/request"; | ||
| 2 | + | ||
| 3 | +// ET86查询 | ||
| 4 | +/** | ||
| 5 | + * @param createTimeStart; 开始时间 | ||
| 6 | + * @param createTimeEnd; 结束时间 | ||
| 7 | + * @param status; 1-有效 0-无效 不传查全部 | ||
| 8 | + */ | ||
| 9 | +export function findAllEtesRules(data) { | ||
| 10 | + return request({ | ||
| 11 | + url: "/etes/findAllEtesRules", | ||
| 12 | + method: "post", | ||
| 13 | + data: data, | ||
| 14 | + }); | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +// ET86新增 | ||
| 18 | +export function add(data) { | ||
| 19 | + return request({ | ||
| 20 | + url: "/etes/add", | ||
| 21 | + method: "post", | ||
| 22 | + data: data, | ||
| 23 | + }); | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +// ET86详情 | ||
| 27 | +export function findEtesRuleById(data) { | ||
| 28 | + return request({ | ||
| 29 | + url: "/etes/findEtesRuleById", | ||
| 30 | + method: "post", | ||
| 31 | + data: data, | ||
| 32 | + }); | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +// ET86编辑 | ||
| 36 | +export function update(data) { | ||
| 37 | + return request({ | ||
| 38 | + url: "/etes/udpate", | ||
| 39 | + method: "post", | ||
| 40 | + data: data, | ||
| 41 | + }); | ||
| 42 | +} |
| ... | @@ -114,6 +114,7 @@ | ... | @@ -114,6 +114,7 @@ |
| 114 | :style="{ width: item.width }" | 114 | :style="{ width: item.width }" |
| 115 | :disabled="item.disable" | 115 | :disabled="item.disable" |
| 116 | :placeholder="item.placeholder ? item.placeholder : '请选择日期'" | 116 | :placeholder="item.placeholder ? item.placeholder : '请选择日期'" |
| 117 | + :value-format="item.format" | ||
| 117 | clearable | 118 | clearable |
| 118 | > | 119 | > |
| 119 | </el-date-picker> | 120 | </el-date-picker> | ... | ... |
| ... | @@ -27,8 +27,8 @@ | ... | @@ -27,8 +27,8 @@ |
| 27 | :header-cell-class-name="headerCellClassName" | 27 | :header-cell-class-name="headerCellClassName" |
| 28 | > | 28 | > |
| 29 | <template v-if="columns.length"> | 29 | <template v-if="columns.length"> |
| 30 | - <template v-for="(item, index) in columns"> | 30 | + <template v-for="item in columns"> |
| 31 | - <column v-if="!item.hidden" :key="index" :attrs="item"></column> | 31 | + <column v-if="!item.hidden" :key="item.id" :attrs="item"></column> |
| 32 | </template> | 32 | </template> |
| 33 | </template> | 33 | </template> |
| 34 | <slot name="column" v-else></slot> | 34 | <slot name="column" v-else></slot> | ... | ... |
| ... | @@ -81,11 +81,25 @@ export const constantRoutes = [ | ... | @@ -81,11 +81,25 @@ export const constantRoutes = [ |
| 81 | children: [], | 81 | children: [], |
| 82 | }, | 82 | }, |
| 83 | { | 83 | { |
| 84 | - path: "/et86/:edit", | 84 | + path: "/et86/:name", |
| 85 | component: (resolve) => | 85 | component: (resolve) => |
| 86 | require(["@/views/allocationConfig/et86/edit"], resolve), | 86 | require(["@/views/allocationConfig/et86/edit"], resolve), |
| 87 | name: "edit", | 87 | name: "edit", |
| 88 | meta: { title: "编辑", icon: "user" }, | 88 | meta: { title: "编辑", icon: "user" }, |
| 89 | + beforeEnter: (to, from, next) => { | ||
| 90 | + const { params } = to; | ||
| 91 | + if (params.title == "edit") { | ||
| 92 | + to.params.title = "编辑" | ||
| 93 | + to.params.icon = "user"; | ||
| 94 | + }else if (params.title == "detail") { | ||
| 95 | + to.params.title = "详情"; | ||
| 96 | + to.params.icon = "user"; | ||
| 97 | + }else{ | ||
| 98 | + to.params.title = "新增"; | ||
| 99 | + to.params.icon = "user"; | ||
| 100 | + } | ||
| 101 | + next(); | ||
| 102 | + }, | ||
| 89 | }, | 103 | }, |
| 90 | { | 104 | { |
| 91 | path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", | 105 | path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", | ... | ... |
| ... | @@ -155,7 +155,7 @@ export const inputBlurValidate = { | ... | @@ -155,7 +155,7 @@ export const inputBlurValidate = { |
| 155 | // 报价值【申报价值可以为空为0】 | 155 | // 报价值【申报价值可以为空为0】 |
| 156 | validateCustomVal(value, customVal) { | 156 | validateCustomVal(value, customVal) { |
| 157 | if (value.length) { | 157 | if (value.length) { |
| 158 | - this.queryForm[customVal] = Number(value); | 158 | + this[customVal] = Number(value); |
| 159 | let coin = { | 159 | let coin = { |
| 160 | minCNYCustomVal: "minCNYCustomVal", | 160 | minCNYCustomVal: "minCNYCustomVal", |
| 161 | maxCNYCustomVal: "minCNYCustomVal", | 161 | maxCNYCustomVal: "minCNYCustomVal", |
| ... | @@ -170,20 +170,20 @@ export const inputBlurValidate = { | ... | @@ -170,20 +170,20 @@ export const inputBlurValidate = { |
| 170 | }; | 170 | }; |
| 171 | let markCoin = false; | 171 | let markCoin = false; |
| 172 | if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") { | 172 | if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") { |
| 173 | - if (this.queryForm.minCNYCustomVal && this.queryForm.maxCNYCustomVal) { | 173 | + if (this.minCNYCustomVal && this.maxCNYCustomVal) { |
| 174 | - markCoin = Number(this.queryForm.maxCNYCustomVal) < Number(this.queryForm.minCNYCustomVal); | 174 | + markCoin = Number(this.maxCNYCustomVal) < Number(this.minCNYCustomVal); |
| 175 | } | 175 | } |
| 176 | } else { | 176 | } else { |
| 177 | - if (this.queryForm.minSUDCustomVal && this.queryForm.maxSUDCustomVal) { | 177 | + if (this.minSUDCustomVal && this.maxSUDCustomVal) { |
| 178 | - markCoin = Number(this.queryForm.maxSUDCustomVal) < Number(this.queryForm.minSUDCustomVal); | 178 | + markCoin = Number(this.maxSUDCustomVal) < Number(this.minSUDCustomVal); |
| 179 | } | 179 | } |
| 180 | } | 180 | } |
| 181 | - if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this.queryForm[customVal])) { | 181 | + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this[customVal])) { |
| 182 | - if (this.queryForm[customVal] >= 0) { | 182 | + if (this[customVal] >= 0) { |
| 183 | if (markCoin) { | 183 | if (markCoin) { |
| 184 | this.$refs[coin[customVal]].innerHTML = ""; | 184 | this.$refs[coin[customVal]].innerHTML = ""; |
| 185 | this.$refs[coin[customVal]].innerHTML = "最小申报价值不得大于最大申报价值"; | 185 | this.$refs[coin[customVal]].innerHTML = "最小申报价值不得大于最大申报价值"; |
| 186 | - } else if (this.queryForm[customVal] > currency[customVal]) { | 186 | + } else if (this[customVal] > currency[customVal]) { |
| 187 | this.$refs[coin[customVal]].innerHTML = ""; | 187 | this.$refs[coin[customVal]].innerHTML = ""; |
| 188 | this.$refs[coin[customVal]].innerHTML = `最大申报值不得大于${currency[customVal]}`; | 188 | this.$refs[coin[customVal]].innerHTML = `最大申报值不得大于${currency[customVal]}`; |
| 189 | } else { | 189 | } else { | ... | ... |
| ... | @@ -27,13 +27,13 @@ | ... | @@ -27,13 +27,13 @@ |
| 27 | ></el-table-column> | 27 | ></el-table-column> |
| 28 | <el-table-column | 28 | <el-table-column |
| 29 | label="航班号" | 29 | label="航班号" |
| 30 | - prop="fltNo" | 30 | + prop="flightNo" |
| 31 | min-width="100" | 31 | min-width="100" |
| 32 | align="center" | 32 | align="center" |
| 33 | > | 33 | > |
| 34 | <template slot-scope="scope"> | 34 | <template slot-scope="scope"> |
| 35 | <el-input | 35 | <el-input |
| 36 | - v-model="scope.row.fltNo" | 36 | + v-model="scope.row.flightNo" |
| 37 | clearable | 37 | clearable |
| 38 | :readonly="scope.row.edit | isEdit" | 38 | :readonly="scope.row.edit | isEdit" |
| 39 | @focus="inputFocus(scope)" | 39 | @focus="inputFocus(scope)" |
| ... | @@ -45,14 +45,14 @@ | ... | @@ -45,14 +45,14 @@ |
| 45 | </el-table-column> | 45 | </el-table-column> |
| 46 | <el-table-column | 46 | <el-table-column |
| 47 | label="加减天数" | 47 | label="加减天数" |
| 48 | - prop="fltNoDate" | 48 | + prop="calculateDay" |
| 49 | width="100" | 49 | width="100" |
| 50 | align="center" | 50 | align="center" |
| 51 | > | 51 | > |
| 52 | <template slot-scope="scope"> | 52 | <template slot-scope="scope"> |
| 53 | <el-input | 53 | <el-input |
| 54 | type="number" | 54 | type="number" |
| 55 | - v-model="scope.row.fltNoDate" | 55 | + v-model="scope.row.calculateDay" |
| 56 | :readonly="scope.row.edit | isEdit" | 56 | :readonly="scope.row.edit | isEdit" |
| 57 | :disabled="scope.row.edit | isEdit" | 57 | :disabled="scope.row.edit | isEdit" |
| 58 | min="-7" | 58 | min="-7" |
| ... | @@ -66,13 +66,13 @@ | ... | @@ -66,13 +66,13 @@ |
| 66 | </el-table-column> | 66 | </el-table-column> |
| 67 | <el-table-column | 67 | <el-table-column |
| 68 | label="航线" | 68 | label="航线" |
| 69 | - prop="fltRoute" | 69 | + prop="flightRoute" |
| 70 | min-width="100" | 70 | min-width="100" |
| 71 | align="center" | 71 | align="center" |
| 72 | > | 72 | > |
| 73 | <template slot-scope="scope"> | 73 | <template slot-scope="scope"> |
| 74 | <el-select | 74 | <el-select |
| 75 | - v-model="scope.row.fltRoute" | 75 | + v-model="scope.row.flightRoute" |
| 76 | placeholder="请选择" | 76 | placeholder="请选择" |
| 77 | size="small" | 77 | size="small" |
| 78 | > | 78 | > |
| ... | @@ -88,13 +88,13 @@ | ... | @@ -88,13 +88,13 @@ |
| 88 | </el-table-column> | 88 | </el-table-column> |
| 89 | <el-table-column | 89 | <el-table-column |
| 90 | label="爆仓是否继续配舱" | 90 | label="爆仓是否继续配舱" |
| 91 | - prop="isOn" | 91 | + prop="permitOverweight" |
| 92 | min-width="100" | 92 | min-width="100" |
| 93 | align="center" | 93 | align="center" |
| 94 | > | 94 | > |
| 95 | <template slot-scope="scope"> | 95 | <template slot-scope="scope"> |
| 96 | <el-checkbox | 96 | <el-checkbox |
| 97 | - v-model="scope.row.isOn" | 97 | + v-model="scope.row.permitOverweight" |
| 98 | :disabled="scope.row.edit | isEdit" | 98 | :disabled="scope.row.edit | isEdit" |
| 99 | @change="changeCheck(scope)" | 99 | @change="changeCheck(scope)" |
| 100 | ></el-checkbox> | 100 | ></el-checkbox> |
| ... | @@ -115,7 +115,7 @@ | ... | @@ -115,7 +115,7 @@ |
| 115 | </yl-table> | 115 | </yl-table> |
| 116 | </el-col> | 116 | </el-col> |
| 117 | </el-row> | 117 | </el-row> |
| 118 | - <!-- 航线维度设置 --> | 118 | + <!-- ET86配舱航班顺位维度 --> |
| 119 | <el-row style="padding: 20px 0"> | 119 | <el-row style="padding: 20px 0"> |
| 120 | <el-col> | 120 | <el-col> |
| 121 | <el-divider content-position="left">航线维度设置</el-divider> | 121 | <el-divider content-position="left">航线维度设置</el-divider> |
| ... | @@ -134,7 +134,7 @@ | ... | @@ -134,7 +134,7 @@ |
| 134 | <el-form-item label="原航班号"> | 134 | <el-form-item label="原航班号"> |
| 135 | <el-input | 135 | <el-input |
| 136 | type="textarea" | 136 | type="textarea" |
| 137 | - v-model="queryForm.fltNo" | 137 | + v-model="queryForm.originOfFlightNo" |
| 138 | size="medium" | 138 | size="medium" |
| 139 | maxlength="1000" | 139 | maxlength="1000" |
| 140 | show-word-limit | 140 | show-word-limit |
| ... | @@ -147,7 +147,7 @@ | ... | @@ -147,7 +147,7 @@ |
| 147 | <el-form-item label="服务种类"> | 147 | <el-form-item label="服务种类"> |
| 148 | <el-col :span="4"> | 148 | <el-col :span="4"> |
| 149 | <el-radio-group | 149 | <el-radio-group |
| 150 | - v-model="queryForm.isServiceCode" | 150 | + v-model="isServiceCode" |
| 151 | @change="isServiceCode" | 151 | @change="isServiceCode" |
| 152 | > | 152 | > |
| 153 | <el-radio label="1">包含ServiceCode</el-radio> | 153 | <el-radio label="1">包含ServiceCode</el-radio> |
| ... | @@ -157,7 +157,7 @@ | ... | @@ -157,7 +157,7 @@ |
| 157 | <el-col :span="10" :offset="1"> | 157 | <el-col :span="10" :offset="1"> |
| 158 | <el-input | 158 | <el-input |
| 159 | type="textarea" | 159 | type="textarea" |
| 160 | - v-model="queryForm.serviceCode" | 160 | + v-model="serviceCode" |
| 161 | size="medium" | 161 | size="medium" |
| 162 | maxlength="1000" | 162 | maxlength="1000" |
| 163 | show-word-limit | 163 | show-word-limit |
| ... | @@ -205,10 +205,10 @@ | ... | @@ -205,10 +205,10 @@ |
| 205 | v-model="checkboxClsssType" | 205 | v-model="checkboxClsssType" |
| 206 | @change="checkboxCargoType" | 206 | @change="checkboxCargoType" |
| 207 | style="display: flex" | 207 | style="display: flex" |
| 208 | - v-if="queryForm.cargoType.length" | 208 | + v-if="cargoType.length" |
| 209 | > | 209 | > |
| 210 | <el-checkbox | 210 | <el-checkbox |
| 211 | - v-for="item in queryForm.cargoType" | 211 | + v-for="item in cargoType" |
| 212 | :label="item.chineseName" | 212 | :label="item.chineseName" |
| 213 | :name="item.chineseName" | 213 | :name="item.chineseName" |
| 214 | :key="item.code" | 214 | :key="item.code" |
| ... | @@ -224,7 +224,7 @@ | ... | @@ -224,7 +224,7 @@ |
| 224 | <el-col :span="24"> | 224 | <el-col :span="24"> |
| 225 | <el-col :span="3"> | 225 | <el-col :span="3"> |
| 226 | <el-form-item label="单品名"> | 226 | <el-form-item label="单品名"> |
| 227 | - <el-checkbox v-model="queryForm.singleName"></el-checkbox> | 227 | + <el-checkbox v-model="queryForm.multiHs"></el-checkbox> |
| 228 | </el-form-item> | 228 | </el-form-item> |
| 229 | </el-col> | 229 | </el-col> |
| 230 | <el-col :span="8"> | 230 | <el-col :span="8"> |
| ... | @@ -284,7 +284,7 @@ | ... | @@ -284,7 +284,7 @@ |
| 284 | <span class="custom-label-title">人民币</span> | 284 | <span class="custom-label-title">人民币</span> |
| 285 | <el-col :span="10"> | 285 | <el-col :span="10"> |
| 286 | <el-input | 286 | <el-input |
| 287 | - v-model.trim="queryForm.minCNYCustomVal" | 287 | + v-model.trim="minCNYCustomVal" |
| 288 | clearable | 288 | clearable |
| 289 | placeholder="最小申报价值" | 289 | placeholder="最小申报价值" |
| 290 | @blur="inputBlurMin($event, 'minCNYCustomVal')" | 290 | @blur="inputBlurMin($event, 'minCNYCustomVal')" |
| ... | @@ -297,7 +297,7 @@ | ... | @@ -297,7 +297,7 @@ |
| 297 | <el-col style="text-align: center" :span="1">-</el-col> | 297 | <el-col style="text-align: center" :span="1">-</el-col> |
| 298 | <el-col :span="10"> | 298 | <el-col :span="10"> |
| 299 | <el-input | 299 | <el-input |
| 300 | - v-model.trim="queryForm.maxCNYCustomVal" | 300 | + v-model.trim="maxCNYCustomVal" |
| 301 | clearable | 301 | clearable |
| 302 | placeholder="最大申报价值" | 302 | placeholder="最大申报价值" |
| 303 | @blur="inputBlurMax($event, 'maxCNYCustomVal')" | 303 | @blur="inputBlurMax($event, 'maxCNYCustomVal')" |
| ... | @@ -309,7 +309,7 @@ | ... | @@ -309,7 +309,7 @@ |
| 309 | <el-form-item label="美元" class="custom-label-pieces"> | 309 | <el-form-item label="美元" class="custom-label-pieces"> |
| 310 | <el-col :span="10"> | 310 | <el-col :span="10"> |
| 311 | <el-input | 311 | <el-input |
| 312 | - v-model.trim="queryForm.minSUDCustomVal" | 312 | + v-model.trim="minSUDCustomVal" |
| 313 | clearable | 313 | clearable |
| 314 | placeholder="最小申报价值" | 314 | placeholder="最小申报价值" |
| 315 | @blur="inputBlurMin($event, 'minSUDCustomVal')" | 315 | @blur="inputBlurMin($event, 'minSUDCustomVal')" |
| ... | @@ -322,7 +322,7 @@ | ... | @@ -322,7 +322,7 @@ |
| 322 | <el-col style="text-align: center" :span="1">-</el-col> | 322 | <el-col style="text-align: center" :span="1">-</el-col> |
| 323 | <el-col :span="10"> | 323 | <el-col :span="10"> |
| 324 | <el-input | 324 | <el-input |
| 325 | - v-model.trim="queryForm.maxSUDCustomVal" | 325 | + v-model.trim="maxSUDCustomVal" |
| 326 | clearable | 326 | clearable |
| 327 | placeholder="最大申报价值" | 327 | placeholder="最大申报价值" |
| 328 | @blur="inputBlurMax($event, 'maxSUDCustomVal')" | 328 | @blur="inputBlurMax($event, 'maxSUDCustomVal')" |
| ... | @@ -354,8 +354,12 @@ import { tableAttr } from "./tableConfig"; | ... | @@ -354,8 +354,12 @@ import { tableAttr } from "./tableConfig"; |
| 354 | import { | 354 | import { |
| 355 | allDictData, // 获取全部字典 | 355 | allDictData, // 获取全部字典 |
| 356 | queryRouteByFltNo, // 航线查询 | 356 | queryRouteByFltNo, // 航线查询 |
| 357 | - findDestinationFltRuleByFlightNo, // 获取航班下航线维度 | ||
| 358 | } from "@/api/destinationFlight"; | 357 | } from "@/api/destinationFlight"; |
| 358 | +import { | ||
| 359 | + add, // ET86新增 | ||
| 360 | + findEtesRuleById, // ET86详情 | ||
| 361 | + update, // ET86编辑 | ||
| 362 | +} from "@/api/et86"; | ||
| 359 | import indexMixins from "./mixins"; | 363 | import indexMixins from "./mixins"; |
| 360 | export default { | 364 | export default { |
| 361 | name: "edit", | 365 | name: "edit", |
| ... | @@ -367,49 +371,58 @@ export default { | ... | @@ -367,49 +371,58 @@ export default { |
| 367 | data() { | 371 | data() { |
| 368 | return { | 372 | return { |
| 369 | formConfig: formConfig, // 表单配置项 | 373 | formConfig: formConfig, // 表单配置项 |
| 370 | - queryForm: { | 374 | + queryForm: { // ET86配舱航班顺位维度 |
| 371 | // 表单参数 | 375 | // 表单参数 |
| 372 | - fltNo: "", // 原航班号 | 376 | + id: "", // 维度ID |
| 373 | - isServiceCode: "1", // 服务种类 | 377 | + originOfFlightNo: "", // 原航班号 |
| 374 | - serviceCode: "", | 378 | + includeServiceType: "", // 服务种类包含 |
| 379 | + notIncludeServiceType: "", // 服务种类不包含 | ||
| 375 | includeUrsa: "", // URSA包含 | 380 | includeUrsa: "", // URSA包含 |
| 376 | notIncludeUrsa: "", // URSA不包含 | 381 | notIncludeUrsa: "", // URSA不包含 |
| 377 | - cargoType: [], // 申报类别调用接口获取所有的申报类别 | 382 | + declarationCategory: "", // 已勾选申报类别的数据 |
| 378 | - checkboxCargoType: [], // 已勾选申报类别的数据 | 383 | + multiHs: false, // 单品名 |
| 379 | - singleName: false, // 单品名 | ||
| 380 | minWeight: "", | 384 | minWeight: "", |
| 381 | maxWeight: "", | 385 | maxWeight: "", |
| 382 | minNumOfPieces: "", | 386 | minNumOfPieces: "", |
| 383 | maxNumOfPieces: "", | 387 | maxNumOfPieces: "", |
| 384 | - minCNYCustomVal: "", // | 388 | + currencyCd: "", |
| 385 | - maxCNYCustomVal: "", // | 389 | + minCustomVal: "", |
| 386 | - minSUDCustomVal: "", // | 390 | + maxCustomVal: "", |
| 387 | - maxSUDCustomVal: "", // | ||
| 388 | }, | 391 | }, |
| 389 | tableAttr: tableAttr, // table配置项 | 392 | tableAttr: tableAttr, // table配置项 |
| 390 | - tableData: [], | 393 | + tableData: [], // ET86配舱航班顺位 |
| 391 | currentIndex: 0, // 记录当前table 列的索引位置 | 394 | currentIndex: 0, // 记录当前table 列的索引位置 |
| 392 | - id: 0, | 395 | + id: 1, |
| 396 | + isServiceCode: "1", // 服务种类 | ||
| 397 | + serviceCode: "", // 服务种类内容 | ||
| 398 | + cargoType: [], // 申报类别调用接口获取所有的申报类别 | ||
| 399 | + checkboxCargoType: [], // 已勾选申报类别的数据 | ||
| 393 | checkboxClsssType: [], // 申报类别 | 400 | checkboxClsssType: [], // 申报类别 |
| 394 | serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode | 401 | serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode |
| 402 | + minCNYCustomVal: "", // | ||
| 403 | + maxCNYCustomVal: "", // | ||
| 404 | + minSUDCustomVal: "", // | ||
| 405 | + maxSUDCustomVal: "", // | ||
| 395 | }; | 406 | }; |
| 396 | }, | 407 | }, |
| 397 | computed: {}, | 408 | computed: {}, |
| 398 | created() { | 409 | created() { |
| 399 | this.tableData = [ | 410 | this.tableData = [ |
| 400 | { | 411 | { |
| 401 | - id: this.id++, | 412 | + id: this.id, |
| 402 | - fltNo: "", | 413 | + flightNo: "", // 航班号 |
| 403 | - fltNoDate: "", | 414 | + calculateDay: "", // 航班日期//+1 -1 |
| 404 | - fltRoute: "", | 415 | + flightRoute: "", // 航线 |
| 405 | - routeList: [], | 416 | + routeList: [], // 航线列表 |
| 406 | - isOn: "0" ? false : true, | 417 | + permitOverweight: "N" ? false : true, // 爆仓是否继续配舱 Y-是,N-否 |
| 407 | - sort: "0", // 排序字段 | 418 | + priority: this.id, // 优先等级 |
| 419 | + ruleId: "", // 维度ID | ||
| 408 | }, | 420 | }, |
| 409 | ]; | 421 | ]; |
| 410 | - this.getAllDictData(); | 422 | + this.getAllDictData(); // 获取全部字典 |
| 411 | - this.getEdit(); | 423 | + if(this.$route.params.name == "view" || this.$route.params.name == "edit"){ |
| 412 | - this.PostFindDestinationFltRuleByFlightNo(); | 424 | + this.queryFindEtesRuleById(this.$route.params); // ET86详情 |
| 425 | + } | ||
| 413 | }, | 426 | }, |
| 414 | mounted() {}, | 427 | mounted() {}, |
| 415 | directives: { | 428 | directives: { |
| ... | @@ -464,8 +477,40 @@ export default { | ... | @@ -464,8 +477,40 @@ export default { |
| 464 | }, | 477 | }, |
| 465 | }, | 478 | }, |
| 466 | methods: { | 479 | methods: { |
| 467 | - // 获取编辑详情数据 | 480 | + // ET86新增 |
| 468 | - getEdit() {}, | 481 | + postAdd(params) { |
| 482 | + add(params).then((res) => { | ||
| 483 | + const { code, msg } = res | ||
| 484 | + if(code == 200){ | ||
| 485 | + this.msgSuccess(msg || "创建成功!") | ||
| 486 | + }else{ | ||
| 487 | + this.msgError(msg || "创建失败!"); | ||
| 488 | + } | ||
| 489 | + }); | ||
| 490 | + }, | ||
| 491 | + // ET86详情 | ||
| 492 | + queryFindEtesRuleById({ id, status }){ | ||
| 493 | + findEtesRuleById({ id: id.toString(), status: status }).then(res=>{ | ||
| 494 | + const { code, data, msg } = res | ||
| 495 | + if(code == 200){ | ||
| 496 | + data.list.flightRankDtoList.map(item=>{ | ||
| 497 | + if(item.permitOverweight == "N"){ | ||
| 498 | + item.permitOverweight = false | ||
| 499 | + }else{ | ||
| 500 | + item.permitOverweight = true | ||
| 501 | + } | ||
| 502 | + }) | ||
| 503 | + data.list.flightRankDtoList; // ET86配舱航班顺位 | ||
| 504 | + data.list.fltRuleDto; // ET86配舱航班顺位维度 | ||
| 505 | + this.tableData = data.list.flightRankDtoList | ||
| 506 | + }else{ | ||
| 507 | + this.msgError(msg || "获取查看失败"); | ||
| 508 | + } | ||
| 509 | + console.log(res) | ||
| 510 | + }) | ||
| 511 | + }, | ||
| 512 | + // ET86编辑 | ||
| 513 | + postUpdate() {}, | ||
| 469 | // 获取所有数据字典 | 514 | // 获取所有数据字典 |
| 470 | getAllDictData() { | 515 | getAllDictData() { |
| 471 | allDictData().then((res) => { | 516 | allDictData().then((res) => { |
| ... | @@ -482,6 +527,7 @@ export default { | ... | @@ -482,6 +527,7 @@ export default { |
| 482 | // 航线查询 | 527 | // 航线查询 |
| 483 | getQueryRouteByFltNo(item) { | 528 | getQueryRouteByFltNo(item) { |
| 484 | this.tableAttr.loadingTable = true; | 529 | this.tableAttr.loadingTable = true; |
| 530 | + this.tableData[this.currentIndex].flightRoute; | ||
| 485 | queryRouteByFltNo(item).then((res) => { | 531 | queryRouteByFltNo(item).then((res) => { |
| 486 | this.tableAttr.loadingTable = false; | 532 | this.tableAttr.loadingTable = false; |
| 487 | if (res.code == 200) { | 533 | if (res.code == 200) { |
| ... | @@ -495,23 +541,16 @@ export default { | ... | @@ -495,23 +541,16 @@ export default { |
| 495 | if (isEtesRoute.length == 0) { | 541 | if (isEtesRoute.length == 0) { |
| 496 | this.msgError("该航班下的航线均为普通航线"); | 542 | this.msgError("该航班下的航线均为普通航线"); |
| 497 | } | 543 | } |
| 498 | - this.tableData[this.currentIndex].fltRoute = ""; | 544 | + this.tableData[this.currentIndex].flightRoute = ""; |
| 499 | this.tableData[this.currentIndex].routeList = isEtesRoute; | 545 | this.tableData[this.currentIndex].routeList = isEtesRoute; |
| 500 | } else { | 546 | } else { |
| 501 | this.msgError("暂无航线"); | 547 | this.msgError("暂无航线"); |
| 502 | this.tableData[this.currentIndex].routeList = []; | 548 | this.tableData[this.currentIndex].routeList = []; |
| 503 | - this.tableData[this.currentIndex].fltRoute = ""; | 549 | + this.tableData[this.currentIndex].flightRoute = ""; |
| 504 | } | 550 | } |
| 505 | } | 551 | } |
| 506 | }); | 552 | }); |
| 507 | }, | 553 | }, |
| 508 | - // 获取航班下航线维度 | ||
| 509 | - PostFindDestinationFltRuleByFlightNo() { | ||
| 510 | - let params = {}; | ||
| 511 | - findDestinationFltRuleByFlightNo(params).then((res) => { | ||
| 512 | - console.log(res); | ||
| 513 | - }); | ||
| 514 | - }, | ||
| 515 | // 航班号input 聚焦事件 | 554 | // 航班号input 聚焦事件 |
| 516 | inputFocus({ $index }) { | 555 | inputFocus({ $index }) { |
| 517 | this.currentIndex = $index; | 556 | this.currentIndex = $index; |
| ... | @@ -519,26 +558,35 @@ export default { | ... | @@ -519,26 +558,35 @@ export default { |
| 519 | // 航班号input搜索事件 | 558 | // 航班号input搜索事件 |
| 520 | inputEvent: debounce(function () { | 559 | inputEvent: debounce(function () { |
| 521 | let params = { | 560 | let params = { |
| 522 | - fltNo: this.tableData[this.currentIndex].fltNo, | 561 | + fltNo: this.tableData[this.currentIndex].flightNo, |
| 523 | }; | 562 | }; |
| 563 | + let repeat = this.tableData.filter( | ||
| 564 | + (item) => item.flightNo == this.tableData[this.currentIndex].flightNo | ||
| 565 | + ); | ||
| 566 | + if (repeat.length > 1) { | ||
| 567 | + this.msgError("航班顺位已重复"); | ||
| 568 | + return; | ||
| 569 | + } | ||
| 524 | if (params.fltNo) { | 570 | if (params.fltNo) { |
| 525 | this.getQueryRouteByFltNo(params); | 571 | this.getQueryRouteByFltNo(params); |
| 526 | } else { | 572 | } else { |
| 527 | - this.tableData[this.currentIndex].fltRoute = ""; | 573 | + this.tableData[this.currentIndex].flightRoute = ""; |
| 528 | this.tableData[this.currentIndex].routeList = []; | 574 | this.tableData[this.currentIndex].routeList = []; |
| 529 | this.msgError("请输入航班号"); | 575 | this.msgError("请输入航班号"); |
| 530 | } | 576 | } |
| 531 | }, 1000), | 577 | }, 1000), |
| 532 | // 添加ET86配舱航班顺位 | 578 | // 添加ET86配舱航班顺位 |
| 533 | addBtn(item) { | 579 | addBtn(item) { |
| 580 | + this.id++; | ||
| 534 | this.tableData.unshift({ | 581 | this.tableData.unshift({ |
| 535 | - id: this.id++, | 582 | + id: this.id, |
| 536 | - fltNo: "", | 583 | + flightNo: "", // 航班号 |
| 537 | - fltNoDate: "", | 584 | + calculateDay: "", // 航班日期//+1 -1 |
| 538 | - fltRoute: "", | 585 | + flightRoute: "", // 航线 |
| 539 | - routeList: [], | 586 | + routeList: [], // 航线列表 |
| 540 | - isOn: "0" ? false : true, | 587 | + permitOverweight: "N" ? false : true, // 爆仓是否继续配舱 Y-是,N-否 |
| 541 | - sort: "0", // 排序字段 | 588 | + priority: this.id, // 优先等级 |
| 589 | + ruleId: "", // 维度ID | ||
| 542 | }); | 590 | }); |
| 543 | }, | 591 | }, |
| 544 | // 是否爆仓 | 592 | // 是否爆仓 |
| ... | @@ -559,18 +607,55 @@ export default { | ... | @@ -559,18 +607,55 @@ export default { |
| 559 | arr.some((val) => val == item.chineseName) | 607 | arr.some((val) => val == item.chineseName) |
| 560 | ); | 608 | ); |
| 561 | this.queryForm.checkboxCargoType = include; //已勾选申报类别的数据 | 609 | this.queryForm.checkboxCargoType = include; //已勾选申报类别的数据 |
| 562 | - // console.log(arr, include); | 610 | + this.queryForm.declarationCategory = arr.join(";"); |
| 563 | }, | 611 | }, |
| 564 | // 表单提交 | 612 | // 表单提交 |
| 565 | submitForm(formName) { | 613 | submitForm(formName) { |
| 566 | this.$refs[formName].validate((valid) => { | 614 | this.$refs[formName].validate((valid) => { |
| 567 | if (valid) { | 615 | if (valid) { |
| 616 | + if (this.minCNYCustomVal.length != "" || this.maxCNYCustomVal.length != "") { | ||
| 617 | + this.queryForm.currencyCd = "CNY"; | ||
| 618 | + this.queryForm.minCustomVal = this.minCNYCustomVal; | ||
| 619 | + this.queryForm.maxCustomVal = this.maxCNYCustomVal; | ||
| 620 | + } else if (this.minSUDCustomVal.length != "" || this.maxSUDCustomVal.length != "") { | ||
| 621 | + this.queryForm.currencyCd = "USD"; | ||
| 622 | + this.queryForm.minCustomVal = this.minSUDCustomVal; | ||
| 623 | + this.queryForm.maxCustomVal = this.maxSUDCustomVal; | ||
| 624 | + } else { | ||
| 625 | + this.queryForm.currencyCd = "CNY"; | ||
| 626 | + } | ||
| 627 | + // 爆仓是否继续配舱 | ||
| 628 | + this.tableData.map((item) => { | ||
| 629 | + if (item.permitOverweight == false) { | ||
| 630 | + item.permitOverweight = "Y"; | ||
| 631 | + } else { | ||
| 632 | + item.permitOverweight = "N"; | ||
| 633 | + } | ||
| 634 | + }); | ||
| 635 | + let fltNo = this.tableData.some((item) => item.flightNo == ""); | ||
| 636 | + let fltNoRoute = this.tableData.some( | ||
| 637 | + (item) => item.flightRoute == "" | ||
| 638 | + ); | ||
| 639 | + if (fltNo) { | ||
| 640 | + this.msgError("航班号不可为空"); | ||
| 641 | + return; | ||
| 642 | + } | ||
| 643 | + if (fltNoRoute) { | ||
| 644 | + this.msgError("航线不可为空"); | ||
| 645 | + return; | ||
| 646 | + } | ||
| 647 | + if (this.queryForm.originOfFlightNo.length == 0) { | ||
| 648 | + this.msgError("原航班号不可为空"); | ||
| 649 | + return; | ||
| 650 | + } | ||
| 651 | + this.queryForm.includeServiceType = this.isServiceCode == "1" && this.serviceCode.length >0 ? this.serviceCode : ""; // 包含服务种类 | ||
| 652 | + this.queryForm.notIncludeServiceType = this.isServiceCode == "2" && this.serviceCode.length >0 ? this.serviceCode : ""; // 不包含服务种类 | ||
| 568 | let parmas = { | 653 | let parmas = { |
| 569 | - fltInfoList: this.tableData, | 654 | + flightRankDtoList: this.tableData, // ET86配舱航班顺位 |
| 570 | - ...this.queryForm, | 655 | + fltRuleDto: this.queryForm |
| 571 | }; | 656 | }; |
| 572 | - parmas.singleName = this.queryForm.singleName ? "Y" : "N"; // N为单品名,Y为多品名 | 657 | + parmas.fltRuleDto.multiHs = multiHs ? "Y" : "N"; // N为单品名,Y为多品名 |
| 573 | - console.log(parmas); | 658 | + this.postAdd(parmas); |
| 574 | } else { | 659 | } else { |
| 575 | console.log("error submit!!"); | 660 | console.log("error submit!!"); |
| 576 | return false; | 661 | return false; | ... | ... |
| ... | @@ -10,7 +10,7 @@ export default { | ... | @@ -10,7 +10,7 @@ export default { |
| 10 | }, | 10 | }, |
| 11 | // 处理serviceCode包不包含 | 11 | // 处理serviceCode包不包含 |
| 12 | serviceCodeCofig() { | 12 | serviceCodeCofig() { |
| 13 | - let str = this.queryForm.serviceCode.replace(/;|;/g, ","); | 13 | + let str = this.serviceCode.replace(/;|;/g, ","); |
| 14 | let arr = str.split(","); | 14 | let arr = str.split(","); |
| 15 | if (arr[arr.length - 1] == "") { | 15 | if (arr[arr.length - 1] == "") { |
| 16 | arr.splice(arr.length - 1, 1); | 16 | arr.splice(arr.length - 1, 1); |
| ... | @@ -44,7 +44,7 @@ export default { | ... | @@ -44,7 +44,7 @@ export default { |
| 44 | }, | 44 | }, |
| 45 | // serviceCode失焦事件 | 45 | // serviceCode失焦事件 |
| 46 | serviceCodeBlur() { | 46 | serviceCodeBlur() { |
| 47 | - if (this.queryForm.isServiceCode == "1") { | 47 | + if (this.isServiceCode == "1") { |
| 48 | if (this.serviceCodeCofig().noInclude.length) { | 48 | if (this.serviceCodeCofig().noInclude.length) { |
| 49 | let tip = this.serviceCodeCofig().noInclude.toString(); | 49 | let tip = this.serviceCodeCofig().noInclude.toString(); |
| 50 | this.msgError(`${tip} 不包含`); | 50 | this.msgError(`${tip} 不包含`); | ... | ... |
| ... | @@ -22,32 +22,32 @@ export const tableAttr = { | ... | @@ -22,32 +22,32 @@ export const tableAttr = { |
| 22 | export const columnHeader = (deleteRow) => [ | 22 | export const columnHeader = (deleteRow) => [ |
| 23 | { | 23 | { |
| 24 | label: "航班号", | 24 | label: "航班号", |
| 25 | - prop: "fltNo", | 25 | + prop: "flightNo", |
| 26 | align: "center", | 26 | align: "center", |
| 27 | minWidth: 100, | 27 | minWidth: 100, |
| 28 | }, | 28 | }, |
| 29 | { | 29 | { |
| 30 | label: "航班日期", | 30 | label: "航班日期", |
| 31 | - prop: "fltNoDate", | 31 | + prop: "calculateDay", |
| 32 | align: "center", | 32 | align: "center", |
| 33 | minWidth: 100, | 33 | minWidth: 100, |
| 34 | // sortable: true, | 34 | // sortable: true, |
| 35 | // "sort-method": (a, b) => b.updateTime - a.updateTime, | 35 | // "sort-method": (a, b) => b.updateTime - a.updateTime, |
| 36 | }, | 36 | }, |
| 37 | { | 37 | { |
| 38 | - label: "航线优先级", | 38 | + label: "航线", |
| 39 | - prop: "fltRoute", | 39 | + prop: "flightRoute", |
| 40 | align: "center", | 40 | align: "center", |
| 41 | minWidth: 100, | 41 | minWidth: 100, |
| 42 | }, | 42 | }, |
| 43 | { | 43 | { |
| 44 | label: "爆仓是否继续配舱", | 44 | label: "爆仓是否继续配舱", |
| 45 | - prop: "isOn", | 45 | + prop: "permitOverweight", |
| 46 | align: "center", | 46 | align: "center", |
| 47 | minWidth: 100, | 47 | minWidth: 100, |
| 48 | render: (h, params) => { | 48 | render: (h, params) => { |
| 49 | const { row } = params; | 49 | const { row } = params; |
| 50 | - console.log(345678,row); | 50 | + console.log(345678, row); |
| 51 | // return h("div", `状态-${row.id}`); | 51 | // return h("div", `状态-${row.id}`); |
| 52 | }, | 52 | }, |
| 53 | }, | 53 | }, |
| ... | @@ -80,15 +80,3 @@ export const columnHeader = (deleteRow) => [ | ... | @@ -80,15 +80,3 @@ export const columnHeader = (deleteRow) => [ |
| 80 | }, | 80 | }, |
| 81 | }, | 81 | }, |
| 82 | ]; | 82 | ]; |
| 83 | - | ||
| 84 | -export const tableData = [ | ||
| 85 | - { | ||
| 86 | - id: "1", | ||
| 87 | - fltNo: "A380", | ||
| 88 | - fltNoDate: "3", | ||
| 89 | - fltRoute: "", | ||
| 90 | - routeList: [], | ||
| 91 | - isOn: "1", | ||
| 92 | - sort: "1", // 排序字段 | ||
| 93 | - }, | ||
| 94 | -]; | ... | ... |
| ... | @@ -6,7 +6,8 @@ export const formConfig = [ | ... | @@ -6,7 +6,8 @@ export const formConfig = [ |
| 6 | prop: "startTime", | 6 | prop: "startTime", |
| 7 | width: "140px", | 7 | width: "140px", |
| 8 | placeholder: "请选择开始时间", | 8 | placeholder: "请选择开始时间", |
| 9 | - rules: { required: true, message: "请选择开始时间", trigger: "blur" }, | 9 | + // rules: { required: true, message: "请选择开始时间", trigger: "blur" }, |
| 10 | + format: "yyyy-MM-dd", | ||
| 10 | }, | 11 | }, |
| 11 | { | 12 | { |
| 12 | label: "创建时间(到)", | 13 | label: "创建时间(到)", |
| ... | @@ -15,7 +16,8 @@ export const formConfig = [ | ... | @@ -15,7 +16,8 @@ export const formConfig = [ |
| 15 | prop: "endTime", | 16 | prop: "endTime", |
| 16 | width: "140px", | 17 | width: "140px", |
| 17 | placeholder: "请选择结束时间", | 18 | placeholder: "请选择结束时间", |
| 18 | - rules: { required: true, message: "请选择结束时间", trigger: "blur" }, | 19 | + // rules: { required: true, message: "请选择结束时间", trigger: "blur" }, |
| 20 | + format: "yyyy-MM-dd", | ||
| 19 | }, | 21 | }, |
| 20 | { | 22 | { |
| 21 | label: "规则状态", | 23 | label: "规则状态", |
| ... | @@ -31,7 +33,7 @@ export const formConfig = [ | ... | @@ -31,7 +33,7 @@ export const formConfig = [ |
| 31 | label: "有效", | 33 | label: "有效", |
| 32 | }, | 34 | }, |
| 33 | { | 35 | { |
| 34 | - value: "3", | 36 | + value: "0", |
| 35 | label: "无效", | 37 | label: "无效", |
| 36 | }, | 38 | }, |
| 37 | ], | 39 | ], | ... | ... |
| ... | @@ -6,8 +6,6 @@ | ... | @@ -6,8 +6,6 @@ |
| 6 | ref="ruleForm" | 6 | ref="ruleForm" |
| 7 | :formConfig="formConfig" | 7 | :formConfig="formConfig" |
| 8 | :queryForm="queryForm" | 8 | :queryForm="queryForm" |
| 9 | - @input="inputEvent" | ||
| 10 | - @keyup="keyUpEvent" | ||
| 11 | /> | 9 | /> |
| 12 | </el-col> | 10 | </el-col> |
| 13 | </el-row> | 11 | </el-row> |
| ... | @@ -30,12 +28,10 @@ | ... | @@ -30,12 +28,10 @@ |
| 30 | import YlForm from "@/components/YlForm"; | 28 | import YlForm from "@/components/YlForm"; |
| 31 | import YlTable from "@/components/YlTable"; | 29 | import YlTable from "@/components/YlTable"; |
| 32 | import { formConfig } from "./formConfig"; | 30 | import { formConfig } from "./formConfig"; |
| 33 | -import { debounce } from "@/utils"; | 31 | +import { tableAttr, columnHeader } from "./tableConfig"; |
| 34 | -import { tableAttr, columnHeader, tableData } from "./tableConfig"; | ||
| 35 | import { | 32 | import { |
| 36 | - allDictData, // 获取全部字典 | 33 | + findAllEtesRules, // ET86查询 |
| 37 | - queryRouteByFltNo, // 航线查询 | 34 | +} from "@/api/et86"; |
| 38 | -} from "@/api/destinationFlight"; | ||
| 39 | export default { | 35 | export default { |
| 40 | components: { | 36 | components: { |
| 41 | YlForm, | 37 | YlForm, |
| ... | @@ -44,14 +40,12 @@ export default { | ... | @@ -44,14 +40,12 @@ export default { |
| 44 | data() { | 40 | data() { |
| 45 | return { | 41 | return { |
| 46 | formConfig: formConfig, // 表单配置项 | 42 | formConfig: formConfig, // 表单配置项 |
| 47 | - queryForm: { | 43 | + queryForm: { // 表单参数 |
| 48 | - // 表单参数 | ||
| 49 | status: "有效", | 44 | status: "有效", |
| 50 | }, | 45 | }, |
| 51 | - pageConfig: { | 46 | + pageConfig: { // 分页配置项 |
| 52 | - // 分页配置项 | ||
| 53 | isPagination: true, | 47 | isPagination: true, |
| 54 | - total: 13, | 48 | + total: 0, |
| 55 | pageData: { | 49 | pageData: { |
| 56 | page: 1, | 50 | page: 1, |
| 57 | size: 10, | 51 | size: 10, |
| ... | @@ -59,71 +53,63 @@ export default { | ... | @@ -59,71 +53,63 @@ export default { |
| 59 | }, | 53 | }, |
| 60 | tableAttr: tableAttr, // table配置项 | 54 | tableAttr: tableAttr, // table配置项 |
| 61 | columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头 | 55 | columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头 |
| 62 | - tableData: tableData, // 表格数据 | 56 | + tableData: [], // 表格数据 |
| 63 | selectionList: [], // table复选框筛选集合 | 57 | selectionList: [], // table复选框筛选集合 |
| 64 | }; | 58 | }; |
| 65 | }, | 59 | }, |
| 66 | - created() {}, | 60 | + created() { |
| 61 | + // ET86查询 | ||
| 62 | + this.$nextTick(() => { | ||
| 63 | + this.searchBtn(); | ||
| 64 | + }); | ||
| 65 | + }, | ||
| 67 | mounted() {}, | 66 | mounted() {}, |
| 68 | methods: { | 67 | methods: { |
| 69 | - // 航线查询 | 68 | + // ET86查询 |
| 70 | - queryRoute(item) { | 69 | + queryFindAllEtesRules(params) { |
| 71 | - queryRouteByFltNo(item).then((res) => { | 70 | + this.tableAttr.loadingTable = true; |
| 72 | - if (res.code == 200) { | 71 | + findAllEtesRules(params) |
| 73 | - const list = res.data.list; | 72 | + .then((res) => { |
| 74 | - let routeList = ""; | 73 | + this.tableAttr.loadingTable = false; |
| 75 | - if (list.length) { | 74 | + const { code, data } = res; |
| 76 | - list.map((item) => { | 75 | + if (code == 200) { |
| 77 | - routeList += item.route + ","; | 76 | + this.tableData = data.list; |
| 78 | - }); | 77 | + this.pageConfig.total = data.total; |
| 79 | - this.queryForm.fltRoute = routeList.substring( | ||
| 80 | - 0, | ||
| 81 | - routeList.length - 1 | ||
| 82 | - ); | ||
| 83 | - } else { | ||
| 84 | - this.queryForm = { | ||
| 85 | - fltNo: item.fltNo, // 航班号 | ||
| 86 | - }; | ||
| 87 | } | 78 | } |
| 88 | - } | 79 | + }) |
| 89 | - }); | 80 | + .catch(() => {}); |
| 90 | - }, | ||
| 91 | - // input事件 | ||
| 92 | - inputEvent: debounce(function () { | ||
| 93 | - this.queryRoute({ | ||
| 94 | - fltNo: this.queryForm.fltNo, // 航班号 | ||
| 95 | - }); | ||
| 96 | - }, 800), | ||
| 97 | - // 回车事件 | ||
| 98 | - keyUpEvent(item) { | ||
| 99 | - this.queryRoute(item); | ||
| 100 | }, | 81 | }, |
| 101 | // table复选框事件 | 82 | // table复选框事件 |
| 102 | selectionTable(e) { | 83 | selectionTable(e) { |
| 103 | - console.log("selectionTable:", e); | ||
| 104 | this.selectionList = e; | 84 | this.selectionList = e; |
| 105 | }, | 85 | }, |
| 106 | //条数变化 | 86 | //条数变化 |
| 107 | handleSizeChange(e) { | 87 | handleSizeChange(e) { |
| 108 | this.pageConfig.pageData.size = e; | 88 | this.pageConfig.pageData.size = e; |
| 109 | this.pageConfig.pageData.page = 1; | 89 | this.pageConfig.pageData.page = 1; |
| 110 | - console.log("sizeChange:", e); | 90 | + this.searchBtn(); |
| 111 | }, | 91 | }, |
| 112 | //页码变化 | 92 | //页码变化 |
| 113 | handleCurrentChange(e) { | 93 | handleCurrentChange(e) { |
| 114 | this.pageConfig.pageData.page = e; | 94 | this.pageConfig.pageData.page = e; |
| 115 | - console.log("currentChange:", e); | 95 | + this.searchBtn(); |
| 116 | }, | 96 | }, |
| 117 | // 搜索 | 97 | // 搜索 |
| 118 | searchBtn(row) { | 98 | searchBtn(row) { |
| 119 | let params = { | 99 | let params = { |
| 120 | - ...this.queryForm, | 100 | + createTimeStart: this.queryForm.startTime |
| 101 | + ? this.queryForm.startTime | ||
| 102 | + : "", | ||
| 103 | + createTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "", | ||
| 104 | + limitStart: this.pageConfig.pageData.page, | ||
| 105 | + limitSize: this.pageConfig.pageData.size, | ||
| 106 | + status: this.queryForm.status, | ||
| 121 | }; | 107 | }; |
| 122 | if (this.queryForm.status == "有效") { | 108 | if (this.queryForm.status == "有效") { |
| 123 | - params.status = '1'; | 109 | + params.status = "1"; |
| 124 | } | 110 | } |
| 125 | this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | 111 | this.$refs.ruleForm.handleSearch("ruleForm", (val) => { |
| 126 | - console.log(params); | 112 | + this.queryFindAllEtesRules(params); |
| 127 | }); | 113 | }); |
| 128 | }, | 114 | }, |
| 129 | // 重置表单 | 115 | // 重置表单 |
| ... | @@ -136,43 +122,43 @@ export default { | ... | @@ -136,43 +122,43 @@ export default { |
| 136 | this.$router.push({ | 122 | this.$router.push({ |
| 137 | name: "edit", | 123 | name: "edit", |
| 138 | params: { | 124 | params: { |
| 139 | - edit: 12, | 125 | + name: "add", |
| 126 | + }, | ||
| 127 | + }); | ||
| 128 | + }, | ||
| 129 | + // 查看 | ||
| 130 | + viewRow({ row }) { | ||
| 131 | + this.$router.push({ | ||
| 132 | + name: "edit", | ||
| 133 | + params: { | ||
| 134 | + name: "view", | ||
| 135 | + id: row.id, | ||
| 136 | + status: row.status | ||
| 140 | }, | 137 | }, |
| 141 | }); | 138 | }); |
| 139 | + console.log("查看:", row); | ||
| 142 | }, | 140 | }, |
| 143 | // 编辑 | 141 | // 编辑 |
| 144 | - editRow(item) { | 142 | + editRow({ row }) { |
| 145 | this.$router.push({ | 143 | this.$router.push({ |
| 146 | name: "edit", | 144 | name: "edit", |
| 147 | params: { | 145 | params: { |
| 148 | - edit: 12, | 146 | + name: "edit", |
| 147 | + id: row.id, | ||
| 149 | }, | 148 | }, |
| 150 | }); | 149 | }); |
| 151 | - console.log("修改:", item); | ||
| 152 | }, | 150 | }, |
| 153 | // 删除 | 151 | // 删除 |
| 154 | - deleteRow(item) { | 152 | + deleteRow({ row }) { |
| 155 | this.$confirm("是否确认删除?", "提示", { | 153 | this.$confirm("是否确认删除?", "提示", { |
| 156 | confirmButtonText: "确定", | 154 | confirmButtonText: "确定", |
| 157 | cancelButtonText: "取消", | 155 | cancelButtonText: "取消", |
| 158 | type: "warning", | 156 | type: "warning", |
| 159 | center: true, | 157 | center: true, |
| 160 | - }) | 158 | + }).then(() => { |
| 161 | - .then(() => { | 159 | + console.log("删除:", row); |
| 162 | - console.log("删除:", item); | ||
| 163 | this.msgSuccess("删除成功!"); | 160 | this.msgSuccess("删除成功!"); |
| 164 | - }) | 161 | + }).catch(() => {}); |
| 165 | - .catch(() => {}); | ||
| 166 | - }, | ||
| 167 | - // 查看 | ||
| 168 | - viewRow({ row }) { | ||
| 169 | - this.$router.push({ | ||
| 170 | - name: "edit", | ||
| 171 | - params: { | ||
| 172 | - edit: 12, | ||
| 173 | - }, | ||
| 174 | - }); | ||
| 175 | - console.log("查看:", row); | ||
| 176 | }, | 162 | }, |
| 177 | }, | 163 | }, |
| 178 | }; | 164 | }; | ... | ... |
| 1 | const state = { | 1 | const state = { |
| 2 | 1: "有效", | 2 | 1: "有效", |
| 3 | - 3: "无效", | 3 | + 0: "无效", |
| 4 | }; | 4 | }; |
| 5 | export const tableAttr = { | 5 | export const tableAttr = { |
| 6 | border: true, | 6 | border: true, |
| ... | @@ -56,13 +56,13 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ | ... | @@ -56,13 +56,13 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ |
| 56 | }, | 56 | }, |
| 57 | { | 57 | { |
| 58 | label: "原航班号", | 58 | label: "原航班号", |
| 59 | - prop: "fltNo", | 59 | + prop: "originOfFlightNo", |
| 60 | align: "center", | 60 | align: "center", |
| 61 | minWidth: 100, | 61 | minWidth: 100, |
| 62 | }, | 62 | }, |
| 63 | { | 63 | { |
| 64 | label: "顺位航班", | 64 | label: "顺位航班", |
| 65 | - prop: "flightRand", | 65 | + prop: "rankFltNoStr", |
| 66 | align: "center", | 66 | align: "center", |
| 67 | minWidth: 100, | 67 | minWidth: 100, |
| 68 | }, | 68 | }, |
| ... | @@ -177,114 +177,3 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ | ... | @@ -177,114 +177,3 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ |
| 177 | }, | 177 | }, |
| 178 | }, | 178 | }, |
| 179 | ]; | 179 | ]; |
| 180 | - | ||
| 181 | -export const tableData = [ | ||
| 182 | - { | ||
| 183 | - id: "1", | ||
| 184 | - flightRand: "LZ003;LZ00", | ||
| 185 | - status: "1", | ||
| 186 | - fltNo: "FX0090", | ||
| 187 | - includeUrsa: "URSACODE191", | ||
| 188 | - notIncludeUrsa: "P_3", | ||
| 189 | - createTime: "2023-08-14", | ||
| 190 | - createUserName: "wjh", | ||
| 191 | - updateTime: "2023-08-14", | ||
| 192 | - updateUserName: "wjh", | ||
| 193 | - }, | ||
| 194 | - { | ||
| 195 | - id: "2", | ||
| 196 | - flightRand: "LP001;LP004+1", | ||
| 197 | - status: "3", | ||
| 198 | - fltNo: "FX0090", | ||
| 199 | - includeUrsa: "P_;URSACODE105", | ||
| 200 | - notIncludeUrsa: "P_21", | ||
| 201 | - createTime: "2023-08-14", | ||
| 202 | - createUserName: "wjh", | ||
| 203 | - updateTime: "2023-08-14", | ||
| 204 | - updateUserName: "wjh", | ||
| 205 | - }, | ||
| 206 | - { | ||
| 207 | - id: "3", | ||
| 208 | - flightRand: "CQ00;LZ003;CS0004", | ||
| 209 | - status: "1", | ||
| 210 | - fltNo: "CS0002", | ||
| 211 | - includeUrsa: "URSACODE12", | ||
| 212 | - notIncludeUrsa: "P_2", | ||
| 213 | - createTime: "2023-08-14", | ||
| 214 | - createUserName: "wjh", | ||
| 215 | - updateTime: "2023-08-14", | ||
| 216 | - updateUserName: "wjh", | ||
| 217 | - }, | ||
| 218 | - { | ||
| 219 | - id: "4", | ||
| 220 | - flightRand: "LZ001;LZ002;LZ004", | ||
| 221 | - status: "1", | ||
| 222 | - fltNo: "FX0090", | ||
| 223 | - includeUrsa: "URSACODE192", | ||
| 224 | - notIncludeUrsa: "P_17", | ||
| 225 | - createTime: "2023-08-11", | ||
| 226 | - createUserName: "wjh", | ||
| 227 | - updateTime: "2023-08-11", | ||
| 228 | - updateUserName: "wjh", | ||
| 229 | - }, | ||
| 230 | - { | ||
| 231 | - id: "5", | ||
| 232 | - flightRand: "PS001;PS003", | ||
| 233 | - status: "1", | ||
| 234 | - fltNo: "FX0091", | ||
| 235 | - includeUrsa: "URSACODE10", | ||
| 236 | - notIncludeUrsa: "P_28", | ||
| 237 | - createTime: "2023-08-11", | ||
| 238 | - createUserName: "wjh", | ||
| 239 | - updateTime: "2023-08-11", | ||
| 240 | - updateUserName: "wjh", | ||
| 241 | - }, | ||
| 242 | - { | ||
| 243 | - id: "6", | ||
| 244 | - flightRand: "PS002;PS003", | ||
| 245 | - status: "3", | ||
| 246 | - fltNo: "XN007", | ||
| 247 | - includeUrsa: "URSACODE27", | ||
| 248 | - notIncludeUrsa: "P_4", | ||
| 249 | - createTime: "2023-08-11", | ||
| 250 | - createUserName: "wjh", | ||
| 251 | - updateTime: "2023-08-11", | ||
| 252 | - updateUserName: "wjh", | ||
| 253 | - }, | ||
| 254 | - { | ||
| 255 | - id: "7", | ||
| 256 | - flightRand: "XN001;XN002;XN003;XN004", | ||
| 257 | - status: "1", | ||
| 258 | - fltNo: "XN001", | ||
| 259 | - includeUrsa: "URSACODE34", | ||
| 260 | - notIncludeUrsa: "P_7", | ||
| 261 | - createTime: "2023-08-10", | ||
| 262 | - createUserName: "wjh", | ||
| 263 | - updateTime: "2023-08-10", | ||
| 264 | - updateUserName: "wjh", | ||
| 265 | - }, | ||
| 266 | - { | ||
| 267 | - id: "8", | ||
| 268 | - flightRand: "HA004", | ||
| 269 | - status: "3", | ||
| 270 | - fltNo: "LZ007", | ||
| 271 | - includeUrsa: "URSACODE71", | ||
| 272 | - notIncludeUrsa: "P_2", | ||
| 273 | - createTime: "2023-08-10", | ||
| 274 | - createUserName: "wjh", | ||
| 275 | - updateTime: "2023-08-10", | ||
| 276 | - updateUserName: "wjh", | ||
| 277 | - }, | ||
| 278 | - { | ||
| 279 | - id: "9", | ||
| 280 | - flightRand: "AB0001;AB123", | ||
| 281 | - status: "1", | ||
| 282 | - fltNo: "AB0001", | ||
| 283 | - includeUrsa: "URSACODE87", | ||
| 284 | - notIncludeUrsa: "P_26", | ||
| 285 | - createTime: "2023-08-10", | ||
| 286 | - createUserName: "wjh", | ||
| 287 | - updateTime: "2023-08-10", | ||
| 288 | - updateUserName: "wjh", | ||
| 289 | - }, | ||
| 290 | -]; | ... | ... |
| ... | @@ -388,17 +388,7 @@ export default { | ... | @@ -388,17 +388,7 @@ export default { |
| 388 | cancelButtonText: "取消", | 388 | cancelButtonText: "取消", |
| 389 | type: "warning", | 389 | type: "warning", |
| 390 | }).then(() => { | 390 | }).then(() => { |
| 391 | - this.msgWarning('待联调!') | 391 | + this.routeDel({ data: [val], id: [val.id] }) |
| 392 | - // delDict(val).then(res => { | ||
| 393 | - // if (res.code === 200) { | ||
| 394 | - // this.msgSuccess(res.msg) | ||
| 395 | - // } else { | ||
| 396 | - // this.msgWarning(res.msg) | ||
| 397 | - // } | ||
| 398 | - // this.tableSelect() // 回调查询 | ||
| 399 | - // }).catch(err => { | ||
| 400 | - // console.log(err) | ||
| 401 | - // }) | ||
| 402 | }).catch(() => { }) | 392 | }).catch(() => { }) |
| 403 | } | 393 | } |
| 404 | } else { | 394 | } else { | ... | ... |
-
Please register or login to post a comment