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
2021-12-13 12:52:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
833af9f015edb71f04ec642cb1fa4092a7e56180
833af9f0
1 parent
b8b1c400
货物查询
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
592 additions
and
0 deletions
src/api/cargoSelect.js
src/views/allocationConfig/cargoConfig/index.vue
src/api/cargoSelect.js
0 → 100644
View file @
833af9f
import
request
from
'@/utils/request'
// 货物查询查询条件数据
export
function
findConditionData
(
data
)
{
return
request
({
url
:
'/cargo/findConditionData'
,
method
:
'post'
,
data
:
data
})
}
//货物查询
export
function
findCargoData
(
data
)
{
return
request
({
url
:
'/cargo/findCargoData'
,
method
:
'post'
,
data
:
data
})
}
src/views/allocationConfig/cargoConfig/index.vue
0 → 100644
View file @
833af9f
<template>
<div>
<el-form
ref="cargoForm"
size="mini"
inline
:model="formData"
label-position="right"
label-width="105px"
style="margin: 15px"
>
<el-row>
<el-col :span="6">
<el-form-item label="航班日期:">
<el-date-picker
v-model="flightTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="预配航班日期:">
<el-date-picker
v-model="prepalyFlightTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期:">
<el-date-picker
v-model="createDate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="取件日期:">
<el-date-picker
v-model="formData.pickUpDate"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号:">
<el-input
size="small"
type="text"
v-model="formData.waybillNo"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点:">
<el-input
size="small"
type="text"
v-model="formData.siteName"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班号:">
<el-input
size="small"
type="text"
v-model="upCase"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班序列单号:">
<el-input
size="small"
type="text"
v-model="formData.mawbCode"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA:">
<el-input
size="small"
type="text"
v-model="formData.ursa"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别:">
<el-select
placeholder="不限"
v-model="formData.typeId"
clearable
>
<el-option
v-for="item in findConditionData.cargoType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态:">
<el-select
placeholder="不限"
v-model="formData.statusId"
clearable
>
<el-option
v-for="item in findConditionData.cargoStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配置航班类型:">
<el-select
placeholder="不限"
v-model="formData.kindToAllocFlightId"
clearable
>
<el-option
v-for="item in findConditionData.configureFlightType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="历史货物状态:">
<el-select
placeholder="不限"
v-model="formData.historyAllocaCargoTypeId"
clearable
>
<el-option
v-for="item in findConditionData.cargoStatusHistory"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态:">
<el-select
placeholder="不限"
v-model="formData.customsReceiptStatusId"
clearable
>
<el-option
v-for="item in findConditionData.cargoCustomsReturnStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型:">
<el-select
placeholder="不限"
v-model="formData.serviceTypeId"
clearable
>
<el-option
v-for="item in findConditionData.cargoServiceType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="数据源:">
<el-select
placeholder="不限"
v-model="formData.dataSources"
clearable
>
<el-option label="人工导入" value="1"> </el-option>
<el-option label="系统导入" value="2"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否大货:">
<el-select
placeholder="不限"
v-model="formData.big"
clearable
>
<el-option label="是" value="1"> </el-option>
<el-option label="否" value="0"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否自动:">
<el-select
placeholder="不限"
v-model="formData.allocationTypeId"
clearable
>
<el-option
v-for="item in findConditionData.cargoAllocationType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div style="paddingleft: 10px">
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="select"
>查询</el-button
>
<el-button type="primary" size="small" @click="checks(tableDate)"
>全选/全否</el-button
>
<el-button type="primary" size="small" @click="xlse(limitStart)"
>导出本页查询结果</el-button
>
<el-button type="primary" size="small" @click="xlse(0)"
>导出全部查询结果</el-button
>
<div class="tips">
<span style="paddingright: 50px">总重量:{{ allWeight }}</span
> <span>总件数:{{ allQty }}</span>
</div>
</div>
</el-form>
<el-table
ref="cargoTable"
:data="tableDate"
style="width: 100%"
size="small"
height="500"
v-loading="tableLoading"
fit
@select="cheacked"
>
<el-table-column type="selection" width="55" fixed> </el-table-column>
<el-table-column type="index" label="序号">
<template slot-scope="scope">{{scope.$index+1}}</template>
</el-table-column>
<el-table-column
v-for="item in tableHeader"
:prop="item.value"
:label="item.name"
:key="item.name"
width="100%"
header-align="center"
align="center"
>
</el-table-column>
</el-table>
<el-pagination
:total="totalCount"
hide-on-single-page
:page-size.sync="limitSize"
background
style="margin-top: 40px; text-align: right"
@next-click="nextClick"
@prev-click="prevClick"
@current-change="currentChange"
>
</el-pagination>
</div>
</template>
<script>
import { findConditionData, findCargoData } from "@/api/cargoSelect";
import { downLoadZip } from "@/utils/zipdownload";
export default {
data() {
return {
formData: {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
}, //表单数据
tableHeader: [
{ name: "配置航班类型", value: "kindIdToAllocFlightName" },
{ name: "取件日期", value: "pickUpDate" },
{ name: "取件扫描号", value: "pickUpScanNo" },
{ name: "服务类型", value: "serviceTypeName" },
{ name: "运单号", value: "waybillNo" },
{ name: "状态", value: "statusName" },
{ name: "航班号", value: "fltNo" },
{ name: "航班日期", value: "fltDate" },
{ name: "原航班", value: "sourceFlt" },
{ name: "已选目的航班", value: "fltSet" },
{ name: "件数", value: "qty" },
{ name: "实际重量", value: "actualWeight" },
{ name: "航班序号单", value: "mawbCode" },
{ name: "申报类型", value: "typeName" },
{ name: "历史货物状态", value: "historyAllocaCargoTypeName" },
{ name: "预配航班日期", value: "prematchFltDate" },
{ name: "品名描述", value: "nameDescription" },
{ name: "站点", value: "siteName" },
{ name: "收件地", value: "destinationSiteName" },
{ name: "目的国家", value: "countryName" },
{ name: "Bagging ID", value: "baggingId" },
{ name: "URSA", value: "ursa" },
{ name: "selection Code", value: "selectionCode" },
{ name: "尺寸", value: "sizeStr" },
{ name: "体积", value: "volume" },
{ name: "是否大货", value: "big" },
{ name: "历史航班号", value: "historyFltNo" },
{ name: "海关回执状态", value: "customsReceiptStatusName" },
{ name: "海关回执时间", value: "customsReceiptTime" },
{ name: "CA预审意见", value: "caPretrialOpinion" },
{ name: "CA回执时间", value: "caPretrialTime" },
{
name: "大货预审意见(是否可以配置CA航班)",
value: "bigPretrialOpinion",
},
{ name: "大货预审时间", value: "bigPretrialTime" },
{ name: "是否已经传送到图像系统", value: "transmitFlg" },
{ name: "传送时间", value: "transmitUploadTime" },
{ name: "图像系统反馈结果", value: "transmitFeedbackTime" },
{ name: "图像系统反馈时间", value: "transmitFeedbackResult" },
{ name: "创建人", value: "createUserId" },
{ name: "创建时间", value: "createTime" },
{ name: "数据源", value: "dataSources" },
{ name: "是否自动", value: "allocationTypeName" },
], //表头数据
findConditionData: {}, //货物查询条件
tableDate: [], //表格数据
allWeight: 0,
allQty: 0,
shiftKey: false,
start: -1,
valueFormat:'yyyy-MM-dd',
tableLoading:false,
totalCount:0,
selectTable: [],
flightTime: [],
prepalyFlightTime: [],
createDate: [],
limitStart: 0,
limitSize: 100,//无限制-1
};
},
created() {
//查询条件
findConditionData().then((res) => {
if (res.code == 200) {
this.findConditionData = res.data;
}else{
this.$message({
message: '查询条件不存在',
type: 'warning',
});
}
});
},
mounted() {
window.addEventListener("keydown", (code) => {
if (code.keyCode === 16 && code.shiftKey) {
this.shiftKey = true;
}
});
window.addEventListener("keyup", (code) => {
if (code.keyCode === 16) {
this.shiftKey = false;
}
});
},
methods: {
clear(){
this.$refs.cargoForm.resetFields()
},
//查询
select() {
this.tableLoading = true;
if(this.createDate.length > 0){
this.formData.createTimeStart = this.createDate[0];
this.formData.createTimeEnd = this.createDate[1];
}
if(this.prepalyFlightTime.length > 0){
this.formData.prematchFltDateStart = this.prepalyFlightTime[0];
this.formData.prematchFltDateEnd = this.prepalyFlightTime[1];
}
if(this.flightTime.length > 0){
this.formData.fltDateStart = this.flightTime[0];
this.formData.fltDateEnd = this.flightTime[1];
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = this.limitSize;
findCargoData(this.formData).then((res) => {
if (res.code == 200) {
if(res.data.list.length > 0 ){
this.tableDate = res.data.list;
this.totalCount = res.data.totalCount;
for (let i = 0; i < this.tableDate.length; i++) {
this.tableDate[i].index = i;
}
}else{
this.$message({
message: '未查询到数据',
type: 'warning',
});
}
}else{
this.$message({
message: res.msg,
type: 'warning',
});
}
this.tableLoading = false;
});
},
//全选反选
checks(rows) {
if (rows) {
rows.forEach((row) => {
this.$refs.cargoTable.toggleRowSelection(row);
});
} else {
this.$refs.cargoTable.clearSelection();
}
},
//下一页
nextClick(){
this.limitStart = this.limitStart + 100;
},
//上一页
prevClick(){
this.limitStart = this.limitStart - 100;
},
//指定页数
currentChange(page){
this.limitStart = (page-1)*100;
this.select()
},
//表单项选中操作
cheacked(sl, row) {
if (this.shiftKey) {
if (this.start == -1) {
for (let i = 0; i <= row.index; i++) {
this.$refs.cargoTable.toggleRowSelection(this.tableDate[i], true);
this.selectTable.push(this.tableDate[i]);
}
} else {
for (let i = this.start + 1; i <= row.index; i++) {
this.$refs.cargoTable.toggleRowSelection(this.tableDate[i], true);
}
}
} else {
this.start = row.index;
if (this.selectTable.length == 0) {
this.selectTable.push(row);
} else {
let newselect = [];
newselect.push(row);
for (let i = 0; i < this.selectTable.length; i++) {
if (this.selectTable[i].id != row.id) {
newselect.push(this.selectTable[i])
}else{
newselect.splice(0, 1);
}
}
this.selectTable = newselect
}
}
this.allWeight = 0;
this.allQty = 0;
for (let i = 0; i < this.selectTable.length; i++) {
this.allWeight = this.allWeight + this.selectTable[i].actualWeight;
this.allQty = this.allQty + this.selectTable[i].qty;
}
this.allQty = this.allQty.toFixed(0);
this.allWeight = this.allWeight.toFixed(1);
},
// 全部、当前页面
xlse(page) {
if(page > 0 ){
}else{
}
console.log(page);
},
},
computed:{
upCase:{
get: function(){
return this.formData.fltNo;
},
set: function(val){
this.formData.fltNo = val.toUpperCase();
}
}
}
};
</script>
<style>
.tips {
float: right;
color: #606266;
font-size: 14px;
margin-right: 20px;
}
</style>
\ No newline at end of file
Please
register
or
login
to post a comment