|
|
@@ -29,25 +29,39 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8" v-if="route.query.shipOwnerId">
|
|
|
+ <el-form-item label="认证状态" prop="userPhone">
|
|
|
+ <el-tag v-if="hhdAuthStatus === 1" type="success" size="large">
|
|
|
+ 已认证
|
|
|
+ </el-tag>
|
|
|
+ <el-button
|
|
|
+ v-if="hhdAuthStatus === 0"
|
|
|
+ type="primary"
|
|
|
+ @click="authShipOwner()"
|
|
|
+ >
|
|
|
+ 船员认证
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="船员手机号" prop="userPhone">
|
|
|
+ <el-form-item label="船员身份证号">
|
|
|
<el-input
|
|
|
- v-model="shipOwnerForm.userPhone"
|
|
|
+ v-model="shipOwnerForm.idcardNo"
|
|
|
placeholder="请输入"
|
|
|
:disabled="!!shipOwnerForm.shipOwnerId && !isEditingBasicInfo"
|
|
|
- @blur="handlePhoneBlur"
|
|
|
class="w200"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="船员身份证号">
|
|
|
+ <el-form-item label="船员手机号" prop="userPhone">
|
|
|
<el-input
|
|
|
- v-model="shipOwnerForm.idcardNo"
|
|
|
+ v-model="shipOwnerForm.userPhone"
|
|
|
placeholder="请输入"
|
|
|
:disabled="!!shipOwnerForm.shipOwnerId && !isEditingBasicInfo"
|
|
|
+ @blur="handlePhoneBlur"
|
|
|
class="w200"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -846,7 +860,7 @@ function handlePostChange(value) {
|
|
|
postOptions.value.find((item) => item.key === value)?.value || "";
|
|
|
shipOwnerForm.value.certificate.postRole = postText;
|
|
|
}
|
|
|
-
|
|
|
+const hhdAuthStatus = ref(0);
|
|
|
async function getShipOwnerDetail(shipOwnerId) {
|
|
|
let { data } = await api.getShipOwnerDetail({
|
|
|
shipOwnerId,
|
|
|
@@ -854,6 +868,7 @@ async function getShipOwnerDetail(shipOwnerId) {
|
|
|
|
|
|
if (data.status === 0 && data.result) {
|
|
|
// 处理基本信息
|
|
|
+ hhdAuthStatus.value = data.result.hhdAuthStatus || 0;
|
|
|
shipOwnerForm.value = {
|
|
|
shipOwnerId: data.result.id,
|
|
|
userName: data.result.userName,
|
|
|
@@ -1496,6 +1511,25 @@ async function shipDetail(shipCode) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+async function authShipOwner() {
|
|
|
+ if (!(await confirm("确定认证船员吗?"))) return;
|
|
|
+ let { data } = await api.authShipOwner({
|
|
|
+ shipOwnerId: router.query.shipOwnerId,
|
|
|
+ });
|
|
|
+ if (data.status == 0) {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: data.msg,
|
|
|
+ });
|
|
|
+ getShipOwnerDetail(route.query.shipOwnerId);
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ message: data.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 初始化数据
|
|
|
onMounted(async () => {
|
|
|
// 获取证书类型数据
|