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
6f00cff2
Commit
6f00cff2
authored
Jul 25, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
c2d42b79
f867451d
Pipeline
#2909
canceled with stages
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
362 additions
and
166 deletions
+362
-166
index.js
api/card/index.js
+31
-1
index.vue
components/cell-card/index.vue
+7
-7
create.vue
pages/card/create.vue
+93
-55
index.vue
pages/card/index.vue
+226
-97
create.vue
pages/maintain-bill/create.vue
+2
-2
detail.vue
pages/maintain-bill/detail.vue
+1
-2
index.vue
pages/maintain-bill/index.vue
+2
-2
No files found.
api/card/index.js
View file @
6f00cff2
...
@@ -14,7 +14,7 @@ export async function getCollectionCode(data) {
...
@@ -14,7 +14,7 @@ export async function getCollectionCode(data) {
export
async
function
setCollectionCode
(
data
)
{
export
async
function
setCollectionCode
(
data
)
{
return
request
({
return
request
({
url
:
`/rest/collectionCode`
,
url
:
`/rest/collectionCode`
,
method
:
'POS
t
'
,
method
:
'POS
T
'
,
data
,
data
,
noLoading
:
true
noLoading
:
true
})
})
...
@@ -28,4 +28,34 @@ export async function getBusinessCard(data) {
...
@@ -28,4 +28,34 @@ export async function getBusinessCard(data) {
data
,
data
,
noLoading
:
true
noLoading
:
true
})
})
}
// 查询名片操作履历
export
async
function
getBusinessCardRecord
(
data
)
{
return
request
({
url
:
`/rest/businessCard/viewRecord`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 名片操作统计
export
async
function
operateStatistics
(
data
)
{
return
request
({
url
:
`/rest/businessCard/operateStatistics`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 新增更新名片
export
async
function
editBusinessCard
(
data
)
{
return
request
({
url
:
`/rest/businessCard`
,
method
:
'POST'
,
data
,
noLoading
:
true
})
}
}
\ No newline at end of file
components/cell-card/index.vue
View file @
6f00cff2
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</view>
</view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"top-view"
>
<view
class=
"top-view"
>
<view
class=
"title-view"
>
{{
info
.
t
itle
}}
</view>
<view
class=
"title-view"
>
{{
info
.
frontT
itle
}}
</view>
</view>
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
<view
class=
"name-view"
>
{{
info
.
name
}}
</view>
<view
class=
"info-view"
>
<view
class=
"info-view"
>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<
template
v-else-if=
"isBlue"
>
<
template
v-else-if=
"isBlue"
>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"top-view top-blue"
>
<view
class=
"top-view top-blue"
>
<view
class=
"title-view title-blue"
>
{{
info
.
t
itle
}}
</view>
<view
class=
"title-view title-blue"
>
{{
info
.
frontT
itle
}}
</view>
<view
<view
class=
"right-view"
class=
"right-view"
hover-class=
"u-hover-class"
hover-class=
"u-hover-class"
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
</view>
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<view
class=
"title-view"
>
{{
info
.
t
itle
}}
</view>
<view
class=
"title-view"
>
{{
info
.
frontT
itle
}}
</view>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -110,17 +110,17 @@ export default {
...
@@ -110,17 +110,17 @@ export default {
return
this
.
baseUrl
+
'muban1zhengmian@3x.png'
return
this
.
baseUrl
+
'muban1zhengmian@3x.png'
},
},
isGreen
()
{
isGreen
()
{
return
this
.
info
.
type
==
'green'
return
this
.
info
.
coverUrl
==
'green'
},
},
isBlue
()
{
isBlue
()
{
return
this
.
info
.
type
==
'blue'
return
this
.
info
.
coverUrl
==
'blue'
},
},
isBlack
()
{
isBlack
()
{
return
this
.
info
.
type
==
'black'
return
this
.
info
.
coverUrl
==
'black'
},
},
// green 绿;blue 蓝;black 黑;
// green 绿;blue 蓝;black 黑;
settings
()
{
settings
()
{
switch
(
this
.
info
.
type
)
{
switch
(
this
.
info
.
coverUrl
)
{
case
'green'
:
case
'green'
:
return
{
return
{
color
:
'#02A074'
,
color
:
'#02A074'
,
...
...
pages/card/create.vue
View file @
6f00cff2
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
:clearable=
"false"
:clearable=
"false"
:custom-style=
"customStyle"
:custom-style=
"customStyle"
:placeholder-style=
"placeholderStyle"
:placeholder-style=
"placeholderStyle"
v-model=
"form.
phone
"
v-model=
"form.
address
"
placeholder=
"填写地址"
placeholder=
"填写地址"
/>
/>
</u-form-item>
</u-form-item>
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
:clearable=
"false"
:clearable=
"false"
:custom-style=
"customStyle"
:custom-style=
"customStyle"
:placeholder-style=
"placeholderStyle"
:placeholder-style=
"placeholderStyle"
v-model=
"form.
t
itle"
v-model=
"form.
frontT
itle"
@
input=
"handleInput"
@
input=
"handleInput"
placeholder=
"填写正面标题,不超过12个字"
placeholder=
"填写正面标题,不超过12个字"
/>
/>
...
@@ -61,13 +61,16 @@
...
@@ -61,13 +61,16 @@
<view
<view
:class=
"
:class=
"
'image-view ' +
'image-view ' +
(form.c
urrentIndex == index
? 'is-select' : '')
(form.c
overUrl == types[index]
? 'is-select' : '')
"
"
@
click=
"handleClickSelect(index)"
@
click=
"handleClickSelect(index)"
>
>
<image
:src=
"item[0]"
></image>
<image
:src=
"item[0]"
></image>
</view>
</view>
<view
class=
"top-image-view"
v-if=
"form.currentIndex == index"
>
<view
class=
"top-image-view"
v-if=
"form.coverUrl == types[index]"
>
<image
:src=
"yixuanzemubanImage"
></image>
<image
:src=
"yixuanzemubanImage"
></image>
</view>
</view>
<view
<view
...
@@ -90,7 +93,7 @@
...
@@ -90,7 +93,7 @@
:clearable=
"false"
:clearable=
"false"
:custom-style=
"customStyle"
:custom-style=
"customStyle"
:placeholder-style=
"placeholderStyle"
:placeholder-style=
"placeholderStyle"
v-model=
"form.
phon
e"
v-model=
"form.
backTitl
e"
placeholder=
"填写正面标题,不超过12个字"
placeholder=
"填写正面标题,不超过12个字"
/>
/>
</u-form-item>
</u-form-item>
...
@@ -104,7 +107,7 @@
...
@@ -104,7 +107,7 @@
:clearable=
"false"
:clearable=
"false"
:custom-style=
"customAreaStyle"
:custom-style=
"customAreaStyle"
:placeholder-style=
"placeholderStyle"
:placeholder-style=
"placeholderStyle"
v-model=
"form.
phone
"
v-model=
"form.
backContext
"
placeholder=
"填写服务内容 举例:家电维修安装、清洗服"
placeholder=
"填写服务内容 举例:家电维修安装、清洗服"
/>
/>
</view>
</view>
...
@@ -117,35 +120,41 @@
...
@@ -117,35 +120,41 @@
:custom-style=
"customConFirm"
:custom-style=
"customConFirm"
@
click=
"handleClickSure"
@
click=
"handleClickSure"
:disabled=
"!canConfirm"
:disabled=
"!canConfirm"
:loading=
"buttonLoading"
>
>
<view
class=
"confirm-view"
>
确定
</view>
<view
class=
"confirm-view"
>
确定
</view>
</u-button>
</u-button>
</view>
</view>
<PopImage
:visible
.
sync=
"visible"
:images=
"currentImages"
/>
<PopImage
:visible
.
sync=
"visible"
:images=
"currentImages"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
import
NavbarRight
from
'@/components/navbar-right'
import
PopImage
from
'@/components/pop-image'
import
PopImage
from
'@/components/pop-image'
import
{
editbusinessCard
}
from
'@/api/card/index.js'
export
default
{
export
default
{
components
:
{
components
:
{
NavbarRight
,
NavbarRight
,
PopImage
PopImage
,
},
},
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
info
:
{}
,
cardId
:
''
,
form
:
{
form
:
{
date
:
''
,
address
:
''
,
time
:
''
,
backContext
:
''
,
currentIndex
:
0
,
backTitle
:
''
,
coverUrl
:
'green'
,
frontTitle
:
''
,
name
:
''
,
phone
:
''
,
},
},
maxlength
:
12
,
maxlength
:
12
,
visible
:
false
,
visible
:
false
,
currentImages
:
[]
currentImages
:
[]
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -155,11 +164,14 @@ export default {
...
@@ -155,11 +164,14 @@ export default {
yixuanzemubanImage
()
{
yixuanzemubanImage
()
{
return
this
.
baseUrl
+
'yixuanzemuban@3x.png'
return
this
.
baseUrl
+
'yixuanzemuban@3x.png'
},
},
types
()
{
return
[
'green'
,
'blue'
,
'black'
]
},
templates
()
{
templates
()
{
return
[
return
[
[
this
.
baseUrl
+
'1zhengmian@3x.png'
,
this
.
baseUrl
+
'1fanmian@3x.png'
],
[
this
.
baseUrl
+
'1zhengmian@3x.png'
,
this
.
baseUrl
+
'1fanmian@3x.png'
],
[
this
.
baseUrl
+
'2zhengmian@3x.png'
,
this
.
baseUrl
+
'2fanmian@3x.png'
],
[
this
.
baseUrl
+
'2zhengmian@3x.png'
,
this
.
baseUrl
+
'2fanmian@3x.png'
],
[
this
.
baseUrl
+
'3zhengmian@3x.png'
,
this
.
baseUrl
+
'3fanmian@3x.png'
],
[
this
.
baseUrl
+
'3zhengmian@3x.png'
,
this
.
baseUrl
+
'3fanmian@3x.png'
],
]
]
},
},
dianjiyulanImage
()
{
dianjiyulanImage
()
{
...
@@ -191,35 +203,42 @@ export default {
...
@@ -191,35 +203,42 @@ export default {
{
{
required
:
true
,
required
:
true
,
message
:
'请填写姓名'
,
message
:
'请填写姓名'
,
trigger
:
[
'change'
,
'blur'
],
//
trigger: ['change', 'blur'],
},
},
],
],
phone
:
[
phone
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请填写电话'
,
message
:
'请填写电话'
,
trigger
:
[
'change'
,
'blur'
],
//
trigger: ['change', 'blur'],
},
},
],
],
address
:
[
address
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请填写地址'
,
message
:
'请填写地址'
,
trigger
:
[
'change'
,
'blur'
],
//
trigger: ['change', 'blur'],
},
},
],
],
t
itle
:
[
frontT
itle
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请填写正面标题'
,
message
:
'请填写正面标题'
,
trigger
:
[
'change'
,
'blur'
],
//
trigger: ['change', 'blur'],
},
},
],
],
backTitle
:
[
backTitle
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'填写背面标题'
,
message
:
'填写背面标题'
,
trigger
:
[
'change'
,
'blur'
],
// trigger: ['change', 'blur'],
},
],
backContext
:
[
{
required
:
true
,
message
:
'填写背面标题'
,
// trigger: ['change', 'blur'],
},
},
],
],
}
}
...
@@ -233,18 +252,20 @@ export default {
...
@@ -233,18 +252,20 @@ export default {
}
}
},
},
canConfirm
()
{
canConfirm
()
{
console
.
log
(
for
(
var
item
in
this
.
form
)
{
'---------canConfirm------------'
,
console
.
log
(
'------canConfirm------'
,
item
)
this
.
form
.
name
&&
this
.
form
.
a
if
(
!
this
.
form
[
item
])
{
)
return
false
return
this
.
form
.
name
&&
this
.
form
.
a
}
}
return
true
},
},
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
&&
options
.
bill
Id
)
{
if
(
options
&&
options
.
card
Id
)
{
this
.
billId
=
options
.
bill
Id
this
.
cardId
=
options
.
card
Id
this
.
loading
=
true
this
.
loading
=
true
this
.
init
()
this
.
getBusinessCard
()
}
}
},
},
onReady
()
{
onReady
()
{
...
@@ -253,40 +274,57 @@ export default {
...
@@ -253,40 +274,57 @@ export default {
onUnload
()
{},
onUnload
()
{},
onShow
()
{},
onShow
()
{},
methods
:
{
methods
:
{
init
()
{
getBusinessCard
()
{
this
.
loading
=
false
this
.
loading
=
true
this
.
form
=
{}
getBusinessCard
()
.
then
((
res
)
=>
{
var
data
=
res
.
data
if
(
data
)
{
this
.
form
=
{
id
:
res
.
id
,
address
:
res
.
data
,
backContext
:
res
.
backContext
,
backTitle
:
res
.
backTitle
,
coverUrl
:
res
.
coverUrl
,
frontTitle
:
res
.
frontTitle
,
name
:
res
.
name
,
phone
:
res
.
phone
,
}
}
this
.
loading
=
false
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
editbusinessCard
()
{
this
.
buttonLoading
=
true
editbusinessCard
(
this
.
form
)
.
then
((
res
)
=>
{
if
(
res
.
data
)
{
this
.
buttonLoading
=
false
uni
.
$emit
(
'card-refresh'
)
this
.
$u
.
route
({
type
:
'back'
,
})
}
})
.
catch
((
res
)
=>
{
this
.
loading
=
false
})
},
},
previewTemplate
(
index
)
{
previewTemplate
(
index
)
{
this
.
visible
=
true
this
.
currentImages
=
this
.
templates
[
index
]
this
.
currentImages
=
this
.
templates
[
index
]
this
.
visible
=
true
// uni.previewImage({
// urls: this.templates,
// current: index,
// longPressActions: {
// success: function (data) {
// console.log(
// '选中了第' +
// (data.tapIndex + 1) +
// '个按钮,第' +
// (data.index + 1) +
// '张图片'
// )
// },
// fail: function (err) {
// console.log(err.errMsg)
// },
// },
// })
},
},
handleClickSelect
(
index
)
{
handleClickSelect
(
index
)
{
this
.
form
.
c
urrentIndex
=
index
this
.
form
.
c
overUrl
=
this
.
types
[
index
]
},
},
handleClickSure
()
{
handleClickSure
()
{
this
.
$refs
.
uForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
uForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
'验证通过'
)
console
.
log
(
'验证通过'
)
this
.
editbusinessCard
()
}
else
{
}
else
{
console
.
log
(
'验证失败'
)
console
.
log
(
'验证失败'
)
}
}
...
@@ -296,7 +334,7 @@ export default {
...
@@ -296,7 +334,7 @@ export default {
// 直接给input设maxlength输入拼音的时候有影响
// 直接给input设maxlength输入拼音的时候有影响
if
(
event
.
length
>
this
.
maxlength
)
{
if
(
event
.
length
>
this
.
maxlength
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
form
.
t
itle
=
event
.
substring
(
0
,
this
.
maxlength
)
this
.
form
.
frontT
itle
=
event
.
substring
(
0
,
this
.
maxlength
)
})
})
}
}
},
},
...
...
pages/card/index.vue
View file @
6f00cff2
This diff is collapsed.
Click to expand it.
pages/maintain-bill/create.vue
View file @
6f00cff2
...
@@ -186,7 +186,6 @@ export default {
...
@@ -186,7 +186,6 @@ export default {
receivableAmount
:
''
,
receivableAmount
:
''
,
actualAmount
:
''
,
actualAmount
:
''
,
repairTime
:
''
,
repairTime
:
''
,
partTime
:
''
,
address
:
''
,
address
:
''
,
latitude
:
''
,
latitude
:
''
,
longitude
:
''
,
longitude
:
''
,
...
@@ -343,7 +342,6 @@ export default {
...
@@ -343,7 +342,6 @@ export default {
receivableAmount
:
data
.
receivableAmount
,
receivableAmount
:
data
.
receivableAmount
,
actualAmount
:
data
.
actualAmount
,
actualAmount
:
data
.
actualAmount
,
repairTime
:
data
.
repairTime
,
repairTime
:
data
.
repairTime
,
partTime
:
data
.
partTime
,
address
:
data
.
address
,
address
:
data
.
address
,
latitude
:
data
.
latitude
,
latitude
:
data
.
latitude
,
longitude
:
data
.
longitude
,
longitude
:
data
.
longitude
,
...
@@ -403,6 +401,8 @@ export default {
...
@@ -403,6 +401,8 @@ export default {
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
if
(
this
.
billId
)
{
if
(
this
.
billId
)
{
uni
.
$emit
(
'maintain-bill-detail'
)
uni
.
$emit
(
'maintain-bill-detail'
)
}
else
{
uni
.
$emit
(
'maintain-bill-list'
)
}
}
this
.
billId
=
res
.
data
this
.
billId
=
res
.
data
this
.
toParticulars
()
this
.
toParticulars
()
...
...
pages/maintain-bill/detail.vue
View file @
6f00cff2
...
@@ -440,8 +440,7 @@ export default {
...
@@ -440,8 +440,7 @@ export default {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
uni
.
$off
(
'maintain-bill-detail'
)
uni
.
$emit
(
'maintain-bill-list'
)
uni
.
$emit
(
'maintain-bill-detail'
)
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'删除成功'
,
title
:
'删除成功'
,
type
:
'success'
,
type
:
'success'
,
...
...
pages/maintain-bill/index.vue
View file @
6f00cff2
...
@@ -173,14 +173,14 @@ export default {
...
@@ -173,14 +173,14 @@ export default {
},
},
},
},
onLoad
()
{
onLoad
()
{
uni
.
$on
(
'maintain-bill-
detail
'
,
(
res
)
=>
{
uni
.
$on
(
'maintain-bill-
list
'
,
(
res
)
=>
{
this
.
reloadList
()
this
.
reloadList
()
})
})
this
.
_freshing
=
false
this
.
_freshing
=
false
this
.
reloadList
()
this
.
reloadList
()
},
},
onUnload
()
{
onUnload
()
{
uni
.
$off
(
'maintain-bill-
detail
'
)
uni
.
$off
(
'maintain-bill-
list
'
)
},
},
onShow
()
{},
onShow
()
{},
methods
:
{
methods
:
{
...
...
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