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 eddc7f08
authored
Jun 13, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
other:切换其他分支
1 parent
139868f6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
153 additions
and
165 deletions
src/common/util.js
src/views/financeManage/financeList - 副本.vue
src/views/financeManage/financeList.vue
src/views/financeManage/serviceDetailDialog.vue
src/views/financeManage/serviceFinanceList.vue
src/views/index/index.vue
vue.config.js
src/common/util.js
View file @
eddc7f0
// import Vue from 'vue'
import
{
Message
,
MessageBox
,
Loading
}
from
'element-ui'
import
moment
from
'moment'
// import moment from 'moment'
import
dayjs
from
'dayjs'
let
loadingInstance
=
''
export
const
Util
=
{
/**
...
...
@@ -192,7 +193,7 @@ export const Util = {
if
(
type
)
{
txt
=
type
}
const
m
=
moment
(
str
).
format
(
txt
)
const
m
=
dayjs
(
str
).
format
(
txt
)
return
m
},
...
...
src/views/financeManage/financeList - 副本.vue
View file @
eddc7f0
...
...
@@ -415,7 +415,8 @@
</template>
<
script
>
import
moment
from
'moment'
// import moment from 'moment'
import
dayjs
from
'dayjs'
import
*
as
api
from
'@api/finance'
// import { getSummary, exportFile, getListTotal } from '@api/finance'
import
{
getTransferData
}
from
'@api/index'
...
...
@@ -716,10 +717,10 @@ export default {
api
.
getSummary
({
beginDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
?
dayjs
(
this
.
summaryDate
).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
,
endDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
?
dayjs
(
this
.
summaryDate
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
})
.
then
((
res
)
=>
{
...
...
src/views/financeManage/financeList.vue
View file @
eddc7f0
...
...
@@ -410,7 +410,8 @@
</template>
<
script
>
import
moment
from
'moment'
// import moment from 'moment'
import
dayjs
from
'dayjs'
import
*
as
api
from
'@api/finance'
// import { getSummary, exportFile, getListTotal } from '@api/finance'
import
{
getTransferData
}
from
'@api/index'
...
...
@@ -698,12 +699,12 @@ export default {
api
.
getSummary
({
beginDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
)
?
dayjs
(
this
.
summaryDate
)
.
startOf
(
'month'
)
.
format
(
'YYYY-MM-DD'
)
:
''
,
endDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
)
?
dayjs
(
this
.
summaryDate
)
.
endOf
(
'month'
)
.
format
(
'YYYY-MM-DD'
)
:
''
...
...
src/views/financeManage/serviceDetailDialog.vue
View file @
eddc7f0
<!-- 服务商 - 财务列表 - 查看详情 -->
<
template
>
<d2-dialog
title=
"查看详情"
:isVisible
.
sync=
"isVisible"
btnOkLabel=
"关闭"
width=
"700px"
:noCancel=
"noCancel"
@
confirmDialog=
"handleDetailClose"
@
closeDialog=
"handleDetailClose"
>
<el-form
:inline=
"true"
label-width=
"0"
>
<el-form-item>
<span
class=
"picker-placeholder"
>
<el-date-picker
v-model=
"summaryDate"
type=
"month"
placeholder=
"全部"
:clear=
"false"
:picker-options=
"
{
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '全部',
onClick(picker) {
picker.$emit('pick', '');
}
}]
}"
>
</el-date-picker>
</span>
<el-button
@
click=
"getList"
type=
"primary"
>
查询
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"tableData"
style=
"width: 100%"
border
>
<el-table-column
label=
"序号"
type=
"index"
:align=
"align"
>
</el-table-column>
<el-table-column
prop=
"yqMerchantName"
label=
"园区店名称"
:align=
"align"
>
</el-table-column>
<el-table-column
prop=
"subNums"
label=
"订单笔数"
:align=
"align"
>
</el-table-column>
<el-table-column
prop=
"totalFranchiseeProfitMoney"
label=
"总收入(元)"
:align=
"align"
>
</el-table-column>
</el-table>
</d2-dialog>
</
template
>
<
script
>
import
moment
from
'moment'
import
{
getServiceSummaryApi
}
from
'@api/finance'
export
default
{
name
:
'serviceDetailDialog'
,
data
()
{
return
{
noCancel
:
true
,
align
:
'center'
,
summaryDate
:
''
,
tableData
:
[]
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
date
:
{
type
:
String
,
default
:
''
}
},
watch
:
{
isVisible
(
val
)
{
this
.
summaryDate
=
val
?
this
.
date
:
''
val
&&
this
.
getList
()
}
},
mounted
()
{
},
methods
:
{
getList
()
{
getServiceSummaryApi
({
payStartDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
,
payEndDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
}).
then
((
res
)
=>
{
this
.
tableData
=
res
.
countList
})
},
handleDetailClose
()
{
this
.
$emit
(
'handleStoreClose'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.picker-placeholder
{
.
el-input__inner
::
-webkit-input-placeholder
{
color
:
#606266
;
}
}
</
style
>
<!-- 服务商 - 财务列表 - 查看详情 -->
<
template
>
<d2-dialog
title=
"查看详情"
:isVisible
.
sync=
"isVisible"
btnOkLabel=
"关闭"
width=
"700px"
:noCancel=
"noCancel"
@
confirmDialog=
"handleDetailClose"
@
closeDialog=
"handleDetailClose"
>
<el-form
:inline=
"true"
label-width=
"0"
>
<el-form-item>
<span
class=
"picker-placeholder"
>
<el-date-picker
v-model=
"summaryDate"
type=
"month"
placeholder=
"全部"
:clear=
"false"
:picker-options=
"
{
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '全部',
onClick(picker) {
picker.$emit('pick', '');
}
}]
}">
</el-date-picker>
</span>
<el-button
@
click=
"getList"
type=
"primary"
>
查询
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"tableData"
style=
"width: 100%"
border
>
<el-table-column
label=
"序号"
type=
"index"
:align=
"align"
>
</el-table-column>
<el-table-column
prop=
"yqMerchantName"
label=
"园区店名称"
:align=
"align"
>
</el-table-column>
<el-table-column
prop=
"subNums"
label=
"订单笔数"
:align=
"align"
>
</el-table-column>
<el-table-column
prop=
"totalFranchiseeProfitMoney"
label=
"总收入(元)"
:align=
"align"
>
</el-table-column>
</el-table>
</d2-dialog>
</
template
>
<
script
>
// import moment from 'moment'
import
dayjs
from
'dayjs'
import
{
getServiceSummaryApi
}
from
'@api/finance'
export
default
{
name
:
'serviceDetailDialog'
,
data
()
{
return
{
noCancel
:
true
,
align
:
'center'
,
summaryDate
:
''
,
tableData
:
[]
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
date
:
{
type
:
String
,
default
:
''
}
},
watch
:
{
isVisible
(
val
)
{
this
.
summaryDate
=
val
?
this
.
date
:
''
val
&&
this
.
getList
()
}
},
mounted
()
{
},
methods
:
{
getList
()
{
getServiceSummaryApi
({
payStartDateStr
:
this
.
summaryDate
?
dayjs
(
this
.
summaryDate
).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
,
payEndDateStr
:
this
.
summaryDate
?
dayjs
(
this
.
summaryDate
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
}).
then
((
res
)
=>
{
this
.
tableData
=
res
.
countList
})
},
handleDetailClose
()
{
this
.
$emit
(
'handleStoreClose'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.picker-placeholder
{
.
el-input__inner
::
-webkit-input-placeholder
{
color
:
#606266
;
}
}
</
style
>
src/views/financeManage/serviceFinanceList.vue
View file @
eddc7f0
...
...
@@ -259,7 +259,8 @@
</template>
<
script
>
import
moment
from
'moment'
// import moment from 'moment'
import
dayjs
from
'dayjs'
import
serviceDetailDialog
from
'./serviceDetailDialog'
import
{
getServiceListApi
,
exportFile
,
getListTotal
,
getServicerefApi
,
getServiceSummaryApi
}
from
'@api/finance'
import
{
getPartnerYqListApi
}
from
'@/api/account'
...
...
@@ -535,8 +536,8 @@ export default {
},
getServiceSummary
()
{
getServiceSummaryApi
({
payStartDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
,
payEndDateStr
:
this
.
summaryDate
?
moment
(
this
.
summaryDate
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
payStartDateStr
:
this
.
summaryDate
?
dayjs
(
this
.
summaryDate
).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
,
payEndDateStr
:
this
.
summaryDate
?
dayjs
(
this
.
summaryDate
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
:
''
}).
then
((
res
)
=>
{
this
.
summayData
=
res
this
.
showEmpty
=
!
res
.
countList
.
length
...
...
src/views/index/index.vue
View file @
eddc7f0
...
...
@@ -303,7 +303,8 @@ import {
getIncomeProductList
}
from
'@api/index'
// import notice from '@/common/notice'
import
moment
from
'moment'
// import moment from 'moment'
import
dayjs
from
'dayjs'
import
customTransOption
from
'./customTransOption'
import
storeFlowOption
from
'./storeFlowOption'
import
orderOption
from
'./orderOption'
...
...
@@ -480,8 +481,8 @@ export default {
getCustomerTransList
({
yqMerchantId
:
this
.
isBeSuper
?
this
.
id
:
''
,
beginDateStr
:
moment
().
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
),
endDateStr
:
moment
().
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
beginDateStr
:
dayjs
().
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
),
endDateStr
:
dayjs
().
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
}).
then
((
res
)
=>
{
const
data
=
res
...
...
@@ -553,7 +554,7 @@ export default {
const
colors
=
[
'rgba(0,110,214,0.4)'
,
'rgba(0,110,214,0.6)'
,
'rgba(0,110,214,1)'
]
var
idObj
=
{}
for
(
var
key
in
data
)
{
var
index
=
moment
(
key
).
format
(
'E'
)
-
1
var
index
=
dayjs
(
key
).
format
(
'E'
)
-
1
var
list
=
data
[
key
]
list
.
sort
((
a
,
b
)
=>
{
...
...
@@ -607,7 +608,7 @@ export default {
this
.
showChartLoading
(
this
.
incomeFlowChart
)
getIncomeFlowList
({
yqMerchantId
:
this
.
isBeSuper
?
this
.
id
:
''
,
year
:
moment
().
format
(
'YYYY'
)
year
:
dayjs
().
format
(
'YYYY'
)
}).
then
((
res
)
=>
{
const
data
=
res
...
...
@@ -662,25 +663,25 @@ export default {
switch
(
type
)
{
case
'today'
:
beginDateStr
=
moment
().
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
moment
().
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
beginDateStr
=
dayjs
().
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
dayjs
().
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
break
case
'yesterday'
:
beginDateStr
=
moment
().
subtract
(
1
,
'day'
).
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
moment
().
subtract
(
1
,
'day'
).
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
beginDateStr
=
dayjs
().
subtract
(
1
,
'day'
).
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
dayjs
().
subtract
(
1
,
'day'
).
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
break
case
'thisWeek'
:
// 0 - 周日,特殊处理
beginDateStr
=
moment
().
day
()
?
moment
().
day
(
1
).
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
:
moment
().
subtract
(
6
,
'days'
).
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
moment
().
day
()
?
moment
().
day
(
1
).
add
(
6
,
'days'
).
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
:
moment
().
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
beginDateStr
=
dayjs
().
day
()
?
dayjs
().
day
(
1
).
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
:
dayjs
().
subtract
(
6
,
'days'
).
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
dayjs
().
day
()
?
dayjs
().
day
(
1
).
add
(
6
,
'days'
).
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
:
dayjs
().
endOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
break
case
'thisMonth'
:
beginDateStr
=
moment
().
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
moment
().
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
beginDateStr
=
dayjs
().
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
dayjs
().
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
break
case
'thisYear'
:
beginDateStr
=
moment
().
startOf
(
'year'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
moment
().
endOf
(
'year'
).
format
(
'YYYY-MM-DD'
)
beginDateStr
=
dayjs
().
startOf
(
'year'
).
format
(
'YYYY-MM-DD'
)
endDateStr
=
dayjs
().
endOf
(
'year'
).
format
(
'YYYY-MM-DD'
)
break
}
...
...
@@ -705,7 +706,7 @@ export default {
yqMerchantId
:
this
.
isBeSuper
?
this
.
id
:
''
}
if
(
this
.
customerType
===
'today'
)
{
params
.
needCompareDateStr
=
moment
().
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
params
.
needCompareDateStr
=
dayjs
().
startOf
(
'day'
).
format
(
'YYYY-MM-DD'
)
}
getCustomerData
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
)
...
...
vue.config.js
View file @
eddc7f0
...
...
@@ -24,7 +24,6 @@ const cdn = {
js
:
[
`
${
CDN_DOMAIN
}
/vue.min.js`
,
`
${
CDN_DOMAIN
}
/vue-router.min.js`
,
// `${CDN_DOMAIN}/element-ui/2.15.0/index.js`,
`
${
CDN_DOMAIN
}
/vuex.min.js`
,
`
${
CDN_DOMAIN
}
/axios.min.js`
,
`
${
CDN_DOMAIN
}
/js.cookie.min.js`
,
...
...
@@ -32,9 +31,10 @@ const cdn = {
`
${
CDN_DOMAIN
}
/echarts.min.js`
,
`
${
CDN_DOMAIN
}
/lodash.min.js`
,
`
${
CDN_DOMAIN
}
/qs.min.js`
,
`
${
CDN_DOMAIN
}
/ua-parser.min.js`
// `${CDN_DOMAIN}/element-ui/2.15.0/index.js`,
// `${CDN_DOMAIN}/core-js/2.6.9/core.min.js`,
// `${CDN_DOMAIN}/vue-i18n/8.14.0/vue-i18n.esm.js`,
`
${
CDN_DOMAIN
}
/ua-parser.min.js`
// 'https://unpkg.com/better-scroll@1.15.2/dist/bscroll.min.js'
]
}
...
...
@@ -73,7 +73,6 @@ module.exports = {
if
(
isDev
)
{
config
.
externals
=
{
vue
:
'Vue'
,
// 'element-ui': 'ELEMENT',
'vue-router'
:
'VueRouter'
,
vuex
:
'Vuex'
,
axios
:
'axios'
,
...
...
@@ -81,10 +80,11 @@ module.exports = {
nprogress
:
'NProgress'
,
echarts
:
'echarts'
,
lodash
:
'_'
,
// 'vue-i18n':'vue-i18n',
'ua-parser-js'
:
'UAParser'
,
// 'better-scroll': 'BScroll',
qs
:
'Qs'
// 'element-ui': 'ELEMENT',
// 'vue-i18n':'vue-i18n',
// 'better-scroll': 'BScroll',
// 'core-js': 'core-js'
}
}
...
...
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