Commit 3fd048f0 authored by zhoutong's avatar zhoutong

修复多次到港清关

parent f941e5a5
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
reserve-keyword reserve-keyword
:filter-method="filterOrder" :filter-method="filterOrder"
:placeholder="$t('请输入订单号、提单号、唛头')" :placeholder="$t('请输入订单号、提单号、唛头')"
@change="selectOrderId"
> >
<el-option <el-option
v-for="(item) in statusOrderList" v-for="(item) in statusOrderList"
...@@ -60,7 +61,7 @@ import regError from "../../regError"; ...@@ -60,7 +61,7 @@ import regError from "../../regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { arrivalCreate } from "@/api/ecw/boxSeaAir"; import { arrivalCreate } from "@/api/ecw/boxSeaAir";
import { shipmentOrderList } from "@/api/ecw/boxAir"; import { shipmentOrderList } from "@/api/ecw/boxAir";
import { formatDateStr, serviceMsg } from "../utils"; import { formatDateStr, serviceMsg, formatDate } from "../utils";
/** /**
* 到港 * 到港
...@@ -106,6 +107,7 @@ export default { ...@@ -106,6 +107,7 @@ export default {
dtRealHeadTimeFlag: false, dtRealHeadTimeFlag: false,
orderList: [], orderList: [],
orderListFilter: [], orderListFilter: [],
arrivalOrderList: []
}; };
}, },
created() { created() {
...@@ -121,7 +123,8 @@ export default { ...@@ -121,7 +123,8 @@ export default {
this.dtRealHeadTimeFlag = true this.dtRealHeadTimeFlag = true
} }
if(!this.airArrivalInfo.arriveType) this.$set(this.airArrivalInfo,'arriveType',0) if(!this.airArrivalInfo.arriveType) this.$set(this.airArrivalInfo,'arriveType',0)
if(this.airArrivalInfo.arrivalOrderList) this.$set(this.airArrivalInfo,'arriveOrderIdList',this.airArrivalInfo.arrivalOrderList.map(item=>{return item.orderId})) if(this.airArrivalInfo.arrivalOrderList) this.$set(this.airArrivalInfo,'arriveOrderIdList',[])
if(this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList) this.arrivalOrderList = this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList
shipmentOrderList(this.$attrs.shipmentObj.id).then(r=>{ shipmentOrderList(this.$attrs.shipmentObj.id).then(r=>{
this.orderList = r.data this.orderList = r.data
this.orderListFilter = r.data this.orderListFilter = r.data
...@@ -137,7 +140,7 @@ export default { ...@@ -137,7 +140,7 @@ export default {
tidanNo: item.tidanNo, tidanNo: item.tidanNo,
marks: item.marks, marks: item.marks,
} }
let index = this.airArrivalInfo.arrivalOrderLis?this.airArrivalInfo.arrivalOrderList.findIndex(p=>p.orderId==item.orderId):-1 let index = this.arrivalOrderList.findIndex(p=>p.orderId==item.orderId)
if(index != -1){ if(index != -1){
json.arrival = this.$t('已到港') json.arrival = this.$t('已到港')
}else{ }else{
...@@ -177,6 +180,20 @@ export default { ...@@ -177,6 +180,20 @@ export default {
this.orderListFilter = this.orderList this.orderListFilter = this.orderList
} }
}, },
selectOrderId(val) {
if (val.length == 1) {
let arr = this.arrivalOrderList.find((item) => item.orderId == val[0])
if (arr) {
this.$set(this.airArrivalInfo, 'actSecondTime', formatDate(arr.actSecondTime))
this.$set(this.airArrivalInfo, 'estTime', formatDate(arr.estTime))
this.$set(this.airArrivalInfo, 'actTime', formatDate(arr.actTime))
}
} else {
this.$set(this.airArrivalInfo, 'actSecondTime', null)
this.$set(this.airArrivalInfo, 'estTime', null)
this.$set(this.airArrivalInfo, 'actTime', null)
}
},
regCloseDialog(type) { regCloseDialog(type) {
this.dialogVisible = false; this.dialogVisible = false;
if (type === "error") { if (type === "error") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment