Commit d6d99651 authored by linxin's avatar linxin

add

parent f24b9ea9
Pipeline #4462 canceled with stages
...@@ -137,7 +137,8 @@ ...@@ -137,7 +137,8 @@
<div slot="name">退出登录</div> <div slot="name">退出登录</div>
</item> </item>
</list-item> </list-item>
<button @click="approveBtn ? unBind() : changePageHead()">{{ description }}</button> <button v-if="!popSetect" @click="approveBtn ? unBind() : changePageHead()">{{ description }}</button>
<button v-if="popSetect" @click="popSetectBox=true">{{ description }}</button>
</div> </div>
</h-content> </h-content>
<role-switch <role-switch
...@@ -147,6 +148,13 @@ ...@@ -147,6 +148,13 @@
@roleConfirm="roleConfirm" @roleConfirm="roleConfirm"
@roleCancle="roleCancle" @roleCancle="roleCancle"
/> />
<role-switch
v-show="popSetectBox"
ref="roleSwitch"
:roleList="type"
@roleConfirm="typeConfirm"
@roleCancle="typeCancle"
/>
</h-view> </h-view>
</template> </template>
<script> <script>
...@@ -163,6 +171,7 @@ export default { ...@@ -163,6 +171,7 @@ export default {
flag: true, flag: true,
isAGENT: false, isAGENT: false,
popSetect: false, // true:待提交或者审核未通过 popSetect: false, // true:待提交或者审核未通过
popSetectBox: false, // 弹出选择框
elecStatusDesceibe: '', elecStatusDesceibe: '',
user_bp_status: '', user_bp_status: '',
user_bp_class: '', user_bp_class: '',
...@@ -191,6 +200,16 @@ export default { ...@@ -191,6 +200,16 @@ export default {
bp_type_desc: '担保人', bp_type_desc: '担保人',
}, },
], ],
type: [
{
bp_type: '0',
bp_type_desc: '修改信息',
},
{
bp_type: '1',
bp_type_desc: '重新选择用户类型',
},
],
} }
}, },
watch: { watch: {
...@@ -302,15 +321,27 @@ export default { ...@@ -302,15 +321,27 @@ export default {
this.roleSwitchFlag = false this.roleSwitchFlag = false
console.log('选择后的角色为:' + role) console.log('选择后的角色为:' + role)
}, },
typeConfirm (e) { // 选择操作方式后
this.popSetectBox = false
if (e.bp_type === '0') {
this.changePageHead()
} else if (e.bp_type === '1') {
this.unBindSelext()
}
},
// 选择角色后取消 // 选择角色后取消
roleCancle () { roleCancle () {
this.roleSwitchFlag = false this.roleSwitchFlag = false
}, },
typeCancle () {
this.popSetectBox = false
},
// 监听用户状态 // 监听用户状态
watchBpStatus () { watchBpStatus () {
if (!this.bp_id && this.user_bp_status === 'NEW') { if (!this.bp_id && this.user_bp_status === 'NEW') {
this.description = '用户绑定' this.description = '用户绑定'
this.approveBtn = false this.approveBtn = false
this.popSetect = false
} else if (this.bp_id && this.user_bp_status === 'NEW') { } else if (this.bp_id && this.user_bp_status === 'NEW') {
this.description = '待提交' this.description = '待提交'
this.approveBtn = false this.approveBtn = false
...@@ -318,6 +349,7 @@ export default { ...@@ -318,6 +349,7 @@ export default {
} else if (this.bp_id && this.user_bp_status === 'APPROVED') { } else if (this.bp_id && this.user_bp_status === 'APPROVED') {
this.description = '解除绑定' this.description = '解除绑定'
this.approveBtn = true this.approveBtn = true
this.popSetect = false
} else if ( } else if (
(this.bp_id && this.user_bp_status === 'RETURN') || (this.bp_id && this.user_bp_status === 'RETURN') ||
(this.bp_id && this.user_bp_status === 'REJECT') (this.bp_id && this.user_bp_status === 'REJECT')
...@@ -328,6 +360,7 @@ export default { ...@@ -328,6 +360,7 @@ export default {
} else { } else {
this.description = '审批中' this.description = '审批中'
this.approveBtn = false this.approveBtn = false
this.popSetect = false
} }
}, },
// 我的发票 // 我的发票
...@@ -492,6 +525,46 @@ export default { ...@@ -492,6 +525,46 @@ export default {
}, },
}) })
}, },
unBindSelext () {
let vm = this
vm.popSetectBox = true
hlsPopup.showConfirm({
title: '提示',
content: '确定解除绑定?',
onConfirm: function (index) {
if (index === 1) {
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('解绑成功')
vm.userQuery()
vm.approveBtn = false
this.$router.push({
name: 'UserBind',
})
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
.catch(() => {
vm.hlsPopup.showLongCenter('传入参数异常')
})
}
},
})
},
unBind () { unBind () {
let vm = this let vm = this
hlsPopup.showConfirm({ hlsPopup.showConfirm({
......
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
<img src="@/assets/myInfo/modalClose.png" @click="roleCancle"> <img src="@/assets/myInfo/modalClose.png" @click="roleCancle">
</div> </div>
<div class="content-wrap"> <div class="content-wrap">
<div v-for="(item,index) in roleList" :key="index" :class="{'item-active':index === switchIndex}" class="role-item" @click="chooseRole(index)"> <div
v-for="(item,index) in roleList" :key="index" :class="{'item-active':index === switchIndex}" class="role-item"
@click="chooseRole(index)">
<span>{{ item.bp_type_desc }}</span> <span>{{ item.bp_type_desc }}</span>
</div> </div>
<div :class="{'content-btn-active':switchIndex !== ''}" class="content-btn"><span @click="roleConfirm">确定</span></div> <div :class="{'content-btn-active':switchIndex !== ''}" class="content-btn" @click="roleConfirm"><span>确定</span></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,15 +39,15 @@ export default { ...@@ -37,15 +39,15 @@ export default {
updated: function () { updated: function () {
}, },
methods: { methods: {
chooseRole(index){ chooseRole (index) {
this.switchIndex = index this.switchIndex = index
}, },
roleConfirm () { roleConfirm () {
if(this.switchIndex === ''){ if (this.switchIndex === '') {
}else { } else {
this.showFlag = false this.showFlag = false
this.$emit('roleConfirm',this.roleList[this.switchIndex]) this.$emit('roleConfirm', this.roleList[this.switchIndex])
} }
}, },
show () { show () {
......
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