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
11bec33b
Commit
11bec33b
authored
Jul 23, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 维修记账编辑及操作
parent
041f5d9e
Pipeline
#2891
canceled with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
142 additions
and
18 deletions
+142
-18
index.js
api/maintain/index.js
+27
-0
index.vue
components/pop-normal/index.vue
+2
-2
create.vue
pages/maintain-bill/create.vue
+3
-0
detail.vue
pages/maintain-bill/detail.vue
+106
-5
index.vue
pages/maintain-bill/index.vue
+3
-11
particulars.vue
pages/maintain-bill/particulars.vue
+1
-0
No files found.
api/maintain/index.js
View file @
11bec33b
...
@@ -62,3 +62,30 @@ export async function editeRepair(data) {
...
@@ -62,3 +62,30 @@ export async function editeRepair(data) {
data
data
})
})
}
}
// 结清费用
export
async
function
repairSettle
(
data
)
{
return
request
({
url
:
`/rest/repair/settle`
,
method
:
'POST'
,
data
})
}
// 同步到日常记账
export
async
function
repairSync
(
data
)
{
return
request
({
url
:
`/rest/repair/sync`
,
method
:
'POST'
,
data
})
}
// 删除账单
export
async
function
repairDelete
(
data
)
{
return
request
({
url
:
`/rest/repair/delete`
,
method
:
'POST'
,
data
})
}
\ No newline at end of file
components/pop-normal/index.vue
View file @
11bec33b
...
@@ -155,7 +155,7 @@ export default {
...
@@ -155,7 +155,7 @@ export default {
},
},
handleClickConfirm
()
{
handleClickConfirm
()
{
this
.
changeVisibleValue
(
false
)
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'confirm'
,
this
.
select
e
)
this
.
$emit
(
'confirm'
,
this
.
select
)
if
(
this
.
isShare
)
{
if
(
this
.
isShare
)
{
// 去开通会员
// 去开通会员
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -168,7 +168,7 @@ export default {
...
@@ -168,7 +168,7 @@ export default {
},
},
handleClickCancel
()
{
handleClickCancel
()
{
this
.
changeVisibleValue
(
false
)
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'cancel'
,
this
.
selecte
)
this
.
$emit
(
'cancel'
)
if
(
this
.
isShare
)
{
if
(
this
.
isShare
)
{
// 分享领会员
// 分享领会员
}
}
...
...
pages/maintain-bill/create.vue
View file @
11bec33b
...
@@ -441,6 +441,9 @@ export default {
...
@@ -441,6 +441,9 @@ export default {
this
.
buttonLoading
=
true
this
.
buttonLoading
=
true
editeRepair
(
this
.
form
).
then
((
res
)
=>
{
editeRepair
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
if
(
this
.
billId
)
{
uni
.
$emit
(
'maintain-bill-detail'
)
}
this
.
billId
=
res
.
data
this
.
billId
=
res
.
data
this
.
toParticulars
()
this
.
toParticulars
()
this
.
buttonLoading
=
false
this
.
buttonLoading
=
false
...
...
pages/maintain-bill/detail.vue
View file @
11bec33b
...
@@ -80,7 +80,9 @@
...
@@ -80,7 +80,9 @@
</
template
>
</
template
>
<
template
v-slot:content
>
<
template
v-slot:content
>
<view
class=
"record-right-view"
>
<view
class=
"record-right-view"
>
<view
class=
"record-title"
>
{{
operateTexts
[
item
.
type
]
}}
</view>
<view
class=
"record-title"
>
{{
operateTexts
[
item
.
type
.
code
]
}}
</view>
<view
class=
"record-time"
>
{{
item
.
createTime
}}
</view>
<view
class=
"record-time"
>
{{
item
.
createTime
}}
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -141,13 +143,19 @@
...
@@ -141,13 +143,19 @@
:isSelect=
"currentPopInfo.isSelect"
:isSelect=
"currentPopInfo.isSelect"
:bottomTip=
"currentPopInfo.bottomTip"
:bottomTip=
"currentPopInfo.bottomTip"
/>
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
import
NavbarRight
from
'@/components/navbar-right'
import
PopNormal
from
'@/components/pop-normal'
import
PopNormal
from
'@/components/pop-normal'
import
{
repairDetail
}
from
'@/api/maintain/index.js'
import
{
repairDetail
,
repairSettle
,
repairSync
,
repairDelete
,
}
from
'@/api/maintain/index.js'
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -157,7 +165,10 @@ export default {
...
@@ -157,7 +165,10 @@ export default {
data
()
{
data
()
{
return
{
return
{
billId
:
''
,
billId
:
''
,
info
:
{},
info
:
{
sendStatus
:
{},
settleState
:
{},
},
visible
:
false
,
visible
:
false
,
current
:
0
,
current
:
0
,
}
}
...
@@ -173,7 +184,10 @@ export default {
...
@@ -173,7 +184,10 @@ export default {
return
this
.
baseUrl
+
'huishouye@3x.png'
return
this
.
baseUrl
+
'huishouye@3x.png'
},
},
isSure
()
{
isSure
()
{
return
this
.
info
.
sendStatus
.
code
==
'SURE'
return
(
this
.
info
.
sendStatus
.
code
==
'SURE'
||
this
.
info
.
settleState
.
code
==
'YES'
)
},
},
// sendStatus WAIT:未发送;WAIT_SURE:未确定;SURE:已确定
// sendStatus WAIT:未发送;WAIT_SURE:未确定;SURE:已确定
// settleState NO:未结清;YES:已结清
// settleState NO:未结清;YES:已结清
...
@@ -373,11 +387,95 @@ export default {
...
@@ -373,11 +387,95 @@ export default {
this
.
current
=
1
this
.
current
=
1
this
.
visible
=
true
this
.
visible
=
true
},
},
repairSettle
()
{
this
.
loading
=
true
repairSettle
({
id
:
this
.
billId
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
repairDetail
()
this
.
$refs
.
uToast
.
show
({
title
:
'修改成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{},
})
}
this
.
loading
=
false
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
repairSync
()
{
this
.
loading
=
true
repairSync
({
id
:
this
.
billId
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
repairDetail
()
this
.
$refs
.
uToast
.
show
({
title
:
'修改成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{},
})
}
this
.
loading
=
false
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
repairDelete
(
val
)
{
this
.
loading
=
true
repairSync
({
id
:
this
.
billId
,
deleteBookRecord
:
val
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
uni
.
$off
(
'maintain-bill-detail'
)
uni
.
$emit
(
'maintain-bill-detail'
)
this
.
$refs
.
uToast
.
show
({
title
:
'删除成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{
// 跳转
this
.
toListPage
()
},
})
}
this
.
loading
=
false
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
handleClickSure
()
{},
handleClickSure
()
{},
handleClickStatus
()
{
handleClickStatus
()
{
this
.
current
=
2
this
.
current
=
2
this
.
visible
=
true
this
.
visible
=
true
},
},
toListPage
()
{
var
pages
=
getCurrentPages
()
var
index
=
0
for
(
var
item
of
pages
)
{
if
(
item
.
route
.
indexOf
(
'pages/maintain-bill/index'
)
!=
-
1
)
{
console
.
log
(
'---back----'
,
pages
.
length
-
index
)
uni
.
navigateBack
({
delta
:
pages
.
length
-
index
-
1
,
})
return
}
index
++
}
// 回首页
this
.
handleClickHome
()
},
handleClickHome
()
{
handleClickHome
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'/pages/index/index'
,
url
:
'/pages/index/index'
,
...
@@ -396,10 +494,13 @@ export default {
...
@@ -396,10 +494,13 @@ export default {
handleClickConfirm
(
select
)
{
handleClickConfirm
(
select
)
{
if
(
this
.
current
==
0
)
{
if
(
this
.
current
==
0
)
{
// 删除账单
// 删除账单
this
.
repairDelete
(
select
)
}
else
if
(
this
.
current
==
1
)
{
}
else
if
(
this
.
current
==
1
)
{
// 标记为已结清
// 标记为已结清
this
.
repairSettle
()
}
else
if
(
this
.
current
==
2
)
{
}
else
if
(
this
.
current
==
2
)
{
// 同步账单
// 同步账单
this
.
repairSync
()
}
}
},
},
handleClickPreview
(
index
)
{
handleClickPreview
(
index
)
{
...
@@ -441,7 +542,7 @@ export default {
...
@@ -441,7 +542,7 @@ export default {
.content-view
{
.content-view
{
height
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow
:
auto
;
padding
:
24
rpx
24rpx
44rpx
24rpx
;
padding
:
16
rpx
24rpx
44rpx
24rpx
;
.status-view
{
.status-view
{
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
40rpx
;
font-size
:
40rpx
;
...
...
pages/maintain-bill/index.vue
View file @
11bec33b
...
@@ -173,14 +173,14 @@ export default {
...
@@ -173,14 +173,14 @@ export default {
},
},
onLoad
()
{
onLoad
()
{
this
.
init
()
this
.
init
()
uni
.
$on
(
'maintain-bill-
item
'
,
(
res
)
=>
{
uni
.
$on
(
'maintain-bill-
detail
'
,
(
res
)
=>
{
this
.
updateItem
(
res
.
id
,
true
)
this
.
reloadList
(
)
})
})
this
.
_freshing
=
false
this
.
_freshing
=
false
this
.
reloadList
()
this
.
reloadList
()
},
},
onUnload
()
{
onUnload
()
{
uni
.
$off
(
'maintain-bill-
item
'
)
uni
.
$off
(
'maintain-bill-
detail
'
)
},
},
onShow
()
{},
onShow
()
{},
methods
:
{
methods
:
{
...
@@ -336,14 +336,6 @@ export default {
...
@@ -336,14 +336,6 @@ export default {
changeSearch
()
{
changeSearch
()
{
this
.
reloadList
()
this
.
reloadList
()
},
},
updateItem
(
id
,
state
)
{
for
(
var
item
of
this
.
lists
)
{
if
(
item
.
id
==
id
)
{
item
.
echoMap
.
joinState
=
state
}
}
},
handleClickOut
()
{
handleClickOut
()
{
this
.
visible
=
true
this
.
visible
=
true
},
},
...
...
pages/maintain-bill/particulars.vue
View file @
11bec33b
...
@@ -320,6 +320,7 @@ export default {
...
@@ -320,6 +320,7 @@ export default {
editeRepair
(
this
.
info
)
editeRepair
(
this
.
info
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
uni
.
$emit
(
'maintain-bill-detail'
)
this
.
toDetailPage
()
this
.
toDetailPage
()
this
.
buttonLoading
=
false
this
.
buttonLoading
=
false
}
}
...
...
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