Commit 210ed296 authored by 白日依山山山's avatar 白日依山山山

新增客户准入审批流,批量签约后自动审批;20节点添加可编辑

parent 3031b72b
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_DEV&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"3.6.11"'
currentVersion: '"3.7.6"'
}
......@@ -66,6 +66,9 @@ import Jmessage from './scripts/jmessageService'
if (process.env.CONFIG_ENV === 'uat') {
const VConsole = require('vconsole')
new VConsole() // eslint-disable-line
}else if(process.env.CONFIG_ENV === 'dev'){
const VConsole = require('vconsole')
new VConsole() // eslint-disable-line
}
Vue.use(componentInstall)
Vue.use(components)
......
......@@ -12,7 +12,7 @@
<img src="@/assets/contractCreate/hint.png" >提示: 仅签署列表中状态为“未签署”的合同
</div>
<div class="scroll-box">
<div v-for="item of list" :key="item.project_id" class="box">
<div v-for="item of list" :key="item.confirm_id" class="box">
<!-- 颜色 d6204b -->
<div class="name">
<!-- <img src="@/assets/login/contract.png" alt="icon" /> -->
......@@ -54,6 +54,56 @@ export default {
created () {
this.checkSigned()
},
beforeRouteEnter (to, from, next) {
next(async vm => {
// window.localStorage.setItem('check_list', this.checkList)
let list = JSON.parse(window.localStorage.getItem('check_list'))
console.log('!@#', list)
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 })) }
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)
}
// vm.confirm()
}
})
},
methods: {
// 检测已经签署的合同,进行过滤
async checkSigned () {
......@@ -72,12 +122,14 @@ export default {
let checkList = res.lists.filter(ele => ele.signed_flag === 'N').map(ele => ele.confirm_id)
this.checkList = this.list.filter(ele => checkList.includes(ele.confirm_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)
return ele
})
console.log(this.list);
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -125,12 +177,11 @@ export default {
// 签署
async signContact () {
if (!this.checkList.length) return hlsPopup.showLongCenter('无可需要签署的电子合同')
let url = process.env.basePath + 'batch_sign'
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, contract_id: item.contract_id, data_class })),
bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
},
}
......@@ -138,7 +189,7 @@ export default {
hlsPopup.showLoading('请稍候')
let res = await this.$post(url, param)
this.hlsPopup.hideLoading()
console.log('batch_sign接口返回信息:', res)
if (res.result === 'S' && res.info.msg === 'success') {
this.$router.push({
name: 'ElectronicSign',
......@@ -169,7 +220,7 @@ export default {
let filePath = JSON.stringify(success.message, '\\', null)
filePath = 'file:\/\/' + filePath.replace('\"', '')
filePath = filePath.substr(0, filePath.length - 1)
console.log('filePath ==== ' + filePath)
// console.log('filePath ==== ' + filePath)
// 回调成功上传图片
vm.uploadImg(filePath)
vm.signContact()
......
......@@ -71,7 +71,7 @@
<list-item :item-height="44">
<item>
<div slot="name">合同号</div>
<input slot="content" v-model="info.project_number" readonly placeholder="暂无数据" >
<input slot="content" v-model="project_number" readonly placeholder="暂无数据" >
</item>
<item>
<div slot="name">{{ info.bp_agent_name?'经销商':'办事处' }}</div>
......@@ -173,13 +173,14 @@
</div>
</h-content>
<bottom-tab v-if="!flag">
<tab-button class="before" @click.native="takePhonto">
<tab-button v-if="!signFlag" class="before" @click.native="takePhonto">
<img src="@/assets/constractSigning/certification.png" >签署合同
</tab-button>
<tab-button class="approve" @click.native="isConfirm">提交审核</tab-button>
<tab-button v-else class="approve" @click.native="isConfirm">提交审核</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
import Tab from '@/pages/carConfirm/tab'
......@@ -213,6 +214,7 @@ export default {
legalPic: '', // 法人授权书图片
confirm_id: this.$route.query.confirm_id,
project_id: this.$route.query.project_id,
project_number: this.$route.query.project_number,
readed: require('@/assets/constractSigning/read.png'), // 已读
unRead: require('@/assets/constractSigning/unread.png'), // 未读
tabNum: 0,
......@@ -254,6 +256,8 @@ export default {
contract_id: '231',
},
],
signFlag: false,
isReadFlag: false,
}
},
// created () {
......@@ -270,8 +274,34 @@ export default {
// }
// },
beforeRouteEnter (to, from, next) {
next(vm => {
next(async vm => {
if (from.name === 'ConfirmList') {
window.localStorage.removeItem('confirm_id')
window.localStorage.removeItem('project_id')
window.localStorage.setItem('confirm_id', vm.$route.query.confirm_id)
window.localStorage.setItem('project_id', vm.$route.query.project_id)
}
vm.confirm_id = window.localStorage.getItem('confirm_id')
vm.project_id = window.localStorage.getItem('project_id')
if (from.name === 'ElectronicSign') {
let url = process.env.basePath + 'sign_check'
let param = {
confirm_id: vm.confirm_id,
data_class: 'LEASE_ITEM',
}
vm.hlsPopup.showLoading('请稍候!')
let res = await vm.hlsHttp.post(url, param)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.signFlag = true
await vm.confirm()
} else {
vm.signMsg = res.message
vm.signFlag = false
}
}
// if (from.name === 'ContractRepayPlan') {
vm.signCheck()
vm.getDetail()
vm.getEquipment()
vm.getAttachment()
......@@ -282,6 +312,7 @@ export default {
} else if (vm.confirm_status === 'APPROVED') {
vm.flag = true
}
// }
})
},
......@@ -300,6 +331,7 @@ export default {
hlsPopup.hideLoading()
if (res.result === 'S') {
vm.attachArray = res.attachments
vm.isReadFlag = res.attachments[0].read_status === 'Y'
} else {
vm.hlsPopup.showLongCenter(res.message)
}
......@@ -312,6 +344,7 @@ export default {
params: {
product_num: vm.info.product_num,
project_id: vm.project_id,
quotation_id: vm.$route.query.quotation_id,
},
})
},
......@@ -337,6 +370,7 @@ export default {
temp.read_status = 'Y'
vm.$router.push({name: 'previewPdf', params: {attachUrl: vm.attachUrl}})
vm.attachArray.splice(vm.attachArray[index], 1, temp)
vm.isReadFlag = true
} else {
vm.hlsPopup.showLongCenter(res.message)
}
......@@ -368,7 +402,7 @@ export default {
window.localStorage.access_token
} else {
vm.vehicleImg = ''
}
}takePhonto
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -386,9 +420,11 @@ export default {
let res = await vm.hlsHttp.post(url, param)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.signFlag = true
return true
} else {
vm.signMsg = res.message
vm.signFlag = false
return false
}
},
......@@ -397,6 +433,10 @@ export default {
},
async takePhonto () {
let vm = this
if (!vm.isReadFlag) {
vm.hlsPopup.showLongCenter('请先阅读签约合同!')
return
}
let flag = await this.signCheck()
if (flag) {
vm.hlsPopup.showLongCenter('已经验证过!')
......@@ -608,6 +648,7 @@ export default {
let url = process.env.basePath + 'car_equip_list_query'
let param = {
project_id: vm.project_id,
quotation_id: vm.$route.params.quotation_id,
pagesize: 999,
pagenum: 1,
}
......@@ -644,6 +685,8 @@ export default {
let url = process.env.basePath + 'con_contract_detial'
let param = {
project_id: vm.project_id,
quotation_id: vm.$route.query.quotation_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......
......@@ -201,6 +201,8 @@ export default {
check_id: e.check_id,
confirm_id: e.confirm_id,
business_type: e.business_type,
quotation_id: e.quotation_id,
project_number: e.project_number,
},
})
},
......
......@@ -129,6 +129,7 @@ export default {
let url = process.env.basePath + 'prj_cashflow_query'
let param = {
project_id: vm.project_id,
quotation_id: vm.$route.query.quotation_id,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
......
......@@ -18,7 +18,7 @@
</div>
<!-- 搜索 -->
<div class="search">
<input v-model="searchInput" type="text" placeholder="请输入合同号/承租人名称" >
<input v-model="searchInput" type="text" placeholder="请输入方案号/承租人名称" >
</div>
<scroll ref="scroll" :updateData="[showLists]" :pullUp="true" @pullingUp="loadMore">
......@@ -189,6 +189,7 @@ export default {
methods: {
signContract () {
let list = this.showLists.filter(item => item.checked)
console.log(list)
if (!list.length) return hlsPopup.showLongCenter('请选择合同')
if (list.findIndex(item => item.read_check === 'N') > -1) return hlsPopup.showLongCenter('您有授权书未阅读,请阅读后再签署')
......
......@@ -124,7 +124,7 @@
<div slot="name">合同号</div>
<input
slot="content"
v-model="detail.project_number"
v-model="project_number"
readonly
placeholder="暂无数据"
>
......@@ -414,6 +414,7 @@ export default {
downNum: false,
show: false,
project_id: this.$route.query.project_id,
project_number: this.$route.query.project_number,
read: false, // 表示只读
showDate: '',
flag: false,
......
......@@ -159,6 +159,7 @@ export default {
query: {
project_id: e.project_id,
car_start_status: e.car_start_status,
project_number: e.project_number,
},
})
},
......
<!-- 附件 -->
<template>
<div style="width: 100%;">
<p class="notice">tips:点击上传目录即可上传,点击文件即可下载或预览。</p>
<div class="table-box">
<table class="att_table">
<tr>
<th>上传目录</th>
<th>附件</th>
<th>备注</th>
</tr>
<tr v-for="(item, index) of appendixData" :key="item.check_id">
<td @click="chooseFile(item.check_id)">{{ item.description }}</td>
<td>
<span v-for="(attach, ai) in item.attachArr" :key="attach.attachId" @click="previewOrDownload(attach)">
{{ attach.fileName + (ai === item.attachArr.length - 1 ? '' : ',') }}
</span>
</td>
<td>{{ item.note }}</td>
</tr>
</table>
</div>
</div>
</template>
<script>
export default {
props: ['appendixData'],
data() {
return {
licenseImg: '',
}
},
methods: {
previewOrDownload(attObj) {
let picUrl = `${process.env.filePath}attachment_id=${attObj.attachId}&access_token=${window.localStorage.access_token}`
if (/.png|.jpg$/.test(attObj.fileName)) {
this.showBigPicture(picUrl)
} else {
console.log(hlsUtil.convertImageUrl(picUrl));
window.open(hlsUtil.convertImageUrl(picUrl))
}
console.log(attObj);
},
// 上传窗口
chooseFile(check_id) {
let vm = this
hlsPopup.showActionSheet({
titleText: '请选择照片',
buttonArray: ['拍照', '从相册取'],
callback: index => {
if (index === 0) {
vm.openCamera(check_id)
} else {
vm.takePicture(check_id)
}
},
})
},
openCamera(check_id) {
let vm = this
let cameraoptions = {
quality: 60,
width: 1843,
height: 1382,
}
let success = function (imgdata) {
if (!imgdata) {
hlsPopup.showLongCenter('请拍照')
} else {
vm.licenseImg = hlsUtil.convertImageUrl(imgdata)
let list = [{
pkvalue: check_id,
source_type: "PRJ_CDD_ITEM_CHECK",
picture: '',
filePath: imgdata,
attachment_id: '',
user_id: 1,
fileName: ''
}]
vm.save_file(list)
}
}
let error = function () {
hlsPopup.showLongCenter('请拍照')
}
hlsUtil.openCamera(cameraoptions, success, error)
},
takePicture(check_id) {
let vm = this
var cameraoptions = {
quality: 70,
width: 1843,
height: 1382,
maxCount: 1,
}
let success = function (imgUrl) {
if (imgUrl.length === 0) {
hlsPopup.showLongCenter('请选择一张图片')
} else {
vm.licenseImg = hlsUtil.convertImageUrl(imgUrl[0])
let list = [{
pkvalue: check_id,
source_type: "PRJ_CDD_ITEM_CHECK",
picture: '',
filePath: imgUrl[0],
attachment_id: '',
user_id: 1,
fileName: ''
}]
vm.save_file(list)
}
}
let error = function () {
hlsPopup.showLongCenter(error)
}
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
// 图片保存
save_file(list) {
let vm = this
let upView = vm.debounce(function () { vm.$emit("upData") }, 1500)
if (list.length) {
// hlsPopup.showLoading('图片上传请稍候')
var alreadyUploadNum = 0
var attLength = 0
var recordUploadInterval = setInterval(function () {
if (alreadyUploadNum === attLength) {
clearInterval(recordUploadInterval)
/* hlsPopup.hideLoading()
hlsPopup.showLongCenter('图片上传成功') */
}
}, 500)
for (var i = 0; i < list.length; i++) {
let uploadSuccess = function (res) {
if (res.result === 'S') {
alreadyUploadNum++
for (var j = 0; j < list.length; j++) {
if (list[j].filePath === res.response.filePath) {
list[j].attachment_id = res.response.attachment_id
break
}
}
upView()
} else {
hlsPopup.hideLoading()
}
}
if (!list[i].attachment_id) {
attLength++
console.log(list[i])
hlsUtil.fileUploadSvc(list[i], uploadSuccess)
}
}
} else {
hlsPopup.hideLoading()
}
},
// 查看图片
showBigPicture(picUrl) {
let vm = this
vm.hlsPopup.showBigPicture({ imgUrl: picUrl, width: '100%', })
},
debounce(func, wait) {
let timer;
return function () {
let context = this; // 注意 this 指向
let args = arguments; // arguments中存着e
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
func.apply(this, args)
}, wait)
}
}
}
}
</script>
<style lang="less" scoped>
.notice {
padding: 10px 10px;
background-color: #fffbe8;
color: #ed6a0c;
font-size: 14px;
font-family: PingFangSC-Semibold;
}
.table-box {
width: 100vw;
overflow-x: auto;
}
.att_table {
min-width: 100%;
font-family: PingFangSC-Semibold;
font-size: 14px;
line-height: 32px;
color: #02459a;
td,
th {
box-sizing: border-box;
padding: 3px 5px;
border: 1px solid #ccc;
text-align: center;
height: 32px;
min-width: 100px;
}
th {
height: 25px;
line-height: 25px;
font-weight: 600;
}
}
</style>
\ No newline at end of file
<template>
<list-item :item-height="44">
<div>
<div slot="name" class="section-title" style="">车辆行驶证</div>
<item v-for="(ele, i) of driving_permit" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ car[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ car[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ car[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ car[ele.prop] }}</span>
</item>
</div>
<div>
<div slot="name" class="section-title" style="">房产证</div>
<item v-for="(ele, i) of house_card" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ house[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ house[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ house[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ house[ele.prop] }}</span>
</item>
</div>
<div>
<div slot="name" class="section-title" style="">不动产权证</div>
<item v-for="(ele, i) of real_est" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ real[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ real[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ real[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ real[ele.prop] }}</span>
</item>
</div>
</list-item>
</template>
<script>
export default {
props: ['car', 'house', 'real'],
data () {
return {
}
},
computed: {
driving_permit () {
return this.createForm()
},
house_card () {
return this.createFormHouse()
},
real_est () {
return this.createFormReal()
},
},
methods: {
factory (arr) {
let outArr = []
if (arr.length) {
arr.forEach(ele => {
let [title, prop, type] = ele
outArr.push({
title: title || '',
prop: prop || 'fdf',
type: type || 'text',
})
})
}
return outArr
},
createForm () {
let driving_permit = [
// 车辆行驶证
['车辆识别代号', 'vehicle_identify_num', 'text'],
['住址', 'address', 'text'],
['品牌型号', 'brand_model_number', 'text'],
['发证日期', 'start_date', 'date'],
['车辆类型', 'vehicle_type', 'text'],
['所有人', 'owner', 'text'],
['发动机号码', 'engine_number', 'text'],
['号牌号码', 'plate_number', 'text'],
['注册日期', 'regist_date', 'date'],
['数量', 'words_result_num', 'text'],
]
return this.factory(driving_permit)
},
createFormHouse () {
let arr = [
// 房产证
['房屋所有人', 'house_owner', 'text'],
['共有情况', 'public_situation', 'text'],
['房屋坐落', 'house_location', 'text'],
['登记时间', 'regist_date', 'date'],
['房屋性质', 'house_property', 'text'],
['规划用途', 'plan_purpose', 'text'],
['总层数', 'house_layers', 'text'],
['建筑面积', 'built_area', 'text'],
['套内建筑面积', 'built_in_area', 'text'],
['其他', 'others', 'text'],
['地号', 'land_number', 'text'],
['土地使用权取得方式', 'land_get_method', 'text'],
['土地使用年限', 'land_use_limit', 'text'],
]
return this.factory(arr)
},
createFormReal () {
let arr = [
// 不动产权证
['权利人', 'right_person', 'text'],
['共有情况', 'public_situation', 'text'],
['坐落', 'house_location', 'text'],
['不动产单元号', 'real_unit_number', 'text'],
['权利类型', 'right_type', 'text'],
['权利性质', 'right_property', 'text'],
['用途', 'house_purpose', 'text'],
['面积', 'house_area', 'text'],
['使用期限', 'land_use_limit', 'text'],
['权利其他情况', 'right_others', 'text'],
]
return this.factory(arr)
},
},
}
</script>
<style lang="less" scoped>
.section-title{
padding: 0 0 0 0.3rem;
font-size: 0.3rem;
color: black;
line-height: 0.5rem;
margin-top: 12px;
}
</style>
<template>
<list-item :item-height="44">
<div>
<!-- <div slot="name" class="section-title" style="">银行信息</div> -->
<item v-for="(ele, i) of formdata" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ bankInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ bankInfo[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ bankInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<Checkbox v-else-if="ele.type === 'checkbox'" :value="bankInfo[ele.prop]==='Y'" shape="square"/>
<span v-else slot="content">{{ bankInfo[ele.prop] }}</span>
</item>
</div>
</list-item>
</template>
<script>
import { Checkbox } from 'vant'
import 'vant/lib/checkbox/style'
export default {
props: ['bankInfo'],
components: {
Checkbox
},
data() {
return {
activeNames: [0],
// formdata: [],
}
},
computed: {
formdata () {
return this.createForm()
},
},
methods: {
factory (arr) {
let outArr = []
if (arr.length) {
arr.forEach(ele => {
let [title, prop, type] = ele
outArr.push({
title: title || '',
prop: prop || 'fdf',
type: type || 'text',
})
})
}
return outArr
},
createForm() {
let formArr = [
['账号名称', 'bank_account_name', 'text'],
['银行账号', 'bank_account_num', 'text'],
['支行名称', 'bank_branch_name', 'text'],
['银行名称', 'bank_full_name', 'text'],
['启用', 'enabled_flag', 'checkbox'],
]
return this.factory(formArr)
}
}
}
</script>
<style lang="less" scoped></style>
\ No newline at end of file
<!-- 基本信息 -->
<template>
<list-item :item-height="44">
<div>
<div slot="name" class="section-title" style="">基本信息</div>
<item v-for="(ele, i) of formdata" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
<div>
<div slot="name" class="section-title" style="">配偶信息</div>
<item v-for="(ele, i) of formdata_sp" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
<div v-if="['TENANT', 'GUTA'].indexOf(baseInfo.bp_type)!==-1">
<div slot="name" class="section-title" style="">资质信息</div>
<item v-for="(ele, i) of formdata_quality" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
</list-item>
</template>
<script>
export default {
props: ['baseInfo'],
data () {
return {
}
},
computed: {
formdata () {
return this.createForm()
},
formdata_sp () {
return this.createForm_SP()
},
formdata_quality () {
return this.createForm_quality()
},
},
methods: {
factory (arr) {
let outArr = []
if (arr.length) {
arr.forEach(ele => {
let [title, prop, type] = ele
outArr.push({
title: title || '',
prop: prop || 'fdf',
type: type || 'text',
})
})
}
return outArr
},
createForm () {
let baseInfo_A = [// 承租人/担保人
['姓名', 'bp_name', 'text'],
['学历', 'academic_background_n', 'text'],
['婚姻状况', 'marital_status_n', 'text'],
['身份证', 'id_card_no', 'text'],
['证件有效期从', 'id_card_date_from', 'date'],
['证件有效期到', 'id_card_date_to', 'date'],
['业务办理地(省)', 'province_n', 'text'],
['业务办理地(市)', 'city_n', 'text'],
['业务办理地(区/县)', 'district_n', 'text'],
['邮政编码', 'post_code', 'text'],
['所属机构名称', 'agent_name', 'text'],
['所属机构代码', 'business_license_num', 'text'],
['手机号', 'cell_phone', 'text'],
['QQ号', 'qq_code', 'text'],
['微信号', 'wechat_code', 'text'],
['户籍地址', 'address_on_resident_booklit', 'text'],
['联系地址', 'living_address', 'text'],
['资产', 'capital', 'text'],
]
let baseInfo_B = [// 经销商/主机厂/办事处
['姓名', 'bp_name', 'text'],
['学历', 'academic_background_n', 'text'],
['婚姻状况', 'marital_status_n', 'text'],
['身份证', 'id_card_no', 'text'],
['证件有效期从', 'id_card_date_from', 'date'],
['证件有效期到', 'id_card_date_to', 'date'],
['业务办理地(省)', 'province_n', 'text'],
['业务办理地(市)', 'city_n', 'text'],
['业务办理地(区/县)', 'district_n', 'text'],
['手机号', 'cell_phone', 'text'],
['QQ号', 'qq_code', 'text'],
['微信号', 'wechat_code', 'text'],
['所属机构证件号', 'business_license_num', 'text'],
['所属机构名称', 'agent_name', 'text'],
['户籍地址', 'address_on_resident_booklit', 'text'],
['联系地址', 'living_address', 'text'],
]
let newForm = ['TENANT', 'GUTA'].indexOf(this.baseInfo.bp_type) !== -1 ? baseInfo_A : baseInfo_B
return this.factory(newForm)
},
createForm_SP () {
let mateInfo = [// 配偶信息
['姓名', 'bp_name_sp', 'text'],
['身份证号码', 'id_card_no_sp', 'text'],
['证件有效期从', 'id_card_date_from_sp', 'date'],
['证件有效期到', 'id_card_date_to_sp', 'date'],
['手机号', 'spouse_phone', 'text'],
['工作单位', 'working_place_sp', 'text'],
['联系地址', 'address_sp', 'text'],
]
return this.factory(mateInfo)
},
createForm_quality () {
let qualificationInfo = [// 资质信息
['是否黑名单', 'blackList_flag', 'text'],
['征信是否异常', 'credit_normal_flag', 'text'],
['评级结果', 'rating_result', 'text'],
]
return this.factory(qualificationInfo)
},
},
}
</script>
<style lang="less" scoped>
.section-title{
padding: 0 0 0 0.3rem;
font-size: 0.3rem;
color: black;
line-height: 0.5rem;
margin-top: 12px;
}
</style>
<!-- 基本信息 -->
<template>
<list-item :item-height="44">
<div>
<div slot="name" class="section-title" style="">基本信息</div>
<item v-for="(ele, i) of baseInfo_A" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<Checkbox v-else-if="ele.type === 'checkbox'" :value="baseInfo[ele.prop]==='Y'" shape="square"/>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
<div v-if="['FACTORY'].indexOf(baseInfo.bp_type)===-1">
<div slot="name" class="section-title" style="">基本信息补录</div>
<item v-for="(ele, i) of baseInfo_B" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<Checkbox v-else-if="ele.type === 'checkbox'" :value="baseInfo[ele.prop]==='Y'" shape="square"/>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
<div>
<div slot="name" class="section-title" style="">法人代表信息</div>
<item v-for="(ele, i) of orgInfo" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<Checkbox v-else-if="ele.type === 'checkbox'" :value="baseInfo[ele.prop]==='Y'" shape="square"/>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
<div v-if="baseInfo.auth_flag==='Y'">
<div slot="name" class="section-title" style="">法人授权信息</div>
<item v-for="(ele, i) of authInfo" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<Checkbox v-else-if="ele.type === 'checkbox'" :value="baseInfo[ele.prop]==='Y'" shape="square"/>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
<div v-if="['TENANT', 'GUTA'].indexOf(baseInfo.bp_type)!==-1">
<div slot="name" class="section-title" style="">资质信息</div>
<item v-for="(ele, i) of formdata_quality" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'date'" slot="content">{{ baseInfo[ele.prop] | dateFormat }}</span>
<span v-else-if="ele.type === 'currency'" slot="content">{{ baseInfo[ele.prop] | currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ baseInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else slot="content">{{ baseInfo[ele.prop] }}</span>
</item>
</div>
</list-item>
</template>
<script>
import { Checkbox } from 'vant'
import 'vant/lib/checkbox/style'
export default {
components: {
Checkbox,
},
props: ['baseInfo'],
data () {
return {
}
},
computed: {
baseInfo_A () {
return this.createFormA()
},
baseInfo_B () {
return this.createFormB()
},
orgInfo () {
return this.createFormOrg()
},
authInfo () {
return this.createFormAuth()
},
formdata_quality () {
return this.createForm_quality()
},
},
methods: {
factory (arr) {
let outArr = []
if (arr.length) {
arr.forEach(ele => {
let [title, prop, type] = ele
outArr.push({
title: title || '',
prop: prop || 'fdf',
type: type || 'text',
})
})
}
return outArr
},
createFormA () {
let baseInfo_A = [// 基本信息 经销商
['公司名称', 'bp_name', 'text'],
['企业类型', 'enterprise_type', 'text'],
['注册地址', 'registered_place', 'text'],
['经营地址', 'business_address', 'text'],
['纳税人识别号', 'organization_code', 'text'],
['固定电话', 'phone', 'text'],
['已缴纳保证金', 'paid_deposit', 'text'],
['评级结果', 'rating_result', 'text'],
['注册资本(万元)', 'registered_capital', 'text'],
['业务办理地(省)', 'province_n', 'text'],
['业务办理地(市)', 'city_n', 'text'],
['业务办理地(区/县)', 'district_n', 'text'],
['联系人', 'contact_name', 'text'],
['联系人手机', 'contact_tel', 'text'],
['QQ号', 'qq_code', 'text'],
['微信号', 'wechat_code', 'text'],
['是否授权', 'auth_flag', 'checkbox'],
]
let baseInfo_A2 = [// 基本信息 主承租人/担保人
['公司名称', 'bp_name', 'text'],
['企业类型', 'enterprise_type', 'text'],
['注册地址', 'registered_place', 'text'],
['经营地址', 'business_address', 'text'],
['法定代表人', 'legal_person', 'text'],
['纳税人识别号', 'organization_code', 'text'],
['注册资本(万元)', 'registered_capital', 'text'],
['业务办理地(省)', 'province_n', 'text'],
['业务办理地(市)', 'city_n', 'text'],
['业务办理地(区/县)', 'district_n', 'text'],
['固定电话', 'phone', 'text'],
['QQ号', 'qq_code', 'text'],
['微信号', 'wechat_code', 'text'],
['是否授权', 'auth_flag', 'checkbox'],
]
let baseInfo_A3 = [// 基本信息 主机厂
['公司名称', 'bp_name', 'text'],
['企业类型', 'enterprise_type', 'text'],
['注册地址', 'registered_place', 'text'],
['经营地址', 'business_address', 'text'],
['纳税人识别号', 'organization_code', 'text'],
['注册资本(万元)', 'registered_capital', 'text'],
['固定电话', 'phone', 'text'],
['业务办理地(省)', 'province_n', 'text'],
['业务办理地(市)', 'city_n', 'text'],
['业务办理地(区/县)', 'district_n', 'text'],
['租赁系统编号', 'xcmg_id_n', 'text'],
['logo上传的超链接', 'logo_upload', 'text'],
['是否授权', 'auth_flag', 'checkbox'],
]
let auth_flag = this.baseInfo.auth_flag
if (['TENANT', 'GUTA'].indexOf(auth_flag) !== -1) {
return this.factory(baseInfo_A2)
} else if (auth_flag === 'AGENT') {
return this.factory(baseInfo_A)
} else {
return this.factory(baseInfo_A3)
}
},
createFormB () {
let baseInfo_B = [// 基本信息补录 经销商
['财务部联系电话', 'id_card_no', 'text'],
['联系人', 'contact_name', 'text'],
['联系人身份证', 'contact_card_no', 'text'],
['联系人手机', 'contact_tel', 'text'],
['联系人地址', 'contact_adds', 'text'],
['资产信息', 'capital', 'text'],
['经营业务(范围)', 'business_scope', 'text'],
]
return this.factory(baseInfo_B)
},
createFormOrg () {
let orgInfo = [// 法人代表信息
['姓名', 'legal_person', 'bool'],
['身份证号', 'id_card_no', 'bool'],
['证件有效期从', 'id_card_date_from', 'date'],
['证件有效期到', 'id_card_date_to', 'date'],
['手机号', 'cell_phone', 'text'],
['联系地址', 'living_address', 'text'],
]
return this.factory(orgInfo)
},
createFormAuth () {
let authInfo = [// 法人授权信息
['姓名', 'auth_person_name', 'bool'],
['身份证号', 'auth_person_id_card', 'bool'],
['证件有效期从', 'auth_id_card_date_from', 'date'],
['证件有效期到', 'auth_id_card_date_to', 'date'],
['联系电话', 'auth_cell_phone', 'text'],
['公司职务', 'auth_person_position', 'text'],
['授权事项', 'auth_person_matter', 'text'],
]
return this.factory(authInfo)
},
createForm_quality () {
let qualificationInfo = [// 资质信息
['是否黑名单', 'blackList_flag', 'text'],
['征信是否异常', 'credit_normal_flag', 'text'],
['评级结果', 'rating_result', 'text'],
]
return this.factory(qualificationInfo)
},
},
}
</script>
<style lang="less" scoped>
.section-title{
padding: 0 0 0 0.3rem;
font-size: 0.3rem;
color: black;
line-height: 0.5rem;
margin-top: 12px;
}
</style>
<!-- 开票信息 -->
<template>
<list-item :item-height="44">
<item v-for="(ele, i) of formdata" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span v-if="ele.type === 'currency'" slot="content">{{ billingInfo[ele.prop] || currency }}</span>
<span v-else-if="ele.type === 'bool'" slot="content">{{ billingInfo[ele.prop] === 'Y' ? '是' : '否' }}</span>
<span v-else="ele.type === 'text'" slot="content">{{ billingInfo[ele.prop] }}</span>
</item>
</list-item>
</template>
<script>
export default {
props: ['billingInfo'],
data () {
return {
}
},
computed: {
formdata () {
return this.createForm()
},
},
methods: {
factory (arr) {
let outArr = []
if (arr.length) {
arr.forEach(ele => {
let [title, prop, type] = ele
outArr.push({
title: title || '',
prop: prop || 'fdf',
type: type || 'text',
})
})
}
return outArr
},
createForm () {
let billingInfo_A = [// 自然人
['纳税人类型', 'taxpayer_type_n', 'text'],
['发票类型', 'invoice_kind_n', 'text'],
['发票抬头', 'invoice_title', 'text'],
['发票地址', 'invoice_adds', 'text'],
['开户电话', 'invoice_tel', 'text'],
['开户银行', 'open_bank', 'text'],
['开户行账号', 'open_account', 'text'],
]
let billingInfo_B = [// 法人
['纳税人类型', 'taxpayer_type_n', 'text'],
['发票类型', 'invoice_kind_n', 'text'],
['发票抬头', 'invoice_title', 'text'],
['发票地址', 'invoice_adds', 'text'],
['开户电话', 'invoice_tel', 'text'],
['开户银行', 'open_bank', 'text'],
['开户行账号', 'open_account', 'text'],
['纳税人识别号', 'organization_code', 'text'],
]
let newForm = this.billingInfo.bp_class === 'NP' ? billingInfo_A : billingInfo_B
return this.factory(newForm)
},
},
}
</script>
<style lang="less" scoped></style>
<!-- 审批历史 -->
<template>
<div class="history-detail">
<div class="history-item" v-for="(item, index) in historyData" :key="index" :class="{ hidden: !isOpen && index }">
<div class="dot"></div>
<div class="info-box">
<span style="font-weight: 600; flex: 1 0 33%">{{ item.node_desc }}</span>
<span style="flex: 1 0 33%; text-align: center;">{{ item.action_type_desc }}</span>
<span style="font-size: 0.24rem;flex: 1 0 33%; text-align: right;">{{ item.create_date_fmt.split(' ')[0] }}</span>
<!-- <span style="flex: 1 0 100%">{{ item.comment_text }}</span> -->
</div>
</div>
</div>
</template>
<script>
export default {
props: [
'isOpen',
'historyData'
],
data() {
return {
// historyData: [
// {
// title: '20主机厂初审中',
// date: '2023/1/4 18:01:43',
// remark: ''
// },
// {
// title: '20主机厂初审中',
// date: '2023/1/4 18:01:43',
// remark: ''
// },
// {
// title: '20主机厂初审中',
// date: '2023/1/4 18:01:43',
// remark: ''
// },
// {
// title: '20主机厂初审中',
// date: '2023/1/4 18:01:43',
// remark: ''
// },
// ]
}
},
created() {
console.log('历史审批',this.historyData);
},
methods: {
}
}
</script>
<style lang="less" scoped>
.history-detail {
color: white;
padding: 10px 10px 0;
font-size: 0.26rem;
.history-item {
display: flex;
justify-content: space-around;
height: 70px;
&:last-child .dot {
background-repeat: no-repeat;
}
&:nth-child(1) .dot {
background-repeat: repeat;
}
}
}
.dot {
height: 70px;
width: 2px;
z-index: 0;
background: linear-gradient(to top, #fff, #fff 0.05rem, transparent 0.05rem, transparent);
background-size: 100% 0.16rem;
&::before {
content: '';
display: block;
width: 12px;
height: 12px;
border-radius: 12px;
transform: translateX(-0.11rem);
z-index: 11;
background-color: #a8a9aa;
}
}
.hidden {
visibility: hidden;
}
.info-box {
display: flex;
flex-wrap: wrap;
flex: 1 0 60%;
max-width: 85%;
}
</style>
\ No newline at end of file
<!-- 商业伙伴 -->
<template>
<Collapse v-if="roleInfo.length" v-model="activeNames">
<CollapseItem v-for="(p, pi) of roleInfo" :title="p.bp_name" :key="p.bp_id" :name="pi">
<list-item :item-height="44">
<item v-for="(ele, i) of formdata" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<Checkbox v-if="ele.type === 'checkbox'" shape="square" :value="roleInfo[pi][ele.prop]==='Y'"/>
<span v-else slot="content">{{ roleInfo[pi][ele.prop] }}</span>
</item>
</list-item>
</CollapseItem>
</Collapse>
</template>
<script>
import { Collapse, CollapseItem, Checkbox } from 'vant'
import 'vant/lib/collapse/style'
import 'vant/lib/collapse-item/style'
import 'vant/lib/checkbox/style'
export default {
components: {
Collapse, CollapseItem, Checkbox,
},
props: ['roleInfo'],
data () {
return {
activeNames: [0],
formdata: [],
}
},
created() {
this.createForm()
},
methods: {
factory (arr) {
// 接收二维数组,产生 formdata
if (arr.length) {
arr.forEach(ele => {
let [title, prop, type] = ele
this.formdata.push({
title: title || '',
prop: prop || '',
type: type || 'text',
})
})
}
},
createForm () {
let formArr = [
['商业伙伴类型', 'bp_type_n', 'text'],
['主角色标志', 'primary_flag', 'checkbox'],
['启用', 'enabled_flag', 'checkbox'],
]
this.factory(formArr)
},
},
}
</script>
<style lang="less" scoped></style>
<template>
<h-view id="contract-details" class="public-style">
<h-header :proportion="[5, 1, 1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>客户准入申请工作流</span>
</div>
</h-header>
<h-content style="overflow-y: auto;">
<!-- 审批历史 -->
<div :class="[history_Coll ? 'history_active' : '']" class="history" @click="triggerHistory">
<History :isOpen="history_Coll" :historyData="historyData"/>
</div>
<!-- tab 页 -->
<div class="tab-style z100">
<div :class="{ 'done': tabNum === 1, 'undone': tabNum !== 1 }" @click="tabNum = 1;">
基本信息
</div>
<div :class="{ 'done': tabNum === 2, 'undone': tabNum !== 2 }" @click="tabNum = 2;">
开票信息
</div>
<div :class="{ 'done': tabNum === 3, 'undone': tabNum !== 3 }" @click="tabNum = 3;">
角色信息
</div>
<div :class="{ 'done': tabNum === 4, 'undone': tabNum !== 4 }" @click="tabNum = 4;">
银行信息
</div>
<div :class="{ 'done': tabNum === 5, 'undone': tabNum !== 5 }" @click="tabNum = 5;">
附件信息
</div>
</div>
<div v-if="tabNum === 1" class="z100">
<!-- <BaseInfo :baseInfo="baseInfo"/> -->
<BaseInfoNP v-if="baseInfo.bp_class === 'NP'" :baseInfo="baseInfo"/>
<BaseInfoOrg v-else :baseInfo="baseInfo"/>
</div>
<div v-if="tabNum === 2" class="z100">
<BillingInfo :billingInfo="billingInfo" />
</div>
<div v-if="tabNum === 3" class="z100">
<RoleInfo :roleInfo="roleInfo"/>
</div>
<div v-if="tabNum === 4" class="z100">
<BankInfo :bankInfo="bankInfo"/>
</div>
<div v-if="tabNum === 5" class="z100">
<AttachmentInfo :car="attachmentInfo.car" :house="attachmentInfo.house" :real="attachmentInfo.real"/>
<Appendix :appendixData="appendixData" @upData="getData"/>
<div class="approveBottom">
<span> 审批意见 </span>
<textarea v-model="confirm_note" cols="8" rows="5" placeholder="请输入" />
</div>
<div v-show="isTodo" class="foot-bottom">
<button class="success" @click="approv('1')">通 过</button>
<button class="refused" @click="approv('2')">拒 绝</button>
</div>
</div>
</h-content>
</h-view>
</template>
<script>
import { Collapse, CollapseItem } from 'vant'
import 'vant/lib/collapse/style'
import 'vant/lib/collapse-item/style'
import BillingInfo from './components/BillingInfo'
import AttachmentInfo from './components/AttachmentInfo'
import BankInfo from './components/BankInfo'
import RoleInfo from './components/RoleInfo'
import Appendix from './components/Appendix'
import BaseInfoOrg from './components/BaseInfoOrg'
import BaseInfoNP from './components/BaseInfoNP'
import History from './components/History'
// import axios from 'axios'
export default {
components: {
BillingInfo,
Collapse,
CollapseItem,
AttachmentInfo,
BankInfo,
Appendix,
BaseInfoOrg,
History,
RoleInfo,
BaseInfoNP,
},
data () {
return {
tabNum: 1,
collActiveTab: ['2'],
history_Coll: false,
confirm_note: '',
baseInfo: {}, // 基本信息
billingInfo: [], // 开票信息
attachmentInfo: [], // 附件 信息
bankInfo: [], // 银行信息
roleInfo: [], // 角色信息
historyData: [],
appendixData: [],
isTodo: true,
isEditType: false, // 30节点可编辑合同类型、开票类型
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
})
},
mounted () {
this.getData()
this.getHistory()
},
methods: {
getData () {
let bp_id = this.$route.params.document_id
this.hlsPopup.showLoading('请稍候')
let url = $config.basePath + 'bp_access_info_query'
let param = { bp_id }
this.hlsHttp.post(url, param).then((res) => {
this.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log('工作流信息:', res)
this.roleInfo = res.role_lists
this.baseInfo = res.info
this.billingInfo = res.info
this.bankInfo = res.bank_lists
this.attachmentInfo = {car: res.car_card, house: res.house_card, real: res.real_est_certificate}
// this.planData = res.quotation_lists
this.appendixData = (res.cdd_lists || []).map(item => {
let attachArr = []
item.attach_file_name && item.attach_file_name.split(';;').forEach(ele => {
let attach = ele.split('--')
attach[0] && attachArr.push({ fileName: attach[0], attachId: attach[1] })
})
return { ...item, attachArr }
})
} else {
hlsPopup.showLongCenter('获取工作流信息失败')
setTimeout(() => {
this.$router.back()
}, 2000)
}
})
},
getHistory () {
this.historyData = this.$route.params.approve_history_lists.reverse()
console.log('历史审批数据:',this.historyData);
},
triggerHistory () {
this.history_Coll = !this.history_Coll
},
approv (action_type) {
if (this.isEditType) {
let flag = false
this.planData.map(item => {
if (!item.repurchase_flag && !item.rent_invoice_type) {
flag = true
}
})
if (flag) {
hlsPopup.showLongCenter('请将必填字段填写完整')
return
}
}
let params = this.$route.params
let param = {
master: {
record_id: params.record_id,
action_type: action_type,
user_id: params.user_id,
comment_text: this.confirm_note,
},
}
let url = process.env.basePath + (action_type === '1' ? 'action_agree' : 'action_refuse')
this.hlsPopup.showLoading('请稍候')
this.hlsHttp.post(url, param).then((res) => {
this.hlsPopup.hideLoading()
this.hlsPopup.showLongCenter(res.message)
if (res.result === 'S') {
setTimeout(() => {
this.$router.back()
}, 2000);
}
})
},
},
}
</script>
<style lang="less" rel="stylesheet">
#contract-details {
.bar-custom {
background-color: #02459a;
}
.history {
height: 50px;
background-color: #02459a;
position: relative;
pointer-events: none;
padding: 0 0 30px;
&::after {
background: url('../../assets/userBind/arrow-bottom.png') no-repeat;
background-size: 15px;
background-position: center;
content: " ";
display: block;
position: absolute;
height: 20px;
bottom: 3px;
width: 100%;
pointer-events: auto;
}
}
.history.history_active {
height: auto;
min-height: 100px;
&::after {
transform: rotate(180deg);
}
}
.tab-style {
display: flex;
justify-content: center;
padding-top: 12px;
text-align: center;
padding-bottom: 8px;
align-items: center;
box-shadow: 0 2px 3px 0 rgba(220, 220, 221, 0.5);
div {
display: block;
height: 32px;
width: 172px;
font-family: PingFangSC-Semibold;
font-size: 14px;
letter-spacing: 0.43px;
margin: 0 4px;
line-height: 32px;
color: #02459a;
}
.undone {}
.done {
border-bottom: 2px solid #02459a;
}
img {
width: 16px;
display: block;
float: left;
margin: 8px 5px 0 20px;
}
span:nth-of-type(2) {
margin-left: 7px;
}
}
.van-cell__title {
color: #02459a
}
.van-cell {
background-color: #f6f6f6;
}
.van-icon-arrow::before {
color: #02459a
}
.z100 {
z-index: 100;
}
.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;
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;
}
}
.foot-bottom {
box-sizing: border-box;
display: flex;
justify-content: space-around;
border-radius: 20px;
background-color: #fff;
margin: 10px 15px;
padding: 10px;
button {
height: 40px;
padding: 10px 1rem;
border-radius: 10px;
}
.success {
background-color: #02459a;
border: 1px solid #02459a;
color: #fff
}
.refused {
background-color: #fff;
border: 1px solid #02459a;
color: #02459a
}
.back {
background-color: #ff5461;
border: 1px solid #ff5461;
color: #fff
}
}
}
</style>
<!-- 商务方案 -->
<template>
<Collapse v-model="activeNames" v-if="planData.length">
<CollapseItem v-for="(p, pi) of planData" :title="p.product_plan_id_n" :key="p.product_plan_id_n" :name="pi">
<list-item :item-height="44">
<item v-for="(ele, i) of formdata" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span slot="content" v-if="ele.type == 'currency'">{{ currency(planData[pi][ele.prop]) }}</span>
<span slot="content" v-else-if="ele.type == 'rate'">{{ toPercent(planData[pi][ele.prop]) }}</span>
<span slot="content" v-else="ele.type == 'text'">{{ planData[pi][ele.prop] }}</span>
</item>
</list-item>
<!-- 查看还款计划 -->
<router-link :to="toPath(p.cash_lists, p)">查看还款计划</router-link>
</CollapseItem>
</Collapse>
<div>
<Collapse v-model="activeNames" v-if="planData.length">
<CollapseItem v-for="(p, pi) of planData" :title="p.product_plan_id_n" :key="p.quotation_id" :name="pi">
<list-item :item-height="44">
<item v-for="(ele, i) of formdata" :key="ele.title">
<div slot="name" class="font-color">{{ ele.title }}</div>
<span slot="content" v-if="ele.type == 'currency'">{{ currency(planData[pi][ele.prop]) }}</span>
<span slot="content" v-else-if="ele.type == 'rate'">{{ toPercent(planData[pi][ele.prop]) }}</span>
<span slot="content" v-else="ele.type == 'text'">{{ planData[pi][ele.prop] }}</span>
</item>
</list-item>
<Cell :value="p.repurchase_flag_n" :required="editFlag" :disabled="!editFlag" :is-link="editFlag" title="合同类型" placeholder="请选择" @click="showPicker(1,pi)" />
<Cell :value="p.rent_invoice_type_n" :required="editFlag" :disabled="!editFlag" :is-link="editFlag" title="开票类型" placeholder="请选择" @click="showPicker(0,pi)"/>
<!-- 查看还款计划 -->
<router-link :to="toPath(p.cash_lists, p)">查看还款计划</router-link>
</CollapseItem>
</Collapse>
<ActionSheet v-model="picker_show" :actions="actions" :title="actionTitle" :close-on-click-action="true" :closeable="false" @select="onSelect" />
<div class="foot-bottom" v-if="editFlag">
<button class="success" @click="save">保存</button>
</div>
</div>
</template>
<script>
import { Collapse, CollapseItem } from 'vant';
import 'vant/lib/collapse/style';
import 'vant/lib/collapse-item/style';
import { Collapse, CollapseItem, Cell, ActionSheet } from 'vant'
import 'vant/lib/collapse/style'
import 'vant/lib/collapse-item/style'
import 'vant/lib/action-sheet/style'
export default {
props: ['planData'],
props: ['planData','editFlag'],
components: {
Collapse, CollapseItem
},
data() {
Collapse, CollapseItem, Cell, ActionSheet},
data () {
return {
activeNames: [0],
formdata: [],
actions: [], // 下拉框
contractType: [], // 合同类型下拉框
ticketType: [], // 开票类型下拉框
picker_show: false,
now_location: '',
now_nodeName: '',
actionTitle: '',
}
},
created() {
created () {
this.createForm()
this.getDropBox()
},
methods: {
async save () {
let flag = false
this.planData.map(item => {
if (!item.repurchase_flag && !item.rent_invoice_type) {
flag = true
}
})
if (flag) {
hlsPopup.showLongCenter('请将必填字段填写完整')
return
}
let url = process.env.basePath + 'prj_wfl_quotation_save'
let param = {
'master': {
quotation_lists: this.planData,
},
}
console.log(param)
hlsPopup.showLoading('请稍候')
let res = await this.$post(url, param)
this.hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('保存成功')
} else {
hlsPopup.showLongCenter('保存失败')
}
},
onSelect (value) {
let val = value.name
if (this.now_nodeName === 'repurchase_flag') { // 合同类型
this.planData[this.now_location].repurchase_flag_n = val
let arr = this.contractType.filter(item => item.code_name === val)
this.planData[this.now_location].repurchase_flag = arr[0].code
}
if (this.now_nodeName === 'rent_invoice_type') { // 开票类型
this.planData[this.now_location].rent_invoice_type_n = val
let arr = this.ticketType.filter(item => item.code_name === val)
this.planData[this.now_location].rent_invoice_type = arr[0].code
}
},
showPicker (flag, index) {
if (flag) {
this.actions = this.contractType.map(item => ({name: item.code_name}))
this.now_nodeName = 'repurchase_flag'
this.actionTitle = '选择合同类型'
} else {
this.now_nodeName = 'rent_invoice_type'
this.actions = this.ticketType.map(item => ({name: item.code_name}))
this.actionTitle = '选择开票类型'
}
this.now_location = index
this.picker_show = true
},
// 下拉框数据获取
async getDropBox () {
let url = process.env.basePath + 'app_get_syscode'
let param = {
'a': 'PRJ501A.REPURCHASE_FLAG',
'bbbbb': 'PRJ501A.RENT_INVOICE_TYPE',
}
hlsPopup.showLoading('请稍候')
let res = await this.$post(url, param)
this.hlsPopup.hideLoading()
if (res.return_status === 'S') {
this.contractType = res.a
this.ticketType = res.bbbbb
}
},
toPath(cash_lists, p) {
let headInfo = JSON.stringify({
lease_times: p.lease_times,
......@@ -118,4 +205,12 @@ export default {
}
</script>
<style lang="less" scoped></style>
\ No newline at end of file
<style lang="less" scoped>
/deep/ .van-cell{
background: none !important;
}
/deep/ .van-cell__title {
color: #333333 !important
}
</style>
\ No newline at end of file
......@@ -41,7 +41,7 @@
<Lessee :lesseeData="lesseeData"></Lessee>
</div>
<div v-if="tabNum === 2" class="z100">
<Plan :planData="planData"></Plan>
<Plan :planData="planData" :editFlag="isEditType"></Plan>
</div>
<div v-if="tabNum === 3" class="z100">
<Partner :bplist="bplist"></Partner>
......@@ -95,7 +95,8 @@ export default {
planData: [], // 商务方案
historyData: [],
appendixData: [],
isTodo: true
isTodo: true,
isEditType: false, // 30节点可编辑合同类型、开票类型
}
},
beforeRouteEnter(to, from, next) {
......@@ -104,7 +105,8 @@ export default {
})
},
mounted() {
console.log(this.$route.params)
console.log(this.$route.params)
this.isEditType = this.$route.params.node_sequence_num === '30'
this.isTodo = this.$route.params.type === 'todo'
this.getHistory()
this.getData()
......@@ -146,6 +148,18 @@ export default {
this.history_Coll = !this.history_Coll
},
approv(action_type) {
if (this.isEditType) {
let flag = false
this.planData.map(item => {
if (!item.repurchase_flag && !item.rent_invoice_type) {
flag = true
}
})
if (flag) {
hlsPopup.showLongCenter('请将必填字段填写完整')
return
}
}
let params = this.$route.params
let param = {
master: {
......
......@@ -217,9 +217,10 @@ export default {
}
})
},
approvalInfo(flow, type) {
approvalInfo (flow, type) {
let handler = {
"PRJ_CREATE_REQ_WFL": 'financingApplyDetail' //融租申请工作流
'PRJ_CREATE_REQ_WFL': 'financingApplyDetail', // 融租申请工作流
'CLIENT_REG_FLOW': 'customerAccessDetail', // 客户准入工作流
}
let routerName = handler[flow.workflow_code]
......
......@@ -153,6 +153,9 @@ const approvalInfo = resolve => require.ensure([], () => { resolve(require('@/pa
const MyInvoice = resolve => require.ensure([], () => { resolve(require('@/pages/invoice/invoice')) }, 'invoice')
const NewsList = resolve => require.ensure([], () => { resolve(require('@/pages/news/newslist')) }, 'news')
const NewsInfo = resolve => require.ensure([], () => { resolve(require('@/pages/news/NewsInfo')) }, 'news')
// 客户准入审批流
const customerAccessDetail = resolve => require.ensure([], () => { resolve(require('@/pages/customerAccessApply/customerAccess-detail')) }, 'customerAccess-detail')
Vue.use(Router)
export default new Router({
......@@ -374,6 +377,13 @@ export default new Router({
name: 'PrivacyPolicy',
meta: { keepAlive: true },
},
// 客户准入
{
path: '/customerAccess-detail',
component: customerAccessDetail,
name: 'customerAccessDetail',
meta: { keepAlive: false },
},
],
scrollBehavior (to, from, savedPosition) {
if (to.hash) {
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"><meta name=format-detection content="telephone=no"><meta name=format-detection content="email=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><script type=text/javascript src=./static/vuePlatform.js></script><script type=text/javascript src=./static/prototype.js></script><script type=text/javascript src=./cordova.js></script><script type=text/javascript src="http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"></script><title>徐工金服</title><link href=./static/css/app.fb52dd271f35e6cb942abb94eb5f18bb.css rel=stylesheet></head><body><div id=app-box></div><script type=text/javascript src=./static/js/manifest.16dc3c74f4e0c838ce1f.js></script><script type=text/javascript src=./static/js/vendor.a2bd9868e7885d7ce8da.js></script><script type=text/javascript src=./static/js/app.279bb6618e94708c8fd3.js></script></body></html>
\ No newline at end of file
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