Commit 6a33b62e authored by jiacheng.mao's avatar jiacheng.mao

[开发]电子合同模板替换开发

parent cb8eb3f2
......@@ -14,11 +14,12 @@
<div class="scroll-box">
<div v-for="item of list" :key="item.confirm_id" class="box">
<!-- 颜色 d6204b -->
<div class="name">
<div class="name" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis">
<!-- <img src="@/assets/login/contract.png" alt="icon" /> -->
<img src="@/assets/distributorSign/fileIcon.png" alt="icon" >
<!-- <img v-if="item.checked" src="@/assets/login/contract-red.png" alt="icon" /> -->
<span>{{ item.project_number }}</span>
<span>{{ item.templet_name }}</span>
</div>
<div
:class="['flag', item.checked ? 'flag-false' : null]"
......@@ -43,10 +44,8 @@ export default {
data () {
return {
prolists: [],
// title: this.$route.query.name === 'confirmList' ? '批量签署电子文件' : '批量签署电子文件',
// buttonName: this.$route.query.name === 'confirmList' ? '签署电子文件' : '签署电子文件',
title: this.$route.query.name === 'confirmList' ? '批量签署电子合同' : '批量签署征信授权书',
buttonName: this.$route.query.name === 'confirmList' ? '签署电子合同' : '签署征信授权',
title: this.$route.query.name === 'confirmList' ? '批量签署电子文件' : '批量签署电子文件',
buttonName: this.$route.query.name === 'confirmList' ? '签署电子文件' : '签署电子文件',
list: JSON.parse(window.localStorage.getItem('handleContact')),
checkList: [], // 需要进行签署的合同
......@@ -64,47 +63,10 @@ export default {
if (from.name === 'ElectronicSign') {
let url = process.env.basePath + 'batch_check_sign'
let data_class = vm.$route.query.name === 'confirmList' ? 'LEASE_ITEM' : 'PRJ_CONFIRM'
let param = { 'master': list.map(item => ({ confirm_id: item.confirm_id, data_class })) }
// let user_bp_type = JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_type
// console.log('~~~',user_bp_type === 'AGENT');
// if (user_bp_type === 'AGENT') param['content_type'] = 'PRODUCT_SALE_CONTRACT'
let param = { 'master': list.map(item => ({ confirm_id: item.confirm_id, data_class, content_id: item.content_id })) }
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
vm.hlsPopup.hideLoading()
// if (res.result === 'S') {
// let checkList = res.lists.filter(ele => ele.signed_flag === 'Y').map(ele => ele.confirm_id)
// let submitList = list.filter(ele => checkList.includes(ele.confirm_id))
// if (!submitList.length) return
// let confirm_list = submitList.map(item => ({ confirm_id: item.confirm_id, data_class, confirm_status: 'APPROVED' }))
// if (!confirm_list.length) return
// let url2 = process.env.basePath + 'batch_do_confirm_bp'
// let param2 = { master: { confirm_list } }
// hlsPopup.showLoading('提交数据中')
// let res2 = await vm.$post(url2, param2)
// vm.hlsPopup.hideLoading()
// if (res2.result === 'S') {
// vm.hlsPopup.showSuccess('提交成功')
// let successList = res2.info.filter(item => item.status === 'S').map(item => item.confirm_id)
// vm.list = vm.list.filter(item => !successList.includes(item.confirm_id))
// if (!vm.list.length) vm.goBack()
// window.localStorage.setItem('handleContact', JSON.stringify(vm.list))
// await vm.checkSigned()
// } else {
// this.hlsPopup.showLongCenter(res2.message)
// }
// } else {
// hlsPopup.showLongCenter(res.message)
// }
}
})
},
......@@ -116,7 +78,7 @@ export default {
let url = process.env.basePath + 'batch_check_sign'
let data_class = this.$route.query.name === 'confirmList' ? 'LEASE_ITEM' : 'PRJ_CONFIRM'
let param = { 'master': this.list.map(item => ({ confirm_id: item.confirm_id, data_class })) }
let param = { 'master': this.list.map(item => ({ confirm_id: item.confirm_id, data_class, content_id: item.content_id })) }
// let user_bp_type = JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_type
// if (user_bp_type === 'AGENT') param['content_type'] = 'PRODUCT_SALE_CONTRACT'
hlsPopup.showLoading('请稍候')
......@@ -124,14 +86,14 @@ export default {
this.hlsPopup.hideLoading()
if (res.result === 'S') {
let checkList = res.lists.filter(ele => ele.signed_flag === 'N').map(ele => ele.confirm_id)
let checkList = res.lists.filter(ele => ele.signed_flag === 'N').map(ele => ele.content_id)
this.checkList = this.list.filter(ele => checkList.includes(ele.confirm_id))
this.checkList = this.list.filter(ele => checkList.includes(ele.content_id))
window.localStorage.setItem('check_list', JSON.stringify(this.checkList))
// 加标识, checked为true 为 已签署
this.list = this.list.map(ele => {
ele.checked = !checkList.includes(ele.confirm_id)
ele.checked = !checkList.includes(ele.content_id)
return ele
})
console.log(this.list);
......@@ -153,7 +115,7 @@ export default {
// 提交
async submit () {
let data_class = this.$route.query.name === 'confirmList' ? 'LEASE_ITEM' : 'PRJ_CONFIRM'
let confirm_list = this.list.filter(item => item.checked).map(item => ({ confirm_id: item.confirm_id, data_class, confirm_status: 'APPROVED' }))
let confirm_list = this.list.filter(item => item.checked).map(item => ({ confirm_id: item.confirm_id, data_class, confirm_status: 'APPROVED', content_id: item.content_id }))
if (!confirm_list.length) return hlsPopup.showLongCenter('无可提交审核的合同')
let url = process.env.basePath + 'batch_do_confirm_bp'
......@@ -166,9 +128,9 @@ export default {
if (res.result === 'S') {
this.hlsPopup.showSuccess('提交成功')
let successList = res.info.filter(item => item.status === 'S').map(item => item.confirm_id)
let successList = res.info.filter(item => item.status === 'S').map(item => item.content_id)
this.list = this.list.filter(item => !successList.includes(item.confirm_id))
this.list = this.list.filter(item => !successList.includes(item.content_id))
if (!this.list.length) this.goBack()
......@@ -186,12 +148,10 @@ export default {
let data_class = this.$route.query.name === 'confirmList' ? 'LEASE_ITEM' : 'PRJ_CONFIRM'
let param = {
master: {
project_list: this.checkList.map(item => ({ project_id: item.project_id, data_class })),
project_list: this.checkList.map(item => ({ project_id: item.project_id, data_class, content_id: item.content_id })),
bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
},
}
// let user_bp_type = JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_type
// if (user_bp_type === 'AGENT') param.master['content_type'] = 'PRODUCT_SALE_CONTRACT'
hlsPopup.showLoading('请稍候')
let res = await this.$post(url, param)
this.hlsPopup.hideLoading()
......@@ -366,6 +326,8 @@ export default {
.flag {
height: 25px;
width: 60px;
text-align: center;
line-height: 25px;
padding: 0 2px;
border-radius: 5px;
......
......@@ -212,6 +212,7 @@ export default {
agentPic: '', // 经销商担保协议图片
bankPic: '', // 农行代扣授权书图片
legalPic: '', // 法人授权书图片
content_id: this.$route.query.content_id,
confirm_id: this.$route.query.confirm_id,
project_id: this.$route.query.project_id,
project_number: this.$route.query.project_number,
......@@ -288,6 +289,7 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'LEASE_ITEM',
content_id: vm.content_id,
}
vm.hlsPopup.showLoading('请稍候!')
let res = await vm.hlsHttp.post(url, param)
......@@ -313,7 +315,7 @@ export default {
} else if (vm.confirm_status === 'APPROVED') {
vm.flag = true
}
// }
})
},
......@@ -325,6 +327,7 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'LEASE_ITEM',
content_id: vm.content_id,
bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
}
hlsPopup.showLoading('请稍候')
......@@ -416,6 +419,7 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'LEASE_ITEM',
content_id: vm.content_id,
}
vm.hlsPopup.showLoading('请稍候!')
let res = await vm.hlsHttp.post(url, param)
......@@ -504,6 +508,7 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'LEASE_ITEM',
content_id: vm.content_id,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......
......@@ -40,6 +40,10 @@
合同金额
<span class="number">{{ item.total_price | currency }}</span>
</li>
<li>
签署文件
<span>{{ item.templet_name }}</span>
</li>
</ul>
</div>
</div>
......@@ -200,6 +204,7 @@ export default {
confirm_status: e.confirm_status,
check_id: e.check_id,
confirm_id: e.confirm_id,
content_id: e.content_id,
business_type: e.business_type,
// quotation_id: e.quotation_id,
project_number: e.project_number,
......@@ -383,7 +388,7 @@ export default {
}
.item {
width: 359px;
height: 148px;
height: 170px;
background-color: #fff;
border-radius: 2px;
margin: 0 auto;
......
......@@ -363,7 +363,7 @@
<input slot="content" readonly>
</item>
</list-item>
</h-content>
<bottom-tab class="add-box">
<tab-button v-if="!isReadOnly && !calculeFlag" class="before" @click.native="save">计算</tab-button>
......@@ -729,7 +729,7 @@ export default {
}
})
},
methods: {
methods: {
onSelect (value) {
let val = value.name
this.info[this.now_nodeName + '_n'] = val
......@@ -1165,6 +1165,11 @@ export default {
vm.saveInfo.penalty_rate = e.penalty_rate
vm.saveInfo.deposit_ratio = e.deposit_ratio
vm.saveInfo.deposit_ratio_n = e.deposit_ratio_n.replace('%', '')
//冬歇/雨歇起止日期
vm.saveInfo.fallow_date_f = e.fallow_date_f ? vm.dateFormat(e.fallow_date_f) : ''
vm.saveInfo.fallow_date_t = e.fallow_date_t ? vm.dateFormat(e.fallow_date_t) : ''
//首X期-期数
vm.saveInfo.lease_times_x = e.lease_times_x ? e.lease_times_x : ''
// vm.saveInfo.lease_times = e.lease_times
vm.saveInfo.lease_times = ''
......@@ -1949,6 +1954,11 @@ export default {
name: 'CreateEnclosureInfo',
})
},
dateFormat (timestamp) {
if (!timestamp) return '';
var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(timestamp);
return newDate[0];
}
}
,
}
......
......@@ -303,7 +303,7 @@
</h-content>
<bottom-tab v-if="con_confirm_status !== 'APPROVED'" class="add-box">
<tab-button v-if="!signFlag" class="before" @click.native="takePhonto">
<img src="@/assets/constractSigning/certification.png">征信签约
<img src="@/assets/constractSigning/certification.png">签署电子文件
</tab-button>
<tab-button v-else class="next" @click.native="inSure">
<img src="@/assets/intoApproval/approve.png">提交审核
......@@ -456,6 +456,7 @@ export default {
vm.tabNum = vm.$route.params.num
vm.confirm_note = '' // 审批意见
vm.num = 0 // 进入详情显示基本信息
vm.content_id = vm.$route.params.item.content_id
vm.bp_name = vm.$route.params.item.bp_name
vm.user_bp_type = vm.$route.params.user_bp_type || (JSON.parse(window.localStorage.getItem('now_user_bp_bind_id'))).bp_type
vm.auth_credit_flag = vm.$route.params.item.auth_credit_flag // 征信授权书确认状态
......@@ -508,6 +509,7 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'PRJ_CONFIRM',
content_id: vm.content_id,
}
let res = await vm.hlsHttp.post(url, param)
hlsPopup.hideLoading()
......@@ -567,6 +569,7 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'PRJ_CONFIRM',
content_id: vm.content_id,
}
let res = await vm.hlsHttp.post(url, param)
hlsPopup.hideLoading()
......@@ -618,9 +621,9 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'PRJ_CONFIRM',
bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
content_id: vm.content_id,
}
if (vm.user_bp_type === 'AGENT') param['content_type'] = 'PRODUCT_SALE_CONTRACT'
// if (vm.user_bp_type === 'AGENT') param['content_type'] = 'PRODUCT_SALE_CONTRACT'
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(res => {
hlsPopup.hideLoading()
......@@ -634,16 +637,15 @@ export default {
}
})
},
// 征信授权书
// 电子合同
getBook() {
let vm = this
let url = process.env.basePath + 'get_content_app'
let param = {
confirm_id: vm.confirm_id,
data_class: 'PRJ_CONFIRM',
bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
content_id: vm.content_id,
}
if (vm.user_bp_type === 'AGENT') param['content_type'] = 'PRODUCT_SALE_CONTRACT'
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(res => {
hlsPopup.hideLoading()
......@@ -723,8 +725,8 @@ export default {
let param = {
confirm_id: vm.confirm_id,
data_class: 'PRJ_CONFIRM',
content_id: vm.content_id,
}
if (vm.user_bp_type === 'AGENT') param['content_type'] = 'PRODUCT_SALE_CONTRACT'
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
......@@ -760,7 +762,7 @@ export default {
async takePhonto() {
let vm = this
if (!vm.isReadFlag) {
vm.hlsPopup.showLongCenter('请先阅读征信授权书')
vm.hlsPopup.showLongCenter('请先阅读电子文件')
return
}
vm.goElectronicSign()
......
......@@ -69,6 +69,10 @@
<p>申请时间</p>
<p>{{ dateConverse(item.confirm_start_date) }}</p>
</div>
<div>
<p>签署文件</p>
<p>{{ item.templet_name }}</p>
</div>
</div>
</div>
</div>
......@@ -82,8 +86,7 @@
<span :style="{ color: chooseAll ? '#1d3fff' : 'rgb(212,214,212)' }">全选</span>
</div>
<button class="cancel" @click="cancelRadio">× 取消批量</button>
<!-- <button class="sign" @click="signContract">签订电子文件</button> -->
<button class="sign" @click="signContract">签订征信授权书</button>
<button class="sign" @click="signContract">签订电子文件</button>
</div>
<div v-show="num == 1 && !isRadio" class="button-box">
......
......@@ -10,7 +10,7 @@
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$routeGo()">
<img src="@/assets/userBind/arrow.png">
<span>签约详情g</span>
<span>签约详情</span>
</div>
</h-header>
<Tab :tabNums="tabNum" @getTabNum="getTabNum" />
......
......@@ -359,7 +359,7 @@ export default {
conSign () {
// .首付还款、租金还款、融租方案确认需对业务经理角色做控制,点击无法进入,提示“当前角色非承租人或担保人,无法使用该功能!”
if (this.user_bp_type === 'MANAGER') {
hlsPopup.showLongCenter('当前角色非承租人或担保人,无法使用该功能!')
hlsPopup.showLongCenter('仅限承租人,担保人以及经销商使用!')
return
}
if (this.bp_id) {
......@@ -899,7 +899,7 @@ export default {
img {
height: 15px;
width: 15px;
}
}
}
.name-title {
......
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