Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 61639f16
authored
Aug 22, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
创建商户样式调整
1 parent
16889dcc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
80 deletions
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/baseInfo/editInfo.vue
src/views/account/addAccount.vue
View file @
61639f1
...
...
@@ -10,15 +10,15 @@
</div>
<div
class=
"account-body scrm-box-f"
>
<div
class=
"form-title"
>
账户信息
</div>
<el-form
ref=
"accountInfoForm"
:model=
"accountInfoForm"
class=
"account-body-form"
label-width=
"120px"
:rules=
"accountInfoRules"
>
<el-form
ref=
"accountInfoForm"
:model=
"accountInfoForm"
class=
"account-body-form"
:rules=
"accountInfoRules"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"上级商户"
>
<el-form-item
label=
"上级商户
:
"
>
{{
accountDetail
.
merchantName
}}
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"上级商户模式"
>
<el-form-item
label=
"上级商户模式
:
"
>
{{
accountDetail
.
merchantModelName
}}
</el-form-item>
</el-col>
...
...
@@ -26,8 +26,8 @@
<el-row>
<el-col
:span=
"12"
>
<div
class=
"el-form-item level-row is-required"
>
<label
class=
"el-form-item__label"
style=
"width: 120px"
>
账户等级
</label>
<div
class=
"el-form-item__content"
style=
"margin-left: 120px"
>
<label
class=
"el-form-item__label"
>
账户等级:
</label>
<div
class=
"el-form-item__content"
>
<el-select
size=
"small"
:disabled=
"nextStatus"
v-model=
"accountDetail.merchantAccountLevel"
placeholder=
"请选择"
>
<el-option
v-for=
"item in accountLevel"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
></el-option>
</el-select>
...
...
@@ -37,12 +37,12 @@
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"登录账户名"
prop=
"merchantLoginAccount"
>
<el-form-item
label=
"登录账户名
:
"
prop=
"merchantLoginAccount"
>
<el-input
:disabled=
"nextStatus"
size=
"small"
maxlength=
"15"
v-model=
"accountInfoForm.merchantLoginAccount"
placeholder=
"请输入登录账户名"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"登录密码"
prop=
"merchantLoginPassword"
>
<el-form-item
label=
"登录密码
:
"
prop=
"merchantLoginPassword"
>
<el-input
maxlength=
"20"
:disabled=
"nextStatus"
size=
"small"
type=
"password"
v-model=
"accountInfoForm.merchantLoginPassword"
placeholder=
"请输入登录密码(必须包含6-20个字母+数字)"
show-password
></el-input>
</el-form-item>
</el-col>
...
...
@@ -50,8 +50,8 @@
<el-row>
<el-col
:span=
"16"
>
<div
data-v-995a4ff0=
""
class=
"el-form-item is-required"
>
<label
for=
"merchantLoginAccount"
class=
"el-form-item__label"
style=
"width: 120px"
>
账户类型
</label>
<div
class=
"el-form-item__content
"
style=
"margin-left: 120px
"
>
<label
for=
"merchantLoginAccount"
class=
"el-form-item__label"
>
账户类型:
</label>
<div
class=
"el-form-item__content
account-type
"
>
<div
data-v-995a4ff0=
""
class=
"el-input el-input--small"
>
<auto-button
v-for=
"(item, index) in accountDetail.accountTypes"
:key=
"index"
:btnLabel=
"item.accounttypeName"
:btnValue=
"item.accounttypeId"
:stopClick=
"nextStatus"
@
getBtnStatus=
"getBtnStatus"
></auto-button>
</div>
...
...
@@ -441,7 +441,6 @@ export default {
padding-left
:
20px
;
}
&
-form
{
width
:
80%
;
margin
:
20px
auto
;
.form-row
{
/deep/
.el-form-item__content
{
...
...
@@ -574,4 +573,23 @@ export default {
z-index
:
999
;
//
box-shadow
:
0px
-1px
1px
0px
rgba
(
88
,
80
,
255
,
0.1
);
}
/
deep
/
{
.el-form-item__content
{
display
:
flex
;
}
.el-form-item__label
{
width
:
154px
!important
;
}
.el-form-item__content
{
width
:
404px
;
margin-left
:
0
!important
;
}
}
.account-type
{
/deep/
{
.el-input
{
min-width
:
1000px
!important
;
}
}
}
</
style
>
src/views/account/components/baseInfo.vue
View file @
61639f1
This diff is collapsed.
Click to expand it.
src/views/baseInfo/editInfo.vue
View file @
61639f1
...
...
@@ -12,7 +12,7 @@
<div
class=
"information-title"
>
修改企业信息
</div>
<div
class=
"information-form-box"
>
<el-form
ref=
"baseForm"
:model=
"infoForm"
class=
"account-body-form"
label-width=
"154px"
:rules=
"baseFormRules"
>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
:detailAddressLabel=
"detailAddressLabel"
></Province>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
@
selectAddressByMap=
"selectAddressByMap"
:detailAddressLabel=
"detailAddressLabel"
></Province>
<!--
<el-form-item
size=
"small"
label=
"商户地址:"
class=
"map-row"
>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
></Province>
<el-input
class=
"input-width"
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
...
...
@@ -35,13 +35,13 @@
</el-form-item>
</el-form>
</div>
<GLDialog
:visible
.
sync=
"dialogMapVisible"
:mode=
"'big'"
bigTitle=
"选择地址"
>
<
!--
<
GLDialog
:visible
.
sync=
"dialogMapVisible"
:mode=
"'big'"
bigTitle=
"选择地址"
>
<map-view
ref=
"mapForm"
:mapHeight=
"mapHeight"
></map-view>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogMapVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"getAddress"
>
确 定
</el-button>
</span>
</GLDialog>
</GLDialog>
-->
<!--
<GLFooter
style=
"z-index: 2"
>
<el-button
type=
"primary"
@
click=
"handleSave"
>
提交
</el-button>
<el-button
@
click=
"goback"
>
取消
</el-button>
...
...
@@ -57,7 +57,7 @@
<
script
>
import
util
from
'@/utils/util'
import
mapView
from
'@/components/mapView/index'
//
import mapView from '@/components/mapView/index'
import
SelectBrand
from
'./selectBrand.vue'
import
TelPosition
from
'./telPosition.vue'
import
Province
from
'@/components/province-city/index.vue'
...
...
@@ -65,7 +65,7 @@ export default {
name
:
'EditInfo'
,
components
:
{
Province
,
mapView
,
//
mapView,
SelectBrand
,
TelPosition
},
...
...
@@ -109,7 +109,7 @@ export default {
}
},
mounted
()
{
this
.
$refs
.
provinceForm
.
provinceList
()
//
this.$refs.provinceForm.provinceList()
this
.
getUserInfo
()
},
methods
:
{
...
...
@@ -157,7 +157,14 @@ export default {
this
.
infoForm
.
businessType
=
businessType
.
map
(
item
=>
(
item
=
parseInt
(
item
)))
}
// 省市回显
this
.
$refs
.
provinceForm
.
init
(
this
.
infoForm
.
provinceName
,
this
.
infoForm
.
cityName
)
var
provinceData
=
{
province
:
this
.
infoForm
.
provinceName
,
city
:
this
.
infoForm
.
cityName
,
fullAddress
:
this
.
infoForm
.
merchantAddress
,
lng
:
this
.
infoForm
.
lng
,
lat
:
this
.
infoForm
.
lat
}
this
.
$refs
.
provinceForm
.
init
(
provinceData
)
if
(
!
this
.
infoForm
.
merchantBrandMain
)
{
this
.
infoForm
.
merchantBrandMain
=
[]
}
else
{
...
...
@@ -181,80 +188,90 @@ export default {
}
})
},
getAddress
()
{
if
(
!
this
.
$refs
.
mapForm
.
address
)
{
this
.
$message
.
error
(
'请选择地址'
)
return
}
this
.
infoForm
.
merchantAddress
=
this
.
$refs
.
mapForm
.
address
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
this
.
infoForm
.
lat
=
lnglat
.
lat
this
.
infoForm
.
lng
=
lnglat
.
lng
var
fullAddress
=
''
var
provincecode
=
''
if
(
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
)
{
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
this
.
addressData
.
fullAddress
=
fullAddress
this
.
addressData
.
provincecode
=
provincecode
// this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
// this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode
}
else
{
fullAddress
=
this
.
addressData
.
fullAddress
provincecode
=
this
.
addressData
.
provincecode
}
// 获取省市
var
province
=
''
var
city
=
''
if
(
fullAddress
)
{
province
=
fullAddress
.
province
city
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
}
else
{
province
=
this
.
infoForm
.
provinceName
city
=
this
.
infoForm
.
cityName
provincecode
=
this
.
infoForm
.
cityCode
}
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
province
)
if
(
municipality
)
{
city
=
city
.
slice
(
0
,
2
)
+
'城区'
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
city
=
city
.
slice
(
0
,
2
)
+
'城区'
)
:
(
city
=
city
.
slice
(
0
,
2
)
+
'郊县'
)
}
}
// 判断省市是否匹配
if
(
this
.
infoForm
.
provinceName
)
{
if
(
this
.
infoForm
.
provinceName
!==
province
&&
this
.
infoForm
.
cityName
!==
city
)
{
this
.
$message
.
error
(
'您选择的地址错误,请重新选择'
)
this
.
infoForm
.
merchantAddress
=
''
return
}
}
this
.
dialogMapVisible
=
false
this
.
infoForm
.
provinceName
=
province
this
.
infoForm
.
cityName
=
city
// 当直接点击选择地址时,获取省市ID
this
.
$refs
.
provinceForm
.
init
(
province
,
city
)
},
//
getAddress() {
//
if (!this.$refs.mapForm.address) {
//
this.$message.error('请选择地址')
//
return
//
}
//
this.infoForm.merchantAddress = this.$refs.mapForm.address
//
let lnglat = this.$refs.mapForm.lnglat
//
this.infoForm.lat = lnglat.lat
//
this.infoForm.lng = lnglat.lng
//
var fullAddress = ''
//
var provincecode = ''
//
if (this.$refs.mapForm.geocoderAddress.addressComponent) {
//
fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
//
provincecode = this.$refs.mapForm.geocoderAddress.adcode
//
this.addressData.fullAddress = fullAddress
//
this.addressData.provincecode = provincecode
//
// this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
//
// this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode
//
} else {
//
fullAddress = this.addressData.fullAddress
//
provincecode = this.addressData.provincecode
//
}
//
// 获取省市
//
var province = ''
//
var city = ''
//
if (fullAddress) {
//
province = fullAddress.province
//
city = fullAddress.city ? fullAddress.city : fullAddress.district
//
} else {
//
province = this.infoForm.provinceName
//
city = this.infoForm.cityName
//
provincecode = this.infoForm.cityCode
//
}
//
const municipalities = ['北京市', '天津市', '上海市', '重庆市']
//
var municipality = municipalities.find(item => item == province)
//
if (municipality) {
//
city = city.slice(0, 2) + '城区'
//
if (municipality === '重庆市') {
//
provincecode = provincecode.slice(0, 4)
//
provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县')
//
}
//
}
//
// 判断省市是否匹配
//
if (this.infoForm.provinceName) {
//
if (this.infoForm.provinceName !== province && this.infoForm.cityName !== city) {
//
this.$message.error('您选择的地址错误,请重新选择')
//
this.infoForm.merchantAddress = ''
//
return
//
}
//
}
//
this.dialogMapVisible = false
//
this.infoForm.provinceName = province
//
this.infoForm.cityName = city
//
// 当直接点击选择地址时,获取省市ID
//
this.$refs.provinceForm.init(province, city)
//
},
// 获取省
selectProvince
(
provinceName
,
provinceCode
)
{
selectProvince
(
val
)
{
this
.
infoForm
.
merchantAddress
=
''
this
.
infoForm
.
cityName
=
''
this
.
infoForm
.
provinceName
=
provinceN
ame
this
.
infoForm
.
provinceCode
=
provinceC
ode
this
.
infoForm
.
provinceName
=
val
.
n
ame
this
.
infoForm
.
provinceCode
=
val
.
adc
ode
},
// 获取市
selectCity
(
cityName
,
cityCode
)
{
if
(
cityN
ame
)
{
this
.
infoForm
.
cityName
=
cityN
ame
this
.
infoForm
.
cityCode
=
cityC
ode
selectCity
(
val
)
{
if
(
val
.
n
ame
)
{
this
.
infoForm
.
cityName
=
val
.
n
ame
this
.
infoForm
.
cityCode
=
val
.
adc
ode
}
else
{
this
.
infoForm
.
cityName
=
''
this
.
infoForm
.
cityCode
=
''
}
this
.
infoForm
.
merchantAddress
=
''
},
// 通过地图选择省市和详细地址
selectAddressByMap
(
val
)
{
console
.
log
(
val
)
const
{
provinceName
,
cityName
,
fullAddress
,
lat
,
lng
}
=
val
this
.
infoForm
.
merchantAddress
=
fullAddress
this
.
infoForm
.
provinceName
=
provinceName
this
.
infoForm
.
cityName
=
cityName
this
.
infoForm
.
lat
=
lat
this
.
infoForm
.
lng
=
lng
},
// 展示驻点电话弹框
showTelDia
()
{
this
.
$refs
.
telDialog
.
init
(
this
.
infoForm
.
residentPhone
)
...
...
@@ -352,4 +369,15 @@ export default {
//
min-width
:
200px
;
flex
:
1
;
}
/
deep
/
{
.el-form-item__content
{
width
:
432px
;
}
.tree-box
{
border
:
1px
solid
#e5e5e5
;
}
.el-checkbox
:last-of-type
{
margin-right
:
7px
;
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment