Commit 3c2659f7 authored by wanglianghe's avatar wanglianghe

起飞

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