Commit 64315cf4 by cwq0219

虚拟对公账号-详情;菜单图标

1 parent 986aaa82
......@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-09-01 19:06:01
* @Last Modified by: chenwq
* @Last Modified time: 2021-04-17 14:47:03
* @Last Modified time: 2021-04-22 09:44:44
*/
export const TYPE_NAME = 'confType'
......@@ -184,7 +184,7 @@ export function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minVal
numReg: /^[1-9]\d*$/
}
regRule = regRule || 'priceReg'
if (newValue && (minValue && (newValue < minValue)) || (maxValue && (newValue > maxValue))) {
if (newValue && ((minValue && (newValue < minValue)) || (maxValue && (newValue > maxValue)))) {
return oldValue || ''
}
if (newValue && reg[regRule].test(newValue + '')) {
......
......@@ -5,7 +5,7 @@ export function elMenuItem(createElement, menu) {
createElement('i', { attrs: { class: `el-icon-${menu.icon}` } })
] : [],
...menu.icon === undefined & !menu.iconSvg ? [
createElement('img', { attrs: { src: '../menuIcon/' + menu.path.slice(1) + '.png' } })
createElement('img', { attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } })
] : [],
...menu.iconSvg ? [
createElement('d2-icon-svg', { props: { name: menu.iconSvg } })
......@@ -21,7 +21,7 @@ export function elSubmenu(createElement, menu) {
createElement('i', { slot: 'title', attrs: { class: `el-icon-${menu.icon}` } })
] : [],
...menu.icon === undefined & !menu.iconSvg ? [
createElement('img', { slot: 'title', attrs: { src: '../menuIcon/' + menu.path.slice(1) + '.png' } })
createElement('img', { slot: 'title', attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } })
] : [],
...menu.iconSvg ? [
createElement('d2-icon-svg', { slot: 'title', props: { name: menu.iconSvg } })
......
......@@ -2,7 +2,7 @@
<template>
<div class="account-detail">
<el-form
:model="detailForm"
:model="merchantRow"
label-width="190px"
>
<p class="edit-sub-title">账户信息</p>
......@@ -10,7 +10,7 @@
label="客户名称:"
prop="name"
>
<span>{{detailForm.merchantName}}</span>
<span>{{merchantRow.merchantName}}</span>
</el-form-item>
<p class="edit-sub-title">申请资料</p>
<block
......@@ -18,17 +18,20 @@
:key="index"
>
<el-form-item
v-if="item.showAttrList ? item.showAttrList.includes(detailForm.custType) : true"
:label="item.label + ':'"
:prop="item.prop"
>
<span v-if="item.type === 'img'">
<span v-if="item.type === 'image'">
<img
v-for="(subItem, subIdx) in item.imgList"
:key="subIdx"
class="detail-img"
src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=270411355,4161548721&fm=26&gp=0.jpg"
:src="detailForm.papersList[imgToAttr[subItem]]"
>
</span>
<span v-else-if="item.formatter">{{item.formatter(item)}}</span>
<span v-else>{{applyForm[item.prop]}}</span>
<span v-else>{{detailForm[item.prop]}}</span>
</el-form-item>
</block>
</el-form>
......@@ -41,64 +44,69 @@ export default {
name: 'accountDetail',
data() {
return {
applyForm: {},
// formNameList: [
// 'custType',
// 'anotherName',
// 'busAddress',
// 'legalName',
// 'legalCertNo',
// 'legalCertDate',
// 'legalTel',
// 'contactsName',
// 'contactsPhone',
// 'contactsEmail',
// 'bankAccountType',
// 'bankAccountNo',
// 'bankAccountName',
// 'bankTelephoneNo',
// 'bankName',
// 'branchBankName',
// 'operPhone',
// 'busLicenceName',
// 'busLicense',
// 'busLicenseDate',
// 'contactsAddr',
// 'busLicenseStartDate',
// 'busLicenseExpire'
// ],
detailForm: {},
// 图片对于字段
imgToAttr: {
idCard: '00',
idCardBack: '30',
bankCard: '35',
bankCardBack: '36',
clientAgreement: '31',
doorHead: '34',
businessPremiese: '50',
businessPremieseTwo: '51',
businessLicense: '19',
accountLicenese: '37'
},
formList: [{
label: '商户类型',
prop: 'custType'
prop: 'custType',
formatter: () => {
return {
'O': '小微商户',
'C': '个体商户',
'B': '企业商户'
}[this.detailForm.custType]
}
}, {
label: '营业执照全称',
prop: 'busLicenceName'
prop: 'busLicenceName',
// 根据currentPage不同,展示/隐藏
showAttrList: ['C', 'B']
}, {
label: '营业执照号码',
prop: 'busLicense'
prop: 'busLicense',
// 根据currentPage不同,展示/隐藏
showAttrList: ['C', 'B']
}, {
label: '营业执照',
prop: 'businessLicense',
type: 'img'
type: 'image',
// 根据currentPage不同,展示/隐藏
showAttrList: ['C', 'B']
}, {
label: '营业执照有效期',
prop: 'busLicenseDate',
// 根据currentPage不同,展示/隐藏
showAttrList: ['C', 'B'],
formatter: () => {
return this.applyForm.busLicenseStartDate + '~' + this.applyForm.busLicenseExpire
return this.detailForm.busLicenseStartDate + '~' + this.detailForm.busLicenseExpire
}
}, {
label: '商户名称',
prop: 'anotherName'
}, {
label: '企业注册地址',
prop: 'companyAddr'
prop: 'companyAddr',
// 根据currentPage不同,展示/隐藏
showAttrList: ['B']
}, {
label: '企业营业地址',
prop: 'busAddress'
}, {
label: '法人身份证正反面',
prop: '',
type: 'img'
imgList: ['idCard', 'idCardBack'],
type: 'image'
}, {
label: '法人姓名',
prop: 'legalName'
......@@ -109,7 +117,7 @@ export default {
label: '身份证有效期',
prop: '',
formatter: () => {
return this.applyForm.legalCertStartDate + '~' + this.applyForm.legalCertExpire
return this.detailForm.legalCertStartDate + '~' + this.detailForm.legalCertExpire
}
}, {
label: '法人手机号',
......@@ -122,27 +130,36 @@ export default {
prop: 'contactsPhone'
}, {
label: '提现人地址',
prop: 'contactsAddr'
prop: 'contactsAddr',
showAttrList: ['C', 'B']
}, {
label: '提现人邮箱',
prop: 'contactsEmail'
}, {
label: '银行卡账户类型',
prop: 'bankAccountType'
prop: 'bankAccountType',
formatter: () => {
return {
'corporate': '对公账户',
'personal': '对私账户'
}[this.detailForm.bankAccountType]
}
}, {
label: '开户许可证/印鉴卡',
prop: '',
type: 'img'
imgList: ['accountLicenese'],
type: 'image',
// 根据currentPage不同,展示/隐藏
showAttrList: ['B']
}, {
label: '结算银行卡正反面照',
prop: '',
type: 'img'
imgList: ['bankCard', 'bankCardBack'],
type: 'image'
}, {
label: '结算银行卡开户行',
prop: 'bankName'
}, {
label: '开户支行',
prop: 'branchBankName'
prop: 'openAccBankName'
}, {
label: '结算银行卡号',
prop: 'bankAccountNo'
......@@ -154,16 +171,16 @@ export default {
prop: 'bankTelephoneNo'
}, {
label: '客户协议书',
prop: '',
type: 'img'
imgList: ['clientAgreement'],
type: 'image'
}, {
label: '门头照',
prop: '',
type: 'img'
imgList: ['doorHead'],
type: 'image'
}, {
label: '经营场所图',
prop: '',
type: 'img'
imgList: ['businessPremiese', 'businessPremieseTwo'],
type: 'image'
}, {
label: '操作人手机号',
prop: 'operPhone'
......@@ -176,7 +193,7 @@ export default {
type: Boolean,
default: false
},
detailForm: {
merchantRow: {
type: Object,
default: () => { }
}
......@@ -185,14 +202,14 @@ export default {
watch: {
accountDetailVisible(newVal) {
if (newVal) {
this.merchantId = this.detailForm.merchantId
this.merchantId = this.merchantRow.merchantId
this.getDetail()
}
}
},
mounted() {
this.merchantId = this.detailForm.merchantId
this.merchantId = this.merchantRow.merchantId
this.getDetail()
},
......@@ -200,28 +217,15 @@ export default {
getDetail() {
getDetailApi({ merchantId: this.merchantId }).then(res => {
console.log(res)
this.applyForm = _.cloneDeep({
this.detailForm = _.cloneDeep({
...res.bankInfo,
...res.serviceMerchant,
...res.yseMerchantInfo
...res.yseMerchantInfo,
papersList: {}
})
res.papersList.forEach(item => {
this.detailForm.papersList[item.papersType] = item.imgUrl
})
// 身份证有效期
// if (res.yseMerchantInfo.legalCertStartDate && res.yseMerchantInfo.legalCertExpire) {
// const startDate = res.yseMerchantInfo.legalCertStartDate
// const endDate = res.yseMerchantInfo.legalCertStartDate
// this.$set(this.applyForm, 'legalCertDate', [startDate.slice(0, 4) + '-' + startDate.slice(4, 6) + '-' + startDate.slice(6), endDate.slice(0, 4) + '-' + endDate.slice(4, 6) + '-' + endDate.slice(6)])
// }
// 图片恢复
// var picKeys = Object.keys(this.picObj)
// var keytoPic = {}
// picKeys.forEach(item => {
// keytoPic[this.picObj[item].attrName] = item
// })
// res.papersList.forEach(item => {
// this.applyForm.papers[item.papersType] = item.imgUrl
// this.picObj[keytoPic[item.papersType]].url = item.imgUrl
// })
console.log(this.applyForm)
})
}
}
......@@ -230,11 +234,13 @@ export default {
</script>
<style scoped>
.account-detail .detail-img {
width: 140px;
transition: width 0.5s;
width: 137px;
height: 90px;
transition: width 0.2s;
cursor: pointer;
}
.account-detail .detail-img:hover {
width: 100%;
width: 50%;
height: 50%;
}
</style>
......@@ -46,7 +46,10 @@
@confirmDialog="handleDetailClose"
@closeDialog="handleDetailClose"
>
<account-detail :accountDetailVisible="accountDetailVisible" :detailForm="detailForm"></account-detail>
<account-detail
:accountDetailVisible="accountDetailVisible"
:merchantRow="merchantRow"
></account-detail>
</d2-dialog>
</d2-container>
</template>
......@@ -63,7 +66,7 @@ export default {
return {
// 账户详情
accountDetailVisible: false,
detailForm: {},
merchantRow: {},
// 搜索
searchForm: {
merchantType: '',
......@@ -191,7 +194,7 @@ export default {
handleApply(cellValue) {
// 查看详情
if (cellValue.accountStatus === 3) {
this.detailForm = cellValue
this.merchantRow = cellValue
this.handleDetailClose()
return true
}
......
......@@ -11,7 +11,10 @@
@handleDraft="handleDraft"
@handleCancel="handleCancel"
>
<span style="display: inline-block;color: red; margin: 10px 54px;" slot="failMessage">{{failMessage}}</span>
<span
style="display: inline-block;color: red; margin: 10px 54px;"
slot="failMessage"
>{{failMessage}}</span>
<span
slot="custType"
slot-scope="scope"
......@@ -338,8 +341,6 @@ export default {
}, {
label: '企业营业地址',
name: 'busAddress',
// 根据currentPage不同,展示/隐藏
// showAttrList: ['B'],
type: 'input',
rules: [{ required: true, message: '请输入企业营业地址', trigger: 'change' }]
},
......@@ -419,7 +420,6 @@ export default {
}, {
label: '结算银行卡正反面照',
name: 'bankCard',
// showAttrList: ['O', 'C'],
otherName: 'bankCardBack',
type: 'image',
slotName: 'bankCard',
......@@ -427,7 +427,6 @@ export default {
}, {
label: '结算银行卡开户行',
name: 'bankType',
// showAttrList: ['O', 'C'],
rules: [{ required: true, message: '请选择结算银行卡', trigger: 'change' }],
type: 'select',
optionId: 'bankType',
......@@ -465,20 +464,17 @@ export default {
label: '结算银行卡号',
name: 'bankAccountNo',
type: 'input',
// showAttrList: ['O', 'C'],
rules: [{ required: true, message: '请输入结算银行卡号', trigger: 'change' }]
}, {
label: '结算银行卡用户名',
name: 'bankAccountName',
type: 'input',
// showAttrList: ['O', 'C'],
rules: [{ required: true, message: '请输入结算银行卡用户名', trigger: 'change' }]
}, {
label: '银行预留手机号',
name: 'bankTelephoneNo',
type: 'input',
maxlength: '11',
// showAttrList: ['O', 'C'],
rules: [{ required: true, message: '请输入银行预留手机号', trigger: 'change' }]
}, {
label: '客户协议书',
......@@ -560,55 +556,57 @@ export default {
getDetail() {
getDetailApi({ merchantId: this.targetAccount.merchantId }).then(res => {
console.log(res)
this.custType = res.yseMerchantInfo.custType
this.markCustType = res.yseMerchantInfo.custType
this.editForm = this[this.typeToForm[this.custType]]
// 需要写入editForm的属性
var needAttrList = []
// 返回res的对象属性
var resObj = _.cloneDeep({
...res.bankInfo,
...res.serviceMerchant,
...res.yseMerchantInfo
})
// console.log(this.formList.map(item => item.name))
this.formList.forEach((item, index) => {
if (item.hasOwnProperty('type') && item.type !== 'image') {
if (item.hasOwnProperty('showAttrList')) {
item.showAttrList.includes(this.custType) && needAttrList.push(item.name)
} else {
needAttrList.push(item.name)
if (res.yseMerchantInfo) {
this.custType = res.yseMerchantInfo.custType
this.markCustType = res.yseMerchantInfo.custType
this.editForm = this[this.typeToForm[this.custType]]
// 需要写入editForm的属性
var needAttrList = []
// 返回res的对象属性
var resObj = _.cloneDeep({
...res.bankInfo,
...res.serviceMerchant,
...res.yseMerchantInfo
})
// console.log(this.formList.map(item => item.name))
this.formList.forEach((item, index) => {
if (item.hasOwnProperty('type') && item.type !== 'image') {
if (item.hasOwnProperty('showAttrList')) {
item.showAttrList.includes(this.custType) && needAttrList.push(item.name)
} else {
needAttrList.push(item.name)
}
}
})
// 文字恢复
needAttrList.forEach(item => {
this.editForm[item] = resObj[item]
})
// 身份证有效期
if (res.yseMerchantInfo.legalCertStartDate && res.yseMerchantInfo.legalCertExpire) {
const startDate = res.yseMerchantInfo.legalCertStartDate
const endDate = res.yseMerchantInfo.legalCertStartDate
this.$set(this.editForm, 'legalCertDate', [startDate.slice(0, 4) + '-' + startDate.slice(4, 6) + '-' + startDate.slice(6), endDate.slice(0, 4) + '-' + endDate.slice(4, 6) + '-' + endDate.slice(6)])
}
})
// 文字恢复
needAttrList.forEach(item => {
this.editForm[item] = resObj[item]
})
// 身份证有效期
if (res.yseMerchantInfo.legalCertStartDate && res.yseMerchantInfo.legalCertExpire) {
const startDate = res.yseMerchantInfo.legalCertStartDate
const endDate = res.yseMerchantInfo.legalCertStartDate
this.$set(this.editForm, 'legalCertDate', [startDate.slice(0, 4) + '-' + startDate.slice(4, 6) + '-' + startDate.slice(6), endDate.slice(0, 4) + '-' + endDate.slice(4, 6) + '-' + endDate.slice(6)])
}
// 营业有效期
if (res.yseMerchantInfo.busLicenseStartDate && res.yseMerchantInfo.busLicenseExpire) {
const startDate = res.yseMerchantInfo.busLicenseStartDate
const endDate = res.yseMerchantInfo.busLicenseExpire
this.$set(this.editForm, 'busLicenseDate', [startDate.slice(0, 4) + '-' + startDate.slice(4, 6) + '-' + startDate.slice(6), endDate.slice(0, 4) + '-' + endDate.slice(4, 6) + '-' + endDate.slice(6)])
// 营业有效期
if (res.yseMerchantInfo.busLicenseStartDate && res.yseMerchantInfo.busLicenseExpire) {
const startDate = res.yseMerchantInfo.busLicenseStartDate
const endDate = res.yseMerchantInfo.busLicenseExpire
this.$set(this.editForm, 'busLicenseDate', [startDate.slice(0, 4) + '-' + startDate.slice(4, 6) + '-' + startDate.slice(6), endDate.slice(0, 4) + '-' + endDate.slice(4, 6) + '-' + endDate.slice(6)])
}
// 图片恢复
var picKeys = Object.keys(this.picObj)
var keytoPic = {}
picKeys.forEach(item => {
keytoPic[this.picObj[item].attrName] = item
})
res.papersList.forEach(item => {
this.editForm.papers[item.papersType] = item.imgUrl
this.picObj[keytoPic[item.papersType]].url = item.imgUrl
})
this.failMessage = res.yseMerchantInfo.failMessage
// console.log(this.editForm)
}
// 图片恢复
var picKeys = Object.keys(this.picObj)
var keytoPic = {}
picKeys.forEach(item => {
keytoPic[this.picObj[item].attrName] = item
})
res.papersList.forEach(item => {
this.editForm.papers[item.papersType] = item.imgUrl
this.picObj[keytoPic[item.papersType]].url = item.imgUrl
})
this.failMessage = res.yseMerchantInfo.failMessage
// console.log(this.editForm)
})
},
// 开户行
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!