Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘文虎
account-book
Commits
d72336ad
Commit
d72336ad
authored
Jul 25, 2022
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
840e3443
bd6059cc
Pipeline
#2920
canceled with stages
Changes
17
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
136 additions
and
140 deletions
+136
-140
daily.js
api/bill/daily.js
+4
-2
index.js
api/bill/index.js
+6
-3
index.js
api/login/index.js
+0
-15
index.js
api/schedule/index.js
+6
-3
index.js
api/upload/index.js
+2
-1
index.js
api/user/index.js
+1
-0
billing-daily.vue
components/billing-daily/billing-daily.vue
+2
-0
debit-detail.vue
pages/bill/debit-note/components/debit-detail.vue
+3
-3
debit-note.vue
pages/bill/debit-note/debit-note.vue
+4
-4
bill.vue
pages/index/bill/bill.vue
+101
-100
bill-count.vue
pages/index/bill/components/bill-count.vue
+1
-1
scroll-box.vue
pages/index/bill/components/scroll-box.vue
+2
-2
index.vue
pages/index/index.vue
+1
-3
plan-step.vue
pages/index/schedule/components/plan-step.vue
+0
-1
schedule.vue
pages/index/schedule/schedule.vue
+1
-2
payments-setting.vue
pages/mine/payments-setting/payments-setting.vue
+1
-0
login.js
store/modules/login.js
+1
-0
No files found.
api/bill/daily.js
View file @
d72336ad
...
...
@@ -3,7 +3,8 @@ export function getList(data) {
return
request
({
url
:
`/rest/bookRecord`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
@@ -11,7 +12,8 @@ export function getBillTypes(data) {
return
request
({
url
:
`/rest/user/bookClassification`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
api/bill/index.js
View file @
d72336ad
...
...
@@ -3,7 +3,8 @@ export function getList(data) {
return
request
({
url
:
`/rest/bookRecord/page`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
@@ -11,7 +12,8 @@ export function get(data) {
return
request
({
url
:
`/rest/bookRecord/detail`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
@@ -20,7 +22,8 @@ export function getStatistics(data) {
return
request
({
url
:
`/rest/bookRecord/statistics`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
api/login/index.js
View file @
d72336ad
import
request
from
"@/utils/request.js"
export
function
addBind
(
data
)
{
return
request
({
url
:
`/iov/business/deviceInfo/bind`
,
method
:
'POST'
,
data
})
}
export
function
getList
(
data
)
{
return
request
({
url
:
`/iov/business/deviceInfo/bind`
,
method
:
'POST'
,
data
})
}
export
function
userAuthLogin
(
data
)
{
return
request
({
...
...
api/schedule/index.js
View file @
d72336ad
...
...
@@ -3,7 +3,8 @@ export function getList(data) {
return
request
({
url
:
`/rest/trip/day`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
@@ -11,7 +12,8 @@ export function getSign(data) {
return
request
({
url
:
`/rest/trip/calendar`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
@@ -19,7 +21,8 @@ export function get(data) {
return
request
({
url
:
`/rest/trip/detail`
,
method
:
'GET'
,
data
data
,
noLoading
:
true
})
}
...
...
api/upload/index.js
View file @
d72336ad
...
...
@@ -6,6 +6,7 @@ export function getQiNiuToken(data) {
method
:
'GET'
,
data
:{
bucketName
:
'banshou-account-book'
,
}
},
noLoading
:
true
})
}
api/user/index.js
View file @
d72336ad
...
...
@@ -3,6 +3,7 @@ export function getUserInfo() {
return
request
({
url
:
`/rest/user`
,
method
:
'GET'
,
noLoading
:
true
})
}
...
...
components/billing-daily/billing-daily.vue
View file @
d72336ad
...
...
@@ -130,6 +130,7 @@ export default {
methods
:
{
init
()
{
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
console
.
log
(
this
.
form
.
happenTime
)
this
.
getBillTypeOptions
();
this
.
getQiniuToken
();
},
...
...
@@ -191,6 +192,7 @@ export default {
latitude
:
''
,
longitude
:
''
};
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
show
=
true
;
}
},
...
...
pages/bill/debit-note/components/debit-detail.vue
View file @
d72336ad
...
...
@@ -3,11 +3,11 @@
<view
class=
"content"
>
<view
class=
"content-item"
>
<text
class=
"content-item-label"
>
客户名称:
</text>
<text
class=
"content-item-value"
>
{{
detail
.
n
ame
}}
</text>
<text
class=
"content-item-value"
>
{{
detail
.
customerN
ame
}}
</text>
</view>
<view
class=
"content-item"
>
<text
class=
"content-item-label"
>
联系电话:
</text>
<text
class=
"content-item-value"
>
{{
detail
.
p
hone
}}
</text>
<text
class=
"content-item-value"
>
{{
detail
.
customerP
hone
}}
</text>
</view>
<view
class=
"line"
>
...
...
@@ -19,7 +19,7 @@
<view
class=
"content-item debt-status"
>
欠款
</view>
<view
class=
"content-item debt-money"
>
<text>
¥
</text>
<text>
{{
detail
.
money
}}
</text>
<text>
{{
detail
.
debtAmount
}}
</text>
</view>
</view>
</view>
...
...
pages/bill/debit-note/debit-note.vue
View file @
d72336ad
...
...
@@ -149,10 +149,10 @@ export default {
}
if
(
records
&&
records
.
length
)
{
records
.
forEach
(
item
=>
{
item
.
stature
=
RandomNumBoth
(
145
,
180
);
item
.
cityName
=
RandomCity
();
});
//
records.forEach(item => {
//
item.stature = RandomNumBoth(145, 180);
//
item.cityName = RandomCity();
//
});
this
.
list
[
this
.
current
].
push
(...
records
);
// 更新底部加载状态
}
...
...
pages/index/bill/bill.vue
View file @
d72336ad
<
template
>
<!-- 账单 -->
<view>
<!--
<NavbarNormal
background=
"transparent"
titleColor=
"#191C27"
:border-bottom=
"false"
:custom-back=
"customBack"
title=
" "
title-bold
>
<view
class=
"left-text"
>
{{
title
}}
</view>
<view
class=
"download"
hover-class=
"u-hover-class"
slot=
"right"
@
click
.
stop=
"downloadExcel"
>
<u-icon
name=
"order"
class=
"download-icon"
></u-icon>
<text>
导出账单
</text>
</view>
</NavbarNormal>
-->
<NavbarRight
backTextBold
backText=
"账单"
text=
"导出账单"
imageWidth=
"20"
:image=
"outImage"
@
click=
"handlClickOut"
/>
<view
class=
"bill"
>
<view
class=
"bill-head"
>
<picker
mode=
"date"
:value=
"defaultDate"
fields=
"month"
@
change=
"chooseMonth"
>
<view
class=
"bill-date"
>
<view
class=
"bill-date-text"
>
{{
form
.
date
}}
</view>
<u-icon
name=
"arrow-down-fill"
class=
"bill-date-icon"
></u-icon>
</view>
</picker>
<view
class=
"bill footer"
>
<NavbarRight
backTextBold
backText=
"账单"
text=
"导出账单"
imageWidth=
"20"
:image=
"outImage"
@
click=
"handlClickOut"
/>
<!-- -->
<view
class=
"bill-head"
>
<picker
mode=
"date"
:value=
"defaultDate"
fields=
"month"
@
change=
"chooseMonth"
>
<view
class=
"bill-date"
>
<view
class=
"bill-date-text"
>
{{
form
.
date
}}
</view>
<u-icon
name=
"arrow-down-fill"
class=
"bill-date-icon"
></u-icon>
</view>
</picker>
</view>
<view
class=
"bill-view"
>
<view
class=
"content-view"
>
<scroll-box
ref=
"scroll-box"
:date=
"defaultDate"
:count=
"statistics"
></scroll-box>
</view>
<view
class=
"content-view"
><scroll-box
ref=
"scroll-box"
:date=
"defaultDate"
:count=
"statistics"
></scroll-box></view>
<u-toast
ref=
"uToast"
/>
</view>
<PopExport
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
/>
<u-toast
ref=
"uToast"
/>
<PopExport
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
/>
<mid-popup
ref=
"midPopup"
@
afterSave=
"afterSave"
></mid-popup>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
</view>
</
template
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
import
PopExport
from
'@/components/pop-export-bill'
import
NavbarRight
from
'@/components/navbar-right'
;
import
PopExport
from
'@/components/pop-export-bill'
;
import
MidPopup
from
'@/components/mid-popup/mid-popup.vue'
;
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
ScrollBox
from
'./components/scroll-box.vue'
;
import
{
tabbar
}
from
'@/utils/settings.js'
;
import
{
baseUrl
}
from
'@/utils/config.js'
;
import
{
keepTwoDecimalFull
}
from
'@/utils/common.js'
;
import
{
downLoad
}
from
"@/utils/download.js"
import
{
downLoad
}
from
'@/utils/download.js'
;
import
{
getList
,
getStatistics
}
from
'@/api/bill/index.js'
;
import
{
exportBill
}
from
"@/api/bill/index.js"
import
{
exportBill
}
from
'@/api/bill/index.js'
;
export
default
{
components
:
{
NavbarRight
,
...
...
@@ -64,7 +46,7 @@ export default {
data
()
{
return
{
tabbar
,
outImage
:
baseUrl
+
'daochuzhangdan@3x.png'
,
outImage
:
baseUrl
+
'daochuzhangdan@3x.png'
,
visible
:
false
,
defaultDate
:
''
,
form
:
{
...
...
@@ -74,20 +56,31 @@ export default {
expense
:
0
,
income
:
0
,
surplus
:
0
}
},
firstEnter
:
true
};
},
computed
:
{
},
onLoad
()
{
this
.
initDate
();
this
.
getMouthStatistics
();
},
onReady
()
{
this
.
$refs
[
'scroll-box'
].
reloadList
();
this
.
firstEnter
=
false
},
onShow
()
{
console
.
log
(
'onShow'
);
if
(
!
this
.
firstEnter
)
{
this
.
$refs
[
'scroll-box'
].
reloadList
();
}
},
methods
:
{
customBack
(){
customBack
()
{
uni
.
switchTab
({
url
:
"/pages/index/index"
})
url
:
'/pages/index/index'
})
;
},
afterSave
()
{},
initDate
()
{
...
...
@@ -111,11 +104,11 @@ export default {
let
{
value
}
=
e
.
detail
;
this
.
defaultDate
=
value
+
'-01'
;
this
.
form
.
date
=
this
.
parseTime
(
value
+
'-01'
,
'{y}年{m}月'
);
console
.
log
(
this
.
defaultDate
)
this
.
$nextTick
(()
=>
{
this
.
getMouthStatistics
()
this
.
$refs
[
"scroll-box"
].
reloadList
()
})
console
.
log
(
this
.
defaultDate
)
;
this
.
$nextTick
(()
=>
{
this
.
getMouthStatistics
()
;
this
.
$refs
[
'scroll-box'
].
reloadList
();
})
;
},
beforeSwitch
(
index
)
{
if
(
index
===
2
)
{
...
...
@@ -125,63 +118,63 @@ export default {
return
true
;
},
handleSelectCell
(
id
)
{},
getDateByMonth
(
timeStamp
)
{
let
inDate
=
new
Date
(
timeStamp
)
let
year
=
inDate
.
getFullYear
()
let
month
=
inDate
.
getMonth
()
let
startTime
=
new
Date
(
year
,
month
,
1
).
getTime
()
let
endTime
=
new
Date
(
year
,
month
+
1
,
0
).
getTime
()
return
{
startTime
:
startTime
,
endTime
:
endTime
}
getDateByMonth
(
timeStamp
)
{
let
inDate
=
new
Date
(
timeStamp
);
let
year
=
inDate
.
getFullYear
();
let
month
=
inDate
.
getMonth
();
let
startTime
=
new
Date
(
year
,
month
,
1
).
getTime
();
let
endTime
=
new
Date
(
year
,
month
+
1
,
0
).
getTime
();
return
{
startTime
:
startTime
,
endTime
:
endTime
};
},
handlClickOut
()
{
this
.
visible
=
true
this
.
visible
=
true
;
},
handleClickConfirm
(
range
)
{
console
.
log
(
range
)
let
startTime
=
''
let
endTime
=
''
if
(
range
)
{
startTime
=
range
[
0
]
endTime
=
range
[
1
]
console
.
log
(
range
)
;
let
startTime
=
''
;
let
endTime
=
''
;
if
(
range
)
{
startTime
=
range
[
0
];
endTime
=
range
[
1
];
}
this
.
downloadExcel
({
startTime
,
endTime
})
// 导出
this
.
downloadExcel
({
startTime
,
endTime
});
// 导出
},
async
downloadExcel
(
date
){
console
.
log
(
"downloadExcel"
)
async
downloadExcel
(
date
)
{
console
.
log
(
'downloadExcel'
);
uni
.
showLoading
({
mask
:
true
,
title
:
"下载中"
})
try
{
let
{
startTime
,
endTime
}
=
date
let
params
=
{
mask
:
true
,
title
:
'下载中'
})
;
try
{
let
{
startTime
,
endTime
}
=
date
;
let
params
=
{
// start:this.parseTime(startTime),
// end:this.parseTime(endTime,"{y}-{m}-{d}")+' 23:59:59',
start
:
startTime
,
end
:
endTime
}
console
.
log
(
params
)
let
res
=
await
exportBill
(
params
)
this
.
saveFile
(
res
)
}
catch
(
e
)
{
this
.
showToast
(
'下载错误'
)
console
.
log
(
"downloadExcel_error"
,
e
)
start
:
startTime
,
end
:
endTime
}
;
console
.
log
(
params
)
;
let
res
=
await
exportBill
(
params
);
this
.
saveFile
(
res
)
;
}
catch
(
e
)
{
this
.
showToast
(
'下载错误'
)
;
console
.
log
(
'downloadExcel_error'
,
e
);
//TODO handle the exception
}
},
async
saveFile
(
file
){
console
.
log
(
"saveFile"
)
try
{
let
res
=
await
downLoad
(
file
)
}
catch
(
e
)
{
uni
.
hideLoading
()
console
.
log
(
"saveFile_error"
,
e
)
async
saveFile
(
file
)
{
console
.
log
(
'saveFile'
);
try
{
let
res
=
await
downLoad
(
file
);
}
catch
(
e
)
{
uni
.
hideLoading
()
;
console
.
log
(
'saveFile_error'
,
e
);
//TODO handle the exception
}
}
...
...
@@ -204,13 +197,25 @@ export default {
margin-right
:
8upx
;
}
}
.bill
{
padding
:
24upx
;
width
:
100%
;
padding
:
0
24upx
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.bill-view
{
flex
:
1
;
width
:
100%
;
overflow
:
hidden
;
}
.content-view
{
height
:
100%
;
width
:
100%
;
overflow
:
hidden
;
}
&
-date
{
margin-bottom
:
24rpx
;
width
:
210upx
;
height
:
48upx
;
background
:
#ffffff
;
...
...
@@ -228,10 +233,6 @@ export default {
margin-left
:
8upx
;
}
}
.content-view
{
flex
:
1
;
width
:
100%
;
overflow
:
hidden
;
}
}
</
style
>
pages/index/bill/components/bill-count.vue
View file @
d72336ad
...
...
@@ -29,7 +29,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.bill-count
{
margin
:
24upx
0
;
margin
-bottom
:
24upx
;
height
:
204upx
;
display
:
flex
;
// padding: 32upx 0;
...
...
pages/index/bill/components/scroll-box.vue
View file @
d72336ad
...
...
@@ -18,7 +18,7 @@
<NoData
v-if=
"noData"
:text=
"noDataText"
customStyle=
"margin-top: 0rpx;"
:imageName=
"noDataImage"
/>
<view
v-else
>
<view
class=
"bill-list"
><BillList
:list=
"records"
@
select=
"handleSelectCell"
/></view>
<view
class=
"load-more-view"
v-show=
"(current == 0 && loaded) || current >
1
"
><u-loadmore
:status=
"loadStatus"
bgColor=
"#F6F7FA"
></u-loadmore></view>
<view
class=
"load-more-view"
v-show=
"(current == 0 && loaded) || current >
0
"
><u-loadmore
:status=
"loadStatus"
bgColor=
"#F6F7FA"
></u-loadmore></view>
</view>
<view
class=
"loading-view"
v-if=
"!loaded && !freshing"
><u-loading
mode=
"flower"
></u-loading></view>
</view>
...
...
@@ -167,10 +167,10 @@ export default {
.scroll-view
{
width
:
100%
;
height
:
100%
;
padding-bottom
:
40rpx
;
}
.load-more-view
{
margin-top
:
24rpx
;
padding-bottom
:
44rpx
;
}
.loading-view
{
width
:
100%
;
...
...
pages/index/index.vue
View file @
d72336ad
...
...
@@ -159,7 +159,6 @@ import MidPopup from '@/components/mid-popup/mid-popup.vue'
import
BillList
from
'@/components/bill-list'
import
PopNormal
from
'@/components/pop-normal'
import
{
tabbar
}
from
'@/utils/settings.js'
import
{
addBind
}
from
'@/api/login/index.js'
import
{
getWeather
,
bookRecord
,
monthRecord
}
from
'@/api/maintain/index.js'
import
{
checkVip
}
from
"@/utils/common.js"
import
{
mapGetters
}
from
'vuex'
;
...
...
@@ -233,7 +232,7 @@ export default {
},
{
image
:
this
.
baseUrl
+
'chabaojia@3x.png'
,
path
:
''
,
path
:
'
pages/bill/quoted-price/quoted-price
'
,
name
:
'查报价'
,
},
{
...
...
@@ -281,7 +280,6 @@ export default {
this
.
bookRecord
()
},
onReady
()
{
addBind
({})
},
methods
:
{
getWeather
()
{
...
...
pages/index/schedule/components/plan-step.vue
View file @
d72336ad
...
...
@@ -29,7 +29,6 @@ export default {
computed
:
{
firstClosed
()
{
let
index
=
this
.
list
.
findIndex
(
item
=>
item
.
status
===
'0'
);
console
.
log
(
index
);
return
index
;
}
},
...
...
pages/index/schedule/schedule.vue
View file @
d72336ad
...
...
@@ -50,11 +50,11 @@ export default {
};
},
onReady
()
{
this
.
ready
=
true
this
.
date
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
month
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}'
)
+
'-01'
;
this
.
getList
();
this
.
getSignList
();
this
.
ready
=
true
},
onShow
()
{
if
(
!
this
.
firstEnter
)
{
...
...
@@ -107,7 +107,6 @@ export default {
title
:
''
};
});
console
.
log
(
this
.
signList
)
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"lunc-calendar"
].
init
(
this
.
date
)
})
...
...
pages/mine/payments-setting/payments-setting.vue
View file @
d72336ad
...
...
@@ -88,6 +88,7 @@ export default {
},
tabChange
(
item
)
{
this
.
form
.
type
=
item
.
value
;
this
.
getList
();
},
toAdd
()
{
this
.
$u
.
route
({
...
...
store/modules/login.js
View file @
d72336ad
...
...
@@ -252,6 +252,7 @@ const actions = {
commit
})
{
let
res
=
uni
.
getSystemInfoSync
();
console
.
log
(
"getSystemInfoSync"
)
commit
(
"SET_SYSTEM_INFO"
,
res
)
let
{
platform
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment