Przeglądaj źródła

E签宝v3 法人

rongxin_dev
Zhao 1 dzień temu
rodzic
commit
a3589b208d
2 zmienionych plików z 97 dodań i 14 usunięć
  1. +18
    -0
      src/api/contracted/fbf.js
  2. +79
    -14
      src/views/sunVillage_info/list_fbfsq.vue

+ 18
- 0
src/api/contracted/fbf.js Wyświetl plik

@@ -88,3 +88,21 @@ export function authorizeOrgSealFinished(id, redirectUrl) {
params: {redirectUrl},
});
}

// 发包方企业印章授权(法人)
export function authorizeLegalSeal(id, redirectUrl) {
return request({
url: '/service/fbf/authorize/legalSeal/' + id,
method: 'post',
params: {redirectUrl},
});
}

// 发包方企业印章授权完成(法人)
export function authorizeLegalSealFinished(id, redirectUrl) {
return request({
url: '/service/fbf/authorizeFinished/legalSeal/' + id,
method: 'post',
params: {redirectUrl},
});
}

+ 79
- 14
src/views/sunVillage_info/list_fbfsq.vue Wyświetl plik

@@ -32,16 +32,24 @@
<van-field v-model="form.shrq" label="审核日期" placeholder="审核日期" input-align="right" :border="false" />
<van-field readonly label="审核人签字" input-align="right" :border="false" />
<img :src="'/api'+form.shrqz" width="100%" alt="" v-if="form.shrqz" />
<div style="margin: 30px auto 0;width: 50%;">
<van-button size="small" round block type="primary" native-type="submit" @click="handleAuthorizationPsn(form.id)" v-if="!form.personAccountId" class="auth-button">
个人授权
</van-button>
<van-button size="small" round block type="primary" native-type="submit" @click="handleAuthorizationOrg(form.id)" v-if="!form.companyAccountId" class="auth-button">
企业授权
</van-button>
<van-button size="small" round block type="primary" native-type="submit" :disabled="!form.companySealId" @click="handleAuthorizationOrgSeal(form.id)" v-if="!form.companySealId || form.companySealAuthorized !== 'Y'" class="auth-button">
<div style="margin: 0.3rem auto 0;width: 80%;">
<div class="auth-container">
<van-button size="small" round block type="primary" native-type="submit" @click="handleAuthorizationPsn(form.id)" v-if="!form.personAccountId" class="auth-button">
个人授权
</van-button>
<van-button size="small" round block type="primary" native-type="submit" @click="handleAuthorizationOrg(form.id)" v-if="!form.companyAccountId" class="auth-button">
企业授权
</van-button>
</div>

<div class="auth-container">
<van-button size="small" round block type="primary" native-type="submit" :disabled="!form.companySealId" @click="handleAuthorizationOrgSeal(form.id)" v-if="!form.companySealId || form.companySealAuthorized !== 'Y'" class="auth-button">
企业印章授权
</van-button>
</van-button>
<van-button size="small" round block type="primary" native-type="submit" :disabled="!form.companyAccountId" @click="handleAuthorizationLegalSeal(form.id)" v-if="form.personSealAuthorized !== 'Y'" class="auth-button">
法人印章授权
</van-button>
</div>
</div>
<img class="bottomImg" src="../../assets/images/sunVillage_info/employer_authorized.png" alt="" v-if="form.personAccountId && form.companyAccountId" />
</div>
@@ -52,13 +60,11 @@
// import { getList} from "@/api/sunVillage_info/sysCbf";
import {
listFbf,
authorizeSignaturePerson,
authorizeSignaturePsn,
authorizeSignatureOrg,
authorizeOrgSeal
authorizeOrgSeal,
authorizeLegalSeal
} from "@/api/contracted/fbf";
import $ from "jquery";
import router from "@/router";
export default {
name: "certificateList",
data() {
@@ -88,6 +94,12 @@
this.callbackAuthorizationOrgSeal(id);
});
break;
case 'legalSeal':
this.getFbfList().then((id) => {
console.log('法人印章授权回调');
this.callbackAuthorizationLegalSeal(id);
});
break;
default:
this.getFbfList();
break;
@@ -227,6 +239,54 @@
back() {
this.$router.push({path:'/sunVillage_info/index'});
},
handleAuthorizationLegalSeal(id) {
authorizeLegalSeal(id, this.getUrl('legalSeal')).then(response => {
if (response.code === 200) {
if(response.data.realname)
{
this.$toast({
icon: 'success',
message: '授权成功',
duration: '1000',
onClose: () => {
this.getFbfList();
}
})
}
else
{
console.log('打开E签宝法人印章授权页面: ' + response.data.authUrl);
this.$toast({
icon: 'fail',
message: '将跳转至法人印章授权页面',
duration: '1000',
onClose: () => {
window.location.href = (response.data.authUrl);
}
});
}
}
});
},
callbackAuthorizationLegalSeal(id) {
authorizeLegalSeal(id, this.getUrl(/*'legalSeal'*/)).then(response => {
if (response.code === 200) {
if(response.data.realname)
{
this.reload();
}
else
{
console.log('E签宝法人印章授权失败');
this.$toast({
icon: 'fail',
message: '企业法人授权失败',
duration: '1000',
});
}
}
});
},
},
}
</script>
@@ -289,9 +349,14 @@
border-radius: 15PX;
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);

.auth-button {
.auth-container {
text-align: center;
margin-bottom: .1rem;
}
.auth-button {
max-width: 38%;
display: inline-block;
}
}

.titBox {


Ładowanie…
Anuluj
Zapisz