diff --git a/config/index.js b/config/index.js index a73616ff..822a8b0b 100644 --- a/config/index.js +++ b/config/index.js @@ -12,9 +12,9 @@ module.exports = { proxyTable: { "/api": { // 请求的目标主机 - //target: 'http://218.59.175.44:8082/nsgk_test/', // 公网测试环境 + target: 'http://localhost:8080', // 公网测试环境 // target: `http://192.168.0.116:8091/nsgk_api/`, // 内网测试环境 - target: 'http://localhost:8080/', + //target: 'http://localhost:8080/', //target: 'http://192.168.0.106:8080/', changeOrigin: true, pathRewrite: { diff --git a/src/api/contracted/fbf.js b/src/api/contracted/fbf.js index 93a5ef47..5a363ad6 100644 --- a/src/api/contracted/fbf.js +++ b/src/api/contracted/fbf.js @@ -52,3 +52,39 @@ export function generateEmployerCode(params) { method: 'get' }); } + +// 发包方签字授权(个人) +export function authorizeSignaturePsn(id, redirectUrl) { + return request({ + url: '/service/fbf/authorize/psn/' + id, + method: 'get', + params: {redirectUrl}, + }); +} + +// 发包方签字授权(机构) +export function authorizeSignatureOrg(id, redirectUrl) { + return request({ + url: '/service/fbf/authorize/org/' + id, + method: 'post', + params: {redirectUrl}, + }); +} + +// 发包方企业印章授权(机构) +export function authorizeOrgSeal(id, redirectUrl) { + return request({ + url: '/service/fbf/authorize/oegSeal/' + id, + method: 'post', + params: {redirectUrl}, + }); +} + +// 发包方企业印章授权完成(机构) +export function authorizeOrgSealFinished(id, redirectUrl) { + return request({ + url: '/service/fbf/authorizeFinished/oegSeal/' + id, + method: 'post', + params: {redirectUrl}, + }); +} diff --git a/src/api/sunVillage_info/fixedAssets.js b/src/api/sunVillage_info/fixedAssets.js index c514ba4e..d17c295c 100644 --- a/src/api/sunVillage_info/fixedAssets.js +++ b/src/api/sunVillage_info/fixedAssets.js @@ -885,6 +885,14 @@ export function listCbht(query) { }) } +// 查询承包合同详情 +export function getCbhtDetail(id) { + return request({ + url: '/service/cbht/get/' + id, + method: 'get', + }) +} + // 承包合同甲方签名 export function cbhtFirstSign(data,id) { return request({ @@ -911,10 +919,11 @@ export function signedContractDownload(id) { } // 签字合同预览 -export function viewSignedContract(id) { +export function viewSignedContract(id, type) { return request({ url: '/open/villageAffairs/public/sign/view/' + id, - method: 'get' + method: 'get', + params: {type}, }); } @@ -1050,19 +1059,29 @@ export function getMessage(id) { }) } //e签宝-发包方合同网签 -export function eqbFbfhtwq(data){ +export function eqbFbfhtwq(data, parms){ return request({ url: '/open/villageAffairs/public/eqbFbfhtwq', method: 'post', - data: data + data: data, + params: parms, + }) +} +//e签宝-发包方合同网签 +export function eqbFbfhtwqFinish(data){ + return request({ + url: '/open/villageAffairs/public/eqbFbfhtwqFinish', + method: 'post', + data: data, }) } //e签宝-发包方批量生成签署流程 -export function batchEqbContractSignProcess(data){ +export function batchEqbContractSignProcess(data, parms){ return request({ url: '/service/cbf/batchEqbContractSignProcess', method: 'post', - data: data + data: data, + params: parms, }) } //e签宝-发包方批量签署 @@ -1084,11 +1103,12 @@ export function batchContractCompleted() { } //e签宝-合同网签 -export function eqbCbfhtwq(data){ +export function eqbCbfhtwq(data, parms){ return request({ url: '/open/villageAffairs/public/eqbCbfhtwq', method: 'post', - data: data + data: data, + params: parms, }) } // 资源公开 diff --git a/src/api/sunVillage_info/sysCbf.js b/src/api/sunVillage_info/sysCbf.js index bf4cca86..ecd86648 100644 --- a/src/api/sunVillage_info/sysCbf.js +++ b/src/api/sunVillage_info/sysCbf.js @@ -81,11 +81,12 @@ export function examineSign(data){ }) } //承包方e签宝授权 -export function eqbEmpower(data){ +export function eqbEmpower(data, redirectUrl){ return request({ url:'/open/villageAffairs/public/eqbEmpower', method: 'post', - data: data + data: data, + params: {redirectUrl}, }) } //承包合同相关统计 diff --git a/src/views/sunVillage_info/list_cbf.vue b/src/views/sunVillage_info/list_cbf.vue index 5547ab77..545d6c00 100644 --- a/src/views/sunVillage_info/list_cbf.vue +++ b/src/views/sunVillage_info/list_cbf.vue @@ -213,10 +213,21 @@ this.handleReset(); }); }, + getUrl(type) { + let url = location.href; + let index = url.indexOf('?'); + url = index < 0 ? url : url.substring(0, index); + if(type) + url += '?callback=' + type; + return url; + }, + reload() { + location.replace(this.getUrl()); + }, contractSign(val){ - eqbCbfhtwq(val).then(response => { - this.noticeUrl = response.data; - this.htqsShow = true; + eqbCbfhtwq(val, {redirectUrl: this.getUrl('cbf&ht=' + val.id)}).then(response => { + this.noticeUrl = response.data.url; + this.htqsShow = true; }); }, @@ -329,7 +340,7 @@ }); }, contractView(id) { - viewSignedContract(id).then(response => { + viewSignedContract(id, 'cbf').then(response => { if (response.code === 200) { this.noticeUrl = response.data; this.htqsShow = true; diff --git a/src/views/sunVillage_info/list_cbfsq.vue b/src/views/sunVillage_info/list_cbfsq.vue index f53784de..b5b6b4ba 100644 --- a/src/views/sunVillage_info/list_cbfsq.vue +++ b/src/views/sunVillage_info/list_cbfsq.vue @@ -2,7 +2,7 @@
{{this.$route.query.shStatus?'承包方审核':'承包方授权'}} -
+
@@ -288,15 +288,41 @@ this.getDicts(k).then((resp) => this.options[k] = resp.data); } }, + getUrl(type) { + let url = location.href; + let index = url.indexOf('?'); + url = index < 0 ? url : url.substring(0, index); + if(type) + url += '?callback=' + type; + return url; + }, + reload() { + location.replace(this.getUrl()); + }, /*承包方授权*/ cbfsq(){ - eqbEmpower(this.form).then(response => { + eqbEmpower(this.form, this.getUrl(/*'psn'*/)).then(response => { if(response.code === 200 ){ - // this.sqbutShow = false; - this.$notify({type: 'success', message: '授权成功'}); - this.showSignBtn = false; - this.showAuthBtn = false; - this.showAuthPic = true; + if(response.data.realname) + { + // this.sqbutShow = false; + this.$notify({type: 'success', message: '授权成功'}); + this.showSignBtn = false; + this.showAuthBtn = false; + this.showAuthPic = true; + } + else + { + console.log('打开E签宝个人认证授权页面: ' + response.data.authUrl); + this.$toast({ + icon: 'fail', + message: '将跳转至个人认证授权页面', + duration: '1000', + onClose: () => { + window.location.href = (response.data.authUrl); + } + }); + } } }); }, @@ -441,6 +467,9 @@ type: mime }) }, + back() { + this.$router.push({path:'/sunVillage_info/index_code_rights'}); + }, }, } diff --git a/src/views/sunVillage_info/list_cbht.vue b/src/views/sunVillage_info/list_cbht.vue index 3f876469..65377842 100644 --- a/src/views/sunVillage_info/list_cbht.vue +++ b/src/views/sunVillage_info/list_cbht.vue @@ -121,7 +121,18 @@ @@ -140,6 +288,10 @@ margin: 25px auto 0; border-radius: 15PX; box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); + + .auth-button { + margin-bottom: .1rem; + } } .titBox {