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 cc80feab
authored
Apr 25, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ohter:eslint 格式化问题
1 parent
a7307d38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
451 additions
and
451 deletions
package.json
src/api/index.js
src/api/request.js
src/api/serviceManage.js
src/api/sys.account.js
src/common/constants - 副本.js
src/common/constants.js
src/common/util.js
src/components/dialog/index.vue
src/layout/header-aside/components/header-locales/index.vue
src/layout/header-aside/components/personal-panel/index.vue
src/libs/util.cookies.js
src/libs/util.js
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/page.js
src/store/modules/d2admin/modules/theme.js
src/store/modules/d2admin/modules/user.js
src/views/financeManage/downloadAccountDialog.vue
src/views/financeManage/financeList - 副本.vue
src/views/financeManage/financeList.vue
src/views/financeManage/serviceFinanceList.vue
src/views/index/customTransOption.js
src/views/index/debounce.js
src/views/index/incomeFlowOption.js
src/views/index/incomeProductOption.js
src/views/index/storeFlowOption.js
src/views/system/login/index.vue
src/views/systemConfig/account/accountDetail.vue
src/views/systemConfig/account/applyAccount.vue
src/views/systemConfig/merchant/merchantManage.vue
src/views/systemConfig/merchant/viewDetail.vue
src/views/systemConfig/personalInfo.vue
src/views/systemConfig/serviceManage.vue
src/views/systemConfig/yqStoreConfig.vue
src/views/systemConfig/yqStoreManage.vue
package.json
View file @
cc80fea
{
{
"name"
:
"dj-car-life-system"
,
"name"
:
"dj-car-life-system"
,
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
"serve"
:
"vue-cli-service serve --open"
,
"serve"
:
"vue-cli-service serve --open"
,
"start"
:
"npm run serve"
,
"start"
:
"npm run serve"
,
...
...
src/api/index.js
View file @
cc80fea
...
@@ -45,4 +45,4 @@ export function getIncomeFlowList(data) {
...
@@ -45,4 +45,4 @@ export function getIncomeFlowList(data) {
export
function
getIncomeProductList
(
data
)
{
export
function
getIncomeProductList
(
data
)
{
data
.
method
=
`
${
path2
}
workbench.statistics.goods.grossProfitRadio`
data
.
method
=
`
${
path2
}
workbench.statistics.goods.grossProfitRadio`
return
request
(
data
)
return
request
(
data
)
}
\ No newline at end of file
\ No newline at end of file
}
src/api/request.js
View file @
cc80fea
...
@@ -32,13 +32,13 @@ const request = (params = {}, method = RequestMethods.GET, noSignAttr = []) => {
...
@@ -32,13 +32,13 @@ const request = (params = {}, method = RequestMethods.GET, noSignAttr = []) => {
var
reqData
=
var
reqData
=
method
===
RequestMethods
.
POST
method
===
RequestMethods
.
POST
?
{
?
{
// baseURL: process.env.VUE_APP_API + '?method=' + params.method,
// baseURL: process.env.VUE_APP_API + '?method=' + params.method,
baseURL
:
'/'
,
baseURL
:
'/'
,
data
:
sign
(
params
,
noSignAttr
)
data
:
sign
(
params
,
noSignAttr
)
}
}
:
{
:
{
params
:
sign
(
params
,
noSignAttr
)
params
:
sign
(
params
,
noSignAttr
)
}
}
console
.
log
(
method
===
RequestMethods
.
POST
)
console
.
log
(
method
===
RequestMethods
.
POST
)
console
.
log
(
url
)
console
.
log
(
url
)
return
axios
({
return
axios
({
...
...
src/api/serviceManage.js
View file @
cc80fea
...
@@ -41,4 +41,4 @@ export function GETYQMERCHANTCONFIGDETAIL(data) {
...
@@ -41,4 +41,4 @@ export function GETYQMERCHANTCONFIGDETAIL(data) {
export
function
UPDATEYQMERCHANTCONFIG
(
data
)
{
export
function
UPDATEYQMERCHANTCONFIG
(
data
)
{
data
.
method
=
`dj.api.smarcarlife.yqMerchantConfig.modify`
data
.
method
=
`dj.api.smarcarlife.yqMerchantConfig.modify`
return
request
(
data
,
'post'
)
return
request
(
data
,
'post'
)
}
\ No newline at end of file
\ No newline at end of file
}
src/api/sys.account.js
View file @
cc80fea
...
@@ -9,7 +9,7 @@ import request from './request'
...
@@ -9,7 +9,7 @@ import request from './request'
import
RequestMethods
from
'./request.methods'
import
RequestMethods
from
'./request.methods'
// 用户相关
// 用户相关
const
USER_PATH
=
'dj.api.'
const
USER_PATH
=
'dj.api.'
// 角色相关
// 角色相关
const
ROLE_PATH
=
'fims.role.'
const
ROLE_PATH
=
'fims.role.'
export
const
LOGIN_URL
=
`
${
USER_PATH
}
user.login`
export
const
LOGIN_URL
=
`
${
USER_PATH
}
user.login`
...
@@ -23,23 +23,23 @@ export const ROLE_LIST_URL = `${ROLE_PATH}list`
...
@@ -23,23 +23,23 @@ export const ROLE_LIST_URL = `${ROLE_PATH}list`
export
function
AccountLogin
(
data
)
{
export
function
AccountLogin
(
data
)
{
data
.
method
=
LOGIN_URL
data
.
method
=
LOGIN_URL
return
request
(
data
)
return
request
(
data
)
// return new Promise(resolve => {
// return new Promise(resolve => {
// resolve({
// resolve({
// roleId: 7,
// roleId: 7,
// roleType: 2,
// roleType: 2,
// mobile: '15234057707',
// mobile: '15234057707',
// userName: 'wxw',
// userName: 'wxw',
// loginName: 'foutouren',
// loginName: 'foutouren',
// authes: []
// authes: []
// // authes: [{
// // authes: [{
// // authId: '10101',
// // authId: '10101',
// // parentId: '101'
// // parentId: '101'
// // }, {
// // }, {
// // authId: '102',
// // authId: '102',
// // parentId: '0'
// // parentId: '0'
// // }]
// // }]
// })
// })
// })
// })
}
}
// 选择账号
// 选择账号
...
@@ -199,4 +199,4 @@ export function RoleList(data = {}) {
...
@@ -199,4 +199,4 @@ export function RoleList(data = {}) {
export
function
RoleDetail
(
data
=
{})
{
export
function
RoleDetail
(
data
=
{})
{
data
.
method
=
`
${
ROLE_PATH
}
detail`
data
.
method
=
`
${
ROLE_PATH
}
detail`
return
request
(
data
,
RequestMethods
.
GET
)
return
request
(
data
,
RequestMethods
.
GET
)
}
\ No newline at end of file
\ No newline at end of file
}
src/common/constants - 副本.js
View file @
cc80fea
This diff is collapsed.
Click to expand it.
src/common/constants.js
View file @
cc80fea
...
@@ -415,7 +415,7 @@ export const afterTodayOptions = {
...
@@ -415,7 +415,7 @@ export const afterTodayOptions = {
// 'N':'不扣水续费'
// 'N':'不扣水续费'
// }
// }
//财务列表-订单表-表头原始数据
//
财务列表-订单表-表头原始数据
export
const
orderTableHead
=
[
export
const
orderTableHead
=
[
{
{
name
:
'序号'
,
name
:
'序号'
,
...
@@ -465,7 +465,7 @@ export const orderTableHead = [
...
@@ -465,7 +465,7 @@ export const orderTableHead = [
prop
:
'orderType'
,
prop
:
'orderType'
,
sort
:
21
,
sort
:
21
,
formatter
:
function
(
row
,
column
)
{
formatter
:
function
(
row
,
column
)
{
le
t
orderTypeList
=
[
cons
t
orderTypeList
=
[
{
{
confId
:
'1'
,
confId
:
'1'
,
confLabel
:
'正常'
confLabel
:
'正常'
...
@@ -487,7 +487,7 @@ export const orderTableHead = [
...
@@ -487,7 +487,7 @@ export const orderTableHead = [
confLabel
:
'未收款'
confLabel
:
'未收款'
}
}
]
]
le
t
o
=
orderTypeList
.
find
(
k
=>
+
k
.
confId
===
row
.
orderType
)
cons
t
o
=
orderTypeList
.
find
(
k
=>
+
k
.
confId
===
row
.
orderType
)
return
o
?
o
.
confLabel
:
'-'
return
o
?
o
.
confLabel
:
'-'
}
}
}
}
...
@@ -688,7 +688,7 @@ export const billsTableHead = [
...
@@ -688,7 +688,7 @@ export const billsTableHead = [
prop
:
'divisionType'
,
prop
:
'divisionType'
,
sort
:
5
,
sort
:
5
,
formatter
:
function
(
row
,
column
)
{
formatter
:
function
(
row
,
column
)
{
le
t
divisionTypeList
=
[
cons
t
divisionTypeList
=
[
{
{
confId
:
'1'
,
confId
:
'1'
,
confLabel
:
'线下对账'
confLabel
:
'线下对账'
...
@@ -698,7 +698,7 @@ export const billsTableHead = [
...
@@ -698,7 +698,7 @@ export const billsTableHead = [
confLabel
:
'线上分账'
confLabel
:
'线上分账'
}
}
]
]
le
t
o
=
divisionTypeList
.
find
(
k
=>
{
cons
t
o
=
divisionTypeList
.
find
(
k
=>
{
return
k
.
confId
==
row
.
divisionType
return
k
.
confId
==
row
.
divisionType
})
})
return
o
?
o
.
confLabel
:
'-'
return
o
?
o
.
confLabel
:
'-'
...
@@ -720,7 +720,7 @@ export const billsTableHead = [
...
@@ -720,7 +720,7 @@ export const billsTableHead = [
prop
:
'odDivisionStatus'
,
prop
:
'odDivisionStatus'
,
sort
:
19
,
sort
:
19
,
formatter
:
function
(
row
,
column
)
{
formatter
:
function
(
row
,
column
)
{
le
t
ODDIVISIONSTATUS
=
{
cons
t
ODDIVISIONSTATUS
=
{
1
:
'待分账'
,
1
:
'待分账'
,
2
:
'分账中'
,
2
:
'分账中'
,
3
:
'分账成功'
,
3
:
'分账成功'
,
...
@@ -737,7 +737,7 @@ export const billsTableHead = [
...
@@ -737,7 +737,7 @@ export const billsTableHead = [
prop
:
'deductChargeFlag'
,
prop
:
'deductChargeFlag'
,
sort
:
20
,
sort
:
20
,
formatter
:
function
(
row
,
column
)
{
formatter
:
function
(
row
,
column
)
{
le
t
DEDUCTCHARGEFLAG
=
{
cons
t
DEDUCTCHARGEFLAG
=
{
Y
:
'扣除手续费(按0.6%的标准)'
,
Y
:
'扣除手续费(按0.6%的标准)'
,
N
:
'不扣水续费'
N
:
'不扣水续费'
}
}
...
...
src/common/util.js
View file @
cc80fea
import
Vue
from
'vue'
//
import Vue from 'vue'
import
{
Message
,
MessageBox
,
Loading
}
from
'element-ui'
;
import
{
Message
,
MessageBox
,
Loading
}
from
'element-ui'
import
moment
from
'moment'
import
moment
from
'moment'
let
loadingInstance
=
''
let
loadingInstance
=
''
export
const
Util
=
{
export
const
Util
=
{
/**
/**
* 简单alert
* 简单alert
* title 标题
* title 标题
...
@@ -31,25 +30,25 @@ export const Util = {
...
@@ -31,25 +30,25 @@ export const Util = {
callback
:
function
(
action
,
done
)
{
callback
:
function
(
action
,
done
)
{
if
(
action
==
'confirm'
)
{
if
(
action
==
'confirm'
)
{
if
(
options
.
success
)
{
if
(
options
.
success
)
{
(
options
.
success
)
(
done
)
options
.
success
(
done
)
}
}
}
else
{
}
else
{
console
.
log
(
done
);
console
.
log
(
done
)
// done()
// done()
}
}
}
}
})
;
})
/* Vue.$vux.alert.show({
/* Vue.$vux.alert.show({
title: options.title||'',
title: options.title||'',
content: options.message||'',
content: options.message||'',
onShow() {
onShow() {
options.onShow?(options.onShow)():'';
options.onShow?(options.onShow)():'';
},
},
onHide() {
onHide() {
options.onHide?(options.onHide)():'';
options.onHide?(options.onHide)():'';
}
}
}) */
}) */
},
},
/**
/**
...
@@ -61,8 +60,7 @@ export const Util = {
...
@@ -61,8 +60,7 @@ export const Util = {
type
:
options
.
type
||
'error'
,
type
:
options
.
type
||
'error'
,
duration
:
options
.
time
||
2000
,
duration
:
options
.
time
||
2000
,
onClose
:
options
.
onClose
||
''
onClose
:
options
.
onClose
||
''
});
})
},
},
/**
/**
...
@@ -83,108 +81,110 @@ export const Util = {
...
@@ -83,108 +81,110 @@ export const Util = {
loading
:
function
(
message
)
{
loading
:
function
(
message
)
{
loadingInstance
=
Loading
.
service
({
loadingInstance
=
Loading
.
service
({
text
:
message
||
'加载中...'
text
:
message
||
'加载中...'
});
})
},
},
/**
/**
* 关闭loading
* 关闭loading
*/
*/
closeLoading
:
function
()
{
closeLoading
:
function
()
{
loadingInstance
.
close
()
;
loadingInstance
.
close
()
},
},
/**
/**
* 校验手机号码格式
* 校验手机号码格式
*/
*/
checkPhone
:
function
(
mobile
)
{
checkPhone
:
function
(
mobile
)
{
let
myreg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
;
const
myreg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
return
myreg
.
test
(
mobile
)
;
return
myreg
.
test
(
mobile
)
},
},
/**
/**
* 校验固定电话
* 校验固定电话
*/
*/
validationTel
:
function
(
tel
)
{
validationTel
:
function
(
tel
)
{
let
reg
=
/^0
[\d]{2,3}
-
[\d]{7,8}
$/
;
const
reg
=
/^0
[\d]{2,3}
-
[\d]{7,8}
$/
return
reg
.
test
(
tel
)
;
return
reg
.
test
(
tel
)
},
},
/**
/**
* 是否特殊字符
* 是否特殊字符
*/
*/
isSpecialLetter
:
function
(
str
)
{
isSpecialLetter
:
function
(
str
)
{
let
reg
=
new
RegExp
(
"[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"
);
const
reg
=
new
RegExp
(
return
reg
.
test
(
str
);
"[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"
)
return
reg
.
test
(
str
)
},
},
/**
/**
* 只能输入英文字母和数字,不能输入中文
* 只能输入英文字母和数字,不能输入中文
*/
*/
validationInput
:
function
(
str
)
{
validationInput
:
function
(
str
)
{
let
reg
=
/
[^\w\.\/]
/ig
;
const
reg
=
/
[^\w\.\/]
/gi
return
reg
.
test
(
str
)
;
return
reg
.
test
(
str
)
},
},
/**
/**
* 获取当前时间
* 获取当前时间
*/
*/
getCurrentDate
:
function
()
{
getCurrentDate
:
function
()
{
let
time
=
new
Date
();
const
time
=
new
Date
()
let
y
=
time
.
getFullYear
();
const
y
=
time
.
getFullYear
()
let
m
=
time
.
getMonth
()
+
1
;
const
m
=
time
.
getMonth
()
+
1
let
d
=
time
.
getDate
();
const
d
=
time
.
getDate
()
return
{
return
{
date
:
y
+
'/'
+
m
+
'/'
+
d
date
:
y
+
'/'
+
m
+
'/'
+
d
}
}
},
},
/**
/**
* 获取浏览器参数
* 获取浏览器参数
*/
*/
getUrlParams
:
function
(
name
)
{
getUrlParams
:
function
(
name
)
{
let
vars
=
[],
const
vars
=
[]
hash
;
let
hash
let
oParams
=
{};
const
oParams
=
{}
let
hashes
=
window
.
location
.
href
.
slice
(
window
.
location
.
href
.
indexOf
(
'?'
)
+
1
).
split
(
'&'
);
const
hashes
=
window
.
location
.
href
for
(
let
i
=
0
;
i
<
hashes
.
length
;
i
++
)
{
.
slice
(
window
.
location
.
href
.
indexOf
(
'?'
)
+
1
)
hash
=
hashes
[
i
].
split
(
'='
);
.
split
(
'&'
)
vars
.
push
(
hash
[
0
]);
for
(
let
i
=
0
;
i
<
hashes
.
length
;
i
++
)
{
oParams
[
hash
[
0
]]
=
hash
[
1
];
hash
=
hashes
[
i
].
split
(
'='
)
}
vars
.
push
(
hash
[
0
])
console
.
log
(
vars
);
oParams
[
hash
[
0
]]
=
hash
[
1
]
if
(
name
){
}
return
oParams
[
name
];
console
.
log
(
vars
)
}
else
{
if
(
name
)
{
return
oParams
;
return
oParams
[
name
]
}
}
else
{
},
return
oParams
}
},
/**
/**
* 根据当前时间,计算往后30天的日期
* 根据当前时间,计算往后30天的日期
*/
*/
getAfterDate
:
function
(
day
)
{
getAfterDate
:
function
(
day
)
{
let
date1
=
new
Date
();
const
date1
=
new
Date
()
let
date2
=
new
Date
(
date1
);
const
date2
=
new
Date
(
date1
)
let
time
=
30
;
let
time
=
30
if
(
day
)
{
if
(
day
)
{
time
=
day
;
time
=
day
}
}
date2
.
setDate
(
date1
.
getDate
()
+
time
)
;
date2
.
setDate
(
date1
.
getDate
()
+
time
)
let
_date
=
date2
.
getFullYear
()
+
'-'
+
(
date2
.
getMonth
()
+
1
)
+
'-'
+
date2
.
getDate
();
const
_date
=
date2
.
getFullYear
()
+
'-'
+
(
date2
.
getMonth
()
+
1
)
+
'-'
+
date2
.
getDate
()
return
{
return
{
date
:
_date
,
date
:
_date
,
year
:
date2
.
getFullYear
(),
year
:
date2
.
getFullYear
(),
month
:
date2
.
getMonth
()
+
1
,
month
:
date2
.
getMonth
()
+
1
,
day
:
date2
.
getDate
()
day
:
date2
.
getDate
()
}
;
}
},
},
/**
/**
* 日期格式转换
* 日期格式转换
*/
*/
...
@@ -213,7 +213,7 @@ export const Util = {
...
@@ -213,7 +213,7 @@ export const Util = {
if
(
str
.
length
>
m
)
{
if
(
str
.
length
>
m
)
{
n
=
str
.
slice
(
0
,
m
)
+
'...'
n
=
str
.
slice
(
0
,
m
)
+
'...'
}
}
return
n
return
n
},
},
...
@@ -223,7 +223,7 @@ export const Util = {
...
@@ -223,7 +223,7 @@ export const Util = {
* console.log(bar===foo) false
* console.log(bar===foo) false
* @param {*} obj
* @param {*} obj
*/
*/
deepClone
:
function
(
obj
)
{
deepClone
:
function
(
obj
)
{
// Handle the 3 simple types, and null or undefined or function
// Handle the 3 simple types, and null or undefined or function
if
(
obj
==
null
||
typeof
obj
!==
'object'
)
return
obj
if
(
obj
==
null
||
typeof
obj
!==
'object'
)
return
obj
// Handle Date
// Handle Date
...
@@ -243,12 +243,11 @@ export const Util = {
...
@@ -243,12 +243,11 @@ export const Util = {
return
copy
return
copy
}
}
throw
new
Error
(
"Unable to clone obj! Its type isn't supported."
)
throw
new
Error
(
"Unable to clone obj! Its type isn't supported."
)
},
}
}
}
export
const
showModal
=
Util
.
msg
export
const
showModal
=
Util
.
msg
export
const
showToast
=
Util
.
Info
export
const
showToast
=
Util
.
Info
export
const
showLoading
=
Util
.
loading
export
const
showLoading
=
Util
.
loading
export
const
hideLoading
=
Util
.
closeLoading
export
const
hideLoading
=
Util
.
closeLoading
export
const
deepClone
=
Util
.
deepClone
\ No newline at end of file
\ No newline at end of file
export
const
deepClone
=
Util
.
deepClone
src/components/dialog/index.vue
View file @
cc80fea
...
@@ -17,50 +17,50 @@ export default {
...
@@ -17,50 +17,50 @@ export default {
props
:
{
props
:
{
show
:
{
show
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
'提示'
,
default
:
'提示'
},
},
width
:
{
width
:
{
type
:
String
,
type
:
String
,
default
:
'46%'
,
default
:
'46%'
},
},
cancel
:
{
cancel
:
{
required
:
false
,
required
:
false
,
type
:
Function
,
type
:
Function
},
},
confirm
:
{
confirm
:
{
required
:
false
,
required
:
false
,
type
:
Function
,
type
:
Function
},
},
usefooter
:
{
usefooter
:
{
required
:
false
,
required
:
false
,
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
appendtobody
:
{
appendtobody
:
{
required
:
false
,
required
:
false
,
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
}
,
}
},
},
data
()
{
data
()
{
return
{
return
{
hasFooter
:
false
,
hasFooter
:
false
}
}
},
},
created
()
{
created
()
{
le
t
o
=
this
.
$slots
cons
t
o
=
this
.
$slots
this
.
hasFooter
=
o
.
footer
this
.
hasFooter
=
o
.
footer
},
},
mounted
:
function
()
{},
mounted
:
function
()
{},
methods
:
{
methods
:
{
/**
/**
* 取消关闭弹框
* 取消关闭弹框
*/
*/
onCancel
:
function
()
{
onCancel
:
function
()
{
// 兼容以前的页面
// 兼容以前的页面
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
},
...
@@ -68,8 +68,8 @@ export default {
...
@@ -68,8 +68,8 @@ export default {
/**
/**
* 确定
* 确定
*/
*/
onConfirm
:
function
()
{},
onConfirm
:
function
()
{}
}
,
}
}
}
</
script
>
</
script
>
...
...
src/layout/header-aside/components/header-locales/index.vue
View file @
cc80fea
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
:key=
"index"
:key=
"index"
:command=
"language.value"
>
:command=
"language.value"
>
<d2-icon
:name=
"$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'"
class=
"d2-mr-5"
/>
<d2-icon
:name=
"$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'"
class=
"d2-mr-5"
/>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
...
...
src/layout/header-aside/components/personal-panel/index.vue
View file @
cc80fea
...
@@ -127,7 +127,7 @@ export default {
...
@@ -127,7 +127,7 @@ export default {
}
}
)
)
.
then
(()
=>
{
.
then
(()
=>
{
const
reload
=
async
()
=>
{
const
reload
=
async
()
=>
{
localStorage
.
clear
()
localStorage
.
clear
()
await
this
.
logout
()
await
this
.
logout
()
this
.
$store
.
commit
(
'd2admin/gray/set'
,
false
)
this
.
$store
.
commit
(
'd2admin/gray/set'
,
false
)
...
@@ -161,7 +161,7 @@ export default {
...
@@ -161,7 +161,7 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}
)
}
)
.
then
(
async
()
=>
{
.
then
(
async
()
=>
{
await
this
.
$store
.
commit
(
'd2admin/gray/set'
,
false
)
await
this
.
$store
.
commit
(
'd2admin/gray/set'
,
false
)
resolve
(
true
)
resolve
(
true
)
}
)
}
)
...
...
src/libs/util.cookies.js
View file @
cc80fea
...
@@ -9,7 +9,7 @@ const COOKIE_NAME_PREFIX = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.
...
@@ -9,7 +9,7 @@ const COOKIE_NAME_PREFIX = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.
* @param {Object} setting cookie setting
* @param {Object} setting cookie setting
*/
*/
cookies
.
set
=
function
(
name
=
'default'
,
value
=
''
,
cookieSetting
=
{})
{
cookies
.
set
=
function
(
name
=
'default'
,
value
=
''
,
cookieSetting
=
{})
{
le
t
currentCookieSetting
=
{
cons
t
currentCookieSetting
=
{
expires
:
1
expires
:
1
}
}
Object
.
assign
(
currentCookieSetting
,
cookieSetting
)
Object
.
assign
(
currentCookieSetting
,
cookieSetting
)
...
...
src/libs/util.js
View file @
cc80fea
...
@@ -13,7 +13,7 @@ const util = {
...
@@ -13,7 +13,7 @@ const util = {
* @description 更新标题
* @description 更新标题
* @param {String} title 标题
* @param {String} title 标题
*/
*/
util
.
title
=
function
(
titleText
)
{
util
.
title
=
function
(
titleText
)
{
const
processTitle
=
process
.
env
.
VUE_APP_TITLE
const
processTitle
=
process
.
env
.
VUE_APP_TITLE
window
.
document
.
title
=
`
${
processTitle
}${
titleText
?
` |
${
titleText
}
`
:
''
}
`
window
.
document
.
title
=
`
${
processTitle
}${
titleText
?
` |
${
titleText
}
`
:
''
}
`
}
}
...
@@ -22,7 +22,7 @@ util.title = function (titleText) {
...
@@ -22,7 +22,7 @@ util.title = function (titleText) {
* @description 打开新页面
* @description 打开新页面
* @param {String} url 地址
* @param {String} url 地址
*/
*/
util
.
open
=
function
(
url
,
target
)
{
util
.
open
=
function
(
url
,
target
)
{
var
a
=
document
.
createElement
(
'a'
)
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
url
)
a
.
setAttribute
(
'href'
,
url
)
a
.
setAttribute
(
'target'
,
target
||
'_blank'
)
a
.
setAttribute
(
'target'
,
target
||
'_blank'
)
...
@@ -64,9 +64,9 @@ util.deepClone = (obj) => {
...
@@ -64,9 +64,9 @@ util.deepClone = (obj) => {
* @param {Function} condition 回调函数,必须返回谓词,判断是否找到了。会传入(item, index, level)三个参数
* @param {Function} condition 回调函数,必须返回谓词,判断是否找到了。会传入(item, index, level)三个参数
* @param {String} children 子数组的key
* @param {String} children 子数组的key
*/
*/
util
.
deepFind
=
function
(
menus
,
id
)
{
util
.
deepFind
=
function
(
menus
,
id
)
{
const
cloneMenus
=
util
.
deepClone
(
menus
)
const
cloneMenus
=
util
.
deepClone
(
menus
)
for
(
le
t
menu
of
cloneMenus
)
{
for
(
cons
t
menu
of
cloneMenus
)
{
if
(
menu
.
id
===
id
)
{
if
(
menu
.
id
===
id
)
{
delete
menu
.
children
delete
menu
.
children
return
menu
return
menu
...
@@ -112,7 +112,7 @@ util.colorToRgb = (sColor, alpha) => {
...
@@ -112,7 +112,7 @@ util.colorToRgb = (sColor, alpha) => {
* 重置form
* 重置form
* 用法: util.resetForm.call(this,'formName')
* 用法: util.resetForm.call(this,'formName')
*/
*/
util
.
resetForm
=
function
(
formName
)
{
util
.
resetForm
=
function
(
formName
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
for
(
var
key
in
this
[
formName
])
{
for
(
var
key
in
this
[
formName
])
{
if
(
this
[
formName
].
hasOwnProperty
(
key
))
{
if
(
this
[
formName
].
hasOwnProperty
(
key
))
{
...
@@ -127,7 +127,7 @@ util.resetForm = function (formName) {
...
@@ -127,7 +127,7 @@ util.resetForm = function (formName) {
* 格式化时间
* 格式化时间
* @param {Array} time
* @param {Array} time
*/
*/
util
.
formatTime
=
function
(
time
)
{
util
.
formatTime
=
function
(
time
)
{
return
{
return
{
startTime
:
time
?
time
[
0
]
+
' '
+
'00:00:00'
:
''
,
startTime
:
time
?
time
[
0
]
+
' '
+
'00:00:00'
:
''
,
endTime
:
time
?
time
[
1
]
+
' '
+
'23:59:59'
:
''
endTime
:
time
?
time
[
1
]
+
' '
+
'23:59:59'
:
''
...
...
src/store/modules/d2admin/modules/account.js
View file @
cc80fea
...
@@ -17,35 +17,35 @@ export default {
...
@@ -17,35 +17,35 @@ export default {
// console.log(router.addRoutes);
// console.log(router.addRoutes);
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
params
=
{
var
params
=
{
userName
:
p
.
userName
,
userName
:
p
.
userName
,
password
:
md5
(
p
.
password
).
toLowerCase
()
password
:
md5
(
p
.
password
).
toLowerCase
()
}
}
// 开始请求登录接口
// 开始请求登录接口
AccountLogin
(
params
).
then
(
async
(
accountInfo
=
{})
=>
{
AccountLogin
(
params
).
then
(
async
(
accountInfo
=
{})
=>
{
// 设置 cookie 一定要存 uuid 和 token 两个 cookie
// 设置 cookie 一定要存 uuid 和 token 两个 cookie
// 整个系统依赖这两个数据进行校验和存储
// 整个系统依赖这两个数据进行校验和存储
// uuid 是用户身份唯一标识 用户注册的时候确定 并且不可改变 不可重复
// uuid 是用户身份唯一标识 用户注册的时候确定 并且不可改变 不可重复
// token 代表用户当前登录状态 建议在网络请求中携带 token
// token 代表用户当前登录状态 建议在网络请求中携带 token
// 如有必要 token 需要定时更新,默认保存一天
// 如有必要 token 需要定时更新,默认保存一天
// util.cookies.set('uuid', accountInfo.loginName)
// util.cookies.set('uuid', accountInfo.loginName)
if
(
accountInfo
.
accountList
.
length
>
1
)
{
if
(
accountInfo
.
accountList
.
length
>
1
)
{
resolve
({
isMutiAccount
:
true
,
accountInfo
:
accountInfo
,
userInfo
:
{}
})
resolve
({
isMutiAccount
:
true
,
accountInfo
:
accountInfo
,
userInfo
:
{}
})
}
else
{
}
else
{
util
.
cookies
.
set
(
'token'
,
accountInfo
.
sessionId
)
util
.
cookies
.
set
(
'token'
,
accountInfo
.
sessionId
)
getUserInfo
({}).
then
(
async
userInfo
=>
{
getUserInfo
({}).
then
(
async
userInfo
=>
{
userInfo
.
beSuper
=
userInfo
.
loginAccount
.
isAdmin
==
1
userInfo
.
beSuper
=
userInfo
.
loginAccount
.
isAdmin
==
1
userInfo
.
detail
=
userInfo
.
merchant
userInfo
.
detail
=
userInfo
.
merchant
Object
.
keys
(
userInfo
.
loginAccount
).
forEach
(
item
=>
{
Object
.
keys
(
userInfo
.
loginAccount
).
forEach
(
item
=>
{
if
(
userInfo
.
loginAccount
[
item
]
&&
!
userInfo
.
detail
[
item
])
{
if
(
userInfo
.
loginAccount
[
item
]
&&
!
userInfo
.
detail
[
item
])
{
userInfo
.
detail
[
item
]
=
userInfo
.
loginAccount
[
item
]
userInfo
.
detail
[
item
]
=
userInfo
.
loginAccount
[
item
]
}
}
})
userInfo
.
merchantAccountLevel
=
userInfo
.
detail
.
merchantAccountLevel
await
dispatch
(
'getAuth'
,
{
userInfo
:
userInfo
,
accountInfo
:
accountInfo
})
resolve
({
isMutiAccount
:
false
,
accountInfo
:
accountInfo
,
userInfo
:
userInfo
})
})
})
}
userInfo
.
merchantAccountLevel
=
userInfo
.
detail
.
merchantAccountLevel
})
await
dispatch
(
'getAuth'
,
{
userInfo
:
userInfo
,
accountInfo
:
accountInfo
})
resolve
({
isMutiAccount
:
false
,
accountInfo
:
accountInfo
,
userInfo
:
userInfo
})
})
}
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
'err: '
,
err
)
console
.
log
(
'err: '
,
err
)
reject
(
err
)
reject
(
err
)
...
@@ -54,8 +54,8 @@ export default {
...
@@ -54,8 +54,8 @@ export default {
},
},
/**
/**
* @description 获取用户权限
* @description 获取用户权限
* @param {*} param0
* @param {*} param0
* @param {*} param1
* @param {*} param1
*/
*/
getAuth
({
commit
,
dispatch
},
{
userInfo
,
accountInfo
})
{
getAuth
({
commit
,
dispatch
},
{
userInfo
,
accountInfo
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -75,29 +75,29 @@ export default {
...
@@ -75,29 +75,29 @@ export default {
var
tempAuths
=
[]
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
).
forEach
((
item
,
index
)
=>
{
routeAll
.
map
(
i
=>
i
.
authId
).
forEach
((
item
,
index
)
=>
{
targetRoutes
.
includes
(
item
)
&&
tempAuths
.
push
(
routeAll
[
index
])
targetRoutes
.
includes
(
item
)
&&
tempAuths
.
push
(
routeAll
[
index
])
if
(
routeAll
[
index
].
hasOwnProperty
(
'addRoutePath'
))
{
if
(
routeAll
[
index
].
hasOwnProperty
(
'addRoutePath'
))
{
routeAll
[
index
].
addRoutePath
.
forEach
(
k
=>
{
routeAll
[
index
].
addRoutePath
.
forEach
(
k
=>
{
if
(
!
tempAuths
.
map
(
m
=>
m
.
authId
).
includes
(
k
.
authId
))
{
if
(
!
tempAuths
.
map
(
m
=>
m
.
authId
).
includes
(
k
.
authId
))
{
tempAuths
.
push
(
k
)
tempAuths
.
push
(
k
)
}
}
})
})
}
}
})
})
// const authes = (+accountInfo.roleType === SUPPER_ADMIN) ?
// const authes = (+accountInfo.roleType === SUPPER_ADMIN) ?
// util.permision.flatten(Object.values(localRoutes))
// util.permision.flatten(Object.values(localRoutes))
// .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) :
// .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) :
// tempAuths
// tempAuths
const
authes
=
tempAuths
const
authes
=
tempAuths
await
dispatch
(
'd2admin/auth/set'
,
authes
,
{
root
:
true
})
await
dispatch
(
'd2admin/auth/set'
,
authes
,
{
root
:
true
})
// delete accountInfo.authes
// delete accountInfo.authes
// 初始化权限
// 初始化权限
await
dispatch
(
'd2admin/auth/init'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/auth/init'
,
null
,
{
root
:
true
})
// // 设置 vuex 用户信息
// // 设置 vuex 用户信息
await
dispatch
(
'd2admin/user/set'
,
{
info
:
userInfo
,
accountInfo
},
{
root
:
true
})
await
dispatch
(
'd2admin/user/set'
,
{
info
:
userInfo
,
accountInfo
},
{
root
:
true
})
// // 用户登录后从持久化数据加载一系列的设置
// // 用户登录后从持久化数据加载一系列的设置
await
dispatch
(
'load'
)
await
dispatch
(
'load'
)
// 结束
// 结束
resolve
(
userInfo
)
resolve
(
userInfo
)
})
})
})
})
...
@@ -116,8 +116,8 @@ export default {
...
@@ -116,8 +116,8 @@ export default {
// util.cookies.remove('uuid')
// util.cookies.remove('uuid')
await
dispatch
(
'd2admin/user/clear'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/user/clear'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/base/clear'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/base/clear'
,
null
,
{
root
:
true
})
// await commit('d2admin/page/setCurrent', null, { root: true })
// await commit('d2admin/page/setCurrent', null, { root: true })
// await commit('d2admin/auth/set', null, { root: true })
// await commit('d2admin/auth/set', null, { root: true })
resolve
()
resolve
()
})
})
},
},
...
@@ -129,23 +129,23 @@ export default {
...
@@ -129,23 +129,23 @@ export default {
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// DB -> store 加载用户名
// DB -> store 加载用户名
await
dispatch
(
'd2admin/user/load'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/user/load'
,
null
,
{
root
:
true
})
// DB -> store 加载主题
// DB -> store 加载主题
await
dispatch
(
'd2admin/theme/load'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/theme/load'
,
null
,
{
root
:
true
})
// DB -> store 加载页面过渡效果设置
// DB -> store 加载页面过渡效果设置
await
dispatch
(
'd2admin/transition/load'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/transition/load'
,
null
,
{
root
:
true
})
// DB -> store 持久化数据加载上次退出时的多页列表
// DB -> store 持久化数据加载上次退出时的多页列表
await
dispatch
(
'd2admin/page/openedLoad'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/page/openedLoad'
,
null
,
{
root
:
true
})
// DB -> store 持久化数据加载侧边栏折叠状态
// DB -> store 持久化数据加载侧边栏折叠状态
await
dispatch
(
'd2admin/menu/asideCollapseLoad'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/menu/asideCollapseLoad'
,
null
,
{
root
:
true
})
// DB -> store 持久化数据加载全局尺寸
// DB -> store 持久化数据加载全局尺寸
await
dispatch
(
'd2admin/size/load'
,
null
,
{
root
:
true
})
await
dispatch
(
'd2admin/size/load'
,
null
,
{
root
:
true
})
// DB - > 初始化 基础数据
// DB - > 初始化 基础数据
// await dispatch('d2admin/base/init', null, { root: true })
// await dispatch('d2admin/base/init', null, { root: true })
// 后台接口 -> store
// 后台接口 -> store
// await dispatch('d2admin/auth/init', null, { root: true })
// await dispatch('d2admin/auth/init', null, { root: true })
// end
// end
resolve
()
resolve
()
})
})
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
}
src/store/modules/d2admin/modules/page.js
View file @
cc80fea
...
@@ -11,12 +11,12 @@ const userInfo = JSON.parse(unescape(sessionStorage.getItem(SESSION_NAME))) || {
...
@@ -11,12 +11,12 @@ const userInfo = JSON.parse(unescape(sessionStorage.getItem(SESSION_NAME))) || {
const
INDEX_PATH
=
userInfo
?
(
userInfo
.
detail
.
accountType
!==
7
?
'/index'
:
'/onlineAccountList'
)
:
'/index'
const
INDEX_PATH
=
userInfo
?
(
userInfo
.
detail
.
accountType
!==
7
?
'/index'
:
'/onlineAccountList'
)
:
'/index'
const
defaultPage
=
userInfo
?
(
userInfo
.
detail
.
accountType
!==
7
?
home
:
localRoutes
[
'90503'
])
:
home
const
defaultPage
=
userInfo
?
(
userInfo
.
detail
.
accountType
!==
7
?
home
:
localRoutes
[
'90503'
])
:
home
defaultPage
.
fullPath
=
INDEX_PATH
defaultPage
.
fullPath
=
INDEX_PATH
// 判定是否需要缓存
// 判定是否需要缓存
const
isKeepAlive
=
data
=>
_
.
get
(
data
,
'meta.cache'
,
false
)
const
isKeepAlive
=
data
=>
_
.
get
(
data
,
'meta.cache'
,
false
)
// const setIcon = meta => {
// const setIcon = meta => {
// console.log(meta)
// console.log(meta)
// return (meta.icon = localRoutes[meta.authId].icon)
// return (meta.icon = localRoutes[meta.authId].icon)
// }
// }
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
...
@@ -84,28 +84,28 @@ export default {
...
@@ -84,28 +84,28 @@ export default {
// valid 有效列表 1, 1, 0, 1 => 有效, 有效, 失效, 有效
// valid 有效列表 1, 1, 0, 1 => 有效, 有效, 失效, 有效
const
valid
=
[]
const
valid
=
[]
const
__oSource
=
await
dispatch
(
'd2admin/auth/load'
,
null
,
{
const
__oSource
=
await
dispatch
(
'd2admin/auth/load'
,
null
,
{
root
:
true
root
:
true
})
})
// 处理数据
// 处理数据
state
.
opened
=
value
state
.
opened
=
value
.
map
(
opened
=>
{
.
map
(
opened
=>
{
// 忽略首页
// 忽略首页
if
(
opened
.
fullPath
===
INDEX_PATH
)
{
if
(
opened
.
fullPath
===
INDEX_PATH
)
{
valid
.
push
(
1
)
valid
.
push
(
1
)
// setIcon(opened.meta)
// setIcon(opened.meta)
return
opened
return
opened
}
}
// 尝试在所有的支持多标签页的页面里找到 name 匹配的页面
// 尝试在所有的支持多标签页的页面里找到 name 匹配的页面
const
find
=
state
.
pool
.
find
(
item
=>
{
const
find
=
state
.
pool
.
find
(
item
=>
{
return
(
return
(
item
.
path
===
opened
.
path
&&
item
.
path
===
opened
.
path
&&
__oSource
.
some
(
obj
=>
+
obj
.
authId
===
+
item
.
meta
.
authId
)
__oSource
.
some
(
obj
=>
+
obj
.
authId
===
+
item
.
meta
.
authId
)
)
)
})
})
// 记录有效或无效信息
// 记录有效或无效信息
valid
.
push
(
find
?
1
:
0
)
valid
.
push
(
find
?
1
:
0
)
// 返回合并后的数据 新的覆盖旧的
// 返回合并后的数据 新的覆盖旧的
// 新的数据中一般不会携带 params 和 query, 所以旧的参数会留存
// 新的数据中一般不会携带 params 和 query, 所以旧的参数会留存
return
Object
.
assign
({},
opened
,
find
)
return
Object
.
assign
({},
opened
,
find
)
})
})
.
filter
((
opened
,
index
)
=>
valid
[
index
]
===
1
)
.
filter
((
opened
,
index
)
=>
valid
[
index
]
===
1
)
...
@@ -113,7 +113,7 @@ export default {
...
@@ -113,7 +113,7 @@ export default {
// state.openedLoaded = true
// state.openedLoaded = true
// 根据 opened 数据生成缓存设置
// 根据 opened 数据生成缓存设置
commit
(
'keepAliveRefresh'
)
commit
(
'keepAliveRefresh'
)
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -128,16 +128,16 @@ export default {
...
@@ -128,16 +128,16 @@ export default {
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// 设置数据
// 设置数据
dispatch
(
dispatch
(
'd2admin/db/set'
,
{
'd2admin/db/set'
,
{
dbName
:
'sys'
,
dbName
:
'sys'
,
path
:
'page.opened'
,
path
:
'page.opened'
,
value
:
state
.
opened
,
value
:
state
.
opened
,
user
:
true
user
:
true
},
{
},
{
root
:
true
root
:
true
}
}
)
)
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -163,10 +163,10 @@ export default {
...
@@ -163,10 +163,10 @@ export default {
page
.
params
=
params
||
page
.
params
page
.
params
=
params
||
page
.
params
page
.
query
=
query
||
page
.
query
page
.
query
=
query
||
page
.
query
page
.
fullPath
=
fullPath
||
page
.
fullPath
page
.
fullPath
=
fullPath
||
page
.
fullPath
// state.opened.splice(index, 1, page)
// state.opened.splice(index, 1, page)
// 持久化
// 持久化
await
dispatch
(
'opend2db'
)
await
dispatch
(
'opend2db'
)
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -192,16 +192,16 @@ export default {
...
@@ -192,16 +192,16 @@ export default {
newTag
.
params
=
params
||
newTag
.
params
newTag
.
params
=
params
||
newTag
.
params
newTag
.
query
=
query
||
newTag
.
query
newTag
.
query
=
query
||
newTag
.
query
newTag
.
fullPath
=
fullPath
||
newTag
.
fullPath
newTag
.
fullPath
=
fullPath
||
newTag
.
fullPath
// setIcon(newTag.meta)
// setIcon(newTag.meta)
// 添加进当前显示的页面数组
// 添加进当前显示的页面数组
state
.
opened
.
push
(
newTag
)
state
.
opened
.
push
(
newTag
)
// 如果这个页面需要缓存 将其添加到缓存设置
// 如果这个页面需要缓存 将其添加到缓存设置
if
(
isKeepAlive
(
newTag
))
{
if
(
isKeepAlive
(
newTag
))
{
dispatch
(
'keepAlivePush'
,
tag
.
name
)
dispatch
(
'keepAlivePush'
,
tag
.
name
)
}
}
// 持久化
// 持久化
await
dispatch
(
'opend2db'
)
await
dispatch
(
'opend2db'
)
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -224,11 +224,11 @@ export default {
...
@@ -224,11 +224,11 @@ export default {
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// 已经打开的页面
// 已经打开的页面
const
opened
=
state
.
opened
const
opened
=
state
.
opened
// 判断此页面是否已经打开 并且记录位置
// 判断此页面是否已经打开 并且记录位置
// let pageOpendIndex = 0
// let pageOpendIndex = 0
const
page
=
opened
.
find
((
page
,
index
)
=>
{
const
page
=
opened
.
find
((
page
,
index
)
=>
{
const
same
=
page
.
fullPath
===
fullPath
const
same
=
page
.
fullPath
===
fullPath
// pageOpendIndex = same ? index : pageOpendIndex
// pageOpendIndex = same ? index : pageOpendIndex
return
same
return
same
})
})
if
(
page
)
{
if
(
page
)
{
...
@@ -242,7 +242,7 @@ export default {
...
@@ -242,7 +242,7 @@ export default {
}
else
{
}
else
{
// 页面以前没有打开过
// 页面以前没有打开过
const
page
=
state
.
pool
.
find
(
t
=>
t
.
name
===
name
)
const
page
=
state
.
pool
.
find
(
t
=>
t
.
name
===
name
)
// 如果这里没有找到 page 代表这个路由虽然在框架内 但是不参与标签页显示
// 如果这里没有找到 page 代表这个路由虽然在框架内 但是不参与标签页显示
if
(
page
)
{
if
(
page
)
{
await
dispatch
(
'add'
,
{
await
dispatch
(
'add'
,
{
tag
:
Object
.
assign
({},
page
),
tag
:
Object
.
assign
({},
page
),
...
@@ -274,7 +274,7 @@ export default {
...
@@ -274,7 +274,7 @@ export default {
// 下个新的页面
// 下个新的页面
let
newPage
=
state
.
opened
[
0
]
let
newPage
=
state
.
opened
[
0
]
const
isCurrent
=
state
.
current
===
tagName
const
isCurrent
=
state
.
current
===
tagName
// 如果关闭的页面就是当前显示的页面
// 如果关闭的页面就是当前显示的页面
if
(
isCurrent
)
{
if
(
isCurrent
)
{
// 去找一个新的页面
// 去找一个新的页面
const
len
=
state
.
opened
.
length
const
len
=
state
.
opened
.
length
...
@@ -294,12 +294,12 @@ export default {
...
@@ -294,12 +294,12 @@ export default {
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
// 如果这个页面是缓存的页面 将其在缓存设置中删除
// 如果这个页面是缓存的页面 将其在缓存设置中删除
dispatch
(
'keepAliveRemove'
,
state
.
opened
[
index
].
name
)
dispatch
(
'keepAliveRemove'
,
state
.
opened
[
index
].
name
)
// 更新数据 删除关闭的页面
// 更新数据 删除关闭的页面
state
.
opened
.
splice
(
index
,
1
)
state
.
opened
.
splice
(
index
,
1
)
}
}
// 持久化
// 持久化
await
dispatch
(
'opend2db'
)
await
dispatch
(
'opend2db'
)
// 最后需要判断是否需要跳到首页
// 最后需要判断是否需要跳到首页
if
(
isCurrent
)
{
if
(
isCurrent
)
{
const
{
const
{
name
=
''
,
params
=
{},
query
=
{}
name
=
''
,
params
=
{},
query
=
{}
...
@@ -328,21 +328,21 @@ export default {
...
@@ -328,21 +328,21 @@ export default {
}
=
{})
{
}
=
{})
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
await
dispatch
(
'_do'
,
{
await
dispatch
(
'_do'
,
{
pageSelect
,
pageSelect
,
call
:
currentIndex
=>
{
call
:
currentIndex
=>
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
if
(
currentIndex
>
0
)
{
if
(
currentIndex
>
0
)
{
// 删除打开的页面 并在缓存设置中删除
// 删除打开的页面 并在缓存设置中删除
await
dispatch
(
'_splice'
,
{
await
dispatch
(
'_splice'
,
{
index
:
1
,
index
:
1
,
howmany
:
currentIndex
-
1
howmany
:
currentIndex
-
1
})
})
}
}
resolve
()
resolve
()
})
})
}
}
})
})
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -390,28 +390,28 @@ export default {
...
@@ -390,28 +390,28 @@ export default {
}
=
{})
{
}
=
{})
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
await
dispatch
(
'_do'
,
{
await
dispatch
(
'_do'
,
{
pageSelect
,
pageSelect
,
call
:
currentIndex
=>
{
call
:
currentIndex
=>
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// 删除打开的页面数据 并更新缓存设置
// 删除打开的页面数据 并更新缓存设置
if
(
currentIndex
===
0
)
{
if
(
currentIndex
===
0
)
{
await
dispatch
(
'_splice'
,
{
await
dispatch
(
'_splice'
,
{
index
:
1
index
:
1
})
})
}
else
{
}
else
{
await
dispatch
(
'_splice'
,
{
await
dispatch
(
'_splice'
,
{
index
:
currentIndex
+
1
index
:
currentIndex
+
1
})
})
await
dispatch
(
'_splice'
,
{
await
dispatch
(
'_splice'
,
{
index
:
1
,
index
:
1
,
howmany
:
currentIndex
-
1
howmany
:
currentIndex
-
1
})
})
}
}
resolve
()
resolve
()
})
})
}
}
})
})
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -428,11 +428,11 @@ export default {
...
@@ -428,11 +428,11 @@ export default {
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// 删除打开的页面 并在缓存设置中删除
// 删除打开的页面 并在缓存设置中删除
await
dispatch
(
'closeOpened'
)
await
dispatch
(
'closeOpened'
)
// dispatch('currentSet', _index)
// dispatch('currentSet', _index)
// 持久化
// 持久化
// await dispatch('opend2db')
// await dispatch('opend2db')
router
.
replace
(
INDEX_PATH
)
router
.
replace
(
INDEX_PATH
)
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -458,14 +458,14 @@ export default {
...
@@ -458,14 +458,14 @@ export default {
}
}
})
})
await
call
(
currentIndex
)
await
call
(
currentIndex
)
// 设置当前的页面
// 设置当前的页面
// dispatch('currentSet', pageAim)
// dispatch('currentSet', pageAim)
if
(
router
.
app
.
$route
.
fullPath
!==
pageAim
)
{
if
(
router
.
app
.
$route
.
fullPath
!==
pageAim
)
{
router
.
push
(
pageAim
)
router
.
push
(
pageAim
)
}
}
// 持久化
// 持久化
await
dispatch
(
'opend2db'
)
await
dispatch
(
'opend2db'
)
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -508,7 +508,7 @@ export default {
...
@@ -508,7 +508,7 @@ export default {
},
fullPath
)
{
},
fullPath
)
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
await
commit
(
'setCurrent'
,
fullPath
)
await
commit
(
'setCurrent'
,
fullPath
)
// 设置数据
// 设置数据
dispatch
(
dispatch
(
'd2admin/db/set'
,
{
'd2admin/db/set'
,
{
dbName
:
'sys'
,
dbName
:
'sys'
,
...
@@ -562,11 +562,11 @@ export default {
...
@@ -562,11 +562,11 @@ export default {
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// 删除打开的页面 并在缓存设置中删除
// 删除打开的页面 并在缓存设置中删除
await
dispatch
(
'_splice'
,
{
await
dispatch
(
'_splice'
,
{
index
:
1
index
:
1
})
})
// 持久化
// 持久化
await
dispatch
(
'opend2db'
)
await
dispatch
(
'opend2db'
)
// end
// end
resolve
()
resolve
()
})
})
},
},
...
@@ -688,4 +688,4 @@ export default {
...
@@ -688,4 +688,4 @@ export default {
})
})
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
}
src/store/modules/d2admin/modules/theme.js
View file @
cc80fea
...
@@ -46,7 +46,7 @@ export default {
...
@@ -46,7 +46,7 @@ export default {
load
({
state
,
commit
,
dispatch
})
{
load
({
state
,
commit
,
dispatch
})
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// store 赋值
// store 赋值
le
t
activeName
=
await
dispatch
(
'd2admin/db/get'
,
{
cons
t
activeName
=
await
dispatch
(
'd2admin/db/get'
,
{
dbName
:
'sys'
,
dbName
:
'sys'
,
path
:
'theme.activeName'
,
path
:
'theme.activeName'
,
defaultValue
:
state
.
list
[
0
].
name
,
defaultValue
:
state
.
list
[
0
].
name
,
...
...
src/store/modules/d2admin/modules/user.js
View file @
cc80fea
...
@@ -88,4 +88,4 @@ export default {
...
@@ -88,4 +88,4 @@ export default {
dispatch
(
'clear'
)
dispatch
(
'clear'
)
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
}
src/views/financeManage/downloadAccountDialog.vue
View file @
cc80fea
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<el-radio-button
label=
"6"
>
园区店
</el-radio-button>
<el-radio-button
label=
"6"
>
园区店
</el-radio-button>
<!--
<el-radio-button
label=
"2"
<!--
<el-radio-button
label=
"2"
@
click
.
native
.
prevent=
"clickMerchantType('2')"
>
4S店
</el-radio-button>
@
click
.
native
.
prevent=
"clickMerchantType('2')"
>
4S店
</el-radio-button>
<el-radio-button
label=
"7"
<el-radio-button
label=
"7"
@
click
.
native
.
prevent=
"clickMerchantType('7')"
>
服务商
</el-radio-button>
@
click
.
native
.
prevent=
"clickMerchantType('7')"
>
服务商
</el-radio-button>
<el-radio-button
label=
"6"
<el-radio-button
label=
"6"
@
click
.
native
.
prevent=
"clickMerchantType('6')"
>
园区店
</el-radio-button>
-->
@
click
.
native
.
prevent=
"clickMerchantType('6')"
>
园区店
</el-radio-button>
-->
...
@@ -92,8 +92,8 @@ import * as api from '@api/finance'
...
@@ -92,8 +92,8 @@ import * as api from '@api/finance'
import
{
getMerchantPageSearch
}
from
'@api/publicAccount'
import
{
getMerchantPageSearch
}
from
'@api/publicAccount'
export
default
{
export
default
{
name
:
'downloadAccountDialog'
,
name
:
'downloadAccountDialog'
,
data
()
{
data
()
{
le
t
validateLonlat
=
(
rule
,
value
,
callback
)
=>
{
cons
t
validateLonlat
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
if
(
value
)
{
if
(
!
this
.
infoForm
.
payEndDate
)
{
if
(
!
this
.
infoForm
.
payEndDate
)
{
callback
(
new
Error
(
'请选择结束日期'
))
callback
(
new
Error
(
'请选择结束日期'
))
...
@@ -214,19 +214,19 @@ export default {
...
@@ -214,19 +214,19 @@ export default {
// }
// }
},
},
created
()
{
created
()
{
// this.$nextTick(() => {
// this.$nextTick(() => {
// this.$refs.accountForm.resetFields();
// this.$refs.accountForm.resetFields();
// })
// })
},
},
components
:
{},
components
:
{},
mounted
()
{
mounted
()
{
this
.
selectMerchant
()
this
.
selectMerchant
()
},
},
methods
:
{
methods
:
{
selectMerchant
()
{
selectMerchant
()
{
var
params
=
{}
var
params
=
{}
params
.
currentPage
=
1
params
.
currentPage
=
1
params
.
pageSize
=
1000
params
.
pageSize
=
1000
...
@@ -245,26 +245,26 @@ export default {
...
@@ -245,26 +245,26 @@ export default {
})
})
},
},
clickMerchantType
(
e
)
{
clickMerchantType
(
e
)
{
e
===
this
.
infoForm
.
merchantType
e
===
this
.
infoForm
.
merchantType
?
(
this
.
infoForm
.
merchantType
=
''
)
?
(
this
.
infoForm
.
merchantType
=
''
)
:
(
this
.
infoForm
.
merchantType
=
e
)
:
(
this
.
infoForm
.
merchantType
=
e
)
console
.
log
(
this
.
infoForm
.
merchantType
)
console
.
log
(
this
.
infoForm
.
merchantType
)
},
},
changeType
()
{
changeType
()
{
this
.
infoForm
.
merchant
=
[]
this
.
infoForm
.
merchant
=
[]
// this.baseData.merchantList = []
// this.baseData.merchantList = []
this
.
selectMerchant
()
this
.
selectMerchant
()
},
},
changeStartDate
()
{
changeStartDate
()
{
if
(
this
.
infoForm
.
payEndDate
)
{
if
(
this
.
infoForm
.
payEndDate
)
{
this
.
infoForm
.
payEndDate
=
''
this
.
infoForm
.
payEndDate
=
''
}
}
},
},
remoteMethod
(
query
)
{
remoteMethod
(
query
)
{
// if (query !== '') {
// if (query !== '') {
this
.
selectLoading
=
true
this
.
selectLoading
=
true
var
params
=
{}
var
params
=
{}
...
@@ -284,7 +284,7 @@ export default {
...
@@ -284,7 +284,7 @@ export default {
// }
// }
},
},
handleAddConfirm
()
{
handleAddConfirm
()
{
// console.log(this.infoForm.remark)
// console.log(this.infoForm.remark)
console
.
log
(
this
.
infoForm
)
console
.
log
(
this
.
infoForm
)
// this.handleClose()
// this.handleClose()
...
@@ -316,7 +316,7 @@ export default {
...
@@ -316,7 +316,7 @@ export default {
})
})
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'accountClose'
,
true
)
this
.
$emit
(
'accountClose'
,
true
)
}
}
}
}
...
...
src/views/financeManage/financeList - 副本.vue
View file @
cc80fea
This diff is collapsed.
Click to expand it.
src/views/financeManage/financeList.vue
View file @
cc80fea
...
@@ -430,7 +430,7 @@ export default {
...
@@ -430,7 +430,7 @@ export default {
downloadAccountDialog
downloadAccountDialog
},
},
data
()
{
data
()
{
return
{
return
{
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
isSubOrder
:
false
,
isSubOrder
:
false
,
...
@@ -575,7 +575,7 @@ export default {
...
@@ -575,7 +575,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
// console.log(document.getElementById('financeChart'))
// console.log(document.getElementById('financeChart'))
if
(
this
.
userInfo
.
beSuper
)
{
if
(
this
.
userInfo
.
beSuper
)
{
getParkStore
({}).
then
(
res
=>
{
getParkStore
({}).
then
(
res
=>
{
...
@@ -602,14 +602,14 @@ export default {
...
@@ -602,14 +602,14 @@ export default {
this
.
getTotal
()
this
.
getTotal
()
},
},
watch
:
{
watch
:
{
summaryDate
(
newValue
)
{
summaryDate
(
newValue
)
{
this
.
getSummary
()
this
.
getSummary
()
}
}
},
},
methods
:
{
methods
:
{
...
mapActions
({
close
:
'd2admin/page/close'
}),
...
mapActions
({
close
:
'd2admin/page/close'
}),
handleAddClose
(
isRefresh
=
false
)
{
},
handleAddClose
(
isRefresh
=
false
)
{
},
drawFunnelChart
()
{
drawFunnelChart
()
{
// console.log(funnelOption)
// console.log(funnelOption)
getTransferData
({}).
then
(
res
=>
{
getTransferData
({}).
then
(
res
=>
{
funnelOption
.
series
[
0
].
data
[
0
].
tooltipValue
=
res
.
totalCustomerNums
funnelOption
.
series
[
0
].
data
[
0
].
tooltipValue
=
res
.
totalCustomerNums
...
@@ -621,7 +621,7 @@ export default {
...
@@ -621,7 +621,7 @@ export default {
this
.
financeChart
.
setOption
(
funnelOption
)
this
.
financeChart
.
setOption
(
funnelOption
)
})
})
},
},
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{
time
:
''
,
time
:
''
,
yqMerchantId
:
''
,
yqMerchantId
:
''
,
...
@@ -643,7 +643,7 @@ export default {
...
@@ -643,7 +643,7 @@ export default {
this
.
getOptionsList
()
this
.
getOptionsList
()
},
},
// 导出
// 导出
handleExport
()
{
handleExport
()
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
params
.
pageNum
=
1
params
.
pageNum
=
1
api
.
exportFile
(
params
).
then
(
res
=>
{
api
.
exportFile
(
params
).
then
(
res
=>
{
...
@@ -651,12 +651,12 @@ export default {
...
@@ -651,12 +651,12 @@ export default {
this
.
$open
(
res
)
this
.
$open
(
res
)
})
})
},
},
//下载对账单
//
下载对账单
downloadAccount
()
{
downloadAccount
()
{
this
.
accountVisible
=
!
this
.
accountVisible
this
.
accountVisible
=
!
this
.
accountVisible
},
},
// 查看明细
// 查看明细
handleDetail
(
data
)
{
handleDetail
(
data
)
{
this
.
close
({
tagName
:
'/financeDetail'
})
this
.
close
({
tagName
:
'/financeDetail'
})
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'financeDetail'
,
name
:
'financeDetail'
,
...
@@ -666,7 +666,7 @@ export default {
...
@@ -666,7 +666,7 @@ export default {
})
})
},
},
getServiceStore
(
merchantId
)
{
getServiceStore
(
merchantId
)
{
getServiceStore
({
getServiceStore
({
yqMerchantId
:
merchantId
yqMerchantId
:
merchantId
}).
then
(
res
=>
{
}).
then
(
res
=>
{
...
@@ -675,13 +675,13 @@ export default {
...
@@ -675,13 +675,13 @@ export default {
})
})
},
},
getOptionsList
()
{
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
if
(
item
.
type
===
'select'
)
{
if
(
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
]
!==
'全部'
)
{
)
{
const
temp
=
{}
const
temp
=
{}
...
@@ -697,7 +697,7 @@ export default {
...
@@ -697,7 +697,7 @@ export default {
}
}
})
})
},
},
getSummary
()
{
getSummary
()
{
api
api
.
getSummary
({
.
getSummary
({
beginDateStr
:
this
.
summaryDate
beginDateStr
:
this
.
summaryDate
...
@@ -715,10 +715,10 @@ export default {
...
@@ -715,10 +715,10 @@ export default {
this
.
summayData
=
res
this
.
summayData
=
res
})
})
},
},
keyDowmGetList
()
{
keyDowmGetList
()
{
this
.
getList
()
this
.
getList
()
},
},
getList
()
{
getList
()
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
params
=
{
params
=
{
...
this
.
page
,
...
this
.
page
,
...
@@ -750,7 +750,7 @@ export default {
...
@@ -750,7 +750,7 @@ export default {
this
.
total
=
res
.
total
this
.
total
=
res
.
total
})
})
},
},
numAddPrefix
(
item
)
{
numAddPrefix
(
item
)
{
const
moneyLabels
=
[
const
moneyLabels
=
[
'goodsCost'
,
'goodsCost'
,
'totalPrice'
,
'totalPrice'
,
...
@@ -777,7 +777,7 @@ export default {
...
@@ -777,7 +777,7 @@ export default {
}
}
return
item
return
item
},
},
getSelectInputParams
()
{
getSelectInputParams
()
{
const
list
=
Object
.
keys
(
this
.
searchSelectObj
)
const
list
=
Object
.
keys
(
this
.
searchSelectObj
)
var
params
=
{}
var
params
=
{}
list
.
forEach
(
i
=>
{
list
.
forEach
(
i
=>
{
...
@@ -786,7 +786,7 @@ export default {
...
@@ -786,7 +786,7 @@ export default {
})
})
return
params
return
params
},
},
getParams
()
{
getParams
()
{
var
params
=
this
.
getSelectInputParams
()
var
params
=
this
.
getSelectInputParams
()
if
(
this
.
searchForm
.
yqMerchantId
)
{
if
(
this
.
searchForm
.
yqMerchantId
)
{
params
.
yqMerchantId
=
this
.
searchForm
.
yqMerchantId
params
.
yqMerchantId
=
this
.
searchForm
.
yqMerchantId
...
@@ -814,29 +814,29 @@ export default {
...
@@ -814,29 +814,29 @@ export default {
// }
// }
return
params
return
params
},
},
getTotal
()
{
getTotal
()
{
api
.
getListTotal
(
this
.
getParams
()).
then
(
res
=>
{
api
.
getListTotal
(
this
.
getParams
()).
then
(
res
=>
{
this
.
totalObj
=
res
this
.
totalObj
=
res
})
})
},
},
handleSearch
()
{
handleSearch
()
{
this
.
page
.
pageNum
=
1
this
.
page
.
pageNum
=
1
this
.
getList
()
this
.
getList
()
this
.
getTotal
()
this
.
getTotal
()
},
},
// 每页条数
// 每页条数
handleSizeChange
(
value
)
{
handleSizeChange
(
value
)
{
this
.
page
.
pageSize
=
value
this
.
page
.
pageSize
=
value
this
.
getList
()
this
.
getList
()
},
},
// 页码
// 页码
handleCurrentChange
(
value
)
{
handleCurrentChange
(
value
)
{
this
.
page
.
pageNum
=
value
this
.
page
.
pageNum
=
value
this
.
getList
()
this
.
getList
()
},
},
accountClose
(
isRefresh
)
{
accountClose
(
isRefresh
)
{
this
.
accountVisible
=
!
this
.
accountVisible
this
.
accountVisible
=
!
this
.
accountVisible
// isRefresh && this.handleSearch()
// isRefresh && this.handleSearch()
}
}
...
...
src/views/financeManage/serviceFinanceList.vue
View file @
cc80fea
...
@@ -436,7 +436,7 @@ export default {
...
@@ -436,7 +436,7 @@ export default {
pageSize
:
20
pageSize
:
20
},
},
payTypeOpts
:
{
payTypeOpts
:
{
'1'
:
'微信支付'
,
'1'
:
'微信支付'
,
'2'
:
'4S店支付'
,
'2'
:
'4S店支付'
,
'3'
:
'POS机收款'
'3'
:
'POS机收款'
},
},
...
...
src/views/index/customTransOption.js
View file @
cc80fea
...
@@ -3,7 +3,7 @@ const customTransOption = {
...
@@ -3,7 +3,7 @@ const customTransOption = {
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
,
trigger
:
'axis'
,
axisPointer
:
{
axisPointer
:
{
}
}
},
},
legend
:
{
legend
:
{
...
@@ -17,7 +17,7 @@ const customTransOption = {
...
@@ -17,7 +17,7 @@ const customTransOption = {
containLabel
:
true
containLabel
:
true
},
},
toolbox
:
{
toolbox
:
{
},
},
xAxis
:
{
xAxis
:
{
type
:
'category'
,
type
:
'category'
,
...
@@ -26,15 +26,15 @@ const customTransOption = {
...
@@ -26,15 +26,15 @@ const customTransOption = {
axisLine
:
{
axisLine
:
{
show
:
false
,
show
:
false
,
lineStyle
:
{
lineStyle
:
{
}
}
},
},
axisTick
:
{
axisTick
:
{
show
:
false
show
:
false
},
},
axisLabel
:
{
axisLabel
:
{
//interval: 0,
//
interval: 0,
//rotate: 45
//
rotate: 45
},
},
offset
:
10
offset
:
10
},
},
...
@@ -53,17 +53,17 @@ const customTransOption = {
...
@@ -53,17 +53,17 @@ const customTransOption = {
{
{
name
:
'客户到店'
,
name
:
'客户到店'
,
type
:
'line'
,
type
:
'line'
,
//stack: '总量',
//
stack: '总量',
itemStyle
:
{
itemStyle
:
{
color
:
'#0947C6'
color
:
'#0947C6'
},
},
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
]
,
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
]
},
},
{
{
name
:
'客户转化'
,
name
:
'客户转化'
,
type
:
'line'
,
type
:
'line'
,
//stack: '总量',
//
stack: '总量',
itemStyle
:
{
itemStyle
:
{
color
:
'#2B9AFF'
color
:
'#2B9AFF'
},
},
...
...
src/views/index/debounce.js
View file @
cc80fea
export
function
debounce
(
func
,
wait
,
immediate
)
{
export
function
debounce
(
func
,
wait
,
immediate
)
{
let
timeout
,
args
,
context
,
timestamp
,
result
;
let
timeout
,
args
,
context
,
timestamp
,
result
const
later
=
function
()
{
const
later
=
function
()
{
// 据上一次触发时间间隔
// 据上一次触发时间间隔
const
last
=
+
new
Date
()
-
timestamp
;
const
last
=
+
new
Date
()
-
timestamp
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
if
(
last
<
wait
&&
last
>
0
)
{
if
(
last
<
wait
&&
last
>
0
)
{
timeout
=
setTimeout
(
later
,
wait
-
last
)
;
timeout
=
setTimeout
(
later
,
wait
-
last
)
}
else
{
}
else
{
timeout
=
null
;
timeout
=
null
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if
(
!
immediate
)
{
if
(
!
immediate
)
{
result
=
func
.
apply
(
context
,
args
)
;
result
=
func
.
apply
(
context
,
args
)
if
(
!
timeout
)
context
=
args
=
null
;
if
(
!
timeout
)
context
=
args
=
null
}
}
}
}
}
;
}
return
function
(...
args
)
{
return
function
(...
args
)
{
context
=
this
;
context
=
this
timestamp
=
+
new
Date
()
;
timestamp
=
+
new
Date
()
const
callNow
=
immediate
&&
!
timeout
;
const
callNow
=
immediate
&&
!
timeout
// 如果延时不存在,重新设定延时
// 如果延时不存在,重新设定延时
if
(
!
timeout
)
timeout
=
setTimeout
(
later
,
wait
)
;
if
(
!
timeout
)
timeout
=
setTimeout
(
later
,
wait
)
if
(
callNow
)
{
if
(
callNow
)
{
result
=
func
.
apply
(
context
,
args
)
;
result
=
func
.
apply
(
context
,
args
)
context
=
args
=
null
;
context
=
args
=
null
}
}
return
result
;
};
}
\ No newline at end of file
\ No newline at end of file
return
result
}
}
src/views/index/incomeFlowOption.js
View file @
cc80fea
...
@@ -2,7 +2,7 @@ const incomeFlowOption = {
...
@@ -2,7 +2,7 @@ const incomeFlowOption = {
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
,
trigger
:
'axis'
,
axisPointer
:
{
axisPointer
:
{
}
}
},
},
/* legend: {
/* legend: {
...
@@ -16,7 +16,7 @@ const incomeFlowOption = {
...
@@ -16,7 +16,7 @@ const incomeFlowOption = {
containLabel
:
true
containLabel
:
true
},
},
toolbox
:
{
toolbox
:
{
},
},
xAxis
:
{
xAxis
:
{
type
:
'category'
,
type
:
'category'
,
...
@@ -25,15 +25,15 @@ const incomeFlowOption = {
...
@@ -25,15 +25,15 @@ const incomeFlowOption = {
axisLine
:
{
axisLine
:
{
show
:
false
,
show
:
false
,
lineStyle
:
{
lineStyle
:
{
}
}
},
},
axisTick
:
{
axisTick
:
{
show
:
false
show
:
false
},
},
axisLabel
:
{
axisLabel
:
{
//interval: 0,
//
interval: 0,
//rotate: 45
//
rotate: 45
},
},
offset
:
10
offset
:
10
},
},
...
@@ -57,8 +57,8 @@ const incomeFlowOption = {
...
@@ -57,8 +57,8 @@ const incomeFlowOption = {
color
:
'#0947C6'
color
:
'#0947C6'
},
},
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
],
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
],
smooth
:
true
,
smooth
:
true
}
,
}
/* {
/* {
name: '支出',
name: '支出',
type: 'line',
type: 'line',
...
@@ -72,4 +72,4 @@ const incomeFlowOption = {
...
@@ -72,4 +72,4 @@ const incomeFlowOption = {
]
]
}
}
export
default
incomeFlowOption
\ No newline at end of file
\ No newline at end of file
export
default
incomeFlowOption
src/views/index/incomeProductOption.js
View file @
cc80fea
const
incomeProductOption
=
{
const
incomeProductOption
=
{
color
:
[
'rgba(9,71,198,0.8)'
,
'rgba(255,178,25,1)'
,
'rgba(255,178,25,0.8)'
,
'rgba(0,157,255,1)'
,
'rgba(0,157,255,0.8)'
,
'rgba(0,157,255,0.6)'
,
'rgba(0,228,115,1)'
,
'rgba(0,228,115,0.8)'
],
color
:
[
'rgba(9,71,198,0.8)'
,
'rgba(255,178,25,1)'
,
'rgba(255,178,25,0.8)'
,
'rgba(0,157,255,1)'
,
'rgba(0,157,255,0.8)'
,
'rgba(0,157,255,0.6)'
,
'rgba(0,228,115,1)'
,
'rgba(0,228,115,0.8)'
],
title
:
{
title
:
{
text
:
'累计收入\n555555元'
,
text
:
'累计收入\n555555元'
,
top
:
'50%'
,
top
:
'50%'
,
...
@@ -23,12 +23,12 @@ const incomeProductOption = {
...
@@ -23,12 +23,12 @@ const incomeProductOption = {
{
{
name
:
'毛利'
,
name
:
'毛利'
,
type
:
'pie'
,
type
:
'pie'
,
minAngle
:
5
,
minAngle
:
5
,
avoidLabelOverlap
:
true
,
avoidLabelOverlap
:
true
,
radius
:
[
'40%'
,
'60%'
],
radius
:
[
'40%'
,
'60%'
],
center
:
[
'50%'
,
'60%'
],
center
:
[
'50%'
,
'60%'
],
label
:{
label
:
{
show
:
false
,
show
:
false
/* align: 'left',
/* align: 'left',
normal:{
normal:{
formatter(v) {
formatter(v) {
...
@@ -58,23 +58,23 @@ const incomeProductOption = {
...
@@ -58,23 +58,23 @@ const incomeProductOption = {
]
]
}
}
function
insertBr
(
text
)
{
function
insertBr
(
text
)
{
if
(
text
.
length
<=
8
)
{
if
(
text
.
length
<=
8
)
{
return
text
;
return
text
}
else
if
(
text
.
length
>
8
&&
text
.
length
<=
16
)
{
}
else
if
(
text
.
length
>
8
&&
text
.
length
<=
16
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
)}
\n`
}
else
if
(
text
.
length
>
16
&&
text
.
length
<=
24
)
{
}
else
if
(
text
.
length
>
16
&&
text
.
length
<=
24
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
)}
\n`
}
else
if
(
text
.
length
>
24
&&
text
.
length
<=
30
)
{
}
else
if
(
text
.
length
>
24
&&
text
.
length
<=
30
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
)}
\n`
}
else
if
(
text
.
length
>
30
)
{
}
else
if
(
text
.
length
>
30
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
,
30
)}
\n
${
text
.
slice
(
30
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
,
30
)}
\n
${
text
.
slice
(
30
)}
\n`
}
}
}
}
function
insertTooltipBr
(
text
)
{
function
insertTooltipBr
(
text
)
{
if
(
text
.
length
<=
30
)
{
if
(
text
.
length
<=
30
)
{
return
text
;
return
text
}
else
if
(
text
.
length
>
30
)
{
}
else
if
(
text
.
length
>
30
)
{
return
text
=
`
${
text
.
slice
(
0
,
30
)}
</br>
${
text
.
slice
(
30
)}
`
return
text
=
`
${
text
.
slice
(
0
,
30
)}
</br>
${
text
.
slice
(
30
)}
`
}
}
}
}
export
default
incomeProductOption
export
default
incomeProductOption
src/views/index/storeFlowOption.js
View file @
cc80fea
const
storeFlowOption
=
{
const
storeFlowOption
=
{
color
:
[
'rgba(9,71,198,1)'
,
'rgba(9,71,198,0.8)'
,
'rgba(9,71,198,0.6)'
,
'rgba(9,71,198,0.4)'
,
'rgba(9,71,198,0.3)'
],
color
:
[
'rgba(9,71,198,1)'
,
'rgba(9,71,198,0.8)'
,
'rgba(9,71,198,0.6)'
,
'rgba(9,71,198,0.4)'
,
'rgba(9,71,198,0.3)'
],
tooltip
:
{
tooltip
:
{
trigger
:
'item'
,
trigger
:
'item'
,
//formatter: '{a} <br/>{b} : {c} ({d}%)',
//
formatter: '{a} <br/>{b} : {c} ({d}%)',
formatter
:
(
params
)
=>
{
formatter
:
(
params
)
=>
{
return
`
${
insertTooltipBr
(
params
.
name
)}
:
${
params
.
value
}
(
${
params
.
percent
}
%)`
return
`
${
insertTooltipBr
(
params
.
name
)}
:
${
params
.
value
}
(
${
params
.
percent
}
%)`
},
},
...
@@ -13,9 +13,9 @@ const storeFlowOption = {
...
@@ -13,9 +13,9 @@ const storeFlowOption = {
orient
:
'vertical'
,
orient
:
'vertical'
,
right
:
0
,
right
:
0
,
data
:
[],
data
:
[],
formatter
:
function
(
name
)
{
formatter
:
function
(
name
)
{
if
(
name
.
length
>
8
)
{
if
(
name
.
length
>
8
)
{
return
name
.
substr
(
0
,
8
)
+
'...'
return
name
.
substr
(
0
,
8
)
+
'...'
}
}
return
name
return
name
},
},
...
@@ -30,12 +30,12 @@ const storeFlowOption = {
...
@@ -30,12 +30,12 @@ const storeFlowOption = {
{
{
name
:
'4s门店客流量'
,
name
:
'4s门店客流量'
,
type
:
'pie'
,
type
:
'pie'
,
minAngle
:
5
,
minAngle
:
5
,
avoidLabelOverlap
:
true
,
avoidLabelOverlap
:
true
,
radius
:
'50%'
,
radius
:
'50%'
,
center
:
[
'40%'
,
'65%'
],
center
:
[
'40%'
,
'65%'
],
label
:{
label
:
{
show
:
false
,
show
:
false
/* align: 'left',
/* align: 'left',
normal:{
normal:{
formatter(v) {
formatter(v) {
...
@@ -48,23 +48,23 @@ const storeFlowOption = {
...
@@ -48,23 +48,23 @@ const storeFlowOption = {
} */
} */
},
},
data
:
[
data
:
[
{
{
value
:
335
,
value
:
335
,
name
:
'直接访问'
,
name
:
'直接访问'
},
},
{
{
value
:
335
,
value
:
335
,
name
:
'直接访问'
,
name
:
'直接访问'
},
},
{
{
value
:
335
,
value
:
335
,
name
:
'直接访问'
,
name
:
'直接访问'
,
itemStyle
:
{
itemStyle
:
{
color
:
'rgba(9,71,198,0.6)'
color
:
'rgba(9,71,198,0.6)'
}
,
}
}
,
}
],
],
emphasis
:
{
emphasis
:
{
itemStyle
:
{
itemStyle
:
{
...
@@ -78,24 +78,24 @@ const storeFlowOption = {
...
@@ -78,24 +78,24 @@ const storeFlowOption = {
}
}
function
insertBr
(
text
)
{
function
insertBr
(
text
)
{
if
(
text
.
length
<=
8
)
{
if
(
text
.
length
<=
8
)
{
return
text
;
return
text
}
else
if
(
text
.
length
>
8
&&
text
.
length
<=
16
)
{
}
else
if
(
text
.
length
>
8
&&
text
.
length
<=
16
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
)}
\n`
}
else
if
(
text
.
length
>
16
&&
text
.
length
<=
24
)
{
}
else
if
(
text
.
length
>
16
&&
text
.
length
<=
24
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
)}
\n`
}
else
if
(
text
.
length
>
24
&&
text
.
length
<=
30
)
{
}
else
if
(
text
.
length
>
24
&&
text
.
length
<=
30
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
)}
\n`
}
else
if
(
text
.
length
>
30
)
{
}
else
if
(
text
.
length
>
30
)
{
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
,
30
)}
\n
${
text
.
slice
(
30
)}
\n`
return
text
=
`
${
text
.
slice
(
0
,
8
)}
\n
${
text
.
slice
(
8
,
16
)}
\n
${
text
.
slice
(
16
,
24
)}
\n
${
text
.
slice
(
24
,
30
)}
\n
${
text
.
slice
(
30
)}
\n`
}
}
}
}
function
insertTooltipBr
(
text
)
{
function
insertTooltipBr
(
text
)
{
if
(
text
.
length
<=
30
)
{
if
(
text
.
length
<=
30
)
{
return
text
;
return
text
}
else
if
(
text
.
length
>
30
)
{
}
else
if
(
text
.
length
>
30
)
{
return
text
=
`
${
text
.
slice
(
0
,
30
)}
</br>
${
text
.
slice
(
30
)}
`
return
text
=
`
${
text
.
slice
(
0
,
30
)}
</br>
${
text
.
slice
(
30
)}
`
}
}
}
}
...
...
src/views/system/login/index.vue
View file @
cc80fea
...
@@ -244,11 +244,11 @@ export default {
...
@@ -244,11 +244,11 @@ export default {
// 注意 这里的演示没有传验证码
// 注意 这里的演示没有传验证码
// 具体需要传递的数据请自行修改代码
// 具体需要传递的数据请自行修改代码
this
.
login
(
_p
)
this
.
login
(
_p
)
.
then
(
async
({
isMutiAccount
,
accountInfo
,
userInfo
})
=>
{
.
then
(
async
({
isMutiAccount
,
accountInfo
,
userInfo
})
=>
{
if
(
isMutiAccount
)
{
if
(
isMutiAccount
)
{
this
.
isMutiAccount
=
isMutiAccount
this
.
isMutiAccount
=
isMutiAccount
this
.
accountInfo
=
accountInfo
this
.
accountInfo
=
accountInfo
this
.
loginToken
=
accountInfo
.
loginToken
this
.
loginToken
=
accountInfo
.
loginToken
}
else
{
}
else
{
const
_current
=
userInfo
.
detail
.
accountType
!==
7
?
await
this
.
current
()
:
'/onlineAccountList'
const
_current
=
userInfo
.
detail
.
accountType
!==
7
?
await
this
.
current
()
:
'/onlineAccountList'
await
this
.
initBaseData
()
await
this
.
initBaseData
()
...
...
src/views/systemConfig/account/accountDetail.vue
View file @
cc80fea
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
import
{
getDetailApi
}
from
'@api/publicAccount'
import
{
getDetailApi
}
from
'@api/publicAccount'
export
default
{
export
default
{
name
:
'accountDetail'
,
name
:
'accountDetail'
,
data
()
{
data
()
{
return
{
return
{
detailForm
:
{},
detailForm
:
{},
// 图片对于字段
// 图片对于字段
...
@@ -200,7 +200,7 @@ export default {
...
@@ -200,7 +200,7 @@ export default {
},
},
watch
:
{
watch
:
{
accountDetailVisible
(
newVal
)
{
accountDetailVisible
(
newVal
)
{
if
(
newVal
)
{
if
(
newVal
)
{
this
.
merchantId
=
this
.
merchantRow
.
merchantId
this
.
merchantId
=
this
.
merchantRow
.
merchantId
this
.
getDetail
()
this
.
getDetail
()
...
@@ -208,13 +208,13 @@ export default {
...
@@ -208,13 +208,13 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
merchantId
=
this
.
merchantRow
.
merchantId
this
.
merchantId
=
this
.
merchantRow
.
merchantId
this
.
getDetail
()
this
.
getDetail
()
},
},
methods
:
{
methods
:
{
getDetail
()
{
getDetail
()
{
getDetailApi
({
merchantId
:
this
.
merchantId
}).
then
(
res
=>
{
getDetailApi
({
merchantId
:
this
.
merchantId
}).
then
(
res
=>
{
// console.log(res)
// console.log(res)
this
.
currentPage
=
res
.
yseMerchantInfo
?
res
.
yseMerchantInfo
.
custType
:
'O'
this
.
currentPage
=
res
.
yseMerchantInfo
?
res
.
yseMerchantInfo
.
custType
:
'O'
...
...
src/views/systemConfig/account/applyAccount.vue
View file @
cc80fea
...
@@ -159,7 +159,7 @@ import { uploadImg, imgRecognitionApi, getBankListApi, getYseBankListApi, sendTo
...
@@ -159,7 +159,7 @@ import { uploadImg, imgRecognitionApi, getBankListApi, getYseBankListApi, sendTo
import
{
registerYseMerchantApi
,
draftYseMerchantApi
,
getDetailApi
}
from
'@api/publicAccount'
import
{
registerYseMerchantApi
,
draftYseMerchantApi
,
getDetailApi
}
from
'@api/publicAccount'
export
default
{
export
default
{
name
:
'applyAccount'
,
name
:
'applyAccount'
,
data
()
{
data
()
{
var
checkPhoneObj
=
{
var
checkPhoneObj
=
{
required
:
true
,
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
...
@@ -641,7 +641,7 @@ export default {
...
@@ -641,7 +641,7 @@ export default {
glUploadImg
glUploadImg
},
},
mounted
()
{
mounted
()
{
if
(
this
.
$route
.
params
.
merchantId
)
{
if
(
this
.
$route
.
params
.
merchantId
)
{
this
.
targetAccount
=
this
.
$route
.
params
this
.
targetAccount
=
this
.
$route
.
params
sessionStorage
.
setItem
(
this
.
sessionName
,
JSON
.
stringify
(
this
.
$route
.
params
))
sessionStorage
.
setItem
(
this
.
sessionName
,
JSON
.
stringify
(
this
.
$route
.
params
))
...
@@ -681,7 +681,7 @@ export default {
...
@@ -681,7 +681,7 @@ export default {
close
:
'd2admin/page/close'
close
:
'd2admin/page/close'
}),
}),
// 获取详情,数据恢复
// 获取详情,数据恢复
getDetail
()
{
getDetail
()
{
getDetailApi
({
merchantId
:
this
.
targetAccount
.
merchantId
}).
then
(
res
=>
{
getDetailApi
({
merchantId
:
this
.
targetAccount
.
merchantId
}).
then
(
res
=>
{
// console.log(res)
// console.log(res)
if
(
res
.
yseMerchantInfo
)
{
if
(
res
.
yseMerchantInfo
)
{
...
@@ -750,19 +750,19 @@ export default {
...
@@ -750,19 +750,19 @@ export default {
})
})
},
},
// 开户行
// 开户行
getBankList
()
{
getBankList
()
{
getBankListApi
({}).
then
(
res
=>
{
getBankListApi
({}).
then
(
res
=>
{
this
.
formList
[
this
.
findFormIdx
(
'bankType'
)].
optionList
=
res
this
.
formList
[
this
.
findFormIdx
(
'bankType'
)].
optionList
=
res
})
})
},
},
// 支行
// 支行
getYseBankList
()
{
},
getYseBankList
()
{
},
// 找到在formList的位置,通过name来匹配
// 找到在formList的位置,通过name来匹配
findFormIdx
(
name
)
{
findFormIdx
(
name
)
{
return
this
.
formList
.
findIndex
(
item
=>
item
.
name
===
name
)
return
this
.
formList
.
findIndex
(
item
=>
item
.
name
===
name
)
},
},
// 切换radio后,将obj里面的图片写入editForm
// 切换radio后,将obj里面的图片写入editForm
afterChangePic
()
{
afterChangePic
()
{
// this[this.typeToForm[this.custType]]
// this[this.typeToForm[this.custType]]
var
picKeys
=
Object
.
keys
(
this
.
picObj
)
var
picKeys
=
Object
.
keys
(
this
.
picObj
)
picKeys
.
forEach
(
item
=>
{
picKeys
.
forEach
(
item
=>
{
...
@@ -776,7 +776,7 @@ export default {
...
@@ -776,7 +776,7 @@ export default {
// console.log(this.picObj)
// console.log(this.picObj)
},
},
// 切换radio/编辑,开户行恢复opt数据
// 切换radio/编辑,开户行恢复opt数据
recoveryOpenAccBank
()
{
recoveryOpenAccBank
()
{
this
.
formList
[
this
.
findFormIdx
(
'openAccBankType'
)].
optionList
=
this
.
editForm
.
openAccBankType
?
[{
branchBankType
:
this
.
editForm
.
openAccBankType
,
branchBankName
:
this
.
editForm
.
openAccBankName
}]
:
[]
this
.
formList
[
this
.
findFormIdx
(
'openAccBankType'
)].
optionList
=
this
.
editForm
.
openAccBankType
?
[{
branchBankType
:
this
.
editForm
.
openAccBankType
,
branchBankName
:
this
.
editForm
.
openAccBankName
}]
:
[]
},
},
// 上传/删除图片后,将图片的值写入Obj中
// 上传/删除图片后,将图片的值写入Obj中
...
@@ -785,7 +785,7 @@ export default {
...
@@ -785,7 +785,7 @@ export default {
// ? (this.editForm.papers[this.picObj[attrName].attrName] = this.picObj[attrName].url)
// ? (this.editForm.papers[this.picObj[attrName].attrName] = this.picObj[attrName].url)
// : delete this.editForm.papers[this.picObj[attrName].attrName]
// : delete this.editForm.papers[this.picObj[attrName].attrName]
// },
// },
handleImgChange
({
file
,
attrName
,
targetItem
})
{
handleImgChange
({
file
,
attrName
,
targetItem
})
{
var
hasFnList
=
[
'idCard'
,
'idCardBack'
,
'bankCard'
,
'businessLicense'
]
var
hasFnList
=
[
'idCard'
,
'idCardBack'
,
'bankCard'
,
'businessLicense'
]
var
reader
=
new
FileReader
()
var
reader
=
new
FileReader
()
var
fileInfo
=
file
.
raw
var
fileInfo
=
file
.
raw
...
@@ -804,18 +804,18 @@ export default {
...
@@ -804,18 +804,18 @@ export default {
})
})
}
}
},
},
handleImgRemove
({
attrName
,
targetItem
})
{
handleImgRemove
({
attrName
,
targetItem
})
{
this
.
picObj
[
attrName
].
url
=
''
this
.
picObj
[
attrName
].
url
=
''
delete
this
.
editForm
.
papers
[
this
.
picObj
[
attrName
].
attrName
]
delete
this
.
editForm
.
papers
[
this
.
picObj
[
attrName
].
attrName
]
// this.writeToEditForm(attrName, false)
// this.writeToEditForm(attrName, false)
// this.$refs.editFormRef.$refs.editFrom.validateField(targetItem.name)
// this.$refs.editFormRef.$refs.editFrom.validateField(targetItem.name)
},
},
handlePreview
(
file
,
attrName
)
{
handlePreview
(
file
,
attrName
)
{
// console.log(file)
// console.log(file)
// console.log(attrName)
// console.log(attrName)
},
},
// 验证码
// 验证码
handleSend
()
{
handleSend
()
{
sendToSmsCodeApi
({
phone
:
this
.
editForm
.
operPhone
}).
then
((
res
)
=>
{
sendToSmsCodeApi
({
phone
:
this
.
editForm
.
operPhone
}).
then
((
res
)
=>
{
this
.
notice
.
okTips
(
'已发送,30分钟内有效'
)
this
.
notice
.
okTips
(
'已发送,30分钟内有效'
)
this
.
isSend
=
true
this
.
isSend
=
true
...
@@ -824,7 +824,7 @@ export default {
...
@@ -824,7 +824,7 @@ export default {
this
.
msgDown
()
this
.
msgDown
()
})
})
},
},
msgDown
()
{
msgDown
()
{
this
.
time
=
setTimeout
(()
=>
{
this
.
time
=
setTimeout
(()
=>
{
clearTimeout
(
this
.
time
)
clearTimeout
(
this
.
time
)
if
(
this
.
sendMsg
>
1
)
{
if
(
this
.
sendMsg
>
1
)
{
...
@@ -836,7 +836,7 @@ export default {
...
@@ -836,7 +836,7 @@ export default {
},
1000
)
},
1000
)
},
},
// 自动识别type - 识别类型(1:身份证;2:银行卡;3:营业执照);imgUrl - 图片地址
// 自动识别type - 识别类型(1:身份证;2:银行卡;3:营业执照);imgUrl - 图片地址
handleAutoRecognition
(
type
,
imgUrl
,
needWriteList
)
{
handleAutoRecognition
(
type
,
imgUrl
,
needWriteList
)
{
// console.log(type)
// console.log(type)
// console.log(imgUrl)
// console.log(imgUrl)
imgRecognitionApi
({
type
:
type
,
imgUrl
:
imgUrl
}).
then
(
res
=>
{
imgRecognitionApi
({
type
:
type
,
imgUrl
:
imgUrl
}).
then
(
res
=>
{
...
@@ -865,7 +865,7 @@ export default {
...
@@ -865,7 +865,7 @@ export default {
}
}
})
})
},
},
getParams
()
{
getParams
()
{
var
params
=
_
.
cloneDeep
(
this
.
editForm
)
var
params
=
_
.
cloneDeep
(
this
.
editForm
)
params
.
merchantId
=
this
.
targetAccount
.
merchantId
params
.
merchantId
=
this
.
targetAccount
.
merchantId
// 身份证日期
// 身份证日期
...
@@ -886,11 +886,11 @@ export default {
...
@@ -886,11 +886,11 @@ export default {
return
params
return
params
},
},
jumpScroll
(
idName
)
{
jumpScroll
(
idName
)
{
document
.
getElementById
(
idName
).
scrollIntoView
()
document
.
getElementById
(
idName
).
scrollIntoView
()
},
},
// 确认
// 确认
handleConfirm
()
{
handleConfirm
()
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
var
picKeys
=
Object
.
keys
(
this
.
picObj
)
var
picKeys
=
Object
.
keys
(
this
.
picObj
)
for
(
var
item
of
picKeys
)
{
for
(
var
item
of
picKeys
)
{
...
@@ -912,7 +912,7 @@ export default {
...
@@ -912,7 +912,7 @@ export default {
})
})
},
},
// 存草稿
// 存草稿
handleDraft
()
{
handleDraft
()
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
draftYseMerchantApi
(
params
).
then
(
res
=>
{
draftYseMerchantApi
(
params
).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
notice
.
okTips
()
...
@@ -920,11 +920,11 @@ export default {
...
@@ -920,11 +920,11 @@ export default {
})
})
},
},
// 删除session
// 删除session
deleteSession
()
{
deleteSession
()
{
sessionStorage
.
removeItem
(
this
.
sessionName
)
sessionStorage
.
removeItem
(
this
.
sessionName
)
},
},
// 取消
// 取消
handleCancel
()
{
handleCancel
()
{
this
.
isSend
=
false
this
.
isSend
=
false
this
.
time
&&
clearTimeout
(
this
.
time
)
this
.
time
&&
clearTimeout
(
this
.
time
)
this
.
deleteSession
()
this
.
deleteSession
()
...
...
src/views/systemConfig/merchant/merchantManage.vue
View file @
cc80fea
...
@@ -176,7 +176,7 @@ export default {
...
@@ -176,7 +176,7 @@ export default {
name
:
'merchantId'
,
name
:
'merchantId'
,
type
:
'input'
,
type
:
'input'
,
placeholder
:
'请输入商户号'
,
placeholder
:
'请输入商户号'
,
isClear
:
true
,
isClear
:
true
// keyFn: this.keyDowmGetList
// keyFn: this.keyDowmGetList
}],
}],
getListApi
:
getList
,
getListApi
:
getList
,
...
...
src/views/systemConfig/merchant/viewDetail.vue
View file @
cc80fea
...
@@ -289,7 +289,7 @@ export default {
...
@@ -289,7 +289,7 @@ export default {
},
},
changeDate
(
date
)
{
changeDate
(
date
)
{
console
.
log
(
date
)
;
console
.
log
(
date
)
var
params
=
{}
var
params
=
{}
params
.
merchantId
=
this
.
merchantInfo
.
merchantId
params
.
merchantId
=
this
.
merchantInfo
.
merchantId
params
.
entryDate
=
date
params
.
entryDate
=
date
...
...
src/views/systemConfig/personalInfo.vue
View file @
cc80fea
...
@@ -114,7 +114,7 @@ export default {
...
@@ -114,7 +114,7 @@ export default {
label
:
'姓名/名称'
label
:
'姓名/名称'
},
{
},
{
name
:
'merchantName'
,
name
:
'merchantName'
,
label
:
'所属商户'
label
:
'所属商户'
}
}
// {
// {
// parentName: 'role',
// parentName: 'role',
...
...
src/views/systemConfig/serviceManage.vue
View file @
cc80fea
...
@@ -300,7 +300,7 @@ export default {
...
@@ -300,7 +300,7 @@ export default {
// merchant: serviceItem
// merchant: serviceItem
}
}
// console.log(params)
// console.log(params)
addParentMerchant
({
data
:
params
}).
then
(
res
=>
{
addParentMerchant
({
data
:
params
}).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
notice
.
okTips
()
this
.
handleRelateClose
()
this
.
handleRelateClose
()
this
.
keyDowmGetList
()
this
.
keyDowmGetList
()
...
...
src/views/systemConfig/yqStoreConfig.vue
View file @
cc80fea
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
import
{
showToast
}
from
'@/common/util'
import
{
showToast
}
from
'@/common/util'
import
{
import
{
GETYQMERCHANTCONFIGDETAIL
,
GETYQMERCHANTCONFIGDETAIL
,
UPDATEYQMERCHANTCONFIG
,
UPDATEYQMERCHANTCONFIG
}
from
'@api/serviceManage'
}
from
'@api/serviceManage'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -33,10 +33,10 @@ export default {
...
@@ -33,10 +33,10 @@ export default {
{
id
:
2
,
name
:
'门店收款'
,
disabled
:
false
},
{
id
:
2
,
name
:
'门店收款'
,
disabled
:
false
},
{
id
:
3
,
name
:
'POS机收款'
,
disabled
:
false
},
{
id
:
3
,
name
:
'POS机收款'
,
disabled
:
false
},
{
id
:
0
,
name
:
'不升级'
,
disabled
:
true
},
{
id
:
0
,
name
:
'不升级'
,
disabled
:
true
},
{
id
:
1
,
name
:
'微信支付'
,
disabled
:
false
}
,
{
id
:
1
,
name
:
'微信支付'
,
disabled
:
false
}
// { id: 4, name: '支付宝支付', disabled: false },
// { id: 4, name: '支付宝支付', disabled: false },
],
],
checkList
:
[
0
]
,
checkList
:
[
0
]
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -45,8 +45,8 @@ export default {
...
@@ -45,8 +45,8 @@ export default {
methods
:
{
methods
:
{
// 获取园区店配置
// 获取园区店配置
getInfo
()
{
getInfo
()
{
le
t
o
=
this
.
$route
.
query
cons
t
o
=
this
.
$route
.
query
le
t
oParams
=
{}
cons
t
oParams
=
{}
oParams
.
yqMerchantId
=
o
.
yqMerchantId
oParams
.
yqMerchantId
=
o
.
yqMerchantId
GETYQMERCHANTCONFIGDETAIL
(
oParams
).
then
((
res
)
=>
{
GETYQMERCHANTCONFIGDETAIL
(
oParams
).
then
((
res
)
=>
{
this
.
checkList
=
res
.
supportPayTypes
||
[]
this
.
checkList
=
res
.
supportPayTypes
||
[]
...
@@ -57,8 +57,8 @@ export default {
...
@@ -57,8 +57,8 @@ export default {
// 监听支付方式勾选
// 监听支付方式勾选
onChange
(
list
)
{
onChange
(
list
)
{
console
.
log
(
list
)
console
.
log
(
list
)
le
t
olist
=
this
.
pageTypeList
cons
t
olist
=
this
.
pageTypeList
le
t
idx
=
list
.
findIndex
((
k
)
=>
k
==
3
)
cons
t
idx
=
list
.
findIndex
((
k
)
=>
k
==
3
)
// 初始化,所有设置可选
// 初始化,所有设置可选
olist
.
map
((
k
)
=>
{
olist
.
map
((
k
)
=>
{
...
@@ -68,7 +68,7 @@ export default {
...
@@ -68,7 +68,7 @@ export default {
return
k
return
k
})
})
//如果包含 POS机收款,则不能选择微信、支付宝
//
如果包含 POS机收款,则不能选择微信、支付宝
if
(
idx
>=
0
)
{
if
(
idx
>=
0
)
{
olist
.
map
((
k
)
=>
{
olist
.
map
((
k
)
=>
{
if
(
k
.
id
==
1
||
k
.
id
==
4
)
{
if
(
k
.
id
==
1
||
k
.
id
==
4
)
{
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
})
})
}
}
//如果包含 微信、支付宝,则不能选择POS机收款
//
如果包含 微信、支付宝,则不能选择POS机收款
if
(
list
.
indexOf
(
1
)
>=
0
||
list
.
indexOf
(
4
)
>=
0
)
{
if
(
list
.
indexOf
(
1
)
>=
0
||
list
.
indexOf
(
4
)
>=
0
)
{
olist
.
map
((
k
)
=>
{
olist
.
map
((
k
)
=>
{
if
(
k
.
id
==
3
)
{
if
(
k
.
id
==
3
)
{
...
@@ -99,31 +99,31 @@ export default {
...
@@ -99,31 +99,31 @@ export default {
saveInfo
()
{
saveInfo
()
{
if
(
!
this
.
checkList
||
this
.
checkList
.
length
<=
0
)
{
if
(
!
this
.
checkList
||
this
.
checkList
.
length
<=
0
)
{
showToast
({
showToast
({
message
:
'请选择支付方式'
,
message
:
'请选择支付方式'
})
})
return
false
return
false
}
}
if
(
this
.
checkList
.
indexOf
(
3
)
<
0
&&
this
.
checkList
.
indexOf
(
1
)
<
0
)
{
if
(
this
.
checkList
.
indexOf
(
3
)
<
0
&&
this
.
checkList
.
indexOf
(
1
)
<
0
)
{
showToast
({
showToast
({
message
:
'微信支付和pos机收款必须选择一个'
,
message
:
'微信支付和pos机收款必须选择一个'
})
})
return
false
return
false
}
}
le
t
oParams
=
{}
cons
t
oParams
=
{}
oParams
.
yqMerchantId
=
this
.
$route
.
query
.
yqMerchantId
oParams
.
yqMerchantId
=
this
.
$route
.
query
.
yqMerchantId
oParams
.
supportPayTypes
=
this
.
checkList
oParams
.
supportPayTypes
=
this
.
checkList
UPDATEYQMERCHANTCONFIG
(
oParams
).
then
((
res
)
=>
{
UPDATEYQMERCHANTCONFIG
(
oParams
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
showToast
({
showToast
({
message
:
'保存成功'
,
message
:
'保存成功'
,
type
:
'success'
,
type
:
'success'
})
})
this
.
goBack
()
this
.
goBack
()
})
})
}
,
}
}
,
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/systemConfig/yqStoreManage.vue
View file @
cc80fea
...
@@ -165,7 +165,7 @@ export default {
...
@@ -165,7 +165,7 @@ export default {
},
{
},
{
confId
:
8
,
confId
:
8
,
confLabel
:
'虚拟园区店'
confLabel
:
'虚拟园区店'
}]
,
}]
}
}
}
}
},
},
...
@@ -228,7 +228,7 @@ export default {
...
@@ -228,7 +228,7 @@ export default {
)
)
}
}
})
})
}
,
}
}
}
}
}
</
script
>
</
script
>
...
...
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