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 4e6926c0
authored
Jan 17, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request
!89
2 parents
eb1c83c6
74f5e3b4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
13 deletions
src/views/account/addAccount.vue
src/views/account/editAccount.vue
src/views/baseInfo/index.vue
vue.config.js
src/views/account/addAccount.vue
View file @
4e6926c
<
template
>
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"scrm-main"
v-loading=
"loading"
>
<div
v-show=
"step == 1"
>
<div
v-show=
"step == 1"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
<span>
创建子商户/门店
</span>
<span>
创建子商户/门店
</span>
...
@@ -105,9 +105,12 @@ export default {
...
@@ -105,9 +105,12 @@ export default {
console
.
log
(
value
)
console
.
log
(
value
)
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
callback
(
new
Error
(
'登录账户名不可为 11 位纯数字'
))
callback
(
new
Error
(
'登录账户名不可为 11 位纯数字'
))
}
else
{
callback
()
}
}
}
}
return
{
return
{
loading
:
false
,
editStatus
:
false
,
editStatus
:
false
,
nextStatus
:
false
,
nextStatus
:
false
,
accountTypesRule
:
false
,
accountTypesRule
:
false
,
...
@@ -230,10 +233,13 @@ export default {
...
@@ -230,10 +233,13 @@ export default {
},
},
//下一步
//下一步
handleNext
()
{
handleNext
()
{
console
.
log
(
2222
)
this
.
loading
=
true
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
(
valid
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
(
valid
=>
{
if
(
valid
)
resolve
()
if
(
valid
)
resolve
()
else
{
else
{
this
.
loading
=
false
setTimeout
(()
=>
{
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
'is-error'
)
var
isError
=
document
.
getElementsByClassName
(
'is-error'
)
isError
[
0
].
querySelector
(
'input'
).
focus
()
isError
[
0
].
querySelector
(
'input'
).
focus
()
...
@@ -246,6 +252,7 @@ export default {
...
@@ -246,6 +252,7 @@ export default {
this
.
$refs
.
accountInfoForm
.
validate
(
valid
=>
{
this
.
$refs
.
accountInfoForm
.
validate
(
valid
=>
{
if
(
valid
)
resolve
()
if
(
valid
)
resolve
()
else
{
else
{
this
.
loading
=
false
pm1
.
then
(()
=>
{
pm1
.
then
(()
=>
{
document
.
querySelector
(
'#app'
).
scrollTop
=
1000
document
.
querySelector
(
'#app'
).
scrollTop
=
1000
})
})
...
@@ -257,10 +264,12 @@ export default {
...
@@ -257,10 +264,12 @@ export default {
})
})
})
})
if
(
this
.
accounttypeId
.
length
==
0
)
{
if
(
this
.
accounttypeId
.
length
==
0
)
{
this
.
loading
=
false
this
.
accountTypesRule
=
true
this
.
accountTypesRule
=
true
return
return
}
}
if
(
this
.
accountAddForm
.
merchantType
==
1
&&
this
.
accountAddForm
.
merchantOrgcode
&&
!
util
.
checkIdCard
(
this
.
accountAddForm
.
merchantOrgcode
))
{
if
(
this
.
accountAddForm
.
merchantType
==
1
&&
this
.
accountAddForm
.
merchantOrgcode
&&
!
util
.
checkIdCard
(
this
.
accountAddForm
.
merchantOrgcode
))
{
this
.
loading
=
false
this
.
$message
.
error
(
'请输入正确的身份证号码'
)
this
.
$message
.
error
(
'请输入正确的身份证号码'
)
document
.
querySelector
(
'#app'
).
scrollTop
=
0
document
.
querySelector
(
'#app'
).
scrollTop
=
0
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -282,6 +291,7 @@ export default {
...
@@ -282,6 +291,7 @@ export default {
if
(
this
.
accountAddForm
.
residentPhone
)
{
if
(
this
.
accountAddForm
.
residentPhone
)
{
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
if
(
!
result
)
{
if
(
!
result
)
{
this
.
loading
=
false
this
.
$message
({
this
.
$message
({
message
:
'请输入正确的驻店信息'
,
message
:
'请输入正确的驻店信息'
,
type
:
'warning'
type
:
'warning'
...
@@ -320,6 +330,7 @@ export default {
...
@@ -320,6 +330,7 @@ export default {
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
[
merchant
](
params
).
then
(
res
=>
{
this
.
$apis
.
store
[
merchant
](
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
loading
=
false
this
.
step
=
2
this
.
step
=
2
this
.
nextStatus
=
true
this
.
nextStatus
=
true
if
(
typeof
res
==
'number'
)
{
if
(
typeof
res
==
'number'
)
{
...
...
src/views/account/editAccount.vue
View file @
4e6926c
...
@@ -82,6 +82,8 @@ export default {
...
@@ -82,6 +82,8 @@ export default {
console
.
log
(
value
)
console
.
log
(
value
)
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
callback
(
new
Error
(
'登录账户名不可为 11 位纯数字'
))
callback
(
new
Error
(
'登录账户名不可为 11 位纯数字'
))
}
else
{
callback
()
}
}
}
}
return
{
return
{
...
...
src/views/baseInfo/index.vue
View file @
4e6926c
...
@@ -64,10 +64,12 @@ export default {
...
@@ -64,10 +64,12 @@ export default {
}
}
this
.
$apis
.
baseInfo
.
merchantInfo
(
para
).
then
(
res
=>
{
this
.
$apis
.
baseInfo
.
merchantInfo
(
para
).
then
(
res
=>
{
this
.
blocInfo
=
res
this
.
blocInfo
=
res
if
(
res
.
stores
)
{
this
.
storesList
=
res
.
stores
.
map
(
item
=>
{
this
.
storesList
=
res
.
stores
.
map
(
item
=>
{
item
.
date
=
`
${
this
.
dateFormat
(
item
.
starttime
,
'YYYY.MM.DD'
)}
--
${
this
.
dateFormat
(
item
.
endtime
,
'YYYY.MM.DD'
)}
`
item
.
date
=
`
${
this
.
dateFormat
(
item
.
starttime
,
'YYYY.MM.DD'
)}
--
${
this
.
dateFormat
(
item
.
endtime
,
'YYYY.MM.DD'
)}
`
return
item
return
item
})
})
}
})
})
},
},
dateFormat
:
function
(
dateTime
,
format
=
'yyyy-MM-dd'
)
{
dateFormat
:
function
(
dateTime
,
format
=
'yyyy-MM-dd'
)
{
...
...
vue.config.js
View file @
4e6926c
...
@@ -5,20 +5,18 @@ const publicPath = node_env ? `/child/${packageName}/` : '/'
...
@@ -5,20 +5,18 @@ const publicPath = node_env ? `/child/${packageName}/` : '/'
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
)
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
)
const
CDN_DOMAIN
=
'https://img02.glsx.com.cn/'
const
CDN_DOMAIN
=
'https://img02.glsx.com.cn/'
const
cdn
=
{
const
cdn
=
{
css
:
[
css
:
[
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js
:
[
js
:
[
`
${
CDN_DOMAIN
}
ajax/libs/vue/2.6.11/vue.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vue/2.6.11/vue.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vue-router/3.2.0/vue-router.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vue-router/3.2.0/vue-router.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/index.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/index.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vuex/3.6.2/vuex.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vuex/3.6.2/vuex.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
// 'https://webapi.amap.com/maps?v=1.3&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder'
// 'https://webapi.amap.com/maps?v=1.3&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder'
]
]
}
}
module
.
exports
=
{
module
.
exports
=
{
outputDir
:
`../dist/
${
packageName
}
`
,
outputDir
:
`dist
`
,
publicPath
,
publicPath
,
assetsDir
:
'static'
,
assetsDir
:
'static'
,
productionSourceMap
:
false
,
productionSourceMap
:
false
,
...
@@ -37,13 +35,13 @@ module.exports = {
...
@@ -37,13 +35,13 @@ module.exports = {
jsonpFunction
:
`webpackJsonp_
${
packageName
}
`
jsonpFunction
:
`webpackJsonp_
${
packageName
}
`
},
},
externals
:
{
externals
:
{
'vue'
:
'Vue'
,
vue
:
'Vue'
,
'element-ui'
:
'ELEMENT'
,
'element-ui'
:
'ELEMENT'
,
'vue-router'
:
'VueRouter'
,
'vue-router'
:
'VueRouter'
,
'vuex'
:
'Vuex'
,
vuex
:
'Vuex'
,
'axios'
:
'axios'
,
axios
:
'axios'
,
'echarts'
:
'echarts'
,
echarts
:
'echarts'
,
'AMap'
:
'AMap'
AMap
:
'AMap'
}
}
},
},
devServer
:
{
devServer
:
{
...
@@ -56,8 +54,7 @@ module.exports = {
...
@@ -56,8 +54,7 @@ module.exports = {
}
}
},
},
chainWebpack
:
config
=>
{
chainWebpack
:
config
=>
{
config
.
plugin
(
'html'
)
config
.
plugin
(
'html'
).
tap
(
args
=>
{
.
tap
(
args
=>
{
// args[0].minify.removeComments = false;
// args[0].minify.removeComments = false;
args
[
0
].
cdn
=
cdn
args
[
0
].
cdn
=
cdn
return
args
return
args
...
...
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