Commit 0acff547 authored by 胡's avatar

feat: 阶段性更新,基本完成多绑定

parent d7409fe3
......@@ -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_UAT&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"3.1.8"'
currentVersion: '"3.2.6"'
}
......@@ -13,7 +13,7 @@
class="box"
v-for="item of list"
:key="item.bp_id"
@click="doCheck(item.user_bp_bind_id)"
@click="doCheck(item.bp_id)"
>
<div class="name">
<img
......@@ -65,14 +65,18 @@ export default {
let query = await this.hlsHttp.post(url, params);
if (query.result == 'S') {
this.hlsPopup.hideLoading();
this.hlsPopup.hideLoading();
// 自己添加认证文字
let register = {
NP_NO: "个人认证未通过",
NP_NO: "个人待认证",
NP_YES: "个人认证通过",
ORG_YES: "企业认证通过",
ORG_NO: "企业认证未通过",
ORG_NO: "企业待认证",
ORG_L_NO: "法人待认证",
ORG_L_YES: "法人认证通过",
ORG_AUTH_NO: "授权人待认证",
ORG_AUTH_YES: "授权人认证通过"
}
query.lists = query.lists.map(item => {
......@@ -106,7 +110,7 @@ export default {
},
doCheck(id) {
this.list = this.list.map(item => {
item.checked = item.user_bp_bind_id == id;
item.checked = item.bp_id == id;
return item;
})
},
......
......@@ -264,8 +264,9 @@ export default {
// },
// },
mounted() {
this.getList()
this.getMultipleRole();
this.getHead();
this.getHead();
},
beforeRouteEnter(to, from, next) {
next((vm) => {
......@@ -286,6 +287,48 @@ export default {
next()
},
methods: {
// 获取用户列表,并缓存
async getList() {
let url = process.env.basePath + 'user_bp_query';
let params = { app_user_id: window.localStorage.getItem('app_user_id') };
try {
hlsPopup.showLoading('请稍等');
let query = await this.hlsHttp.post(url, params);
if (query.result == 'S') {
this.hlsPopup.hideLoading();
// 自己添加认证文字
let register = {
NP_NO: "个人待认证",
NP_YES: "个人认证通过",
ORG_YES: "企业认证通过",
ORG_NO: "企业待认证",
ORG_L_NO: "法人待认证",
ORG_L_YES: "法人认证通过",
ORG_AUTH_NO: "授权人待认证",
ORG_AUTH_YES: "授权人认证通过"
}
query.lists = query.lists.map(item => {
item.bp_identity_name = register[item.bp_identity];
return item;
})
window.localStorage.setItem('bind-user-list', JSON.stringify(query.lists));
// window.localStorage.setItem('now_user_bp_bind_id', JSON.stringify(query.lists.length ? query.lists[0] : {}));
this.bindUserList = query.lists;
} else {
this.hlsPopup.hideLoading();
this.hlsPopup.showLongCenter(res.message);
}
} catch (error) {
this.hlsPopup.hideLoading();
}
},
changeUser() {
this.hlsPopup.selectList({
list: this.bindUserList.map(item => ({ code_name: item.bp_name, code: item.bp_id })),
......
This diff is collapsed.
......@@ -63,6 +63,7 @@ export default {
name = 'EnterpriseNew'
bpClass = 'ORG'
}
window.localStorage.setItem('handleUser', JSON.stringify({}));
this.$router.push({
name: name,
params: {
......
......@@ -286,7 +286,7 @@ export default {
houseAttachmentId: '',
carAttachmentId: '',
propertyInfo: {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
right_person: '',
public_situation: '',
house_located: '',
......@@ -299,7 +299,7 @@ export default {
right_others: '',
},
hauseInfo: {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
house_owner: '',
public_situation: '',
house_located: '',
......@@ -315,7 +315,7 @@ export default {
land_use_limit: '',
},
carInfo: {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
vehicle_identify_num: '',
address: '',
brand_model_number: '',
......@@ -336,14 +336,14 @@ export default {
},
computed: {
isApproved () {
return window.localStorage.user_bp_status === 'APPROVED'
return JSON.parse(window.localStorage.getItem('handleUser')).bp_status === 'APPROVED'
},
},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'NPInvoiceInfo' && window.localStorage.from === 'true') {
vm.propertyInfo = {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
right_person: '',
public_situation: '',
house_located: '',
......@@ -369,7 +369,7 @@ export default {
land_number: '',
land_get_method: '',
land_use_limit: '',
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
vm.carInfo = {
vehicle_identify_num: '',
......@@ -384,7 +384,7 @@ export default {
regist_date: '',
words_result_num: '',
success: '',
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id
}
vm.houseImgUpload = ''
vm.carImgUpload = ''
......@@ -398,7 +398,7 @@ export default {
vm.isUploadHouse = false, // 房产证修改标识
vm.isUploadCar = false, // 行驶证修改标识
vm.isUploadEstate = false, // 不动产权证修改标识
vm.bp_type = window.localStorage.bp_type
vm.bp_type = JSON.parse(window.localStorage.getItem('handleUser')).bp_type
setTimeout(() => {
vm.loadItemList(true)
vm.getCarInfo()
......@@ -407,7 +407,7 @@ export default {
}, 0)
} else if (from.name === 'NPInvoiceInfo' && window.localStorage.from === 'false') {
vm.propertyInfo = {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
right_person: '',
public_situation: '',
house_located: '',
......@@ -433,7 +433,7 @@ export default {
land_number: '',
land_get_method: '',
land_use_limit: '',
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
vm.carInfo = {
vehicle_identify_num: '',
......@@ -448,7 +448,7 @@ export default {
regist_date: '',
words_result_num: '',
success: '',
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
vm.houseImgUpload = ''
vm.carImgUpload = ''
......@@ -462,7 +462,7 @@ export default {
vm.isUploadHouse = false, // 房产证修改标识
vm.isUploadCar = false, // 行驶证修改标识
vm.isUploadEstate = false, // 不动产权证修改标识
vm.bp_type = window.localStorage.bp_type
vm.bp_type = JSON.parse(window.localStorage.getItem('handleUser')).bp_type
vm.loadItemList(false)
}
})
......@@ -529,7 +529,7 @@ export default {
let url = process.env.basePath + 'bp_vehicleLicense_query'
let flag = await vm.getEstateInfo()
let param = {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
// hlsPopup.showLoading('请稍候')
if (flag) {
......@@ -549,7 +549,7 @@ export default {
let url = process.env.basePath + 'bp_real_estate_query'
let flag = await vm.getHouseInfo()
let param = {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
// hlsPopup.showLoading('请稍候')
if (flag) {
......@@ -597,7 +597,7 @@ export default {
// vm.hlsPopup.hideLoading()
// if (res.result === 'S') {
this.$router.push({
name: 'NPBankInfo',
name: 'NPBankInfo',
})
// } else {
// hlsPopup.showError(res.message)
......@@ -608,7 +608,7 @@ export default {
let vm = this
let url = process.env.basePath + 'bp_house_info_query'
let param = {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
......@@ -991,7 +991,7 @@ export default {
loadItemList (flag) {
let vm = this
vm.dowload_list = []
let bpId = window.localStorage.getItem('bp_id')
let bpId = JSON.parse(window.localStorage.getItem('handleUser')).bp_id
if (bpId === 'undefined') {
bpId = null
}
......
......@@ -128,7 +128,7 @@ export default {
return {
backImg: null,
showModalValue: false,
bp_identity: window.localStorage.bp_identity,
bp_identity: JSON.parse(window.localStorage.getItem('handleUser')).bp_identity,
bankList: [],
isClear: false,
certification_status: '',
......@@ -146,7 +146,7 @@ export default {
},
computed: {
isApproved () {
return window.localStorage.user_bp_status === 'APPROVED'
return JSON.parse(window.localStorage.getItem('handleUser')).bp_status === 'APPROVED'
},
},
beforeRouteEnter (to, from, next) {
......@@ -154,13 +154,13 @@ export default {
vm.getBankInfo()
vm.checkElectonic()
})
},
},
methods: {
successCall () {
this.hideModal()
this.getBankInfo()
this.bank.bank_account_num = ''
this.bank.bank_account_name = ''
this.bank.bank_account_name = ''
this.bank.bank_full_name = ''
this.bank.bank_branch_name = ''
},
......@@ -168,7 +168,7 @@ export default {
this.showModalValue = false
this.isClear = true
this.bank.bank_account_num = ''
this.bank.bank_account_name = window.localStorage.bp_name
this.bank.bank_account_name = ''
this.bank.bank_card_type = ''
this.bank.bank_full_name = ''
this.bank.bank_branch_name = ''
......@@ -176,10 +176,11 @@ export default {
showModal () {
this.showModalValue = true
this.bankImg = ''
this.bank.bank_account_name = JSON.parse(window.localStorage.getItem('handleUser')).bp_name
},
async checkElectonic () {
let vm = this
let id = window.localStorage.getItem('bp_id')
let id = JSON.parse(window.localStorage.getItem('handleUser')).bp_id
let url = process.env.basePath + 'bp_elec_check'
let param = {
bp_id: id,
......@@ -213,7 +214,7 @@ export default {
// 只有自然人需要认证
let url = process.env.basePath + 'bp_query'
let param = {
bp_id: window.localStorage.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then((result) => {
......@@ -260,9 +261,9 @@ export default {
let url = $config.basePath + 'bp_bind_submit'
let param = {
master: {
bp_id: window.localStorage.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
bp_class: 'ORG',
bp_type: window.localStorage.getItem('bp_type'),
bp_type: JSON.parse(window.localStorage.getItem('handleUser')).bp_type,
business_num: window.localStorage.getItem('business_num'),
},
}
......@@ -290,6 +291,7 @@ export default {
let url = $config.basePath + 'auth_user_sign'
let param = {
phone: window.localStorage.user_phone,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id
}
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
......@@ -309,7 +311,7 @@ export default {
content: '您确认添加吗?',
onConfirm: data => {
if (data === 1) {
let bpName = window.localStorage.getItem('bp_name')
let bpName = JSON.parse(window.localStorage.getItem('handleUser')).bp_name
if (
this.bank.bank_account_num === '' ||
this.bank.bank_account_name === '' ||
......@@ -327,7 +329,7 @@ export default {
let url = process.env.basePath + 'bp_bank_save'
let param = {
master: {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
bank_lists: this.bankList,
},
}
......@@ -359,11 +361,10 @@ export default {
this.showModalValue = true
},
getBankInfo () {
let vm = this
let id = window.localStorage.getItem('bp_id')
let vm = this
let url = process.env.basePath + 'bp_bank_query'
let param = {
bp_id: id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp
......@@ -405,7 +406,7 @@ export default {
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': window.localStorage.getItem('user_id'),
'bp_id': JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
'bank_account_num': e,
},
}
......
......@@ -364,7 +364,7 @@ export default {
searchLecens: false,
inputNum: false, // 填写业务经办
isSave: false,
isAGENT: this.$route.params.isAGENT,
isAGENT: JSON.parse(window.localStorage.getItem('handleUser')).isAGENT,
isMultiRole: false, // 能否选择多角色
isSelected: false,
hasMultiRole: false, // 是否有第二个角色
......@@ -396,7 +396,7 @@ export default {
academic_background_n: '',
marital_status_n: '',
bp_type: '',
bp_class: this.$route.params.bp_class,
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class,
bp_name: '',
province_name: '',
province_id: '',
......@@ -420,7 +420,7 @@ export default {
working_place_sp: '',
address_sp: '',
user_phone: window.localStorage.user_phone,
bp_id: JSON.parse(window.localStorage.now_user_bp_bind_id).bp_id
bp_id: JSON.parse(window.localStorage.now_user_bp_bind_id).bp_id
},
idCardFront: '', // 身份证正面图片
idCardBack: '', // 身份证反面图片
......@@ -496,13 +496,13 @@ export default {
next(vm => {
vm.isAddNewType = false
if (['/tab/my-info', '/tab/function-center', '/Setting', '/myBindUser'].includes(from.fullPath)) {
if (vm.$route.params.status === 'APPROVED') {
if (JSON.parse(window.localStorage.getItem('handleUser')).status === 'APPROVED') {
vm.isApproved = true
} else {
vm.isApproved = false
}
vm.isMultiRole = vm.$route.params.isMultiRole
vm.multipleRole = JSON.parse(window.localStorage.now_user_bp_bind_id).bp_type
vm.isMultiRole = JSON.parse(window.localStorage.getItem('handleUser')).isMultiRole
vm.multipleRole = JSON.parse(window.localStorage.getItem('handleUser')).bp_type
// window.localStorage.getItem('multipleRole')
vm.list = {}
vm.multiBpType = {}
......@@ -516,7 +516,7 @@ export default {
academic_background_n: '',
marital_status_n: '',
bp_type: '',
bp_class: vm.$route.params.bp_class,
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class,
bp_name: '',
province_name: '',
province_id: '',
......@@ -597,7 +597,7 @@ export default {
academic_background_n: '',
marital_status_n: '',
bp_type: '',
bp_class: vm.$route.params.bp_class,
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class,
bp_name: '',
province_name: '',
province_id: '',
......@@ -778,18 +778,17 @@ export default {
async verified(flag) {
this.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
this.upload_list = [] // 保存之前将待上传列表清空,防止出现重复的图片
let res = await this.saveWord()
if (res) {
let bpId = await this.saveWord()
if (bpId) {
// 查询资料清单
this.loadItemList(flag)
}
},
loadItemList(flag) { // flag用来判断是否需要加载图片文件
let vm = this
let bpId = JSON.parse(window.localStorage.now_user_bp_bind_id).bp_id
if (bpId === 'undefined') {
bpId = null
}
let vm = this
let bpId = JSON.parse(window.localStorage.getItem('handleUser')).bp_id
if (bpId === 'undefined') bpId = null;
let url = process.env.basePath + 'prj_cdd_check_list'
let param = {
master: {
......@@ -824,8 +823,9 @@ export default {
vm.cddItemList.push(item)
}
})
// 查询图片
// 查询图片
if (flag) {
console.log(listTemp);
listTemp.forEach((item, index) => {
if (item.cdd_item !== 'HOUSE_CARD' || item.cdd_item !== 'REAL_EST_CERTIFICATE' || item.cdd_item !== 'CAR_CARD' || item.cdd_item !== 'ASSETS_CARD' || item.cdd_item !== 'FAMILY_REGISTER' || item.cdd_item !== 'MARITAL STATUS') {
vm.load_picture(item.check_id, index, item.cdd_item)
......@@ -982,7 +982,7 @@ export default {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.$router.push({
name: 'NPInvoiceInfo',
name: 'NPInvoiceInfo'
})
} else {
hlsPopup.showError(res.message)
......@@ -1005,7 +1005,8 @@ export default {
// window.localStorage.setItem('bp_id', res.bp_id)
// window.localStorage.setItem('bp_name', vm.baseInfo.bp_name)
// window.localStorage.setItem('bp_type', vm.baseInfo.bp_type)
vm.bindCheck()
window.localStorage.setItem('handleUser', JSON.stringify({...JSON.parse(window.localStorage.getItem('handleUser')), bp_id: res.bp_id, bp_name: vm.baseInfo.bp_name, bp_type: vm.baseInfo.bp_type}));
await vm.bindCheck()
return res.bp_id
} else {
hlsPopup.hideLoading()
......@@ -1076,7 +1077,7 @@ export default {
vm.hlsPopup.showLongCenter('配偶手机号码有误!')
} else {
let bpId = await vm.saveProtocol()
return true
return bpId;
}
},
// 图片上传入口
......@@ -1518,7 +1519,7 @@ export default {
list: vm.typeList,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
returnItem: function (index, obj) {
vm.baseInfo.bp_type = obj.bp_type
vm.baseInfo.bp_type_n = obj.bp_type_n
},
......
......@@ -126,7 +126,7 @@ export default {
let vm = this
let url = process.env.basePath + 'bp_invoice_query'
let param = {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -134,7 +134,7 @@ export default {
if (res.result === 'S') {
vm.invoiceInfo = res.info
if (res.info.invoice_title == '' || res.info.invoice_title == null || res.info.invoice_title == undefined) {
vm.invoiceInfo.invoice_title = window.localStorage.bp_name
vm.invoiceInfo.invoice_title = JSON.parse(window.localStorage.getItem('handleUser')).bp_name
}
vm.addRows(vm.invoiceInfo.invoice_adds)
vm.addRowsLive(vm.invoiceInfo.open_bank)
......@@ -145,9 +145,9 @@ export default {
},
save () {
let vm = this
let url = process.env.basePath + 'bp_invoice_save'
let name = ((window.localStorage.bp_type === 'TENANT' || window.localStorage.bp_type === 'GUTA') && !window.localStorage.getItem('multipleRole')) || ((window.localStorage.multipleRole === 'TENANT' || window.localStorage.multipleRole === 'GUTA') && window.localStorage.getItem('multipleRole')) ? 'AccessoryInfo' : 'NPBankInfo'
vm.invoiceInfo.bp_id = window.localStorage.getItem('bp_id')
let url = process.env.basePath + 'bp_invoice_save'
let name = ['TENANT', 'GUTA'].includes(JSON.parse(window.localStorage.getItem('handleUser')).bp_type) ? 'AccessoryInfo' : 'NPBankInfo';
vm.invoiceInfo.bp_id = JSON.parse(window.localStorage.getItem('handleUser')).bp_id;
vm.invoiceInfo.bp_class = 'NP'
let param = {
master: vm.invoiceInfo,
......@@ -157,7 +157,7 @@ export default {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.$router.push({
name: name,
name: name
})
} else {
hlsPopup.showLongCenter(res.message)
......@@ -249,8 +249,9 @@ export default {
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.$set(vm.invoiceInfo, 'invoice_kind', obj.bp_type)
vm.$set(vm.invoiceInfo, 'invoice_kind_n', obj.bp_type_n)
vm.invoiceInfo = {...vm.invoiceInfo, invoice_kind: obj.bp_type, invoice_kind_n: obj.bp_type_n};
// vm.$set(vm.invoiceInfo, 'invoice_kind', obj.bp_type)
// vm.$set(vm.invoiceInfo, 'invoice_kind_n', obj.bp_type_n)
/* vm.invoiceInfo.invoice_kind = obj.bp_type
vm.invoiceInfo.invoice_kind_n = obj.bp_type_n */
},
......@@ -262,9 +263,10 @@ export default {
list: vm.taxpayerList,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.$set(vm.invoiceInfo, 'taxpayer_type', obj.bp_type)
vm.$set(vm.invoiceInfo, 'taxpayer_type_n', obj.bp_type_n)
returnItem: function (index, obj) {
vm.invoiceInfo = {...vm.invoiceInfo, taxpayer_type: obj.bp_type, taxpayer_type_n: obj.bp_type_n}
// vm.$set(vm.invoiceInfo, 'taxpayer_type', obj.bp_type)
// vm.$set(vm.invoiceInfo, 'taxpayer_type_n', obj.bp_type_n)
/* vm.invoiceInfo.taxpayer_type = obj.bp_type
vm.invoiceInfo.taxpayer_type_n = obj.bp_type_n */
},
......
......@@ -122,7 +122,7 @@ export default {
isApproved: false,
backImg: null,
getBankList: [],
bp_identity: window.localStorage.bp_identity,
bp_identity: JSON.parse(window.localStorage.getItem('handleUser')).bp_identity,
bank_lists: {
bank_account_num: '', // 卡号
bank_account_name: '', // 账户姓名
......@@ -163,13 +163,11 @@ export default {
let vm = this
let url = process.env.basePath + 'bp_attachment_check'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
if (window.localStorage.getItem('authFlag') === 'true') {
console.log(11111111111)
if (window.localStorage.getItem('authFlag') === 'true') {
vm.handSubmit()
} else {
console.log(2222222222)
} else {
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
......@@ -186,7 +184,7 @@ export default {
let vm = this
let url = process.env.basePath + 'bp_bank_query'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -201,7 +199,7 @@ export default {
let vm = this
let url = process.env.basePath + 'bp_elec_check'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -258,7 +256,7 @@ export default {
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': this.$route.params.bp_id,
'bp_id': JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
'bank_account_num': e,
},
}
......@@ -310,7 +308,7 @@ export default {
// 只有自然人需要认证
let url = process.env.basePath + 'bp_query'
let param = {
bp_id: window.localStorage.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then((result) => {
......@@ -357,9 +355,9 @@ export default {
let url = $config.basePath + 'bp_bind_submit'
let param = {
master: {
bp_id: window.localStorage.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
bp_class: 'ORG',
bp_type: window.localStorage.getItem('bp_type'),
bp_type: JSON.parse(window.localStorage.getItem('handleUser')).bp_type,
business_num: window.localStorage.getItem('business_num'),
},
}
......@@ -387,6 +385,7 @@ export default {
let url = $config.basePath + 'auth_user_sign'
let param = {
phone: window.localStorage.user_phone,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id
}
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
......@@ -494,7 +493,7 @@ export default {
let url = $config.basePath + 'bp_bank_save'
let param = {
master: {
bp_id: this.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
bank_lists: [this.bank_lists],
},
}
......
......@@ -459,8 +459,8 @@ export default {
authidCardFrontUpload: '',
authidCardBackUpload: '',
licenseImgUpload: '',
isAGENT: this.$route.params.isAGENT, // 是否为经销商
isMultiRole: this.$route.params.isMultiRole, // 担保人/承租人为true
isAGENT: JSON.parse(window.localStorage.getItem('handleUser')).isAGENT, // 是否为经销商
isMultiRole: JSON.parse(window.localStorage.getItem('handleUser')).isMultiRole, // 担保人/承租人为true
img_url: {},
typeList: [],
backList: [],
......@@ -519,7 +519,7 @@ export default {
organization_code: '',
registered_capital: '',
// business_license_num: '',
bp_class: this.$route.params.bp_class,
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class,
},
authMsg: {
auth_person_name: '',
......@@ -618,7 +618,7 @@ export default {
vm.getBpType()
vm.getProvince()
vm.isAddNewType = false
if (from.fullPath === '/tab/my-info' || from.fullPath === '/tab/function-center') { /* || from.fullPath === '/margin-first-pay' */
if (['/myBindUser', '/tab/my-info', '/tab/function-center'].includes(from.fullPath)) { /* || from.fullPath === '/margin-first-pay' */
vm.bp_type_flag = false
vm.licenseImgUpload = ''
vm.laImgUpload = ''
......@@ -631,11 +631,11 @@ export default {
id_card_date_to: '', // 法定代表人身份证有效期到
}
vm.hasPeople = false
if (vm.$route.params.status === 'APPROVED') {
if (JSON.parse(window.localStorage.getItem('handleUser')).bp_status === 'APPROVED') {
vm.isApproved = true
window.localStorage.setItem('isApproved', vm.isApproved)
}
vm.isMultiRole = vm.$route.params.isMultiRole
vm.isMultiRole = JSON.parse(window.localStorage.getItem('handleUser')).isMultiRole;
window.localStorage.setItem('from', true)
vm.baseInfo = {
agent_username: '',
......@@ -658,7 +658,7 @@ export default {
organization_code: '',
registered_capital: '',
// business_license_num: '',
bp_class: vm.$route.params.bp_class,
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class,
}
vm.authMsg = {
auth_person_name: '',
......@@ -671,7 +671,7 @@ export default {
}
vm.multiBpTypeSelectList = []// 选择的角色
vm.multiRoleList = []// 查询的角色
vm.bp_id = vm.$route.params.bp_id
vm.bp_id = JSON.parse(window.localStorage.getItem('handleUser')).bp_id
vm.idCardFrontUpload = ''
vm.idCardBackUpload = ''
vm.authidCardFrontUpload = ''
......@@ -749,7 +749,7 @@ export default {
organization_code: '',
registered_capital: '',
// business_license_num: '',
bp_class: vm.$route.params.bp_class,
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class,
}
vm.authMsg = {
auth_person_name: '',
......@@ -850,8 +850,8 @@ export default {
let flag = vm.checkHasmultiple()
let param = {
master: {
bp_id: window.localStorage.getItem('bp_id'),
bp_type: window.localStorage.getItem('bp_type'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
bp_type: JSON.parse(window.localStorage.getItem('handleUser')).bp_type,
},
}
if (flag) {
......@@ -878,7 +878,7 @@ export default {
let vm = this
let url = process.env.basePath + 'bp_role_check'
let param = {
bp_id: window.localStorage.getItem('bp_id'),
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
let res = await vm.hlsHttp.post(url, param)
if (res.result === 'S') {
......@@ -933,7 +933,7 @@ export default {
let vm = this
let url = process.env.basePath + 'prj_cdd_check_update'
let param = {
document_id: window.localStorage.bp_id,
document_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
tab_group: 'HLS_ORG_AUTH',
}
vm.hlsPopup.showLoading('请稍候')
......@@ -980,7 +980,7 @@ export default {
}
},
handSubmit () {
let bp_id = this.from ? this.$route.params.bp_id : this.bp_id
let bp_id = this.from ? JSON.parse(window.localStorage.getItem('handleUser')).bp_id : this.bp_id
if (bp_id) {
this.hlsPopup.showConfirm({
title: '提示',
......@@ -991,7 +991,7 @@ export default {
let param = {
master: {
// bp_id: window.localStorage.getItem('user_id'),
bp_id: this.from ? this.$route.params.bp_id : this.bp_id,
bp_id: this.from ? JSON.parse(window.localStorage.getItem('handleUser')).bp_id : this.bp_id,
company_id: '2145',
},
}
......@@ -1031,14 +1031,21 @@ export default {
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.$router.push({
name: 'Invoice',
params: {
window.localStorage.setItem('handleUser', JSON.stringify({
...JSON.parse( window.localStorage.getItem('handleUser')),
bp_id: vm.bp_id,
organization_code: vm.baseInfo.organization_code,
from: vm.from,
bp_name: vm.baseInfo.bp_name,
},
bp_name: vm.baseInfo.bp_name
}));
vm.$router.push({
name: 'Invoice',
// params: {
// bp_id: vm.bp_id,
// organization_code: vm.baseInfo.organization_code,
// from: vm.from,
// bp_name: vm.baseInfo.bp_name,
// },
})
} else {
hlsPopup.showError(res.message)
......@@ -1311,7 +1318,7 @@ export default {
vm.hlsPopup.showLoading('请稍候')
let url = $config.basePath + 'bp_org_bind_save'
let param = {
master: vm.saveInfo,
master: {...vm.saveInfo, bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id, user_phone: window.localStorage.getItem('user_phone')},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -1319,8 +1326,12 @@ export default {
if (res.result === 'S') {
// vm.hlsPopup.showSuccess('保存成功,请去维护附件信息')
vm.bp_id = res.bp_id
window.localStorage.setItem('bp_type', vm.baseInfo.bp_type)
window.localStorage.setItem('bp_id', res.bp_id)
// window.localStorage.setItem('bp_type', vm.baseInfo.bp_type)
// window.localStorage.setItem('bp_id', res.bp_id)
window.localStorage.setItem('handleUser', JSON.stringify({...JSON.parse(window.localStorage.getItem('handleUser')), bp_id: res.bp_id, bp_type: vm.baseInfo.bp_type}));
vm.loadCheckIdAndSaveAtt(res.bp_id)
} else {
vm.hlsPopup.showLongCenter(res.message)
......@@ -1729,7 +1740,7 @@ export default {
let vm = this
let url = process.env.basePath + 'bp_org_info_query'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -1773,7 +1784,7 @@ export default {
let url = process.env.basePath + 'bp_type_save'
let param = {
master: {
bp_id: window.localStorage.getItem('bp_id'),
bp_id:JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
bp_type: vm.multiBpType.bp_type,
},
}
......@@ -1984,7 +1995,7 @@ export default {
vm.authidCardBackAttachmentId = res.lists[0].attachment_id
break
case 'ORG_CODE':
if (!vm.licenseImgUrlFlag) {
if (!vm.licenseImgUrlFlag) {
vm.licenseImg = res.lists[0].url
}
vm.licenseAttachmentId = res.lists[0].attachment_id
......@@ -2006,7 +2017,7 @@ export default {
// 附件查询
loadItemList (flag, type) {
let vm = this
let bpId = vm.from ? window.localStorage.bp_id : vm.bp_id
let bpId = vm.from ? JSON.parse(window.localStorage.getItem('handleUser')).bp_id : vm.bp_id
if (bpId === 'undefined') {
bpId = null
}
......
......@@ -372,7 +372,7 @@ export default {
dowload_list: [], // 下载图片列表
upload_list: [], // 上传图片列表
carInfo: { // 行驶证
bp_id: this.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
vehicle_identify_num: '',
address: '',
brand_model_number: '',
......@@ -387,7 +387,7 @@ export default {
success: '',
},
hauseInfo: { // 房产证
bp_id: this.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
house_owner: '',
public_situation: '',
house_located: '',
......@@ -403,7 +403,7 @@ export default {
land_use_limit: '',
},
propertyInfo: { // 不动产证
bp_id: this.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
right_person: '',
public_situation: '',
house_located: '',
......@@ -419,8 +419,9 @@ export default {
},
watch: {},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'Invoice' && window.localStorage.from === 'true') {
next(vm => {
if (from.name === 'Invoice' && JSON.parse(window.localStorage.getItem('handleUser')).from) {
console.log('1--');
vm.carFlag = false, // 行驶证查看标识,为false则用查询出来的,为true则用拍照出来的
vm.houseFlag = false, // 房产证查看标识,为false则用查询出来的,为true则用拍照出来的
vm.propertyFlag = false, // 不动产证查看标识,为false则用查询出来的,为true则用拍照出来的
......@@ -431,7 +432,7 @@ export default {
vm.houseImg = '',
vm.propertyImg = '', // 不动产识别图片
vm.propertyInfo = { // 不动产证
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
right_person: '',
public_situation: '',
house_located: '',
......@@ -444,7 +445,7 @@ export default {
right_others: '',
}
vm.hauseInfo = { // 房产证
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
house_owner: '',
public_situation: '',
house_located: '',
......@@ -460,7 +461,7 @@ export default {
land_use_limit: '',
}
vm.carInfo = { // 行驶证
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
vehicle_identify_num: '',
address: '',
brand_model_number: '',
......@@ -481,12 +482,13 @@ export default {
vm.dowload_list = []
vm.cddItemList = []
vm.isApproved = window.localStorage.isApproved
vm.bp_id = vm.$route.params.bp_id
vm.bp_id = JSON.parse(window.localStorage.getItem('handleUser')).bp_id
vm.loadItemList(true)
vm.houseQuery()
// vm.carQuery()
// vm.propertyQuery() // 不动产权证查询
} else if (from.name === 'Invoice' && window.localStorage.from === 'false') {
} else if (from.name === 'Invoice' && !JSON.parse(window.localStorage.getItem('handleUser')).from) {
console.log('2--');
vm.carFlag = false, // 行驶证查看标识,为false则用查询出来的,为true则用拍照出来的
vm.houseFlag = false, // 房产证查看标识,为false则用查询出来的,为true则用拍照出来的
vm.propertyFlag = false, // 不动产证查看标识,为false则用查询出来的,为true则用拍照出来的
......@@ -497,7 +499,7 @@ export default {
vm.houseImg = '',
vm.propertyImg = '', // 不动产识别图片
vm.propertyInfo = { // 不动产证
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
right_person: '',
public_situation: '',
house_located: '',
......@@ -510,7 +512,7 @@ export default {
right_others: '',
}
vm.hauseInfo = { // 房产证
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
house_owner: '',
public_situation: '',
house_located: '',
......@@ -526,7 +528,7 @@ export default {
land_use_limit: '',
}
vm.carInfo = { // 行驶证
bp_id: vm.$route.params.bp_id,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
vehicle_identify_num: '',
address: '',
brand_model_number: '',
......@@ -547,7 +549,7 @@ export default {
vm.dowload_list = []
vm.cddItemList = []
vm.isApproved = window.localStorage.isApproved
vm.bp_id = vm.$route.params.bp_id
vm.bp_id = JSON.parse(window.localStorage.getItem('handleUser')).bp_id
vm.loadItemList(false)
}
})
......@@ -934,7 +936,7 @@ export default {
let vm = this
let url = process.env.basePath + 'prj_cdd_check_list'
vm.dowload_list = []
let bpId = window.localStorage.getItem('bp_id')
let bpId = JSON.parse(window.localStorage.getItem('handleUser')).bp_id
if (bpId === 'undefined') {
bpId = null
}
......
......@@ -119,9 +119,9 @@ export default {
open_bank: '',
open_account: '',
}
vm.invoiceInfo.invoice_title = vm.$route.params.bp_name
vm.invoiceInfo.organization_code = vm.$route.params.organization_code
vm.bp_id = vm.$route.params.bp_id
vm.invoiceInfo.invoice_title = JSON.parse(window.localStorage.getItem('handleUser')).bp_name
vm.invoiceInfo.organization_code = JSON.parse(window.localStorage.getItem('handleUser')).organization_code
vm.bp_id =JSON.parse(window.localStorage.getItem('handleUser')).bp_id
vm.invoiceQuery() // 开票信息查询
}
......@@ -169,7 +169,7 @@ export default {
if (res.result === 'S') {
console.log('invoiceInfo', res.info)
vm.invoiceInfo = res.info
vm.invoiceInfo.invoice_title = vm.$route.params.bp_name
vm.invoiceInfo.invoice_title = JSON.parse(window.localStorage.getItem('handleUser')).bp_name
// Object.assign(vm.invoiceInfo, res.info)
vm.addRows(vm.invoiceInfo.invoice_adds)
vm.addRowsLive(vm.invoiceInfo.open_bank)
......@@ -294,8 +294,10 @@ export default {
// },
// })
let vm = this
let url = process.env.basePath + 'bp_invoice_save'
let name = ((window.localStorage.bp_type === 'TENANT' || window.localStorage.bp_type === 'GUTA') && !window.localStorage.getItem('multipleRole')) || ((window.localStorage.multipleRole === 'TENANT' || window.localStorage.multipleRole === 'GUTA') && window.localStorage.getItem('multipleRole')) ? 'Enclosure' : 'BankInfo'
let url = process.env.basePath + 'bp_invoice_save'
let name = ['TENANT', 'GUTA'].includes(JSON.parse(window.localStorage.getItem('handleUser')).bp_type)
? 'Enclosure' : 'BankInfo'
let param = {
bp_id: vm.bp_id,
bp_class: 'ORG',
......
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