Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ce0771ea
authored
Oct 18, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
状态
1 parent
3f726ab8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
10 deletions
components/HomeFrame/components/RecordList.vue
components/HomeFrame/components/saveRecord.vue
mixin/click.js
store/modules/audio.js
components/HomeFrame/components/RecordList.vue
View file @
ce0771e
...
...
@@ -55,7 +55,8 @@
<template
v-for=
"i in list"
>
<template
v-for=
"item in i"
>
<view
class=
"item"
:key=
"item.id"
@
click=
"jumpDetail(item)"
>
<view
:class=
"['status flex',
{ deal: item.receptionStatus == 1 }]">
<view
class=
"status flex disabled"
v-if=
"item.receptionStatus === '' || item.receptionStatus === undefined"
>
未知
</view>
<view
:class=
"['status flex',
{ deal: item.receptionStatus == 1 }]" v-else>
{{
{
1
:
'成交'
,
...
...
@@ -91,7 +92,7 @@
<
/scroll-view
>
<
/view
>
<
/view
>
<
save
-
record
v
-
else
@
cancel
=
"handleCancel"
@
submit
=
"handleSubmit"
:
customerInfo
=
"customerInfo"
><
/save-record
>
<
save
-
record
v
-
else
@
cancel
=
"handleCancel"
@
submit
=
"handleSubmit"
:
customerInfo
Val
=
"customerInfo"
><
/save-record
>
<
/view
>
<
/template
>
<
script
type
=
"text/ecmascript-6"
>
...
...
@@ -535,6 +536,10 @@ export default {
font
-
weight
:
500
;
font
-
size
:
24
rpx
;
justify
-
content
:
center
;
&
.
disabled
{
background
:
#
f2f2f2
;
color
:
#
999999
;
}
}
.
deal
{
background
:
#
eaf9f1
;
...
...
components/HomeFrame/components/saveRecord.vue
View file @
ce0771e
...
...
@@ -6,6 +6,7 @@
</view>
<view
class=
"title"
>
接待记录
</view>
</view>
<view
class=
"error-tip"
v-if=
"errorTip"
>
以下信息不能为空,请完善信息后保存
</view>
<view
class=
"form"
>
<template
v-for=
"(i, index) in formObject"
>
<view
:class=
"['form-item',
{ active: focusIndex == index }]" :key="index">
...
...
@@ -45,6 +46,7 @@ import CarBrands from '@/components/CarBrands.vue'
import
Employee
from
'@/components/Employee.vue'
import
CustomerAutocomplete
from
'@/components/CustomerAutocomplete.vue'
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
;
import
utils
from
"@/utils/utils"
;
export
default
{
components
:
{
CarBrands
,
...
...
@@ -52,13 +54,14 @@ export default {
CustomerAutocomplete
},
props
:
{
customerInfo
:
{
customerInfo
Val
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
data
()
{
return
{
errorTip
:
false
,
receptionList
:
[{
label
:
'成交'
,
value
:
1
...
...
@@ -107,12 +110,13 @@ export default {
},
],
focusIndex
:
-
1
,
customerInfo
:{}
}
},
mounted
()
{
console
.
log
(
this
.
customerInfo
)
this
.
customerInfo
=
utils
.
deepClone
(
this
.
customerInfoVal
)
const
i
=
this
.
receptionList
.
findIndex
(
e
=>
e
.
value
==
this
.
customerInfo
.
receptionStatus
)
this
.
customerInfo
.
receptionStatus
=
this
.
receptionList
[
i
].
label
this
.
$set
(
this
.
customerInfo
,
'receptionStatus'
,
i
==
-
1
?
''
:
this
.
receptionList
[
i
].
label
)
},
methods
:
{
selectReception
(
value
)
{
...
...
@@ -127,7 +131,7 @@ export default {
},
handleSave
()
{
const
result
=
this
.
check
(
true
)
if
(
!
result
)
return
if
(
!
result
)
return
this
.
errorTip
=
true
const
i
=
this
.
receptionList
.
findIndex
(
e
=>
e
.
label
==
this
.
customerInfo
.
receptionStatus
)
this
.
customerInfo
.
receptionStatus
=
this
.
receptionList
[
i
].
value
this
.
$emit
(
'submit'
,
this
.
customerInfo
)
...
...
@@ -161,6 +165,7 @@ export default {
this
.
customerInfo
.
carModel
=
item
.
name
}
this
.
resetFocusIndex
()
this
.
errorTip
=
false
},
showPopup
(
e
,
index
)
{
this
.
focusIndex
=
index
...
...
@@ -168,12 +173,22 @@ export default {
},
resetFocusIndex
()
{
this
.
focusIndex
=
-
1
this
.
errorTip
=
false
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.error-tip
{
font-size
:
28
rpx
;
padding
:
32
rpx
60
rpx
24
rpx
;
margin-top
:
100
rpx
;
margin-bottom
:
-80
rpx
;
text-align
:
center
;
background-color
:
rgb
(
254
,
237
,
234
);
color
:
#f45c3d
;
}
.data-container
{
background
:
#ffffff59
;
border-radius
:
48
rpx
;
...
...
mixin/click.js
View file @
ce0771e
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-18 16:
33:57
* @LastEditTime: 2024-10-18 16:
49:15
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -52,7 +52,7 @@ export default {
...
mapState
(
'audio'
,
[
'receptionStatus'
,
'booksList'
,
'audioInfo'
]),
...
mapState
([
'user.customerInfo'
]),
changeData
()
{
const
customerInfo
=
this
.
$store
.
state
.
user
?.
customerInfo
||
{}
const
customerInfo
=
this
.
$store
?.
state
?
.
user
?.
customerInfo
||
{}
const
booksList
=
this
.
booksList
||
[]
const
receptionStatus
=
this
.
receptionStatus
return
{
customerInfo
,
booksList
,
receptionStatus
}
...
...
@@ -153,7 +153,7 @@ export default {
if
(
this
.
audioInfo
.
audioStatus
==
'start'
)
return
this
.
setBooks
([])
this
.
$store
.
dispatch
(
'clearCustomerInfo'
)
this
.
setReceptionStatus
(
1
)
this
.
setReceptionStatus
(
''
)
this
.
initTime
()
this
.
setAudioInfo
({
audioList
:
[],
audioStatus
:
'start'
})
recorderManager
.
onStart
(()
=>
{
...
...
store/modules/audio.js
View file @
ce0771e
...
...
@@ -16,7 +16,7 @@ export default {
return
{
booksList
:
[],
audioList
:
[],
receptionStatus
:
1
,
receptionStatus
:
''
,
endReasonType
:
0
,
perRecordNumber
:
0
,
audioInfo
:
{
...
...
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