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-11-15 16:54:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
136d566f2c0a027fe0bc8774186dd5780b235544
136d566f
1 parent
0f001404
校验增加,下载逻辑修改
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
133 additions
and
114 deletions
src/views/allocationConfig/cargoAllocation/info.vue
src/views/basicInformation/queryCargo/info.vue
src/views/systemLog/archiveData/index.vue
src/views/allocationConfig/cargoAllocation/info.vue
View file @
136d566
...
...
@@ -125,63 +125,67 @@ export default {
},
//确定配舱
submit() {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
}
})
if (this.formData.fltNo && this.formData.fltDate) {
allocationFlight(this.formData).then((res) => {
this.loading = false;
//code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg
if (res.code === 200) {
this.msgSuccess('货物配舱成功')
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 202) {
this.$confirm(res.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
allocationFlight(this.formData).then((res) => {
if (res.code === 200) {
this.msgSuccess('货物配舱成功')
} else {
this.msgWarning(res.msg)
}
});
this.$refs.form.validate(val => {
if (val) {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
}
})
if (this.formData.fltNo && this.formData.fltDate) {
allocationFlight(this.formData).then((res) => {
this.loading = false;
//code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg
if (res.code === 200) {
this.msgSuccess('货物配舱成功')
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
.catch(() => {
//取消 取消当前配舱
this.msgSuccess('配舱已取消')
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
});
} else if (res.code === 202) {
this.$confirm(res.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
allocationFlight(this.formData).then((res) => {
if (res.code === 200) {
this.msgSuccess('货物配舱成功')
} else {
this.msgWarning(res.msg)
}
});
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
.catch(() => {
//取消 取消当前配舱
this.msgSuccess('配舱已取消')
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
});
} else {
this.loading = false;
this.msgWarning(res.msg)
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning(
res.msg
)
this.msgWarning(
'航班号或航班日期不能为空'
)
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
}
})
},
dialogBeforeClose() {
this.cleaerForm();
...
...
src/views/basicInformation/queryCargo/info.vue
View file @
136d566
...
...
@@ -125,63 +125,67 @@ export default {
},
//确定配舱
submit() {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
}
})
if (this.formData.fltNo && this.formData.fltDate) {
batchMoveCargoToOtherFlight(this.formData).then((res) => {
this.loading = false;
//code 200 迁转成功 202 重量已满需要确认 其余code直接输出msg
if (res.code === 200) {
this.msgSuccess('货物迁转成功')
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 202) {
this.$confirm(res.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
batchMoveCargoToOtherFlight(this.formData).then((res) => {
if (res.code === 200) {
this.msgSuccess('货物迁转成功')
} else {
this.msgWarning(res.msg)
}
});
this.$refs.form.validate(val => {
if (val) {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
}
})
if (this.formData.fltNo && this.formData.fltDate) {
batchMoveCargoToOtherFlight(this.formData).then((res) => {
this.loading = false;
//code 200 迁转成功 202 重量已满需要确认 其余code直接输出msg
if (res.code === 200) {
this.msgSuccess('货物迁转成功')
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
.catch(() => {
//取消 取消当前配舱
this.msgSuccess('迁转已取消')
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
});
} else if (res.code === 202) {
this.$confirm(res.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
batchMoveCargoToOtherFlight(this.formData).then((res) => {
if (res.code === 200) {
this.msgSuccess('货物迁转成功')
} else {
this.msgWarning(res.msg)
}
});
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
.catch(() => {
//取消 取消当前配舱
this.msgSuccess('迁转已取消')
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
});
} else {
this.loading = false;
this.msgWarning(res.msg)
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning(
res.msg
)
this.msgWarning(
'航班号或航班日期不能为空'
)
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
}
})
},
dialogBeforeClose() {
this.cleaerForm();
...
...
src/views/systemLog/archiveData/index.vue
View file @
136d566
...
...
@@ -23,24 +23,26 @@
:loading="loading" @currentChange="currentChange">
<template v-slot:queryParameter="scope">
<el-popover placement="top" width="350" trigger="hover">
<ul v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''">
<ul style="height:300px;overflow-y:scroll;"
v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''">
<li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')"
:key="index">{{ item }}</li>
:key="index"
style="border-bottom:1px solid #E4E7ED;margin-bottom:5px"
>{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</template>
<template v-slot:downloadPath="scope">
<el-button v-if="scope.row.downloadPath != null
" type="text" size="mini" icon="el-icon-download
"
@click="download(scope.row)">下载
<el-button v-if="scope.row.downloadPath != null
&& scope.row.status == 1" type="text" size="mini
"
icon="el-icon-download"
@click="download(scope.row)">下载
</el-button>
<span v-else>暂无下载</span>
</template>
</Tables>
</div>
</template>
<script>
import { findArchiveCargoLog } from "@/api/system/logConfig.js";
import { findArchiveCargoLog
, isExistZip
} from "@/api/system/logConfig.js";
import { downLoadZip } from "@/utils/zipdownload";
export default {
...
...
@@ -55,7 +57,7 @@ export default {
tableHeader: this.tableHeaders['archiveData'],
tableHeight: null,
total: 0,
loading: false
loading: false
,
}
},
created() {
...
...
@@ -91,10 +93,19 @@ export default {
})
},
download(val) {
let url = 'entrymanager/entryExcel/download'
let filename = val.packageName
downLoadZip(url, val, filename)
isExistZip(val).then(res => {
if (res.code === 200) {
setTimeout(() => {
let url = '/archiveCargoLog/downloadZip'
let filename = val.packageName
downLoadZip(url, val, filename)
}, 500);
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
currentChange(val) {
this.selectForm.page = val.page
...
...
Please
register
or
login
to post a comment