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-13 17:52:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0bea94d4d5f15a92920c767b91f738de7bee6d8
b0bea94d
1 parent
785bf810
version:0.5.3,货物查询表头排序,table高度,按钮状态,顺位配舱更新,接口更新
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
111 additions
and
69 deletions
src/layout/components/Navbar.vue
src/layout/components/TagsView/ScrollPane.vue
src/layout/components/TagsView/index.vue
src/settings.js
src/utils/request.js
src/utils/zipdownload.js
src/views/allocationConfig/flightRandConfig/index.vue
src/views/basicInformation/queryCargo/index.vue
vue.config.js
src/layout/components/Navbar.vue
View file @
b0bea94
...
...
@@ -13,13 +13,12 @@
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
<!-- <i class="el-icon-caret-bottom" /> -->
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<
el-dropdown-item>个人中心</el-dropdown-item
>
<
!-- <el-dropdown-item>个人中心</el-dropdown-item> --
>
</router-link>
<el-dropdown-item
divided
@click.native="logout">
<el-dropdown-item @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
...
...
src/layout/components/TagsView/ScrollPane.vue
View file @
b0bea94
...
...
@@ -88,7 +88,7 @@ export default {
}
.el-scrollbar__wrap {
// height: 49px;
margin-top:
8
px;
margin-top:
4
px;
}
}
}
...
...
src/layout/components/TagsView/index.vue
View file @
b0bea94
...
...
@@ -225,7 +225,7 @@ export default {
<style lang="scss" scoped>
.tags-view-container {
height:
50
px;
height:
33
px;
width: 100%;
background: #fff;
border-bottom: 1px solid #d8dce5;
...
...
@@ -243,7 +243,7 @@ export default {
padding: 0 8px;
font-size: 12px;
margin-left: 5px;
margin-top: 4px;
//
margin-top: 4px;
&:first-of-type {
margin-left: 15px;
}
...
...
src/settings.js
View file @
b0bea94
...
...
@@ -42,5 +42,5 @@ module.exports = {
/**
* 版本号
*/
version
:
'version:0.5.
2
'
version
:
'version:0.5.
3
'
}
...
...
src/utils/request.js
View file @
b0bea94
...
...
@@ -9,7 +9,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const
service
=
axios
.
create
({
// axios中请求配置有baseURL选项,表示请求URL公共部分
//baseURL: process.env.VUE_APP_BASE_API,
// baseURL: `http://47.103.140.98:
900
2`,
// baseURL: `http://47.103.140.98:
7001/IMAC
2`,
baseURL
:
'https://imacuat.zmd.apac.fedex.com/IMAC2'
,
// baseURL: 'http://192.168.1.134:18080',
...
...
src/utils/zipdownload.js
View file @
b0bea94
...
...
@@ -5,9 +5,9 @@ const mimeMap = {
xlsx
:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
,
zip
:
'application/zip'
}
const
baseUrl
=
'https://imacuat.zmd.apac.fedex.com/IMAC2'
// const baseUrl = 'http://47.103.140.98:
9002'
// const baseUrl = 'http://192.168.1.13
4:18080'
const
baseUrl
=
'https://imacuat.zmd.apac.fedex.com/IMAC2'
//uat服务器
// const baseUrl = 'http://47.103.140.98:
7001/IMAC2' //阿里云服务器
// const baseUrl = 'http://192.168.1.13
3:7001/IMAC2' //测试服务器
export
function
downLoadZip
(
str
,
filename
)
{
var
url
=
baseUrl
+
str
axios
({
...
...
@@ -19,18 +19,23 @@ export function downLoadZip(str, filename) {
resolveBlob
(
res
,
mimeMap
.
zip
)
})
}
export
function
cargoXlsx
(
str
,
data
)
{
export
function
cargoXlsx
(
str
,
data
)
{
var
url
=
baseUrl
+
str
return
new
Promise
((
resolve
,
rej
)
=>
{
axios
({
method
:
'post'
,
url
:
url
,
data
:
data
,
data
:
data
,
responseType
:
'blob'
,
headers
:
{
'Authorization'
:
getToken
()
}
}).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
cargoTableXlsx
(
res
)
}
resolve
()
}).
catch
((
err
)
=>
{
rej
(
err
)
})
})
}
/**
...
...
@@ -55,10 +60,10 @@ export function resolveBlob(res, mimeType) {
}
//货物查询表导出
export
function
cargoTableXlsx
(
res
)
{
export
function
cargoTableXlsx
(
val
)
{
const
aLink
=
document
.
createElement
(
'a'
)
const
fileName
=
"货物查询表.xlsx"
aLink
.
href
=
URL
.
createObjectURL
(
res
.
data
)
aLink
.
href
=
URL
.
createObjectURL
(
val
.
data
)
aLink
.
setAttribute
(
'download'
,
fileName
)
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
)
aLink
.
click
()
...
...
src/views/allocationConfig/flightRandConfig/index.vue
View file @
b0bea94
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="原航班" prop="sourceFlightNo">
<el-input v-model="queryParams.sourceFlightNo" placeholder="请输入原航班" clearable size="small" />
<el-form-item label="原航班">
<el-input type="text" v-model="upCase" placeholder="请输入原航班" clearable class="formItem"></el-input>
<!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> -->
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择" clearable size="small">
...
...
@@ -37,7 +39,9 @@
<el-table v-loading="loading" :data="sourceFlightRulesList">
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="原航班" align="center" prop="sourceFlightNo" />
<el-table-column label="配载航班排序" align="center" prop="flightRank" width="280" />
<!-- <el-table-column label="优先级" align="center" prop="priority" /> -->
...
...
@@ -54,7 +58,7 @@
删除</el-button>
<el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'"
@click="handleDeleteorPlayorpause(scope.row,1,'启用')">启用</el-button>
<el-button size="mini" type="text" icon="el-icon-video-pause"
v-if="scope.row.status == '1
'"
<el-button size="mini" type="text" icon="el-icon-video-pause"
v-if="scope.row.status != '3
'"
@click="handleDeleteorPlayorpause(scope.row,3,'停用')">停用</el-button>
</template>
</el-table-column>
...
...
@@ -67,13 +71,16 @@
<!-- 查看目的航班对话框 -->
<el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" :append-to-body="true">
<el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate">
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="原航班" align="center" prop="sourceFlightNo" />
<el-table-column label="实际配载航班" align="center" prop="actualFlight" width="280" />
<el-table-column label="航班日期" align="center" prop="flightDate" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleClick(scope.row.sourceFlightNo, 'detail')">查看配置维度</el-button>
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail')">查看配置维度</el-button>
</template>
</el-table-column>
</el-table>
...
...
@@ -84,7 +91,7 @@
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="
60%" :close-on-click-modal="false" :append-to-body="tru
e">
<el-dialog :title="title" :visible.sync="open" width="
55%" :append-to-body="true" :close-on-click-modal="fals
e">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="10">
...
...
@@ -94,7 +101,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="
12
">
<el-col :span="
8
">
<el-form-item label="有效开始时间" prop="startDate">
<el-date-picker clearable size="small" :picker-options="pickerOptionsStart" v-model="form.startDate"
type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间">
...
...
@@ -110,8 +117,8 @@
</el-col>
<el-col :span="24" style="margin-bottom: 5%;">
<span style="color: red;margin-left: 10%;">提示:配载航班之同请用分号分隔【符号不区分中英文】,例:CA1053
:
C7433</span><br />
<span style="color: red;margin-left: 10%;">提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1
:
CZ433-1</span>
<span style="color: red;margin-left: 10%;">提示:配载航班之同请用分号分隔【符号不区分中英文】,例:CA1053
;
C7433</span><br />
<span style="color: red;margin-left: 10%;">提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1
;
CZ433-1</span>
</el-col>
<el-col :span="24">
<el-form-item label="配载航班" prop="flightRank">
...
...
@@ -186,7 +193,7 @@
statusList: [{
'id': 1,
'name': '有效'
},{
},
{
'id': 3,
'name': '停用'
}],
...
...
@@ -230,9 +237,13 @@
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.$router.push({
name: "Info",
params: { handle: handle, id: flightiId },
name: "flightAllocConfigInfo",
params: {
handle: handle,
id: flightiId
},
});
},
/** 查询原航班顺位规则*/
findSourceFlightRules() {
...
...
@@ -270,14 +281,14 @@
this.dayOfWeek = [];
this.open = true;
this.title = "修改原航班顺位规则";
this.form =
row
;
this.form =
JSON.parse(JSON.stringify(row))
;
this.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
//this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
},
/** 删除 启用 停用按钮操作 */
handleDeleteorPlayorpause(row, status, statusText) {
debugger
//
debugger
//删除前需要停用
if (status === 0 && row.status != '3') {
this.$message({
...
...
@@ -314,8 +325,17 @@
this.$refs["form"].validate(valid => {
if (valid) {
this.form.dayOfWeek = this.dayOfWeek.sort();
let formdata = JSON.parse(JSON.stringify(this.form));
formdata.sourceFlightNo=formdata.sourceFlightNo.trim().toUpperCase();
formdata.flightRank=formdata.flightRank.trim().toUpperCase();
if (formdata.startDate === undefined || formdata.startDate == null) {
formdata.startDate = "";
}
if (formdata.endDate === undefined || formdata.endDate == null) {
formdata.endDate = "";
}
//处理数据
sourceFlightRulesSaveApi(
this.form
).then(response => {
sourceFlightRulesSaveApi(
formdata
).then(response => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.open = false;
...
...
@@ -372,13 +392,14 @@
// 取消按钮
cancel() {
this.open = false;
//
this.reset();
//this.reset();
},
// 状态字典翻译
statusFormat(row) {
if (row.status === '1') {
return '有效'
} else if (row.status === '
2
') {
} else if (row.status === '
0
') {
return '执行中'
} else if (row.status === '3') {
return '停用'
...
...
@@ -387,6 +408,7 @@
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.sourceFlightNo = undefined
this.resetForm("queryForm");
this.handleQuery();
},
...
...
@@ -395,9 +417,19 @@
this.queryParams.pageNum = 1;
this.queryParams.start = 0;
this.findSourceFlightRules();
}
}
,
}
},
computed: {
upCase: {
get: function() {
return this.queryParams.sourceFlightNo;
},
set: function(val) {
this.queryParams.sourceFlightNo = val.toUpperCase();
},
},
},
};
</script>
<style>
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
b0bea94
<template>
<div class="cargoPage"
v-loading="downloading"
>
<div class="cargoPage">
<el-form
ref="cargoForm"
size="small"
...
...
@@ -136,7 +136,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS航班号:">
<el-form-item label="ACCS
原
航班号:">
<el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input>
</el-form-item>
</el-col>
...
...
@@ -300,16 +300,17 @@
type="primary"
icon="el-icon-search"
size="small"
:loading="tableLoading"
@click="select"
>查询</el-button
>
<el-button type="primary" size="small" @click="checks(tableData)"
>全选/全否</el-button
>
<el-button type="primary" size="small" @click="xlse(0)" v-dbClick :disabled="tableData.length==0"
<el-button type="primary" size="small" @click="xlse(0)" v-dbClick :disabled="tableData.length==0"
:loading="downloading"
>导出本页查询结果</el-button
>
<el-button type="primary" size="small" @click="xlse(1)" v-dbClick :disabled="tableData.length==0"
<el-button type="primary" size="small" @click="xlse(1)" v-dbClick :disabled="tableData.length==0"
:loading="downloading"
>导出全部查询结果</el-button
>
<div class="tips">
...
...
@@ -323,6 +324,7 @@
:data="tableData"
v-loading="tableLoading"
highlight-current-row border stripe
height="430"
size="mini"
@select="cheacked"
@select-all="selectAll"
...
...
@@ -392,50 +394,50 @@ export default {
cargoPlaneEnd:null,
}, //表单数据
tableHeader: [
{ name: "口岸代码", value: "portName" },
{ name: "取件日期", value: "pickUpDate" },
{ name: "取件扫描号", value: "pickUpScanNo" },
{ name: "
服务类型", value: "serviceTyp
eName" },
{ name: "
站点", value: "sit
eName" },
{ name: "运单号", value: "waybillNo" },
{ name: "服务类型", value: "serviceTypeName" },
{ name: "URSA", value: "ursa" },
{ name: "申报类型", value: "typeName" },
{ name: "HandlingCode", value: "handingCode" },
{ name: "subcategory", value: "subCategory" },
{ name: "件数", value: "qty" },
{ name: "实际重量", value: "actualWeight" },
{ name: "收件人国家代码", value: "consigneeCountry" },
{ name: "品名描述", value: "nameDescription" },
{ name: "海关回执状态", value: "customsReceiptStatusName" },
{ name: "总单号", value: "totalWaybillNo" },
{ name: "预审状态", value: "preQualificationStatus" },
{ name: "航班预审意见", value: "caPretrialOpinion" },
{ name: "货物状态", value: "statusName" },
{ name: "终配航班号", value: "finalFlightNo" },
{ name: "终配航班日期", value: "finalFlightTime" },
{ name: "二配航班号", value: "twoMatchFlightNo" },
{ name: "二配航班日期", value: "twoMatchFlightTime" },
{ name: "预配航班号", value: "preplanFlightNo" },
{ name: "预配航班日期", value: "preplanFlightTime" },
{ name: "ACCS原航班号", value: "fltNoAccs" },
{ name: "ACCS原航班日期", value: "fltDateAccs" },
{ name: "ACCS原航线", value: "accsFlightRoute" },
{ name: "预配航班日期", value: "preplanFlightTime" },
{ name: "预配航班号", value: "preplanFlightNo" },
{ name: "二配航班日期", value: "twoMatchFlightTime" },
{ name: "二配航班号", value: "twoMatchFlightNo" },
{ name: "终配航班日期", value: "finalFlightTime" },
{ name: "终配航班号", value: "finalFlightNo" },
{ name: "件数", value: "qty" },
{ name: "实际重量", value: "actualWeight" },
{ name: "申报类型", value: "typeName" },
{ name: "口岸代码", value: "portName" },
{ name: "subcategory", value: "subCategory" },
{ name: "是否RDE手工录入", value: "manualRde" },
{ name: "是否自动", value: "cargoRulesStatus" },
{ name: "发件人账号", value: "shipperAccount" },
{ name: "发件公司中文名称", value: "shipperCompany" },
{ name: "是否RDE手工录入", value: "manualRde" },
{ name: "HandlingCode", value: "handingCode" },
{ name: "品名描述", value: "nameDescription" },
{ name: "站点", value: "siteName" },
{ name: "始发地城市名称", value: "originCity" },
{ name: "收件地", value: "destinationSiteName" },
{ name: "收件人国家代码", value: "consigneeCountry" },
{ name: "URSA", value: "ursa" },
{ name: "尺寸", value: "sizeStr" },
{ name: "海关回执状态", value: "customsReceiptStatusName" },
{ name: "海关回执时间", value: "customsReceiptTime" },
{ name: "预审状态", value: "preQualificationStatus" },
{ name: "CA预审意见", value: "caPretrialOpinion" },
{ name: "CA预审时间", value: "caPretrialTime" },
{
name: "大货预审意见(是否可以配置
CA
航班)",
name: "大货预审意见(是否可以配置航班)",
value: "bigPretrialOpinion",
},
{ name: "大货预审时间", value: "bigPretrialTime" },
{ name: "创建人", value: "createUserId" },
{ name: "海关回执时间", value: "customsReceiptTime" },
{ name: "航班预审时间", value: "caPretrialTime" },
{ name: "创建人", value: "createUserName" },
{ name: "创建时间", value: "createTime" },
{ name: "是否自动", value: "cargoRulesStatus" },
], //表头数据
findConditionData: {}, //货物查询条件
tableData: [], //表格数据
...
...
@@ -647,6 +649,7 @@ export default {
},
// 导出表格
xlse(page) {
this.downloading = true;
let cargoXlse = {title:"货物导出表",cargoConditionDto:{}};
if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){
this.formData.customsReceiptStatusId = null;
...
...
@@ -688,12 +691,15 @@ export default {
cargoXlse.cargoConditionDto.limitStart = 0;
cargoXlse.cargoConditionDto.limitSize = -1;
}
cargoXlsx("/cargo/excel",cargoXlse)
cargoXlsx("/cargo/excel",cargoXlse).then(()=>{
this.downloading = false;
}).catch(()=>{
this.downloading = false;
})
},
//表格格式化
formatter(row,column,cellValue,index){
if(column.property=="cargoRulesStatus"){
console.log()
if(cellValue == 1){
return cellValue = "手动"
}else if(cellValue == 2){
...
...
vue.config.js
View file @
b0bea94
...
...
@@ -36,7 +36,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`https://imacuat.zmd.apac.fedex.com/IMAC2`
,
// target: `http://47.103.140.98:
900
2`,
// target: `http://47.103.140.98:
7001/IMAC
2`,
// target: `http://192.168.1.134:18080`,
changeOrigin
:
true
,
pathRewrite
:
{
...
...
Please
register
or
login
to post a comment