作者 朱兆平

Merge remote-tracking branch 'origin/master'

... ... @@ -6,3 +6,8 @@ export const addAllocatImport=params=>{return http.post(`${baseUrl}/addAllocatIm
export const addAllocatArrive=params=>{return http.post(`${baseUrl}/addAllocatArrive`, params);};
export const QueryData=params=>{return http.get(`${baseUrl}/QueryData`, params);};
export const ediAllocat=params=>{return http.put(`${baseUrl}/ediAllocat`, params);};
export const sendCreateMt6202=params=>{return http.post(`${baseUrl}/sendCreateMt6202`, params);};
export const sendRemoveMt6202=params=>{return http.post(`${baseUrl}/sendRemoveMt6202`, params);};
export const sendCreateMt3202=params=>{return http.post(`${baseUrl}/sendCreateMt3202`, params);};
export const sendRemoveMt3202=params=>{return http.post(`${baseUrl}/sendRemoveMt3202`, params);};
\ No newline at end of file
... ...
... ... @@ -9,3 +9,7 @@ export const ediMt1201=params=>{return http.put(`${baseUrl}/ediMt1201`, params)
export const selectAirport=params=>{return http.get(`${baseUrl}/selectList`, params);};
export const getCountryCode=params=>{return http.get(`${baseUrl}/getCountryCode`, params);};
export const selectCustomcode=params=>{return http.get(`${baseUrl}/selectCustomcode`, params);};
export const sendCreateMt1201=params=>{return http.post(`${baseUrl}/sendCreateMt1201`, params);};
export const sendEditeMt1201=params=>{return http.post(`${baseUrl}/sendEditeMt1201`, params);};
export const sendRemoveMt1201=params=>{return http.post(`${baseUrl}/sendRemoveMt1201`, params);};
\ No newline at end of file
... ...
import http from './http.js'
let baseUrl = 'nmms-server-import/nmms/mt5201'
let baseUrl2='nmms-server-import/nmms/mt1201'
export const getMt5201List=params=>{return http.get(`${baseUrl}/getMt5201List`, params);};
export const addMt5201=params=>{return http.post(`${baseUrl}/addMt5201`, params);};
export const ediMt5201=params=>{return http.put(`${baseUrl}/ediMt5201`, params);};
export const delMt5201 = params => { return http.del(`${baseUrl}/delMt5201`,params)};
export const sendCreateMt520x=params=>{return http.post(`${baseUrl}/sendCreateMt520x`, params);};
export const sendRemoveMt520x=params=>{return http.post(`${baseUrl}/sendRemoveMt520x`, params);};
export const selectCustomcode=params=>{return http.get(`${baseUrl2}/selectCustomcode`, params);};
... ...
... ... @@ -131,7 +131,7 @@
<el-table-column
prop="status"
label="状态"
width="100">
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="repick"
... ... @@ -182,7 +182,7 @@
v-if="scope.row.turntype=='MT6202'"
size="mini"
type="primary"
@click="arriveDel(scope.$index, scope.row)">申请分拨删除
@click="importDel(scope.$index, scope.row)">申请分拨删除
</el-button>
<el-button
v-else
... ... @@ -204,7 +204,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[100, 200, 300, 400]"
:page-sizes="[10, 20, 300, 400]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
... ... @@ -424,6 +424,26 @@
</div>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="卸货地" prop="ext2">
<div v-if="dialogStatus === 'update'">
<el-input v-model="IruleForm.ext2"></el-input>
</div>
<div v-else>
<el-input disabled="" v-model="IruleForm.ext2"></el-input>
</div>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车辆所属" prop="ext1">
<div v-if="dialogStatus === 'update'">
<el-input v-model="IruleForm.ext1"></el-input>
</div>
<div v-else>
<el-input disabled="" v-model="IruleForm.ext1"></el-input>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
... ... @@ -441,6 +461,26 @@
</span>
</el-dialog>
</el-row>
<!--发送删除报修改报提示框-->
<el-row>
<el-dialog :title="'提交'+Reason[udStatus]+'信息'" :visible.sync="dialogFormVisible">
<el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
<el-form-item label="操作原因" prop="operreason">
<el-input type="textarea" v-model="Udform.operreason"></el-input>
</el-form-item>
<el-form-item label="操作人" prop="operperson">
<el-input v-model="Udform.operperson"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="opertel">
<el-input v-model="Udform.opertel"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="deleteIdForm('Udform')">确 定</el-button>
</div>
</el-dialog>
</el-row>
</el-main>
</el-container>
</template>
... ... @@ -454,7 +494,7 @@
.bg{height:24px;text-align: center;line-height:24px;min-height: 24px}
</style>
<script>
import { QueryData,ediAllocat } from '../../api/Allocat'
import { QueryData,ediAllocat,sendCreateMt6202,sendRemoveMt6202,sendCreateMt3202,sendRemoveMt3202 } from '../../api/Allocat'
export default{
data(){
return{
... ... @@ -494,7 +534,8 @@
}, {
value: '08',
label: '舱单删除报转人工'
}],
}
],
options2: [
{
value: '',
... ... @@ -505,7 +546,8 @@
}, {
value: 'MT3202',
label: '分拨运抵'
}],
}
],
options3: [
{
value: '4604',
... ... @@ -521,7 +563,7 @@
multipleSelection: [],
labelPosition:'left',
currentPage:1,
pageSize:10,
pageSize:100,
total:0,
dialogStatus:'',
IouterVisible: false,
... ... @@ -542,7 +584,9 @@
turnpiece:'',
turnweight:'',
turnunloading:'',
goodsname:''
goodsname:'',
ext2:'',
ext1:''
},
Arules: {
awba: [
... ... @@ -582,7 +626,9 @@
turnpiece:undefined,
turnweight:undefined,
turnunloading:undefined,
pno:undefined
pno:undefined,
ext1:undefined,
ext2:undefined
},
Irules: {
awba: [
... ... @@ -612,10 +658,185 @@
turnunLoading: [
{ required: true, message: '请选择分拨到达地', trigger: 'change' }
],
ext2: [
{ required: true, message: '请输入卸货地代码', trigger: 'change' }
],
ext1: [
{ required: true, message: '请输入车辆所属承运人代码', trigger: 'change' }
],
},
Udform:{
operreason:'',
operperson:'',
opertel:'',
flightdate:'',
flightno:'',
carrier:'',
awbano:'',
awbhno:'',
bustype:'',
busdate:'',
busweight:'',
buspiece:'',
opertype:'',
},
udrules:{
operreason: [{required: true, message: '请输入操作原因', trigger: 'blur'}],
operperson: [{required: true, message: '请输入操作人', trigger: 'blur'}],
opertel: [{required: true, message: '请输入操作人联系电话', trigger: 'blur'}],
},
Reason:{
update: '修改',
delete: '删除'
},
udStatus:'',
dialogFormVisible: false,
rows:{},
loading:false,
}
},
methods:{
//状态适配
formatStatus:function (row,column) {
return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
:row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
:row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
:row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
},
//发送分拨申请报
importSend(index,row){
const map = {'mt6202':row}
sendCreateMt6202(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
//发送分拨申请删除报
importDel(index,row){
this.dialogFormVisible=true;
this.udStatus='delete';
this.Udform.awbano=row.awba;
this.Udform.awbhno=row.awbh;
this.Udform.carrier=row.carrier;
this.Udform.flightno=row.flightno.substring(2);
this.Udform.flightdate=row.flightdate;
this.Udform.bustype='MT5201';
this.Udform.busdate=Date.parse(new Date());
this.Udform.busweight=row.weight;
this.Udform.buspiece=row.piece;
this.Udform.opertype='发送分拨申请删除报';
if(row.flightno.length>4){
row.flightno=row.flightno;
}else{
row.flightno=row.carrier+row.flightno;
};
if(row.awbh==null){
row.awbh="";
}
this.rows=row;
},
//发送分拨申请删除报表单
deleteIdForm(formName){
this.$refs[formName].validate((valid) => {
const map = {'flightNo':this.rows.flightno,
'flightDate':this.rows.flightdate,
'awba':this.rows.awba,
'content':'',
'customCode':this.rows.customcode,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel,
'carrier':this.rows.carrier}
if(this.rows.turntype=='MT6202'){
sendRemoveMt6202(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
}else{
sendRemoveMt3202(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
}
});
},
//发送分拨运抵报
arriveSend(index,row){
const map = {'mt3202':row}
sendCreateMt3202(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
//发送分拨返抵删除报
arriveDel(index,row){
this.dialogFormVisible=true;
this.udStatus='delete';
this.Udform.awbano=row.awba;
this.Udform.awbhno=row.awbh;
this.Udform.carrier=row.carrier;
this.Udform.flightno=row.flightno.substring(2);
this.Udform.flightdate=row.flightdate;
this.Udform.bustype='MT5201';
this.Udform.busdate=Date.parse(new Date());
this.Udform.busweight=row.weight;
this.Udform.buspiece=row.piece;
this.Udform.opertype='发送分拨运抵删除报';
if(row.flightno.length>4){
row.flightno=row.flightno;
}else{
row.flightno=row.carrier+row.flightno;
};
if(row.awbh==null){
row.awbh="";
}
this.rows=row;
},
handleClick(row) {
console.log(row);
},
... ...
... ... @@ -91,7 +91,7 @@
turnweight:'',
customcode:'',
turnunloading:'',
goodsname:''
goodsname:'',
},
rules: {
awba: [
... ...
... ... @@ -12,7 +12,7 @@
<el-row type="flex" class="row-bg" justify="center">
<el-col :span="5">
<el-form-item label="航班号" prop="flightno">
<el-input placeholder="" v-model="ruleForm.flightno" style="width:100%"></el-input>
<el-input placeholder="" v-model="flightno" style="width:100%"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
... ... @@ -26,7 +26,7 @@
</el-col>
<el-col :span="5">
<el-form-item label="始发站" prop="originstation">
<el-select v-model="ruleForm.originstation"
<el-select v-model="originstation"
filterable
allow-create
default-first-option
... ... @@ -47,7 +47,7 @@
</el-col>
<el-col :span="5">
<el-form-item label="目的站" prop="destinationstation">
<el-select v-model="ruleForm.destinationstation" filterable
<el-select v-model="destinationstation" filterable
allow-create
default-first-option
remote
... ... @@ -109,11 +109,11 @@
],
originstation: [
{required: true, message: '请输入航班起始站', trigger: 'blur'},
{min: 3, max: 5, message: '长度为 3 ', trigger: 'blur'}
{min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
],
destinationstation: [
{required: true, message: '请输入目的站', trigger: 'blur'},
{min: 3, max: 5, message: '长度为 3 ', trigger: 'blur'}
{min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
],
flightdate: [
{ required: true, message: '请选择日期', trigger: 'blur' }
... ... @@ -169,10 +169,36 @@
}
}
},
computed:{
originstation:{
get:function () {
return this.ruleForm.originstation;
},
set:function (val) {
this.ruleForm.originstation=val.toUpperCase();
}
},
destinationstation:{
get:function () {
return this.ruleForm.destinationstation;
},
set:function (val) {
this.ruleForm.destinationstation=val.toUpperCase();
}
},
flightno:{
get:function () {
return this.ruleForm.flightno;
},
set:function (val) {
this.ruleForm.flightno=val.toUpperCase();
}
}
},
/*渲染方法*/
mounted(){
this.getDefaultData();
//this.getFlightList();
}
},
};
</script>
... ...
... ... @@ -12,7 +12,7 @@
<el-row type="flex" class="row-bg" justify="center">
<el-col :span="5">
<el-form-item label="航班号" prop="flightno">
<el-input placeholder="" v-model="ruleForm.flightno" style="width:100%"></el-input>
<el-input onkeyup="value=value.replace(/[\u4e00-\u9fa5]/ig,'')" placeholder="" v-model="flightno" style="width:100%"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
... ... @@ -29,7 +29,7 @@
<el-input placeholder="" v-model="ruleForm.originstation"></el-input>
</el-form-item>-->
<el-form-item label="始发站" prop="originstation">
<el-select v-model="ruleForm.originstation" filterable
<el-select v-model="originstation" filterable
allow-create
default-first-option
remote
... ... @@ -52,7 +52,7 @@
<el-input placeholder="" v-model="ruleForm.destinationstation" :disabled="true"></el-input>
</el-form-item>-->
<el-form-item label="目的站" prop="destinationstation">
<el-select v-model="ruleForm.destinationstation"
<el-select v-model="destinationstation"
filterable
allow-create
default-first-option
... ... @@ -106,6 +106,7 @@
},
options: [],
airportid:'',
loading: false,
/*表单验证方法*/
rules: {
flightno: [
... ... @@ -114,11 +115,11 @@
],
originstation: [
{required: true, message: '请输入航班起始站', trigger: 'blur'},
{min: 3, max: 5, message: '长度为 3 ', trigger: 'blur'}
{min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
],
destinationstation: [
{required: true, message: '请输入目的站', trigger: 'blur'},
{min: 3, max: 5, message: '长度为 3 ', trigger: 'blur'}
{min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
],
flightdate: [
{ required: true, message: '请选择日期', trigger: 'change' }
... ... @@ -126,6 +127,32 @@
}
};
},
computed:{
originstation:{
get:function () {
return this.ruleForm.originstation;
},
set:function (val) {
this.ruleForm.originstation=val.toUpperCase();
}
},
destinationstation:{
get:function () {
return this.ruleForm.destinationstation;
},
set:function (val) {
this.ruleForm.destinationstation=val.toUpperCase();
}
},
flightno:{
get:function () {
return this.ruleForm.flightno;
},
set:function (val) {
this.ruleForm.flightno=val.toUpperCase();
}
}
},
methods:{
remoteMethod:function(query) {
this.options = [];
... ... @@ -173,7 +200,6 @@
/*渲染方法*/
mounted(){
this.getDefaultData();
this.getFlightList();
}
};
... ...
... ... @@ -48,6 +48,12 @@
</el-select>
</el-col>
</el-form-item>
<el-form-item label="卸货地" prop="ext2">
<el-input v-model="ruleForm.ext2"></el-input>
</el-form-item>
<el-form-item label="车辆所发属" prop="ext1">
<el-input v-model="ruleForm.ext1"></el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
... ... @@ -91,7 +97,9 @@
turnweight:'',
customcode:'',
turnunloading:'',
pno:''
pno:'',
ext2:'',
ext1:''
},
rules: {
awba: [
... ... @@ -117,6 +125,12 @@
],
turnunloading: [
{ required: true, message: '请选择分拨到达地', trigger: 'change' }
],
ext2: [
{ required: true, message: '请输入卸货地', trigger: 'change' }
],
ext1: [
{ required: true, message: '请输入运输车辆所属承运人代码', trigger: 'change' }
]
},
options2: [
... ...
... ... @@ -5,7 +5,7 @@
<el-row>
<el-col :span="4">
<div>
<el-input v-model="carrier" placeholder="">
<el-input v-model="vcarrier" placeholder="">
<template slot="prepend">航班号</template>
</el-input>
</div>
... ... @@ -97,7 +97,7 @@
data() {
/*初始化值*/
return {
carrier:undefined,
carrier:'',
tableData: [],
flighttime: undefined,
currentPage:1,
... ... @@ -125,6 +125,7 @@
this.listLoading = true;
selectFlightLists(params).then(res=>{
let response=res.data.data;
console.log(response)
this.tableData=response.list;
this.total=response.total;
this.listLoading = false;
... ... @@ -139,6 +140,16 @@
this.$router.push({name:'进港理货',params:{index,row}})
}
},
computed:{
vcarrier:{
get:function () {
return this.carrier;
},
set:function (val) {
this.carrier=val.toUpperCase();
}
}
},
/*渲染方法*/
mounted() {
let that=this;
... ...
... ... @@ -109,7 +109,7 @@
<el-table-column
prop="status"
label="状态"
width="100">
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="customText"
... ... @@ -352,8 +352,8 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关状态" prop="ext5">
<el-select v-model="ruleForm.ext5" placeholder="" style="display:inline">
<el-form-item label="海关状态" prop="awbinfo.awbtype">
<el-select v-model="ruleForm.awbinfo.awbtype" placeholder="" style="display:inline">
<el-option v-for="(item,index) in customext5" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
... ... @@ -401,12 +401,6 @@
</el-form-item>
</el-col>
<el-col :span="6">
<!--<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select v-model="ruleForm.awbinfo.shprcountyr" placeholder="" style="display:inline">
<el-option v-for="item in shprcountyrs" :key="item" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>-->
<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select v-model="ruleForm.awbinfo.shprcountyr"
filterable
... ... @@ -589,7 +583,7 @@
</el-row>
<!--发送删除报修改报提示框-->
<el-row>
<el-dialog title="提交修改信息" :visible.sync="dialogFormVisible">
<el-dialog :title="'提交'+Reason[udStatus]+'信息'" :visible.sync="dialogFormVisible">
<el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
<el-form-item label="操作原因" prop="operreason">
<el-input type="textarea" v-model="Udform.operreason"></el-input>
... ... @@ -603,7 +597,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="submitUdForm('Udform')">确 定</el-button>
<el-button type="primary" @click="udStatus==='delete'?deleteUdForm('Udform'):updateUdForm('Udform')">确 定</el-button>
</div>
</el-dialog>
</el-row>
... ... @@ -663,7 +657,7 @@
</style>
<script>
import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode } from '../../api/mt1201'
import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201 } from '../../api/mt1201'
import{addResponse} from "../../api/InResponse";
export default {
... ... @@ -694,6 +688,10 @@
update: '编辑',
create: '添加'
},
Reason:{
update: '修改',
delete: '删除'
},
ruleForm: {
awba: undefined,
awbh: undefined,
... ... @@ -709,8 +707,7 @@
splitcode: 'T',
uldType: undefined,
uldNo: undefined,
status: undefined,
ext5:'-1',
status: '22',
awbinfo: {
specopeid: undefined,
shprname: undefined,
... ... @@ -742,41 +739,18 @@
csgcustomerid: undefined,
paymodel: 'PP',
pcs: undefined,
weight: undefined
weight: undefined,
awbtype:'001',
},
waybill:undefined
},
paymodel:[{value:'PP',label:'预付'},{value:'DP',label:'到付'}],
customext5: [
{
value: '-1',
label: '请选择'
},
{
value: '001',
label: '进出口货物'
},
{
value: '002',
label: '国际转运货物'
},
{
value: '003',
label: '过境货物'
},
{
value: '004',
label: '暂时进出境集装箱'
},
{
value: '007',
label: '互市贸易'
},
{
value: '008',
label: '惰性物料'
}
],
{value:'001',label:'普通货物'},
{value:'002',label:'国际转运货物'},
{value:'003',label:'国内转关'},
{value:'004',label:'空箱'},
{value:'005',label:'快件'}],
customcodes:[],
customcode:'',
rules: {
... ... @@ -802,6 +776,7 @@
'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'blur'}],
'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.paymodel':[{required: true, message: '付费方式必须选择', trigger: 'change'}],
'awbinfo.awbtype':[{required: true, message: '海关状态必须选择', trigger: 'change'}],
customcode:[{required: true, message: '海关关区必须选择', trigger: 'change'}],
goodsname:[{required: true, message: '货物描述必须填写', trigger: 'blur'}]
},
... ... @@ -839,15 +814,26 @@
operperson: [{required: true, message: '请输入操作人', trigger: 'blur'}],
opertel: [{required: true, message: '请输入操作人联系电话', trigger: 'blur'}],
},
udStatus:'',
loading:false,
rows:{}
}
},
methods: {
//状态识别
formatStatus: function(row,column){
return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
:row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
:row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
:row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
},
/*多选框功能*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/*编辑主单信息*/
handleEdit(index, row){
console.log(row)
this.outerVisible = true;
this.dialogStatus='update';
this.FenStatus='ediAwbh';
... ... @@ -859,8 +845,6 @@
this.FenQuery.originstation=this.defaultQuery.originstation;
this.FenQuery.destinationstation=row.destinationstation;
this.getFenList(this.FenQuery);
this.getCountryCode();
this.selectCustomcode();
},
/*编辑分单信息*/
handleFen(index,row){
... ... @@ -873,11 +857,81 @@
},
//发送舱单报
handleSend(index,row){},
handleSend(index,row){
if(row.flightno.length>4){
row.flightno=row.flightno.substring(2)
}else{
row.flightno=row.flightno;
}
const map = {'mt1201':row}
sendCreateMt1201(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
//发送舱单删除报
handleDelete(index,row){
this.udStatus='delete';
this.dialogFormVisible=true;
this.Udform.awbano=row.awba;
this.Udform.awbhno=row.awbh;
this.Udform.carrier=row.carrier;
this.Udform.flightno=row.flightno.substring(2);
this.Udform.flightdate=row.flightdate;
this.Udform.bustype='MT1201';
this.Udform.busdate=Date.parse(new Date());
this.Udform.busweight=row.weight;
this.Udform.buspiece=row.piece;
this.Udform.opertype='发送舱单删除报';
if(row.flightno.length>4){
row.flightno=row.flightno;
}else{
row.flightno=row.carrier+row.flightno;
};
this.rows=row;
},
//提交发送舱单删除报表单
deleteUdForm(formName){
const map = {'flightNo':this.rows.flightno,
'flightDate':this.rows.flightdate,
'awba':this.rows.awba,
'content':'',
'customCode':this.rows.customcode,
'awbh':this.rows.awbh,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel}
sendRemoveMt1201(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
/*发送舱单修改报*/
handleUpdate(index,row){
this.udStatus='update';
this.dialogFormVisible=true;
//console.log(row);
this.Udform.awbano=row.awba;
this.Udform.awbhno=row.awbh;
this.Udform.carrier=row.carrier;
... ... @@ -888,32 +942,37 @@
this.Udform.busweight=row.weight;
this.Udform.buspiece=row.piece;
this.Udform.opertype='发送舱单修改报';
if(row.flightno.length>4){
row.flightno=row.flightno.substring(2);
}else{
row.flightno=row.flightno;
};
this.rows=row;
},
//提交发送舱单修改报表单
submitUdForm(formName){
updateUdForm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.Udform)
addResponse(this.Udform).then(res=>{
const map = {'mt1201':this.rows,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel}
sendEditeMt1201(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.dialogFormVisible=false;
this.outerVisible = false;
this.$refs[formName].resetFields();
this.centerDialogVisible=true;
this.msg=response.msg;
this.dialogFormVisible=false;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.$refs[formName].resetFields();
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
/*编辑分单列表信息*/
... ...
... ... @@ -90,7 +90,7 @@
<el-table-column
prop="status"
label="状态"
width="100">
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="receipt"
... ... @@ -121,11 +121,11 @@
<el-button
size="mini"
type="primary"
@click="handleDelete(scope.$index, scope.row)">发送理货报</el-button>
@click="handleCreate(scope.$index, scope.row)">发送理货报</el-button>
<el-button
size="mini"
type="primary"
@click="handleDelete(scope.$index, scope.row)">发送舱单删除报</el-button>
@click="handleDelete(scope.$index, scope.row)">发送理货删除报</el-button>
</template>
</el-table-column>
</el-table>
... ... @@ -230,9 +230,21 @@
<el-row class="flightInfo">
<el-col :span="6">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="ruleForm.customcode" placeholder="" style="display:inline">
<el-option v-for="(item,index) in customcodes" :key="index" :label="item.label"
:value="item.value"></el-option>
<el-select v-model="ruleForm.customcode"
filterable
allow-create
default-first-option
remote
:remote-method="remoteMethod2"
:loading="loading" placeholder="请选择" style="display:inline">
<el-option
v-for="item in customcodes"
:key="item.customcode"
:label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -329,6 +341,26 @@
</span>
</el-dialog>
</el-row>
<!--发送删除报修改报提示框-->
<el-row>
<el-dialog :title="'提交'+Reason[udStatus]+'信息'" :visible.sync="dialogFormVisible">
<el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
<el-form-item label="操作原因" prop="operreason">
<el-input type="textarea" v-model="Udform.operreason"></el-input>
</el-form-item>
<el-form-item label="操作人" prop="operperson">
<el-input v-model="Udform.operperson"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="opertel">
<el-input v-model="Udform.opertel"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="deleteUdForm('Udform')">确 定</el-button>
</div>
</el-dialog>
</el-row>
</el-main>
</el-container>
</template>
... ... @@ -367,7 +399,7 @@
</style>
<script>
import { getMt5201List,addMt5201,ediMt5201,delMt5201} from '../../api/mt5201'
import { getMt5201List,addMt5201,ediMt5201,delMt5201,sendCreateMt520x,sendRemoveMt520x,selectCustomcode} from '../../api/mt5201'
export default {
data() {
return {
... ... @@ -388,26 +420,10 @@
update: '编辑',
create: '添加'
},
customcodes:[
{
value: '-1',
label: '请选择'
},
{
value: '4604',
label: '4604'
},
{
value: '4620',
label: '4620'
},
{
value: '4613',
label: '4613'
}],
customcodes:[],
ruleForm:{
awba:undefined,
awbh:undefined,
awbh:'',
carrier:undefined,
flightno:undefined,
flightdate:undefined,
... ... @@ -443,9 +459,140 @@
sumNmmsCount:0,
sumNmmsPrice:0,
sumNmmsWeight:0,
Udform:{
operreason:'',
operperson:'',
opertel:'',
flightdate:'',
flightno:'',
carrier:'',
awbano:'',
awbhno:'',
bustype:'',
busdate:'',
busweight:'',
buspiece:'',
opertype:'',
},
udrules:{
operreason: [{required: true, message: '请输入操作原因', trigger: 'blur'}],
operperson: [{required: true, message: '请输入操作人', trigger: 'blur'}],
opertel: [{required: true, message: '请输入操作人联系电话', trigger: 'blur'}],
},
Reason:{
update: '修改',
delete: '删除'
},
udStatus:'',
dialogFormVisible: false,
rows:{},
loading:false,
}
},
methods: {
//状态适配
formatStatus:function (row,column) {
return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
:row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
:row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
:row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
},
//获取关区代码
remoteMethod2:function(query){
this.customcodes=[];
let params={customcode:query};
this.loading = true;
selectCustomcode(params).then(res =>{
if (res !== '') {
setTimeout(() => {
this.loading = false;
this.customcodes=res.data.data;
}, 200);
} else {
this.customcodes = [];
}
});
},
//发送理货报
handleCreate(index,row){
if(row.flightno.length>4){
row.flightno=row.flightno.substring(2)
}else{
row.flightno=row.flightno;
}
if(row.awbh==null){
row.awbh="";
}
const map = {'mt520x':row}
sendCreateMt520x(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
//发送理货删除报
handleDelete(index,row){
this.dialogFormVisible=true;
this.udStatus='delete';
this.Udform.awbano=row.awba;
this.Udform.awbhno=row.awbh;
this.Udform.carrier=row.carrier;
this.Udform.flightno=row.flightno.substring(2);
this.Udform.flightdate=row.flightdate;
this.Udform.bustype='MT5201';
this.Udform.busdate=Date.parse(new Date());
this.Udform.busweight=row.weight;
this.Udform.buspiece=row.piece;
this.Udform.opertype='发送理货删除报';
if(row.flightno.length>4){
row.flightno=row.flightno;
}else{
row.flightno=row.carrier+row.flightno;
};
if(row.awbh==null){
row.awbh="";
}
this.rows=row;
},
//发送理化删除报提交表单
deleteUdForm(){
const map = {'flightNo':this.rows.flightno,
'flightDate':this.rows.flightdate,
'awba':this.rows.awba,
'content':'',
'customCode':this.rows.customcode,
'awbh':this.rows.awbh,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel,
'rcfdep':this.rows.rcfdep}
sendRemoveMt520x(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
//批量选中事件
handleSelectionChange(val) {
this.multipleSelection = val;
... ...
... ... @@ -162,7 +162,7 @@
<el-table-column
prop="status"
label="状态"
width="90">
width="90" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="repick"
... ... @@ -249,13 +249,14 @@
tableData: [],
multipleSelection: [],
currentPage:1,
pageSize:10,
pageSize:100,
total:0
}
},
methods:{
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(val)
},
handleClick(row) {
console.log(row);
... ... @@ -268,6 +269,13 @@
this.currentPage=val;
this.QueryData();
},
//状态适配
formatStatus:function (row,column) {
return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
:row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
:row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
:row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
},
//修改状态
handleStuts(){},
//条件查询方法
... ...