Showing
3 changed files
with
133 additions
and
114 deletions
| ... | @@ -125,63 +125,67 @@ export default { | ... | @@ -125,63 +125,67 @@ export default { |
| 125 | }, | 125 | }, |
| 126 | //确定配舱 | 126 | //确定配舱 |
| 127 | submit() { | 127 | submit() { |
| 128 | - this.loading = true; | 128 | + this.$refs.form.validate(val => { |
| 129 | - let arr = []; | 129 | + if (val) { |
| 130 | - this.tableData.forEach((item) => { | 130 | + this.loading = true; |
| 131 | - arr.push(item.id); | 131 | + let arr = []; |
| 132 | - }); | 132 | + this.tableData.forEach((item) => { |
| 133 | - this.formData.ids = arr; | 133 | + arr.push(item.id); |
| 134 | - this.routeList.forEach(item => { | 134 | + }); |
| 135 | - if (item.route === this.formData.route) { | 135 | + this.formData.ids = arr; |
| 136 | - this.formData.flightId = item.id | 136 | + this.routeList.forEach(item => { |
| 137 | - } | 137 | + if (item.route === this.formData.route) { |
| 138 | - }) | 138 | + this.formData.flightId = item.id |
| 139 | - if (this.formData.fltNo && this.formData.fltDate) { | 139 | + } |
| 140 | - allocationFlight(this.formData).then((res) => { | 140 | + }) |
| 141 | - this.loading = false; | 141 | + if (this.formData.fltNo && this.formData.fltDate) { |
| 142 | - //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg | 142 | + allocationFlight(this.formData).then((res) => { |
| 143 | - if (res.code === 200) { | 143 | + this.loading = false; |
| 144 | - this.msgSuccess('货物配舱成功') | 144 | + //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg |
| 145 | - this.cleaerForm(); | 145 | + if (res.code === 200) { |
| 146 | - this.$emit("dialogBeforeClose", { close: false, reload: true }); | 146 | + this.msgSuccess('货物配舱成功') |
| 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 | - allocationFlight(this.formData).then((res) => { | ||
| 156 | - if (res.code === 200) { | ||
| 157 | - this.msgSuccess('货物配舱成功') | ||
| 158 | - } else { | ||
| 159 | - this.msgWarning(res.msg) | ||
| 160 | - } | ||
| 161 | - }); | ||
| 162 | this.cleaerForm(); | 147 | this.cleaerForm(); |
| 163 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 148 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 164 | - }) | 149 | + } else if (res.code === 202) { |
| 165 | - .catch(() => { | 150 | + this.$confirm(res.msg, "提示", { |
| 166 | - //取消 取消当前配舱 | 151 | + confirmButtonText: "确定", |
| 167 | - this.msgSuccess('配舱已取消') | 152 | + cancelButtonText: "取消", |
| 168 | - this.cleaerForm(); | 153 | + type: "warning", |
| 169 | - this.$emit("dialogBeforeClose", { | 154 | + }) |
| 170 | - close: false, | 155 | + .then(() => { |
| 171 | - reload: true, | 156 | + this.formData.overweight = true; //确定继续overweight变为true再次请求接口 |
| 172 | - }); | 157 | + allocationFlight(this.formData).then((res) => { |
| 173 | - }); | 158 | + if (res.code === 200) { |
| 159 | + this.msgSuccess('货物配舱成功') | ||
| 160 | + } else { | ||
| 161 | + this.msgWarning(res.msg) | ||
| 162 | + } | ||
| 163 | + }); | ||
| 164 | + this.cleaerForm(); | ||
| 165 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 166 | + }) | ||
| 167 | + .catch(() => { | ||
| 168 | + //取消 取消当前配舱 | ||
| 169 | + this.msgSuccess('配舱已取消') | ||
| 170 | + this.cleaerForm(); | ||
| 171 | + this.$emit("dialogBeforeClose", { | ||
| 172 | + close: false, | ||
| 173 | + reload: true, | ||
| 174 | + }); | ||
| 175 | + }); | ||
| 176 | + } else { | ||
| 177 | + this.loading = false; | ||
| 178 | + this.msgWarning(res.msg) | ||
| 179 | + } | ||
| 180 | + }).catch(() => { | ||
| 181 | + this.loading = false; | ||
| 182 | + }); | ||
| 174 | } else { | 183 | } else { |
| 175 | this.loading = false; | 184 | this.loading = false; |
| 176 | - this.msgWarning(res.msg) | 185 | + this.msgWarning('航班号或航班日期不能为空') |
| 177 | } | 186 | } |
| 178 | - }).catch(() => { | 187 | + } |
| 179 | - this.loading = false; | 188 | + }) |
| 180 | - }); | ||
| 181 | - } else { | ||
| 182 | - this.loading = false; | ||
| 183 | - this.msgWarning('航班号或航班日期不能为空') | ||
| 184 | - } | ||
| 185 | }, | 189 | }, |
| 186 | dialogBeforeClose() { | 190 | dialogBeforeClose() { |
| 187 | this.cleaerForm(); | 191 | this.cleaerForm(); | ... | ... |
| ... | @@ -125,63 +125,67 @@ export default { | ... | @@ -125,63 +125,67 @@ export default { |
| 125 | }, | 125 | }, |
| 126 | //确定配舱 | 126 | //确定配舱 |
| 127 | submit() { | 127 | submit() { |
| 128 | - this.loading = true; | 128 | + this.$refs.form.validate(val => { |
| 129 | - let arr = []; | 129 | + if (val) { |
| 130 | - this.tableData.forEach((item) => { | 130 | + this.loading = true; |
| 131 | - arr.push(item.id); | 131 | + let arr = []; |
| 132 | - }); | 132 | + this.tableData.forEach((item) => { |
| 133 | - this.formData.ids = arr; | 133 | + arr.push(item.id); |
| 134 | - this.routeList.forEach(item => { | 134 | + }); |
| 135 | - if (item.route === this.formData.route) { | 135 | + this.formData.ids = arr; |
| 136 | - this.formData.flightId = item.id | 136 | + this.routeList.forEach(item => { |
| 137 | - } | 137 | + if (item.route === this.formData.route) { |
| 138 | - }) | 138 | + this.formData.flightId = item.id |
| 139 | - if (this.formData.fltNo && this.formData.fltDate) { | 139 | + } |
| 140 | - batchMoveCargoToOtherFlight(this.formData).then((res) => { | 140 | + }) |
| 141 | - this.loading = false; | 141 | + if (this.formData.fltNo && this.formData.fltDate) { |
| 142 | - //code 200 迁转成功 202 重量已满需要确认 其余code直接输出msg | 142 | + batchMoveCargoToOtherFlight(this.formData).then((res) => { |
| 143 | - if (res.code === 200) { | 143 | + this.loading = false; |
| 144 | - this.msgSuccess('货物迁转成功') | 144 | + //code 200 迁转成功 202 重量已满需要确认 其余code直接输出msg |
| 145 | - this.cleaerForm(); | 145 | + if (res.code === 200) { |
| 146 | - this.$emit("dialogBeforeClose", { close: false, reload: true }); | 146 | + this.msgSuccess('货物迁转成功') |
| 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(); | 147 | this.cleaerForm(); |
| 163 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 148 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 164 | - }) | 149 | + } else if (res.code === 202) { |
| 165 | - .catch(() => { | 150 | + this.$confirm(res.msg, "提示", { |
| 166 | - //取消 取消当前配舱 | 151 | + confirmButtonText: "确定", |
| 167 | - this.msgSuccess('迁转已取消') | 152 | + cancelButtonText: "取消", |
| 168 | - this.cleaerForm(); | 153 | + type: "warning", |
| 169 | - this.$emit("dialogBeforeClose", { | 154 | + }) |
| 170 | - close: false, | 155 | + .then(() => { |
| 171 | - reload: true, | 156 | + this.formData.overweight = true; //确定继续overweight变为true再次请求接口 |
| 172 | - }); | 157 | + batchMoveCargoToOtherFlight(this.formData).then((res) => { |
| 173 | - }); | 158 | + if (res.code === 200) { |
| 159 | + this.msgSuccess('货物迁转成功') | ||
| 160 | + } else { | ||
| 161 | + this.msgWarning(res.msg) | ||
| 162 | + } | ||
| 163 | + }); | ||
| 164 | + this.cleaerForm(); | ||
| 165 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 166 | + }) | ||
| 167 | + .catch(() => { | ||
| 168 | + //取消 取消当前配舱 | ||
| 169 | + this.msgSuccess('迁转已取消') | ||
| 170 | + this.cleaerForm(); | ||
| 171 | + this.$emit("dialogBeforeClose", { | ||
| 172 | + close: false, | ||
| 173 | + reload: true, | ||
| 174 | + }); | ||
| 175 | + }); | ||
| 176 | + } else { | ||
| 177 | + this.loading = false; | ||
| 178 | + this.msgWarning(res.msg) | ||
| 179 | + } | ||
| 180 | + }).catch(() => { | ||
| 181 | + this.loading = false; | ||
| 182 | + }); | ||
| 174 | } else { | 183 | } else { |
| 175 | this.loading = false; | 184 | this.loading = false; |
| 176 | - this.msgWarning(res.msg) | 185 | + this.msgWarning('航班号或航班日期不能为空') |
| 177 | } | 186 | } |
| 178 | - }).catch(() => { | 187 | + } |
| 179 | - this.loading = false; | 188 | + }) |
| 180 | - }); | ||
| 181 | - } else { | ||
| 182 | - this.loading = false; | ||
| 183 | - this.msgWarning('航班号或航班日期不能为空') | ||
| 184 | - } | ||
| 185 | }, | 189 | }, |
| 186 | dialogBeforeClose() { | 190 | dialogBeforeClose() { |
| 187 | this.cleaerForm(); | 191 | this.cleaerForm(); | ... | ... |
| ... | @@ -23,24 +23,26 @@ | ... | @@ -23,24 +23,26 @@ |
| 23 | :loading="loading" @currentChange="currentChange"> | 23 | :loading="loading" @currentChange="currentChange"> |
| 24 | <template v-slot:queryParameter="scope"> | 24 | <template v-slot:queryParameter="scope"> |
| 25 | <el-popover placement="top" width="350" trigger="hover"> | 25 | <el-popover placement="top" width="350" trigger="hover"> |
| 26 | - <ul v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''"> | 26 | + <ul style="height:300px;overflow-y:scroll;" |
| 27 | + v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''"> | ||
| 27 | <li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')" | 28 | <li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')" |
| 28 | - :key="index">{{ item }}</li> | 29 | + :key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li> |
| 29 | </ul> | 30 | </ul> |
| 30 | <el-button type="text" slot="reference">查 看</el-button> | 31 | <el-button type="text" slot="reference">查 看</el-button> |
| 31 | </el-popover> | 32 | </el-popover> |
| 32 | </template> | 33 | </template> |
| 33 | <template v-slot:downloadPath="scope"> | 34 | <template v-slot:downloadPath="scope"> |
| 34 | - <el-button v-if="scope.row.downloadPath != null" type="text" size="mini" icon="el-icon-download" | 35 | + <el-button v-if="scope.row.downloadPath != null && scope.row.status == 1" type="text" size="mini" |
| 35 | - @click="download(scope.row)">下载 | 36 | + icon="el-icon-download" @click="download(scope.row)">下载 |
| 36 | </el-button> | 37 | </el-button> |
| 38 | + <span v-else>暂无下载</span> | ||
| 37 | </template> | 39 | </template> |
| 38 | </Tables> | 40 | </Tables> |
| 39 | </div> | 41 | </div> |
| 40 | </template> | 42 | </template> |
| 41 | 43 | ||
| 42 | <script> | 44 | <script> |
| 43 | -import { findArchiveCargoLog } from "@/api/system/logConfig.js"; | 45 | +import { findArchiveCargoLog, isExistZip } from "@/api/system/logConfig.js"; |
| 44 | import { downLoadZip } from "@/utils/zipdownload"; | 46 | import { downLoadZip } from "@/utils/zipdownload"; |
| 45 | 47 | ||
| 46 | export default { | 48 | export default { |
| ... | @@ -55,7 +57,7 @@ export default { | ... | @@ -55,7 +57,7 @@ export default { |
| 55 | tableHeader: this.tableHeaders['archiveData'], | 57 | tableHeader: this.tableHeaders['archiveData'], |
| 56 | tableHeight: null, | 58 | tableHeight: null, |
| 57 | total: 0, | 59 | total: 0, |
| 58 | - loading: false | 60 | + loading: false, |
| 59 | } | 61 | } |
| 60 | }, | 62 | }, |
| 61 | created() { | 63 | created() { |
| ... | @@ -91,10 +93,19 @@ export default { | ... | @@ -91,10 +93,19 @@ export default { |
| 91 | }) | 93 | }) |
| 92 | }, | 94 | }, |
| 93 | download(val) { | 95 | download(val) { |
| 94 | - let url = 'entrymanager/entryExcel/download' | 96 | + isExistZip(val).then(res => { |
| 95 | - let filename = val.packageName | 97 | + if (res.code === 200) { |
| 96 | - downLoadZip(url, val, filename) | 98 | + setTimeout(() => { |
| 97 | - | 99 | + let url = '/archiveCargoLog/downloadZip' |
| 100 | + let filename = val.packageName | ||
| 101 | + downLoadZip(url, val, filename) | ||
| 102 | + }, 500); | ||
| 103 | + } else { | ||
| 104 | + this.msgWarning(res.msg) | ||
| 105 | + } | ||
| 106 | + }).catch(err => { | ||
| 107 | + console.log(err) | ||
| 108 | + }) | ||
| 98 | }, | 109 | }, |
| 99 | currentChange(val) { | 110 | currentChange(val) { |
| 100 | this.selectForm.page = val.page | 111 | this.selectForm.page = val.page | ... | ... |
-
Please register or login to post a comment