|
@@ -42,116 +42,103 @@
|
|
|
<div class="line">
|
|
<div class="line">
|
|
|
<div class="info-line aic">
|
|
<div class="info-line aic">
|
|
|
<div class="info-line-title">上传身份证 :</div>
|
|
<div class="info-line-title">上传身份证 :</div>
|
|
|
- <Upload
|
|
|
|
|
|
|
+ <Uploader
|
|
|
uploaderId="idfront"
|
|
uploaderId="idfront"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
|
:params="{}"
|
|
:params="{}"
|
|
|
:actionUrl="store.state.idCardUrl"
|
|
:actionUrl="store.state.idCardUrl"
|
|
|
- :hidden="false"
|
|
|
|
|
- :disabled="false"
|
|
|
|
|
|
|
+ :disabled="unchangeableShipOwner"
|
|
|
:fileList="idFrontList"
|
|
:fileList="idFrontList"
|
|
|
@onSendFileList="idFrontUploadSuccess"
|
|
@onSendFileList="idFrontUploadSuccess"
|
|
|
uploadText="身份证人像面"
|
|
uploadText="身份证人像面"
|
|
|
class="mr20"
|
|
class="mr20"
|
|
|
- ></Upload>
|
|
|
|
|
- <Upload
|
|
|
|
|
|
|
+ ></Uploader>
|
|
|
|
|
+ <Uploader
|
|
|
uploaderId="idback"
|
|
uploaderId="idback"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
|
:params="{}"
|
|
:params="{}"
|
|
|
:actionUrl="store.state.idCardUrl"
|
|
:actionUrl="store.state.idCardUrl"
|
|
|
- :hidden="false"
|
|
|
|
|
- :disabled="false"
|
|
|
|
|
|
|
+ :disabled="unchangeableShipOwner"
|
|
|
:fileList="idBackList"
|
|
:fileList="idBackList"
|
|
|
@onSendFileList="idBackUploadSuccess"
|
|
@onSendFileList="idBackUploadSuccess"
|
|
|
uploadText="身份证国徽面"
|
|
uploadText="身份证国徽面"
|
|
|
- ></Upload>
|
|
|
|
|
|
|
+ ></Uploader>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="df aic jcfe">
|
|
|
|
|
|
|
+ <div class="df aic jcfe" v-if="addShipOwnerBtnVisable">
|
|
|
<el-button type="primary" @click="addShipOwner()">确定</el-button>
|
|
<el-button type="primary" @click="addShipOwner()">确定</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="container-title">船舶信息</div>
|
|
|
|
|
- <div class="line-container-p24">
|
|
|
|
|
- <div class="line">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">船名</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- class="info-line-text"
|
|
|
|
|
- v-model="shipDetail.shipname"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">MMSI</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- class="info-line-text"
|
|
|
|
|
- v-model="shipDetail.mmsi"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="line">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">船长</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- class="info-line-text"
|
|
|
|
|
- v-model="shipDetail.length"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">船宽</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- class="info-line-text"
|
|
|
|
|
- v-model="shipDetail.breadth"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="line">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">吨位</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- class="info-line-text"
|
|
|
|
|
- v-model="shipDetail.tonnage"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
|
|
+ <div v-if="shipInfoVisable">
|
|
|
|
|
+ <div class="container-title">船舶信息</div>
|
|
|
|
|
+ <div class="line-container-p24">
|
|
|
|
|
+ <div class="line">
|
|
|
|
|
+ <div class="info-line">
|
|
|
|
|
+ <div class="info-line-title">船名</div>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ class="info-line-text"
|
|
|
|
|
+ v-model="shipDetail.shipname"
|
|
|
|
|
+ :disabled="unchangeableShip"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <view class="unit"></view>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="info-line">
|
|
|
|
|
+ <div class="info-line-title">MMSI</div>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ class="info-line-text"
|
|
|
|
|
+ v-model="shipDetail.mmsi"
|
|
|
|
|
+ :disabled="unchangeableShip"
|
|
|
|
|
+ @blur="searchShip"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">载货吨位</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- class="info-line-text"
|
|
|
|
|
- v-model="shipDetail.loadTons"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
|
|
+ <div class="line">
|
|
|
|
|
+ <div class="info-line">
|
|
|
|
|
+ <div class="info-line-title">船长</div>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ class="info-line-text"
|
|
|
|
|
+ v-model="shipDetail.length"
|
|
|
|
|
+ :disabled="unchangeableShip"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <view class="unit">米</view>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="info-line">
|
|
|
|
|
+ <div class="info-line-title">船宽</div>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ class="info-line-text"
|
|
|
|
|
+ v-model="shipDetail.breadth"
|
|
|
|
|
+ :disabled="unchangeableShip"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <view class="unit">米</view>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- <div class="line">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">吃水</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- class="info-line-text"
|
|
|
|
|
- v-model="shipDetail.draught"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
|
|
+ <div class="line">
|
|
|
|
|
+ <div class="info-line">
|
|
|
|
|
+ <div class="info-line-title">吨位</div>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ class="info-line-text"
|
|
|
|
|
+ v-model="shipDetail.loadTons"
|
|
|
|
|
+ :disabled="unchangeableShip"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <view class="unit">吨</view>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="info-line">
|
|
|
|
|
+ <div class="info-line-title">船龄</div>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ class="info-line-text"
|
|
|
|
|
+ v-model="shipDetail.age"
|
|
|
|
|
+ :disabled="unchangeableShip"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <view class="unit">年</view>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="df aic jcfe">
|
|
|
|
|
- <el-button v-if="unchangeableShip" type="primary" @click="change(0)">
|
|
|
|
|
- 修改
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button v-if="!unchangeableShip" @click="cancelChange(0)">
|
|
|
|
|
- 取消
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-if="!unchangeableShip"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- @click="submitChange(0)"
|
|
|
|
|
- >
|
|
|
|
|
- 提交
|
|
|
|
|
- </el-button>
|
|
|
|
|
|
|
+ <div class="container-title">船舶证书</div>
|
|
|
|
|
+ <div class="line-container-p24">
|
|
|
|
|
+ <ShipCerts ref="shipCerts"></ShipCerts>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="container-title">船舶保险</div>
|
|
|
|
|
+ <div class="line-container-p24 mb20"></div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -168,88 +155,6 @@ import _ from "lodash";
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
let shipOwnerDetail = ref({});
|
|
let shipOwnerDetail = ref({});
|
|
|
let shipDetail = ref({});
|
|
let shipDetail = ref({});
|
|
|
-let unchangeableShipOwner = ref(false);
|
|
|
|
|
-let unchangeableShip = ref(false);
|
|
|
|
|
-async function getShipOwnerDetail() {
|
|
|
|
|
- let res = await api.getShipOwnerDetail({
|
|
|
|
|
- shipOwnerId: route.query.shipOwnerId,
|
|
|
|
|
- });
|
|
|
|
|
- if (res.data.status == 0) {
|
|
|
|
|
- let r = res.data.result;
|
|
|
|
|
-
|
|
|
|
|
- let {
|
|
|
|
|
- //船东信息
|
|
|
|
|
- idcardBackDownloadUrl,
|
|
|
|
|
- idcardBackFileKey,
|
|
|
|
|
- idcardBackViewUrl,
|
|
|
|
|
- idcardFrontDownloadUrl,
|
|
|
|
|
- idcardFrontFileKey,
|
|
|
|
|
- idcardFrontViewUrl,
|
|
|
|
|
- idcardNo,
|
|
|
|
|
- phone,
|
|
|
|
|
- preferenceCargo,
|
|
|
|
|
- userId: shipOwnerId,
|
|
|
|
|
- userName,
|
|
|
|
|
-
|
|
|
|
|
- // 船舶信息
|
|
|
|
|
- breadth,
|
|
|
|
|
- draught,
|
|
|
|
|
- length,
|
|
|
|
|
- loadTons,
|
|
|
|
|
- mmsi,
|
|
|
|
|
- shipId,
|
|
|
|
|
- shipname,
|
|
|
|
|
- tonnage,
|
|
|
|
|
- shipCerts,
|
|
|
|
|
- } = r;
|
|
|
|
|
-
|
|
|
|
|
- shipOwnerDetail.value = {
|
|
|
|
|
- idcardNo,
|
|
|
|
|
- phone,
|
|
|
|
|
- preferenceCargo,
|
|
|
|
|
- shipOwnerId,
|
|
|
|
|
- userName,
|
|
|
|
|
- };
|
|
|
|
|
- idFrontFile.value = idcardFrontFileKey
|
|
|
|
|
- ? [
|
|
|
|
|
- {
|
|
|
|
|
- url: idcardFrontViewUrl,
|
|
|
|
|
- idcardFrontDownloadUrl,
|
|
|
|
|
- idcardFrontFileKey,
|
|
|
|
|
- idcardFrontViewUrl,
|
|
|
|
|
- },
|
|
|
|
|
- ]
|
|
|
|
|
- : [];
|
|
|
|
|
- idBackFile.value = idcardBackFileKey
|
|
|
|
|
- ? [
|
|
|
|
|
- {
|
|
|
|
|
- url: idcardBackViewUrl,
|
|
|
|
|
- idcardBackDownloadUrl,
|
|
|
|
|
- idcardBackFileKey,
|
|
|
|
|
- idcardBackViewUrl,
|
|
|
|
|
- },
|
|
|
|
|
- ]
|
|
|
|
|
- : [];
|
|
|
|
|
-
|
|
|
|
|
- shipDetail.value = {
|
|
|
|
|
- breadth,
|
|
|
|
|
- draught,
|
|
|
|
|
- length,
|
|
|
|
|
- loadTons,
|
|
|
|
|
- mmsi,
|
|
|
|
|
- shipId,
|
|
|
|
|
- shipname,
|
|
|
|
|
- tonnage,
|
|
|
|
|
- };
|
|
|
|
|
- certs.value.initCerts(shipCerts);
|
|
|
|
|
- } else {
|
|
|
|
|
- ElNotification({
|
|
|
|
|
- type: "error",
|
|
|
|
|
- title: res.data.msg,
|
|
|
|
|
- });
|
|
|
|
|
- console.log(res);
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
let idFrontList = ref([]);
|
|
let idFrontList = ref([]);
|
|
|
function idFrontUploadSuccess(list) {
|
|
function idFrontUploadSuccess(list) {
|
|
@@ -289,7 +194,7 @@ function checkShipOwner() {
|
|
|
}
|
|
}
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
-function addShipOwner() {
|
|
|
|
|
|
|
+async function addShipOwner() {
|
|
|
if (!checkShipOwner()) return;
|
|
if (!checkShipOwner()) return;
|
|
|
let postData = shipOwnerDetail.value;
|
|
let postData = shipOwnerDetail.value;
|
|
|
if (idFrontList.value.length) {
|
|
if (idFrontList.value.length) {
|
|
@@ -319,11 +224,45 @@ function addShipOwner() {
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- console.log(postData);
|
|
|
|
|
|
|
+ let { data } = await api.addShipOwner(postData);
|
|
|
|
|
+ if (data.status == 0) {
|
|
|
|
|
+ ElMessageBox.confirm("添加船东成功,是否添加新船舶?", "添加成功", {
|
|
|
|
|
+ confirmButtonText: "是",
|
|
|
|
|
+ cancelButtonText: "否",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ shipInfoVisable.value = true;
|
|
|
|
|
+ unchangeableShipOwner.value = true;
|
|
|
|
|
+ addShipOwnerBtnVisable.value = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ router.push("/shipOwnerManage/shipOwnerList");
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+let shipOwnerId = ref("");
|
|
|
|
|
+let addShipOwnerBtnVisable = ref(true);
|
|
|
|
|
+let unchangeableShipOwner = ref(false);
|
|
|
|
|
+let unchangeableShip = ref(false);
|
|
|
|
|
+let shipInfoVisable = ref(true);
|
|
|
|
|
+
|
|
|
|
|
+let shipCerts = ref(null);
|
|
|
|
|
+async function searchShip(e) {
|
|
|
|
|
+ if (e.target.value.length != 9) return;
|
|
|
|
|
+ let { data } = await api.searchShip({
|
|
|
|
|
+ mmsi: e.target.value,
|
|
|
|
|
+ });
|
|
|
|
|
+ if (data.status == 0) {
|
|
|
|
|
+ shipDetail.value = data.result;
|
|
|
|
|
+ shipCerts.value.initCerts(shipDetail.value.shipCerts);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
if (route.query.shipOwnerId) {
|
|
if (route.query.shipOwnerId) {
|
|
|
|
|
+ shipOwnerId.value = route.query.shipOwnerId;
|
|
|
getShipOwnerDetail();
|
|
getShipOwnerDetail();
|
|
|
unchangeableShipOwner.value = true;
|
|
unchangeableShipOwner.value = true;
|
|
|
unchangeableShip.value = true;
|
|
unchangeableShip.value = true;
|
|
@@ -352,4 +291,10 @@ onMounted(() => {
|
|
|
border: none;
|
|
border: none;
|
|
|
width: auto;
|
|
width: auto;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.unit {
|
|
|
|
|
+ width: 40px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ color: #555;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|