作者 shenhailong

修改 发送报文按钮 自灰 前端动态修改 状态 回执信

... ... @@ -111,7 +111,8 @@
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status ==='23'">发舱单报</el-button>
:disabled="addStatus(scope.row.status)">发舱单报</el-button>
<!-- :disabled="scope.row.status ==='23'">发舱单报</el-button>-->
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
<p></p>
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
... ... @@ -119,7 +120,8 @@
<el-button size="mini" type="primary" v-if="scope.row.awbh ===null"
@click="handleAddAwbh(scope.row)">新增分单</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="scope.row.status ==='24'">发删除报</el-button>
:disabled="deleteStatus(scope.row.status)">发删除报</el-button>
<!-- :disabled="scope.row.status ==='24'">发删除报</el-button>-->
</template>
</el-table-column>
</tree-table>
... ... @@ -470,6 +472,8 @@
contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
},
rows:{},
}
},
created() {
... ... @@ -617,21 +621,24 @@
this.detailData = res.data
})
},
//发送舱单报
handleAwbSend(row) {
delete row.children
delete row.parent
this.rows = row;
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
console.log(row)
sendCreateMt5202(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
// this.getList()
this.rows.status="23";
this.rows.ext5="新增报发送成功";
}else {
Message.error(res.data.respMessage)
}
... ... @@ -640,8 +647,19 @@
Message.error(error.message)
})
},
// 发送舱单报自灰
addStatus(status){
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
//新增分单理货
handleAddAwbh(row) {
// 清空from列表
this.restModel();
this.tidyModel.carrier = row.carrier
this.tidyModel.awba = row.awba
this.tidyModel.flightdate = row.flightdate
... ... @@ -649,7 +667,8 @@
this.tidyModel.originstation = row.originstation
this.tidyModel.destinationstation = row.destinationstation
this.tidyModel.customcode = row.customcode
this.dialogStatus = 'addAwbh'
// this.dialogStatus = 'addAwbh'
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.tidyFormData.clearValidate()
... ... @@ -657,6 +676,9 @@
},
// 发删除报
handleSendDelete(row){
this.rows = row;
this.respModel = {
carrier: undefined,
reason: undefined,
... ... @@ -685,6 +707,15 @@
this.$refs.tidyDeleteForm.clearValidate()
})
},
// 删除舱单报自灰
deleteStatus(status){
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
// 发送删除报
sendTidyDelete(){
this.$refs.tidyDeleteForm.validate(valid =>{
if(valid){
... ... @@ -692,7 +723,8 @@
if(res.data.count >0){
Message.success(res.data.respMessage)
this.dialogDeleteVisible = false
this.getList()
this.rows.status="24";
this.rows.ext5="删除报发送成功";
}else {
Message.error(res.data.respMessage)
}
... ... @@ -700,7 +732,6 @@
}
})
},
// 删除当前运单
handleAwbDelete(row) {
delete row.parent
... ...