Commit 0843a998 authored by 胡's avatar

feat: 对接口

parent 912d4c2d
<template>
<h-view id="batch-sign" class="public-style" :title="title">
<h-header class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$router.go(-1)" />
</div>
<div slot="center" class="top-word">{{ title }}</div>
</h-header>
<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="name">
<img src="@/assets/login/contract.png" alt="icon" />
<span>{{ item.name }}</span>
</div>
<div>{{ item.id }}</div>
</div>
</div>
</scroll>
<!-- <button class="submit">
<img src="@/assets/login/addUser.png" alt="自然人" /> 添加新用户
</button>-->
<bottom-tab class="add-box">
<tab-button class="before" >签署电子合同</tab-button>
<tab-button class="next" >提交审核</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: '签署合同',
},
]
}
},
beforeRouteEnter(to, from, next) {
next(vm => {
})
},
methods: {
doCheck(id) {
this.list = this.list.map(item => {
item.checked = item.id == id;
return item;
})
},
},
}
</script>
<style lang='less'>
#batch-sign {
background-color: rgb(242, 242, 242);
.scrollContent {
background-color: rgb(242, 242, 242);
}
.add-box {
.before {
border: 1px solid #fdb62f;
border-radius: 4px;
color: #fdb62f;
}
.next {
background: #1d3fff;
border-radius: 4px;
color: #fff;
}
}
.scroll-box {
padding: 8px;
.box {
display: flex;
justify-content: space-between;
width: 99.9%;
height: 60px;
padding: 0 15px 0 10px;
background-color: #fff;
border-radius: 8px;
line-height: 60px;
font-size: 80%;
color: rgb(58, 58, 58);
margin-bottom: 0.15rem;
img {
height: 18px;
vertical-align: text-bottom;
margin-right: 7px;
}
}
}
.content {
position: absolute;
top: 0;
}
.scrollContent {
//padding-top: 1.92rem;
padding-bottom: 20px;
}
}
.platform-ios {
#batch-sign {
.scrollContent {
padding-top: 2.32rem;
padding-bottom: 50px;
}
}
}
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#query {
.scrollContent {
padding-top: 2.72rem;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#query {
.scrollContent {
padding-top: 2.72rem;
}
}
}
}
</style>
......@@ -11,13 +11,17 @@
<input v-model="keyWord" placeholder="请输入合同号/产品名称/承租人名称" >
</div>
<scroll ref="scroll" :updateData="[showList]" :pullUp="true" @pullingUp="getList">
<div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item)">
<div v-for="(item,index) in showList" :key="index" class="item">
<div class="left">
<span>
<span @click="changePage(item)">
<img src="@/assets/contractStart/icon.png" >
</span>
<div class="check-box">
<div></div>
<img v-if="false" src="@/assets/contractCreate/selected.png" alt="已选择">
</div>
</div>
<div class="right">
<div class="right" @click="changePage(item)">
<div class="right-top">
<span>合同号</span>
<span>{{ item.project_number }}</span>
......@@ -41,6 +45,22 @@
</div>
</div>
</scroll>
<div class="check-bottom">
<div class="choose" v-show="isRadio">
<div class="radio" @click="chooseAll = !chooseAll">
<img v-show="chooseAll" src="@/assets/login/radio.png" alt="radio">
<div class="no-check" v-show="!chooseAll"></div>
<span :style="{color: chooseAll ? '#1d3fff' : 'rgb(212,214,212)'}">全选</span>
</div>
<button class="cancel" @click="isRadio = false">× 取消批量</button>
<button class="sign" @click="$router.push({path: '/batchSign',query: {name: 'confirmList'}})">签订电子合同</button>
</div>
<button v-show="!isRadio" class="go-radio" @click="isRadio =true">
<img src="@/assets/login/write.png" alt="icon">
<span>批量签署</span>
</button>
</div>
<div v-if="showList.length === 0">
<div class="display">
<img src="@/assets/messageCenter/noMsg.png" alt="">
......@@ -66,6 +86,9 @@ export default {
showList: [],
undo: [],
done: [],
chooseAll: false,
isRadio: false,
}
},
watch: {
......@@ -208,7 +231,72 @@ export default {
height: 100%;
// margin-top: -70px;
}
}
.check-bottom {
width: 100%;
height: 60px;
background-color: #fff;
position: absolute;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
.go-radio {
width: 90%;
color: #fff;
background-color: #1d3fff;
padding: 7px 10px;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
font-size: .15rem;
img {
width: 16px;
margin-right: 4px;
}
}
.choose {
width: 100%;
display: flex;
justify-content: space-evenly;
align-items: center;
height: 100%;
font-size: .25rem;
}
.radio {
display: flex;
align-items: center;
color: #1d3fff;
img {
width: 24px;
}
.no-check {
width: 17px;
height: 17px;
border-radius: 8.5px;
border: 1px solid #edeef1;
background-color: #fff;
margin-right: 7.1px;
}
}
.cancel {
background-color: #ffcece;
color: red;
padding: 7px 15px;
border-radius: 3px;
}
.sign {
color: #fff;
background-color: #1d3fff;
padding: 7px 40px;
border-radius: 3px;
}
}
.search {
background-color: #fff;
padding: 8px 12px;
......@@ -254,9 +342,31 @@ export default {
margin: 0 auto;
margin-top: 9px;
.left {
display: flex;
flex-direction: column;
width: 15%;
height: 100%;
float: left;
.check-box {
width: 100%;
height: 100px;
display: flex;
justify-content: center;
align-items: center;
div {
width: 0.32rem;
height: 0.32rem;
border: 0.02rem solid #1d3fff;
border-radius: 0.06rem;
}
img {
width: 0.32rem;
}
}
span {
display: block;
width: 30px;
......@@ -331,7 +441,7 @@ export default {
.platform-ios {
#confirmList {
.scrollContent {
padding-top: 3.32rem;
padding-top: 3.32rem;
}
}
}
......@@ -341,6 +451,11 @@ export default {
#confirmList {
.scrollContent {
padding-top: 3.72rem;
padding-bottom: 40px;
}
.check-bottom {
bottom: 32px;
}
}
}
......@@ -351,6 +466,7 @@ export default {
#confirmList {
.scrollContent {
padding-top: 3.72rem;
padding-bottom: 40px;
}
.search {
input {
......@@ -366,6 +482,10 @@ export default {
color: #888c8f;
}
}
.check-bottom {
bottom: 32px;
}
}
}
}
......
......@@ -9,11 +9,20 @@
<scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false">
<div class="scroll-box">
<div class="box" v-for="item of list" @click="doCheck(item.id)">
<div
class="box"
v-for="item of list"
:key="item.bp_id"
@click="doCheck(item.user_bp_bind_id)"
>
<div class="name">
<img v-if="item.person" src="../assets/login/person.png" alt="自然人" />
<img
v-if="item.bp_class == 'NP'"
src="../assets/login/person.png"
alt="自然人"
/>
<img v-else src="../assets/login/bank.png" alt="bank" />
<span>{{ item.name }}</span>
<span>{{ item.bp_name }}</span>
</div>
<div v-show="item.checked">
<img src="../assets/login/gou2.png" alt="gou2" />
......@@ -22,68 +31,85 @@
</div>
</scroll>
<button class="submit" :class="{ checked: hasChecked}" @click="next">
<button class="submit" :class="{ checked: hasChecked > -1 }" @click="next">
<img src="../assets/login/gou1.png" alt="自然人" /> 确 认
</button>
</h-view>
</template>
<script>
import noImg from '../assets/productQuery/none.png'
export default {
name: 'choose-user',
data() {
return {
prolists: [],
list: [
{
id: 1,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true
},
{
id: 2,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true
},
{
id: 3,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true
},
{
id: 4,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: false
},
]
list: []
}
},
computed: {
hasChecked() {
return this.list.some(item => item.checked);
}
return this.list.findIndex(item => item.checked);
},
},
beforeRouteEnter(to, from, next) {
next(vm => {
})
created() {
this.getList();
},
methods: {
async getList() {
let url = process.env.basePath + 'user_bp_query';
let params = { app_user_id: window.localStorage.getItem('app_user_id') };
try {
hlsPopup.showLoading('请稍等');
let query = await this.hlsHttp.post(url, params);
if (query.result == 'S') {
this.hlsPopup.hideLoading();
// 认证
let register = {
NP_NO: "个人认证未通过",
NP_YES: "个人认证通过",
ORG_YES: "企业认证通过",
ORG_NO: "企业认证未通过",
}
query.lists = query.lists.map(item => {
item.bp_identity_name = register[item.bp_identity];
return item;
})
query.bp_identity_name =
window.localStorage.setItem('bind-user-list', JSON.stringify(query.lists));
this.list = query.lists;
if (this.list.length === 1) {
this.list[0].checked = true;
this.next();
}
} else {
this.hlsPopup.hideLoading();
this.hlsPopup.showLongCenter(res.message);
}
} catch (error) {
this.hlsPopup.hideLoading();
}
},
doCheck(id) {
this.list = this.list.map(item => {
item.checked = item.id == id;
item.checked = item.user_bp_bind_id == id;
return item;
})
},
next() {
if(this.hasChecked) {
// 做缓存
next() {
let index = this.hasChecked;
if (index > -1) {
window.localStorage.setItem('now_user_bp_bind_id', JSON.stringify(this.list[index]));
this.$router.push('tab');
} else {
this.hlsPopup.showLongCenter('请选择');
......@@ -95,7 +121,7 @@ export default {
<style lang='less'>
#choose-user {
background-color: rgb(242, 242, 242);
background-color: rgb(242, 242, 242);
.scrollContent {
background-color: rgb(242, 242, 242);
}
......
......@@ -140,6 +140,7 @@ export default {
vm.updateVersion() // 版本更新
window.localStorage.setItem('user_phone', vm.username)
window.localStorage.setItem('password', md5passwprd)
window.localStorage.setItem('app_user_id', res.info.app_user_id)
// vm.$router.push('tab')
vm.$router.push('/choose-user');
let tagOption = {
......
......@@ -27,8 +27,8 @@
{{ elecStatusDesceibe }}
</p> -->
<span> {{nowBind.name ? `${nowBind.name} (当前)` : '未绑定'}}</span>
<div v-show="nowBind.name" @click="changeUser">切换</div>
<span> {{nowBind.bp_name ? `${nowBind.bp_name} (当前)` : '未绑定'}}</span>
<div v-show="nowBind.bp_name" @click="changeUser">切换</div>
</div>
</div>
</div>
......@@ -37,12 +37,12 @@
<div class="bind-user">
<div class="box">
<p class="title">我绑定的用户</p>
<div v-if="!bindUserList.length" class="no-user">暂无绑定用户, <router-link to="/">去绑定~</router-link> </div>
<div v-if="!myBindUser.length" class="no-user">暂无绑定用户, <router-link to="/user-bind">去绑定~</router-link> </div>
<template v-else>
<div v-for="item of bindUserList" class="bind-item">
<p>{{item.name}}</p>
<div>{{item.isPerson ? '个人认证通过' : '企业认证通过'}}</div>
<div v-for="item of myBindUser" class="bind-item">
<p>{{item.bp_name}}</p>
<div>{{item.bp_class == 'NP' ? '个人认证通过' : '企业认证通过'}}</div>
</div>
<div class="more" @click="$router.push('/myBindUser')"> 更多操作 </div>
......@@ -233,19 +233,8 @@ export default {
],
//绑定的用户列表
bindUserList: [
{
name: "上海汉得信息技术有限公司",
isPerson: false
},
{
name: "黄嘉娜",
isPerson: true
},
],
nowBind: {
name: '上海汉得信息技术有限公司'
},
bindUserList: JSON.parse(window.localStorage.getItem('bind-user-list')),
nowBind: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')),
}
},
computed: {
......@@ -261,6 +250,11 @@ export default {
arr.push(obj)
return arr
},
myBindUser() {
if(this.bindUserList.length > 2) return [this.bindUserList[0], this.bindUserList[1]];
return this.bindUserList;
}
},
watch: {
user_bp_type (newVal, oldVal) {
......@@ -338,27 +332,15 @@ export default {
})
next()
},
methods: {
methods: {
changeUser() {
this.hlsPopup.selectList({
list: [
{
code_name: '黄嘉娜',
code: '3'
},
{
code_name: '上海汉得信息技术有限公司',
code: '4'
},
{
code_name: 'xxxx有限责任公司',
code: '38'
},
],
list: this.bindUserList.map(item => ({code_name: item.bp_name, code: item.user_bp_bind_id})),
code: 'code',
object: {},
returnItem: (index, obj) => {
this.nowBind = {name: obj.code_n};
returnItem: (index, obj) => {
this.nowBind = this.bindUserList[index];
window.localStorage.setItem('now_user_bp_bind_id', JSON.stringify(this.nowBind));
},
})
},
......
......@@ -9,15 +9,21 @@
<scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false">
<div class="scroll-box">
<div class="box" v-for="item of list" @click="doCheck(item.id)">
<div class="box" v-for="item of list" :key="item.bp_id" @click="doCheck(item.id)">
<div class="name">
<img v-if="item.person" src="../../assets/login/person.png" alt="自然人" />
<img
v-if="item.bp_class === 'NP'"
src="../../assets/login/person.png"
alt="自然人"
/>
<img v-else src="../../assets/login/bank.png" alt="bank" />
<span>{{ item.name }}</span>
<span>{{ item.bp_name }}</span>
</div>
<div class="flag">
<div>{{item.person ? '个人认证通过': '企业认证通过'}}</div>
<div :class="['normal',{unbind: item.status === '× 解绑'}]">{{item.status}}</div>
<div @click="face(item)">{{ item.bp_identity_name }}</div>
<div
:class="['normal', { unbind: item.bp_status === 'APPROVED' }]"
>{{ item.bp_status === 'APPROVED' ? '× 解绑' : item.bp_status_n }}</div>
</div>
</div>
</div>
......@@ -29,7 +35,7 @@
</h-view>
</template>
<script>
<script>
export default {
name: 'myBindUser',
......@@ -37,38 +43,9 @@ export default {
return {
prolists: [],
list: [
{
id: 1,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true,
status: '审批中'
},
{
id: 2,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true,
status: '审批拒绝'
},
{
id: 3,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true,
status: '× 解绑'
},
{
id: 4,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: false,
status: '× 解绑'
},
]
list: JSON.parse(window.localStorage.getItem('bind-user-list')),
}
},
},
beforeRouteEnter(to, from, next) {
next(vm => {
})
......@@ -79,14 +56,57 @@ export default {
item.checked = item.id == id;
return item;
})
},
},
face(item) {
let register = ['NP_NO', 'ORG_NO'];
if (register.includes(item.bp_identity)) {
// 如果未认证,人脸
}
},
// 解绑,需要等待后端调整后使用
unBind() {
let vm = this
hlsPopup.showConfirm({
title: '提示',
content: '确定解除绑定?',
onConfirm: function (index) {
if (index === 1) {
// window.localStorage.clear()
// vm.$router.push('/login')
let myPhone = window.localStorage.getItem('user_phone')
let myPassword = window.localStorage.getItem('password')
let url = process.env.basePath + 'bp_unbind'
let param = {
master: {
phone: myPhone,
password: myPassword,
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hlsPopup.showLongCenter('解绑成功')
if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
// vm.flag = true
vm.approveBtn = false
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
}
},
})
},
},
}
</script>
<style lang='less'>
#my-bind-user{
background-color: rgb(242, 242, 242);
#my-bind-user {
background-color: rgb(242, 242, 242);
.scrollContent {
background-color: rgb(242, 242, 242);
}
......@@ -120,8 +140,16 @@ export default {
flex-direction: column;
justify-content: space-evenly;
padding-left: 10px;
border-left: 1px transparent solid ;
border-image: linear-gradient(to bottom, #fff 10%, #f2f2f2 10% , #f2f2f2 50%, #f2f2f2 90%, #fff 90%) 1 10;
border-left: 1px transparent solid;
border-image: linear-gradient(
to bottom,
#fff 10%,
#f2f2f2 10%,
#f2f2f2 50%,
#f2f2f2 90%,
#fff 90%
)
1 10;
& > div {
height: 20px;
......@@ -129,9 +157,9 @@ export default {
border: 1px solid #1d3fff;
line-height: 19.5px;
text-align: center;
font-size: .12rem;
font-size: 0.12rem;
padding: 0 4px;
color: #1d3fff;
color: #1d3fff;
}
.normal {
......@@ -142,7 +170,7 @@ export default {
.unbind {
background-color: rgb(255, 206, 206);
color: red;
border: 1px solid rgb(255, 206, 206);
border: 1px solid rgb(255, 206, 206);
}
}
......@@ -162,7 +190,7 @@ export default {
height: 18px;
vertical-align: text-bottom;
}
}
}
.content {
position: absolute;
......
......@@ -110,6 +110,7 @@ const AddCar = resolve => require.ensure([], () => { resolve(require('@/pages/co
// 合同签订
const ConfirmDetail = resolve => require.ensure([], () => { resolve(require('@/pages/carConfirm/confirm-detail')) }, 'carConfirm')
const ConfirmList = resolve => require.ensure([], () => { resolve(require('@/pages/carConfirm/confirm-list')) }, 'carConfirm')
const batchSign = resolve => require.ensure([], () => { resolve(require('@/pages/carConfirm/batchSign')) }, 'carConfirm')
// 合同查询
const ContractRecords = resolve => require.ensure([], () => { resolve(require('@/pages/contractInquire/contract-records')) }, 'contractInquire')
......@@ -221,7 +222,7 @@ export default new Router({
path: '/choose-user',
component: ChooseUser,
name: 'choose-user',
meta: {keepAlive: true},
meta: {keepAlive: false},
},
{
path: '/regiester',
......@@ -306,6 +307,7 @@ export default new Router({
// 合同签订
{path: '/confirm-detail', component: ConfirmDetail, name: 'ConfirmDetail', meta: {keepAlive: false}},
{path: '/confirm-list', component: ConfirmList, name: 'ConfirmList', meta: {keepAlive: false}},
{path: '/batchSign', component: batchSign, name: 'batchSign', meta: {keepAlive: false}},
// 合同查询
{path: '/contract-records', component: ContractRecords, name: 'ContractRecords', meta: {keepAlive: true}},
{path: '/repay-detail', component: RepayDetail, name: 'RepayDetail', meta: {keepAlive: true}},
......
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