Commit 329e9d2c authored by 胡's avatar

feat: 批量签署

parent 6b13fad6
...@@ -9,12 +9,17 @@ ...@@ -9,12 +9,17 @@
<scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false"> <scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false">
<div class="scroll-box"> <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"> <div class="name">
<img src="@/assets/login/contract.png" alt="icon" /> <img src="@/assets/login/contract.png" alt="icon" />
<span>{{ item.name }}</span> <span>{{ item.project_name }}</span>
</div> </div>
<div>{{ item.id }}</div> <div>{{ item.project_number }}</div>
</div> </div>
</div> </div>
</scroll> </scroll>
...@@ -24,61 +29,51 @@ ...@@ -24,61 +29,51 @@
</button>--> </button>-->
<bottom-tab class="add-box"> <bottom-tab class="add-box">
<tab-button class="before" >签署电子合同</tab-button> <tab-button class="before" @click.native="signContact">签署电子合同</tab-button>
<tab-button class="next" >提交审核</tab-button> <tab-button class="next" @click.native="submit">提交审核</tab-button>
</bottom-tab> </bottom-tab>
</h-view> </h-view>
</template> </template>
<script> <script>
export default { export default {
name: 'myBindUser', name: 'myBindUser',
data() { data() {
return { return {
prolists: [], prolists: [],
title: this.$route.query.name === 'confirmList' ? '批量签署电子合同' : '', title: this.$route.query.name === 'confirmList' ? '批量签署电子合同' : '',
list: JSON.parse(window.localStorage.getItem('handleContact')),
list: [
{
id: 13434343434343,
name: '签署合同',
},
{
id: 23434343434343,
name: '签署合同',
},
{
id: 34343434343,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
]
} }
}, },
beforeRouteEnter(to, from, next) {
next(vm => {
})
},
methods: { 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)
}
},
doCheck(id) { doCheck(id) {
this.list = this.list.map(item => { this.list = this.list.map(item => {
item.checked = item.id == id; item.checked = item.project_id == id;
return item; return item;
}) })
}, },
...@@ -129,7 +124,7 @@ export default { ...@@ -129,7 +124,7 @@ export default {
margin-right: 7px; margin-right: 7px;
} }
} }
} }
.content { .content {
position: absolute; position: absolute;
...@@ -143,7 +138,7 @@ export default { ...@@ -143,7 +138,7 @@ export default {
} }
.platform-ios { .platform-ios {
#batch-sign { #batch-sign {
.scrollContent { .scrollContent {
padding-top: 2.32rem; padding-top: 2.32rem;
padding-bottom: 50px; padding-bottom: 50px;
...@@ -159,7 +154,7 @@ export default { ...@@ -159,7 +154,7 @@ export default {
padding-top: 2.72rem; padding-top: 2.72rem;
} }
} }
} }
} }
// iPhoneXR适配 // iPhoneXR适配
...@@ -170,6 +165,6 @@ export default { ...@@ -170,6 +165,6 @@ export default {
padding-top: 2.72rem; padding-top: 2.72rem;
} }
} }
} }
} }
</style> </style>
...@@ -29,7 +29,12 @@ ...@@ -29,7 +29,12 @@
<div <div
:class="['normal', { unbind: item.bp_status === 'APPROVED' }]" :class="['normal', { unbind: item.bp_status === 'APPROVED' }]"
@click.stop="doStatus(item)" @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> </div>
</div> </div>
...@@ -80,16 +85,24 @@ export default { ...@@ -80,16 +85,24 @@ export default {
NowItem: {}, // 当前操作对象 NowItem: {}, // 当前操作对象
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
// 未认证进行人脸 认证 // 未认证进行人脸 认证
face(item) { async face(item) {
let vm = this; let vm = this;
let register = ['NP_NO', 'ORG_NO', 'ORG_L_NO', 'ORG_AUTH_NO']; let register = ['NP_NO', 'ORG_NO', 'ORG_L_NO', 'ORG_AUTH_NO'];
if (register.includes(item.bp_identity)) { 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 url = process.env.basePath + 'bp_query'
let param = { bp_id: item.bp_id } let param = { bp_id: item.bp_id }
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
...@@ -103,10 +116,12 @@ export default { ...@@ -103,10 +116,12 @@ export default {
idName: data.bp_name, idName: data.bp_name,
phoneNum: window.localStorage.user_phone, phoneNum: window.localStorage.user_phone,
}, },
function (suc) { async function (suc) {
let success = JSON.parse(suc) let success = JSON.parse(suc)
if (success.code === 1) { if (success.code === 1) {
vm.getNpCertificationUrl(item) let res = await vm.getNpCertificationUrl(item)
hlsPopup.showLongCenter(res ? '绑定成功!' : '绑定失败!');
if (res) vm.getList();
} }
}, },
function (reason) { function (reason) {
...@@ -135,10 +150,12 @@ export default { ...@@ -135,10 +150,12 @@ export default {
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
hlsPopup.hideLoading() hlsPopup.hideLoading()
if (res.info.code === 0 && res.info.data.authUrl) { 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) { } else if (res.info.code === 0 && res.info.data.openId) {
hlsPopup.showLongCenter('绑定成功!') // hlsPopup.showLongCenter('绑定成功!')
vm.getList() // vm.getList()
return true
} else { } else {
hlsPopup.showLongCenter(res.info.msg) 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