Commit 547e629c authored by 786817560's avatar 786817560

'销售接口调试'

<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-09-29 10:02:11 * @Date: 2019-09-29 10:02:11
* @LastEditTime: 2019-12-20 14:02:10 * @LastEditTime: 2019-12-20 17:03:56
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
--> -->
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</item> </item>
</list-item> </list-item>
<list-item :item-height="44" class="second-part"> <list-item v-if="false" :item-height="44" class="second-part">
<item :showArrow="true"> <item :showArrow="true">
<div slot="name" class="font-color">承租人</div> <div slot="name" class="font-color">承租人</div>
<span slot="content">{{ '请选择' }}</span> <span slot="content">{{ '请选择' }}</span>
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</list-item> </list-item>
</h-content> </h-content>
<bottom-tab> <bottom-tab>
<tab-button class="footer"> <tab-button class="footer" @click.native="confirmCreate">
确认创建 确认创建
</tab-button> </tab-button>
</bottom-tab> </bottom-tab>
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
> >
<div class="wrap"> <div class="wrap">
<div v-for="(item,index) in showLists" :key="index" class="contract-lists" > <div v-for="(item,index) in showLists" :key="index" class="contract-lists" >
<div class="box" @click="pickLessee(item.bp_name)"> <div class="box" @click="pickLessee(item)">
<img src="@/assets/distributorSign/fileIcon.png" alt="" class="file-icon"> <img src="@/assets/distributorSign/fileIcon.png" alt="" class="file-icon">
<div><p>承租人名称</p><p>{{ item.bp_name }}</p></div> <div><p>承租人名称</p><p>{{ item.bp_name }}</p></div>
<div><p>证件号</p><p>{{ item.bp_id_card_no }}</p></div> <div><p>证件号</p><p>{{ item.bp_id_card_no }}</p></div>
...@@ -185,6 +185,13 @@ export default { ...@@ -185,6 +185,13 @@ export default {
bp_agent_id: '', // 经销商id bp_agent_id: '', // 经销商id
bp_agent_name: '', // 经销商名称 bp_agent_name: '', // 经销商名称
salesInfo: { salesInfo: {
bp_id_tenant: '', // 承租人id
business_type: '', // 业务类型
bp_id_agent: '', // 经销商id
bp_user_id: '', // 业务员id
office_id: '', // 办事处id
factory: '', // 主机厂id
manu_manager: '', // 办事处业务员
dates: '请选择', dates: '请选择',
}, },
} }
...@@ -199,6 +206,7 @@ export default { ...@@ -199,6 +206,7 @@ export default {
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
if (from.name === 'ContractCreateList') {
vm.showModal = false vm.showModal = false
vm.lessee = '' vm.lessee = ''
vm.business = '' vm.business = ''
...@@ -207,9 +215,20 @@ export default { ...@@ -207,9 +215,20 @@ export default {
vm.bp_agent_id = '' vm.bp_agent_id = ''
vm.bp_agent_name = '' vm.bp_agent_name = ''
vm.sales = window.localStorage.bp_name vm.sales = window.localStorage.bp_name
vm.salesInfo = {
bp_id_tenant: '', // 承租人id
business_type: '', // 业务类型
bp_id_agent: '', // 经销商id
bp_user_id: '', // 业务员id
office_id: '', // 办事处id
factory: '', // 主机厂id
manu_manager: '', // 办事处业务员
dates: '请选择',
}
vm.businessQuery() vm.businessQuery()
vm.agentQuery() vm.agentQuery()
vm.factoryQuery() vm.factoryQuery()
}
}) })
}, },
methods: { methods: {
...@@ -268,6 +287,7 @@ export default { ...@@ -268,6 +287,7 @@ export default {
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.business = obj.business_type_n vm.business = obj.business_type_n
vm.salesInfo.business_type = obj.business_type
}, },
}) })
}, },
...@@ -285,6 +305,7 @@ export default { ...@@ -285,6 +305,7 @@ export default {
if (res.result === 'S') { if (res.result === 'S') {
vm.bp_agent_name = res.info.bp_agent_name vm.bp_agent_name = res.info.bp_agent_name
vm.bp_agent_id = res.info.bp_agent_id vm.bp_agent_id = res.info.bp_agent_id
vm.salesInfo.bp_id_agent = res.info.bp_agent_id
vm.lesseeQuery() vm.lesseeQuery()
vm.salesQuery() vm.salesQuery()
vm.officeQuery() vm.officeQuery()
...@@ -320,6 +341,7 @@ export default { ...@@ -320,6 +341,7 @@ export default {
code: 'factory_type', code: 'factory_type',
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.salesInfo.factory = obj.factory_type
vm.factory_name = obj.factory_type_n vm.factory_name = obj.factory_type_n
}, },
}) })
...@@ -386,6 +408,7 @@ export default { ...@@ -386,6 +408,7 @@ export default {
code: 'office_type', code: 'office_type',
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.salesInfo.office_id = obj.office_type
vm.office_name = obj.office_type_n vm.office_name = obj.office_type_n
}, },
}) })
...@@ -414,13 +437,30 @@ export default { ...@@ -414,13 +437,30 @@ export default {
this.showModal = true this.showModal = true
}, },
// 选择承租人 // 选择承租人
pickLessee (val) { pickLessee (item) {
this.lessee = val this.lessee = item.bp_name
this.salesInfo.bp_id_tenant = item.bp_id
this.showModal = false this.showModal = false
}, },
hideModal () { hideModal () {
this.showModal = false this.showModal = false
}, },
// 销售信息保存
confirmCreate () {
let vm = this
let url = process.env.basePath + 'prj_sales_info_save'
let param = {
master: vm.salesInfo,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
console.log('销售信息保存', res)
if (res.result === 'S') {
hlsPopup.showLongCenter('创建成功!')
}
})
},
}, },
} }
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: 合同详情 * @Description: 合同详情
* @Author: your name * @Author: your name
* @Date: 2019-09-25 15:38:21 * @Date: 2019-09-25 15:38:21
* @LastEditTime: 2019-11-28 17:42:24 * @LastEditTime: 2019-12-20 15:36:19
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -167,6 +167,16 @@ ...@@ -167,6 +167,16 @@
</list-item> </list-item>
</h-content> </h-content>
<bottom-tab v-show="confirm_status!=='APPROVED'&&tabNum === 0" class="footer-button">
<tab-button class="approve" @click.native="goBodyCheck">
活体检测
</tab-button>
</bottom-tab>
<bottom-tab v-show="confirm_status!=='APPROVED'&&tabNum === 0" class="footer-button">
<tab-button class="approve" @click.native="goElectronicSign">
电子签
</tab-button>
</bottom-tab>
<bottom-tab v-if="confirm_status!=='APPROVED'" class="footer-button"> <bottom-tab v-if="confirm_status!=='APPROVED'" class="footer-button">
<tab-button class="approve" @click.native="contractConfirm('APPROVED')"> <tab-button class="approve" @click.native="contractConfirm('APPROVED')">
确认签约 确认签约
...@@ -250,6 +260,33 @@ export default { ...@@ -250,6 +260,33 @@ export default {
created () {}, created () {},
methods: methods:
{ {
goBodyCheck () { // 活体检测
this.$router.push({
name: 'BodyCheck',
})
},
goElectronicSign () { // 电子签
let vm = this
let url = process.env.basePath + 'get_sign_url'
let param = {
confirm_id: vm.confirm_id,
data_class: 'PRJ_PROJECT',
}
vm.hlsPopup.showLoading('请稍后')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.info.msg === 'success') {
vm.$router.push({
name: 'ElectronicSign',
params: {
url: res.info.data.url,
},
})
} else {
vm.hlsPopup.showLongCenter(res.info.msg)
}
})
},
// 签约确认 // 签约确认
contractConfirm (status) { contractConfirm (status) {
let vm = this let vm = this
...@@ -766,6 +803,32 @@ export default { ...@@ -766,6 +803,32 @@ export default {
} }
} }
} }
.footer-button:nth-of-type(1) {
bottom: 92px;
.approve {
width: 358.6px;
height: 44px;
background: @headerColor;
border-radius: 4px;
color: #fff;
font-family: PingFangSC-Semibold;
font-size: 15px;
line-height: 20px;
}
}
.footer-button:nth-of-type(2) {
bottom: 46px;
.approve {
width: 358.6px;
height: 44px;
background: @headerColor;
border-radius: 4px;
color: #fff;
font-family: PingFangSC-Semibold;
font-size: 15px;
line-height: 20px;
}
}
.approveContent { .approveContent {
position: absolute; position: absolute;
top: 50%; top: 50%;
......
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