Commit bb3dedd9 authored by zhoutong's avatar zhoutong

多次清关

parent cc1908bb
......@@ -356,7 +356,7 @@ export function updateOrderClearance(data) {
*/
export function updateAllOrderClearance(data) {
return request({
url: `/ecw/box-clearance/updateAllOrderArrival`,
url: `/ecw/box-clearance/updateAllOrderClearance`,
method: "post",
data: data
});
......
......@@ -29,15 +29,21 @@
<span v-for="order in cusClearanceObj.clearanceOrderList" :key="order.id">{{order.orderNo}} </span>
</el-form-item>
<!-- <el-form-item v-if="dtRealHeadTimeFlag||airArrivalInfo.arriveType==1" :label="$t('实际二程起飞时间')" prop="actSecondTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actSecondTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计到港时间')" prop="estTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.estTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('实际到港时间')" prop="actTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> -->
<el-card v-for="order in cusClearanceObj.clearanceOrderIdList" :key="order" style="margin: 20px;">
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('订单号')">
{{arrivalOrderList.find(item=>item.orderId==order).orderNo}}
</el-form-item>
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('实际二程起飞时间')" prop="actSecondTime">
{{formatDate(arrivalOrderList.find(item=>item.orderId==order).actSecondTime)}}
</el-form-item>
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('预计到港时间')" prop="estTime">
{{formatDate(arrivalOrderList.find(item=>item.orderId==order).estTime)}}
</el-form-item>
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('实际到港时间')" prop="actTime">
{{formatDate(arrivalOrderList.find(item=>item.orderId==order).actTime)}}
</el-form-item>
</el-card>
<el-form-item :label="$t('预计清关时间')" prop="clEstTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
......@@ -66,7 +72,7 @@ import regError from "../../regError";
import dayjs from "dayjs";
import { clearanceCreate } from "@/api/ecw/boxSea";
import { shipmentOrderList } from "@/api/ecw/boxAir";
import { formatDateStr, serviceMsg } from "../utils";
import { formatDateStr, serviceMsg, formatDate } from "../utils";
/**
* 清关
......@@ -96,6 +102,7 @@ export default {
showMsg: false,
orderList: [],
orderListFilter: [],
arrivalOrderList: []
};
},
created() {
......@@ -106,6 +113,7 @@ export default {
this.cusClearanceObj = oldData;
if(!this.cusClearanceObj.clearanceType) this.$set(this.cusClearanceObj,'clearanceType',0)
this.$set(this.cusClearanceObj,'clearanceOrderIdList',this.cusClearanceObj.clearanceOrderList.map(item=>{return item.orderId}))
this.arrivalOrderList = this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList
shipmentOrderList(this.$attrs.shipmentObj.id).then(r=>{
this.orderList = r.data
this.orderListFilter = r.data
......@@ -143,6 +151,7 @@ export default {
}
},
methods: {
formatDate,
filterOrder(val){
if(val != ''){
this.orderListFilter = this.orderList.filter(item=>{
......
......@@ -19,7 +19,7 @@
</template>
<script>
import { updateOrderClearance, updateAllOrderArrival } from "@/api/ecw/boxAir";
import { updateOrderClearance, updateAllOrderClearance } from "@/api/ecw/boxAir";
export default {
name: "updateError",
......@@ -35,10 +35,10 @@ export default {
cusClearanceObj: {},
// 校验
rules: {
actSecondTime: [
clEstTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
actTime: [
clClearTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
]
},
......@@ -46,7 +46,7 @@ export default {
};
},
watch: {
arrivalInfo: {
clearInfo: {
handler: function (val) {
const { orderList, type } = val;
......@@ -89,7 +89,7 @@ export default {
let param = {
shipmentId: this.shipmentObj.id
}
updateAllOrderArrival({...this.cusClearanceObj, ...param}).then(()=>{
updateAllOrderClearance({...this.cusClearanceObj, ...param}).then(()=>{
this.$message.success("成功");
this.cancel()
})
......
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