|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="line-container-p24">
|
|
|
+ <!-- <div class="line-container-p24">
|
|
|
<i class="el-icon-arrow-left"></i>
|
|
|
<div
|
|
|
class="dib go-back ml8 pointer"
|
|
|
@@ -7,7 +7,7 @@
|
|
|
>
|
|
|
返回航次列表
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<div class="container-title df aic jcsb">
|
|
|
<div class="df aic">
|
|
|
@@ -462,6 +462,7 @@
|
|
|
background
|
|
|
layout="prev, pager, next"
|
|
|
:total="weatherTotal"
|
|
|
+ :current-page="weatherCurrentPage"
|
|
|
@current-change="weatherPageChange"
|
|
|
></el-pagination>
|
|
|
</div>
|
|
|
@@ -728,6 +729,7 @@
|
|
|
background
|
|
|
layout="prev, pager, next"
|
|
|
:total="truckTotal"
|
|
|
+ :current-page="truckCurrentPage"
|
|
|
@current-change="truckPageChange"
|
|
|
></el-pagination>
|
|
|
</div>
|
|
|
@@ -1203,10 +1205,10 @@ import url from "../../apis/config";
|
|
|
import { subTimeStr } from "utils/utils";
|
|
|
|
|
|
const route = useRoute();
|
|
|
-let map = ref();
|
|
|
+let map = ref({});
|
|
|
let voyage = ref({});
|
|
|
let medias = ref([]);
|
|
|
-let coordinates = ref();
|
|
|
+let coordinates = ref([]);
|
|
|
let previewSrcList = ref([]);
|
|
|
let policyList = ref([]);
|
|
|
let previewPoundList = ref([]);
|
|
|
@@ -1226,31 +1228,29 @@ async function getVoyageDetail(isInit) {
|
|
|
voyageBill.value = [];
|
|
|
previewSrcList.value = [];
|
|
|
let res = await api.getVoyageDetail({
|
|
|
- type: localStorage.userType,
|
|
|
- voyageId: route.query.id,
|
|
|
- loginAccountId: localStorage.loginAccountId,
|
|
|
+ hhdVoyageCode: route.query.voyageCode,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
ElNotification({
|
|
|
type: "success",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
- blockchainInfo.value = res.data.result.blockChain;
|
|
|
- coordinates.value = res.data.result.coordinates;
|
|
|
- voyage.value = res.data.result.voyage;
|
|
|
+ blockchainInfo.value = res.data.data.blockChain;
|
|
|
+ coordinates.value = res.data.data.coordinates;
|
|
|
+ voyage.value = res.data.data.voyage;
|
|
|
voyage.value.startTime = voyage.value.startTime.substring(0, 16);
|
|
|
currentPortId.value = voyage.value.voyageDetails[0].portId + "";
|
|
|
currentDiscPortId.value = voyage.value.voyageDetails[0].portId + "";
|
|
|
- medias.value = res.data.result.medias;
|
|
|
- shipAudits.value = res.data.result.shipAudits;
|
|
|
+ medias.value = res.data.data.medias;
|
|
|
+ shipAudits.value = res.data.data.shipAudits;
|
|
|
|
|
|
- for (let i of res.data.result.policys || []) {
|
|
|
+ for (let i of res.data.data.policys || []) {
|
|
|
policyList.value.push({
|
|
|
...i,
|
|
|
url: i.viewUrl,
|
|
|
});
|
|
|
}
|
|
|
- for (let i of res.data.result.waybills) {
|
|
|
+ for (let i of res.data.data.waybills) {
|
|
|
voyageBill.value.push({
|
|
|
...i,
|
|
|
url: i.viewUrl,
|
|
|
@@ -1273,7 +1273,7 @@ async function getVoyageDetail(isInit) {
|
|
|
console.log(res);
|
|
|
ElNotification({
|
|
|
type: "error",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -1287,9 +1287,9 @@ async function addDischarge() {
|
|
|
return;
|
|
|
let res = await api.addDischarge({
|
|
|
...formInline.value,
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
getDischargeList(1);
|
|
|
formInline.value = {};
|
|
|
} else {
|
|
|
@@ -1300,37 +1300,39 @@ async function deleteDischarge(id, index) {
|
|
|
let res = await api.deleteDischarge({
|
|
|
id,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
dischargeList.value.splice(index, 1);
|
|
|
ElNotification({
|
|
|
type: "success",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
} else {
|
|
|
console.log(res);
|
|
|
ElNotification({
|
|
|
type: "error",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
async function exportExcel() {}
|
|
|
let dischargeCurrentPage = ref(1);
|
|
|
-let dischargeList = ref();
|
|
|
+let dischargeList = ref([]);
|
|
|
let formInline = ref({});
|
|
|
async function getDischargeList(type) {
|
|
|
let res = await api.getDischargeList({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
portId: currentDiscPortId.value,
|
|
|
currentPage: dischargeCurrentPage.value,
|
|
|
size: 10,
|
|
|
loginAccountId: localStorage.loginAccountId,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
- dischargeList.value = res.data.result;
|
|
|
+ console.log(res);
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ dischargeList.value = res.data.data.data;
|
|
|
total.value = res.data.total;
|
|
|
} else {
|
|
|
- console.log(res);
|
|
|
+ dischargeList.value = [];
|
|
|
+ total.value = 0;
|
|
|
}
|
|
|
}
|
|
|
let updateForm = ref({});
|
|
|
@@ -1341,18 +1343,18 @@ async function updateDischarge() {
|
|
|
...updateForm.value,
|
|
|
});
|
|
|
|
|
|
- if (res.data.status == 0) {
|
|
|
- dischargeList.value[currentUpdateIndex.value] = res.data.result;
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ dischargeList.value[currentUpdateIndex.value] = res.data.data.data;
|
|
|
cancelUpdateDischarge();
|
|
|
ElNotification({
|
|
|
type: "success",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
} else {
|
|
|
console.log(res);
|
|
|
ElNotification({
|
|
|
type: "error",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -1475,16 +1477,16 @@ async function submitVoyageChange() {
|
|
|
actualDischargeTons,
|
|
|
remark,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
ElNotification({
|
|
|
type: "success",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
disabledStatus.value = true;
|
|
|
} else {
|
|
|
ElNotification({
|
|
|
type: "error",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
console.log(res);
|
|
|
}
|
|
|
@@ -1516,29 +1518,28 @@ let options = ref([
|
|
|
async function finishVoyage() {
|
|
|
if (!voyage.value.dischargeEndTime) return;
|
|
|
let res = await api.finishVoyage({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
});
|
|
|
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
voyage.value.voyageStatus = 2;
|
|
|
ElNotification({
|
|
|
type: "success",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
} else {
|
|
|
ElNotification({
|
|
|
type: "error",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
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) {
|
|
|
- console.log(url, type, title);
|
|
|
modalPreview.value = [url];
|
|
|
modalTitle.value = title;
|
|
|
modalType.value = type;
|
|
|
@@ -1547,22 +1548,21 @@ function openMediaModal(url, type, title) {
|
|
|
}
|
|
|
|
|
|
async function auditMedia(mediaId, a, index, mediaType) {
|
|
|
- console.log(mediaId, a, index, mediaType);
|
|
|
let res = await api.auditMedia({
|
|
|
mediaId,
|
|
|
audit: a,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
medias.value[index].audit = a;
|
|
|
ElNotification({
|
|
|
type: "success",
|
|
|
- title: res.data.msg,
|
|
|
+ title: res.data.errmsg,
|
|
|
});
|
|
|
} else {
|
|
|
console.log(res);
|
|
|
}
|
|
|
}
|
|
|
-let dialogImageUrl = ref();
|
|
|
+let dialogImageUrl = ref("");
|
|
|
let dialogVisible = ref(false);
|
|
|
function handlePictureCardPreview(file) {
|
|
|
dialogVisible.value = true;
|
|
|
@@ -1582,7 +1582,7 @@ async function handleRemoveBill(file, list) {
|
|
|
let res = await api.deleteWaybill({
|
|
|
id,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
ElMessage({
|
|
|
message: "删除成功!",
|
|
|
type: "success",
|
|
|
@@ -1610,16 +1610,16 @@ function billUploadSuccess(response, file, list) {
|
|
|
}
|
|
|
|
|
|
let billParams = ref({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
});
|
|
|
|
|
|
async function calExpectedArrivalTime() {
|
|
|
let res = await api.calExpectedArrivalTime({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
setSailTime: voyage.value.setSailTime,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
- voyage.value.expectedArrivalTime = res.data.result;
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ voyage.value.expectedArrivalTime = res.data.data.data;
|
|
|
}
|
|
|
}
|
|
|
let isLoadingExcel = ref(false);
|
|
|
@@ -1627,7 +1627,7 @@ async function downloadExcel() {
|
|
|
isLoadingExcel.value = true;
|
|
|
let res = await downloadBlobFile(
|
|
|
`${url.baseurl}/voyage/exportExcel`,
|
|
|
- { voyageId: route.query.id },
|
|
|
+ { voyageId: voyage.value.id },
|
|
|
`${voyage.value.voyageName}-船舶跟踪表`,
|
|
|
"post",
|
|
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
|
|
|
@@ -1641,7 +1641,7 @@ async function exportDischargeExcel() {
|
|
|
isDischargeLoadingExcel.value = true;
|
|
|
let res = await downloadBlobFile(
|
|
|
`${url.baseurl}/voyage/exportDischargeExcel`,
|
|
|
- { voyageId: route.query.id },
|
|
|
+ { voyageId: voyage.value.id },
|
|
|
`${voyage.value.voyageName}-卸货记录表`,
|
|
|
"post",
|
|
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
|
|
|
@@ -1659,14 +1659,19 @@ let truckCurrentPage = ref(1);
|
|
|
let truckTotal = ref(0);
|
|
|
async function getTruckLoadRecord() {
|
|
|
let res = await api.getTruckLoadRecord({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
portId: currentDiscPortId.value,
|
|
|
currentPage: truckCurrentPage.value,
|
|
|
size: 10,
|
|
|
loginAccountId: localStorage.loginAccountId,
|
|
|
});
|
|
|
- truckTableData.value = res.data.result;
|
|
|
- truckTotal.value = res.data.total;
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ truckTableData.value = res.data.data.data;
|
|
|
+ truckTotal.value = res.data.total;
|
|
|
+ } else {
|
|
|
+ truckTableData.value = [];
|
|
|
+ truckTotal.value = 0;
|
|
|
+ }
|
|
|
}
|
|
|
function truckPageChange(e) {
|
|
|
truckCurrentPage.value = e;
|
|
|
@@ -1696,7 +1701,7 @@ async function downloadBillZip() {
|
|
|
billZipLoading.value = true;
|
|
|
let res = await downloadBlobFile(
|
|
|
`${url.baseurl}/voyage/exportBillZip`,
|
|
|
- { voyageId: route.query.id },
|
|
|
+ { voyageId: voyage.value.id },
|
|
|
`${voyage.value.voyageName}-单据文件`,
|
|
|
"post",
|
|
|
"application/zip"
|
|
|
@@ -1710,13 +1715,18 @@ let weatherCurrentPage = ref(1);
|
|
|
let weatherTotal = ref(0);
|
|
|
async function getPortWeatherList() {
|
|
|
let res = await api.getPortWeatherList({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
portId: currentDiscPortId.value,
|
|
|
size: 10,
|
|
|
currentPage: weatherCurrentPage.value,
|
|
|
});
|
|
|
- weatherTableData.value = res.data.result;
|
|
|
- weatherTotal.value = res.data.total;
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ weatherTableData.value = res.data.data.data;
|
|
|
+ weatherTotal.value = res.data.total;
|
|
|
+ } else {
|
|
|
+ weatherTableData.value = [];
|
|
|
+ weatherTotal.value = 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function weatherPageChange(e) {
|
|
|
@@ -1730,14 +1740,19 @@ let labCurrentPage = ref(1);
|
|
|
|
|
|
async function getLabList() {
|
|
|
let res = await api.getLabList({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
portId: currentDiscPortId.value,
|
|
|
currentPage: labCurrentPage.value,
|
|
|
size: 10,
|
|
|
loginAccountId: localStorage.loginAccountId,
|
|
|
});
|
|
|
- labTableData.value = res.data.result;
|
|
|
- labTotal.value = res.data.total;
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ labTableData.value = res.data.data.data;
|
|
|
+ labTotal.value = res.data.total;
|
|
|
+ } else {
|
|
|
+ labTableData.value = [];
|
|
|
+ labTotal.value = 0;
|
|
|
+ }
|
|
|
}
|
|
|
function labPageChange(e) {
|
|
|
labCurrentPage.value = e;
|
|
|
@@ -1790,18 +1805,18 @@ let accidentForm = ref({
|
|
|
files: [],
|
|
|
});
|
|
|
let accidentParams = ref({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
});
|
|
|
let accidentCurrentPage = ref(1);
|
|
|
let accidentTotal = ref(0);
|
|
|
async function getAccidentList() {
|
|
|
let res = await api.getAccidentList({
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
currentPage: accidentCurrentPage.value,
|
|
|
size: 10,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
- accidentList.value = res.data.result;
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ accidentList.value = res.data.data.data;
|
|
|
accidentTotal.value = res.data.total;
|
|
|
} else {
|
|
|
accidentList.value = [];
|
|
|
@@ -1819,7 +1834,7 @@ async function addUpdateAccident() {
|
|
|
}
|
|
|
let postData = {
|
|
|
loginAccountId: localStorage.loginAccountId,
|
|
|
- voyageId: route.query.id,
|
|
|
+ voyageId: voyage.value.id,
|
|
|
accidentTime,
|
|
|
remark,
|
|
|
voyageFileIds: arr.join(","),
|
|
|
@@ -1827,7 +1842,7 @@ async function addUpdateAccident() {
|
|
|
};
|
|
|
// console.log("postData", postData);
|
|
|
let res = await api[id ? "updateAccident" : "addAccident"](postData);
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
resetAccidentForm();
|
|
|
isAccidentVisable.value = false;
|
|
|
}
|
|
|
@@ -1878,7 +1893,7 @@ function deleteAccident(id) {
|
|
|
let res = await api.deleteAccident({
|
|
|
id,
|
|
|
});
|
|
|
- if (res.data.status == 0) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
ElMessage({
|
|
|
type: "success",
|
|
|
message: "删除成功!",
|