Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2022-01-26 17:47:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
066a119dcc41ae2add568bce106868c7f4880e10
066a119d
1 parent
d00659e9
手动配舱调试更新
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
src/utils/request.js
src/views/allocationConfig/cargoAllocation/info.vue
src/utils/request.js
View file @
066a119
...
...
@@ -79,7 +79,7 @@ service.interceptors.response.use(res => {
type
:
'error'
})
return
Promise
.
reject
(
new
Error
(
msg
))
}
else
if
(
code
!==
200
&&
code
!==
201
)
{
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!=
202
)
{
Message
({
message
:
msg
,
type
:
'error'
...
...
src/views/allocationConfig/cargoAllocation/info.vue
View file @
066a119
...
...
@@ -67,6 +67,7 @@
<script>
import { allocationFlight } from "@/api/cargoSelect";
import { MessageBox } from 'element-ui'
export default {
props: {
dialogVisible: {
...
...
@@ -129,6 +130,14 @@ export default {
};
},
methods: {
cleaerForm(){
this.formData={
ids:[],
fltNo: undefined,
fltDate:undefined,
overweight:false
}
},
//确定配舱
submit() {
let arr = [];
...
...
@@ -138,25 +147,25 @@ export default {
this.formData.ids = arr;
if(this.formData.fltNo && this.formData.fltDate){
allocationFlight(this.formData).then(res=>{//code 200 配舱成功 601 重量已满需要确认 其余code直接输出msg
if(code === 200){
if(
res.
code === 200){
this.$message({
message: "货物配舱成功",
type: "success",
});
}else if(code === 601){
this.$confirm('航班配重已满,是否继续配舱?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}else if(res.code === 202){
MessageBox.confirm('航班配重已满,是否继续配舱?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
this.formData.overweight = true;//确定继续overweight变为true再次请求接口
allocationFlight(this.formData).then(res=>{
if(code === 200){
if(
res.
code === 200){
this.$message({
message: "货物配舱成功",
type: "success",
});
this.$emit("dialogBeforeClose", {close:false,reload:false});
}else{
this.$message({
message: res.msg,
...
...
@@ -164,11 +173,14 @@ export default {
});
}
})
this.cleaerForm()
this.$emit("dialogBeforeClose", {close:false,reload:true});
}).catch(() => {//取消 取消当前配舱
this.$message({
message: "配舱已取消",
type: "success",
});
});
this.cleaerForm()
this.$emit("dialogBeforeClose", {close:false,reload:false});
});
}else{
...
...
@@ -177,7 +189,6 @@ export default {
type: "warning",
});
}
this.$emit("dialogBeforeClose", {close:false,reload:true});
})
}else{
this.$message({
...
...
@@ -187,6 +198,7 @@ export default {
}
},
dialogBeforeClose() {
this.cleaerForm()
this.$emit("dialogBeforeClose", {close:false,reload:false});
},
},
...
...
Please
register
or
login
to post a comment