jinhui.wang

提示语修正,数据初始化修正

...@@ -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,39 +144,18 @@ export default { ...@@ -140,39 +144,18 @@ 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 + //超重航班确实是否继续配舱
151 - confirmButtonText: "确定", 155 + this.reallocationFlight(res.msg, 'overweight')
152 - cancelButtonText: "取消", 156 + } else if (res.code === 203) {
153 - type: "warning", 157 + //不存在白名单中确实是否继续配舱
154 - }) 158 + this.reallocationFlight(res.msg, 'notInWhite')
155 - .then(() => {
156 - this.formData.overweight = true; //确定继续overweight变为true再次请求接口
157 - allocationFlight(this.formData).then((res) => {
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 { 159 } else {
177 this.loading = false; 160 this.loading = false;
178 this.msgWarning(res.msg) 161 this.msgWarning(res.msg)
...@@ -187,6 +170,40 @@ export default { ...@@ -187,6 +170,40 @@ export default {
187 } 170 }
188 }) 171 })
189 }, 172 },
173 + //手动配舱超重或白名单不存在提示
174 + reallocationFlight(msg, status) {
175 + this.$confirm(msg, "提示", {
176 + confirmButtonText: "确定",
177 + cancelButtonText: "取消",
178 + type: "warning",
179 + }).then(() => {
180 + if (status == 'overweight') {
181 + this.formData.overweight = true; //确定继续overweight变为true再次请求接口
182 + } else {
183 + this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口
184 + }
185 + allocationFlight(this.formData).then((res) => {
186 + if (res.code === 200) {
187 + this.loading = false
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')
193 + } else {
194 + this.msgWarning(res.msg)
195 + this.loading = false
196 + }
197 + });
198 + }).catch(() => {
199 + this.msgSuccess('配舱已取消')
200 + this.cleaerForm();
201 + this.$emit("dialogBeforeClose", {
202 + close: false,
203 + reload: true,
204 + });
205 + })
206 + },
190 dialogBeforeClose() { 207 dialogBeforeClose() {
191 this.cleaerForm(); 208 this.cleaerForm();
192 this.$refs['form'].clearValidate(); 209 this.$refs['form'].clearValidate();
......
...@@ -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,66 +144,32 @@ export default { ...@@ -140,66 +144,32 @@ 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: "确定", 155 + let arr = []
152 - cancelButtonText: "取消", 156 + res.data.forEach(item => {
153 - type: "warning", 157 + let obj = {
158 + waybillNo: item.split(':')[0],
159 + errorMessage: item.split(':')[1]
160 + }
161 + arr.push(obj)
154 }) 162 })
155 - .then(() => { 163 + this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } })
156 - this.formData.overweight = true; //确定继续overweight变为true再次请求接口 164 + this.dialogBeforeClose()
157 - batchMoveCargoToOtherFlight(this.formData).then((res) => { 165 + } else if (res.code === 202) {
158 - if (res.code === 200) { 166 + this.reBatchMoveCargoToOtherFlight(res.msg, 'overweight')
159 - this.msgSuccess(res.msg) 167 + } else if (res.code === 203) {
160 - } else { 168 + this.reBatchMoveCargoToOtherFlight(res.msg, 'notInWhite')
161 - this.msgWarning(res.msg)
162 - if (res.data != null && res.data.length > 0) {
163 - let arr = []
164 - res.data.forEach(item => {
165 - let obj = {
166 - waybillNo: item.split(':')[0],
167 - errorMessage: item.split(':')[1]
168 - }
169 - arr.push(obj)
170 - })
171 - this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } })
172 - this.dialogBeforeClose()
173 - }
174 - }
175 - });
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 - });
188 } else { 169 } else {
189 this.loading = false; 170 this.loading = false;
171 + this.dialogBeforeClose()
190 this.msgWarning(res.msg) 172 this.msgWarning(res.msg)
191 - if (res.data != null && res.data.length > 0) {
192 - let arr = []
193 - res.data.forEach(item => {
194 - let obj = {
195 - waybillNo: item.split(':')[0],
196 - errorMessage: item.split(':')[1]
197 - }
198 - arr.push(obj)
199 - })
200 - this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } })
201 - this.dialogBeforeClose()
202 - }
203 } 173 }
204 }).catch(() => { 174 }).catch(() => {
205 this.loading = false; 175 this.loading = false;
...@@ -211,6 +181,53 @@ export default { ...@@ -211,6 +181,53 @@ export default {
211 } 181 }
212 }) 182 })
213 }, 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) {
203 + let arr = []
204 + res.data.forEach(item => {
205 + let obj = {
206 + waybillNo: item.split(':')[0],
207 + errorMessage: item.split(':')[1]
208 + }
209 + arr.push(obj)
210 + })
211 + this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } })
212 + this.dialogBeforeClose()
213 + } else if (res.code === 203) {
214 + this.reBatchMoveCargoToOtherFlight(res.msg, 'notInWhite')
215 + } else {
216 + this.msgWarning(res.msg)
217 + this.loading = false
218 + }
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 + })
230 + },
214 dialogBeforeClose() { 231 dialogBeforeClose() {
215 this.cleaerForm(); 232 this.cleaerForm();
216 this.$refs['form'].clearValidate(); 233 this.$refs['form'].clearValidate();
......