Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 1fdea4a3
authored
Aug 23, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix v4.10.0 线上问题
1 parent
d8dda4c4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
400 additions
and
442 deletions
src/common/util.js
src/layout/header-aside/components/header-user/index.vue
src/libs/util.js
src/router/index.js
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/auth.js
src/views/customer/customerList.vue
src/views/financeManage/account/offlineAccountList.vue
src/views/financeManage/account/onlineAccountList.vue
src/views/financeManage/account/serviceAccount/serviceOfflineList.vue
src/views/financeManage/account/serviceAccount/serviceOnlineList.vue
src/views/goods/commodity.vue
src/views/goods/drawerDetail.vue
src/views/systemConfig/merchant/viewDetail.vue
src/views/systemConfig/qRcodeDialog.vue
src/views/systemConfig/serviceManage.vue
src/common/util.js
View file @
1fdea4a
/* eslint-disable standard/computed-property-even-spacing */
// import Vue from 'vue'
import
{
Message
,
MessageBox
,
Loading
}
from
'element-ui'
import
{
Message
,
MessageBox
,
Loading
}
from
"element-ui"
// import moment from 'moment'
import
dayjs
from
'dayjs'
let
loadingInstance
=
''
import
dayjs
from
"dayjs"
let
loadingInstance
=
""
export
const
Util
=
{
/**
* 简单alert
...
...
@@ -18,18 +17,18 @@ export const Util = {
*/
msg
:
function
(
options
)
{
MessageBox
({
title
:
options
.
title
||
''
,
type
:
options
.
type
||
'error'
,
message
:
options
.
message
||
''
,
className
:
options
.
className
||
''
,
title
:
options
.
title
||
""
,
type
:
options
.
type
||
"error"
,
message
:
options
.
message
||
""
,
className
:
options
.
className
||
""
,
showCancelButton
:
options
.
showCancelButton
||
false
,
confirmButtonText
:
options
.
confirmButtonText
||
'确认'
,
cancelButtonText
:
options
.
cancelButtonText
||
'取消'
,
confirmButtonColor
:
options
.
confirmButtonColor
||
'#1989fa'
,
cancelButtonColor
:
options
.
cancelButtonColor
||
'#000'
,
confirmButtonText
:
options
.
confirmButtonText
||
"确认"
,
cancelButtonText
:
options
.
cancelButtonText
||
"取消"
,
confirmButtonColor
:
options
.
confirmButtonColor
||
"#1989fa"
,
cancelButtonColor
:
options
.
cancelButtonColor
||
"#000"
,
dangerouslyUseHTMLString
:
true
,
callback
:
function
(
action
,
done
)
{
if
(
action
==
'confirm'
)
{
if
(
action
==
"confirm"
)
{
if
(
options
.
success
)
{
options
.
success
(
done
)
}
...
...
@@ -57,10 +56,10 @@ export const Util = {
*/
Info
:
function
(
options
)
{
Message
({
message
:
options
.
message
||
'提示'
,
type
:
options
.
type
||
'error'
,
message
:
options
.
message
||
"提示"
,
type
:
options
.
type
||
"error"
,
duration
:
options
.
time
||
2000
,
onClose
:
options
.
onClose
||
''
onClose
:
options
.
onClose
||
""
})
},
...
...
@@ -69,10 +68,10 @@ export const Util = {
*/
Tips
:
function
(
options
)
{
Message
({
message
:
options
.
message
||
'提示'
,
message
:
options
.
message
||
"提示"
,
duration
:
options
.
duration
||
3000
,
type
:
options
.
type
||
'text'
,
icon
:
options
.
icon
||
''
type
:
options
.
type
||
"text"
,
icon
:
options
.
icon
||
""
})
},
...
...
@@ -81,7 +80,7 @@ export const Util = {
*/
loading
:
function
(
message
)
{
loadingInstance
=
Loading
.
service
({
text
:
message
||
'加载中...'
text
:
message
||
"加载中..."
})
},
...
...
@@ -137,7 +136,7 @@ export const Util = {
const
d
=
time
.
getDate
()
return
{
date
:
y
+
'/'
+
m
+
'/'
+
d
date
:
y
+
"/"
+
m
+
"/"
+
d
}
},
...
...
@@ -149,10 +148,10 @@ export const Util = {
let
hash
const
oParams
=
{}
const
hashes
=
window
.
location
.
href
.
slice
(
window
.
location
.
href
.
indexOf
(
'?'
)
+
1
)
.
split
(
'&'
)
.
slice
(
window
.
location
.
href
.
indexOf
(
"?"
)
+
1
)
.
split
(
"&"
)
for
(
let
i
=
0
;
i
<
hashes
.
length
;
i
++
)
{
hash
=
hashes
[
i
].
split
(
'='
)
hash
=
hashes
[
i
].
split
(
"="
)
vars
.
push
(
hash
[
0
])
oParams
[
hash
[
0
]]
=
hash
[
1
]
}
...
...
@@ -177,7 +176,7 @@ export const Util = {
date2
.
setDate
(
date1
.
getDate
()
+
time
)
const
_date
=
date2
.
getFullYear
()
+
'-'
+
(
date2
.
getMonth
()
+
1
)
+
'-'
+
date2
.
getDate
()
date2
.
getFullYear
()
+
"-"
+
(
date2
.
getMonth
()
+
1
)
+
"-"
+
date2
.
getDate
()
return
{
date
:
_date
,
...
...
@@ -191,7 +190,7 @@ export const Util = {
* 日期格式转换
*/
dateFormate
:
function
(
str
,
type
)
{
let
txt
=
'YYYY-MM-DD'
let
txt
=
"YYYY-MM-DD"
if
(
type
)
{
txt
=
type
}
...
...
@@ -204,7 +203,7 @@ export const Util = {
*/
cutStr
:
function
(
str
,
num
)
{
if
(
!
str
)
{
return
''
return
""
}
let
m
=
10
...
...
@@ -213,39 +212,41 @@ export const Util = {
m
=
num
}
if
(
str
.
length
>
m
)
{
n
=
str
.
slice
(
0
,
m
)
+
'...'
n
=
str
.
slice
(
0
,
m
)
+
"..."
}
return
n
},
/**
* 深克隆 所有原型链上的对象和属性
* 例: const bar=deepClone(foo)
* console.log(bar===foo) false
* @param {*} obj
*/
deepClone
:
function
(
obj
)
{
// Handle the 3 simple types, and null or undefined or function
if
(
obj
==
null
||
typeof
obj
!==
'object'
)
return
obj
// Handle Date
if
(
obj
instanceof
Date
)
{
const
copy
=
new
Date
()
copy
.
setTime
(
obj
.
getTime
())
return
copy
}
// Handle Array or Object
if
((
obj
instanceof
Array
)
|
(
obj
instanceof
Object
))
{
const
copy
=
obj
instanceof
Array
?
[]
:
{}
for
(
var
attr
in
obj
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
attr
))
{
copy
[
attr
]
=
Util
.
deepClone
(
obj
[
attr
])
}
}
return
copy
}
throw
new
Error
(
"Unable to clone obj! Its type isn't supported."
)
},
// /**
// * 深克隆 所有原型链上的对象和属性
// * 例: const bar=deepClone(foo)
// * console.log(bar===foo) false
// * @param {*} obj
// */
// deepClone: function (obj) {
// // Handle the 3 simple types, and null or undefined or function
// if (obj == null || typeof obj !== "object") return obj
// // Handle Date
// if (obj instanceof Date) {
// const copy = new Date()
// copy.setTime(obj.getTime())
// return copy
// }
// // Handle Array or Object
// if ((obj instanceof Array) | (obj instanceof Object)) {
// const copy = obj instanceof Array ? [] : {}
// for (var attr in obj) {
// // if (Object.prototype.hasOwnProperty.call(attr)) {
// if (obj.hasOwnProperty(attr)) {
// copy[attr] = Util.deepClone(obj[attr])
// console.log("copy[attr] ", copy[attr])
// }
// }
// return copy
// }
// throw new Error("Unable to clone obj! Its type isn't supported.")
// },
/**
* url下载文件
...
...
@@ -254,7 +255,7 @@ export const Util = {
downLoadFile
:
function
(
url
)
{
// console.log(row)
// return
const
Temp
=
document
.
createElement
(
'a'
)
const
Temp
=
document
.
createElement
(
"a"
)
// Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id
Temp
.
href
=
url
// console.log(url)
...
...
@@ -270,7 +271,7 @@ export const Util = {
* 将json的key值进行大小写转换
*/
jsonKeysToCase
:
function
(
json
,
type
)
{
if
(
typeof
json
==
'object'
)
{
if
(
typeof
json
==
"object"
)
{
var
tempJson
=
JSON
.
parse
(
JSON
.
stringify
(
json
))
toCase
(
tempJson
)
return
tempJson
...
...
@@ -279,7 +280,7 @@ export const Util = {
}
function
toCase
(
json
)
{
if
(
typeof
json
==
'object'
)
{
if
(
typeof
json
==
"object"
)
{
if
(
Array
.
isArray
(
json
))
{
json
.
forEach
(
function
(
item
)
{
toCase
(
item
)
...
...
@@ -287,7 +288,7 @@ export const Util = {
}
else
{
for
(
var
key
in
json
)
{
var
item
=
json
[
key
]
if
(
typeof
item
==
'object'
)
{
if
(
typeof
item
==
"object"
)
{
toCase
(
item
)
}
delete
json
[
key
]
...
...
@@ -324,5 +325,5 @@ export const showModal = Util.msg
export
const
showToast
=
Util
.
Info
export
const
showLoading
=
Util
.
loading
export
const
hideLoading
=
Util
.
closeLoading
export
const
deepClone
=
Util
.
deepClone
//
export const deepClone = Util.deepClone
export
const
downLoadFile
=
Util
.
downLoadFile
src/layout/header-aside/components/header-user/index.vue
View file @
1fdea4a
...
...
@@ -261,7 +261,7 @@ export default {
this
.
notice
.
warningTips
(
'部分导入失败,请修改后重新导入'
)
setTimeout
(()
=>
{
downLoadFile
(
ele
.
url
)
}
,
index
*
3
000
)
}
,
index
*
7
000
)
}
else
{
this
.
notice
.
okTips
(
'导入成功'
)
}
...
...
src/libs/util.js
View file @
1fdea4a
import
cookies
from
'./util.cookies'
import
db
from
'./util.db'
import
log
from
'./util.log'
import
permision
from
'./util.permision'
import
cookies
from
"./util.cookies"
import
db
from
"./util.db"
import
log
from
"./util.log"
import
permision
from
"./util.permision"
const
util
=
{
cookies
,
db
,
...
...
@@ -15,7 +15,7 @@ const util = {
*/
util
.
title
=
function
(
titleText
)
{
const
processTitle
=
process
.
env
.
VUE_APP_TITLE
window
.
document
.
title
=
`
${
processTitle
}${
titleText
?
` |
${
titleText
}
`
:
''
}
`
window
.
document
.
title
=
`
${
processTitle
}${
titleText
?
` |
${
titleText
}
`
:
""
}
`
}
/**
...
...
@@ -23,13 +23,13 @@ util.title = function (titleText) {
* @param {String} url 地址
*/
util
.
open
=
function
(
url
,
target
)
{
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
url
)
a
.
setAttribute
(
'target'
,
target
||
'_blank'
)
a
.
setAttribute
(
'id'
,
'd2admin-link-temp'
)
var
a
=
document
.
createElement
(
"a"
)
a
.
setAttribute
(
"href"
,
url
)
a
.
setAttribute
(
"target"
,
target
||
"_blank"
)
a
.
setAttribute
(
"id"
,
"d2admin-link-temp"
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
document
.
body
.
removeChild
(
document
.
getElementById
(
'd2admin-link-temp'
))
document
.
body
.
removeChild
(
document
.
getElementById
(
"d2admin-link-temp"
))
}
/**
* 深克隆 所有原型链上的对象和属性
...
...
@@ -37,27 +37,72 @@ util.open = function (url, target) {
* console.log(bar===foo) false
* @param {*} obj
*/
util
.
deepClone
=
(
obj
)
=>
{
// Handle the 3 simple types, and null or undefined or function
if
(
obj
==
null
||
typeof
obj
!==
'object'
)
return
obj
// Handle Date
if
(
obj
instanceof
Date
)
{
const
copy
=
new
Date
()
copy
.
setTime
(
obj
.
getTime
())
return
copy
if
(
typeof
obj
!==
"object"
)
{
return
obj
}
// Handle Array or Object
if
((
obj
instanceof
Array
)
|
(
obj
instanceof
Object
))
{
const
copy
=
obj
instanceof
Array
?
[]
:
{}
for
(
var
attr
in
obj
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
attr
))
{
copy
[
attr
]
=
util
.
deepClone
(
obj
[
attr
])
}
if
(
Array
.
isArray
(
obj
))
{
return
util
.
deepCloneArray
(
obj
)
}
else
{
return
util
.
deepCloneObj
(
obj
)
}
}
util
.
deepCloneArray
=
(
arr
)
=>
{
// function deepCloneArray(arr) {
const
target
=
[]
arr
.
forEach
((
it
)
=>
{
if
(
typeof
it
===
"object"
)
{
target
.
push
(
util
.
deepClone
(
it
))
}
else
{
target
.
push
(
it
)
}
return
copy
})
return
target
}
util
.
deepCloneObj
=
(
target
)
=>
{
const
map
=
new
WeakMap
()
function
isObject
(
target
)
{
return
(
(
typeof
target
===
"object"
&&
target
)
||
typeof
target
===
"function"
)
}
throw
new
Error
(
"Unable to clone obj! Its type isn't supported."
)
function
clone
(
data
)
{
if
(
!
isObject
(
data
))
{
return
data
}
if
([
Date
,
RegExp
].
includes
(
data
.
constructor
))
{
return
new
data
.
constructor
(
data
)
}
if
(
typeof
data
===
"function"
)
{
return
new
Function
(
"return "
+
data
.
toString
())()
}
const
exist
=
map
.
get
(
data
)
if
(
exist
)
{
return
exist
}
const
keys
=
Reflect
.
ownKeys
(
data
)
const
allDesc
=
Object
.
getOwnPropertyDescriptors
(
data
)
const
result
=
Object
.
create
(
Object
.
getPrototypeOf
(
data
),
allDesc
)
map
.
set
(
data
,
result
)
keys
.
forEach
((
key
)
=>
{
const
val
=
data
[
key
]
if
(
isObject
(
val
))
{
result
[
key
]
=
clone
(
val
)
}
else
{
result
[
key
]
=
val
}
})
return
result
}
return
clone
(
target
)
}
/**
* 深度递归搜索
* @param {Array} arr 你要搜索的数组
...
...
@@ -88,7 +133,7 @@ util.colorToRgb = (sColor, alpha) => {
sColor
=
sColor
.
toLowerCase
()
if
(
sColor
&&
reg
.
test
(
sColor
))
{
if
(
sColor
.
length
===
4
)
{
var
sColorNew
=
'#'
var
sColorNew
=
"#"
for
(
var
i
=
1
;
i
<
4
;
i
+=
1
)
{
sColorNew
+=
sColor
.
slice
(
i
,
i
+
1
).
concat
(
sColor
.
slice
(
i
,
i
+
1
))
}
...
...
@@ -97,12 +142,12 @@ util.colorToRgb = (sColor, alpha) => {
// 处理六位的颜色值
var
sColorChange
=
[]
for
(
let
i
=
1
;
i
<
7
;
i
+=
2
)
{
sColorChange
.
push
(
parseInt
(
'0x'
+
sColor
.
slice
(
i
,
i
+
2
)))
sColorChange
.
push
(
parseInt
(
"0x"
+
sColor
.
slice
(
i
,
i
+
2
)))
}
if
(
alpha
||
alpha
===
0
||
alpha
===
'0'
)
{
return
`rgba(
${
sColorChange
.
join
(
','
)}
,
${
alpha
}
)`
if
(
alpha
||
alpha
===
0
||
alpha
===
"0"
)
{
return
`rgba(
${
sColorChange
.
join
(
","
)}
,
${
alpha
}
)`
}
return
`rgb(
${
sColorChange
.
join
(
','
)}
)`
return
`rgb(
${
sColorChange
.
join
(
","
)}
)`
}
else
{
return
sColor
}
...
...
@@ -116,7 +161,7 @@ util.resetForm = function (formName) {
this
.
$nextTick
(()
=>
{
for
(
var
key
in
this
[
formName
])
{
if
(
this
[
formName
].
hasOwnProperty
(
key
))
{
this
[
formName
][
key
]
=
''
this
[
formName
][
key
]
=
""
}
}
this
.
$refs
[
formName
]
&&
this
.
$refs
[
formName
].
resetFields
()
...
...
@@ -129,9 +174,10 @@ util.resetForm = function (formName) {
*/
util
.
formatTime
=
function
(
time
)
{
return
{
startTime
:
time
?
time
[
0
]
+
' '
+
'00:00:00'
:
''
,
endTime
:
time
?
time
[
1
]
+
' '
+
'23:59:59'
:
''
startTime
:
time
?
time
[
0
]
+
" "
+
"00:00:00"
:
""
,
endTime
:
time
?
time
[
1
]
+
" "
+
"23:59:59"
:
""
}
}
export
default
util
export
const
deepClone
=
util
.
deepClone
src/router/index.js
View file @
1fdea4a
import
Vue
from
'vue'
import
VueRouter
from
'vue-router'
import
Vue
from
"vue"
import
VueRouter
from
"vue-router"
// 进度条
import
NProgress
from
'nprogress'
import
'nprogress/nprogress.css'
import
NProgress
from
"nprogress"
import
"nprogress/nprogress.css"
import
store
from
'@/store/index'
import
store
from
"@/store/index"
import
util
from
'@/libs/util.js'
import
util
from
"@/libs/util.js"
// 路由数据
import
routes
from
'./routes'
import
routes
from
"./routes"
const
originalPush
=
VueRouter
.
prototype
.
push
// 解决连续点击路由异常问题 limin
VueRouter
.
prototype
.
push
=
function
push
(
location
,
onResolve
,
onReject
)
{
...
...
@@ -23,19 +23,19 @@ VueRouter.prototype.push = function push(location, onResolve, onReject) {
// return originalPush.call(this, location).catch(err => err)
return
(
originalPush
.
call
(
this
,
location
)
&&
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
originalPush
.
call
(
this
,
location
).
catch
(
(
err
)
=>
err
)
)
}
Vue
.
use
(
VueRouter
)
// console.log(routes)
// 导出路由 在 main.js 里使用
const
router
=
new
VueRouter
({
routes
})
const
setCurrent
=
path
=>
{
return
new
Promise
(
async
resolve
=>
{
path
!==
'/login'
&&
(
await
store
.
dispatch
(
'd2admin/page/currentSet'
,
path
))
const
setCurrent
=
(
path
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
path
!==
"/login"
&&
(
await
store
.
dispatch
(
"d2admin/page/currentSet"
,
path
))
resolve
()
})
}
...
...
@@ -55,10 +55,10 @@ router.beforeEach(async (to, from, next) => {
// 进度条
NProgress
.
start
()
// 关闭搜索面板
store
.
commit
(
'd2admin/search/set'
,
false
)
if
(
from
.
name
===
null
&&
to
.
path
!==
'/login'
&&
!
source
)
{
store
.
commit
(
"d2admin/search/set"
,
false
)
if
(
from
.
name
===
null
&&
to
.
path
!==
"/login"
&&
!
source
)
{
// 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
await
store
.
dispatch
(
'd2admin/auth/init'
)
await
store
.
dispatch
(
"d2admin/auth/init"
)
// await store.dispatch('d2admin/account/load')
next
(
to
.
path
)
}
else
{
...
...
@@ -66,27 +66,27 @@ router.beforeEach(async (to, from, next) => {
// sessionstorage 用户存在继续当前路由 不存在 跳转登录 防止页面关闭还可以打开页面
next
()
}
else
{
if
(
to
.
path
===
'/login'
)
{
if
(
to
.
path
===
"/login"
)
{
// 如果是登录页面路径,就直接next()
next
()
}
else
{
// 不然就跳转到登录;
await
store
.
dispatch
(
'd2admin/account/logout'
)
next
(
'/login'
)
await
store
.
dispatch
(
"d2admin/account/logout"
)
next
(
"/login"
)
}
}
}
})
router
.
afterEach
(
to
=>
{
router
.
afterEach
(
(
to
)
=>
{
// 进度条
NProgress
.
done
()
// 多页控制 打开新的页面
store
.
dispatch
(
'd2admin/page/open'
,
to
)
store
.
dispatch
(
"d2admin/page/open"
,
to
)
// 更改标题
util
.
title
(
to
.
meta
.
title
)
// 保存当前页面meta信息
store
.
dispatch
(
'd2admin/auth/setCurrentPageMeta'
,
to
.
meta
)
store
.
dispatch
(
"d2admin/auth/setCurrentPageMeta"
,
to
.
meta
)
})
export
const
ResetRouter
=
()
=>
...
...
src/store/modules/d2admin/modules/account.js
View file @
1fdea4a
import
util
from
'@/libs/util.js'
import
{
AccountLogin
,
getAuths
,
getUserInfo
}
from
'@api/sys.account'
import
util
from
"@/libs/util.js"
import
{
AccountLogin
,
getAuths
,
getUserInfo
}
from
"@api/sys.account"
// import { SUPPER_ADMIN } from '@/common/constants'
import
{
localRoutes
}
from
'@/router/routes'
import
md5
from
'js-md5'
import
{
localRoutes
}
from
"@/router/routes"
import
md5
from
"js-md5"
export
default
{
namespaced
:
true
,
actions
:
{
...
...
@@ -36,18 +36,18 @@ export default {
userInfo
:
{}
})
}
else
{
util
.
cookies
.
set
(
'token'
,
accountInfo
.
sessionId
)
getUserInfo
({}).
then
(
async
userInfo
=>
{
util
.
cookies
.
set
(
"token"
,
accountInfo
.
sessionId
)
getUserInfo
({}).
then
(
async
(
userInfo
)
=>
{
userInfo
.
beSuper
=
userInfo
.
loginAccount
.
isAdmin
==
1
userInfo
.
detail
=
userInfo
.
merchant
Object
.
keys
(
userInfo
.
loginAccount
).
forEach
(
item
=>
{
Object
.
keys
(
userInfo
.
loginAccount
).
forEach
(
(
item
)
=>
{
if
(
userInfo
.
loginAccount
[
item
]
&&
!
userInfo
.
detail
[
item
])
{
userInfo
.
detail
[
item
]
=
userInfo
.
loginAccount
[
item
]
}
})
userInfo
.
merchantAccountLevel
=
userInfo
.
detail
.
merchantAccountLevel
await
dispatch
(
'getAuth'
,
{
await
dispatch
(
"getAuth"
,
{
userInfo
:
userInfo
,
accountInfo
:
accountInfo
})
...
...
@@ -59,8 +59,8 @@ export default {
})
}
})
.
catch
(
err
=>
{
console
.
log
(
'err: '
,
err
)
.
catch
(
(
err
)
=>
{
console
.
log
(
"err: "
,
err
)
reject
(
err
)
})
})
...
...
@@ -72,29 +72,32 @@ export default {
*/
getAuth
({
commit
,
dispatch
},
{
userInfo
,
accountInfo
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getAuths
({}).
then
(
async
res
=>
{
getAuths
({}).
then
(
async
(
res
)
=>
{
userInfo
.
detail
.
merchantId
=
userInfo
.
detail
.
merchantNo
var
routeAll
=
util
.
permision
.
flatten
(
Object
.
values
(
localRoutes
))
var
indexPage
=
routeAll
.
find
(
item
=>
item
.
authId
===
'907'
)
routeAll
.
splice
(
routeAll
.
findIndex
(
item
=>
item
.
authId
===
'907'
),
1
)
var
indexPage
=
routeAll
.
find
((
item
)
=>
item
.
authId
===
"907"
)
routeAll
.
splice
(
routeAll
.
findIndex
((
item
)
=>
item
.
authId
===
"907"
),
1
)
routeAll
.
unshift
(
indexPage
)
if
(
userInfo
.
detail
.
accountType
!==
7
)
{
!
res
.
map
(
i
=>
i
.
authId
).
includes
(
'907'
)
&&
!
res
.
map
(
(
i
)
=>
i
.
authId
).
includes
(
"907"
)
&&
res
.
unshift
({
authId
:
'907'
,
name
:
'总览'
,
parentId
:
'1'
authId
:
"907"
,
name
:
"总览"
,
parentId
:
"1"
})
}
var
tempAuths
=
[]
var
targetRoutes
=
res
.
beSuper
?
routeAll
:
res
.
map
(
i
=>
i
.
authId
)
var
targetRoutes
=
res
.
beSuper
?
routeAll
:
res
.
map
(
(
i
)
=>
i
.
authId
)
routeAll
.
map
(
i
=>
i
.
authId
)
.
map
(
(
i
)
=>
i
.
authId
)
.
forEach
((
item
,
index
)
=>
{
targetRoutes
.
includes
(
item
)
&&
tempAuths
.
push
(
routeAll
[
index
])
if
(
routeAll
[
index
].
hasOwnProperty
(
'addRoutePath'
))
{
routeAll
[
index
].
addRoutePath
.
forEach
(
k
=>
{
if
(
!
tempAuths
.
map
(
m
=>
m
.
authId
).
includes
(
k
.
authId
))
{
if
(
routeAll
[
index
].
hasOwnProperty
(
"addRoutePath"
))
{
routeAll
[
index
].
addRoutePath
.
forEach
(
(
k
)
=>
{
if
(
!
tempAuths
.
map
(
(
m
)
=>
m
.
authId
).
includes
(
k
.
authId
))
{
tempAuths
.
push
(
k
)
}
})
...
...
@@ -104,19 +107,20 @@ export default {
// util.permision.flatten(Object.values(localRoutes))
// .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) :
// tempAuths
console
.
log
(
tempAuths
)
const
authes
=
tempAuths
await
dispatch
(
'd2admin/auth/set'
,
authes
,
{
root
:
true
})
await
dispatch
(
"d2admin/auth/set"
,
authes
,
{
root
:
true
})
// delete accountInfo.authes
// 初始化权限
await
dispatch
(
'd2admin/auth/init'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/auth/init"
,
null
,
{
root
:
true
})
// // 设置 vuex 用户信息
await
dispatch
(
'd2admin/user/set'
,
"d2admin/user/set"
,
{
info
:
userInfo
,
accountInfo
},
{
root
:
true
}
)
// // 用户登录后从持久化数据加载一系列的设置
await
dispatch
(
'load'
)
await
dispatch
(
"load"
)
// 结束
resolve
(
userInfo
)
})
...
...
@@ -131,11 +135,11 @@ export default {
/**
* @description 注销
*/
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
// 删除cookie
// util.cookies.remove('uuid')
await
dispatch
(
'd2admin/user/clear'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/base/clear'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/user/clear"
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/base/clear"
,
null
,
{
root
:
true
})
// await commit('d2admin/page/setCurrent', null, { root: true })
// await commit('d2admin/auth/set', null, { root: true })
resolve
()
...
...
@@ -146,26 +150,26 @@ export default {
* @param {Object} context
*/
load
({
dispatch
})
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
// DB -> store 加载用户名
await
dispatch
(
'd2admin/user/load'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/user/load"
,
null
,
{
root
:
true
})
// DB -> store 加载下载列表
await
dispatch
(
'd2admin/user/downLoadListLoad'
,
'dowloadList'
,
{
await
dispatch
(
"d2admin/user/downLoadListLoad"
,
"dowloadList"
,
{
root
:
true
})
await
dispatch
(
'd2admin/user/downLoadListLoad'
,
'updateList'
,
{
await
dispatch
(
"d2admin/user/downLoadListLoad"
,
"updateList"
,
{
root
:
true
})
// DB -> store 加载主题
await
dispatch
(
'd2admin/theme/load'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/theme/load"
,
null
,
{
root
:
true
})
// DB -> store 加载页面过渡效果设置
await
dispatch
(
'd2admin/transition/load'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/transition/load"
,
null
,
{
root
:
true
})
// DB -> store 持久化数据加载上次退出时的多页列表
await
dispatch
(
'd2admin/page/openedLoad'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/page/openedLoad"
,
null
,
{
root
:
true
})
// DB -> store 持久化数据加载侧边栏折叠状态
await
dispatch
(
'd2admin/menu/asideCollapseLoad'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/menu/asideCollapseLoad"
,
null
,
{
root
:
true
})
// DB -> store 持久化数据加载全局尺寸
await
dispatch
(
'd2admin/size/load'
,
null
,
{
root
:
true
})
await
dispatch
(
"d2admin/size/load"
,
null
,
{
root
:
true
})
// DB - > 初始化 基础数据
// await dispatch('d2admin/base/init', null, { root: true })
// 后台接口 -> store
...
...
src/store/modules/d2admin/modules/auth.js
View file @
1fdea4a
...
...
@@ -4,9 +4,9 @@
* @Last Modified by: chenwq
* @Last Modified time: 2021-05-06 14:16:23
*/
import
util
from
'@/libs/util.js'
import
router
,
{
ResetRouter
}
from
'@/router'
import
{
localRoutes
,
frameInRoutes
,
sys
}
from
'@/router/routes'
import
util
from
"@/libs/util.js"
import
router
,
{
ResetRouter
}
from
"@/router"
import
{
localRoutes
,
frameInRoutes
,
sys
}
from
"@/router/routes"
export
default
{
namespaced
:
true
,
...
...
@@ -60,13 +60,13 @@ export default {
},
actions
:
{
save2db
({
state
,
dispatch
})
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
// 设置数据
dispatch
(
'd2admin/db/set'
,
"d2admin/db/set"
,
{
dbName
:
'database'
,
path
:
'source'
,
dbName
:
"database"
,
path
:
"source"
,
value
:
state
.
source
,
user
:
true
},
...
...
@@ -81,11 +81,11 @@ export default {
* @param {obj} source 需要保存的权限资源
*/
set
({
state
,
dispatch
},
source
)
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
// 检查这个主题在主题列表里是否存在
state
.
source
=
source
// 持久化数据 防止刷新 数据 丢失
await
dispatch
(
'save2db'
)
await
dispatch
(
"save2db"
)
// end
resolve
()
})
...
...
@@ -95,7 +95,7 @@ export default {
* @param {obj} source 需要保存的权限资源
*/
setCurrentPageMeta
({
commit
,
state
},
meta
)
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
state
.
meta
=
meta
// commit('setMeta', meta)
// console.log(state)
...
...
@@ -108,18 +108,19 @@ export default {
* @param {Object} context
*/
load
({
state
,
dispatch
})
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
if
(
!
state
.
source
)
{
state
.
source
=
await
dispatch
(
'd2admin/db/get'
,
"d2admin/db/get"
,
{
dbName
:
'database'
,
path
:
'source'
,
dbName
:
"database"
,
path
:
"source"
,
user
:
true
},
{
root
:
true
}
)
}
// console.log(state.source)
// end
resolve
(
state
.
source
)
})
...
...
@@ -129,18 +130,18 @@ export default {
* @param {*} param0
*/
init
({
state
,
dispatch
})
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
// 获取权限资源点
const
__source
=
await
dispatch
(
'load'
)
await
dispatch
(
'_initRoutes'
,
__source
)
await
dispatch
(
'_initByRole'
,
__source
)
const
__source
=
await
dispatch
(
"load"
)
await
dispatch
(
"_initRoutes"
,
__source
)
await
dispatch
(
"_initByRole"
,
__source
)
// end
resolve
(
state
.
source
)
})
},
_initRoutes
({
state
},
source
)
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
try
{
const
{
route
,
btn
}
=
util
.
permision
.
packRoutesBtns
(
localRoutes
,
...
...
@@ -151,8 +152,8 @@ export default {
router
.
addRoutes
(
frameInRoutes
)
state
.
btns
=
btn
}
catch
(
error
)
{
if
(
error
.
message
===
'参数错误'
&&
!
source
)
{
router
.
replace
(
'/login'
)
if
(
error
.
message
===
"参数错误"
&&
!
source
)
{
router
.
replace
(
"/login"
)
return
false
}
}
...
...
@@ -162,10 +163,10 @@ export default {
},
_initByRole
({
commit
},
source
)
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
const
__aMenus
=
util
.
permision
.
packAsideMenus
(
localRoutes
,
source
)
await
commit
(
'd2admin/page/init'
,
frameInRoutes
,
{
root
:
true
})
await
commit
(
'd2admin/menu/asideSet'
,
__aMenus
,
{
root
:
true
})
await
commit
(
"d2admin/page/init"
,
frameInRoutes
,
{
root
:
true
})
await
commit
(
"d2admin/menu/asideSet"
,
__aMenus
,
{
root
:
true
})
// await commit('d2admin/search/init', __aMenus, { root: true })
// end
resolve
()
...
...
@@ -176,7 +177,7 @@ export default {
state
.
meta
=
{}
state
.
btns
=
{}
state
.
btnIdAll
=
[]
await
dispatch
(
'save2db'
)
await
dispatch
(
"save2db"
)
}
},
mutations
:
{
...
...
src/views/customer/customerList.vue
View file @
1fdea4a
...
...
@@ -270,6 +270,7 @@ export default {
},
mounted
()
{
console
.
log
(
this
.
$router
)
if
(
this
.
userInfo
.
beSuper
)
{
getParkStore
({}).
then
(
res
=>
{
res
.
forEach
(
item
=>
{
...
...
src/views/financeManage/account/offlineAccountList.vue
View file @
1fdea4a
...
...
@@ -409,7 +409,7 @@ export default {
}
]
this
.
actionSetDownloadList
({
list
,
type
:
'dowloadList'
})
this
.
handleClose
()
//
this.handleClose()
// })
}
}
...
...
src/views/financeManage/account/onlineAccountList.vue
View file @
1fdea4a
...
...
@@ -470,7 +470,7 @@ export default {
}
]
this
.
actionSetDownloadList
({
list
,
type
:
'dowloadList'
})
this
.
handleClose
()
//
this.handleClose()
// })
}
}
...
...
src/views/financeManage/account/serviceAccount/serviceOfflineList.vue
View file @
1fdea4a
...
...
@@ -292,7 +292,7 @@ export default {
}
]
this
.
actionSetDownloadList
({
list
,
type
:
'dowloadList'
})
this
.
handleClose
()
//
this.handleClose()
// })
}
}
...
...
src/views/financeManage/account/serviceAccount/serviceOnlineList.vue
View file @
1fdea4a
...
...
@@ -413,7 +413,7 @@ export default {
}
]
this
.
actionSetDownloadList
({
list
,
type
:
'dowloadList'
})
this
.
handleClose
()
//
this.handleClose()
// })
}
}
...
...
src/views/goods/commodity.vue
View file @
1fdea4a
...
...
@@ -323,8 +323,8 @@ export default {
},
mounted
()
{
const
$store
=
this
.
$store
.
getters
[
'd2admin/auth/curBtns'
]
console
.
log
(
$store
)
//
const $store = this.$store.getters['d2admin/auth/curBtns']
//
console.log($store)
this
.
baseData
.
brandList
=
_
.
cloneDeep
(
brandMerchantList
)
var
allOpt
=
{
confId
:
''
,
confValue
:
'全部'
}
this
.
baseData
.
brandList
.
unshift
(
allOpt
)
...
...
src/views/goods/drawerDetail.vue
View file @
1fdea4a
<!-- 查看详情 -->
<
template
>
<el-drawer
size=
"60%"
class=
"drawerContainer"
:with-header=
"false"
:visible
.
sync=
"drawerDetailVisible"
:before-close=
"handleDrawerClose"
>
<div
class=
"d2-drawer-content car-txt"
style=
"background: #F2F4F7;"
>
<el-drawer
size=
"60%"
class=
"drawerContainer"
:with-header=
"false"
:visible
.
sync=
"drawerDetailVisible"
:before-close=
"handleDrawerClose"
>
<div
class=
"d2-drawer-content car-txt"
style=
"background: #F2F4F7;"
>
<div
class=
"d2-drawer-block title-block"
>
<p
class=
"parentGoods"
>
<p
class=
"parentGoods"
>
{{
commodityInfo
.
goodsInfo
.
goodsName
}}
<span
class=
"parent-type"
>
{{
commodityInfo
.
goodsInfo
.
goodsTypeName
}}
</span>
class=
"parent-type"
>
{{
commodityInfo
.
goodsInfo
.
goodsTypeName
}}
</span>
</p>
<p
class=
"examineP"
v-if=
"examineFlag"
>
审核人:
{{
userInfo
.
loginAccount
.
userName
}}
<p
class=
"examineP"
v-if=
"examineFlag"
>
审核人:
{{
userInfo
.
loginAccount
.
userName
}}
</p>
<p
class=
"close-icon"
@
click=
"handleDrawerClose"
>
×
<p
class=
"close-icon"
@
click=
"handleDrawerClose"
>
×
</p>
<!--
<p
class=
"car-disabled-txt title-tips"
>
该商品配置为根据
<span
class=
"car-strong-txt"
>
商户
</span>
比例统一分配!
</p>
-->
</div>
...
...
@@ -56,136 +47,98 @@
<span></span>
</el-form-item>
</el-form>
-->
<el-form
class=
"child-drawer-block"
label-width=
"110px"
:inline=
"true"
v-for=
"(item,index) in commodityInfo.upgradeGoodsList"
:key=
"index"
>
<p
class=
"car-sub-head"
>
商品
{{
index
+
1
}}
-
{{
item
.
goodsInfo
.
goodsName
}}
<el-form
class=
"child-drawer-block"
label-width=
"110px"
:inline=
"true"
v-for=
"(item,index) in commodityInfo.upgradeGoodsList"
:key=
"index"
>
<p
class=
"car-sub-head"
>
商品
{{
index
+
1
}}
-
{{
item
.
goodsInfo
.
goodsName
}}
</p>
<!--
<el-form-item
class=
"d2-drawer-item"
label=
"商品名称:"
>
<span>
{{
item
.
goodsInfo
.
goodsName
}}
</span>
</el-form-item>
-->
<el-form-item
class=
"d2-drawer-item"
label=
"品牌:"
>
<el-form-item
class=
"d2-drawer-item"
label=
"品牌:"
>
<span>
{{
item
.
goodsInfo
.
brandMerchantName
}}
</span>
</el-form-item>
<el-form-item
class=
"d2-drawer-item"
label=
"分类:"
>
<el-form-item
class=
"d2-drawer-item"
label=
"分类:"
>
<span>
{{
item
.
goodsInfo
.
goodsTypeName
}}
</span>
</el-form-item>
<el-form-item
class=
"d2-drawer-item"
label=
"产品成本:"
>
<el-form-item
class=
"d2-drawer-item"
label=
"产品成本:"
>
<span>
{{
item
.
shopPrice
?
(
item
.
shopPrice
+
'元'
)
:
'无'
}}
</span>
</el-form-item>
<!-- style="font-weight: bold;" -->
<el-form-item
class=
"d2-drawer-item"
label=
"建议升级价:"
>
<el-form-item
class=
"d2-drawer-item"
label=
"建议升级价:"
>
<!-- class="car-strong-txt" -->
<span>
{{
item
.
upgradePrice
}}
元
</span>
</el-form-item>
<el-form-item
class=
"d2-drawer-item"
label=
"商品最低价:"
>
<el-form-item
class=
"d2-drawer-item"
label=
"商品最低价:"
>
<span>
{{
item
.
shopMinPrice
?
(
item
.
shopMinPrice
+
'元'
)
:
'无'
}}
</span>
</el-form-item>
<el-form-item
v-if=
"warrantyProList.includes(item.goodsInfo.goodsType)"
class=
"d2-drawer-item"
label=
"质保年限:"
>
<el-form-item
v-if=
"warrantyProList.includes(item.goodsInfo.goodsType)"
class=
"d2-drawer-item"
label=
"质保年限:"
>
<span>
{{
item
.
warrantyPeriod
?
(
item
.
warrantyPeriod
+
'年'
)
:
'无'
}}
</span>
</el-form-item>
<el-form-item
class=
"d2-drawer-item timeline-item_wrapper"
style=
"width:100%;marginTop:5px"
label=
"审核记录:"
>
<el-form-item
class=
"d2-drawer-item timeline-item_wrapper"
style=
"width:100%;marginTop:5px"
label=
"审核记录:"
>
<!--
<p
v-for=
"reviewInfo in item.reviewInfoList"
>
{{
reviewInfo
.
reviewMessage
}}
<span>
{{
reviewInfo
.
reviewDate
}}
</span>
</p>
-->
<el-timeline
v-show=
"item.reviewInfoList"
>
<el-timeline-item
v-for=
"(reviewInfo,infoId) in item.reviewInfoList"
color=
"#0bbd87"
:key=
"infoId"
:timestamp=
"reviewInfo.reviewDate"
>
<el-timeline-item
v-for=
"(reviewInfo,infoId) in item.reviewInfoList"
color=
"#0bbd87"
:key=
"infoId"
:timestamp=
"reviewInfo.reviewDate"
>
{{
reviewInfo
.
reviewMessage
}}
</el-timeline-item>
</el-timeline>
</el-form-item>
<el-form-item
class=
"d2-drawer-item"
style=
"marginLeft:150px"
v-if=
"examineFlag && item.reviewStatus == '0'"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleReview(item,1)"
>
审核通过
<el-form-item
class=
"d2-drawer-item"
style=
"marginLeft:150px"
v-if=
"examineFlag && item.reviewStatus == '0'"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleReview(item,1)"
>
审核通过
</el-button>
<el-button
size=
"small"
@
click=
"handleReview(item,2)"
>
驳回
<el-button
size=
"small"
@
click=
"handleReview(item,2)"
>
驳回
</el-button>
</el-form-item>
</el-form>
<div
class=
"child-drawer-block"
>
<p
class=
"car-sub-head"
style=
"padding: 0 0 10px;"
>
分配可见门店
<p
class=
"car-sub-head"
style=
"padding: 0 0 10px;"
>
分配可见门店
</p>
<el-table
:data=
"commodityInfo.linkMerchants"
border
class=
"store-table"
>
<el-table-column
label=
"序号"
align=
"center"
type=
"index"
width=
"64px"
/>
<el-table-column
prop=
"yqMerchantName"
label=
"园区店名称"
align=
"center"
/>
<el-table-column
prop=
"merchantName"
label=
"4s店名称"
align=
"center"
/>
<el-table-column
prop=
"merchantId"
label=
"商户编号"
align=
"center"
/>
<el-table-column
prop=
"userType"
label=
"商户类型"
align=
"center"
>
<el-table
:data=
"commodityInfo.linkMerchants"
border
class=
"store-table"
>
<el-table-column
label=
"序号"
align=
"center"
type=
"index"
width=
"64px"
/>
<el-table-column
prop=
"yqMerchantName"
label=
"园区店名称"
align=
"center"
/>
<el-table-column
prop=
"merchantName"
label=
"4s店名称"
align=
"center"
/>
<el-table-column
prop=
"merchantId"
label=
"商户编号"
align=
"center"
/>
<el-table-column
prop=
"userType"
label=
"商户类型"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
baseData
[
scope
.
row
.
channelType
===
2
?
'ghUserTypeList'
:
'userTypeList'
][
scope
.
row
.
userType
]
}}
</span>
</
template
>
...
...
@@ -232,7 +185,7 @@ export default {
console
.
log
(
this
.
userInfo
)
console
.
log
(
this
.
userInfo
.
loginAccount
.
userName
)
const
$store
=
this
.
$store
.
getters
[
'd2admin/auth/curBtns'
]
console
.
log
(
$store
)
//
console.log($store)
const
btnId
=
'9030207'
// 审核权限ID
const
_item
=
$store
.
find
(
i
=>
(
i
.
authId
===
btnId
))
if
(
_item
)
{
...
...
src/views/systemConfig/merchant/viewDetail.vue
View file @
1fdea4a
This diff is collapsed.
Click to expand it.
src/views/systemConfig/qRcodeDialog.vue
View file @
1fdea4a
<!-- 下载对账单 -->
<
template
>
<d2-dialog
title=
"收款二维码"
:is-visible=
"qRcodeVisible"
class=
"qRcodeDailog"
width=
"40%"
btn-ok-label=
"下载二维码"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleAddConfirm"
>
<div
class=
"codeDiv"
id=
"view"
>
<img
style=
"width:100%;height:100%"
src=
"./images/code3.png"
>
<d2-dialog
title=
"收款二维码"
:is-visible=
"qRcodeVisible"
class=
"qRcodeDailog"
width=
"40%"
btn-ok-label=
"下载二维码"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleAddConfirm"
>
<div
class=
"codeDiv"
id=
"view"
>
<img
style=
"width:100%;height:100%"
src=
"./images/code3.png"
>
<!-- v-if="qrCodeURL"
<div
class=
"imgDiv"
>
-->
<img
v-if=
"qrCodeURL"
class=
"qrImg"
id=
"img1"
crossorigin=
"anonymous"
:src=
"qrCodeURL"
>
<div
v-if=
"!qrCodeURL"
class=
"el-icon-loading loadingIcon"
/>
<img
v-if=
"qrCodeURL"
class=
"qrImg"
id=
"img1"
crossorigin=
"anonymous"
:src=
"qrCodeURL"
>
<div
v-if=
"!qrCodeURL"
class=
"el-icon-loading loadingIcon"
/>
<!--
</div>
-->
<div
class=
"merchantNameDiv"
>
{{
info
.
yqMerchantName
}}
...
...
src/views/systemConfig/serviceManage.vue
View file @
1fdea4a
<!-- 服务商管理 -->
<
template
>
<d2-container
class=
"service-manage"
>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:form-data=
"showFormData"
/>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:form-data=
"showFormData"
/>
<div
class=
"up-btns"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
...
...
@@ -32,113 +24,83 @@
<span
slot=
"left"
>
园区店服务商关联列表
</span>
<auth-button
category=
"Button"
/>
</d2-table-header>
<d2-table
ref=
"serviceStoreTable"
:search-form=
"searchForm"
:table-params=
"tableParams"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
/>
<d2-table
ref=
"serviceStoreTable"
:search-form=
"searchForm"
:table-params=
"tableParams"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
/>
</d2-table>
</div>
<!-- 新增服务商 -->
<d2-dialog
title=
"关联服务商"
:is-visible
.
sync=
"relateVisible"
btn-ok-label=
"确定关联"
width=
"60%"
class=
"relate-dialog"
@
confirmDialog=
"handleRelateConfirm"
@
closeDialog=
"handleRelateClose"
>
<d2-dialog
title=
"关联服务商"
:is-visible
.
sync=
"relateVisible"
btn-ok-label=
"确定关联"
width=
"60%"
class=
"relate-dialog"
@
confirmDialog=
"handleRelateConfirm"
@
closeDialog=
"handleRelateClose"
>
<span
slot=
"sub-title"
>
为园区店关联对应的服务商,一家园区店只能关联一个服务商
</span>
<el-form
ref=
"relateDialog"
:model=
"relateForm"
:rules=
"relateRule"
label-width=
"150px"
>
<el-form-item
label=
"选择关联的园区店:"
prop=
"yqMerchantId"
>
<el-select
v-model=
"relateForm.yqMerchantId"
filterable
>
<el-option
v-for=
"item in baseData.yqList.filter(i => i.merchantName !== '全部')"
:key=
"item.merchantId"
:value=
"item.merchantId"
:label=
"item.merchantName"
:disabled=
"item.disabled"
/>
<el-form
ref=
"relateDialog"
:model=
"relateForm"
:rules=
"relateRule"
label-width=
"150px"
>
<el-form-item
label=
"选择关联的园区店:"
prop=
"yqMerchantId"
>
<el-select
v-model=
"relateForm.yqMerchantId"
filterable
>
<el-option
v-for=
"item in baseData.yqList.filter(i => i.merchantName !== '全部')"
:key=
"item.merchantId"
:value=
"item.merchantId"
:label=
"item.merchantName"
:disabled=
"item.disabled"
/>
</el-select>
<span
class=
"relate-dialog-tips"
>
您选择的园区店编号:
{{
relateForm
.
yqMerchantId
}}
</span>
</el-form-item>
<el-form-item
label=
"选择关联的服务商:"
prop=
"merchantId"
>
<el-select
v-model=
"relateForm.merchantId"
multiple
:multiple-limit=
"5"
filterable
style=
"width:400px"
>
<el-option
v-for=
"item in baseData.serviceList.filter(i => i.merchantName !== '全部')"
:key=
"item.merchantId"
:value=
"item.merchantId"
:label=
"item.merchantName"
/>
<el-form-item
label=
"选择关联的服务商:"
prop=
"merchantId"
>
<el-select
v-model=
"relateForm.merchantId"
multiple
:multiple-limit=
"5"
filterable
style=
"width:400px"
>
<el-option
v-for=
"item in baseData.serviceList.filter(i => i.merchantName !== '全部')"
:key=
"item.merchantId"
:value=
"item.merchantId"
:label=
"item.merchantName"
/>
</el-select>
<span
class=
"relate-dialog-tips"
>
您选择的服务商编号:
{{
relateForm
.
merchantId
}}
</span>
</el-form-item>
</el-form>
</d2-dialog>
<!-- 删除服务商 -->
<d2-dialog
title=
"删除服务商"
:is-visible
.
sync=
"deleteVisible"
width=
"750px"
class=
"delete-dialog"
@
confirmDialog=
"handleDeleteConfirm"
@
closeDialog=
"handleDeleteClose"
>
<d2-dialog
title=
"删除服务商"
:is-visible
.
sync=
"deleteVisible"
width=
"750px"
class=
"delete-dialog"
@
confirmDialog=
"handleDeleteConfirm"
@
closeDialog=
"handleDeleteClose"
>
<p
class=
"delete-title"
>
删除园区店和服务商的关联记录,会同步暂停该园区店跟该服务商的分润,是否继续删除?
</p>
<el-form
ref=
"deleteDialog"
:model=
"deleteForm"
:rules=
"deleteRule"
label-width=
"150px"
>
<el-form
ref=
"deleteDialog"
:model=
"deleteForm"
:rules=
"deleteRule"
label-width=
"150px"
>
<el-form-item
label=
"管理员手机验证:"
>
{{
adminInfo
.
name
}}
{{
adminInfo
.
phone
}}
<el-button
size=
"small"
@
click=
"handleSend"
:disabled=
"isSend"
>
<el-button
size=
"small"
@
click=
"handleSend"
:disabled=
"isSend"
>
{{
isSend
?
sendMsg
+
'秒后,重试'
:
'发送验证短信'
}}
</el-button>
</el-form-item>
<el-form-item
label=
"验证码:"
prop=
"smsCode"
>
<el-input
placeholder=
"请填写验证码"
v-model=
"deleteForm.smsCode"
/>
<el-form-item
label=
"验证码:"
prop=
"smsCode"
>
<el-input
placeholder=
"请填写验证码"
v-model=
"deleteForm.smsCode"
/>
</el-form-item>
</el-form>
</d2-dialog>
...
...
@@ -244,10 +206,10 @@ export default {
}
},
{
label
:
'最近更新时间'
,
prop
:
'
updated
Date'
,
prop
:
'
lastRef
Date'
,
width
:
'160'
,
formatter
:
(
cellValue
)
=>
{
return
Util
.
dateFormate
(
cellValue
.
updated
Date
,
'YYYY-MM-DD HH:mm:ss'
)
return
Util
.
dateFormate
(
cellValue
.
lastRef
Date
,
'YYYY-MM-DD HH:mm:ss'
)
}
}]
},
...
...
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