Commit 709e23d0 authored by 胡's avatar

fix: 多角色信息修改

parent a6d57512
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://www.xcmgfs.com:8087/r/api"',
fileUploadSvcPath:'"http://www.xcmgfs.com:8087/r/api/app/fileUploadSvc?sysName=XCMG_PROD&apiName="',
appId: '"com.xcmg.app"',
currentVersion: '"0.3.4"'
currentVersion: '"0.3.5"'
}
......@@ -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.4.4"'
currentVersion: '"3.4.5"'
}
......@@ -141,18 +141,18 @@ export default {
console.log('&&&&&&&&&&&&___ios')
// if (!$config.isMobilePlatform) {
// }
// baidumap_location.getCurrentPosition(function (result) {
// if (window.localStorage.getItem('province')) {
// vm.city = window.localStorage.getItem('city')
// vm.province = window.localStorage.getItem('province')
// vm.guessingQuery(vm.city)
// } else {
// vm.city = result.city
// vm.province = result.province
// vm.guessingQuery(result.city)
// }
// }, function (error) {
// })
baidumap_location.getCurrentPosition(function (result) {
if (window.localStorage.getItem('province')) {
vm.city = window.localStorage.getItem('city')
vm.province = window.localStorage.getItem('province')
vm.guessingQuery(vm.city)
} else {
vm.city = result.city
vm.province = result.province
vm.guessingQuery(result.city)
}
}, function (error) {
})
// setTimeout(vm.guessingQuery(), 0)
},
goFunctionHome (data) {
......
......@@ -111,18 +111,18 @@ export default {
// console.log(error)
// }, {enableHighAccuracy: true})
// } else { // ios使用插件定位
// baidumap_location.getCurrentPosition(function (result) {
// console.log('*********** ' + JSON.stringify(result))
// window.localStorage.setItem('province', result.province)
// window.localStorage.setItem('city', result.city)
// vm.places = window.localStorage.getItem('province') + '-' + window.localStorage.getItem('city')
// vm.province = '请选择省'
// vm.city = '请选择市'
// vm.flag = false
// vm.province_flag = true
// }, function (error) {
// console.log('errorerrorerrorerror ' + error)
// })
baidumap_location.getCurrentPosition(function (result) {
console.log('*********** ' + JSON.stringify(result))
window.localStorage.setItem('province', result.province)
window.localStorage.setItem('city', result.city)
vm.places = window.localStorage.getItem('province') + '-' + window.localStorage.getItem('city')
vm.province = '请选择省'
vm.city = '请选择市'
vm.flag = false
vm.province_flag = true
}, function (error) {
console.log('errorerrorerrorerror ' + error)
})
// }
},
......
......@@ -1005,7 +1005,7 @@ 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)
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}));
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, multiRoleList: [...vm.multiRoleList.map(item => item.bp_type), ...vm.multiBpTypeSelectList.map(item => item.bp_type), vm.baseInfo.bp_type]}));
await vm.bindCheck()
return res.bp_id
} else {
......
<template>
<h-view id="np-invoice">
<h-header :proportion="[5,1,1]" class="bar-custom">
<h-header :proportion="[5, 1, 1]" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$routeGo()">
<img src="@/assets/userBind/arrow.png" >
<img src="@/assets/userBind/arrow.png" />
<span>开票信息</span>
</div>
</h-header>
......@@ -18,7 +18,7 @@
placeholder="请选择"
onfocus="this.blur()"
@click="selectTaxpayer"
>
/>
</item>
<item :showArrow="true">
<div slot="name">发票类型</div>
......@@ -30,11 +30,16 @@
placeholder="请选择"
onfocus="this.blur()"
@click="selectInvoiceType"
>
/>
</item>
<item>
<div slot="name">发票抬头</div>
<input slot="content" v-model="invoiceInfo.invoice_title" type="text" placeholder="请输入发票抬头" >
<input
slot="content"
v-model="invoiceInfo.invoice_title"
type="text"
placeholder="请输入发票抬头"
/>
</item>
<item>
<div slot="name">发票地址</div>
......@@ -42,12 +47,16 @@
slot="content"
ref="myTestarea"
v-model="invoiceInfo.invoice_adds"
cols="22" rows="1" type="text" placeholder="请输入发票地址"
@input="addRows(invoiceInfo.invoice_adds)" />
cols="22"
rows="1"
type="text"
placeholder="请输入发票地址"
@input="addRows(invoiceInfo.invoice_adds)"
/>
</item>
<item>
<div slot="name">开户电话</div>
<input slot="content" v-model="invoiceInfo.invoice_tel" type="text" placeholder="请输入开户电话" >
<input slot="content" v-model="invoiceInfo.invoice_tel" type="text" placeholder="请输入开户电话" />
</item>
<item>
<div slot="name">发票开户行</div>
......@@ -65,8 +74,12 @@
<item>
<div slot="name">开户行账号</div>
<input
slot="content" v-model="invoiceInfo.open_account" type="number" pattern="\d*"
placeholder="请输入开户行账号" >
slot="content"
v-model="invoiceInfo.open_account"
type="number"
pattern="\d*"
placeholder="请输入开户行账号"
/>
</item>
</list-item>
</h-content>
......@@ -77,7 +90,7 @@
</template>
<script>
export default {
data () {
data() {
return {
value: '',
invoicList: [],
......@@ -97,7 +110,7 @@ export default {
},
}
},
beforeRouteEnter (to, from, next) {
beforeRouteEnter(to, from, next) {
next(vm => {
if (from.name === 'NPBaseInfo') {
vm.invoiceInfo = {
......@@ -117,12 +130,12 @@ export default {
}
})
},
created () {
created() {
this.getInvoiceType()
this.getTaxpayer()
},
methods: {
getInvoice () {
getInvoice() {
let vm = this
let url = process.env.basePath + 'bp_invoice_query'
let param = {
......@@ -143,10 +156,11 @@ export default {
}
})
},
save () {
save() {
let vm = this
let url = process.env.basePath + 'bp_invoice_save'
let name = ['TENANT', 'GUTA'].includes(JSON.parse(window.localStorage.getItem('handleUser')).bp_type) ? 'AccessoryInfo' : 'NPBankInfo';
let url = process.env.basePath + 'bp_invoice_save'
let roleList = JSON.parse(window.localStorage.getItem('handleUser')).multiRoleList
let name = roleList.some(item => ['TENANT', 'GUTA'].includes(item)) ? 'AccessoryInfo' : 'NPBankInfo';
vm.invoiceInfo.bp_id = JSON.parse(window.localStorage.getItem('handleUser')).bp_id;
vm.invoiceInfo.bp_class = 'NP'
let param = {
......@@ -164,7 +178,7 @@ export default {
}
})
},
addRows (e) {
addRows(e) {
if (e) {
// let addNum = Math.ceil(e.length / 16)
// if (addNum === 0) {
......@@ -186,7 +200,7 @@ export default {
this.$refs.myTestarea.rows = addNum
}
},
addRowsLive (e) {
addRowsLive(e) {
if (e) {
// let addNum = Math.ceil(e.length / 16)
// if (addNum === 0) {
......@@ -208,7 +222,7 @@ export default {
this.$refs.myTestareaLive.rows = addNum
}
},
getInvoiceType () {
getInvoiceType() {
let vm = this
let url = process.env.basePath + 'bp_invoice_kind_query'
let param = {}
......@@ -225,7 +239,7 @@ export default {
}
})
},
getTaxpayer () {
getTaxpayer() {
let vm = this
let url = process.env.basePath + 'bp_taxpayer_type_query'
let param = {}
......@@ -242,14 +256,14 @@ export default {
}
})
},
selectInvoiceType (e) {
selectInvoiceType(e) {
let vm = this
vm.hlsPopup.selectList({
list: vm.invoicList,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.invoiceInfo = {...vm.invoiceInfo, invoice_kind: obj.bp_type, 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
......@@ -257,14 +271,14 @@ export default {
},
})
},
selectTaxpayer (e) {
selectTaxpayer(e) {
let vm = this
vm.hlsPopup.selectList({
list: vm.taxpayerList,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.invoiceInfo = {...vm.invoiceInfo, taxpayer_type: obj.bp_type, 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
......@@ -276,20 +290,20 @@ export default {
}
</script>
<style lang="less" scoped>
input::placeholder{
color: #B4B4B5;
input::placeholder {
color: #b4b4b5;
}
textarea::placeholder {
color: #b4b4b5;
}
textarea {
text-align: right;
color: #666;
resize: none;
}
.save {
color: #fff;
border-radius: 4px;
background-color: @headerColor;
}
textarea::placeholder {
color: #b4b4b5;
}
textarea {
text-align: right;
color:#666;
resize: none;
}
.save {
color: #fff;
border-radius: 4px;
background-color: @headerColor;
}
</style>
......@@ -1036,7 +1036,8 @@ export default {
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,
multiRoleList: [...vm.multiRoleList.map(item => item.bp_type), ...vm.multiBpTypeSelectList.map(item => item.bp_type), vm.baseInfo.bp_type]
}));
vm.$router.push({
name: 'Invoice',
......
......@@ -295,8 +295,11 @@ export default {
// })
let vm = this
let url = process.env.basePath + 'bp_invoice_save'
let name = ['TENANT', 'GUTA'].includes(JSON.parse(window.localStorage.getItem('handleUser')).bp_type)
? 'Enclosure' : 'BankInfo'
let roleList = JSON.parse(window.localStorage.getItem('handleUser')).multiRoleList
let name = roleList.some(item => ['TENANT', 'GUTA'].includes(item)) ? 'Enclosure' : 'BankInfo';
// let name = ['TENANT', 'GUTA'].includes(JSON.parse(window.localStorage.getItem('handleUser')).bp_type)
// ? 'Enclosure' : 'BankInfo'
let param = {
bp_id: vm.bp_id,
......
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