|
|
@ -1,6 +1,16 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="BookingAddMain">
|
|
|
|
<div class="BookingAddMain">
|
|
|
|
<div class="BookingAddButtonBox">
|
|
|
|
<div class="BookingAddButtonBox">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="
|
|
|
|
|
|
|
|
() => {
|
|
|
|
|
|
|
|
router.push('/Booking');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
返回
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<el-button type="primary" @click="ClickSave"> 保存 </el-button>
|
|
|
|
<el-button type="primary" @click="ClickSave"> 保存 </el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
@ -80,7 +90,7 @@
|
|
|
|
@change="
|
|
|
|
@change="
|
|
|
|
(e) => {
|
|
|
|
(e) => {
|
|
|
|
store.state.Data.portlist.forEach((i) => {
|
|
|
|
store.state.Data.portlist.forEach((i) => {
|
|
|
|
if (e == i.code) {
|
|
|
|
if (e == i.ediCode) {
|
|
|
|
form.portDischarge = i.name;
|
|
|
|
form.portDischarge = i.name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -89,9 +99,9 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in store.state.Data.portlist"
|
|
|
|
v-for="item in store.state.Data.portlist"
|
|
|
|
:key="item.code"
|
|
|
|
:key="item.ediCode"
|
|
|
|
:label="item.name"
|
|
|
|
:label="item.name"
|
|
|
|
:value="item.code"
|
|
|
|
:value="item.ediCode"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -325,6 +335,11 @@
|
|
|
|
<el-input v-model="form.pkgs" />
|
|
|
|
<el-input v-model="form.pkgs" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
|
|
<el-form-item label="品名">
|
|
|
|
|
|
|
|
<el-input v-model="form.goodsDescription" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
<template v-if="form.cargoId == 'R'">
|
|
|
|
<template v-if="form.cargoId == 'R'">
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="24">
|
|
|
|
<span class="cargoS">冻柜信息</span>
|
|
|
|
<span class="cargoS">冻柜信息</span>
|
|
|
@ -522,7 +537,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { onMounted, ref } from "vue";
|
|
|
|
import { onMounted, ref, watch } from "vue";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
bookingCustomSave,
|
|
|
|
bookingCustomSave,
|
|
|
|
bookingCustomInfo,
|
|
|
|
bookingCustomInfo,
|
|
|
@ -556,10 +571,10 @@ export default {
|
|
|
|
resource: "",
|
|
|
|
resource: "",
|
|
|
|
desc: "",
|
|
|
|
desc: "",
|
|
|
|
ctnList: [],
|
|
|
|
ctnList: [],
|
|
|
|
|
|
|
|
cargoData: {},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const serviceItemList = ref([]);
|
|
|
|
const serviceItemList = ref([]);
|
|
|
|
store.state.Data.cobServiceItemTenantList.forEach((item) => {
|
|
|
|
store.state.Data.cobServiceItemTenantList.forEach((item) => {
|
|
|
|
console.log(item);
|
|
|
|
|
|
|
|
if (item.defaultSelected == 1) {
|
|
|
|
if (item.defaultSelected == 1) {
|
|
|
|
serviceItemList.value.push(item.serviceCode);
|
|
|
|
serviceItemList.value.push(item.serviceCode);
|
|
|
|
form.value.serviceItemList.push({
|
|
|
|
form.value.serviceItemList.push({
|
|
|
@ -570,12 +585,40 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const viweType = ref("");
|
|
|
|
const viweType = ref("");
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
|
|
|
() => router.currentRoute.value,
|
|
|
|
|
|
|
|
(newValue) => {
|
|
|
|
|
|
|
|
// console.log(newValue);
|
|
|
|
|
|
|
|
viweType.value = newValue.query.type;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{ immediate: true }
|
|
|
|
|
|
|
|
);
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
let query = router.currentRoute.value.query;
|
|
|
|
let query = router.currentRoute.value.query;
|
|
|
|
viweType.value = query.type;
|
|
|
|
viweType.value = query.type;
|
|
|
|
if (query.type == "Edit" || query.type == "Copy") {
|
|
|
|
if (query.type == "Edit" || query.type == "Copy") {
|
|
|
|
bookingCustomInfo({ id: query.id }).then((res) => {
|
|
|
|
bookingCustomInfo({ id: query.id }).then((res) => {
|
|
|
|
form.value = { ...res.data };
|
|
|
|
form.value = { ...res.data };
|
|
|
|
|
|
|
|
form.value.cargoData = {
|
|
|
|
|
|
|
|
temperature: res.data.temperature,
|
|
|
|
|
|
|
|
minTemperature: res.data.minTemperature,
|
|
|
|
|
|
|
|
maxTemperature: res.data.maxTemperature,
|
|
|
|
|
|
|
|
ventilationRate: res.data.ventilationRate,
|
|
|
|
|
|
|
|
temperatureUnit: res.data.temperatureUnit,
|
|
|
|
|
|
|
|
dangerClass: res.data.dangerClass,
|
|
|
|
|
|
|
|
dangerLable: res.data.dangerLable,
|
|
|
|
|
|
|
|
dangerLineTel: res.data.dangerLineTel,
|
|
|
|
|
|
|
|
dangerLinkMan: res.data.dangerLinkMan,
|
|
|
|
|
|
|
|
dangerPage: res.data.dangerPage,
|
|
|
|
|
|
|
|
dangerUnNo: res.data.dangerUnNo,
|
|
|
|
|
|
|
|
limitedContainerHeight: res.data.limitedContainerHeight,
|
|
|
|
|
|
|
|
limitedContainerLength: res.data.limitedContainerLength,
|
|
|
|
|
|
|
|
limitedContainerWidth: res.data.limitedContainerWidth,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
serviceItemList.value = [];
|
|
|
|
|
|
|
|
form.value.serviceItemList.forEach((item) => {
|
|
|
|
|
|
|
|
serviceItemList.value.push(item.code);
|
|
|
|
|
|
|
|
});
|
|
|
|
fileList.value = [];
|
|
|
|
fileList.value = [];
|
|
|
|
res.data.bookingFileList.forEach((item) => {
|
|
|
|
res.data.bookingFileList.forEach((item) => {
|
|
|
|
fileList.value.push({ ...item, name: item.fileName });
|
|
|
|
fileList.value.push({ ...item, name: item.fileName });
|
|
|
@ -587,21 +630,18 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const handleClick = (data) => {
|
|
|
|
const handleClick = (data) => {
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
form.value.ctnList.splice(data.$index, 1);
|
|
|
|
form.value.ctnList.splice(data.$index, 1);
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const TableAdd = () => {
|
|
|
|
const TableAdd = () => {
|
|
|
|
console.log("TableAdd");
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
form.value.ctnList.push({});
|
|
|
|
form.value.ctnList.push({});
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const ClickSave = () => {
|
|
|
|
const ClickSave = () => {
|
|
|
|
console.log(form.value);
|
|
|
|
|
|
|
|
let ApiData = form.value;
|
|
|
|
let ApiData = form.value;
|
|
|
|
// fileList
|
|
|
|
// fileList
|
|
|
|
ApiData = {
|
|
|
|
ApiData = {
|
|
|
@ -611,12 +651,29 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
bookingCustomSave(ApiData).then((res) => {
|
|
|
|
bookingCustomSave(ApiData).then((res) => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
if (res.code == 200) {
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
ElMessage({
|
|
|
|
ElMessage({
|
|
|
|
message: "保存成功",
|
|
|
|
message: "保存成功",
|
|
|
|
type: "success",
|
|
|
|
type: "success",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
router.push("/Booking");
|
|
|
|
form.value = res.data;
|
|
|
|
|
|
|
|
form.value.cargoData = {
|
|
|
|
|
|
|
|
dangerClass: res.data.dangerClass,
|
|
|
|
|
|
|
|
dangerLable: res.data.dangerLable,
|
|
|
|
|
|
|
|
dangerLineTel: res.data.dangerLineTel,
|
|
|
|
|
|
|
|
dangerLinkMan: res.data.dangerLinkMan,
|
|
|
|
|
|
|
|
dangerPage: res.data.dangerPage,
|
|
|
|
|
|
|
|
dangerUnNo: res.data.dangerUnNo,
|
|
|
|
|
|
|
|
limitedContainerHeight: res.data.limitedContainerHeight,
|
|
|
|
|
|
|
|
limitedContainerLength: res.data.limitedContainerLength,
|
|
|
|
|
|
|
|
limitedContainerWidth: res.data.limitedContainerWidth,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
router.push({
|
|
|
|
|
|
|
|
path: "/AddBooking",
|
|
|
|
|
|
|
|
query: {
|
|
|
|
|
|
|
|
type: "Edit",
|
|
|
|
|
|
|
|
id: res.data.id,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -692,7 +749,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const ChangeCargoId = () => {
|
|
|
|
const ChangeCargoId = (e) => {
|
|
|
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
console.log("ChangeCargoId");
|
|
|
|
form.value.cargoData = {};
|
|
|
|
form.value.cargoData = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const ChangecarrierCode = (e) => {
|
|
|
|
const ChangecarrierCode = (e) => {
|
|
|
@ -727,6 +786,7 @@ export default {
|
|
|
|
store,
|
|
|
|
store,
|
|
|
|
form,
|
|
|
|
form,
|
|
|
|
serviceItemList,
|
|
|
|
serviceItemList,
|
|
|
|
|
|
|
|
router,
|
|
|
|
handleClick,
|
|
|
|
handleClick,
|
|
|
|
TableAdd,
|
|
|
|
TableAdd,
|
|
|
|
ClickSave,
|
|
|
|
ClickSave,
|
|
|
|