|
|
@@ -271,6 +271,15 @@
|
|
|
:disabled="disabledStatus"
|
|
|
></el-input>
|
|
|
</div>
|
|
|
+ <div class="info-line">
|
|
|
+ <div class="info-line-title">是否购买保险</div>
|
|
|
+ <el-checkbox
|
|
|
+ v-model="voyage.hasInsurance"
|
|
|
+ :checked="voyage.hasInsurance == 1"
|
|
|
+ :disabled="disabledStatus"
|
|
|
+ label="购买保险"
|
|
|
+ ></el-checkbox>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="line">
|
|
|
<div class="info-line">
|
|
|
@@ -285,13 +294,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="df aic jcfe mt20" v-if="voyage.voyageStatus == 1">
|
|
|
+ <el-button type="primary" class="mr20" @click="cancelVoyage">
|
|
|
+ 取消航次
|
|
|
+ </el-button>
|
|
|
<el-button v-if="disabledStatus" type="primary" @click="changeVoyageInfo">
|
|
|
修改航次
|
|
|
</el-button>
|
|
|
<div v-else>
|
|
|
<div>
|
|
|
- <el-button @click="cancelVoyageChange">取消修改</el-button>
|
|
|
- <el-button type="primary" @click="submitVoyageChange">
|
|
|
+ <el-button class="ml20" @click="cancelVoyageChange">
|
|
|
+ 取消修改
|
|
|
+ </el-button>
|
|
|
+ <el-button class="ml20" type="primary" @click="submitVoyageChange">
|
|
|
提交修改
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -565,12 +579,7 @@
|
|
|
v-if="index + 1 != medias.length"
|
|
|
></div>
|
|
|
</div>
|
|
|
- <el-dialog
|
|
|
- v-model="mediaModal"
|
|
|
- :title="modalTitle"
|
|
|
- width="20%"
|
|
|
- :before-close="videoClose"
|
|
|
- >
|
|
|
+ <el-dialog v-model="mediaModal" :title="modalTitle" width="20%">
|
|
|
<el-image
|
|
|
v-if="modalType == 1"
|
|
|
style="width: 100%; height: 100%"
|
|
|
@@ -603,10 +612,10 @@ import downloadBlobFile from "../../utils/downloadBlobFile";
|
|
|
export default {
|
|
|
setup() {
|
|
|
const route = useRoute();
|
|
|
- let map = ref();
|
|
|
+ let map = ref({});
|
|
|
let voyage = ref({});
|
|
|
let medias = ref([]);
|
|
|
- let coordinates = ref();
|
|
|
+ let coordinates = ref([]);
|
|
|
let previewSrcList = ref([]);
|
|
|
|
|
|
async function getVoyageDetail(type) {
|
|
|
@@ -651,7 +660,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- let total = ref();
|
|
|
+ let total = ref(0);
|
|
|
function pageChange(e) {
|
|
|
dischargeCurrentPage.value = e;
|
|
|
getDischargeList();
|
|
|
@@ -690,7 +699,7 @@ export default {
|
|
|
}
|
|
|
async function exportExcel() {}
|
|
|
let dischargeCurrentPage = ref(1);
|
|
|
- let dischagreList = ref();
|
|
|
+ let dischagreList = ref([]);
|
|
|
let formInline = ref({});
|
|
|
async function getDischargeList(type) {
|
|
|
let res = await api.getDischargeList({
|
|
|
@@ -791,6 +800,7 @@ export default {
|
|
|
async function submitVoyageChange() {
|
|
|
let res = await api.updateVoyage({
|
|
|
...voyage.value,
|
|
|
+ hasInsurance: Number(voyage.value.hasInsurance),
|
|
|
});
|
|
|
if (res.data.status == 0) {
|
|
|
ElNotification({
|
|
|
@@ -853,7 +863,7 @@ export default {
|
|
|
let currentUrl = ref("");
|
|
|
let mediaModal = ref(false);
|
|
|
let modalType = ref(1);
|
|
|
- let modalTitle = ref();
|
|
|
+ let modalTitle = ref("");
|
|
|
let modalPreview = ref([]);
|
|
|
function openMediaModal(url, type, title) {
|
|
|
modalPreview.value = [url];
|
|
|
@@ -896,8 +906,8 @@ export default {
|
|
|
console.log(res);
|
|
|
}
|
|
|
}
|
|
|
- let dialogImageUrl = ref();
|
|
|
- let dialogVisible = ref();
|
|
|
+ let dialogImageUrl = ref("");
|
|
|
+ let dialogVisible = ref(false);
|
|
|
function handlePictureCardPreview(file) {
|
|
|
dialogVisible.value = true;
|
|
|
dialogImageUrl.value = file.url;
|
|
|
@@ -1014,6 +1024,37 @@ export default {
|
|
|
isLoadingExcel.value = false;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ async function cancelVoyage() {
|
|
|
+ console.log("取消航次");
|
|
|
+ ElMessageBox.confirm("确认取消航次?", "确认操作", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消操作",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async (e) => {
|
|
|
+ console.log(e);
|
|
|
+ let res = await api.cancelVoyage({
|
|
|
+ id: route.query.id,
|
|
|
+ });
|
|
|
+ if (res.data.status == 0) {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: "航次取消成功!",
|
|
|
+ });
|
|
|
+ router.push("/voyageList");
|
|
|
+ } else {
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ console.log(e);
|
|
|
+ ElMessage({
|
|
|
+ type: "info",
|
|
|
+ message: "取消操作",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
|
getVoyageDetail(1);
|
|
|
getDischargeList(1);
|
|
|
@@ -1066,6 +1107,7 @@ export default {
|
|
|
poundBillUploadSuccess,
|
|
|
poundParams,
|
|
|
calExpectedArrivalTime,
|
|
|
+ cancelVoyage,
|
|
|
};
|
|
|
},
|
|
|
};
|
|
|
@@ -1225,4 +1267,7 @@ export default {
|
|
|
height: 25%;
|
|
|
color: rgb(139, 147, 156);
|
|
|
}
|
|
|
+.el-checkbox {
|
|
|
+ margin-top: 0;
|
|
|
+}
|
|
|
</style>
|