|
|
|
@ -147,7 +147,7 @@ |
|
|
|
|
plain |
|
|
|
|
icon="el-icon-caret-right" |
|
|
|
|
size="mini" |
|
|
|
|
:disabled="multiple" |
|
|
|
|
:disabled="single" |
|
|
|
|
@click="obtainLoginStatus" |
|
|
|
|
v-hasPermi="['invoiceall:invoiceallyhdj:routerFreedom']" |
|
|
|
|
>授权活跃状态查询</el-button> |
|
|
|
@ -189,7 +189,6 @@ |
|
|
|
|
icon="el-icon-s-promotion" |
|
|
|
|
@click="registered(scope.row)" |
|
|
|
|
v-hasPermi="['invoiceall:invoiceallyhdj:edit']" |
|
|
|
|
v-if="isShowRegistered(scope.row)" |
|
|
|
|
>登记</el-button> |
|
|
|
|
<el-button |
|
|
|
|
size="small" |
|
|
|
@ -197,7 +196,6 @@ |
|
|
|
|
icon="el-icon-s-check" |
|
|
|
|
@click="loginVerificated(scope.row)" |
|
|
|
|
v-hasPermi="['invoiceall:invoiceallyhdj:remove']" |
|
|
|
|
v-show="isShowLoginVerificated(scope.row)" |
|
|
|
|
>登录校验</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -366,6 +364,26 @@ export default { |
|
|
|
|
{ required: true, message: "属性不能为空", trigger: "blur" } |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
checkRegested:{ |
|
|
|
|
identity: "企业ID", |
|
|
|
|
bsryxm : "办税人员姓名", |
|
|
|
|
dqbm : "地区编码", |
|
|
|
|
dlsf : "登录身份", |
|
|
|
|
dlsfmm : "办税人员登录密码", |
|
|
|
|
dlmm : "登录密码", |
|
|
|
|
dlzh : "登录账号", |
|
|
|
|
nsrmc : "纳税人名称", |
|
|
|
|
nsrsbh : "纳税人识别号", |
|
|
|
|
bsrysfzjhm : "办税人员身份证件号码", |
|
|
|
|
bsrysjhm : "办税人员手机号码" |
|
|
|
|
}, |
|
|
|
|
checkLogin:{ |
|
|
|
|
identity: "企业ID", |
|
|
|
|
dqbm : "地区编码", |
|
|
|
|
nsrsbh : "纳税人识别号", |
|
|
|
|
bsrysfzjhm : "办税人员身份证件号码", |
|
|
|
|
}, |
|
|
|
|
//登记参数 |
|
|
|
|
registeredParams: { |
|
|
|
|
appkey: "935248bf224f6c8431cdc1969f029519", |
|
|
|
@ -523,73 +541,97 @@ export default { |
|
|
|
|
}, |
|
|
|
|
//登记方法 |
|
|
|
|
registered(row) { |
|
|
|
|
this.reset(); |
|
|
|
|
this.$modal.confirm('请确认:登记identity为'+row.identity+',登记方式为'+row.dlfs+',登记身份为'+row.dlsf+'?').then(() => { |
|
|
|
|
let msg = this.checkParams(row,this.checkRegested) |
|
|
|
|
if (!msg){ |
|
|
|
|
this.reset(); |
|
|
|
|
this.$modal.confirm('请确认:登记identity为'+row.identity+',登记方式为'+row.dlfs+',登记身份为'+row.dlsf+'?').then(() => { |
|
|
|
|
getCompanyservice(row.identity).then(resp=>{ |
|
|
|
|
//请求成功 |
|
|
|
|
if(resp.code==200 && resp.data){ |
|
|
|
|
this.convertRegistedParam(row,true) |
|
|
|
|
const requestBody = { |
|
|
|
|
key: resp.data.secret, |
|
|
|
|
order: JSON.stringify(this.registeredParams), |
|
|
|
|
} |
|
|
|
|
encrypt(requestBody).then(res => { |
|
|
|
|
if (res.code == 200 && res.data) { |
|
|
|
|
registeredMethod(res.data,row.identity).then(response => { |
|
|
|
|
if (response.code == 200){ |
|
|
|
|
this.$message.success('请求登记成功') |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}else if (!res.data){ |
|
|
|
|
this.$message.error('报文加密失败') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else if(!resp.data) { |
|
|
|
|
this.$message.error('请检查企业ID配置') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
this.$message.error(msg) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
/** 登陆验证 */ |
|
|
|
|
loginVerificated(row){ |
|
|
|
|
|
|
|
|
|
let msg = this.checkParams(row,this.checkLogin); |
|
|
|
|
|
|
|
|
|
if (!msg){ |
|
|
|
|
this.reset(); |
|
|
|
|
getCompanyservice(row.identity).then(resp=>{ |
|
|
|
|
//请求成功 |
|
|
|
|
if(resp.code==200 && resp.data != null && resp.data != ""){ |
|
|
|
|
this.convertRegistedParam(row,true) |
|
|
|
|
if(resp.code==200 && resp.data){ |
|
|
|
|
this.convertRegistedParam(row,false) |
|
|
|
|
const requestBody = { |
|
|
|
|
key: resp.data.secret, |
|
|
|
|
order: JSON.stringify(this.registeredParams), |
|
|
|
|
order: JSON.stringify(this.loginVerificatedParams), |
|
|
|
|
} |
|
|
|
|
encrypt(requestBody).then(res => { |
|
|
|
|
if (res.code == 200 && res.data != null && res.data != "") { |
|
|
|
|
registeredMethod(res.data,row.identity).then(response => { |
|
|
|
|
if (response.code == 200){ |
|
|
|
|
this.$message.success('请求登记成功') |
|
|
|
|
if (res.code == 200 && res.data) { |
|
|
|
|
qrcodeMethod(res.data,row.identity).then(response => { |
|
|
|
|
if (response.code == 200 && response.data){ |
|
|
|
|
|
|
|
|
|
if (response.data.requestId){ |
|
|
|
|
this.$message.success('登记成功') |
|
|
|
|
}else { |
|
|
|
|
this.$message.error('登记失败') |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
if(response.msg){ |
|
|
|
|
this.$message.error(response.msg) |
|
|
|
|
}else { |
|
|
|
|
this.$message.error(response.message) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}else if (res.data == null || res.data == ""){ |
|
|
|
|
}else if (!res.data){ |
|
|
|
|
this.$message.error('报文加密失败') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else if(resp.data == null || resp.data == "") { |
|
|
|
|
}else if (!resp.data){ |
|
|
|
|
this.$message.error('请检查企业ID配置') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
this.$message.error(msg) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/** 登陆验证 */ |
|
|
|
|
loginVerificated(row){ |
|
|
|
|
this.reset(); |
|
|
|
|
getCompanyservice(row.identity).then(resp=>{ |
|
|
|
|
//请求成功 |
|
|
|
|
if(resp.code==200 && resp.data != null && resp.data != ""){ |
|
|
|
|
this.convertRegistedParam(row,false) |
|
|
|
|
const requestBody = { |
|
|
|
|
key: resp.data.secret, |
|
|
|
|
order: JSON.stringify(this.loginVerificatedParams), |
|
|
|
|
} |
|
|
|
|
encrypt(requestBody).then(res => { |
|
|
|
|
if (res.code == 200 && res.data != null && res.data != "") { |
|
|
|
|
qrcodeMethod(res.data,row.identity).then(response => { |
|
|
|
|
if (response.code == 200 && response.data != null && response.data != ""){ |
|
|
|
|
|
|
|
|
|
if (response.data.requestId != null && response.data.requestId != ""){ |
|
|
|
|
this.$message.success('登记成功') |
|
|
|
|
}else { |
|
|
|
|
this.$message.error('登记失败') |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
if(response.msg){ |
|
|
|
|
this.$message.error(response.msg) |
|
|
|
|
}else { |
|
|
|
|
this.$message.error(response.message) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}else if (res.data == null || res.data == ""){ |
|
|
|
|
this.$message.error('报文加密失败') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else if (resp.data == null || resp.data == ""){ |
|
|
|
|
this.$message.error('请检查企业ID配置') |
|
|
|
|
checkParams(row,check){ |
|
|
|
|
let msg = ''; |
|
|
|
|
Object.keys(check).forEach(key=>{ |
|
|
|
|
if (row[key]==null || row[key]==''){ |
|
|
|
|
msg = msg+check[key]+'、' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
if (msg){ |
|
|
|
|
msg = msg.slice(0,msg.length-1)+ '不能为空' |
|
|
|
|
} |
|
|
|
|
return msg; |
|
|
|
|
}, |
|
|
|
|
convertRegistedParam(row,flag){ |
|
|
|
|
if (flag){ |
|
|
|
@ -648,36 +690,6 @@ export default { |
|
|
|
|
this.download('invoiceall/invoiceallyhdj/export', { |
|
|
|
|
...this.queryParams |
|
|
|
|
}, `invoiceallyhdj_${new Date().getTime()}.xlsx`) |
|
|
|
|
}, |
|
|
|
|
isShowRegistered(row){ |
|
|
|
|
return row.dqbm != null |
|
|
|
|
&& row.dqbm != '' |
|
|
|
|
&& row.dlfs != null |
|
|
|
|
&& row.dlfs != '' |
|
|
|
|
&& row.dlsfmm != null |
|
|
|
|
&& row.dlsfmm != '' |
|
|
|
|
&& row.dlmm != null |
|
|
|
|
&& row.dlmm != '' |
|
|
|
|
&& row.dlzh != null |
|
|
|
|
&& row.dlzh != '' |
|
|
|
|
&& row.nsrmc != null |
|
|
|
|
&& row.nsrmc != '' |
|
|
|
|
&& row.nsrsbh != null |
|
|
|
|
&& row.nsrsbh != '' |
|
|
|
|
&& row.bsrysfzjhm != null |
|
|
|
|
&& row.bsrysfzjhm != '' |
|
|
|
|
&& row.identity != null |
|
|
|
|
&& row.identity != '' |
|
|
|
|
}, |
|
|
|
|
isShowLoginVerificated(row){ |
|
|
|
|
return row.dqbm != null |
|
|
|
|
&& row.dqbm != '' |
|
|
|
|
&& row.nsrsbh != null |
|
|
|
|
&& row.nsrsbh != '' |
|
|
|
|
&& row.bsrysfzjhm != null |
|
|
|
|
&& row.bsrysfzjhm != '' |
|
|
|
|
&& row.identity != null |
|
|
|
|
&& row.identity != '' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|