作者 xudada

增加校验,优化

import http from './http.js'
let baseUrl = 'nmms-server-import/nmms/rep'
export const addResponse=params=>{return http.post(`${baseUrl}/InsertResponse`, params);};
\ No newline at end of file
//添加回执明细
export const addResponse=params=>{return http.post(`${baseUrl}/InsertResponse`, params);};
//查询回执明细列表
export const selectResponseList=params=>{return http.post(`${baseUrl}/selectResponseList`, params);};
\ No newline at end of file
... ...
... ... @@ -128,7 +128,7 @@ let routes = [
{path:'/entertall',component:EnterTally,name:'进港理货'},
{path:'/tallymaster',component:TallyMster,name:'进港理货舱单'},
{path:'/importallocation',component:Importallocation,name:'进港分拨'},
{path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'}
{path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'},
]
},
{
... ...
... ... @@ -133,13 +133,13 @@
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="repick"
prop="ext5"
label="回执内容"
width="250">
</el-table-column>
<el-table-column
label="修改状态"
width="400">
width="550">
<template slot-scope="scope">
<el-button
v-if="scope.row.turntype=='MT6202'"
... ... @@ -157,12 +157,14 @@
v-if="scope.row.turntype=='MT6202'"
size="mini"
type="primary"
:disabled="btSendStatusFormater(scope.row.status)"
@click="importSend(scope.$index, scope.row)">申请分拨
</el-button>
<el-button
v-else
size="mini"
type="primary"
:disabled="btSendStatusFormater(scope.row.status)"
@click="arriveSend(scope.$index, scope.row)">分拨运抵
</el-button>
<el-button
... ... @@ -181,14 +183,21 @@
v-if="scope.row.turntype=='MT6202'"
size="mini"
type="primary"
:disabled="btDeleStatusFormater(scope.row.status)"
@click="importDel(scope.$index, scope.row)">申请分拨删除
</el-button>
<el-button
v-else
size="mini"
type="primary"
:disabled="btDeleStatusFormater(scope.row.status)"
@click="arriveDel(scope.$index, scope.row)">分拨运抵删除
</el-button>
<el-button
size="mini"
type="primary"
@click="UpdateStatus(scope.$index, scope.row)">更改状态
</el-button>
</template>
</el-table-column>
</el-table>
... ... @@ -713,6 +722,23 @@
}
},
methods:{
//更改状态
UpdateStatus(column,row){
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
row.status = '22';
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '状态更改取消'
})
})
},
//回执收发明细
handleDetail(index,row){
if(row.flightno.length>4){
... ... @@ -732,6 +758,21 @@
: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;
}else if(status=='22' ) {
return false;
}
},
btDeleStatusFormater:(status) => {
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
//发送分拨申请报
importSend(index,row){
const map = {'mt6202':row}
... ... @@ -740,6 +781,8 @@
//console.log(res);
this.code=response.code;
if(this.code=='200'){
row.status='23'
row.ext5='分拨申请发送成功';
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
... ... @@ -772,6 +815,7 @@
//发送分拨申请删除报表单
deleteIdForm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
const map = {'flightNo':this.rows.flightno,
'flightDate':this.rows.flightdate,
'awba':this.rows.awba,
... ... @@ -787,6 +831,8 @@
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.rows.status='24';
this.rows.ext5='分拨申请删除报发送成功';
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
... ... @@ -804,6 +850,8 @@
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.rows.status='24';
this.rows.ext5='分拨运抵删除报发送成功';
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
... ... @@ -815,7 +863,11 @@
this.msg=response.msg;
}
});
}
}}
else {
console.log('error submit!!');
return false;
}
});
},
... ... @@ -828,6 +880,8 @@
//console.log(res);
this.code=response.code;
if(this.code=='200'){
row.status='23'
row.ext5='分拨运抵发送成功';
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
... ...
... ... @@ -92,6 +92,7 @@
customcode:'',
turnunloading:'',
goodsname:'',
status:'22'
},
rules: {
awba: [
... ...
... ... @@ -99,7 +99,8 @@
turnunloading:'',
pno:'',
ext2:'',
ext1:''
ext1:'',
status:'22'
},
rules: {
awba: [
... ...
... ... @@ -284,12 +284,12 @@
<el-row style="margin-bottom: 0px;">
<el-col :span="3">
<el-form-item label="起始站" prop="awbinfo.sairportid" >
<el-input v-model="ruleForm.awbinfo.sairportid"></el-input>
<el-input v-model="ruleForm.awbinfo.sairportid" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="承运人1" prop="awbinfo.by1">
<el-input v-model="ruleForm.awbinfo.by1"></el-input>
<el-input v-model="ruleForm.awbinfo.by1" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
... ... @@ -299,27 +299,27 @@
</el-col>
<el-col :span="3">
<el-form-item label="承运人2" prop="awbinfo.by2">
<el-input v-model="ruleForm.awbinfo.by2"></el-input>
<el-input v-model="ruleForm.awbinfo.by2" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="到达站2" prop="awbinfo.dest2">
<el-input v-model="ruleForm.awbinfo.dest2"></el-input>
<el-input v-model="ruleForm.awbinfo.dest2" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="承运人3" prop="awbinfo.by3">
<el-input v-model="ruleForm.awbinfo.by3"></el-input>
<el-input v-model="ruleForm.awbinfo.by3" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="到达站3" prop="awbinfo.dest3">
<el-input v-model="ruleForm.awbinfo.dest3"></el-input>
<el-input v-model="ruleForm.awbinfo.dest3" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="目的站" prop="awbinfo.eairportid">
<el-input v-model="ruleForm.awbinfo.eairportid"></el-input>
<el-input v-model="ruleForm.awbinfo.eairportid" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -333,7 +333,7 @@
<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 v-model="ruleForm.awbinfo.pcs" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
... ... @@ -723,7 +723,7 @@
awba: undefined,
awbh: undefined,
passage: undefined,
customcode: '-1',
customcode: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
... ... @@ -769,7 +769,8 @@
weight: undefined,
awbtype:'001',
},
waybill:undefined
waybill:undefined,
customText:undefined
},
paymodel:[{value:'PP',label:'预付'},{value:'DP',label:'到付'}],
customext5: [
... ... @@ -844,12 +845,14 @@
},
udStatus:'',
loading:false,
rows:{},
temprows:{
},
dialogTableVisible:false,
gridData:[]
}
},
methods: {
//回执收发明细
handleDetail(index,row){
if(row.flightno.length>4){
... ... @@ -914,7 +917,6 @@
},
/*编辑主单信息*/
handleEdit(index, row){
console.log(row)
this.outerVisible = true;
this.dialogStatus='update';
this.FenStatus='ediAwbh';
... ... @@ -951,6 +953,7 @@
this.code=response.code;
if(this.code=='200'){
row.status='23'
row.customText='舱单报发送成功';
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
... ... @@ -978,37 +981,46 @@
if(row.flightno.length>4){
row.flightno=row.flightno.substring(2);
}
this.rows=row;
this.temprows= 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,
'carrier':this.Udform.carrier}
sendRemoveMt1201(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.rows.status='24'
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;
this.$refs[formName].validate((valid) => {
if (valid) {
const map = {'flightNo':this.temprows.flightno,
'flightDate':this.temprows.flightdate,
'awba':this.temprows.awba,
'content':'',
'customCode':this.temprows.customcode,
'awbh':this.temprows.awbh,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel,
'carrier':this.Udform.carrier}
sendRemoveMt1201(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.temprows.status='24';
this.temprows.customText='舱单删除报发送成功';
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 {
console.log('error submit!!');
return false;
}
});
},
/*发送舱单修改报*/
handleUpdate(index,row){
... ... @@ -1029,34 +1041,40 @@
}else{
row.flightno=row.flightno;
};
this.rows=row;
this.temprows=row;
},
//提交发送舱单修改报表单
updateUdForm(formName){
this.$refs[formName].validate((valid) => {
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.rows.status='25'
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;
}
});
if (valid) {
const map = {'mt1201':this.temprows,
'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.temprows.status='25'
this.temprows.customText='舱单修改报发送成功';
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 {
console.log('error submit!!');
return false;
}
});
},
/*编辑分单列表信息*/
handleClick(row) {
... ... @@ -1078,7 +1096,7 @@
/*获取默认数据列表*/
getList(){
getMt1201List(this.defaultQuery).then(res =>{
//console.log(res);
console.log(res);
this.sumNmmsCount=0;
this.sumNmmsPrice=0;
this.sumNmmsWeight=0;
... ... @@ -1148,6 +1166,7 @@
createData(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.ruleForm.status='22'
addMt1201(this.ruleForm).then(res=>{
let response=res.data;
//console.log(res);
... ...
... ... @@ -39,6 +39,7 @@
<el-col :span="24">
<template>
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
... ... @@ -52,10 +53,17 @@
width="50">
</el-table-column>
<el-table-column
prop="waybill"
label="运单号"
width="160"
width="185"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.awbh==''||scope.row.awbh==null">
{{scope.row.awba}}
</span>
<span v-else>
{{scope.row.awbh}}
</span>
</template>
</el-table-column>
<el-table-column
prop="totalpiece"
... ... @@ -93,14 +101,14 @@
width="100" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="receipt"
prop="ext5"
label="回执信息"
width="180">
</el-table-column>
<el-table-column
prop="operation"
label="操作"
width="450"
width="550"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button
... ... @@ -121,11 +129,18 @@
<el-button
size="mini"
type="primary"
:disabled="btSendStatusFormater(scope.row.status)"
@click="handleCreate(scope.$index, scope.row)">发送理货报</el-button>
<el-button
size="mini"
type="primary"
:disabled="btDeleStatusFormater(scope.row.status)"
@click="handleDelete(scope.$index, scope.row)">发送理货删除报</el-button>
<el-button
size="mini"
type="primary"
@click="UpdateStatus(scope.$index, scope.row)">更改状态
</el-button>
</template>
</el-table-column>
</el-table>
... ... @@ -184,12 +199,12 @@
<el-row class="flightInfo">
<el-col :span="6">
<el-form-item label="起始站" prop="originstation">
<el-input disabled="" v-model="ruleForm.originstation"></el-input>
<el-input disabled="" v-model="ruleForm.originstation" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="目的站" prop="destinationstation">
<el-input disabled="" v-model="ruleForm.destinationstation"></el-input>
<el-input disabled="" v-model="ruleForm.destinationstation" onkeyup="this.value=this.value.toUpperCase()"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
... ... @@ -313,7 +328,6 @@
</el-table-column>
</el-table>
</template>
</el-col>
</el-row>
</el-form>
... ... @@ -436,7 +450,7 @@
customcodes:[],
ruleForm:{
awba:undefined,
awbh:'',
awbh:undefined,
carrier:undefined,
flightno:undefined,
flightdate:undefined,
... ... @@ -446,14 +460,15 @@
weight:undefined,
starttime:undefined,
endtime:undefined,
customcode:"-1",
customcode:undefined,
goodsname:undefined,
actime:undefined,
rcfdep:"MT5201",
status:undefined,
status:'22',
isdelete:undefined,
pcs:undefined,
wei:undefined
wei:undefined,
ext5:undefined
},
FenStatus:'',
rules: {
... ... @@ -501,10 +516,42 @@
rows:{},
loading:false,
dialogTableVisible:false,
gridData:[]
gridData:[],
}
},
methods: {
//更改状态
UpdateStatus(column,row){
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
row.status = '22';
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '状态更改取消'
})
})
},
//发送舱单报按钮判定事件
btSendStatusFormater:(status) => {
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
btDeleStatusFormater:(status) => {
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
//回执收发明细
handleDetail(index,row){
if(row.flightno.length>4){
... ... @@ -557,6 +604,8 @@
//console.log(res);
this.code=response.code;
if(this.code=='200'){
row.status='23'
row.ext5='理货报发送成功';
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
... ... @@ -590,34 +639,44 @@
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,
'carrier':this.rows.carrier}
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;
deleteUdForm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
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,
'carrier':this.rows.carrier}
sendRemoveMt520x(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.rows.status='24';
this.rows.ext5='理货删除报发送成功';
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 {
console.log('error submit!!');
return false;
}
});
},
//批量选中事件
handleSelectionChange(val) {
... ... @@ -658,6 +717,7 @@
this.sumNmmsPrice=0;
this.sumNmmsWeight=0;
let response=res.data.data;
console.log(res)
this.tableData=response;
response.forEach((item,i) => {
if(item.awba!=null&&item.awbh=="");
... ... @@ -681,6 +741,8 @@
createData(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.ruleForm.status='22';
//this.ruleForm.endtime=this.ruleForm.starttime.add(Calendar.MINUTE, 15);
addMt5201(this.ruleForm).then(res=>{
let response=res.data;
this.code=response.code;
... ...
... ... @@ -165,7 +165,7 @@
width="90" :formatter="formatStatus">
</el-table-column>
<el-table-column
prop="repick"
prop="ext5"
label="回执内容"
width="250">
</el-table-column>
... ... @@ -226,8 +226,8 @@
},
options: [
{
value: '01',
label: '选择状态'
value: '',
label: '业务状态'
}, {
value: '22',
label: '未发送'
... ... @@ -241,7 +241,7 @@
options2: [
{
value: '',
label: '选择状态'
label: '业务类型'
}, {
value: 'MT1201',
label: '原始舱单'
... ... @@ -259,7 +259,6 @@
methods:{
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(val)
},
handleClick(row) {
console.log(row);
... ...