Showing
15 changed files
with
414 additions
and
43 deletions
| ... | @@ -106,3 +106,17 @@ export function getFlightsRoutes(data) { | ... | @@ -106,3 +106,17 @@ export function getFlightsRoutes(data) { |
| 106 | data: data | 106 | data: data |
| 107 | }) | 107 | }) |
| 108 | } | 108 | } |
| 109 | + | ||
| 110 | +//航班迁转 | ||
| 111 | +/** | ||
| 112 | + * @param ids * 货物id list | ||
| 113 | + * @param flightId * 航班id | ||
| 114 | + * @param route * 航线 | ||
| 115 | + */ | ||
| 116 | +export function batchMoveCargoToOtherFlight(data) { | ||
| 117 | + return request({ | ||
| 118 | + url: '/cargo/batchMoveCargoToOtherFlight', | ||
| 119 | + method: 'post', | ||
| 120 | + data: data | ||
| 121 | + }) | ||
| 122 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -10,19 +10,19 @@ export function filghtKindData() { | ... | @@ -10,19 +10,19 @@ export function filghtKindData() { |
| 10 | 10 | ||
| 11 | export function downLoadTemplate(template) { | 11 | export function downLoadTemplate(template) { |
| 12 | return request({ | 12 | return request({ |
| 13 | - url:'/flightInfoImport/downLoadTemplate?template=' + template, | 13 | + url: '/flightInfoImport/downLoadTemplate?template=' + template, |
| 14 | - method:'get', | 14 | + method: 'get', |
| 15 | - responseType:'blob', | 15 | + responseType: 'blob', |
| 16 | }) | 16 | }) |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | -export function importFlight(file, type){ | 19 | +export function importFlight(file, type) { |
| 20 | let formData = new FormData(); | 20 | let formData = new FormData(); |
| 21 | formData.append("file", file); | 21 | formData.append("file", file); |
| 22 | formData.append("type", type); | 22 | formData.append("type", type); |
| 23 | return request({ | 23 | return request({ |
| 24 | - url:'/flightInfoImport/importFlight', | 24 | + url: '/flightInfoImport/importFlight', |
| 25 | - method:'post', | 25 | + method: 'post', |
| 26 | - data:formData | 26 | + data: formData |
| 27 | }) | 27 | }) |
| 28 | } | 28 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -50,3 +50,13 @@ export function searchGoods(data) { | ... | @@ -50,3 +50,13 @@ export function searchGoods(data) { |
| 50 | data: data | 50 | data: data |
| 51 | }) | 51 | }) |
| 52 | } | 52 | } |
| 53 | + | ||
| 54 | +//查询货站 | ||
| 55 | +/** | ||
| 56 | + */ | ||
| 57 | +export function findStationName() { | ||
| 58 | + return request({ | ||
| 59 | + url: '/goods/findStationName', | ||
| 60 | + method: 'post', | ||
| 61 | + }) | ||
| 62 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -81,8 +81,7 @@ export default { | ... | @@ -81,8 +81,7 @@ export default { |
| 81 | <style lang="scss" scoped> | 81 | <style lang="scss" scoped> |
| 82 | .container { | 82 | .container { |
| 83 | max-width: 350px; | 83 | max-width: 350px; |
| 84 | - min-height: 32px; | 84 | + height: 150px; |
| 85 | - max-height: 150px; | ||
| 86 | overflow-y: scroll; | 85 | overflow-y: scroll; |
| 87 | padding: 0; | 86 | padding: 0; |
| 88 | border: 1px solid #ccc; | 87 | border: 1px solid #ccc; | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form ref="flightAllocForm" :inline="true" :model="queryParams" class="form-header" size="medium" | 3 | + <el-form ref="flightAllocForm" :model="queryParams" class="form-header" size="medium" label-position="right" |
| 4 | - label-position="right" label-width="auto" @submit.native.prevent> | 4 | + label-width="auto" @submit.native.prevent> |
| 5 | + <el-row> | ||
| 6 | + <el-col :span="6"> | ||
| 5 | <el-form-item label="航班号"> | 7 | <el-form-item label="航班号"> |
| 6 | - <el-input v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"></el-input> | 8 | + <el-input class="formItem" v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"> |
| 9 | + </el-input> | ||
| 7 | </el-form-item> | 10 | </el-form-item> |
| 11 | + </el-col> | ||
| 12 | + <el-col :span="6"> | ||
| 8 | <el-form-item label="航班日期"> | 13 | <el-form-item label="航班日期"> |
| 9 | <el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期" | 14 | <el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期" |
| 10 | - value-format="yyyy-MM-dd" clearable> | 15 | + value-format="yyyy-MM-dd" clearable :disabled="queryParams.querySpecifyData =='2'"> |
| 11 | </el-date-picker> | 16 | </el-date-picker> |
| 12 | </el-form-item> | 17 | </el-form-item> |
| 18 | + </el-col> | ||
| 19 | + <el-col :span="3"> | ||
| 13 | <el-form-item label="状态"> | 20 | <el-form-item label="状态"> |
| 14 | - <el-select v-model="queryParams.status" placeholder="状态"> | 21 | + <el-select class="formItem" v-model="queryParams.status" placeholder="状态"> |
| 15 | <el-option label="有效" value="1"></el-option> | 22 | <el-option label="有效" value="1"></el-option> |
| 16 | <el-option label="停用" value="3"></el-option> | 23 | <el-option label="停用" value="3"></el-option> |
| 17 | </el-select> | 24 | </el-select> |
| 18 | </el-form-item> | 25 | </el-form-item> |
| 19 | - <el-form-item> | 26 | + </el-col> |
| 20 | - <el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button> | 27 | + </el-row> |
| 21 | - </el-form-item> | ||
| 22 | <div> | 28 | <div> |
| 29 | + <el-form-item label="日期查询"> | ||
| 30 | + <el-switch v-model="queryParams.querySpecifyData" active-value="1" inactive-value="2" active-color="#13ce66" | ||
| 31 | + inactive-color="#909399" @change="switchChange"> | ||
| 32 | + </el-switch> | ||
| 33 | + </el-form-item> | ||
| 34 | + <el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button> | ||
| 23 | <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']" | 35 | <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']" |
| 24 | @click=" | 36 | @click=" |
| 25 | $router.push({ | 37 | $router.push({ |
| ... | @@ -78,6 +90,7 @@ export default { | ... | @@ -78,6 +90,7 @@ export default { |
| 78 | queryParams: { | 90 | queryParams: { |
| 79 | purposeOfFlightNo: null, | 91 | purposeOfFlightNo: null, |
| 80 | flightDate: undefined, | 92 | flightDate: undefined, |
| 93 | + querySpecifyData: '2', | ||
| 81 | status: "1", | 94 | status: "1", |
| 82 | start: 0, | 95 | start: 0, |
| 83 | limit: 20, | 96 | limit: 20, |
| ... | @@ -149,6 +162,12 @@ export default { | ... | @@ -149,6 +162,12 @@ export default { |
| 149 | } | 162 | } |
| 150 | this.open = true | 163 | this.open = true |
| 151 | }, | 164 | }, |
| 165 | + //开关改变 | ||
| 166 | + switchChange(val) { | ||
| 167 | + if (val == '2') { | ||
| 168 | + this.queryParams.flightDate = undefined | ||
| 169 | + } | ||
| 170 | + }, | ||
| 152 | close() { | 171 | close() { |
| 153 | this.open = false | 172 | this.open = false |
| 154 | }, | 173 | }, | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div style="padding:20px;min-height: 300px;"> | 2 | <div style="padding:20px;min-height: 300px;"> |
| 3 | - <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button> | 3 | + <!-- <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button> --> |
| 4 | <!-- 空状态 --> | 4 | <!-- 空状态 --> |
| 5 | <div v-if="isEmpty"> | 5 | <div v-if="isEmpty"> |
| 6 | <el-empty description="未查询到数据!"></el-empty> | 6 | <el-empty description="未查询到数据!"></el-empty> |
| ... | @@ -11,7 +11,8 @@ | ... | @@ -11,7 +11,8 @@ |
| 11 | <el-row class="mb20"> | 11 | <el-row class="mb20"> |
| 12 | <el-col :span="6"> | 12 | <el-col :span="6"> |
| 13 | <el-form-item label="航班号" prop="fltNo"> | 13 | <el-form-item label="航班号" prop="fltNo"> |
| 14 | - <el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled" maxlength="20"> | 14 | + <el-input v-model.trim="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled" |
| 15 | + maxlength="20"> | ||
| 15 | </el-input> | 16 | </el-input> |
| 16 | </el-form-item> | 17 | </el-form-item> |
| 17 | </el-col> | 18 | </el-col> |
| ... | @@ -858,9 +859,14 @@ export default { | ... | @@ -858,9 +859,14 @@ export default { |
| 858 | }, | 859 | }, |
| 859 | //保存 | 860 | //保存 |
| 860 | submit(val) { | 861 | submit(val) { |
| 861 | - this.loading = true | ||
| 862 | let routeArr = [] | 862 | let routeArr = [] |
| 863 | - let data = this.setDataHandle(this.infoForm.list[val]) | 863 | + let data = this.setDataHandle(JSON.parse(JSON.stringify(this.infoForm.list[val]))) |
| 864 | + if (data.minNumOfPieces > data.maxNumOfPieces) { | ||
| 865 | + this.msgWarning('件数前区间不能大于后区间') | ||
| 866 | + } else if (data.minWeight > data.maxWeight) { | ||
| 867 | + this.msgWarning('重量前区间不能大于后区间') | ||
| 868 | + } else { | ||
| 869 | + this.loading = true | ||
| 864 | this.routeList.forEach((item, idx) => { | 870 | this.routeList.forEach((item, idx) => { |
| 865 | routeArr.push(item.route) | 871 | routeArr.push(item.route) |
| 866 | }) | 872 | }) |
| ... | @@ -891,6 +897,7 @@ export default { | ... | @@ -891,6 +897,7 @@ export default { |
| 891 | }).catch(err => { | 897 | }).catch(err => { |
| 892 | console.log(err) | 898 | console.log(err) |
| 893 | }) | 899 | }) |
| 900 | + } | ||
| 894 | }, | 901 | }, |
| 895 | //删除 | 902 | //删除 |
| 896 | del(val) { | 903 | del(val) { |
| ... | @@ -948,7 +955,6 @@ export default { | ... | @@ -948,7 +955,6 @@ export default { |
| 948 | this.infoForm.list[val].serviceCode = [] | 955 | this.infoForm.list[val].serviceCode = [] |
| 949 | this.infoForm.list[val].handlingCode = [] | 956 | this.infoForm.list[val].handlingCode = [] |
| 950 | this.infoForm.list[val].subCategory = [] | 957 | this.infoForm.list[val].subCategory = [] |
| 951 | - console.log(this.infoForm) | ||
| 952 | this.$forceUpdate() | 958 | this.$forceUpdate() |
| 953 | }, | 959 | }, |
| 954 | //启用,停用 | 960 | //启用,停用 | ... | ... |
| ... | @@ -280,6 +280,7 @@ import { | ... | @@ -280,6 +280,7 @@ import { |
| 280 | updateAutoPushBatch, | 280 | updateAutoPushBatch, |
| 281 | } from "@/api/findAllFltData"; | 281 | } from "@/api/findAllFltData"; |
| 282 | import { getpreAudit } from '@/api/system/preReview.js' | 282 | import { getpreAudit } from '@/api/system/preReview.js' |
| 283 | +import { queryRouteByFltNo } from '@/api/destinationFlight.js' | ||
| 283 | 284 | ||
| 284 | export default { | 285 | export default { |
| 285 | name: "FlightInformationMaintenance", | 286 | name: "FlightInformationMaintenance", |
| ... | @@ -553,8 +554,12 @@ export default { | ... | @@ -553,8 +554,12 @@ export default { |
| 553 | } | 554 | } |
| 554 | }); | 555 | }); |
| 555 | //获取航线 | 556 | //获取航线 |
| 556 | - this.getRoute(this.form.fltNo).then(res => { | 557 | + queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => { |
| 557 | - this.routeList = res.list | 558 | + if (res.code === 200) { |
| 559 | + this.routeList = res.data.list | ||
| 560 | + } else { | ||
| 561 | + this.msgWarning(res.msg) | ||
| 562 | + } | ||
| 558 | }).catch(err => { | 563 | }).catch(err => { |
| 559 | console.log(err) | 564 | console.log(err) |
| 560 | }) | 565 | }) | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" | 3 | + <el-dialog :title="openStatus == 'add'?'新 增':'导出Excel'" :visible.sync="open" width="25%" |
| 4 | - append-to-body center> | 4 | + :close-on-click-modal="false" :show-close="false" append-to-body center> |
| 5 | <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto" | 5 | <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto" |
| 6 | label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent> | 6 | label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent> |
| 7 | + <div v-if="openStatus == 'add'"> | ||
| 7 | <el-form-item label="货站名称" prop="goodsStation"> | 8 | <el-form-item label="货站名称" prop="goodsStation"> |
| 8 | <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称"> | 9 | <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称"> |
| 9 | </el-input> | 10 | </el-input> |
| ... | @@ -13,9 +14,21 @@ | ... | @@ -13,9 +14,21 @@ |
| 13 | placeholder="请输入品名,多个用“;”隔开"> | 14 | placeholder="请输入品名,多个用“;”隔开"> |
| 14 | </el-input> | 15 | </el-input> |
| 15 | </el-form-item> | 16 | </el-form-item> |
| 17 | + </div> | ||
| 18 | + <div v-else> | ||
| 19 | + <el-form-item label="货站名称" prop="goodsStation"> | ||
| 20 | + <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable | ||
| 21 | + :loading="goodsStationLoading" placeholder="不限"> | ||
| 22 | + <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" | ||
| 23 | + :key="item"> | ||
| 24 | + </el-option> | ||
| 25 | + </el-select> | ||
| 26 | + </el-form-item> | ||
| 27 | + </div> | ||
| 16 | </el-form> | 28 | </el-form> |
| 17 | <div slot="footer" class="dialog-footer"> | 29 | <div slot="footer" class="dialog-footer"> |
| 18 | - <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> | 30 | + <el-button v-if='openStatus == "add"' type="primary" :loading="loading" @click="submit">确 定</el-button> |
| 31 | + <el-button v-else type="primary" :loading="downloading" @click="download">导出Excel</el-button> | ||
| 19 | <el-button @click="close">取 消</el-button> | 32 | <el-button @click="close">取 消</el-button> |
| 20 | </div> | 33 | </div> |
| 21 | </el-dialog> | 34 | </el-dialog> |
| ... | @@ -23,7 +36,8 @@ | ... | @@ -23,7 +36,8 @@ |
| 23 | </template> | 36 | </template> |
| 24 | 37 | ||
| 25 | <script> | 38 | <script> |
| 26 | -import { batchAddGoods } from "@/api/goodsStation" | 39 | +import { batchAddGoods, findStationName } from "@/api/goodsStation" |
| 40 | +import { downLoadXlsx } from "@/utils/zipdownload"; | ||
| 27 | 41 | ||
| 28 | export default { | 42 | export default { |
| 29 | name: '', | 43 | name: '', |
| ... | @@ -32,19 +46,24 @@ export default { | ... | @@ -32,19 +46,24 @@ export default { |
| 32 | type: Boolean, | 46 | type: Boolean, |
| 33 | default: false | 47 | default: false |
| 34 | }, | 48 | }, |
| 49 | + openStatus: { | ||
| 50 | + type: String, | ||
| 51 | + default: 'add' | ||
| 52 | + } | ||
| 35 | }, | 53 | }, |
| 36 | data() { | 54 | data() { |
| 37 | return { | 55 | return { |
| 38 | formData: { | 56 | formData: { |
| 39 | goodsStation: null, | 57 | goodsStation: null, |
| 40 | - goodsList: null | 58 | + goodsList: '' |
| 41 | }, | 59 | }, |
| 60 | + goodsStationList: [], | ||
| 42 | rules: { | 61 | rules: { |
| 43 | goodsStation: [ | 62 | goodsStation: [ |
| 44 | { | 63 | { |
| 45 | required: true, | 64 | required: true, |
| 46 | message: "货站名称不能为空", | 65 | message: "货站名称不能为空", |
| 47 | - trigger: "blur", | 66 | + trigger: "change", |
| 48 | }, | 67 | }, |
| 49 | ], | 68 | ], |
| 50 | goodsList: [ | 69 | goodsList: [ |
| ... | @@ -55,12 +74,34 @@ export default { | ... | @@ -55,12 +74,34 @@ export default { |
| 55 | }, | 74 | }, |
| 56 | ], | 75 | ], |
| 57 | }, | 76 | }, |
| 77 | + goodsStationLoading: false, | ||
| 78 | + downloading: false, | ||
| 58 | loading: false, | 79 | loading: false, |
| 59 | } | 80 | } |
| 60 | }, | 81 | }, |
| 61 | watch: { | 82 | watch: { |
| 83 | + open(val) { | ||
| 84 | + if (val && this.openStatus == 'downloadExcel') { | ||
| 85 | + this.getgoods() | ||
| 86 | + } | ||
| 87 | + } | ||
| 62 | }, | 88 | }, |
| 63 | methods: { | 89 | methods: { |
| 90 | + //查询货站 | ||
| 91 | + getgoods() { | ||
| 92 | + this.goodsStationLoading = true | ||
| 93 | + findStationName().then(res => { | ||
| 94 | + this.goodsStationLoading = false | ||
| 95 | + if (res.code === 200) { | ||
| 96 | + this.goodsStationList = res.data.list | ||
| 97 | + } else { | ||
| 98 | + this.msgWarning(res.msg) | ||
| 99 | + } | ||
| 100 | + }).catch(err => { | ||
| 101 | + this.goodsStationLoading = false | ||
| 102 | + console.log(err) | ||
| 103 | + }) | ||
| 104 | + }, | ||
| 64 | //提交 | 105 | //提交 |
| 65 | submit() { | 106 | submit() { |
| 66 | let obj = {} | 107 | let obj = {} |
| ... | @@ -87,6 +128,24 @@ export default { | ... | @@ -87,6 +128,24 @@ export default { |
| 87 | } | 128 | } |
| 88 | }) | 129 | }) |
| 89 | }, | 130 | }, |
| 131 | + //导出Excel | ||
| 132 | + download() { | ||
| 133 | + this.$refs['addForm'].validate(val => { | ||
| 134 | + if (val) { | ||
| 135 | + this.downloading = true | ||
| 136 | + let data = { goodsStation: this.formData.goodsStation } | ||
| 137 | + downLoadXlsx("/goods/exportGoods", data, "货站表") | ||
| 138 | + .then(() => { | ||
| 139 | + this.downloading = false | ||
| 140 | + this.close() | ||
| 141 | + }) | ||
| 142 | + .catch(() => { | ||
| 143 | + this.downloading = false | ||
| 144 | + }); | ||
| 145 | + } | ||
| 146 | + }) | ||
| 147 | + | ||
| 148 | + }, | ||
| 90 | //取消 | 149 | //取消 |
| 91 | close() { | 150 | close() { |
| 92 | this.formData = { | 151 | this.formData = { | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form class="form-header" ref="selectForm" label-width="auto" label-position="right" | 3 | + <el-form class="form-header" ref="selectForm" label-position="right" label-width="auto" |
| 4 | style="margin-bottom:10px" @submit.native.prevent size="small"> | 4 | style="margin-bottom:10px" @submit.native.prevent size="small"> |
| 5 | <el-row> | 5 | <el-row> |
| 6 | <el-col :span="6"> | 6 | <el-col :span="6"> |
| ... | @@ -28,15 +28,15 @@ | ... | @@ -28,15 +28,15 @@ |
| 28 | <el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px" | 28 | <el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px" |
| 29 | @click="downloadTempleate">下载模板 | 29 | @click="downloadTempleate">下载模板 |
| 30 | </el-button> | 30 | </el-button> |
| 31 | + <el-button icon="el-icon-download" type="primary" size="small" style="margin-right:10px" | ||
| 32 | + @click="downloadExcel"> | ||
| 33 | + 导出Excel | ||
| 34 | + </el-button> | ||
| 31 | <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel" | 35 | <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel" |
| 32 | :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" | 36 | :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" |
| 33 | class="upload-demo" v-hasPermi="['base:goodsStation:add']"> | 37 | class="upload-demo" v-hasPermi="['base:goodsStation:add']"> |
| 34 | <el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button> | 38 | <el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button> |
| 35 | </el-upload> | 39 | </el-upload> |
| 36 | - <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px" | ||
| 37 | - @click="downloadExcel"> | ||
| 38 | - 导出Excel | ||
| 39 | - </el-button> | ||
| 40 | </div> | 40 | </div> |
| 41 | <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true" | 41 | <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true" |
| 42 | :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading" | 42 | :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading" | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px" | 3 | + <el-form class="form-header" ref="dictForm" label-position="right" label-width="auto" style="margin-bottom:10px" |
| 4 | @submit.native.prevent size="small"> | 4 | @submit.native.prevent size="small"> |
| 5 | <el-row> | 5 | <el-row> |
| 6 | <el-col :span="6"> | 6 | <el-col :span="6"> |
| ... | @@ -9,8 +9,8 @@ | ... | @@ -9,8 +9,8 @@ |
| 9 | </el-form-item> | 9 | </el-form-item> |
| 10 | </el-col> | 10 | </el-col> |
| 11 | <el-col :span="6"> | 11 | <el-col :span="6"> |
| 12 | - <el-form-item label="航班"> | 12 | + <el-form-item label="航班号"> |
| 13 | - <el-input v-model="selectionData.fltNo" placeholder="请输入货站名称" maxlength="20" clearable /> | 13 | + <el-input v-model="selectionData.fltNo" placeholder="请输入航班号" maxlength="20" clearable /> |
| 14 | </el-form-item> | 14 | </el-form-item> |
| 15 | </el-col> | 15 | </el-col> |
| 16 | </el-row> | 16 | </el-row> | ... | ... |
| ... | @@ -163,6 +163,8 @@ | ... | @@ -163,6 +163,8 @@ |
| 163 | }}</el-button> | 163 | }}</el-button> |
| 164 | <el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']" | 164 | <el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']" |
| 165 | @click="release">释放舱位</el-button> | 165 | @click="release">释放舱位</el-button> |
| 166 | + <el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']" | ||
| 167 | + @click="transfer">航班迁转</el-button> | ||
| 166 | <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span> | 168 | <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span> |
| 167 | <el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress" | 169 | <el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress" |
| 168 | :status="progress == 100 ? 'success' : 'warning'"></el-progress> | 170 | :status="progress == 100 ? 'success' : 'warning'"></el-progress> |
| ... | @@ -206,6 +208,7 @@ | ... | @@ -206,6 +208,7 @@ |
| 206 | </div> | 208 | </div> |
| 207 | </el-dialog> | 209 | </el-dialog> |
| 208 | <Dialog :dialogVisible="openView" :cargoData="cargoLog" @close="viewClose" /> | 210 | <Dialog :dialogVisible="openView" :cargoData="cargoLog" @close="viewClose" /> |
| 211 | + <Info :tableData="selectTable" :dialogVisible="openTransfer" @dialogBeforeClose="dialogBeforeClose" /> | ||
| 209 | </div> | 212 | </div> |
| 210 | </template> | 213 | </template> |
| 211 | 214 | ||
| ... | @@ -213,11 +216,13 @@ | ... | @@ -213,11 +216,13 @@ |
| 213 | import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect"; | 216 | import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect"; |
| 214 | import { downLoadXlsx } from "@/utils/zipdownload"; | 217 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 215 | import Dialog from "./dialog.vue"; | 218 | import Dialog from "./dialog.vue"; |
| 219 | +import Info from './info.vue' | ||
| 216 | 220 | ||
| 217 | export default { | 221 | export default { |
| 218 | name: "QueryCargo", | 222 | name: "QueryCargo", |
| 219 | components: { | 223 | components: { |
| 220 | - Dialog | 224 | + Dialog, |
| 225 | + Info | ||
| 221 | }, | 226 | }, |
| 222 | data() { | 227 | data() { |
| 223 | return { | 228 | return { |
| ... | @@ -328,6 +333,7 @@ export default { | ... | @@ -328,6 +333,7 @@ export default { |
| 328 | tableHeight: null, | 333 | tableHeight: null, |
| 329 | dialogVisible: false, | 334 | dialogVisible: false, |
| 330 | openView: false, | 335 | openView: false, |
| 336 | + openTransfer: false, | ||
| 331 | formShow: true, //菜单隐藏 | 337 | formShow: true, //菜单隐藏 |
| 332 | }; | 338 | }; |
| 333 | }, | 339 | }, |
| ... | @@ -546,6 +552,9 @@ export default { | ... | @@ -546,6 +552,9 @@ export default { |
| 546 | console.log(err) | 552 | console.log(err) |
| 547 | }) | 553 | }) |
| 548 | }, | 554 | }, |
| 555 | + transfer() { | ||
| 556 | + this.openTransfer = true | ||
| 557 | + }, | ||
| 549 | //关闭弹窗 | 558 | //关闭弹窗 |
| 550 | close() { | 559 | close() { |
| 551 | this.dialogVisible = false | 560 | this.dialogVisible = false |
| ... | @@ -723,6 +732,11 @@ export default { | ... | @@ -723,6 +732,11 @@ export default { |
| 723 | viewClose() { | 732 | viewClose() { |
| 724 | this.openView = false | 733 | this.openView = false |
| 725 | }, | 734 | }, |
| 735 | + //关闭迁转 | ||
| 736 | + dialogBeforeClose() { | ||
| 737 | + this.openTransfer = false | ||
| 738 | + this.select(0) | ||
| 739 | + }, | ||
| 726 | //设置关闭 | 740 | //设置关闭 |
| 727 | headerSetClose(val) { | 741 | headerSetClose(val) { |
| 728 | if (val == 1) { | 742 | if (val == 1) { | ... | ... |
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <el-dialog title="货物配舱" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false" | ||
| 4 | + :append-to-body="true"> | ||
| 5 | + <el-divider content-position="left">已选货物信息</el-divider> | ||
| 6 | + <el-table :data="tableData" size="mini" height="200" max-height="200" border stripe highlight-current-row | ||
| 7 | + style="width: 100%"> | ||
| 8 | + <el-table-column type="index" label="序号" align="center"> | ||
| 9 | + </el-table-column> | ||
| 10 | + <el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value" | ||
| 11 | + :label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter"> | ||
| 12 | + </el-table-column> | ||
| 13 | + </el-table> | ||
| 14 | + <el-form ref="form" class="form-header" label-position="right" label-width="auto" | ||
| 15 | + style="width: 400px; margin: 30px auto" :model="formData" :rules="rules"> | ||
| 16 | + <el-form-item label="航班号" prop="fltNo"> | ||
| 17 | + <el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="20" | ||
| 18 | + style="width: 350px" @change="dateChange"></el-input> | ||
| 19 | + </el-form-item> | ||
| 20 | + <el-form-item label="航班日期:" prop="fltDate"> | ||
| 21 | + <el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期" | ||
| 22 | + value-format="yyyy-MM-dd" size="medium" style="width: 350px" @change="dateChange"> | ||
| 23 | + </el-date-picker> | ||
| 24 | + </el-form-item> | ||
| 25 | + <el-form-item prop="route"> | ||
| 26 | + <template slot="label"> | ||
| 27 | + <div style="display:inline-block">航线: | ||
| 28 | + <el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号和航班日期,才能选择对应得航线" placement="top-start"> | ||
| 29 | + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> | ||
| 30 | + </el-tooltip> | ||
| 31 | + </div> | ||
| 32 | + </template> | ||
| 33 | + <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0"> | ||
| 34 | + <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index"> | ||
| 35 | + <Tooltips :content="item.route" :refName="item.route"></Tooltips> | ||
| 36 | + </el-option> | ||
| 37 | + </el-select> | ||
| 38 | + </el-form-item> | ||
| 39 | + </el-form> | ||
| 40 | + <div slot="footer"> | ||
| 41 | + <el-button @click="dialogBeforeClose">取 消</el-button> | ||
| 42 | + <el-button type="primary" @click="submit" :loading="loading">确 定</el-button> | ||
| 43 | + </div> | ||
| 44 | + </el-dialog> | ||
| 45 | + </div> | ||
| 46 | +</template> | ||
| 47 | + | ||
| 48 | +<script> | ||
| 49 | +import { batchMoveCargoToOtherFlight, findFlightRoute } from "@/api/cargoSelect"; | ||
| 50 | + | ||
| 51 | +export default { | ||
| 52 | + props: { | ||
| 53 | + dialogVisible: { | ||
| 54 | + type: Boolean, | ||
| 55 | + default: false, | ||
| 56 | + }, | ||
| 57 | + tableData: { | ||
| 58 | + type: Array, | ||
| 59 | + default: null, | ||
| 60 | + }, | ||
| 61 | + }, | ||
| 62 | + data() { | ||
| 63 | + return { | ||
| 64 | + formData: { | ||
| 65 | + ids: [], | ||
| 66 | + fltNo: undefined, | ||
| 67 | + fltDate: undefined, | ||
| 68 | + route: undefined, | ||
| 69 | + overweight: false, | ||
| 70 | + }, | ||
| 71 | + cargoHeader: [ | ||
| 72 | + { name: "口岸代码", value: "portName" }, | ||
| 73 | + { name: "运单号", value: "waybillNo" }, | ||
| 74 | + { name: "货物状态", value: "statusName" }, | ||
| 75 | + { name: "站点", value: "siteName" }, | ||
| 76 | + { name: "申报类型", value: "typeName" }, | ||
| 77 | + { name: "URSA", value: "ursa" }, | ||
| 78 | + { name: "实际重量", value: "actualWeight" }, | ||
| 79 | + { name: "件数", value: "qty" }, | ||
| 80 | + { name: "ACCS原航班号", value: "fltNoAccs" }, | ||
| 81 | + { name: "ACCS原航班日期", value: "fltDateAccs" }, | ||
| 82 | + { name: "品名描述", value: "nameDescription" }, | ||
| 83 | + { name: "是否自动", value: "cargoRulesStatus" }, | ||
| 84 | + { name: "创建人", value: "createUserName" }, | ||
| 85 | + { name: "创建时间", value: "createTime" }, | ||
| 86 | + ], | ||
| 87 | + routeList: [], | ||
| 88 | + rules: { | ||
| 89 | + fltNo: [ | ||
| 90 | + { | ||
| 91 | + required: true, | ||
| 92 | + message: "航班号不能为空", | ||
| 93 | + trigger: "blur", | ||
| 94 | + }, | ||
| 95 | + ], | ||
| 96 | + fltDate: [ | ||
| 97 | + { | ||
| 98 | + required: true, | ||
| 99 | + message: "航班日期不能为空", | ||
| 100 | + trigger: "blur", | ||
| 101 | + }, | ||
| 102 | + ], | ||
| 103 | + route: [ | ||
| 104 | + { | ||
| 105 | + required: true, | ||
| 106 | + message: "航线不能为空", | ||
| 107 | + trigger: "blur", | ||
| 108 | + }, | ||
| 109 | + ], | ||
| 110 | + }, | ||
| 111 | + loading: false, | ||
| 112 | + }; | ||
| 113 | + }, | ||
| 114 | + methods: { | ||
| 115 | + cleaerForm() { | ||
| 116 | + this.formData = { | ||
| 117 | + ids: [], | ||
| 118 | + fltNo: undefined, | ||
| 119 | + fltDate: undefined, | ||
| 120 | + route: undefined, | ||
| 121 | + flightId: undefined, | ||
| 122 | + overweight: false, | ||
| 123 | + }; | ||
| 124 | + this.routeList = [] | ||
| 125 | + }, | ||
| 126 | + //确定配舱 | ||
| 127 | + submit() { | ||
| 128 | + this.loading = true; | ||
| 129 | + let arr = []; | ||
| 130 | + this.tableData.forEach((item) => { | ||
| 131 | + arr.push(item.id); | ||
| 132 | + }); | ||
| 133 | + this.formData.ids = arr; | ||
| 134 | + this.routeList.forEach(item => { | ||
| 135 | + if (item.route === this.formData.route) { | ||
| 136 | + this.formData.flightId = item.id | ||
| 137 | + } | ||
| 138 | + }) | ||
| 139 | + if (this.formData.fltNo && this.formData.fltDate) { | ||
| 140 | + batchMoveCargoToOtherFlight(this.formData).then((res) => { | ||
| 141 | + this.loading = false; | ||
| 142 | + //code 200 迁转成功 202 重量已满需要确认 其余code直接输出msg | ||
| 143 | + if (res.code === 200) { | ||
| 144 | + this.msgSuccess('货物迁转成功') | ||
| 145 | + this.cleaerForm(); | ||
| 146 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 147 | + } else if (res.code === 202) { | ||
| 148 | + this.$confirm(res.msg, "提示", { | ||
| 149 | + confirmButtonText: "确定", | ||
| 150 | + cancelButtonText: "取消", | ||
| 151 | + type: "warning", | ||
| 152 | + }) | ||
| 153 | + .then(() => { | ||
| 154 | + this.formData.overweight = true; //确定继续overweight变为true再次请求接口 | ||
| 155 | + batchMoveCargoToOtherFlight(this.formData).then((res) => { | ||
| 156 | + if (res.code === 200) { | ||
| 157 | + this.msgSuccess('货物迁转成功') | ||
| 158 | + } else { | ||
| 159 | + this.msgWarning(res.msg) | ||
| 160 | + } | ||
| 161 | + }); | ||
| 162 | + this.cleaerForm(); | ||
| 163 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 164 | + }) | ||
| 165 | + .catch(() => { | ||
| 166 | + //取消 取消当前配舱 | ||
| 167 | + this.msgSuccess('迁转已取消') | ||
| 168 | + this.cleaerForm(); | ||
| 169 | + this.$emit("dialogBeforeClose", { | ||
| 170 | + close: false, | ||
| 171 | + reload: true, | ||
| 172 | + }); | ||
| 173 | + }); | ||
| 174 | + } else { | ||
| 175 | + this.loading = false; | ||
| 176 | + this.msgWarning(res.msg) | ||
| 177 | + } | ||
| 178 | + }).catch(() => { | ||
| 179 | + this.loading = false; | ||
| 180 | + }); | ||
| 181 | + } else { | ||
| 182 | + this.loading = false; | ||
| 183 | + this.msgWarning('航班号或航班日期不能为空') | ||
| 184 | + } | ||
| 185 | + }, | ||
| 186 | + dialogBeforeClose() { | ||
| 187 | + this.cleaerForm(); | ||
| 188 | + this.$refs['form'].clearValidate(); | ||
| 189 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 190 | + }, | ||
| 191 | + formatter(row, column, cellValue, index) { | ||
| 192 | + if (column.property == "cargoRulesStatus") { | ||
| 193 | + if (cellValue == 1) { | ||
| 194 | + return "手动" | ||
| 195 | + } else { | ||
| 196 | + return "自动" | ||
| 197 | + } | ||
| 198 | + } | ||
| 199 | + return cellValue | ||
| 200 | + }, | ||
| 201 | + //日期选择变化 | ||
| 202 | + dateChange(val) { | ||
| 203 | + this.routeList = [] | ||
| 204 | + if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') { | ||
| 205 | + if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') { | ||
| 206 | + let obj = { | ||
| 207 | + fltNo: this.formData.fltNo, | ||
| 208 | + fltDate: this.formData.fltDate, | ||
| 209 | + } | ||
| 210 | + findFlightRoute(obj).then(res => { | ||
| 211 | + if (res.code === 200) { | ||
| 212 | + res.data[0].route.indexOf(';') <= 0 ? | ||
| 213 | + this.routeList = res.data : | ||
| 214 | + res.data[0].route.split(';').forEach(item => { | ||
| 215 | + this.routeList.push({ id: res.data[0].id, route: item }) | ||
| 216 | + }) | ||
| 217 | + } else { | ||
| 218 | + this.msgWarning(res.msg) | ||
| 219 | + } | ||
| 220 | + }).catch(err => { | ||
| 221 | + console.log(err) | ||
| 222 | + }) | ||
| 223 | + } else { | ||
| 224 | + this.msgWarning('航班日期不能为空') | ||
| 225 | + } | ||
| 226 | + } else { | ||
| 227 | + this.msgWarning('航班号不能为空') | ||
| 228 | + } | ||
| 229 | + } | ||
| 230 | + }, | ||
| 231 | + computed: { | ||
| 232 | + fltNo: { | ||
| 233 | + get: function () { | ||
| 234 | + return this.formData.fltNo; | ||
| 235 | + }, | ||
| 236 | + set: function (val) { | ||
| 237 | + this.formData.fltNo = this.upCase(val); | ||
| 238 | + }, | ||
| 239 | + }, | ||
| 240 | + }, | ||
| 241 | +}; | ||
| 242 | +</script> | ||
| 243 | + | ||
| 244 | +<style> | ||
| 245 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
| 26 | <div v-else-if="dictName == '航线'"> | 26 | <div v-else-if="dictName == '航线'"> |
| 27 | <div v-if="status == 'add'"> | 27 | <div v-if="status == 'add'"> |
| 28 | <el-form-item label="航班号" prop="fltNo"> | 28 | <el-form-item label="航班号" prop="fltNo"> |
| 29 | - <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="50"> | 29 | + <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="20"> |
| 30 | </el-input> | 30 | </el-input> |
| 31 | </el-form-item> | 31 | </el-form-item> |
| 32 | <el-form-item label="航线" prop="route"> | 32 | <el-form-item label="航线" prop="route"> |
| ... | @@ -36,7 +36,7 @@ | ... | @@ -36,7 +36,7 @@ |
| 36 | </div> | 36 | </div> |
| 37 | <div v-else-if="status == 'sort'"> | 37 | <div v-else-if="status == 'sort'"> |
| 38 | <el-form-item label="航班号" prop="fltNo"> | 38 | <el-form-item label="航班号" prop="fltNo"> |
| 39 | - <el-input type="text" v-model="newDictionary.fltNo" disabled></el-input> | 39 | + <el-input type="text" v-model="newDictionary.fltNo" disabled maxlength="20"></el-input> |
| 40 | </el-form-item> | 40 | </el-form-item> |
| 41 | <el-form-item label="航线"> | 41 | <el-form-item label="航线"> |
| 42 | <Drag :routes="routeList" @drag="drag"></Drag> | 42 | <Drag :routes="routeList" @drag="drag"></Drag> |
| ... | @@ -377,4 +377,5 @@ export default { | ... | @@ -377,4 +377,5 @@ export default { |
| 377 | </script> | 377 | </script> |
| 378 | 378 | ||
| 379 | <style> | 379 | <style> |
| 380 | + | ||
| 380 | </style> | 381 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -172,7 +172,7 @@ export default { | ... | @@ -172,7 +172,7 @@ export default { |
| 172 | if (tip === "停用") { | 172 | if (tip === "停用") { |
| 173 | getReleaseWeight({ id: val.id }).then(res => { | 173 | getReleaseWeight({ id: val.id }).then(res => { |
| 174 | if (res.code === 200) { | 174 | if (res.code === 200) { |
| 175 | - this.$confirm(`预计释放仓位为${res.data},是否确定!`, "注意!", { | 175 | + this.$confirm(`预计释放舱位为${res.data},是否确定!`, "注意!", { |
| 176 | confirmButtonText: "确定", | 176 | confirmButtonText: "确定", |
| 177 | cancelButtonText: '取消', | 177 | cancelButtonText: '取消', |
| 178 | type: "warning", | 178 | type: "warning", | ... | ... |
-
Please register or login to post a comment