Commit 10a95101 authored by 李晓兵's avatar 李晓兵

'增加经销商确认审批按钮'

parent 2cae3df9
...@@ -184,6 +184,33 @@ ...@@ -184,6 +184,33 @@
</item> </item>
</list-item> </list-item>
</h-content> </h-content>
<bottom-tab v-if="confirm_status!=='APPROVED'&&this.$route.params.hasButtom" class="footer-button">
<tab-button class="approve" @click.native="showModalValue=true">
<img src="@/assets/intoApproval/approve.png" >审批
</tab-button>
</bottom-tab>
<h-modal
v-if="confirm_status!=='APPROVED'&&this.$route.params.hasButtom" ref="modal" v-model="showModalValue" position="bottom">
<h-view>
<h-content class="approveContent">
<div class="approveBottom">
<span>
审批意见
<img src="@/assets/intoApproval/close1.png" @click="showModalValue=false" >
</span>
<textarea v-model="confirm_note" cols="8" rows="20" placeholder="请输入" />
</div>
</h-content>
<bottom-tab>
<tab-button class="reject" @click.native="showModalValue=true;charge('拒绝','REJECTED')">
<img src="@/assets/intoApproval/reject.png" >拒绝
</tab-button>
<tab-button class="same" @click.native="showModalValue=true;charge('同意','APPROVED')">
<img src="@/assets/intoApproval/approve.png" >同意
</tab-button>
</bottom-tab>
</h-view>
</h-modal>
</h-view> </h-view>
</template> </template>
...@@ -221,12 +248,15 @@ export default { ...@@ -221,12 +248,15 @@ export default {
}, },
data () { data () {
return { return {
showModalValue: false,
info: {}, info: {},
tabNum: 0, tabNum: 0,
baseInfo: {}, baseInfo: {},
bp_flag: false, bp_flag: false,
guarantorInfo: [], guarantorInfo: [],
bp_class: window.sessionStorage.getItem('bp_class'), bp_class: window.sessionStorage.getItem('bp_class'),
confirm_status: this.$route.params.confirm_status,
confirm_note: '',
} }
}, },
computed: {}, computed: {},
...@@ -343,10 +373,47 @@ export default { ...@@ -343,10 +373,47 @@ export default {
}, },
}) })
}, },
charge (val, status) {
this.hlsPopup.showConfirm({
title: '提示',
content: `您确认${val}吗?`,
onConfirm: (data) => {
console.log(data)
// if (val === '拒绝') {
// } else {
if (data) {
debugger
let vm = this
let url = process.env.basePath + 'do_confrim_bp'
let param = {
'master': {
confirm_id: vm.$route.params.confirm_id,
confirm_status: status,
confirm_note: vm.confirm_note,
},
}
vm.hlsPopup.showLoading('提交数据中!')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hlsPopup.showSuccess(`审批成功,已${val}`)
vm.$router.push({
name: 'ContractList',
})
} else {
vm.hlsPopup.showSuccess(res.message)
}
})
}
// }
},
})
},
}, },
} }
</script> </script>
<style lang='less' scoped> <style lang='less'>
#details { #details {
.h-header-btn { .h-header-btn {
img { img {
...@@ -538,5 +605,86 @@ export default { ...@@ -538,5 +605,86 @@ export default {
margin-left: 13px; margin-left: 13px;
} }
} }
.footer-button {
.approve {
width: 358.6px;
height: 44px;
background: #00469c;
border-radius: 4px;
color: #fff;
font-family: PingFangSC-Semibold;
font-size: 15px;
line-height: 20px;
letter-spacing: 10px;
img {
width: 16.8px;
height: 16.8px;
}
}
}
.approveContent {
position: absolute;
top: 50%;
background-color: #fafafa;
overflow-y: scroll;
}
.approveBottom {
width: 343px;
margin: 0 auto;
span {
display: block;
width: 100%;
font-family: PingFangSC-Semibold;
font-size: 15px;
color: #00469c;
height: 21px;
line-height: 21px;
margin: 16px 0;
img {
float: right;
}
}
textarea {
width: 343px;
height: 178px;
border-radius: 2px;
padding: 10px;
}
span::after {
content: "";
display: block;
position: relative;
left: 70px;
top: -17px;
width: 14px;
height: 14px;
background: url("../../assets/intoApproval/approv.png");
background-size: 14px 14px;
}
}
.reject,
.same {
width: 175px;
height: 40px;
border-radius: 4px;
font-family: PingFangSC-Semibold;
font-size: 15px;
img {
width: 13px;
height: 13px;
}
}
.reject {
color: #656464;
border: 1px solid #656464;
}
.same {
color: #ffffff;
background: #00469c;
border: 1px solid #00469c;
}
}
.modal {
background-color: rgba(0, 0, 0, 0) !important;
} }
</style> </style>
...@@ -131,6 +131,11 @@ export default { ...@@ -131,6 +131,11 @@ export default {
window.sessionStorage.setItem('project_id', item.project_id) window.sessionStorage.setItem('project_id', item.project_id)
this.$router.push({ this.$router.push({
name: 'ContractDetails', name: 'ContractDetails',
params: {
confirm_id: item.confirm_id,
confirm_status: item.confirm_status,
hasButtom: true,
},
}) })
}, },
getTabNum (i) { getTabNum (i) {
......
...@@ -100,11 +100,11 @@ export default { ...@@ -100,11 +100,11 @@ export default {
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
if (from.name === 'Login') { // if (from.name === 'Login') {
vm.imgList = [...functionState.bannerList] vm.imgList = [...functionState.bannerList]
vm.moduleSeparateList = [...functionState.moduleSeparateList] vm.moduleSeparateList = [...functionState.moduleSeparateList]
vm.userQuery() vm.userQuery()
} // }
}) })
}, },
updated: function () { updated: function () {
......
...@@ -318,10 +318,10 @@ ...@@ -318,10 +318,10 @@
</div> </div>
</h-content> </h-content>
<bottom-tab> <bottom-tab>
<tab-button class="reject" @click.native="showModalValue=true;confirm_status='REJECTED';charge('拒绝')"> <tab-button class="reject" @click.native="showModalValue=true;charge('拒绝','REJECTED')">
<img src="@/assets/intoApproval/reject.png" >拒绝 <img src="@/assets/intoApproval/reject.png" >拒绝
</tab-button> </tab-button>
<tab-button class="same" @click.native="showModalValue=true;confirm_status='APPROVED';charge('同意')"> <tab-button class="same" @click.native="showModalValue=true;charge('同意','APPROVED')">
<img src="@/assets/intoApproval/approve.png" >同意 <img src="@/assets/intoApproval/approve.png" >同意
</tab-button> </tab-button>
</bottom-tab> </bottom-tab>
...@@ -521,7 +521,7 @@ export default { ...@@ -521,7 +521,7 @@ export default {
} }
}, 10) }, 10)
}, },
charge (val) { charge (val, status) {
this.hlsPopup.showConfirm({ this.hlsPopup.showConfirm({
title: '提示', title: '提示',
content: `您确认${val}吗?`, content: `您确认${val}吗?`,
...@@ -536,18 +536,20 @@ export default { ...@@ -536,18 +536,20 @@ export default {
let param = { let param = {
'master': { 'master': {
confirm_id: window.sessionStorage.confirm_id, confirm_id: window.sessionStorage.confirm_id,
confirm_status: this.confirm_status, confirm_status: status,
confirm_note: this.confirm_note, confirm_note: this.confirm_note,
}, },
} }
vm.hlsPopup.showLoading('提交数据中!') vm.hlsPopup.showLoading('提交数据中!')
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.hlsPopup.showSuccess(`审批成功,已${val}`)
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.showSuccess(`审批成功,已${val}`)
vm.$router.push({ vm.$router.push({
name: 'IntoList', name: 'IntoList',
}) })
}else {
vm.hlsPopup.showSuccess(res.message)
} }
}) })
} }
......
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