Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
enterprise-serevice-platform-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
enterprise-serevice-platform-web
Commits
8b9e92e0
Commit
8b9e92e0
authored
Nov 01, 2022
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联企业 修复部分bug
parent
edd78e12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
63 deletions
+136
-63
thousand.js
src/utils/thousand.js
+10
-0
AffiliatedEnterprises.vue
...views/personalCenter/components/AffiliatedEnterprises.vue
+126
-63
No files found.
src/utils/thousand.js
View file @
8b9e92e0
...
...
@@ -39,6 +39,16 @@ const thousand = {
}
else
{
return
s
}
},
//用于会显示,带有小数点的数字转化为千分位
decimalFmoney
(
num
)
{
const
res
=
num
.
toString
().
replace
(
/
\d
+/
,
function
(
n
){
// 先提取小数点前后的整数部分
//(\d)(?=(\d{3})正则的意思是匹配连续三个数结尾的数字,例如1234,1后面有234连续三个数的数字,就可以匹配上,匹配的是1这个数字。如果是123,因为1后面是两位数,所以就匹配不上了
return
n
.
replace
(
/
(\d)(?=(\d{3})
+$
)
/g
,
function
(
$1
){
return
$1
+
","
;
});
})
return
res
;
}
}
export
default
thousand
src/views/personalCenter/components/AffiliatedEnterprises.vue
View file @
8b9e92e0
...
...
@@ -887,8 +887,8 @@ export default {
// document.getElementsByClassName('AffiliatedEnterprises-module')[0].scrollIntoView(true)
// },
mounted
()
{
this
.
getAffiliateInfo
()
this
.
getAddressJson
()
this
.
getAffiliateInfo
()
//
this
.
getAddressJson
()
//获取地址json数据
// this.changTitle()
},
methods
:
{
...
...
@@ -1228,28 +1228,61 @@ export default {
}
this
.
form
=
res
.
data
[
0
]
this
.
form
.
registeredCapital
=
this
.
thousand
.
rmoney
(
res
.
data
[
0
].
registeredCapital
)
this
.
Intellectual
[
0
].
intellectualProperty
=
this
.
form
.
intellectualProperty
this
.
Intellectual
[
0
].
patentsNumber
=
this
.
form
.
patentsNumber
this
.
Intellectual
[
0
].
trademarksNumber
=
this
.
form
.
trademarksNumber
this
.
Intellectual
[
0
].
softwareWorksNumber
=
this
.
form
.
softwareWorksNumber
this
.
form
.
registeredCapital
=
this
.
thousand
.
decimalFmoney
(
res
.
data
[
0
].
registeredCapital
)
this
.
Intellectual
[
0
].
intellectualProperty
=
this
.
thousand
.
fmoney
(
this
.
form
.
intellectualProperty
)
this
.
Intellectual
[
0
].
patentsNumber
=
this
.
thousand
.
fmoney
(
this
.
form
.
patentsNumber
)
this
.
Intellectual
[
0
].
trademarksNumber
=
this
.
thousand
.
fmoney
(
this
.
form
.
trademarksNumber
)
this
.
Intellectual
[
0
].
softwareWorksNumber
=
this
.
thousand
.
fmoney
(
this
.
form
.
softwareWorksNumber
)
this
.
ProjectInformation
[
0
].
projectStatus
=
this
.
form
.
projectStatus
this
.
ProjectInformation
[
0
].
projectInvestment
=
this
.
form
.
projectInvestment
this
.
ProjectInformation
[
0
].
projectInvestment
=
this
.
thousand
.
fmoney
(
this
.
form
.
projectInvestment
)
this
.
ProjectInformation
[
0
].
implementationTime
=
this
.
form
.
implementationTime
this
.
VehicleInformation
[
0
].
graduateCompanies
=
this
.
form
.
graduateCompanies
this
.
VehicleInformation
[
0
].
carrierDominanceArea
=
this
.
form
.
carrierDominanceArea
this
.
VehicleInformation
[
0
].
incubationCompanies
=
this
.
form
.
incubationCompanies
if
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
.
length
>=
1
&&
res
.
data
[
0
].
userEnterpriseOperateRelativeList
.
length
<=
3
){
for
(
var
i
=
0
;
i
<
res
.
data
[
0
].
userEnterpriseOperateRelativeList
.
length
;
i
++
){
// console.log(res.rows[0].userEnterpriseOperateRelativeList[i].year)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
year
=
res
.
data
[
0
].
userEnterpriseOperateRelativeList
[
i
].
year
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
operatingIncome
=
this
.
thousand
.
fmoney
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
[
i
].
operatingIncome
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
tax
=
this
.
thousand
.
fmoney
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
[
i
].
tax
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
assetTotal
=
this
.
thousand
.
fmoney
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
[
i
].
assetTotal
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
netProfit
=
this
.
thousand
.
fmoney
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
[
i
].
netProfit
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
mainBusinessIncome
=
this
.
thousand
.
fmoney
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
[
i
].
mainBusinessIncome
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
researchInvestment
=
this
.
thousand
.
fmoney
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
[
i
].
mainBusinessIncome
)
}
}
else
if
(
res
.
data
[
0
].
userEnterpriseOperateRelativeList
.
length
===
0
)
{
this
.
form
.
userEnterpriseOperateRelativeList
=
[
{
year
:
'2022'
,
assetTotal
:
''
,
netProfit
:
''
,
operatingIncome
:
''
,
mainBusinessIncome
:
''
,
tax
:
''
,
researchInvestment
:
''
},
{
year
:
'2021'
,
assetTotal
:
''
,
netProfit
:
''
,
operatingIncome
:
''
,
mainBusinessIncome
:
''
,
tax
:
''
,
researchInvestment
:
''
},
{
year
:
'2020'
,
assetTotal
:
''
,
netProfit
:
''
,
operatingIncome
:
''
,
mainBusinessIncome
:
''
,
tax
:
''
,
researchInvestment
:
''
}
]
}
console
.
log
(
'form=>'
,
this
.
form
)
// if (this.form.address !== '' && this.form.address != null) {
// var province = this.form.address.slice(0, 4)
// var city = this.form.address.slice(4, 8)
// var area = this.form.address.slice(8, 12)
// var address = []
// address.push(province)
// address.push(city)
// address.push(area)
// this.address = address
// }
this
.
dialog
.
dialogVisible
=
false
// location.reload()
this
.
$emit
(
'reload'
,
'关联企业'
)
...
...
@@ -1385,7 +1418,7 @@ export default {
},
/** 切换中移除企业**/
async
deleteInfo
(
row
)
{
console
.
log
(
row
.
id
)
//
console.log(row.id)
const
deleteInfoById
=
await
this
.
$confirm
(
'<span style="color: #333333;font-size: 15px;">确定要移除企业么</span>'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -1400,7 +1433,7 @@ export default {
deleteEnterprisesInterface
(
row
.
id
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
getCurrentAffiliatedEnterprises
().
then
(
res
=>
{
console
.
log
(
res
.
data
)
//
console.log(res.data)
this
.
EnterprisesList
=
res
.
data
// console.log(this.EnterprisesList)
})
...
...
@@ -1418,7 +1451,7 @@ export default {
/** 完善信息**/
updataInfo
(
row
)
{
// 显示企业id
console
.
log
(
row
.
id
)
//
console.log(row.id)
this
.
$router
.
push
({
path
:
'/personalCenter/components/AffiliatedEnterprisesUpdate'
,
query
:
{
...
...
@@ -1429,14 +1462,14 @@ export default {
/** 切换企业**/
switchEnterprises
()
{
console
.
log
(
'切换企业'
)
console
.
log
(
"this.form.id>>>>>"
,
this
.
form
.
id
)
console
.
log
(
"当前企业id为>>>>>"
,
this
.
currentEnterprisesId
)
//
console.log("this.form.id>>>>>", this.form.id)
//
console.log("当前企业id为>>>>>", this.currentEnterprisesId)
this
.
dialog
.
dialogVisible
=
true
console
.
log
(
'-------------------'
)
//
console.log('-------------------')
getCurrentAffiliatedEnterprises
().
then
(
res
=>
{
this
.
EnterprisesList
=
res
.
data
console
.
log
(
'this.EnterprisesList->'
,
this
.
EnterprisesList
)
console
.
log
(
'this.form.id'
,
this
.
form
.
id
)
//
console.log('this.EnterprisesList->', this.EnterprisesList)
//
console.log('this.form.id', this.form.id)
this
.
$nextTick
().
then
(()
=>
{
this
.
EnterprisesList
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
form
.
id
)
{
...
...
@@ -1449,9 +1482,9 @@ export default {
/** 接口测试**/
test
()
{
getAffiliate
().
then
(
res
=>
{
console
.
log
(
res
)
//
console.log(res)
}).
catch
(
err
=>
{
console
.
log
(
err
)
//
console.log(err)
})
},
/** 编辑**/
...
...
@@ -1469,7 +1502,7 @@ export default {
getAffiliateInfo
()
{
getAffiliate
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
res
)
//
console.log(res)
const
list1
=
[]
const
list2
=
[]
const
list3
=
[]
...
...
@@ -1480,47 +1513,34 @@ export default {
}
else
{
this
.
listStatus
=
1
this
.
form
=
res
.
rows
[
0
]
// this.form.name = res.rows[0].name
// console.log("this.form.name>>>",this.form.name)
// console.log("res.rows[0].userEnterpriseTabRelativeList>>>",res.rows[0].userEnterpriseTabRelativeList)
for
(
var
i
=
0
;
i
<
res
.
rows
[
0
].
userEnterpriseTabRelativeList
.
length
;
i
++
)
{
if
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
type
===
'1'
)
{
list1
.
push
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
tabId
)
// console.log(' 企业类型')
}
else
if
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
type
===
'2'
)
{
// console.log(' 企业性质')
list2
.
push
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
tabId
)
}
else
if
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
type
===
'3'
)
{
// console.log(' 所属领域')
list3
.
push
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
tabId
)
}
else
if
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
type
===
'4'
)
{
// console.log(' 企业资质')
list4
.
push
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
tabId
)
}
else
if
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
type
===
'5'
)
{
// console.log(' 企业技术能力')
list5
.
push
(
res
.
rows
[
0
].
userEnterpriseTabRelativeList
[
i
].
tabId
)
}
}
this
.
form
.
registeredCapital
=
this
.
thousand
.
rmoney
(
res
.
rows
[
0
].
registeredCapital
)
// console.log(" this.form.registeredCapital>>>", this.form.registeredCapital)
this
.
form
.
registeredCapital
=
this
.
thousand
.
decimalFmoney
(
res
.
rows
[
0
].
registeredCapital
)
this
.
currentEnterprisesId
=
this
.
form
.
id
this
.
Intellectual
[
0
].
intellectualProperty
=
this
.
form
.
intellectualProperty
this
.
Intellectual
[
0
].
patentsNumber
=
this
.
form
.
patentsNumber
this
.
Intellectual
[
0
].
trademarksNumber
=
this
.
form
.
trademarksNumber
this
.
Intellectual
[
0
].
softwareWorksNumber
=
this
.
form
.
softwareWorksNumber
this
.
Intellectual
[
0
].
intellectualProperty
=
this
.
thousand
.
fmoney
(
this
.
form
.
intellectualProperty
)
this
.
Intellectual
[
0
].
patentsNumber
=
this
.
thousand
.
fmoney
(
this
.
form
.
patentsNumber
)
this
.
Intellectual
[
0
].
trademarksNumber
=
this
.
thousand
.
fmoney
(
this
.
form
.
trademarksNumber
)
this
.
Intellectual
[
0
].
softwareWorksNumber
=
this
.
thousand
.
fmoney
(
this
.
form
.
softwareWorksNumber
)
this
.
ProjectInformation
[
0
].
projectStatus
=
this
.
form
.
projectStatus
this
.
ProjectInformation
[
0
].
projectInvestment
=
this
.
form
.
projectInvestment
this
.
ProjectInformation
[
0
].
projectInvestment
=
this
.
thousand
.
decimalFmoney
(
this
.
form
.
projectInvestment
)
this
.
ProjectInformation
[
0
].
implementationTime
=
this
.
form
.
implementationTime
this
.
VehicleInformation
[
0
].
graduateCompanies
=
this
.
form
.
graduateCompanies
this
.
VehicleInformation
[
0
].
carrierDominanceArea
=
this
.
form
.
carrierDominanceArea
this
.
VehicleInformation
[
0
].
incubationCompanies
=
this
.
form
.
incubationCompanies
console
.
log
(
this
.
form
.
address
)
// console.log('this.form.address', this.form.address)
// console.log(this.form.address)
this
.
object1
.
tabId
=
list1
console
.
log
(
this
.
form
.
enterpriseType
)
// console.log('this.form.enterpriseType>', this.form.enterpriseType)
// console.log(this.form.enterpriseType)
this
.
object2
.
tabId
=
list2
this
.
object3
.
tabId
=
list3
this
.
object4
.
tabId
=
list4
...
...
@@ -1529,7 +1549,7 @@ export default {
policyTabGetByName
(
'企业类型'
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
enterpriseType
=
res
.
data
[
0
].
childrenList
console
.
log
(
"this.enterpriseType>>>>"
,
res
.
data
[
0
].
childrenList
)
//
console.log("this.enterpriseType>>>>", res.data[0].childrenList)
if
(
this
.
typeName1
.
length
>
0
)
{
this
.
typeName1
=
[]
}
...
...
@@ -1537,7 +1557,7 @@ export default {
this
.
object1
.
tabId
.
forEach
(
item
=>
{
this
.
typeName1
.
push
(
this
.
enterpriseType
.
find
(
optionItem
=>
optionItem
.
id
===
item
).
name
)
console
.
log
(
"this.typeName1>>>>"
,
this
.
typeName1
)
//
console.log("this.typeName1>>>>",this.typeName1)
})
}
})
...
...
@@ -1546,26 +1566,26 @@ export default {
// console.log("res.data[0].childrenList>>>",res.data[0].childrenList)
this
.
EnterpriseNature
=
res
.
data
[
0
].
childrenList
if
(
this
.
typeName2
.
length
>
0
)
{
console
.
log
(
'this.typeName2.length'
,
this
.
typeName2
.
length
)
//
console.log('this.typeName2.length', this.typeName2.length)
this
.
typeName2
=
[]
}
this
.
object2
.
tabId
.
forEach
(
item
=>
{
this
.
typeName2
.
push
(
this
.
EnterpriseNature
.
find
(
optionItem
=>
optionItem
.
id
===
item
).
name
)
})
console
.
log
(
"this.typeName2"
,
this
.
typeName2
)
//
console.log("this.typeName2",this.typeName2)
}
})
policyTabGetByName
(
'所属领域'
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
BelongsField
=
res
.
data
[
0
].
childrenList
if
(
this
.
typeName3
.
length
>
0
)
{
console
.
log
(
'this.typeName3.length'
,
this
.
typeName3
.
length
)
//
console.log('this.typeName3.length', this.typeName3.length)
this
.
typeName3
=
[]
}
console
.
log
(
'this.typeName3.length'
,
this
.
typeName3
.
length
)
//
console.log('this.typeName3.length', this.typeName3.length)
this
.
object3
.
tabId
.
forEach
(
item
=>
{
console
.
log
(
'typeName3'
,
item
)
//
console.log('typeName3', item)
this
.
typeName3
.
push
(
this
.
BelongsField
.
find
(
optionItem
=>
optionItem
.
id
===
item
).
name
)
})
}
...
...
@@ -1574,12 +1594,12 @@ export default {
if
(
res
.
code
===
200
)
{
this
.
EnterpriseQualification
=
res
.
data
[
0
].
childrenList
if
(
this
.
typeName4
.
length
>
0
)
{
console
.
log
(
'this.typeName4.length'
,
this
.
typeName4
.
length
)
//
console.log('this.typeName4.length', this.typeName4.length)
this
.
typeName4
=
[]
}
console
.
log
(
'this.typeName4.length'
,
this
.
typeName4
.
length
)
//
console.log('this.typeName4.length', this.typeName4.length)
this
.
object4
.
tabId
.
forEach
(
item
=>
{
console
.
log
(
'item'
,
item
)
//
console.log('item', item)
this
.
typeName4
.
push
(
this
.
EnterpriseQualification
.
find
(
optionItem
=>
optionItem
.
id
===
item
).
name
)
})
}
...
...
@@ -1588,16 +1608,59 @@ export default {
if
(
res
.
code
===
200
)
{
this
.
EnterpriseTechnical
=
res
.
data
[
0
].
childrenList
if
(
this
.
typeName5
.
length
>
0
)
{
console
.
log
(
'this.typeName5.length'
,
this
.
typeName5
.
length
)
//
console.log('this.typeName5.length', this.typeName5.length)
this
.
typeName5
=
[]
}
console
.
log
(
'this.typeName5.length'
,
this
.
typeName5
.
length
)
//
console.log('this.typeName5.length', this.typeName5.length)
this
.
object5
.
tabId
.
forEach
(
item
=>
{
console
.
log
(
'item'
,
item
)
//
console.log('item', item)
this
.
typeName5
.
push
(
this
.
EnterpriseTechnical
.
find
(
optionItem
=>
optionItem
.
id
===
item
).
name
)
})
}
})
if
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
.
length
>=
1
&&
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
.
length
<=
3
){
for
(
var
i
=
0
;
i
<
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
.
length
;
i
++
){
// console.log(res.rows[0].userEnterpriseOperateRelativeList[i].year)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
year
=
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
[
i
].
year
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
operatingIncome
=
this
.
thousand
.
fmoney
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
[
i
].
operatingIncome
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
tax
=
this
.
thousand
.
fmoney
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
[
i
].
tax
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
assetTotal
=
this
.
thousand
.
fmoney
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
[
i
].
assetTotal
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
netProfit
=
this
.
thousand
.
fmoney
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
[
i
].
netProfit
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
mainBusinessIncome
=
this
.
thousand
.
fmoney
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
[
i
].
mainBusinessIncome
)
this
.
form
.
userEnterpriseOperateRelativeList
[
i
].
researchInvestment
=
this
.
thousand
.
fmoney
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
[
i
].
mainBusinessIncome
)
}
}
else
if
(
res
.
rows
[
0
].
userEnterpriseOperateRelativeList
.
length
===
0
)
{
this
.
form
.
userEnterpriseOperateRelativeList
=
[
{
year
:
'2022'
,
assetTotal
:
''
,
netProfit
:
''
,
operatingIncome
:
''
,
mainBusinessIncome
:
''
,
tax
:
''
,
researchInvestment
:
''
},
{
year
:
'2021'
,
assetTotal
:
''
,
netProfit
:
''
,
operatingIncome
:
''
,
mainBusinessIncome
:
''
,
tax
:
''
,
researchInvestment
:
''
},
{
year
:
'2020'
,
assetTotal
:
''
,
netProfit
:
''
,
operatingIncome
:
''
,
mainBusinessIncome
:
''
,
tax
:
''
,
researchInvestment
:
''
}
]
}
}
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment