Showing
4 changed files
with
104 additions
and
69 deletions
| ... | @@ -67,6 +67,7 @@ export default { | ... | @@ -67,6 +67,7 @@ export default { |
| 67 | fltDate: undefined, | 67 | fltDate: undefined, |
| 68 | route: null, | 68 | route: null, |
| 69 | overweight: false, | 69 | overweight: false, |
| 70 | + notInWhite: false, | ||
| 70 | }, | 71 | }, |
| 71 | cargoHeader: [ | 72 | cargoHeader: [ |
| 72 | { name: "口岸代码", value: "portName", width: "" }, | 73 | { name: "口岸代码", value: "portName", width: "" }, |
| ... | @@ -120,11 +121,14 @@ export default { | ... | @@ -120,11 +121,14 @@ export default { |
| 120 | route: undefined, | 121 | route: undefined, |
| 121 | flightId: undefined, | 122 | flightId: undefined, |
| 122 | overweight: false, | 123 | overweight: false, |
| 124 | + notInWhite: false, | ||
| 123 | }; | 125 | }; |
| 124 | this.routeList = [] | 126 | this.routeList = [] |
| 125 | }, | 127 | }, |
| 126 | //确定配舱 | 128 | //确定配舱 |
| 127 | submit() { | 129 | submit() { |
| 130 | + this.formData.overweight = false | ||
| 131 | + this.formData.notInWhite = false | ||
| 128 | this.$refs.form.validate(val => { | 132 | this.$refs.form.validate(val => { |
| 129 | if (val) { | 133 | if (val) { |
| 130 | this.loading = true; | 134 | this.loading = true; |
| ... | @@ -140,51 +144,64 @@ export default { | ... | @@ -140,51 +144,64 @@ export default { |
| 140 | }) | 144 | }) |
| 141 | if (this.formData.fltNo && this.formData.fltDate) { | 145 | if (this.formData.fltNo && this.formData.fltDate) { |
| 142 | allocationFlight(this.formData).then((res) => { | 146 | allocationFlight(this.formData).then((res) => { |
| 143 | - this.loading = false; | 147 | + //code 200 配舱成功 202重量已满需要确认 203货物不在白名单需要确认 其余code直接输出msg 接口先判断重量后判断白名单 overweight/notInWhite初始默认false |
| 144 | - //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg | ||
| 145 | if (res.code === 200) { | 148 | if (res.code === 200) { |
| 149 | + this.loading = false; | ||
| 146 | this.msgSuccess('货物配舱成功') | 150 | this.msgSuccess('货物配舱成功') |
| 147 | this.cleaerForm(); | 151 | this.cleaerForm(); |
| 148 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 152 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 149 | } else if (res.code === 202) { | 153 | } else if (res.code === 202) { |
| 150 | - this.$confirm(res.msg, "提示", { | 154 | + //超重航班确实是否继续配舱 |
| 155 | + this.reallocationFlight(res.msg, 'overweight') | ||
| 156 | + } else if (res.code === 203) { | ||
| 157 | + //不存在白名单中确实是否继续配舱 | ||
| 158 | + this.reallocationFlight(res.msg, 'notInWhite') | ||
| 159 | + } else { | ||
| 160 | + this.loading = false; | ||
| 161 | + this.msgWarning(res.msg) | ||
| 162 | + } | ||
| 163 | + }).catch(() => { | ||
| 164 | + this.loading = false; | ||
| 165 | + }); | ||
| 166 | + } else { | ||
| 167 | + this.loading = false; | ||
| 168 | + this.msgWarning('航班号或航班日期不能为空') | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + }) | ||
| 172 | + }, | ||
| 173 | + //手动配舱超重或白名单不存在提示 | ||
| 174 | + reallocationFlight(msg, status) { | ||
| 175 | + this.$confirm(msg, "提示", { | ||
| 151 | confirmButtonText: "确定", | 176 | confirmButtonText: "确定", |
| 152 | cancelButtonText: "取消", | 177 | cancelButtonText: "取消", |
| 153 | type: "warning", | 178 | type: "warning", |
| 154 | - }) | 179 | + }).then(() => { |
| 155 | - .then(() => { | 180 | + if (status == 'overweight') { |
| 156 | this.formData.overweight = true; //确定继续overweight变为true再次请求接口 | 181 | this.formData.overweight = true; //确定继续overweight变为true再次请求接口 |
| 182 | + } else { | ||
| 183 | + this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口 | ||
| 184 | + } | ||
| 157 | allocationFlight(this.formData).then((res) => { | 185 | allocationFlight(this.formData).then((res) => { |
| 158 | if (res.code === 200) { | 186 | if (res.code === 200) { |
| 187 | + this.loading = false | ||
| 159 | this.msgSuccess('货物配舱成功') | 188 | this.msgSuccess('货物配舱成功') |
| 189 | + this.cleaerForm(); | ||
| 190 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 191 | + } else if (res.code === 203) { | ||
| 192 | + this.reallocationFlight(res.msg, 'notInWhite') | ||
| 160 | } else { | 193 | } else { |
| 161 | this.msgWarning(res.msg) | 194 | this.msgWarning(res.msg) |
| 195 | + this.loading = false | ||
| 162 | } | 196 | } |
| 163 | }); | 197 | }); |
| 164 | - this.cleaerForm(); | 198 | + }).catch(() => { |
| 165 | - this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 166 | - }) | ||
| 167 | - .catch(() => { | ||
| 168 | - //取消 取消当前配舱 | ||
| 169 | this.msgSuccess('配舱已取消') | 199 | this.msgSuccess('配舱已取消') |
| 170 | this.cleaerForm(); | 200 | this.cleaerForm(); |
| 171 | this.$emit("dialogBeforeClose", { | 201 | this.$emit("dialogBeforeClose", { |
| 172 | close: false, | 202 | close: false, |
| 173 | reload: true, | 203 | reload: true, |
| 174 | }); | 204 | }); |
| 175 | - }); | ||
| 176 | - } else { | ||
| 177 | - this.loading = false; | ||
| 178 | - this.msgWarning(res.msg) | ||
| 179 | - } | ||
| 180 | - }).catch(() => { | ||
| 181 | - this.loading = false; | ||
| 182 | - }); | ||
| 183 | - } else { | ||
| 184 | - this.loading = false; | ||
| 185 | - this.msgWarning('航班号或航班日期不能为空') | ||
| 186 | - } | ||
| 187 | - } | ||
| 188 | }) | 205 | }) |
| 189 | }, | 206 | }, |
| 190 | dialogBeforeClose() { | 207 | dialogBeforeClose() { | ... | ... |
| ... | @@ -201,20 +201,20 @@ | ... | @@ -201,20 +201,20 @@ |
| 201 | <el-col :span="12"> | 201 | <el-col :span="12"> |
| 202 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> | 202 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> |
| 203 | <el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" | 203 | <el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" |
| 204 | - placeholder="请输入高价百分比" v-model="form.highPriceWeightPercent"></el-input-number> | 204 | + placeholder="开启高地价后可修改" v-model="form.highPriceWeightPercent"></el-input-number> |
| 205 | </el-form-item> | 205 | </el-form-item> |
| 206 | </el-col> | 206 | </el-col> |
| 207 | </el-row> | 207 | </el-row> |
| 208 | <el-row> | 208 | <el-row> |
| 209 | <el-col :span="12"> | 209 | <el-col :span="12"> |
| 210 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> | 210 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> |
| 211 | - <el-input-number class="wid80" :disabled="true" placeholder="请输入低价百分比" | 211 | + <el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" |
| 212 | v-model="form.lowPriceWeightPercent"></el-input-number> | 212 | v-model="form.lowPriceWeightPercent"></el-input-number> |
| 213 | </el-form-item> | 213 | </el-form-item> |
| 214 | </el-col> | 214 | </el-col> |
| 215 | <el-col :span="12"> | 215 | <el-col :span="12"> |
| 216 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> | 216 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> |
| 217 | - <el-input-number class="wid80" :disabled="true" placeholder="请输入高价可配重量" v-model="form.highAvailableWeight" | 217 | + <el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" v-model="form.highAvailableWeight" |
| 218 | :precision="2"></el-input-number> | 218 | :precision="2"></el-input-number> |
| 219 | </el-form-item> | 219 | </el-form-item> |
| 220 | </el-col> | 220 | </el-col> |
| ... | @@ -222,7 +222,7 @@ | ... | @@ -222,7 +222,7 @@ |
| 222 | <el-row> | 222 | <el-row> |
| 223 | <el-col :span="12"> | 223 | <el-col :span="12"> |
| 224 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> | 224 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> |
| 225 | - <el-input-number class="wid80" :disabled="true" placeholder="请输入低价可配重量" v-model="form.lowAvailableWeight" | 225 | + <el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" v-model="form.lowAvailableWeight" |
| 226 | :precision="2"></el-input-number> | 226 | :precision="2"></el-input-number> |
| 227 | </el-form-item> | 227 | </el-form-item> |
| 228 | </el-col> | 228 | </el-col> |
| ... | @@ -248,12 +248,12 @@ | ... | @@ -248,12 +248,12 @@ |
| 248 | </el-col> | 248 | </el-col> |
| 249 | <el-col :span="12"> | 249 | <el-col :span="12"> |
| 250 | <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight"> | 250 | <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight"> |
| 251 | - <el-input class="wid80" v-model="form.accountTotalWeight" disabled /> | 251 | + <el-input class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" /> |
| 252 | </el-form-item> | 252 | </el-form-item> |
| 253 | </el-col> | 253 | </el-col> |
| 254 | <el-col :span="12"> | 254 | <el-col :span="12"> |
| 255 | <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight"> | 255 | <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight"> |
| 256 | - <el-input class="wid80" v-model="form.accountAllocatedWeight" disabled /> | 256 | + <el-input class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" /> |
| 257 | </el-form-item> | 257 | </el-form-item> |
| 258 | </el-col> | 258 | </el-col> |
| 259 | </el-row> | 259 | </el-row> |
| ... | @@ -498,6 +498,8 @@ export default { | ... | @@ -498,6 +498,8 @@ export default { |
| 498 | //输入航班号后 | 498 | //输入航班号后 |
| 499 | blurfltNo() { | 499 | blurfltNo() { |
| 500 | this.routeList = [] | 500 | this.routeList = [] |
| 501 | + this.form.accountTotalWeight = 0 | ||
| 502 | + this.form.accountAllocatedWeight = 0 | ||
| 501 | if ( | 503 | if ( |
| 502 | this.form.fltNo != null && | 504 | this.form.fltNo != null && |
| 503 | this.form.fltNo != undefined && | 505 | this.form.fltNo != undefined && | ... | ... |
| ... | @@ -522,7 +522,6 @@ export default { | ... | @@ -522,7 +522,6 @@ export default { |
| 522 | .catch(() => { | 522 | .catch(() => { |
| 523 | this.tableLoading = false; | 523 | this.tableLoading = false; |
| 524 | }); | 524 | }); |
| 525 | - this.$refs.newTables.clearTable(); | ||
| 526 | this.cargoTotal(); | 525 | this.cargoTotal(); |
| 527 | }, | 526 | }, |
| 528 | //释放舱位 | 527 | //释放舱位 | ... | ... |
| ... | @@ -67,6 +67,7 @@ export default { | ... | @@ -67,6 +67,7 @@ export default { |
| 67 | fltDate: undefined, | 67 | fltDate: undefined, |
| 68 | route: null, | 68 | route: null, |
| 69 | overweight: false, | 69 | overweight: false, |
| 70 | + notInWhite: false, | ||
| 70 | }, | 71 | }, |
| 71 | cargoHeader: [ | 72 | cargoHeader: [ |
| 72 | { name: "口岸代码", value: "portName", width: "" }, | 73 | { name: "口岸代码", value: "portName", width: "" }, |
| ... | @@ -120,11 +121,14 @@ export default { | ... | @@ -120,11 +121,14 @@ export default { |
| 120 | route: undefined, | 121 | route: undefined, |
| 121 | flightId: undefined, | 122 | flightId: undefined, |
| 122 | overweight: false, | 123 | overweight: false, |
| 124 | + notInWhite: false, | ||
| 123 | }; | 125 | }; |
| 124 | this.routeList = [] | 126 | this.routeList = [] |
| 125 | }, | 127 | }, |
| 126 | //确定配舱 | 128 | //确定配舱 |
| 127 | submit() { | 129 | submit() { |
| 130 | + this.formData.overweight = false | ||
| 131 | + this.formData.notInWhite = false | ||
| 128 | this.$refs.form.validate(val => { | 132 | this.$refs.form.validate(val => { |
| 129 | if (val) { | 133 | if (val) { |
| 130 | this.loading = true; | 134 | this.loading = true; |
| ... | @@ -140,26 +144,14 @@ export default { | ... | @@ -140,26 +144,14 @@ export default { |
| 140 | }) | 144 | }) |
| 141 | if (this.formData.fltNo && this.formData.fltDate) { | 145 | if (this.formData.fltNo && this.formData.fltDate) { |
| 142 | batchMoveCargoToOtherFlight(this.formData).then((res) => { | 146 | batchMoveCargoToOtherFlight(this.formData).then((res) => { |
| 143 | - this.loading = false; | 147 | + //code 200 配舱成功 202重量已满需要确认 203货物不在白名单需要确认 其余code直接输出msg 接口先判断重量后判断白名单 overweight/notInWhite初始默认false |
| 144 | - //code 200 迁转成功 202 重量已满需要确认 其余code直接输出msg | ||
| 145 | if (res.code === 200) { | 148 | if (res.code === 200) { |
| 149 | + this.loading = false; | ||
| 146 | this.msgSuccess(res.msg) | 150 | this.msgSuccess(res.msg) |
| 147 | this.cleaerForm(); | 151 | this.cleaerForm(); |
| 148 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 152 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 149 | - } else if (res.code === 202) { | 153 | + } else if (res.code === 201) { |
| 150 | - this.$confirm(res.msg, "提示", { | 154 | + this.loading = false; |
| 151 | - confirmButtonText: "确定", | ||
| 152 | - cancelButtonText: "取消", | ||
| 153 | - type: "warning", | ||
| 154 | - }) | ||
| 155 | - .then(() => { | ||
| 156 | - this.formData.overweight = true; //确定继续overweight变为true再次请求接口 | ||
| 157 | - batchMoveCargoToOtherFlight(this.formData).then((res) => { | ||
| 158 | - if (res.code === 200) { | ||
| 159 | - this.msgSuccess(res.msg) | ||
| 160 | - } else { | ||
| 161 | - this.msgWarning(res.msg) | ||
| 162 | - if (res.data != null && res.data.length > 0) { | ||
| 163 | let arr = [] | 155 | let arr = [] |
| 164 | res.data.forEach(item => { | 156 | res.data.forEach(item => { |
| 165 | let obj = { | 157 | let obj = { |
| ... | @@ -170,25 +162,44 @@ export default { | ... | @@ -170,25 +162,44 @@ export default { |
| 170 | }) | 162 | }) |
| 171 | this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } }) | 163 | this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } }) |
| 172 | this.dialogBeforeClose() | 164 | this.dialogBeforeClose() |
| 165 | + } else if (res.code === 202) { | ||
| 166 | + this.reBatchMoveCargoToOtherFlight(res.msg, 'overweight') | ||
| 167 | + } else if (res.code === 203) { | ||
| 168 | + this.reBatchMoveCargoToOtherFlight(res.msg, 'notInWhite') | ||
| 169 | + } else { | ||
| 170 | + this.loading = false; | ||
| 171 | + this.dialogBeforeClose() | ||
| 172 | + this.msgWarning(res.msg) | ||
| 173 | } | 173 | } |
| 174 | - } | 174 | + }).catch(() => { |
| 175 | - }); | 175 | + this.loading = false; |
| 176 | - this.cleaerForm(); | ||
| 177 | - this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 178 | - }) | ||
| 179 | - .catch(() => { | ||
| 180 | - //取消 取消当前配舱 | ||
| 181 | - this.msgSuccess('迁转已取消') | ||
| 182 | - this.cleaerForm(); | ||
| 183 | - this.$emit("dialogBeforeClose", { | ||
| 184 | - close: false, | ||
| 185 | - reload: true, | ||
| 186 | - }); | ||
| 187 | }); | 176 | }); |
| 188 | } else { | 177 | } else { |
| 189 | this.loading = false; | 178 | this.loading = false; |
| 190 | - this.msgWarning(res.msg) | 179 | + this.msgWarning('航班号或航班日期不能为空') |
| 191 | - if (res.data != null && res.data.length > 0) { | 180 | + } |
| 181 | + } | ||
| 182 | + }) | ||
| 183 | + }, | ||
| 184 | + //迁转白名单/超重确认 | ||
| 185 | + reBatchMoveCargoToOtherFlight(msg, status) { | ||
| 186 | + this.$confirm(msg, "提示", { | ||
| 187 | + confirmButtonText: "确定", | ||
| 188 | + cancelButtonText: "取消", | ||
| 189 | + type: "warning", | ||
| 190 | + }).then(() => { | ||
| 191 | + if (status == 'overweight') { | ||
| 192 | + this.formData.overweight = true; //确定继续overweight变为true再次请求接口 | ||
| 193 | + } else { | ||
| 194 | + this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口 | ||
| 195 | + } | ||
| 196 | + batchMoveCargoToOtherFlight(this.formData).then((res) => { | ||
| 197 | + if (res.code === 200) { | ||
| 198 | + this.loading = false | ||
| 199 | + this.msgSuccess('航班迁转成功') | ||
| 200 | + this.cleaerForm(); | ||
| 201 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 202 | + } else if (res.code === 201) { | ||
| 192 | let arr = [] | 203 | let arr = [] |
| 193 | res.data.forEach(item => { | 204 | res.data.forEach(item => { |
| 194 | let obj = { | 205 | let obj = { |
| ... | @@ -199,17 +210,23 @@ export default { | ... | @@ -199,17 +210,23 @@ export default { |
| 199 | }) | 210 | }) |
| 200 | this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } }) | 211 | this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } }) |
| 201 | this.dialogBeforeClose() | 212 | this.dialogBeforeClose() |
| 202 | - } | 213 | + } else if (res.code === 203) { |
| 203 | - } | 214 | + this.reBatchMoveCargoToOtherFlight(res.msg, 'notInWhite') |
| 204 | - }).catch(() => { | ||
| 205 | - this.loading = false; | ||
| 206 | - }); | ||
| 207 | } else { | 215 | } else { |
| 208 | - this.loading = false; | 216 | + this.msgWarning(res.msg) |
| 209 | - this.msgWarning('航班号或航班日期不能为空') | 217 | + this.loading = false |
| 210 | - } | ||
| 211 | } | 218 | } |
| 212 | }) | 219 | }) |
| 220 | + }).ctach(() => { | ||
| 221 | + //取消 取消当前配舱 | ||
| 222 | + this.loading = false | ||
| 223 | + this.msgSuccess('迁转已取消') | ||
| 224 | + this.cleaerForm(); | ||
| 225 | + this.$emit("dialogBeforeClose", { | ||
| 226 | + close: false, | ||
| 227 | + reload: true, | ||
| 228 | + }); | ||
| 229 | + }) | ||
| 213 | }, | 230 | }, |
| 214 | dialogBeforeClose() { | 231 | dialogBeforeClose() { |
| 215 | this.cleaerForm(); | 232 | this.cleaerForm(); | ... | ... |
-
Please register or login to post a comment