...
|
...
|
@@ -37,31 +37,41 @@ |
|
|
@selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="billno" label="主单号" width="180">
|
|
|
<el-table-column prop="billno" label="主单号" width="170px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="assbillno" label="分单号" width="180">
|
|
|
<el-table-column prop="assbillno" label="分单号" width="110px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="flightNo" label="航班号" width="180">
|
|
|
<el-table-column prop="flightNo" label="航班号" width="75px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="flightDate" label="航班日期" width="180">
|
|
|
<el-table-column prop="flightDate" label="航班日期" width="110px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="maingname" label="分单主商品名称" width="180">
|
|
|
<!-- <el-table-column prop="maingname" label="分单主商品名称" width="180px">-->
|
|
|
<!-- </el-table-column>-->
|
|
|
<el-table-column prop="ieflag" :formatter="ieflagType" label="进出口标识" width="100px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="ieflag" label="进出口标识" width="100px">
|
|
|
<el-table-column prop="grosswt" label="毛重" width="100px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="grosswt" label="毛重">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="packno" label="件数">
|
|
|
<el-table-column prop="packno" label="件数" width="100px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="billnum" label="分运单总数" width="100px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="iedate" label="进出口日期" width="100px">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" min-width="300px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="primary" size="small" v-if="scope.row.ext1 == 'awba'" @click="expressAwbhAdd(scope.$index, scope.row)">新增分单</el-button>
|
|
|
<el-button type="primary" size="small" v-if="scope.row.ext1 == 'awba'" @click="expressEditAwbaAdd(scope.$index, scope.row)">编辑主单</el-button>
|
|
|
<el-button type="primary" size="small" v-else @click="expressEditAwbhAdd(scope.$index, scope.row)">编辑分单</el-button>
|
|
|
<el-table-column prop="" label="回执状态" width="100px">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="" label="回执内容" width="180px">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="330px">
|
|
|
<template slot-scope="scope" >
|
|
|
<el-button type="primary" size="mini" v-if="scope.row.ext1 == 'awba'" @click="expressAwbhAdd(scope.$index, scope.row)">新增分单</el-button>
|
|
|
<el-button type="primary" size="mini" v-if="scope.row.ext1 == 'awba'" @click="expressEditAwbaAdd(scope.$index, scope.row)">编辑主单</el-button>
|
|
|
<el-button type="primary" size="mini" v-else @click="expressEditAwbhAdd(scope.$index, scope.row)">编辑分单</el-button>
|
|
|
<el-button type="primary" size="mini" v-if="scope.row.ext1 == 'awba'" @click="expressBulidAbwa(scope.$index, scope.row)">发送主单报文</el-button>
|
|
|
<el-button type="primary" size="mini" v-else @click="expressBulidAbwh(scope.$index, scope.row)">发送分单报</el-button>
|
|
|
<br>
|
|
|
<br>
|
|
|
<el-button type="primary" size="mini" v-if="scope.row.ext1 == 'awba'" @click="expressEditBulidAbwa(scope.$index, scope.row)">发送修改主单表头报文</el-button>
|
|
|
<el-button type="primary" size="mini" v-else @click="expressEditBulidAbwh(scope.$index, scope.row)">发送追加表体分单报</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
...
|
...
|
@@ -84,7 +94,8 @@ |
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="主单号" :label-width="expressAddlWidth" prop="billno">
|
|
|
<el-input style="width: 80%" v-model="expressAwbaAddModel.billno" autocomplete="off"></el-input>
|
|
|
<el-input style="width: 80%" v-if="dialogCommon == 'add'" v-model="expressAwbaAddModel.billno" autocomplete="off"></el-input>
|
|
|
<el-input style="width: 80%" v-else disabled v-model="expressAwbaAddModel.billno" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
...
|
...
|
@@ -282,7 +293,8 @@ |
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {getExpressList, awbaAdd, awbaEdit, awbhAdd, awbhEdit} from '../../api/express/express'
|
|
|
import {getExpressList, awbaAdd, awbaEdit, selectAwba, awbhAdd,
|
|
|
awbhEdit, selectAwbh, awbaAddBulid, awbhAddBulid} from '../../api/express/express'
|
|
|
import loginUserInfo from "../../api/base";
|
|
|
export default {
|
|
|
name: "express",
|
...
|
...
|
@@ -466,6 +478,13 @@ |
|
|
this.listLoading = false;
|
|
|
});
|
|
|
},
|
|
|
ieflagType: function(row, column){
|
|
|
if (row.ieflag == 'I'){
|
|
|
return "进口";
|
|
|
}else if(row.ieflag == 'E'){
|
|
|
return "出口";
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
* 多选单选
|
|
|
* @param val
|
...
|
...
|
@@ -501,6 +520,13 @@ |
|
|
this.$refs.expressAwbaAddModel.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => {
|
|
|
let para = {
|
|
|
billno: this.expressAwbaAddModel.billno
|
|
|
}
|
|
|
this.listLoading = true;
|
|
|
// 查询主单是否重复
|
|
|
selectAwba(para).then((res) => {
|
|
|
if (res.data.code == 200){
|
|
|
//NProgress.start();
|
|
|
this.listLoading = true;
|
|
|
this.expressAwbaAddModel.userName = loginUserInfo.username;
|
...
|
...
|
@@ -522,6 +548,15 @@ |
|
|
});
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: '此单号已存在,请勿重复添加',
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
}).catch((error) => {
|
|
|
this.listLoading = false;
|
|
|
});
|
|
|
}).catch(() =>{
|
|
|
|
|
|
});
|
...
|
...
|
@@ -593,6 +628,12 @@ |
|
|
this.$refs.expressAwbhAddModel.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => {
|
|
|
let para = {
|
|
|
billno: this.expressAwbhAddModel.billno,
|
|
|
assbillno: this.expressAwbhAddModel.assbillno
|
|
|
}
|
|
|
selectAwbh(para).then((res) => {
|
|
|
if(res.data.code == 200){
|
|
|
//NProgress.start();
|
|
|
this.listLoading = true;
|
|
|
this.expressAwbhAddModel.userName = loginUserInfo.username;
|
...
|
...
|
@@ -614,6 +655,16 @@ |
|
|
});
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: "同一主单下分单号不可以重复",
|
|
|
type: "error"
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}).catch((error) => {
|
|
|
this.listLoading = false;
|
|
|
});
|
|
|
}).catch(() =>{
|
|
|
|
|
|
});
|
...
|
...
|
@@ -663,8 +714,110 @@ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 发送主单报文
|
|
|
*/
|
|
|
expressBulidAbwa(index, row){
|
|
|
this.$confirm('发送主单报该下面所有分单会一起发送确定吗?', '提示', {}).then(() => {
|
|
|
row.optype = "ADD";
|
|
|
awbaAddBulid(row).then((res) => {
|
|
|
if (res.data.code == 200){
|
|
|
this.$message({
|
|
|
message: '发送成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.listLoading = true;
|
|
|
this.getList();
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: '发送失败',
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
|
|
|
}).catch((error) => {
|
|
|
this.listLoading = false;
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 追加主单报文
|
|
|
*/
|
|
|
expressEditBulidAbwa(index, row){
|
|
|
this.$confirm('发送修改主单报表头该下面所有分单会一起发送确定吗?', '提示', {}).then(() => {
|
|
|
row.optype = "APD";
|
|
|
awbaAddBulid(row).then((res) => {
|
|
|
if (res.data.code == 200){
|
|
|
this.$message({
|
|
|
message: '发送成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.listLoading = true;
|
|
|
this.getList();
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: '发送失败',
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
|
|
|
}).catch((error) => {
|
|
|
this.listLoading = false;
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 发送分单报文
|
|
|
*/
|
|
|
expressBulidAbwh(index, row){
|
|
|
this.$confirm('发送分单报文会和主单一起发送?', '提示', {}).then(() => {
|
|
|
row.ext2 = "ADD";
|
|
|
awbhAddBulid(row).then((res) => {
|
|
|
if (res.data.code == 200){
|
|
|
this.$message({
|
|
|
message: '发送成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.listLoading = true;
|
|
|
this.getList();
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: '发送失败',
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
|
|
|
}).catch((error) => {
|
|
|
this.listLoading = false;
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 追加分单报文
|
|
|
*/
|
|
|
expressEditBulidAbwh(index, row){
|
|
|
this.$confirm('追加分单报文会和主单一起发送?', '提示', {}).then(() => {
|
|
|
row.ext2 = "APD";
|
|
|
awbhAddBulid(row).then((res) => {
|
|
|
if (res.data.code == 200){
|
|
|
this.$message({
|
|
|
message: '发送成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.listLoading = true;
|
|
|
this.getList();
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: '发送失败',
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
|
|
|
}).catch((error) => {
|
|
|
this.listLoading = false;
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList();
|
...
|
...
|
|