Commit 329e9d2c authored by 胡's avatar

feat: 批量签署

parent 6b13fad6
......@@ -9,12 +9,17 @@
<scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false">
<div class="scroll-box">
<div class="box" v-for="item of list" :key="item.id" @click="doCheck(item.id)">
<div
class="box"
v-for="item of list"
:key="item.project_id"
@click="doCheck(item.project_id)"
>
<div class="name">
<img src="@/assets/login/contract.png" alt="icon" />
<span>{{ item.name }}</span>
<span>{{ item.project_name }}</span>
</div>
<div>{{ item.id }}</div>
<div>{{ item.project_number }}</div>
</div>
</div>
</scroll>
......@@ -24,61 +29,51 @@
</button>-->
<bottom-tab class="add-box">
<tab-button class="before" >签署电子合同</tab-button>
<tab-button class="next" >提交审核</tab-button>
<tab-button class="before" @click.native="signContact">签署电子合同</tab-button>
<tab-button class="next" @click.native="submit">提交审核</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
export default {
name: 'myBindUser',
data() {
return {
prolists: [],
title: this.$route.query.name === 'confirmList' ? '批量签署电子合同' : '',
list: [
{
id: 13434343434343,
name: '签署合同',
},
{
id: 23434343434343,
name: '签署合同',
},
{
id: 34343434343,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
]
list: JSON.parse(window.localStorage.getItem('handleContact')),
}
},
beforeRouteEnter(to, from, next) {
next(vm => {
methods: {
// 提交
async submit() {
},
// 签署
async signContact() {
let url = process.env.basePath + 'batch_sign';
let param = {
"master": {
"project_id": this.list.map(item => item.project_id),
"bp_id": JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id
}
}
hlsPopup.showLoading('请稍候');
let res = await this.$post(url, param);
this.hlsPopup.hideLoading()
if (res.result == 'S' && res.info.msg === 'success') {
this.$router.push({
name: 'ElectronicSign',
params: { url: res.info.data.url },
})
} else {
hlsPopup.showLongCenter(res.message || res.info.msg)
}
},
methods: {
doCheck(id) {
this.list = this.list.map(item => {
item.checked = item.id == id;
item.checked = item.project_id == id;
return item;
})
},
......
......@@ -29,7 +29,12 @@
<div
:class="['normal', { unbind: item.bp_status === 'APPROVED' }]"
@click.stop="doStatus(item)"
>{{ item.bp_status === 'APPROVED' ? '× 解绑' : item.bp_status_n }}</div>
>
<span
style="font-size: .3rem;"
>{{ item.bp_status === 'APPROVED' ? '×' : '' }}</span>
{{ item.bp_status === 'APPROVED' ? ' 解绑' : item.bp_status === 'NEW' ? '待提交' : item.bp_status_n }}
</div>
</div>
</div>
</div>
......@@ -85,11 +90,19 @@ export default {
},
methods: {
// 未认证进行人脸 认证
face(item) {
async face(item) {
let vm = this;
let register = ['NP_NO', 'ORG_NO', 'ORG_L_NO', 'ORG_AUTH_NO'];
if (register.includes(item.bp_identity)) {
// 人脸识别之前要确认是否已经在别的渠道已经绑定。
let res = await vm.getNpCertificationUrl(item)
if (res) {
hlsPopup.showLongCenter(item.bp_identity === 'ORG_NO' ? '请联系业务人员协助认证' : '认证已通过');
return vm.getList();
}
// 正式进行人脸识别
let url = process.env.basePath + 'bp_query'
let param = { bp_id: item.bp_id }
hlsPopup.showLoading('请稍候')
......@@ -103,10 +116,12 @@ export default {
idName: data.bp_name,
phoneNum: window.localStorage.user_phone,
},
function (suc) {
async function (suc) {
let success = JSON.parse(suc)
if (success.code === 1) {
vm.getNpCertificationUrl(item)
let res = await vm.getNpCertificationUrl(item)
hlsPopup.showLongCenter(res ? '绑定成功!' : '绑定失败!');
if (res) vm.getList();
}
},
function (reason) {
......@@ -135,10 +150,12 @@ export default {
let res = await vm.$post(url, param)
hlsPopup.hideLoading()
if (res.info.code === 0 && res.info.data.authUrl) {
hlsPopup.showLongCenter('绑定失败!')
// hlsPopup.showLongCenter('绑定失败!')
return false
} else if (res.info.code === 0 && res.info.data.openId) {
hlsPopup.showLongCenter('绑定成功!')
vm.getList()
// hlsPopup.showLongCenter('绑定成功!')
// vm.getList()
return true
} else {
hlsPopup.showLongCenter(res.info.msg)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment