Commit 3c2659f7 authored by wanglianghe's avatar wanglianghe

起飞

parent b76fee56
......@@ -255,3 +255,22 @@ export function getMergeTagById(id) {
/***************************** 合包 end **********************************/
/***************************** 起运 start *******************************/
export function takeoffCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-air-fly/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-air-fly/create",
method: "post",
data,
});
}
/***************************** 起运 end *******************************/
......@@ -10,6 +10,7 @@ export function checkPermi(value) {
const permissions = store.getters && store.getters.permissions
const permissionDatas = value
const all_permission = "*:*:*";
console.log(permissionDatas)
const hasPermission = permissions.some(permission => {
return all_permission === permission || permissionDatas.includes(permission)
......
<template>
<div>
<el-form ref="twoWayTakeoffForm" :rules="rules" :model="twoWayTakeoffObj" label-width="120px">
<el-form-item :label="$t('预计头程时间')" prop="estHeadTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="twoWayTakeoffObj.estHeadTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-form-item :label="$t('预计起飞时间')">
{{getTakeOffTime()}}
</el-form-item>
<el-form-item :label="$t('实际头程时间')" prop="actHeadTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="twoWayTakeoffObj.actHeadTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-form-item :label="$t('实际起飞时间')" prop="dtRealFlyTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="twoWayTakeoffObj.dtRealFlyTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计二程时间')" prop="estSecondTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="twoWayTakeoffObj.estSecondTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-form-item :label="$t('实际头程时间')" prop="realHeadTravelTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="twoWayTakeoffObj.realHeadTravelTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
......@@ -28,7 +28,7 @@
<script>
import regError from "../../regError";
import { takeoffCreate } from "@/api/ecw/boxSeaAir";
import { takeoffCreate } from "@/api/ecw/boxAir";
import { formatDateStr, serviceMsg } from "../utils";
/**
......@@ -46,9 +46,8 @@ export default {
twoWayTakeoffObj: {},
// 校验
rules: {
actHeadTime: [{ required: true, message: this.$t("必填"), trigger: "blur" }],
estHeadTime: [{ required: true, message: this.$t("必填"), trigger: "blur" }],
estSecondTime: [{ required: true, message: this.$t("必填"), trigger: "blur" }],
dtRealFlyTime: [{ required: true, message: this.$t("必填"), trigger: "blur" }],
realHeadTravelTime: [{ required: true, message: this.$t("必填"), trigger: "blur" }],
},
// 弹窗配置
dialogVisible: false,
......@@ -59,9 +58,8 @@ export default {
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["actHeadTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["estHeadTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["estSecondTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["dtRealFlyTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["realHeadTravelTime"], "YYYY-MM-DD HH:mm:ss");
this.twoWayTakeoffObj = oldData;
},
watch: {
......@@ -91,6 +89,13 @@ export default {
cancel(type) {
this.$emit("closeDialog", type);
},
// 预计开船时间
getTakeOffTime() {
return dayjs(this.$attrs.shipmentObj.bookAirInfo.flyTime).format(
"YYYY-MM-DD HH:mm:ss"
);
},
},
};
</script>
......
......@@ -200,16 +200,16 @@ function airBaseData() {
end: require("@/assets/images/shipping/ecqf-end.png"),
},
type: "twoWayTakeoff",
dataKey: "14", // 字典数据键值
dataKey: "9", // 字典数据键值
/**
* 起飞状态:141、未起飞;142、已起飞
* 起飞状态:231、未起飞;232、已起飞
*/
voName: "takeOffInfo",
keyName: "stkStatus",
voName: "boxAirFlyInfo",
keyName: "flyStatus",
status: {
start: [141],
start: [231],
wait: [],
end: [142],
end: [232],
},
},
],
......
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