切换导航条
此项目
正在载入...
登录
朱兆平
/
vue_cli
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
朱兆平
5 years ago
提交
7afa5892cf919d2e9439756b81996d4787038551
2 个父辈
649ce421
130b9b4b
合并分支 'nmms-import-dev' 到 'master'
Nmms import dev 查看合并请求
!14
隐藏空白字符变更
内嵌
并排对比
正在显示
15 个修改的文件
包含
371 行增加
和
104 行删除
package-lock.json
package.json
src/api/htmlToPdf.js
src/routes.js
src/views/Home.vue
src/views/nmms_import/AllocateSearch.vue
src/views/nmms_import/Allocatearrive.vue
src/views/nmms_import/EnterFlightInfo.vue
src/views/nmms_import/EnterFlightTally.vue
src/views/nmms_import/Importallocation.vue
src/views/nmms_import/OrigFlightList.vue
src/views/nmms_import/OrigMaster.vue
src/views/nmms_import/TallyMster.vue
src/views/nmms_import/Waybill.vue
src/views/nmms_import/new.vue
package-lock.json
查看文件 @
7afa589
...
...
@@ -1610,6 +1610,11 @@
}
}
},
"base64-arraybuffer"
:
{
"version"
:
"0.2.0"
,
"resolved"
:
"https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz"
,
"integrity"
:
"sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ=="
},
"base64-js"
:
{
"version"
:
"1.3.1"
,
"resolved"
:
"https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz"
,
...
...
@@ -1972,9 +1977,9 @@
}
},
"cfb"
:
{
"version"
:
"1.1.3"
,
"resolved"
:
"https://registry.npmjs.org/cfb/-/cfb-1.1.3.tgz"
,
"integrity"
:
"sha512-joXBW0nMuwV9no7UTMiyVJnQL6XIU3ThXVjFUDHgl9MpILPOomyfaGqC290VELZ48bbQKZXnQ81UT5HouTxHsw=="
,
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/cfb/-/cfb-1.1.4.tgz"
,
"integrity"
:
"sha512-rwFkl3aFO3f+ljR27YINwC0x8vPjyiEVbYbrTCKzspEf7Q++3THdfHVgJYNUbxNcupJECrLX+L40Mjm9hm/Bgw=="
,
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
"commander"
:
"^2.16.0"
,
...
...
@@ -2754,6 +2759,14 @@
"integrity"
:
"sha1-gIrcLnnPhHOAabZGyyDsJ762KeA="
,
"dev"
:
true
},
"css-line-break"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz"
,
"integrity"
:
"sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA=="
,
"requires"
:
{
"base64-arraybuffer"
:
"^0.2.0"
}
},
"css-loader"
:
{
"version"
:
"0.26.4"
,
"resolved"
:
"https://registry.npmjs.org/css-loader/-/css-loader-0.26.4.tgz"
,
...
...
@@ -5017,6 +5030,14 @@
"toposort"
:
"^1.0.0"
}
},
"html2canvas"
:
{
"version"
:
"1.0.0-rc.5"
,
"resolved"
:
"https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.5.tgz"
,
"integrity"
:
"sha512-DtNqPxJNXPoTajs+lVQzGS1SULRI4GQaROeU5R41xH8acffHukxRh/NBVcTBsfCkJSkLq91rih5TpbEwUP9yWA=="
,
"requires"
:
{
"css-line-break"
:
"1.1.1"
}
},
"htmlparser2"
:
{
"version"
:
"3.10.1"
,
"resolved"
:
"https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz"
,
...
...
@@ -11769,9 +11790,9 @@
"integrity"
:
"sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"ssf"
:
{
"version"
:
"0.10.2"
,
"resolved"
:
"https://registry.npmjs.org/ssf/-/ssf-0.10.2.tgz"
,
"integrity"
:
"sha512-rDhAPm9WyIsY8eZEKyE8Qsotb3j/wBdvMWBUsOhJdfhKGLfQidRjiBUV0y/MkyCLiXQ38FG6LWW/VYUtqlIDZQ=="
,
"version"
:
"0.10.3"
,
"resolved"
:
"https://registry.npmjs.org/ssf/-/ssf-0.10.3.tgz"
,
"integrity"
:
"sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w=="
,
"requires"
:
{
"frac"
:
"~1.1.2"
}
...
...
@@ -13105,6 +13126,11 @@
"integrity"
:
"sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
,
"dev"
:
true
},
"wmf"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz"
,
"integrity"
:
"sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
},
"wordwrap"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz"
,
...
...
@@ -13180,17 +13206,18 @@
}
},
"xlsx"
:
{
"version"
:
"0.15.1"
,
"resolved"
:
"https://registry.npmjs.org/xlsx/-/xlsx-0.15.1.tgz"
,
"integrity"
:
"sha512-z+o4+QPMc32EPboLCzJAz94o0Zyy+8jrmWTsVpfzwknFln9qDO6/HN1KrGGVC4//sGA7dh4R3HA4fhbGIKCDOA=="
,
"version"
:
"0.15.6"
,
"resolved"
:
"https://registry.npmjs.org/xlsx/-/xlsx-0.15.6.tgz"
,
"integrity"
:
"sha512-7vD9eutyLs65iDjNFimVN+gk/oDkfkCgpQUjdE82QgzJCrBHC4bGPH7fzKVyy0UPp3gyFVQTQEFJaWaAvZCShQ=="
,
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
"cfb"
:
"^1.1.
3
"
,
"cfb"
:
"^1.1.
4
"
,
"codepage"
:
"~1.14.0"
,
"commander"
:
"~2.17.1"
,
"crc-32"
:
"~1.2.0"
,
"exit-on-epipe"
:
"~1.0.1"
,
"ssf"
:
"~0.10.2"
"ssf"
:
"~0.10.3"
,
"wmf"
:
"~1.0.1"
}
},
"xtend"
:
{
...
...
package.json
查看文件 @
7afa589
...
...
@@ -16,8 +16,10 @@
"eslint"
:
"^5.14.1"
,
"file-saver"
:
"^2.0.2"
,
"font-awesome"
:
"^4.7.0"
,
"html2canvas"
:
"^1.0.0-rc.5"
,
"install"
:
"^0.12.2"
,
"js-cookie"
:
"^2.2.1"
,
"jspdf"
:
"^1.5.3"
,
"jszip"
:
"^3.2.2"
,
"moment"
:
"^2.24.0"
,
"npm"
:
"^6.8.0"
,
...
...
@@ -27,7 +29,7 @@
"vue-i18n"
:
"^8.14.0"
,
"vue-router"
:
"^2.3.0"
,
"vuex"
:
"^2.0.0-rc.6"
,
"xlsx"
:
"^0.15.
1
"
"xlsx"
:
"^0.15.
6
"
},
"devDependencies"
:
{
"autoprefixer"
:
"^6.7.2"
,
...
...
src/api/htmlToPdf.js
0 → 100644
查看文件 @
7afa589
//不使用JQuery版的
import
html2canvas
from
'html2canvas'
;
import
JsPDF
from
'jspdf'
;
/**
* @param ele 要生成 pdf 的DOM元素(容器)
* @param padfName PDF文件生成后的文件名字
* */
function
downloadPDF
(
ele
,
pdfName
){
let
eleW
=
ele
.
offsetWidth
;
// 获得该容器的宽
let
eleH
=
ele
.
offsetHeight
;
// 获得该容器的高
let
eleOffsetTop
=
ele
.
offsetTop
;
// 获得该容器到文档顶部的距离
let
eleOffsetLeft
=
ele
.
offsetLeft
;
// 获得该容器到文档最左的距离
var
canvas
=
document
.
createElement
(
"canvas"
);
var
abs
=
0
;
let
win_in
=
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
;
// 获得当前可视窗口的宽度(不包含滚动条)
let
win_out
=
window
.
innerWidth
;
// 获得当前窗口的宽度(包含滚动条)
if
(
win_out
>
win_in
){
// abs = (win_o - win_i)/2; // 获得滚动条长度的一半
abs
=
(
win_out
-
win_in
)
/
2
;
// 获得滚动条宽度的一半
// console.log(a, '新abs');
}
canvas
.
width
=
eleW
*
2
;
// 将画布宽&&高放大两倍
canvas
.
height
=
eleH
*
2
;
var
context
=
canvas
.
getContext
(
"2d"
);
context
.
scale
(
2
,
2
);
context
.
translate
(
-
eleOffsetLeft
-
abs
,
-
eleOffsetTop
);
// 这里默认横向没有滚动条的情况,因为offset.left(),有无滚动条的时候存在差值,因此
// translate的时候,要把这个差值去掉
// html2canvas(element).then( (canvas)=>{ //报错
// html2canvas(element[0]).then( (canvas)=>{
html2canvas
(
ele
,
{
dpi
:
300
,
// allowTaint: true, //允许 canvas 污染, allowTaint参数要去掉,否则是无法通过toDataURL导出canvas数据的
useCORS
:
true
//允许canvas画布内 可以跨域请求外部链接图片, 允许跨域请求。
}
).
then
(
(
canvas
)
=>
{
var
contentWidth
=
canvas
.
width
;
var
contentHeight
=
canvas
.
height
;
//一页pdf显示html页面生成的canvas高度;
var
pageHeight
=
contentWidth
/
592.28
*
841.89
;
//未生成pdf的html页面高度
var
leftHeight
=
contentHeight
;
//页面偏移
var
position
=
0
;
//a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
var
imgWidth
=
595.28
;
var
imgHeight
=
595.28
/
contentWidth
*
contentHeight
;
var
pageData
=
canvas
.
toDataURL
(
'image/jpeg'
,
1.0
);
var
pdf
=
new
JsPDF
(
''
,
'pt'
,
'a4'
);
//有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
//当内容未超过pdf一页显示的范围,无需分页
if
(
leftHeight
<
pageHeight
)
{
//在pdf.addImage(pageData, 'JPEG', 左,上,宽度,高度)设置在pdf中显示;
pdf
.
addImage
(
pageData
,
'JPEG'
,
0
,
0
,
imgWidth
,
imgHeight
);
// pdf.addImage(pageData, 'JPEG', 20, 40, imgWidth, imgHeight);
}
else
{
// 分页
while
(
leftHeight
>
0
)
{
pdf
.
addImage
(
pageData
,
'JPEG'
,
0
,
position
,
imgWidth
,
imgHeight
);
leftHeight
-=
pageHeight
;
position
-=
841.89
;
//避免添加空白页
if
(
leftHeight
>
0
)
{
pdf
.
addPage
();
}
}
}
//可动态生成
pdf
.
save
(
pdfName
);
})
}
export
default
{
downloadPDF
}
...
...
src/routes.js
查看文件 @
7afa589
...
...
@@ -35,7 +35,6 @@ import Waybill from './views/nmms_import/Waybill.vue'
import
AllocateSearch
from
'./views/nmms_import/AllocateSearch.vue'
import
Importallocation
from
'./views/nmms_import/Importallocation.vue'
import
Allocatearrive
from
'./views/nmms_import/Allocatearrive.vue'
import
User
from
'./views/nav1/user.vue'
import
Page4
from
'./views/nav2/Page4.vue'
import
Page5
from
'./views/nav2/Page5.vue'
...
...
src/views/Home.vue
查看文件 @
7afa589
...
...
@@ -81,7 +81,7 @@
},
data() {
return {
sysName:'
易通快速通关申报管理系统
',
sysName:'
河南烩捞大盘鸡
',
collapsed:false,
sysUserName: '',
sysUserAvatar: '',
...
...
src/views/nmms_import/AllocateSearch.vue
查看文件 @
7afa589
...
...
@@ -74,6 +74,7 @@
<el-col :span="24">
<template>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
...
...
@@ -133,9 +134,22 @@
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="ext5"
label="回执内容"
width="250">
<template slot-scope="scope">
<span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
{{scope.row.ext5}}
</span>
<span v-else style="color: #909399;">
{{scope.row.ext5}}
</span>
</template>
</el-table-column>
<el-table-column
label="修改状态"
...
...
@@ -287,20 +301,20 @@
<el-col :span="5">
<el-form-item label="运抵件数" prop="turnpiece">
<div v-if="dialogStatus === 'update'">
<el-input v-model="AruleForm.turnpiece"></el-input>
<el-input
type="number"
v-model="AruleForm.turnpiece"></el-input>
</div>
<div v-else>
<el-input disabled="" v-model="AruleForm.turnpiece"></el-input>
<el-input
type="number"
disabled="" v-model="AruleForm.turnpiece"></el-input>
</div>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="运抵重量" prop="turnweight">
<div v-if="dialogStatus === 'update'">
<el-input v-model="AruleForm.turnweight"></el-input>
<el-input
type="number"
v-model="AruleForm.turnweight"></el-input>
</div>
<div v-else>
<el-input disabled="" v-model="AruleForm.turnweight"></el-input>
<el-input
type="number"
disabled="" v-model="AruleForm.turnweight"></el-input>
</div>
</el-form-item>
</el-col>
...
...
@@ -718,7 +732,8 @@
rows:{},
loading:false,
dialogTableVisible:false,
gridData:[]
gridData:[],
listLoading:false
}
},
methods:{
...
...
src/views/nmms_import/Allocatearrive.vue
查看文件 @
7afa589
...
...
@@ -52,7 +52,7 @@
</el-col>
<el-col :span="12">
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
<el-button type="primary" @click="
submitForm('ruleForm')">保存发送
</el-button>
<el-button type="primary" @click="
back">返回
</el-button>
</el-col>
</el-row>
<!--对话提示框-->
...
...
@@ -179,7 +179,10 @@
DialogVisible(){
this.centerDialogVisible=false;
this.$router.push({name:'运单分拨申报',params:{awba:this.ruleForm.awba}});
}
},
back(){
this.$router.go(-1);//返回上一层
},
},
mounted(){
this.getDefaultData();
...
...
src/views/nmms_import/EnterFlightInfo.vue
查看文件 @
7afa589
...
...
@@ -138,15 +138,13 @@
this.options = [];
this.options2=[];
}
//this.options=res.data.data;
//this.options2=res.data.data;
});
},
/*按钮点击请求方法*/
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$router.push({
name:'进港原始舱单',params:{flightno:this.ruleForm.flightno,flightdate:this.dateConversion(this.ruleForm.flightdate),originstation:this.ruleForm.originstation,destinationstation:this.ruleForm.destinationstation
}});
this.$router.push({
path:'/origmaster',query:{flightno:JSON.stringify(this.ruleForm.flightno),flightdate:JSON.stringify(this.dateConversion(this.ruleForm.flightdate)),originstation:JSON.stringify(this.ruleForm.originstation),destinationstation:JSON.stringify(this.ruleForm.destinationstation),awba:JSON.stringify("")
}});
} else {
console.log('error submit!!');
return false;
...
...
@@ -161,11 +159,11 @@
},
/*加载默认参数*/
getDefaultData(){
if(this.$route.params.row!=null){
this.ruleForm.flightno=this.$route.params.row.flightno;
this.ruleForm.flightdate=this.$route.params.row.flightdate;
this.ruleForm.originstation=this.$route.params.row.originstation;
this.ruleForm.destinationstation=this.$route.params.row.destinationstation;
if(this.$route.query!=null){
this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
}
}
},
...
...
src/views/nmms_import/EnterFlightTally.vue
查看文件 @
7afa589
...
...
@@ -102,7 +102,7 @@
flightno: '',
flightdate:'',
originstation:'',
destinationstation:''
destinationstation:''
,
},
options: [],
airportid:'',
...
...
@@ -174,7 +174,7 @@
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$router.push({
name:'进港理货舱单',params:{flightno:this.ruleForm.flightno,flightdate:this.dateConversion(this.ruleForm.flightdate),originstation:this.ruleForm.originstation,destinationstation:this.ruleForm.destinationstation
}})
this.$router.push({
path:'/tallymaster',query:{flightno:JSON.stringify(this.ruleForm.flightno),flightdate:JSON.stringify(this.dateConversion(this.ruleForm.flightdate)),originstation:JSON.stringify(this.ruleForm.originstation),destinationstation:JSON.stringify(this.ruleForm.destinationstation),awba:JSON.stringify("")
}})
} else {
//console.log('error submit!!');
return false;
...
...
@@ -189,11 +189,11 @@
},
/*获取默认值方法*/
getDefaultData(){
if(this.$route.params.row!=null){
this.ruleForm.flightno=this.$route.params.row.flightno;
this.ruleForm.flightdate=this.$route.params.row.flightdate;
this.ruleForm.originstation=this.$route.params.row.originstation;
this.ruleForm.destinationstation=this.$route.params.row.destinationstation;
if(this.$route.query!=null){
this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
}
}
},
...
...
src/views/nmms_import/Importallocation.vue
查看文件 @
7afa589
...
...
@@ -58,7 +58,7 @@
</el-col>
<el-col :span="12">
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
<el-button type="primary" @click="
submitSend('ruleForm')">保存发送
</el-button>
<el-button type="primary" @click="
back">返回
</el-button>
</el-col>
</el-row>
<!--对话提示框-->
...
...
@@ -190,7 +190,10 @@
DialogVisible(){
this.centerDialogVisible=false;
this.$router.push({name:'运单分拨申报',params:{awba:this.ruleForm.awba}});
}
},
back(){
this.$router.go(-1);//返回上一层
},
},
mounted(){
this.getDefaultData();
...
...
src/views/nmms_import/OrigFlightList.vue
查看文件 @
7afa589
...
...
@@ -30,6 +30,7 @@
<el-row>
<template>
<el-table
v-loading="tableloading"
:data="tableData"
style="width: 100%"
:default-sort = "{prop: 'date', order: 'descending'}"
...
...
@@ -107,7 +108,8 @@
flighttime: undefined,
currentPage:1,
pageSize:10,
total:0
total:0,
tableloading:true
}
},
methods: {
...
...
@@ -130,19 +132,19 @@
this.listLoading = true;
selectFlightLists(params).then(res=>{
let response=res.data.data;
console.log(response)
this.tableData=response.list;
this.tableloading=false;
this.total=response.total;
this.listLoading = false;
});
},
/*原始舱单跳转*/
handleEdit(index, row) {
this.$router.push({
name:'原始舱单',params:{index,row
}})
this.$router.push({
path:'/enter',query:{flightno:JSON.stringify(row.flightno),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation),destinationstation:JSON.stringify(row.destinationstation)
}})
},
/*进港理货跳转*/
handleDelete(index, row) {
this.$router.push({
name:'进港理货',params:{index,row
}})
this.$router.push({
path:'entertall',query:{flightno:JSON.stringify(row.flightno),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation),destinationstation:JSON.stringify(row.destinationstation)
}})
}
},
computed:{
...
...
src/views/nmms_import/OrigMaster.vue
查看文件 @
7afa589
...
...
@@ -42,7 +42,15 @@
</el-col>
<el-col :span="4" class="pub">
<div class="grid-content">
<el-button type="primary" size="mini">导出PDF</el-button>
<el-dropdown @command="handleCommand">
<el-button size="mini" type="primary">
导出文件<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="PDF">导出PDF</el-dropdown-item>
<el-dropdown-item command="EXCEL">导出EXCEL</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</el-col>
</div>
...
...
@@ -58,6 +66,9 @@
<el-col :span="24">
<template>
<el-table
class="table"
id="pdfDom"
v-loading="tableloading"
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
...
...
@@ -74,7 +85,7 @@
<el-table-column
label="运单号"
width="185"
show-overflow-tooltip
>
>
<template slot-scope="scope">
<span v-if="scope.row.awbh==''||scope.row.awbh==null">
{{scope.row.awba}}
...
...
@@ -119,9 +130,22 @@
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="customText"
label="回执信息"
width="180">
label="回执内容"
width="250">
<template slot-scope="scope">
<span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
{{scope.row.ext5}}
</span>
<span v-else style="color: #909399;">
{{scope.row.ext5}}
</span>
</template>
</el-table-column>
<el-table-column
prop="operation"
...
...
@@ -333,22 +357,22 @@
<el-row class="product">
<el-col :span="6">
<el-form-item label="总件数" prop="awbinfo.pcs">
<el-input v-model="ruleForm.awbinfo.pcs" ></el-input>
<el-input
type="number"
v-model="ruleForm.awbinfo.pcs" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="总重量" prop="awbinfo.weight">
<el-input v-model="ruleForm.awbinfo.weight"></el-input>
<el-input
type="number"
v-model="ruleForm.awbinfo.weight"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="舱单件数" prop="piece">
<el-input v-model="ruleForm.piece"></el-input>
<el-input
type="number"
v-model="ruleForm.piece"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="舱单重量" prop="weight">
<el-input v-model="ruleForm.weight"></el-input>
<el-input
type="number"
v-model="ruleForm.weight"></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -569,7 +593,7 @@
</el-col>
<el-col :span="2" class="pub">
<div class="grid-content">
<el-button type="primary" size="mini">返回</el-button>
<el-button type="primary"
@click="back"
size="mini">返回</el-button>
</div>
</el-col>
<el-col :span="2.5" class="pub">
...
...
@@ -681,12 +705,23 @@
.pub {
margin-right: 10px;
}
.el-dropdown {
vertical-align: top;
}
.el-dropdown + .el-dropdown {
margin-left: 15px;
}
.el-icon-arrow-down {
font-size: 12px;
}
</style>
<script>
import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201 } from '../../api/mt1201'
import{addResponse,selectResponseList} from "../../api/InResponse";
import FileSaver from "file-saver";
import XLSX from "xlsx";
import htmlToPdf from "../../api/htmlToPdf"
export default {
data() {
/*初始数据*/
...
...
@@ -772,7 +807,7 @@
waybill:undefined,
customText:undefined
},
paymodel:[{value:'PP',label:'预付'},{value:'
DP
',label:'到付'}],
paymodel:[{value:'PP',label:'预付'},{value:'
CC
',label:'到付'}],
customext5: [
{value:'001',label:'普通货物'},
{value:'002',label:'国际转运货物'},
...
...
@@ -845,14 +880,43 @@
},
udStatus:'',
loading:false,
temprows:{
},
temprows:{},
dialogTableVisible:false,
gridData:[]
gridData:[],
tableloading:true,
htmlTitle:''
}
},
methods: {
//导出PDF,EXCEL文件
handleCommand(command) {
if(command=='EXCEL'){
this.$message('正在为您下载' + command+'文件');
this.downLoad();
}else{
this.htmlTitle=this.defaultQuery.flightno+this.defaultQuery.flightdate;
htmlToPdf.downloadPDF(document.querySelector('#pdfDom'), this.htmlTitle)
this.$message('正在为您下载' + command+'文件');
//this.getPdf();
}
},
downLoad(){
var wb = XLSX.utils.table_to_book(document.querySelector(".table"));
var wbout = XLSX.write(wb, {
bookType: "xlsx",
bookSST: true,
type: "array"
});
try {
FileSaver.saveAs(
new Blob([wbout], { type: "application/octet-stream" }),
this.defaultQuery.flightno+this.defaultQuery.flightdate+ ".xlsx" // name+'.xlsx'表示导出的excel表格名字
);
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
}
return wbout;
},
//回执收发明细
handleDetail(index,row){
if(row.flightno.length>4){
...
...
@@ -889,7 +953,7 @@
:row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
:row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
},
//发送舱单报按钮判定事件
//发送舱单报按钮
,删除,修改
判定事件
btSendStatusFormater:(status) => {
if(status=='23' || status=='24'||status=='25'){
return true;
...
...
@@ -914,6 +978,7 @@
/*多选框功能*/
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(val)
},
/*编辑主单信息*/
handleEdit(index, row){
...
...
@@ -922,6 +987,7 @@
this.FenStatus='ediAwbh';
this.ruleForm=row;
this.ruleForm.originstation=row.originstation+"-"+row.destinationstation;
this.ruleForm.flightno=row.carrier+row.flightno;
this.FenQuery.awba=row.awba;
this.FenQuery.flightno= row.flightno;
this.FenQuery.flightdate=row.flightdate
...
...
@@ -1087,21 +1153,21 @@
},
/*获取默认值*/
getDefaultData(){
this.defaultQuery.flightno = this.$route.params.flightno;
this.defaultQuery.flightdate = this.$route.params.flightdate;
this.defaultQuery.originstation = this.$route.params.originstation;
this.defaultQuery.destinationstation = this.$route.params.destinationstation;
this.defaultQuery.awba=this.$route.params.awba;
this.defaultQuery.flightno = JSON.parse(this.$route.query.flightno);
this.defaultQuery.flightdate = JSON.parse(this.$route.query.flightdate);
this.defaultQuery.originstation = JSON.parse(this.$route.query.originstation);
this.defaultQuery.destinationstation = JSON.parse(this.$route.query.destinationstation);
this.defaultQuery.awba=JSON.parse(this.$route.query.awba);
},
/*获取默认数据列表*/
getList(){
getMt1201List(this.defaultQuery).then(res =>{
console.log(res);
this.sumNmmsCount=0;
this.sumNmmsPrice=0;
this.sumNmmsWeight=0;
let response=res.data.data;
this.tableData=response;
this.tableloading=false;
response.forEach((item,i) => {
if(item.awba!=null&&item.awbh=="");
this.sumNmmsCount=Number(this.sumNmmsCount)+1;
...
...
@@ -1152,9 +1218,9 @@
this.dialogStatus="create";
this.outerVisible = true;
this.FenStatus='ediAwbh';
this.ruleForm.flightno=this.$route.params.flightno;
this.ruleForm.flightdate=this.$route.params.flightdate;
this.ruleForm.originstation=this.$route.params.originstation+"-"+this.$route.params.destinationstation;
this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
this.ruleForm.originstation=JSON.parse(this.$route.query.originstation)+"-"+JSON.parse(this.$route.query.destinationstation);
},
//新增原始分单
addFen(formName){
...
...
@@ -1226,15 +1292,18 @@
},
//分拨申请
Importallocation(index,row){
this.$router.push({name:'进港分拨',params:{carrier:row.carrier,flightno:row.flightno
.substr(2)
,awba:row.awba,flightdate:row.flightdate,
this.$router.push({name:'进港分拨',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode}});
},
//分拨运抵
Allocatearrive(index,row){
this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno
.substr(2)
,awba:row.awba,flightdate:row.flightdate,
this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode,goodsname:row.goodsname}});
}
},
back(){
this.$router.go(-1);//返回上一层
},
},
/*渲染方法*/
...
...
src/views/nmms_import/TallyMster.vue
查看文件 @
7afa589
...
...
@@ -42,6 +42,7 @@
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
v-loading="tableLoading"
style="width: 100%"
@selection-change="handleSelectionChange"
row-key="uuid"
...
...
@@ -101,9 +102,22 @@
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="ext5"
label="回执信息"
width="180">
label="回执内容"
width="250">
<template slot-scope="scope">
<span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
{{scope.row.ext5}}
</span>
<span v-else style="color: #909399;">
{{scope.row.ext5}}
</span>
</template>
</el-table-column>
<el-table-column
prop="operation"
...
...
@@ -222,22 +236,22 @@
<el-row class="product">
<el-col :span="6">
<el-form-item label="舱单件数" prop="pcs">
<el-input v-model="ruleForm.pcs"></el-input>
<el-input
type="number"
v-model="ruleForm.pcs"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="舱单重量" prop="wei">
<el-input v-model="ruleForm.wei"></el-input>
<el-input
type="number"
v-model="ruleForm.wei"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="理货件数" prop="piece">
<el-input v-model="ruleForm.piece"></el-input>
<el-input
type="number"
v-model="ruleForm.piece"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="理货重量" prop="weight">
<el-input v-model="ruleForm.weight"></el-input>
<el-input
type="number"
v-model="ruleForm.weight"></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -336,7 +350,7 @@
<el-row>
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" v-on:click="addTally" size="mini">新增进港理货</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini">批量发送删除报</el-button></div></el-col>
<el-col :span="2"><div class="grid-content"><el-button type="primary" size="mini">返回</el-button></div></el-col>
<el-col :span="2"><div class="grid-content"><el-button type="primary"
@click="back"
size="mini">返回</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div></el-col>
<el-col :span="3.5"><div class="grid-content"><span>理货总件数:{{sumNmmsPrice}}</span></div></el-col>
<el-col :span="4"><div class="grid-content"><span>理货总重量:{{sumNmmsWeight}}</span></div></el-col>
...
...
@@ -435,7 +449,7 @@
flightdate:undefined,
originstation:undefined,
destinationstation:undefined,
awba:undefined
awba:undefined
,
},
tableData: [],
tableData2: [],
...
...
@@ -517,6 +531,7 @@
loading:false,
dialogTableVisible:false,
gridData:[],
tableLoading:false
}
},
methods: {
...
...
@@ -688,6 +703,7 @@
this.dialogStatus='update';
this.FenStatus='ediAwbh';
this.ruleForm=row;
this.ruleForm.flightno=row.carrier+row.flightno;
},
//编辑分单
handleFen(index,row){
...
...
@@ -705,20 +721,22 @@
},
//获取默认值
getDefaultData(){
this.defaultQuery.flightno=this.$route.params.flightno;
this.defaultQuery.flightdate=this.$route.params.flightdate;
this.defaultQuery.originstation=this.$route.params.originstation;
this.defaultQuery.destinationstation=this.$route.params.destinationstation;
this.defaultQuery.flightno = JSON.parse(this.$route.query.flightno);
this.defaultQuery.flightdate = JSON.parse(this.$route.query.flightdate);
this.defaultQuery.originstation = JSON.parse(this.$route.query.originstation);
this.defaultQuery.destinationstation = JSON.parse(this.$route.query.destinationstation);
this.defaultQuery.awba=JSON.parse(this.$route.query.awba);
},
//获取进港理货列表
getMt5201List(){
this.tableLoading=true;
getMt5201List(this.defaultQuery).then(res =>{
this.sumNmmsCount=0;
this.sumNmmsPrice=0;
this.sumNmmsWeight=0;
let response=res.data.data;
console.log(res)
this.tableData=response;
this.tableLoading=false;
response.forEach((item,i) => {
if(item.awba!=null&&item.awbh=="");
this.sumNmmsCount=Number(this.sumNmmsCount)+1;
...
...
@@ -732,10 +750,10 @@
this.outerVisible = true;
this.dialogStatus="create";
this.FenStatus='ediAwbh';
this.ruleForm.flightno=this.$route.params.flightno;
this.ruleForm.flightdate=this.$route.params.flightdate;
this.ruleForm.originstation=this.$route.params.originstation;
this.ruleForm.destinationstation=this.$route.params.destinationstation;
this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
},
//新增原始舱单数据
createData(formName){
...
...
@@ -789,6 +807,9 @@
}
});
},
back(){
this.$router.go(-1);//返回上一层
},
},
//渲染方法
mounted(){
...
...
src/views/nmms_import/Waybill.vue
查看文件 @
7afa589
...
...
@@ -67,9 +67,9 @@
<el-col :span="8" style="margin-right: 0px">
<el-button type="primary" v-on:click="QueryData">查询</el-button>
</el-col>
<el-col :span="16" style="margin-right: 0px">
<
!--<
el-col :span="16" style="margin-right: 0px">
<el-button type="primary">批量修改状态</el-button>
</el-col>
</el-col>
-->
</el-col>
</el-row>
<!--查询结果样式-->
...
...
@@ -85,6 +85,7 @@
<el-col :span="24">
<template>
<el-table
v-loading="tableloading"
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
...
...
@@ -128,10 +129,23 @@
</template>
</el-table-column>
<el-table-column
prop="awba"
label="主单号"
width="115"
>
<template slot-scope="scope">
<span v-if="scope.row.stype=='MT1201'&&scope.row.awbh==''" style="background-color:#67C23A;width: 100%;height:100%;display:block">
{{scope.row.awba}}
</span>
<span v-else-if="scope.row.stype=='MT1201'&&scope.row.awbh!=''" style="background-color:#409eff;width: 100%;height:100%;display:block;">
{{scope.row.awba}}
</span>
<span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh==''" style="background-color:#FF8C00;width: 100%;height:100%;display:block;">
{{scope.row.awba}}
</span>
<span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh!=''" style="background-color:#e6a23c;width: 100%;height:100%;display:block;">
{{scope.row.awba}}
</span>
</template>
</el-table-column>
<el-table-column
prop="awbh"
...
...
@@ -165,9 +179,22 @@
width="90" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="ext5"
label="回执内容"
width="250">
<template slot-scope="scope">
<span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
{{scope.row.ext5}}
</span>
<span v-else style="color: #909399;">
{{scope.row.ext5}}
</span>
</template>
</el-table-column>
</el-table>
</template>
...
...
@@ -201,10 +228,10 @@
.sel{display: inline;}
.mark{height:24px;}
.bg{height:24px;text-align: center;line-height:24px;min-height: 24px}
.mainse{background: #5BB75B}
.fense{background-color: #12B399}
.tallse{background-color: #FA9403}
.tallfense{background-color: #C55124}
.mainse{background: #67C23A}
.fense{background-color: #409eff}
.tallse{background-color: #FF8C00}
.tallfense{background-color: #e6a23c}
.cell{background: #5BB75B}
.cell2{background-color: #12B399}
.el-input-group{
...
...
@@ -253,7 +280,8 @@
multipleSelection: [],
currentPage:1,
pageSize:100,
total:0
total:0,
tableloading:false
}
},
methods:{
...
...
@@ -282,22 +310,22 @@
QueryData(){
let params={currentPage:this.currentPage,pageSize:this.pageSize,awba:this.defaultQuery.awba,carrier:this.defaultQuery.carrier,
flightno:this.defaultQuery.flightno,flightdate:this.defaultQuery.flightdate,status:this.defaultQuery.status,messageType:this.defaultQuery.messageType};
this.
listLoading =
true;
this.
tableloading=
true;
QueryData(params).then(res =>{
console.log(res)
let response=res.data.data;
console.log(response)
this.tableData=response.list;
this.total=response.total;
this.
listL
oading = false;
this.
tablel
oading = false;
});
},
//点击进入原始页面
handleClick(row){
this.$router.push({
name:'进港原始舱单',params:{flightno:row.carrier+row.flightno,destinationstation:row.destinationstation,awba:row.awba,flightdate:row.flightdate,originstation:row.originstation
}});
this.$router.push({
path:'/origmaster',query:{flightno:JSON.stringify(row.carrier+row.flightno),destinationstation:JSON.stringify(row.destinationstation),awba:JSON.stringify(row.awba),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation)
}});
},
//点击进入理货页面
handleTally(row){
this.$router.push({
name:'进港理货舱单',params:{flightno:row.carrier+row.flightno,destinationstation:row.destinationstation,awba:row.awba,flightdate:row.flightdate,originstation:row.originstation
}});
this.$router.push({
path:'/tallymaster',query:{flightno:JSON.stringify(row.carrier+row.flightno),destinationstation:JSON.stringify(row.destinationstation),awba:JSON.stringify(row.awba),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation)
}});
},
//table显示时间转换
timestampToTime(timestamp) {
...
...
src/views/nmms_import/new.vue
已删除
100644 → 0
查看文件 @
649ce42
请
注册
或
登录
后发表评论