Commit b212e0fe authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents 8b15b3f2 20abbade
<template> <template>
<div> <div>
<el-form ref="arrivalForm" :rules="rules" :model="arrivalObj" label-width="120px"> <el-form ref="arrivalForm" :rules="rules" :model="airArrivalInfo" label-width="120px">
<el-form-item :label="$t('预计到港时间')">{{getExpectedTime()}}</el-form-item> <!-- <el-form-item :label="$t('预计到港时间')">{{getExpectedTime()}}</el-form-item>
<el-form-item :label="$t('实际到港时间')" prop="apRealTime"> <el-form-item :label="$t('实际到港时间')" prop="apRealTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apRealTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apRealTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
...@@ -9,10 +9,19 @@ ...@@ -9,10 +9,19 @@
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apConfirmTime" value-format="yyyy-MM-dd HH:mm:ss"> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apConfirmTime" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker> </el-date-picker>
<p class="message-area" v-show="showMsg">{{$t('请确认是否有异常,如有异常请进行异常登记')}}</p> <p class="message-area" v-show="showMsg">{{$t('请确认是否有异常,如有异常请进行异常登记')}}</p>
</el-form-item> -->
<el-form-item :label="$t('实际二程起飞时间')" prop="actSecondTime" v-show="this.$attrs.shipmentObj.bookAirInfo.voyage">
<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>
<el-form-item :label="$t('卸港时间')"> <el-form-item :label="$t('实际到港时间')" prop="actTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apUnloadPortTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <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-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
...@@ -32,7 +41,7 @@ ...@@ -32,7 +41,7 @@
<script> <script>
import regError from "../../regError"; import regError from "../../regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { arrivalCreate } from "@/api/ecw/boxSea"; import { arrivalCreate } from "@/api/ecw/boxSeaAir";
import { formatDateStr, serviceMsg } from "../utils"; import { formatDateStr, serviceMsg } from "../utils";
/** /**
...@@ -47,12 +56,15 @@ export default { ...@@ -47,12 +56,15 @@ export default {
data() { data() {
return { return {
// 到港对象 // 到港对象
arrivalObj: {}, airArrivalInfo: {},
// 校验 // 校验
rules: { rules: {
apRealTime: [ actSecondTime: [
{ required: true, message: this.$t("必填"), trigger: "change" }, { required: true, message: this.$t("必填"), trigger: "change" },
], ],
actTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
]
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
...@@ -68,16 +80,23 @@ export default { ...@@ -68,16 +80,23 @@ export default {
let oldData = { ...this.$attrs.shipmentObj[voName] }; let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr( oldData = formatDateStr(
oldData, oldData,
["apRealTime", "apConfirmTime"], ["actSecondTime", "estTime", "actTime"],
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
); );
oldData = formatDateStr(oldData, ["apUnloadPortTime"]); this.airArrivalInfo = oldData;
this.arrivalObj = oldData;
}, },
watch: { watch: {
// 确认到港时间 // 实际二程起飞时间
"arrivalObj.apConfirmTime"(val) { "airArrivalInfo.actSecondTime"(val) {
this.compareDate(this.getExpectedTime(), val); this.compareDate(this.getHeadTravelTime(), val);
},
"airArrivalInfo.estTime"(val) {
this.compareDate(this.airArrivalInfo.actTime, val);
},
"airArrivalInfo.actTime"(val) {
this.compareDate(this.airArrivalInfo.estTime, val);
}, },
}, },
methods: { methods: {
...@@ -88,10 +107,10 @@ export default { ...@@ -88,10 +107,10 @@ export default {
} }
}, },
// 获取预计到港时间 // 获取预计到港时间
getExpectedTime() { getHeadTravelTime() {
const { shippingInfo } = this.$attrs.shipmentObj; const { shippingInfo } = this.$attrs.shipmentObj;
if (shippingInfo) { if (shippingInfo) {
return dayjs(shippingInfo.dtEstArrivalTime).format( return dayjs(shippingInfo.realHeadTravelTime).format(
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
); );
} }
...@@ -120,7 +139,7 @@ export default { ...@@ -120,7 +139,7 @@ export default {
this.$refs["arrivalForm"].validate((valid) => { this.$refs["arrivalForm"].validate((valid) => {
if (valid) { if (valid) {
arrivalCreate({ arrivalCreate({
...this.arrivalObj, ...this.airArrivalInfo,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
operateType, operateType,
}).then((res) => { }).then((res) => {
......
<template> <template>
<div> <div>
<el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px"> <el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<el-form-item :label="$t('清关代理')">{{getClAgent('label')}}</el-form-item> <!-- <el-form-item :label="$t('清关代理')">{{getClAgent('label')}}</el-form-item> -->
<el-form-item :label="$t('预计清关时间')" prop="clEstTime"> <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-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
......
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