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
277e963d
Commit
277e963d
authored
May 24, 2023
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1账单回收站, 2修复收据账单金额过长时图片大写金额无法显示BUG
parent
91ad6dc5
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2534 additions
and
1959 deletions
+2534
-1959
index.js
api/maintain/index.js
+1
-1
recyled.js
api/mine/recyled.js
+16
-0
manifest.json
manifest.json
+3
-3
pages.json
pages.json
+10
-1
debit-note.vue
pages/bill/debit-note/debit-note.vue
+2
-1
index.vue
pages/index/index.vue
+5
-5
show-voucher.vue
pages/maintain-bill/components/show-voucher.vue
+778
-741
debit-detail.vue
pages/mine/recyled/components/debit-detail.vue
+133
-0
recyled.vue
pages/mine/recyled/recyled.vue
+273
-0
employee-create.vue
pages/workpoint/employees/employee-create.vue
+1
-1
create.vue
pages/workpoint/workpoint-create/create.vue
+1290
-1204
index.js
utils/options/maintain-bill/index.js
+2
-2
index.js
utils/options/mine/index.js
+6
-0
recyled.js
utils/options/mine/recyled.js
+14
-0
No files found.
api/maintain/index.js
View file @
277e963d
...
@@ -3,7 +3,7 @@ import request from "@/utils/request.js"
...
@@ -3,7 +3,7 @@ import request from "@/utils/request.js"
// 天气
// 天气
export
async
function
getWeather
(
data
)
{
export
async
function
getWeather
(
data
)
{
return
request
({
return
request
({
url
:
`/rest/anno/weather/getWeather`
,
url
:
`/rest/anno/weather/
v2/
getWeather`
,
method
:
'GET'
,
method
:
'GET'
,
data
,
data
,
noLoading
:
true
noLoading
:
true
...
...
api/mine/recyled.js
0 → 100644
View file @
277e963d
import
request
from
"@/utils/request.js"
export
async
function
getList
(
data
)
{
return
request
({
url
:
`/rest/user/getRecyclingStationList`
,
method
:
'GET'
,
data
})
}
export
async
function
deleteById
(
data
)
{
return
request
({
url
:
`/rest/user/backRecyclingStation`
,
method
:
'GET'
,
data
})
}
\ No newline at end of file
manifest.json
View file @
277e963d
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
"name"
:
"扳手记账"
,
"name"
:
"扳手记账"
,
"appid"
:
"__UNI__EDB8C7C"
,
"appid"
:
"__UNI__EDB8C7C"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.2.
3
"
,
"versionName"
:
"1.2.
4
"
,
"versionCode"
:
12
3
,
"versionCode"
:
12
4
,
"transformPx"
:
false
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
/*
5
+App特有相关
*/
"app-plus"
:
{
"app-plus"
:
{
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
"<uses-permission android:name=
\"
android.permission.WRITE_EXTERNAL_STORAGE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_EXTERNAL_STORAGE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
],
"abiFilters"
:
[
"arm
eabi-v7a"
,
"arm64-v8a"
,
"x86
"
],
"abiFilters"
:
[
"arm
64-v8a
"
],
"autoSdkPermissions"
:
false
,
"autoSdkPermissions"
:
false
,
"permissionExternalStorage"
:
{
"permissionExternalStorage"
:
{
"request"
:
"none"
,
"request"
:
"none"
,
...
...
pages.json
View file @
277e963d
...
@@ -377,6 +377,15 @@
...
@@ -377,6 +377,15 @@
}
}
}
}
,{
"path"
:
"recyled/recyled"
,
"style"
:
{
"navigationBarTitleText"
:
"账单回收站"
,
"enablePullDownRefresh"
:
false
}
}
]
]
},
},
{
{
...
...
pages/bill/debit-note/debit-note.vue
View file @
277e963d
...
@@ -76,7 +76,7 @@ export default {
...
@@ -76,7 +76,7 @@ export default {
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
swiperCurrent
:
0
,
// swiper组件的current值,表示当前那个swiper-item是活动的
swiperCurrent
:
0
,
// swiper组件的current值,表示当前那个swiper-item是活动的
tabs
:
debitNoteTabs
,
tabs
:
debitNoteTabs
,
pages
:
debitNotePages
,
pages
:
JSON
.
parse
(
JSON
.
stringify
(
debitNotePages
))
,
activeItemStyle
:
{
activeItemStyle
:
{
color
:
'#ff286d'
color
:
'#ff286d'
},
},
...
@@ -171,6 +171,7 @@ export default {
...
@@ -171,6 +171,7 @@ export default {
this
.
swiperCurrent
=
current
;
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
this
.
current
=
current
;
console
.
log
(
'-------animationfinish------'
);
console
.
log
(
'-------animationfinish------'
);
console
.
log
(
this
.
currentPage
);
if
(
this
.
currentPage
.
pageNumber
===
1
)
{
if
(
this
.
currentPage
.
pageNumber
===
1
)
{
this
.
onRefresh
();
this
.
onRefresh
();
}
}
...
...
pages/index/index.vue
View file @
277e963d
...
@@ -19,15 +19,15 @@
...
@@ -19,15 +19,15 @@
<view
class=
"title-view"
>
扳手记账
</view>
<view
class=
"title-view"
>
扳手记账
</view>
</view>
</view>
<view
class=
"right-view"
@
click=
"$u.throttle(getWeather, 1000)"
>
<view
class=
"right-view"
@
click=
"$u.throttle(getWeather, 1000)"
>
<view
class=
"location-view"
>
<view
class=
"location-view"
v-if=
"!weather.text"
>
<view
class=
"location-icon-view"
><image
:src=
"dingweidizhiImage"
></image></view>
<view
class=
"location-icon-view"
><image
:src=
"dingweidizhiImage"
></image></view>
<view>
{{
weather
.
city
||
'查天气'
}}
</view>
<view>
查天气
</view>
</view>
</view>
<view
class=
"weather-view"
v-if=
"weather.
weather
"
>
<view
class=
"weather-view"
v-if=
"weather.
text
"
>
<!--
<view
class=
"weather-icon-view"
>
<!--
<view
class=
"weather-icon-view"
>
<image
:src=
"weather.icon"
></image>
<image
:src=
"weather.icon"
></image>
</view>
-->
</view>
-->
<view
class=
"weather-text"
>
{{
weather
.
weather
}}
</view>
<view
class=
"weather-text"
>
{{
weather
.
text
}}
</view>
<view>
{{
weather
.
temp
}}
℃
</view>
<view>
{{
weather
.
temp
}}
℃
</view>
</view>
</view>
</view>
</view>
...
@@ -658,7 +658,7 @@ export default {
...
@@ -658,7 +658,7 @@ export default {
color
:
#333333
;
color
:
#333333
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-left
:
24rpx
;
//
margin-left: 24rpx;
.weather-icon-view
{
.weather-icon-view
{
margin-right
:
8rpx
;
margin-right
:
8rpx
;
width
:
28rpx
;
width
:
28rpx
;
...
...
pages/maintain-bill/components/show-voucher.vue
View file @
277e963d
This diff is collapsed.
Click to expand it.
pages/mine/recyled/components/debit-detail.vue
0 → 100644
View file @
277e963d
<
template
>
<view
class=
"debit-detail"
>
<view
class=
"debit-detail-icon"
v-if=
"detail.icon"
>
<image
:src=
"detail.icon"
mode=
""
></image>
</view>
<view
class=
"content"
>
<view
class=
"content-title"
>
<view
class=
"content-title-text ellipsis"
>
<text>
{{
detail
.
name
}}
</text>
</view>
<view
class=
"amount ellipsis"
v-if=
"detail.amount"
>
{{
detail
.
amount
}}
</view>
</view>
<view
class=
"content-item"
>
<text
class=
"content-item-label"
>
创建时间
</text>
<text
class=
"content-item-value"
>
{{
detail
.
createTime
||
''
}}
</text>
</view>
<view
class=
"content-item"
>
<text
class=
"content-item-label"
>
删除时间
</text>
<text
class=
"content-item-value"
>
{{
detail
.
deleteTime
||
''
}}
</text>
</view>
</view>
<view
class=
"debit-detail-right"
hover-class=
"u-hover-class"
@
click=
"toRecyled"
>
恢复
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
detail
:
{
type
:
Object
,
default
:
()
=>
{}
},
current
:
{
type
:
Number
,
default
:
0
},
},
computed
:{
showDebtAmount
(){
let
debtAmount
=
this
.
detail
.
debtAmount
if
(
!
debtAmount
){
return
false
}
return
parseFloat
(
debtAmount
)
>
0
}
},
data
()
{
return
{};
},
methods
:{
toBill
(){
this
.
$u
.
route
({
url
:
'/pages/maintain-bill/index'
,
type
:
'navigateTo'
,
params
:
{
customerId
:
this
.
detail
.
customerId
,
onlyDebt
:
1
,
}
});
},
toRecyled
(){
this
.
$emit
(
"handleClick"
,
this
.
detail
)
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.debit-detail
{
// height: 152upx;
background
:
#FFFFFF
;
border-radius
:
16upx
;
padding
:
24upx
;
padding-right
:
0
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
24upx
;
.content
{
flex
:
1
;
// width: 420upx;
position
:
relative
;
overflow
:
hidden
;
&
-title
{
font-size
:
28upx
;
// line-height: 40upx;
// min-height: 40upx;
margin-bottom
:
12upx
;
font-weight
:
bold
;
&
-text
{
display
:
inline-block
;
margin-right
:
24rpx
;
max-width
:
422rpx
;
}
.amount
{
display
:
inline-block
;
// max-width: 108rpx;
}
}
&
-item
{
font-size
:
24upx
;
line-height
:
40upx
;
min-height
:
40upx
;
&
-label
{
color
:
#8D8D8D
;
}
&
-value
{
// font-weight: bold;
margin-left
:
24rpx
;
color
:
#8D8D8D
;
}
}
}
&
-icon
{
width
:
72rpx
;
height
:
72rpx
;
margin-right
:
24rpx
;
}
&
-right
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
28rpx
;
margin-left
:
24rpx
;
width
:
100rpx
;
height
:
100%
;
color
:
#3383FE
;
}
}
</
style
>
pages/mine/recyled/recyled.vue
0 → 100644
View file @
277e963d
<
template
>
<!-- 查欠账 -->
<view
class=
"debit-note"
>
<!--
<view
class=
"search-wrap"
>
<u-search
v-model=
"form.keyword"
height=
"80"
bg-color=
"#ffffff"
:show-action=
"false"
placeholder=
"搜索客户姓名/手机"
@
search=
"changeSearch"
></u-search>
</view>
-->
<view
class=
"tabs-box"
>
<u-tabs-swiper
ref=
"uTabs"
bg-color=
"#f6f7fa"
font-size=
"28"
bar-width=
"32"
bar-height=
"4"
height=
"60"
inactive-color=
"#8D8D8D"
active-color=
"#02A074"
name=
"title"
:list=
"tabs"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
<view
class=
"swiper-box"
>
<swiper
duration=
"200"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
style=
"height:100%"
>
<swiper-item
class=
"swiper-item"
v-for=
"(listData, index) in list"
:key=
"index"
>
<scroll-view
scroll-y
scroll-anchoring
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"onreachBottom"
@
refresherrefresh=
"refresherrefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
refresher-enabled
:refresher-triggered=
"getCurrentPage(index).triggered"
:refresher-threshold=
"100"
>
<view
class=
"scroll-view"
>
<NoData
v-if=
"noData(index)"
:text=
"noDataText"
customStyle=
"margin-top: 0rpx;"
/>
<template
v-else
>
<view
class=
"container"
><debit-detail
v-for=
"item in listData"
:key=
"item.id"
:detail=
"item"
:current=
"current"
@
handleClick=
"handleClick"
></debit-detail>
</view>
<view
class=
"loading-view"
v-if=
"!getCurrentPage(index).loaded && getCurrentPage(index).freshing"
><u-loading
mode=
"flower"
></u-loading></view>
<view
v-show=
"(getCurrentPage(index).pageNumber === 1 && getCurrentPage(index).loaded) || getCurrentPage(index).pageNumber > 1"
>
<u-loadmore
:status=
"getCurrentPage(index).loadStatus"
/>
</view>
</
template
>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<PopInput
title=
"提醒"
type=
"text"
sureText=
"恢复"
:content=
"popContent"
:visible
.
sync=
"showConfirm"
@
click=
"handleConfirm"
/>
</view>
</template>
<
script
>
import
NoData
from
'@/components/no-data'
;
import
PopInput
from
'@/components/pop-input-view'
;
import
DebitDetail
from
'./components/debit-detail.vue'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
debitNotePages
}
from
'@/utils/options/bill/index.js'
;
import
{
tabsOptions
}
from
'@/utils/options/mine/recyled.js'
;
import
{
getList
,
deleteById
}
from
'@/api/mine/recyled.js'
;
export
default
{
components
:
{
NoData
,
DebitDetail
,
PopInput
},
data
()
{
return
{
form
:
{
keyword
:
''
},
// list: [[], [], []],
list
:
{
'0'
:
[],
'1'
:
[],
'2'
:
[]
},
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
swiperCurrent
:
0
,
// swiper组件的current值,表示当前那个swiper-item是活动的
tabs
:
tabsOptions
,
pages
:
JSON
.
parse
(
JSON
.
stringify
(
debitNotePages
)),
activeItemStyle
:
{
color
:
'#ff286d'
},
noDataText
:
'当前暂无账单信息'
,
currentItem
:
null
,
showConfirm
:
false
,
// 删除弹框
};
},
computed
:
{
currentTab
()
{
return
this
.
tabs
[
this
.
current
];
},
currentPage
()
{
return
this
.
pages
[
this
.
current
];
},
popContent
()
{
return
this
.
current
===
2
?
"确定恢复此记录吗?"
:
"确定恢复此账单吗?"
}
},
onLoad
(
options
)
{
this
.
init
();
uni
.
$on
(
'debit-bill-list'
,
res
=>
{
this
.
init
();
});
},
onUnload
()
{
uni
.
$off
(
'debit-bill-list'
);
},
methods
:
{
handleClick
(
info
)
{
this
.
currentItem
=
info
this
.
showConfirm
=
true
},
handleConfirm
()
{
this
.
handleDelete
();
},
async
handleDelete
()
{
if
(
!
this
.
currentItem
.
id
)
{
this
.
showToast
(
this
.
current
===
2
?
"记录不存在"
:
"账单不存在"
);
return
false
;
}
try
{
await
deleteById
({
id
:
this
.
currentItem
.
id
,
type
:
this
.
currentItem
.
type
.
code
});
this
.
showToast
(
'删除成功'
,
true
);
this
.
onRefresh
();
}
catch
(
e
)
{
//TODO handle the exception
}
},
changeSearch
()
{
this
.
onRefresh
();
},
noData
(
index
)
{
return
this
.
list
[
index
].
length
==
0
&&
this
.
getCurrentPage
(
index
).
loaded
;
},
getCurrentPage
(
index
)
{
return
this
.
pages
[
index
];
},
init
()
{
this
.
onRefresh
();
},
async
getData
()
{
if
(
this
.
currentPage
.
pageNumber
===
1
)
{
this
.
currentPage
.
loaded
=
false
;
}
var
postData
=
{
// keyword: this.form.keyword,
type
:
this
.
currentTab
.
name
,
size
:
this
.
currentPage
.
size
,
current
:
this
.
currentPage
.
pageNumber
};
try
{
let
res
=
await
getList
(
postData
);
let
records
=
res
.
data
;
if
(
this
.
currentPage
.
pageNumber
===
1
)
{
// 下拉刷新或切换到新tab,清空对应数组
this
.
list
[
this
.
current
]
=
[];
}
if
(
records
&&
records
.
length
)
{
this
.
list
[
this
.
current
].
push
(...
records
);
// 更新底部加载状态
}
// 更新底部加载状态
this
.
currentPage
.
loadStatus
=
'nomore'
;
}
catch
(
e
)
{
console
.
log
(
'error'
,
e
);
}
this
.
currentPage
.
loaded
=
true
;
this
.
$nextTick
(()
=>
{
this
.
currentPage
.
triggered
=
false
;
this
.
currentPage
.
freshing
=
false
;
});
},
// tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
console
.
log
(
'-------tabsChange------'
);
// this.getWalletRecord(); // 与swiper change重复,tab变化无需再次请求数据
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish
(
e
)
{
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
console
.
log
(
'-------animationfinish------'
);
console
.
log
(
this
.
currentPage
);
if
(
this
.
currentPage
.
pageNumber
===
1
)
{
this
.
onRefresh
();
}
},
onRefresh
()
{
if
(
this
.
currentPage
.
freshing
)
return
;
this
.
currentPage
.
freshing
=
true
;
this
.
currentPage
.
pageNumber
=
1
;
this
.
getData
();
},
refresherrefresh
()
{
this
.
currentPage
.
triggered
=
true
;
this
.
onRefresh
()
},
onRestore
()
{
// this.currentPage.triggered = 'restore'; // 需要重置
},
onreachBottom
(
e
)
{
//上拉触底函数
if
(
this
.
currentPage
.
loadStatus
===
'loadmore'
)
{
//此处判断,上锁,防止重复请求
this
.
currentPage
.
loadStatus
==
'loading'
;
this
.
currentPage
.
pageNumber
+=
1
;
this
.
getData
();
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.debit-note
{
padding
:
24upx
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.search-wrap
{
width
:
100%
;
}
.tabs-box
{
margin
:
32upx
0
;
}
.swiper-box
{
flex
:
1
;
width
:
100%
;
}
.swiper-item
{
height
:
100%
;
}
.container
{
padding
:
20upx
0
;
}
.loading-view
{
width
:
100%
;
background-color
:
transparent
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
top
:
50%
;
left
:
0
;
position
:
fixed
;
}
.scroll-view
{
width
:
100%
;
height
:
100%
;
}
}
</
style
>
\ No newline at end of file
pages/workpoint/employees/employee-create.vue
View file @
277e963d
...
@@ -93,7 +93,7 @@ export default {
...
@@ -93,7 +93,7 @@ export default {
current
:
1
,
current
:
1
,
size
:
20
,
size
:
20
,
employees
:
[],
employees
:
[],
//
showMember: false,
showMember
:
false
,
platform
:
''
,
platform
:
''
,
focus
:
false
,
focus
:
false
,
currentPopInfo
:
{}
currentPopInfo
:
{}
...
...
pages/workpoint/workpoint-create/create.vue
View file @
277e963d
This diff is collapsed.
Click to expand it.
utils/options/maintain-bill/index.js
View file @
277e963d
...
@@ -244,12 +244,12 @@ export const canvasTableCellOptions = [{
...
@@ -244,12 +244,12 @@ export const canvasTableCellOptions = [{
export
const
tableFooterOptions
=
[{
export
const
tableFooterOptions
=
[{
value
:
"upperCase"
,
value
:
"upperCase"
,
label
:
"大写金额:"
,
label
:
"大写金额:"
,
width
:
"
70%
"
,
width
:
"
140px
"
,
},
},
{
{
value
:
"lowerCase"
,
value
:
"lowerCase"
,
label
:
"(小写)"
,
label
:
"(小写)"
,
width
:
"
30%
"
,
width
:
"
55px
"
,
},
},
]
]
...
...
utils/options/mine/index.js
View file @
277e963d
...
@@ -49,6 +49,12 @@ export const packageOptions = [
...
@@ -49,6 +49,12 @@ export const packageOptions = [
icon
:
'file-text'
,
icon
:
'file-text'
,
path
:
"/pages/mine/import-export/import-export"
path
:
"/pages/mine/import-export/import-export"
},
},
{
id
:
5
,
title
:
'账单回收站'
,
icon
:
'file-text'
,
path
:
"/pages/mine/recyled/recyled"
},
{
{
id
:
1
,
id
:
1
,
title
:
'关于'
,
title
:
'关于'
,
...
...
utils/options/mine/recyled.js
0 → 100644
View file @
277e963d
export
const
tabsOptions
=
[{
title
:
'日常记账'
,
name
:
"DAILY"
},
{
title
:
'收据记账'
,
name
:
"REPAIR"
},
{
title
:
'记工时'
,
name
:
'PROJECT'
},
]
\ No newline at end of file
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