Showing
4 changed files
with
49 additions
and
2 deletions
| ... | @@ -72,3 +72,17 @@ export function updateAutoPushBatch(data) { | ... | @@ -72,3 +72,17 @@ export function updateAutoPushBatch(data) { |
| 72 | data: data | 72 | data: data |
| 73 | }) | 73 | }) |
| 74 | } | 74 | } |
| 75 | + | ||
| 76 | +//白名单自动配舱开关 | ||
| 77 | +/** | ||
| 78 | + * @param updateIds idList * | ||
| 79 | + * @param status 状态 * 1开 0关 | ||
| 80 | + */ | ||
| 81 | +export function updateWhiteListSwitchBatch(data) { | ||
| 82 | + return request({ | ||
| 83 | + url: '/FlightPreserveController/updateWhiteListSwitchBatch', | ||
| 84 | + method: 'post', | ||
| 85 | + data: data | ||
| 86 | + }) | ||
| 87 | +} | ||
| 88 | + | ... | ... |
| ... | @@ -521,6 +521,12 @@ let tableHeaders = { | ... | @@ -521,6 +521,12 @@ let tableHeaders = { |
| 521 | status: 1 | 521 | status: 1 |
| 522 | }, | 522 | }, |
| 523 | { | 523 | { |
| 524 | + columnChineseName: "白名单是否自动配舱", | ||
| 525 | + columnName: "whiteListSwitch", | ||
| 526 | + columnWidth: "160", | ||
| 527 | + status: 1 | ||
| 528 | + }, | ||
| 529 | + { | ||
| 524 | columnChineseName: "总重量", | 530 | columnChineseName: "总重量", |
| 525 | columnName: "totalWeight", | 531 | columnName: "totalWeight", |
| 526 | columnWidth: "90", | 532 | columnWidth: "90", | ... | ... |
| ... | @@ -79,7 +79,7 @@ service.interceptors.response.use(res => { | ... | @@ -79,7 +79,7 @@ service.interceptors.response.use(res => { |
| 79 | type: 'error' | 79 | type: 'error' |
| 80 | }) | 80 | }) |
| 81 | return Promise.reject(new Error(msg)) | 81 | return Promise.reject(new Error(msg)) |
| 82 | - } else if (code !== 200 && code !== 201 && code !== 202) { | 82 | + } else if (code !== 200 && code !== 201 && code !== 202 && code != 203) { |
| 83 | Message({ | 83 | Message({ |
| 84 | message: msg, | 84 | message: msg, |
| 85 | type: 'error' | 85 | type: 'error' | ... | ... |
| ... | @@ -60,6 +60,12 @@ | ... | @@ -60,6 +60,12 @@ |
| 60 | @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> | 60 | @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> |
| 61 | <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" | 61 | <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" |
| 62 | @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> | 62 | @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> |
| 63 | + <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" | ||
| 64 | + @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启 | ||
| 65 | + </el-button> | ||
| 66 | + <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" | ||
| 67 | + @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭 | ||
| 68 | + </el-button> | ||
| 63 | <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete" | 69 | <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete" |
| 64 | v-hasPermi="['base:flightInfo:delete']">删除 | 70 | v-hasPermi="['base:flightInfo:delete']">删除 |
| 65 | </el-button> | 71 | </el-button> |
| ... | @@ -278,6 +284,7 @@ import { | ... | @@ -278,6 +284,7 @@ import { |
| 278 | findFltCommonConf, | 284 | findFltCommonConf, |
| 279 | updateStatusBatch, | 285 | updateStatusBatch, |
| 280 | updateAutoPushBatch, | 286 | updateAutoPushBatch, |
| 287 | + updateWhiteListSwitchBatch | ||
| 281 | } from "@/api/findAllFltData"; | 288 | } from "@/api/findAllFltData"; |
| 282 | import { getpreAudit } from '@/api/system/preReview.js' | 289 | import { getpreAudit } from '@/api/system/preReview.js' |
| 283 | import { queryRouteByFltNo } from '@/api/destinationFlight.js' | 290 | import { queryRouteByFltNo } from '@/api/destinationFlight.js' |
| ... | @@ -775,9 +782,9 @@ export default { | ... | @@ -775,9 +782,9 @@ export default { |
| 775 | // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; | 782 | // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; |
| 776 | //是否预审 | 783 | //是否预审 |
| 777 | // this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; | 784 | // this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; |
| 778 | - this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true | ||
| 779 | // 计算高低价可配 | 785 | // 计算高低价可配 |
| 780 | // this.LowHighAvailable(); | 786 | // this.LowHighAvailable(); |
| 787 | + this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true | ||
| 781 | } else { | 788 | } else { |
| 782 | this.msgError(response.msg); | 789 | this.msgError(response.msg); |
| 783 | } | 790 | } |
| ... | @@ -974,6 +981,26 @@ export default { | ... | @@ -974,6 +981,26 @@ export default { |
| 974 | this.findAllFltData(); | 981 | this.findAllFltData(); |
| 975 | } | 982 | } |
| 976 | }, | 983 | }, |
| 984 | + //白名单配舱开关 | ||
| 985 | + whiteListSwitchStatus(val) { | ||
| 986 | + let obj = { | ||
| 987 | + updateIds: [] | ||
| 988 | + } | ||
| 989 | + obj.status = val | ||
| 990 | + this.ids.forEach(item => { | ||
| 991 | + obj.updateIds.push(item.id) | ||
| 992 | + }) | ||
| 993 | + updateWhiteListSwitchBatch(obj).then(res => { | ||
| 994 | + if (res.code === 200) { | ||
| 995 | + this.msgSuccess(res.msg) | ||
| 996 | + this.findAllFltData() | ||
| 997 | + } else { | ||
| 998 | + this.msgWarning(res.msg) | ||
| 999 | + } | ||
| 1000 | + }).catch(err => { | ||
| 1001 | + console.log(err) | ||
| 1002 | + }) | ||
| 1003 | + }, | ||
| 977 | //航线修改 | 1004 | //航线修改 |
| 978 | routeChange(val) { | 1005 | routeChange(val) { |
| 979 | this.$forceUpdate() | 1006 | this.$forceUpdate() | ... | ... |
-
Please register or login to post a comment