Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
b3398f4a
Commit
b3398f4a
authored
Aug 26, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分公司信息
parent
946b66bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
216 additions
and
177 deletions
+216
-177
companyInfoModal.vue
src/views/baseInfo/branchCompany/companyInfoModal.vue
+10
-1
index.vue
src/views/baseInfo/branchCompany/index.vue
+206
-176
No files found.
src/views/baseInfo/branchCompany/companyInfoModal.vue
View file @
b3398f4a
...
...
@@ -452,6 +452,15 @@
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
state
!=
1
){
//上架-验证额外信息
if
(
!
this
.
form
.
addrDetail
){
this
.
$notify
({
title
:
'警告'
,
message
:
"请输入详细地址"
,
type
:
'warning'
,
duration
:
2000
});
return
;
}
if
(
!
this
.
form
.
longitude
){
this
.
$notify
({
title
:
'警告'
,
...
...
@@ -480,7 +489,7 @@
duration
:
2000
});
return
;
}
debugger
}
if
(
!
this
.
form
.
images
){
this
.
tabName
=
"second"
;
this
.
$notify
({
...
...
src/views/baseInfo/branchCompany/index.vue
View file @
b3398f4a
...
...
@@ -26,88 +26,101 @@
<el-option
v-for=
"item in cityRegions4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"简称"
>
<el-input
v-model=
"listQuery.name"
placeholder=
"请输入公司简称"
></el-input>
</el-form-item>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
v-if=
"branchCompany_btn_add"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
type=
"primary"
icon=
"edit"
>
添加
</el-button>
<
form
methods=
"post"
enctype=
"multipart/form-data"
style=
"display:inline-block;margin-left:10px;;"
>
<
el-button
class=
"filter-item"
type=
"primary"
v-waves
@
click=
"choiceImg"
>
导入
</el-button
>
<
input
ref=
"filElem"
type=
"file"
name=
"file"
class=
"upload-file"
@
change=
"getFile($event)"
style=
"display:none;"
>
<
/form
>
<
!--
<form
methods=
"post"
enctype=
"multipart/form-data"
style=
"display:inline-block;margin-left:10px;;"
>
--
>
<
!--
<el-button
class=
"filter-item"
type=
"primary"
v-waves
@
click=
"choiceImg"
>
导入
</el-button>
--
>
<
!--
<input
ref=
"filElem"
type=
"file"
name=
"file"
class=
"upload-file"
@
change=
"getFile($event)"
style=
"display:none;"
>
--
>
<
!--
</form>
--
>
</el-form>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
align=
"center"
label=
"编号"
width=
"65"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
row
.
id
}}
</span>
</
template
>
<el-table-column
type=
"index"
align=
"center"
label=
"序号"
width=
"65"
>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"名
称"
>
<el-table-column
align=
"center"
label=
"公司全
称"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"80"
align=
"center"
label=
"状态"
>
<el-table-column
align=
"center"
label=
"公司简称"
>
<
template
scope=
"scope"
>
<span>
{{
getStatusName
(
scope
.
row
.
status
)
}}
</span>
<span>
{{
scope
.
row
.
companyName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"80"
align=
"center"
label=
"负责人"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
leader
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"负责人联系方式"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
leaderContactInfo
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"租车客服电话"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
vehiceServicePhone
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"旅游客服电话"
>
<el-table-column
width=
"80"
align=
"center"
label=
"状态"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
tourServicePhone
}}
</span>
<span>
{{
getStatusName
(
scope
.
row
.
status
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"
300"
align=
"center"
label=
"地址
"
>
<el-table-column
width=
"
180"
align=
"center"
label=
"股价
"
>
<
template
scope=
"scope"
>
<span>
{{
getAddrStr
(
scope
.
row
)
+
scope
.
row
.
addrDetail
}}
</span>
<span>
{{
scope
.
row
.
price
?
scope
.
row
.
price
/
10000
:
0
}}{{
scope
.
row
.
type
==
1
?
'万/股'
:
'港万/股'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"1
50"
align=
"center"
label=
"经度
"
>
<el-table-column
width=
"1
80"
align=
"center"
label=
"负责人
"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
longitude
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"纬度"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
latitude
}}
</span>
<span>
{{
scope
.
row
.
leader
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"1
80"
align=
"center"
label=
"最后更新时间
"
>
<el-table-column
width=
"1
50"
align=
"center"
label=
"负责人联系方式
"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
updateTime
?
scope
.
row
.
updateTime
:
scope
.
row
.
createTime
}}
</span>
<span>
{{
scope
.
row
.
leaderContactInfo
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"150"
fixed=
"right"
>
<!--<el-table-column width="150" align="center" label="租车客服电话">-->
<!--<template scope="scope">-->
<!--<span>{{scope.row.vehiceServicePhone}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column width="150" align="center" label="旅游客服电话">-->
<!--<template scope="scope">-->
<!--<span>{{scope.row.tourServicePhone}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column width="300" align="center" label="地址">-->
<!--<template scope="scope">-->
<!--<span>{{getAddrStr(scope.row) + scope.row.addrDetail}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column width="150" align="center" label="经度">-->
<!--<template scope="scope">-->
<!--<span>{{scope.row.longitude}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column width="150" align="center" label="纬度">-->
<!--<template scope="scope">-->
<!--<span>{{scope.row.latitude}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column width="180" align="center" label="最后更新时间">-->
<!--<template scope="scope">-->
<!--<span>{{scope.row.updateTime?scope.row.updateTime:scope.row.createTime}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column
align=
"center"
label=
"操作"
width=
"300"
fixed=
"right"
>
<
template
scope=
"scope"
>
<el-button
v-if=
"branchCompany_btn_edit"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
v-if=
"branchCompany_btn_del"
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: red;"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleView(scope.row)"
>
详情
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleSetting(scope.row)"
>
基础信息
</el-button>
<el-button
v-if=
"branchCompany_btn_edit"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleCompanyInfo(scope.row)"
>
公司介绍
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleSettingStock(scope.row)"
>
设置股权
</el-button>
<el-button
v-if=
"branchCompany_btn_del"
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: red;"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -118,85 +131,19 @@
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
</div>
<!-- 对话框相关html元素 -->
<el-dialog
:title=
"textMap[dialogStatus]"
:visible
.
sync=
"dialogFormVisible"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"100px"
>
<el-form-item
label=
"名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"输入名称"
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model
.
number=
"form.status"
placeholder=
"请选择状态"
>
<el-option
v-for=
"(val, key, index) in companyStatusAndCode "
:key=
"val.code"
:label=
"val.val"
:value=
"val.code"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-select
class=
"filter-item"
v-model=
"form.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegionsForm"
>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"省份"
prop=
"addrProvince"
>
<el-select
v-model
.
number=
"form.addrProvince"
placeholder=
"请选择省份(直辖市)"
@
change=
"changeProvince"
>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"城市"
prop=
"addrCity"
>
<el-select
v-model
.
number=
"form.addrCity"
placeholder=
"请选择城市"
@
change=
"changeCity"
>
<el-option
v-for=
"item in cityRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"镇(县)"
prop=
"addrTown"
>
<el-select
v-model
.
number=
"form.addrTown"
placeholder=
"请选择镇(县)"
>
<el-option
v-for=
"item in townRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"负责人"
prop=
"leader"
>
<el-input
v-model=
"form.leader"
placeholder=
"请输入负责人"
></el-input>
</el-form-item>
<el-form-item
label=
"负责人联系方式"
prop=
"leaderContactInfo"
>
<el-input
v-model=
"form.leaderContactInfo"
placeholder=
"请输入负责人联系方式"
></el-input>
</el-form-item>
<el-form-item
label=
"租车客服电话"
prop=
"vehiceServicePhone"
>
<el-input
v-model=
"form.vehiceServicePhone"
placeholder=
"请输入租车客服电话"
></el-input>
</el-form-item>
<el-form-item
label=
"旅游客服电话"
prop=
"tourServicePhone"
>
<el-input
v-model=
"form.tourServicePhone"
placeholder=
"请输入旅游客服电话"
></el-input>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"addrDetail"
>
<el-input
v-model=
"form.addrDetail"
placeholder=
"请输入详细地址"
></el-input>
</el-form-item>
<el-form-item
label=
"经度"
prop=
"longitude"
>
<el-input
v-model
.
number=
"form.longitude"
placeholder=
"请输入经度"
></el-input>
</el-form-item>
<el-form-item
label=
"纬度"
prop=
"latitude"
>
<el-input
v-model
.
number=
"form.latitude"
placeholder=
"请输入纬度"
></el-input>
</el-form-item>
<!-- <el-form-item >-->
<!-- <el-input value="1" v-model="form.type" disabled="true" type="hidden"></el-input>-->
<!-- </el-form-item>-->
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel('form')"
>
取 消
</el-button>
<el-button
v-if=
"dialogStatus=='create'"
type=
"primary"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
v-else
type=
"primary"
@
click=
"update('form')"
>
确 定
</el-button>
</div>
</el-dialog>
<!--公司介绍设置弹框-->
<companyInfoModal
v-if=
"companyInfoVisible"
:row=
"row"
:dialogStatus =
"dialogStatus"
:title=
"textMap[dialogStatus]"
v-on:companyInfoDialogEvent =
"companyInfoDialogEvent"
></companyInfoModal>
<!--股权设置-->
<stockRightModal
v-if=
"stockRightVisible"
:row=
"row"
v-on:stockRightDialogEvent =
"stockRightDialogEvent"
></stockRightModal>
<!--查看详情-->
<info
v-if=
"infoVisible"
:row=
"row"
v-on:infoDialogEvent =
"infoDialogEvent"
></info>
</div>
</template>
<
style
>
.el-dialog__footer
{
border-top
:
1px
solid
#bfcbd9
;
}
</
style
>
<
script
>
import
axios
from
'axios'
;
...
...
@@ -204,7 +151,7 @@
page
,
addObj
,
getObj
,
del
Obj
,
del
eteOne
,
putObj
}
from
'api/base_info/branch_company'
;
...
...
@@ -223,9 +170,16 @@
getAllZone
}
from
'api/base_info/constant/'
;
import
companyInfoModal
from
"./companyInfoModal"
import
stockRightModal
from
"./stockRightModal"
import
info
from
"./info"
export
default
{
name
:
'branchCompany'
,
components
:
{
companyInfoModal
,
stockRightModal
,
info
},
data
()
{
return
{
form
:
{
...
...
@@ -246,6 +200,9 @@
vehiceServicePhone
:
undefined
,
tourServicePhone
:
undefined
},
companyInfoVisible
:
false
,
//公司介绍-弹框
stockRightVisible
:
false
,
//设置股权
infoVisible
:
false
,
//详情弹框
allZoneArr
:[],
//全部片区
provinceRegions
:
[],
//片区下省份数据
rules
:
{
...
...
@@ -307,6 +264,29 @@
trigger
:
'blur'
}
],
leaderContactInfo
:
[
{
required
:
true
,
message
:
'请输入联系人电话'
,
trigger
:
'blur'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'手机号不能为空'
));
}
else
{
const
reg
=
/^
[
1
](([
3
][
0-9
])
|
([
4
][
5,7,9
])
|
([
5
][
0-9
])
|
([
6
][
6
])
|
([
7
][
1,2,3,5,6,7,8
])
|
([
8
][
0-9
])
|
([
9
][
1,8,9
]))[
0-9
]{8}
$/
console
.
log
(
reg
.
test
(
value
));
if
(
reg
.
test
(
value
))
{
callback
();
}
else
{
return
callback
(
new
Error
(
'请输入正确的手机号'
));
}
}
},
trigger
:
'blur'
}
],
addrProvince
:
[
{
required
:
true
,
...
...
@@ -369,12 +349,14 @@
}
]
},
row
:
{},
//编辑弹框参数
list
:
null
,
total
:
null
,
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
,
name
:
undefined
,
//简称
zoneId
:
undefined
,
addrProvince
:
undefined
,
addrCity
:
undefined
,
...
...
@@ -405,13 +387,9 @@
'companyStatusAndCode'
]),
getAllZoneList
(){
this
.
allZoneArr
=
getAllZone
();
return
getAllZone
();
},
// provinceRegions() {
// return getSonRegionByCodes(1);
// },
cityRegions
()
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
addrProvince
))
{
return
null
;
...
...
@@ -439,12 +417,73 @@
},
methods
:
{
/**
*
改变省份,清空城市
*
查看详情
* */
changeProvince
(){
this
.
form
.
addrCity
=
undefined
;
this
.
form
.
addrTown
=
undefined
;
handleView
(
row
){
this
.
row
=
{
id
:
row
.
id
,
companyId
:
row
.
companyId
,
stockId
:
row
.
stockId
};
this
.
infoVisible
=
true
;
},
/**
* 基础信息
* */
handleSetting
(
row
){
this
.
dialogStatus
=
'infoUpdate'
;
this
.
row
=
{
id
:
row
.
id
,
companyId
:
row
.
companyId
}
this
.
companyInfoVisible
=
true
;
//基础信息弹框
},
/**
* 设置股权
* */
handleSettingStock
(
row
){
this
.
row
=
{
stockId
:
row
.
stockId
,
id
:
row
.
id
,
};
this
.
stockRightVisible
=
true
;
},
/**
* 公司介绍
* */
handleCompanyInfo
(
row
){
this
.
dialogStatus
=
'companyInfoUpdate'
;
this
.
row
=
{
id
:
row
.
id
,
companyId
:
row
.
companyId
};
this
.
companyInfoVisible
=
true
;
//公司介绍弹框
},
/**
* 关闭公司介绍弹框
* */
companyInfoDialogEvent
(
e
){
this
.
companyInfoVisible
=
false
;
//公司介绍弹框
if
(
e
){
this
.
getList
();
}
},
/**
* 关闭股权设置弹框
* */
stockRightDialogEvent
(
e
){
this
.
stockRightVisible
=
false
;
//股权设置弹框
if
(
e
){
this
.
getList
();
}
},
/**
* 查看详情-关闭
* */
infoDialogEvent
(){
this
.
infoVisible
=
false
;
},
/**
* 根据片区获取省份数据
* */
...
...
@@ -467,44 +506,20 @@
}
});
},
/**
* 表单里面根据片区获取省份数据
* */
getProvinceRegionsForm
(){
let
that
=
this
;
this
.
form
.
addrCity
=
undefined
;
this
.
form
.
addrProvince
=
undefined
;
this
.
form
.
addrTown
=
undefined
;
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
zoneId
))
{
return
null
;
}
this
.
allZoneArr
.
map
(
function
(
item
){
if
(
item
.
id
==
that
.
form
.
zoneId
){
getSysRegionByIds
(
item
.
provinceIds
).
then
(
response
=>
{
let
listRs
=
undefined
;
if
(
!
that
.
$utils
.
isEmpty
(
response
.
data
))
{
listRs
=
response
.
data
;
}
that
.
provinceRegions
=
listRs
;
});
}
});
},
getValue
(
e
){
this
.
listQuery
.
addrCity
=
undefined
;
},
/**
* 改变城市,清空城镇
* */
changeCity
(){
this
.
form
.
addrTown
=
undefined
;
},
getStatusName
(
code
)
{
if
(
!
this
.
$utils
.
isInteger
(
code
))
{
return
'未知'
;
}
return
this
.
companyStatusAndCode
[
code
].
val
;
},
/**
* 获取分公司列表
* */
getList
()
{
this
.
listLoading
=
true
;
page
(
this
.
listQuery
)
...
...
@@ -550,7 +565,7 @@
handleCreate
()
{
this
.
resetTemp
();
this
.
dialogStatus
=
'create'
;
this
.
dialogFormVisible
=
true
;
this
.
companyInfoVisible
=
true
;
//公司介绍弹框
},
handleUpdate
(
row
)
{
var
that
=
this
;
...
...
@@ -574,23 +589,38 @@
this
.
selectedCity
=
response
.
data
.
addrCity
;
});
},
/**
* 删除
* */
handleDelete
(
row
)
{
let
t
=
this
;
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
delObj
(
row
.
id
)
.
then
(()
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'删除成功'
,
type
:
'success'
,
duration
:
2000
});
const
index
=
this
.
list
.
indexOf
(
row
);
this
.
list
.
splice
(
index
,
1
);
let
params
=
{
id
:
row
.
id
};
deleteOne
(
params
)
.
then
((
res
)
=>
{
if
(
res
.
status
==
200
){
this
.
$notify
({
title
:
'成功'
,
message
:
'删除成功'
,
type
:
'success'
,
duration
:
2000
});
t
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
res
.
message
,
type
:
'error'
,
duration
:
2000
});
}
// const index = this.list.indexOf(row);
// this.list.splice(index, 1);
});
});
},
...
...
@@ -617,7 +647,7 @@
duration
:
2000
});
}
})
}
else
{
return
false
;
...
...
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