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 8efa7378
authored
Mar 24, 2026
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.6.4' into SAAS+V5.7.0
2 parents
8e360111
eb03ed87
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1093 additions
and
1082 deletions
components/FinishStep.vue
lib/sqlite.js
manifest.json
mixin/record/recorder.js
pages/boutique/components/CouponPop.vue
pages/boutique/index.vue
pages/boutique/invitation.vue
store/modules/audio.js
utils/recordManager/RecordSaveService.js
utils/recordManager/RecordService.js
components/FinishStep.vue
View file @
8efa737
<
template
>
<view
class=
"step"
>
<MessageBox
ref=
"formRef"
@
cancel=
"cancel"
@
confirm=
"submit"
:cancelBtnText=
"`$
{step == 1 ? '取消' : '上一步'}`"
:confirmBtnText="`${sceneType == 0 ? (step == 1 ? '下一步' : '完成接待') : '完成接待'}`"
:title="`${step == 1 ? '客户信息完善' : '结果反馈'}`"
:popupW="820"
:maxHeight="820"
:isAutoClose="false"
>
<view
name=
"content"
:key=
"updateViewKey"
>
<template
v-if=
"step == 1"
>
<template
v-if=
"!check(true)"
>
<view
class=
"error-tip"
v-if=
"errorTip"
>
以下信息不能为空,请完善信息后保存
</view>
<view
class=
"pop-tips"
v-else
>
{{
tips
}}
</view>
</
template
>
<view
class=
"form"
>
<
template
v-for=
"(i, index) in formObject"
>
<view
class=
"form-item"
:key=
"index"
>
<view
:class=
"['label',
{ required: i.required }]">
{{
i
.
label
}}
</view>
<view
:class=
"['value',
{ error: showError(i.key)
&&
i.required }, { disabled: customerType == 0 || i.disabled }]">
<template
v-if=
"i.type == 'input'"
>
<input
:type=
"i.inputType"
:maxlength=
"i.maxlength"
v-model=
"formData[i.key]"
class=
"input"
:placeholder=
"i.placeholder"
:disabled=
"customerType == 0"
@
input=
"inputCustomer"
placeholder-style=
"color:#c9c9c9;"
/>
</
template
>
<
template
v-else
>
<view
:class=
"['select', `$
{formData[i.key] ? '' : 'placeholder'}`]"
@click="showPopup(i)"
:key="selectKey"
>
{{
formData
[
i
.
key
]
||
i
.
placeholder
}}
<uni-icons
class=
"arrow"
type=
"down"
:size=
"16"
></uni-icons>
</view>
</
template
>
</view>
</view>
</template>
</view>
</template>
<
template
v-else
>
<view
class=
"pop-tips"
>
请完善本次接待结果
</view>
<view
class=
"choose-box"
>
<template
v-for=
"(i, index) in resultList"
>
<view
:class=
"['choose-item', `$
{i.status == receptionStatus ? (i.status == 1 ? 'success' : 'error') : ''}`]"
:key="index"
@click="chooseResult(i.status)"
>
<view
:class=
"['sprite-icon', `icon-face-$
{i.status == receptionStatus ? `${i.icon}-active` : i.icon}`]">
</view>
{{
i
.
text
}}
</view>
</
template
>
</view>
</template>
</view>
</MessageBox>
<car-brands
ref=
"carBrandListVisible"
@
select=
"handleSelect($event, 'carBrandListVisible')"
/>
<employee
ref=
"employeeBoxVisible"
@
select=
"handleSelect($event, 'employeeBoxVisible')"
/>
<uni-popup
ref=
"successRef"
type=
"message"
>
<uni-popup-message
type=
"success"
message=
"数据保存成功"
:duration=
"1500"
></uni-popup-message>
</uni-popup>
</view>
</template>
<
script
type=
"text/ecmascript-6"
>
import
Employee
from
'@/components/Employee.vue'
import
CarBrands
from
'@/components/CarBrands.vue'
import
{
mapMutations
}
from
"vuex"
;
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
;
const
formObject_boutique
=
[{
label
:
"车主姓名"
,
key
:
"customerName"
,
type
:
"input"
,
inputType
:
"text"
,
maxlength
:
20
,
placeholder
:
'请输入车主姓名'
,
required
:
true
},
{
label
:
"品牌车型"
,
key
:
"carModel"
,
type
:
"select"
,
popKey
:
"carBrandListVisible"
,
placeholder
:
'请选择品牌车型'
,
disabled
:
true
},
{
label
:
"车主电话"
,
key
:
"phoneNumber"
,
type
:
"input"
,
inputType
:
"tel"
,
maxlength
:
11
,
placeholder
:
'请输入车主电话'
,
required
:
true
},
{
label
:
"交付专员"
,
key
:
"staffName"
,
type
:
"select"
,
popKey
:
"employeeBoxVisible"
,
placeholder
:
'请选择交付专员'
,
required
:
true
},]
export
default
{
components
:
{
Employee
,
CarBrands
},
name
:
'FinishStep'
,
props
:
{
sceneType
:
{
type
:
Number
,
default
:
0
},
customerType
:
{
type
:
Number
,
default
:
1
},
titleTips
:
String
},
data
()
{
return
{
step
:
1
,
formObject
:
[
{
label
:
"车主姓名"
,
key
:
"customerName"
,
type
:
"input"
,
inputType
:
"text"
,
maxlength
:
50
,
placeholder
:
'请输入车主姓名'
,
required
:
true
},
{
label
:
"车主电话"
,
key
:
"phoneNumber"
,
type
:
"input"
,
inputType
:
"tel"
,
maxlength
:
11
,
placeholder
:
'请输入车主电话'
,
required
:
true
},
{
label
:
"品牌车型"
,
key
:
"carModel"
,
type
:
"select"
,
popKey
:
"carBrandListVisible"
,
placeholder
:
'请选择品牌车型'
,
required
:
true
},
{
label
:
"销售姓名"
,
key
:
"staffName"
,
type
:
"select"
,
popKey
:
"employeeBoxVisible"
,
placeholder
:
'请选择销售'
,
required
:
true
},
],
formData
:
{
customerName
:
""
,
carModel
:
""
,
phoneNumber
:
""
,
salesUuid
:
""
,
staffName
:
""
,
},
resultList
:
[
{
icon
:
'success'
,
text
:
'结果完美,成交了'
,
status
:
1
},
{
icon
:
'error'
,
text
:
'仍需努力,战败了'
,
status
:
0
}
],
errorTip
:
false
,
receptionStatus
:
-
1
,
updateViewKey
:
Date
.
now
(),
selectKey
:
Date
.
now
(),
}
},
computed
:
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
},
tips
()
{
let
{
sceneType
,
titleTips
}
=
this
,
text
=
titleTips
||
'检测到“交车告知书”中未填写客户档案,请填写后再完成接待。'
if
(
sceneType
==
1
)
text
=
'请确认“车型加装选购页”中的客户信息,并点击「完成接待」结束客户接待。'
return
text
}
},
watch
:
{
watchStatus
:
{
immediate
:
true
,
handler
(
newval
)
{
this
.
receptionStatus
=
-
1
this
.
errorTip
=
false
this
.
$refs
?.
formRef
?.
close
()
}
},
},
mounted
()
{
},
methods
:
{
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
showError
(
key
)
{
let
flag
=
!
this
.
formData
[
key
]
if
(
key
==
'phoneNumber'
&&
this
.
formData
[
key
])
flag
=
!
phoneRex
.
test
(
this
.
formData
[
key
])
return
this
.
errorTip
&&
flag
},
showPopup
({
popKey
,
disabled
})
{
let
{
customerType
}
=
this
if
(
customerType
==
0
||
disabled
)
return
this
.
$refs
[
popKey
].
open
();
},
// 取消
cancel
()
{
if
(
this
.
step
==
1
)
this
.
close
()
else
this
.
step
=
1
},
close
()
{
this
.
errorTip
=
false
this
.
receptionStatus
=
-
1
this
.
$refs
.
formRef
.
close
()
},
check
(
all
=
false
)
{
let
flag
=
true
try
{
this
.
formObject
.
map
(
e
=>
{
if
(
e
.
required
)
{
if
(
!
this
.
formData
[
e
.
key
])
throw
false
if
(
!
all
&&
e
.
key
==
'phoneNumber'
&&
!
phoneRex
.
test
(
this
.
formData
[
e
.
key
]))
{
uni
.
showToast
({
title
:
"请输入正确的车主电话"
,
icon
:
"none"
,
});
throw
false
}
}
})
}
catch
(
error
)
{
flag
=
error
}
return
flag
},
// 保存
submit
()
{
let
{
receptionStatus
}
=
this
if
(
this
.
step
==
1
)
{
this
.
errorTip
=
true
;
if
(
this
.
check
())
{
const
{
sceneType
}
=
this
if
(
sceneType
==
0
)
this
.
step
=
2
else
{
receptionStatus
=
1
this
.
success
(
receptionStatus
)
}
}
}
else
{
let
{
receptionStatus
}
=
this
if
(
receptionStatus
==
-
1
)
return
uni
.
showToast
({
title
:
'请完善本次接待结果'
,
icon
:
'none'
})
this
.
success
(
receptionStatus
)
}
},
success
(
receptionStatus
)
{
this
.
$refs
.
successRef
.
open
();
this
.
$emit
(
'submit'
,
receptionStatus
)
},
inputCustomer
()
{
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
this
.
formData
)
},
handleSelect
(
item
,
popkey
)
{
this
.
$refs
[
popkey
].
close
();
if
(
popkey
==
"employeeBoxVisible"
)
{
this
.
formData
.
salesUuid
=
item
.
uuid
;
this
.
formData
.
staffName
=
item
.
staffName
;
}
else
{
this
.
$refs
.
carBrandListVisible
.
close
();
this
.
formData
.
carModel
=
item
.
name
;
this
.
formData
.
carModelId
=
item
.
id
}
this
.
$store
.
dispatch
(
"setCustomerInfo"
,
this
.
formData
);
this
.
selectKey
=
Date
.
now
()
},
open
()
{
this
.
$store
.
dispatch
(
'getCustomerInfo'
).
then
((
customerInfo
)
=>
{
this
.
formData
=
customerInfo
let
{
sceneType
,
customerType
}
=
this
,
step
=
Object
.
values
(
customerInfo
).
every
((
value
)
=>
!!
value
)
?
2
:
1
this
.
errorTip
=
false
if
(
sceneType
==
1
)
{
step
=
1
this
.
formObject
=
formObject_boutique
if
(
customerType
==
0
&&
!
this
.
check
())
{
this
.
$emit
(
'back'
)
return
}
}
if
(
step
==
2
&&
!
this
.
check
())
{
this
.
errorTip
=
true
step
=
1
}
this
.
step
=
step
this
.
$refs
.
formRef
.
open
()
this
.
updateViewKey
=
Date
.
now
()
})
},
chooseResult
(
val
)
{
this
.
receptionStatus
=
val
this
.
setReceptionStatus
(
val
);
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.pop-tips
{
background
:
rgba
(
44
,
102
,
247
,
0.1
);
color
:
#2c66f7
;
font-size
:
toRpx
(
28
);
padding
:
toRpx
(
24
)
toRpx
(
80
)
toRpx
(
24
);
margin-top
:
toRpx
(
30
);
text-align
:
center
;
}
.error-tip
{
font-size
:
toRpx
(
28
);
padding
:
toRpx
(
32
)
toRpx
(
60
)
toRpx
(
24
);
margin-top
:
toRpx
(
30
);
text-align
:
center
;
background-color
:
rgb
(
254
,
237
,
234
);
color
:
#f45c3d
;
}
.form
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
toRpx
(
24
)
0
;
padding-top
:
toRpx
(
30
);
&-item
{
//
flex
:
50%
;
display
:
flex
;
align-items
:
center
;
color
:
#6c6c70
;
font-size
:
toRpx
(
30
);
box-sizing
:
border-box
;
margin
:
0
auto
;
.label
{
position
:
relative
;
margin-left
:
auto
;
flex-shrink
:
0
;
width
:
toRpx
(
124
);
}
.required
{
&::before
{
content
:
'*'
;
color
:
#ff0000
;
position
:
absolute
;
left
:
toMinusRpx
(
20
);
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
}
}
.value
{
width
:
toRpx
(
520
);
height
:
toRpx
(
80
);
border
:
toRpx
(
2
)
solid
#e8e8ea
;
background
:
#ffffff
;
margin-left
:
toRpx
(
32
);
box-sizing
:
border-box
;
padding
:
0
toRpx
(
40
);
border-radius
:
toRpx
(
8
);
&.error
{
border
:
toRpx
(
2
)
solid
#f24724
;
border-radius
:
toRpx
(
8
);
}
.input
,
.select
{
width
:
100%
;
height
:
100%
;
border
:
none
!important
;
outline
:
none
;
padding
:
0
!important
;
font-size
:
toRpx
(
30
);
&::placeholder
{
color
:
#c9c9c9
;
}
}
.select
{
display
:
flex
;
align-items
:
center
;
.arrow
{
margin-left
:
auto
;
}
}
/
deep
/
.placeholder
{
font-size
:
toRpx
(
30
);
color
:
#c9c9c9
;
}
}
.disabled
{
background
:
#f4f4f4
;
.select
{
.arrow
{
display
:
none
;
}
}
}
}
}
.choose-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.choose-item
{
width
:
100%
;
height
:
toRpx
(
128
);
border
:
toRpx
(
2
)
solid
#e8e8e8
;
border-radius
:
toRpx
(
16
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
toRpx
(
24
);
.sprite-icon
{
margin-right
:
toRpx
(
16
);
}
}
.success
{
background
:
#14cc681
a
;
border-color
:
#14cc681
a
;
}
.error
{
background
:
#f247241
a
;
border-color
:
#f247241
a
;
}
}
</
style
>
<
template
>
<view
class=
"step"
>
<MessageBox
ref=
"formRef"
@
cancel=
"cancel"
@
confirm=
"submit"
:cancelBtnText=
"`$
{step == 1 ? '取消' : '上一步'}`"
:confirmBtnText="`${sceneType == 0 ? (step == 1 ? '下一步' : '完成接待') : '完成接待'}`"
:title="`${step == 1 ? '客户信息完善' : '结果反馈'}`"
:popupW="820"
:maxHeight="820"
:isAutoClose="false"
>
<view
name=
"content"
:key=
"updateViewKey"
>
<template
v-if=
"step == 1"
>
<template
v-if=
"!check(true)"
>
<view
class=
"error-tip"
v-if=
"errorTip"
>
以下信息不能为空,请完善信息后保存
</view>
<view
class=
"pop-tips"
v-else
>
{{
tips
}}
</view>
</
template
>
<view
class=
"form"
>
<
template
v-for=
"(i, index) in formObject"
>
<view
class=
"form-item"
:key=
"index"
>
<view
:class=
"['label',
{ required: i.required }]">
{{
i
.
label
}}
</view>
<view
:class=
"['value',
{ error: showError(i.key)
&&
i.required }, { disabled: customerType == 0 || i.disabled }]">
<template
v-if=
"i.type == 'input'"
>
<input
:type=
"i.inputType"
:maxlength=
"i.maxlength"
v-model=
"formData[i.key]"
class=
"input"
:placeholder=
"i.placeholder"
:disabled=
"customerType == 0"
@
input=
"inputCustomer"
placeholder-style=
"color:#c9c9c9;"
/>
</
template
>
<
template
v-else
>
<view
:class=
"['select', `$
{formData[i.key] ? '' : 'placeholder'}`]"
@click="showPopup(i)"
:key="selectKey"
>
{{
formData
[
i
.
key
]
||
i
.
placeholder
}}
<uni-icons
class=
"arrow"
type=
"down"
:size=
"16"
></uni-icons>
</view>
</
template
>
</view>
</view>
</template>
</view>
</template>
<
template
v-else
>
<view
class=
"pop-tips"
>
请完善本次接待结果
</view>
<view
class=
"choose-box"
>
<template
v-for=
"(i, index) in resultList"
>
<view
:class=
"['choose-item', `$
{i.status == receptionStatus ? (i.status == 1 ? 'success' : 'error') : ''}`]"
:key="index"
@click="chooseResult(i.status)"
>
<view
:class=
"['sprite-icon', `icon-face-$
{i.status == receptionStatus ? `${i.icon}-active` : i.icon}`]">
</view>
{{
i
.
text
}}
</view>
</
template
>
</view>
</template>
</view>
</MessageBox>
<car-brands
ref=
"carBrandListVisible"
@
select=
"handleSelect($event, 'carBrandListVisible')"
/>
<employee
ref=
"employeeBoxVisible"
@
select=
"handleSelect($event, 'employeeBoxVisible')"
/>
<uni-popup
ref=
"successRef"
type=
"message"
>
<uni-popup-message
type=
"success"
message=
"数据保存成功"
:duration=
"1500"
></uni-popup-message>
</uni-popup>
</view>
</template>
<
script
type=
"text/ecmascript-6"
>
import
Employee
from
'@/components/Employee.vue'
import
CarBrands
from
'@/components/CarBrands.vue'
import
{
mapMutations
}
from
"vuex"
;
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
;
const
formObject_boutique
=
[{
label
:
"车主姓名"
,
key
:
"customerName"
,
type
:
"input"
,
inputType
:
"text"
,
maxlength
:
20
,
placeholder
:
'请输入车主姓名'
,
required
:
true
},
{
label
:
"品牌车型"
,
key
:
"carModel"
,
type
:
"select"
,
popKey
:
"carBrandListVisible"
,
placeholder
:
'请选择品牌车型'
,
disabled
:
true
},
{
label
:
"车主电话"
,
key
:
"phoneNumber"
,
type
:
"input"
,
inputType
:
"tel"
,
maxlength
:
11
,
placeholder
:
'请输入车主电话'
,
required
:
true
},
{
label
:
"交付专员"
,
key
:
"staffName"
,
type
:
"select"
,
popKey
:
"employeeBoxVisible"
,
placeholder
:
'请选择交付专员'
,
required
:
true
},]
export
default
{
components
:
{
Employee
,
CarBrands
},
name
:
'FinishStep'
,
props
:
{
sceneType
:
{
type
:
Number
,
default
:
0
},
customerType
:
{
type
:
Number
,
default
:
1
},
titleTips
:
String
},
data
()
{
return
{
step
:
1
,
formObject
:
[
{
label
:
"车主姓名"
,
key
:
"customerName"
,
type
:
"input"
,
inputType
:
"text"
,
maxlength
:
50
,
placeholder
:
'请输入车主姓名'
,
required
:
true
},
{
label
:
"车主电话"
,
key
:
"phoneNumber"
,
type
:
"input"
,
inputType
:
"tel"
,
maxlength
:
11
,
placeholder
:
'请输入车主电话'
,
required
:
true
},
{
label
:
"品牌车型"
,
key
:
"carModel"
,
type
:
"select"
,
popKey
:
"carBrandListVisible"
,
placeholder
:
'请选择品牌车型'
,
required
:
true
},
{
label
:
"销售姓名"
,
key
:
"staffName"
,
type
:
"select"
,
popKey
:
"employeeBoxVisible"
,
placeholder
:
'请选择销售'
,
required
:
true
},
],
formData
:
{
customerName
:
""
,
carModel
:
""
,
phoneNumber
:
""
,
salesUuid
:
""
,
staffName
:
""
,
},
resultList
:
[
{
icon
:
'success'
,
text
:
'结果完美,成交了'
,
status
:
1
},
{
icon
:
'error'
,
text
:
'仍需努力,战败了'
,
status
:
0
}
],
errorTip
:
false
,
receptionStatus
:
-
1
,
updateViewKey
:
Date
.
now
(),
selectKey
:
Date
.
now
(),
}
},
computed
:
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
},
tips
()
{
let
{
sceneType
,
titleTips
}
=
this
,
text
=
titleTips
||
'检测到“交车告知书”中未填写客户档案,请填写后再完成接待。'
if
(
sceneType
==
1
)
text
=
'请确认“车型加装选购页”中的客户信息,并点击「完成接待」结束客户接待。'
return
text
}
},
watch
:
{
watchStatus
:
{
immediate
:
true
,
handler
(
newval
)
{
this
.
receptionStatus
=
-
1
this
.
errorTip
=
false
this
.
$refs
?.
formRef
?.
close
()
}
},
},
mounted
()
{
},
methods
:
{
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
showError
(
key
)
{
let
flag
=
!
this
.
formData
[
key
]
if
(
key
==
'phoneNumber'
&&
this
.
formData
[
key
])
flag
=
!
phoneRex
.
test
(
this
.
formData
[
key
])
return
this
.
errorTip
&&
flag
},
showPopup
({
popKey
,
disabled
})
{
let
{
customerType
}
=
this
if
(
customerType
==
0
||
disabled
)
return
this
.
$refs
[
popKey
].
open
();
},
// 取消
cancel
()
{
if
(
this
.
step
==
1
)
this
.
close
()
else
this
.
step
=
1
},
close
()
{
this
.
errorTip
=
false
this
.
receptionStatus
=
-
1
this
.
$refs
.
formRef
.
close
()
},
check
(
all
=
false
)
{
let
flag
=
true
try
{
this
.
formObject
.
map
(
e
=>
{
if
(
e
.
required
)
{
if
(
!
this
.
formData
[
e
.
key
])
throw
false
if
(
!
all
&&
e
.
key
==
'phoneNumber'
&&
!
phoneRex
.
test
(
this
.
formData
[
e
.
key
]))
{
uni
.
showToast
({
title
:
"请输入正确的车主电话"
,
icon
:
"none"
,
});
throw
false
}
}
})
}
catch
(
error
)
{
flag
=
error
}
return
flag
},
// 保存
submit
()
{
let
{
receptionStatus
}
=
this
if
(
this
.
step
==
1
)
{
this
.
errorTip
=
true
;
if
(
this
.
check
())
{
const
{
sceneType
}
=
this
if
(
sceneType
==
0
)
this
.
step
=
2
else
{
receptionStatus
=
1
this
.
success
(
receptionStatus
)
}
}
}
else
{
let
{
receptionStatus
}
=
this
if
(
receptionStatus
==
-
1
)
return
uni
.
showToast
({
title
:
'请完善本次接待结果'
,
icon
:
'none'
})
this
.
success
(
receptionStatus
)
}
},
success
(
receptionStatus
)
{
this
.
$refs
.
successRef
.
open
();
this
.
$emit
(
'submit'
,
receptionStatus
)
},
inputCustomer
()
{
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
this
.
formData
)
},
handleSelect
(
item
,
popkey
)
{
this
.
$refs
[
popkey
].
close
();
if
(
popkey
==
"employeeBoxVisible"
)
{
this
.
formData
.
salesUuid
=
item
.
uuid
;
this
.
formData
.
staffName
=
item
.
staffName
;
}
else
{
this
.
$refs
.
carBrandListVisible
.
close
();
this
.
formData
.
carModel
=
item
.
name
;
this
.
formData
.
carModelId
=
item
.
id
}
this
.
$store
.
dispatch
(
"setCustomerInfo"
,
this
.
formData
);
this
.
selectKey
=
Date
.
now
()
},
open
()
{
this
.
$store
.
dispatch
(
'getCustomerInfo'
).
then
((
customerInfo
)
=>
{
this
.
formData
=
customerInfo
let
{
sceneType
,
customerType
}
=
this
,
step
=
Object
.
values
(
customerInfo
).
every
((
value
)
=>
!!
value
)
?
2
:
1
this
.
errorTip
=
false
if
(
sceneType
==
1
)
{
step
=
1
this
.
formObject
=
formObject_boutique
if
(
customerType
==
0
&&
!
this
.
check
())
{
this
.
$emit
(
'back'
)
return
}
}
if
(
step
==
2
&&
!
this
.
check
())
{
this
.
errorTip
=
true
step
=
1
}
this
.
step
=
step
this
.
$refs
.
formRef
.
open
()
this
.
updateViewKey
=
Date
.
now
()
})
},
chooseResult
(
val
)
{
this
.
receptionStatus
=
val
this
.
setReceptionStatus
(
val
);
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.pop-tips
{
background
:
rgba
(
44
,
102
,
247
,
0.1
);
color
:
#2c66f7
;
font-size
:
toRpx
(
28
);
padding
:
toRpx
(
24
)
toRpx
(
80
)
toRpx
(
24
);
margin-top
:
toRpx
(
30
);
text-align
:
center
;
}
.error-tip
{
font-size
:
toRpx
(
28
);
padding
:
toRpx
(
32
)
toRpx
(
60
)
toRpx
(
24
);
margin-top
:
toRpx
(
30
);
text-align
:
center
;
background-color
:
rgb
(
254
,
237
,
234
);
color
:
#f45c3d
;
}
.form
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
toRpx
(
24
)
0
;
padding-top
:
toRpx
(
30
);
&-item
{
//
flex
:
50%
;
display
:
flex
;
align-items
:
center
;
color
:
#6c6c70
;
font-size
:
toRpx
(
30
);
box-sizing
:
border-box
;
margin
:
0
auto
;
.label
{
position
:
relative
;
margin-left
:
auto
;
flex-shrink
:
0
;
width
:
toRpx
(
124
);
}
.required
{
&::before
{
content
:
'*'
;
color
:
#ff0000
;
position
:
absolute
;
left
:
toMinusRpx
(
20
);
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
}
}
.value
{
width
:
toRpx
(
520
);
height
:
toRpx
(
80
);
border
:
toRpx
(
2
)
solid
#e8e8ea
;
background
:
#ffffff
;
margin-left
:
toRpx
(
32
);
box-sizing
:
border-box
;
padding
:
0
toRpx
(
40
);
border-radius
:
toRpx
(
8
);
&.error
{
border
:
toRpx
(
2
)
solid
#f24724
;
border-radius
:
toRpx
(
8
);
}
.input
,
.select
{
width
:
100%
;
height
:
100%
;
border
:
none
!important
;
outline
:
none
;
padding
:
0
!important
;
font-size
:
toRpx
(
30
);
&::placeholder
{
color
:
#c9c9c9
;
}
}
.select
{
display
:
flex
;
align-items
:
center
;
.arrow
{
margin-left
:
auto
;
}
}
/
deep
/
.placeholder
{
font-size
:
toRpx
(
30
);
color
:
#c9c9c9
;
}
}
.disabled
{
background
:
#f4f4f4
;
.select
{
.arrow
{
display
:
none
;
}
}
}
}
}
.choose-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.choose-item
{
width
:
100%
;
height
:
toRpx
(
128
);
border
:
toRpx
(
2
)
solid
#e8e8e8
;
border-radius
:
toRpx
(
16
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
toRpx
(
24
);
.sprite-icon
{
margin-right
:
toRpx
(
16
);
}
}
.success
{
background
:
#14cc681
a
;
border-color
:
#14cc681
a
;
}
.error
{
background
:
#f247241
a
;
border-color
:
#f247241
a
;
}
}
</
style
>
lib/sqlite.js
View file @
8efa737
...
...
@@ -10,7 +10,7 @@ class SQLite {
this
.
size
=
size
||
50
*
1024
*
1024
// 50MB
this
.
db
=
null
//注意:
this
.
dbPath
=
null
// 存储数据库的完整路径
this
.
dbPath
=
`_doc/
${
name
}
.db`
// 存储数据库的完整路径
// 初始化该数据库的队列(如果不存在)
if
(
!
SQLite
.
_queues
[
name
])
{
SQLite
.
_queues
[
name
]
=
new
TaskQueue
(
`SQLite:
${
name
}
`
)
...
...
@@ -25,15 +25,15 @@ class SQLite {
async
init
()
{
// 如果已经有路径,直接使用
if
(
this
.
dbPath
)
{
//
if (this.dbPath) {
uni
.
$logger
?.
local
?.
info
(
`[SQLite] 使用已有路径:
${
this
.
dbPath
}
`
)
return
this
.
openDatabase
()
}
//
}
// 获取当前文档目录路径
const
rootPath
=
await
PathUtils
.
getFilePath
()
this
.
dbPath
=
`
${
rootPath
}${
this
.
name
}
.db`
uni
.
$logger
?.
local
?.
info
(
`[SQLite] 数据库路径已确定:
${
this
.
dbPath
}
`
)
return
this
.
openDatabase
()
//
const rootPath = await PathUtils.getFilePath()
//
this.dbPath = `${rootPath}${this.name}.db`
//
uni.$logger?.local?.info(`[SQLite] 数据库路径已确定: ${this.dbPath}`)
//
return this.openDatabase()
}
/**
...
...
manifest.json
View file @
8efa737
...
...
@@ -2,8 +2,8 @@
"name"
:
"展业助手"
,
"appid"
:
"__UNI__D3BD3DF"
,
"description"
:
""
,
"versionName"
:
"2.22.
1
"
,
"versionCode"
:
222
1
,
"versionName"
:
"2.22.
2
"
,
"versionCode"
:
222
2
,
"transformPx"
:
false
,
"sassImplementationName"
:
"node-sass"
,
/*
5
+App特有相关
*/
...
...
mixin/record/recorder.js
View file @
8efa737
...
...
@@ -40,6 +40,9 @@ export default {
// 代理权限检查
async
isPermission
(
hintText
)
{
return
await
this
.
recordService
.
isPermission
(
hintText
)
},
updateCustomerInfo
(
data
){
this
.
recordService
.
updateCustomerInfo
(
data
)
}
}
}
pages/boutique/components/CouponPop.vue
View file @
8efa737
...
...
@@ -273,11 +273,11 @@ export default {
this
.
customerInfo
=
Object
.
assign
(
this
.
customerInfo
,
newval
)
if
(
newval
.
carModel
)
{
this
.
pageParams
.
carInfo
=
{
carChildsBrandId
:
newval
.
car
Childs
BrandId
,
carChildsBrandName
:
newval
.
car
ChildsBrandName
,
carBrandId
:
newval
.
c
arBrandId
,
carBrand
:
newval
.
c
arBrand
,
id
:
newval
.
car
Series
Id
,
carChildsBrandId
:
newval
.
carBrandId
,
carChildsBrandName
:
newval
.
car
Brand
,
carBrandId
:
newval
.
oneC
arBrandId
,
carBrand
:
newval
.
oneC
arBrand
,
id
:
newval
.
car
Model
Id
,
name
:
newval
.
carModel
}
}
...
...
pages/boutique/index.vue
View file @
8efa737
...
...
@@ -340,6 +340,7 @@ export default {
this
.
customerType
=
-
1
this
.
clearHistory
();
this
.
recording
=
false
this
.
setReceptionStatus
(
-
1
);
this
.
$refs
.
home
.
$refs
.
leftBox
.
getMessageInfo
()
if
(
this
.
requested
)
this
.
$refs
.
home
.
updateApp
()
this
.
getBoutiquePackageList
()
//套餐列表
...
...
@@ -381,10 +382,13 @@ export default {
this
.
jumpPage
(
id
)
}
else
this
.
jumpPage
()
setTimeout
(()
=>
{
this
.
setReceptionStatus
(
1
);
},
1000
);
},
done
(
e
)
{
async
done
(
e
)
{
this
.
$refs
.
home
.
finishRef
.
close
();
if
(
this
.
recording
)
this
.
$refs
.
home
.
stopAudio
();
if
(
this
.
recording
)
await
this
.
$refs
.
home
.
stopAudio
();
this
.
recording
=
false
setTimeout
(()
=>
{
this
.
id
=
""
;
...
...
@@ -392,10 +396,10 @@ export default {
this
.
currentCarId
=
''
this
.
bannerAutoplay
=
true
this
.
customerType
=
-
1
this
.
setReceptionStatus
(
e
);
this
.
$store
.
dispatch
(
"clearHistory"
)
this
.
$store
.
dispatch
(
'clearReceptionTrack'
)
this
.
getBoutiquePackageList
()
//套餐列表
this
.
setReceptionStatus
(
-
1
);
},
1500
);
},
/**客户邀约接待 */
...
...
@@ -409,6 +413,8 @@ export default {
}
//开始接待
this
.
customerType
=
0
this
.
jumpPage
()
uni
.
$logger
.
local
.
info
(
'index-reception:回店客户〗 == '
+
JSON
.
stringify
(
customer
))
this
.
$refs
.
home
.
updateCustomerInfo
(
customer
)
this
.
$nextTick
(()
=>
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customer
))
let
{
carBannerList
}
=
this
,
currentCarId
=
''
,
...
...
pages/boutique/invitation.vue
View file @
8efa737
<
template
>
<view
class=
"layout"
>
<view
class=
"bg"
></view>
<wnCanvas
:canvasId=
"`c-$
{madiaId}`"
:drawStatus="penSwitch"
custom
:scaleSwitch="false"
ref="invitationCanvas"
>
<template
slot=
"customContent"
>
<view
class=
"layout-content"
>
<view
class=
"box"
>
<view
class=
"input-box"
>
<input
type=
"text"
class=
"input"
v-model=
"customerNameOrPhone"
maxlength=
"11"
@
blur=
"input($event)"
@
focus=
"focus"
/>
<view
class=
"input-tips"
v-if=
"!isSearch"
>
搜索客户姓名/电话
<uni-icons
type=
"search"
class=
"icon"
color=
"#999"
size=
"20"
></uni-icons></view>
<uni-icons
v-if=
"isSearch"
type=
"closeempty"
class=
"close"
color=
"#999"
@
click=
"handleClear"
size=
"20"
></uni-icons>
</view>
<scroll-view
class=
"record-box"
scroll-y
@
scrolltolower=
"pageonReachBottom"
>
<view
class=
"list"
>
<template
v-if=
"flag"
>
<template
v-if=
"list.length"
>
<template
v-for=
"item in list"
>
<view
class=
"item"
:key=
"item.id"
@
click=
"reception(item)"
>
<view
class=
"detail-btn flex"
@
click
.
stop=
"openDetail(item)"
>
查看
<div
class=
"sprite-icon icon-detail-btn"
></div>
</view>
<view
class=
"top flex"
>
<view
class=
"name"
>
{{
item
.
customerName
}}
</view>
<view
:class=
"['status flex', 'status_' + formatInvite(item)]"
>
{{
inviteStatus
[
formatInvite
(
item
)]
}}
</view>
</view>
<template
v-for=
"(k, ind) in itemObject"
>
<view
class=
"info flex"
:key=
"ind"
>
<view
class=
"label"
>
{{
k
.
label
}}
</view>
<view
class=
"value"
>
{{
k
.
formatter
?
k
.
formatter
(
item
[
k
.
key
]):
k
.
format
?
formatTime
(
item
[
k
.
key
],
k
.
key
)
:
item
[
k
.
key
]
||
"-"
}}
</view>
</view>
</
template
>
</view>
</template>
</template>
<
template
v-else
>
<view
class=
"nothing flex"
>
<image
class=
"icon"
src=
"../../assets/images/home/nothing.webp"
/>
暂无数据
</view>
</
template
>
</template>
</view>
<
template
v-if=
"nothing"
>
<view
class=
"end-text"
>
-已经到底了-
</view>
</
template
>
</scroll-view>
</view>
</view>
</template>
</wnCanvas>
<MessageBox
ref=
"receptionTips"
content=
"是否接待当前客户,确定接待直接进入\n「车型加装选购页」"
cancelBtnText=
"取消"
confirmBtnText=
"确定接待"
@
confirm=
"jumpPage"
></MessageBox>
<coupon-pop
ref=
"couponPopup"
@
hideTool=
"$emit('hideTool')"
title=
"客户邀约详情"
tips=
"微信扫码进入客户邀约详情"
/>
</view>
</template>
<
script
type=
"text/ecmascript-6"
>
import
dayjs
from
'dayjs'
import
Record
from
"@/mixin/record"
;
import
CouponPop
from
'./components/CouponPop.vue'
export
default
{
components
:
{
CouponPop
},
mixins
:
[
Record
],
props
:
{
show
:
Boolean
,
madiaId
:
Number
,
penSwitch
:
Boolean
,
},
data
()
{
return
{
customerNameOrPhone
:
''
,
isSearch
:
false
,
list
:
[],
inviteStatus
:
{
1
:
'待预约'
,
2
:
'已预约'
,
3
:
'取消预约'
,
4
:
'已施工'
,
5
:
'超时未到店'
,
6
:
'已撤销'
,
7
:
'已支付'
},
itemObject
:
[
{
label
:
'客户电话'
,
key
:
'customerPhone'
,
format
:
true
},
{
label
:
'客户车型'
,
key
:
'carSeriesName'
},
{
label
:
'礼券名称'
,
key
:
'couponName'
},
{
label
:
'领券时间'
,
key
:
'receiveCouponDate'
,
format
:
true
},
{
label
:
'销售顾问'
,
key
:
'employeeName'
},
{
label
:
'流量有效性'
,
key
:
'trafficEffectiveness'
,
formatter
:
(
val
)
=>
{
return
{
1
:
'有效客户'
,
2
:
'无效客户'
}[
val
]
||
'-'
}
},
],
chooseItem
:
{}
}
},
computed
:
{
couponPopupRef
()
{
return
this
.
$refs
.
couponPopup
},
},
watch
:
{
show
:
{
handler
(
val
)
{
if
(
val
)
{
this
.
flag
=
false
this
.
list
=
[]
this
.
init
()
}
this
.
$refs
.
receptionTips
?.
close
()
},
immediate
:
true
}
},
methods
:
{
init
()
{
this
.
customerNameOrPhone
=
''
;
setTimeout
(()
=>
{
this
.
isSearch
=
false
this
.
pageNum
=
1
this
.
flag
=
false
this
.
getRecordList
()
},
300
)
},
//已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约
formatInvite
(
val
)
{
if
(
val
.
inviteStatus
==
2
&&
new
Date
().
getTime
()
>
new
Date
(
val
.
inviteDate
).
getTime
())
{
return
5
}
return
val
.
inviteStatus
},
formatTime
(
val
,
key
)
{
if
(
key
==
'customerPhone'
)
{
return
val
.
slice
(
0
,
3
)
+
" "
+
val
.
slice
(
3
,
7
)
+
" "
+
val
.
slice
(
7
)
}
return
dayjs
(
val
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
},
//下拉分页
pageonReachBottom
()
{
let
{
pageNum
,
total
,
nothing
,
pageSize
}
=
this
if
(
!
nothing
)
nothing
=
'nothing'
if
(
Math
.
ceil
(
total
/
pageSize
)
>
pageNum
)
{
this
.
pageNum
+=
1
this
.
getRecordList
()
}
else
this
.
nothing
=
true
},
input
(
e
)
{
this
.
customerNameOrPhone
=
e
.
detail
.
value
if
(
this
.
customerNameOrPhone
==
''
)
this
.
isSearch
=
false
this
.
pageNum
=
1
this
.
flag
=
false
this
.
getRecordList
()
this
.
clearCanvas
()
},
focus
()
{
this
.
isSearch
=
true
},
handleClear
()
{
this
.
init
()
this
.
clearCanvas
()
},
getRecordList
()
{
const
{
pageNum
,
pageSize
,
customerNameOrPhone
}
=
this
,
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
{
shopMerchantId
}
=
userInfo
;
this
.
getList
(
'customerInviteRecordPage'
,
{
merchantIds
:
[
shopMerchantId
],
pageNum
,
pageSize
,
customerNameOrPhone
,
})
},
reception
(
item
)
{
this
.
chooseItem
=
item
this
.
$refs
.
receptionTips
.
open
()
},
jumpPage
:
uni
.
$throttle
(
function
()
{
this
.
$emit
(
'reception'
,
{
item
:
this
.
chooseItem
})
},
200
),
clearCanvas
()
{
this
.
$refs
.
invitationCanvas
.
clearBoard
()
},
openDetail
(
e
)
{
this
.
couponPopupRef
.
open
(
0
,
{
...
e
,
phoneNumber
:
e
.
customerPhone
,
carModel
:
e
.
carSeriesName
,
staffName
:
e
.
employeeName
})
}
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.layout
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100vw
;
height
:
100vh
;
background-image
:
linear-gradient
(
180deg
,
#f2f6ff
0%
,
#f7f9ff
100%
);
overflow
:
hidden
;
&-content
{
position
:
relative
;
height
:
100%
;
margin
:
$
margin
;
}
.bg
{
width
:
100%
;
height
:
toRpx
(
800
);
position
:
absolute
;
left
:
0
;
background-image
:
url('../../assets/images/boutique/record-bg.png')
;
background-size
:
100%
100%
;
top
:
0
;
}
.nav-bar
{
position
:
fixed
;
width
:
100%
;
height
:
toRpx
(
96
);
left
:
0
;
top
:
toRpx
(
48
);
z-index
:
9
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.nav-title
{
font-weight
:
700
;
font-size
:
toRpx
(
32
);
color
:
#1a1a1a
;
text-align
:
center
;
line-height
:
100%
;
flex
:
1
;
}
}
.box
{
padding-top
:
toRpx
(
154
);
.input-box
{
position
:
relative
;
margin
:
0
toRpx
(
64
);
.input
{
padding-left
:
toRpx
(
30
);
height
:
toRpx
(
80
);
background
:
#ffffff
;
border
:
toRpx
(
3
)
solid
#a8c1ff
;
border-radius
:
toRpx
(
16
);
width
:
100%
;
line-height
:
toRpx
(
80
);
text-align
:
center
;
}
.input-tips
{
color
:
#999999
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
toRpx
(
80
);
width
:
100%
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
pointer-events
:
none
;
.icon
{
margin-left
:
toRpx
(
12
);
}
}
.close
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
toRpx
(
120
);
height
:
toRpx
(
80
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
.record-box
{
height
:
calc
(
100vh
-
#{
toRpx
(
224
)}
);
padding-top
:
toRpx
(
48
);
}
.end-text
{
color
:
#999
;
text-align
:
center
;
padding
:
toRpx
(
50
)
0
;
font-size
:
toRpx
(
24
);
}
.list
{
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
gap
:
toRpx
(
48
);
margin
:
0
toRpx
(
64
);
.item
{
background
:
#ffffff
;
border-radius
:
toRpx
(
16
);
box-sizing
:
border-box
;
padding
:
toRpx
(
24
)
toRpx
(
32
);
position
:
relative
;
width
:
100%
;
overflow
:
hidden
;
.detail-btn
{
position
:
absolute
;
top
:
toRpx
(
24
);
right
:
toRpx
(
32
);
color
:
#2c66f7
;
font-size
:
toRpx
(
28
);
font-weight
:
500
;
line-height
:
toRpx
(
44
);
.sprite-icon
{
margin-left
:
toRpx
(
8
);
}
}
.status
{
flex-shrink
:
0
;
padding
:
toRpx
(
6
)
toRpx
(
16
);
border-radius
:
toRpx
(
4
);
font-weight
:
500
;
font-size
:
toRpx
(
24
);
justify-content
:
center
;
background
:
#fdece9
;
color
:
#f24724
;
margin-left
:
toRpx
(
16
);
&.status_1
{
background
:
#fff5e6
;
color
:
#ff9d0a
;
}
&
.status_2
,
&
.status_7
{
background
:
#eaf9f1
;
color
:
#35c376
;
}
&
.status_3
{
background
:
#eeeeee
;
color
:
#999999
;
}
&
.status_5
{
background
:
#fdece9
;
color
:
#f24724
;
}
}
.deal
{
background
:
#eaf9f1
;
color
:
#35c376
;
}
.top
{
width
:
calc
(
100%
-
#{
toRpx
(
124
)}
);
}
.name
{
font-weight
:
500
;
font-size
:
toRpx
(
32
);
color
:
#292d33
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.goods-name
{
font-weight
:
500
;
font-size
:
toRpx
(
32
);
color
:
#2c66f7
;
margin-top
:
toRpx
(
16
);
}
.info
{
margin-top
:
toRpx
(
16
);
font-size
:
toRpx
(
24
);
color
:
#999ea8
;
.value
{
margin-left
:
auto
;
color
:
#666666
;
}
}
}
}
}
}
.nothing
{
width
:
100vw
;
flex-direction
:
column
;
margin-top
:
toRpx
(
112
);
font-size
:
toRpx
(
28
);
color
:
#999999
;
.icon
{
width
:
toRpx
(
676
);
height
:
toRpx
(
284
);
margin-bottom
:
toRpx
(
24
);
}
}
</
style
>
<
template
>
<view
class=
"layout"
>
<view
class=
"bg"
></view>
<wnCanvas
:canvasId=
"`c-$
{madiaId}`"
:drawStatus="penSwitch"
custom
:scaleSwitch="false"
ref="invitationCanvas"
>
<template
slot=
"customContent"
>
<view
class=
"layout-content"
>
<view
class=
"box"
>
<view
class=
"input-box"
>
<input
type=
"text"
class=
"input"
v-model=
"customerNameOrPhone"
maxlength=
"11"
@
blur=
"input($event)"
@
focus=
"focus"
/>
<view
class=
"input-tips"
v-if=
"!isSearch"
>
搜索客户姓名/电话
<uni-icons
type=
"search"
class=
"icon"
color=
"#999"
size=
"20"
></uni-icons></view>
<uni-icons
v-if=
"isSearch"
type=
"closeempty"
class=
"close"
color=
"#999"
@
click=
"handleClear"
size=
"20"
></uni-icons>
</view>
<scroll-view
class=
"record-box"
scroll-y
@
scrolltolower=
"pageonReachBottom"
>
<view
class=
"list"
>
<template
v-if=
"flag"
>
<template
v-if=
"list.length"
>
<template
v-for=
"item in list"
>
<view
class=
"item"
:key=
"item.id"
@
click=
"reception(item)"
>
<view
class=
"detail-btn flex"
@
click
.
stop=
"openDetail(item)"
>
查看
<div
class=
"sprite-icon icon-detail-btn"
></div>
</view>
<view
class=
"top flex"
>
<view
class=
"name"
>
{{
item
.
customerName
}}
</view>
<view
:class=
"['status flex', 'status_' + formatInvite(item)]"
>
{{
inviteStatus
[
formatInvite
(
item
)]
}}
</view>
</view>
<template
v-for=
"(k, ind) in itemObject"
>
<view
class=
"info flex"
:key=
"ind"
>
<view
class=
"label"
>
{{
k
.
label
}}
</view>
<view
class=
"value"
>
{{
k
.
formatter
?
k
.
formatter
(
item
[
k
.
key
]):
k
.
format
?
formatTime
(
item
[
k
.
key
],
k
.
key
)
:
item
[
k
.
key
]
||
"-"
}}
</view>
</view>
</
template
>
</view>
</template>
</template>
<
template
v-else
>
<view
class=
"nothing flex"
>
<image
class=
"icon"
src=
"../../assets/images/home/nothing.webp"
/>
暂无数据
</view>
</
template
>
</template>
</view>
<
template
v-if=
"nothing"
>
<view
class=
"end-text"
>
-已经到底了-
</view>
</
template
>
</scroll-view>
</view>
</view>
</template>
</wnCanvas>
<MessageBox
ref=
"receptionTips"
content=
"是否接待当前客户,确定接待直接进入\n「车型加装选购页」"
cancelBtnText=
"取消"
confirmBtnText=
"确定接待"
@
confirm=
"jumpPage"
></MessageBox>
<coupon-pop
ref=
"couponPopup"
@
hideTool=
"$emit('hideTool')"
title=
"客户邀约详情"
tips=
"微信扫码进入客户邀约详情"
/>
</view>
</template>
<
script
type=
"text/ecmascript-6"
>
import
dayjs
from
'dayjs'
import
Record
from
"@/mixin/record"
;
import
CouponPop
from
'./components/CouponPop.vue'
export
default
{
components
:
{
CouponPop
},
mixins
:
[
Record
],
props
:
{
show
:
Boolean
,
madiaId
:
Number
,
penSwitch
:
Boolean
,
},
data
()
{
return
{
customerNameOrPhone
:
''
,
isSearch
:
false
,
list
:
[],
inviteStatus
:
{
1
:
'待预约'
,
2
:
'已预约'
,
3
:
'取消预约'
,
4
:
'已施工'
,
5
:
'超时未到店'
,
6
:
'已撤销'
,
7
:
'已支付'
},
itemObject
:
[
{
label
:
'客户电话'
,
key
:
'customerPhone'
,
format
:
true
},
{
label
:
'客户车型'
,
key
:
'carSeriesName'
},
{
label
:
'礼券名称'
,
key
:
'couponName'
},
{
label
:
'领券时间'
,
key
:
'receiveCouponDate'
,
format
:
true
},
{
label
:
'销售顾问'
,
key
:
'employeeName'
},
{
label
:
'流量有效性'
,
key
:
'trafficEffectiveness'
,
formatter
:
(
val
)
=>
{
return
{
1
:
'有效客户'
,
2
:
'无效客户'
}[
val
]
||
'-'
}
},
],
chooseItem
:
{}
}
},
computed
:
{
couponPopupRef
()
{
return
this
.
$refs
.
couponPopup
},
},
watch
:
{
show
:
{
handler
(
val
)
{
if
(
val
)
{
this
.
flag
=
false
this
.
list
=
[]
this
.
init
()
}
this
.
$refs
.
receptionTips
?.
close
()
},
immediate
:
true
}
},
methods
:
{
init
()
{
this
.
customerNameOrPhone
=
''
;
setTimeout
(()
=>
{
this
.
isSearch
=
false
this
.
pageNum
=
1
this
.
flag
=
false
this
.
getRecordList
()
},
300
)
},
//已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约
formatInvite
(
val
)
{
if
(
val
.
inviteStatus
==
2
&&
new
Date
().
getTime
()
>
new
Date
(
val
.
inviteDate
).
getTime
())
{
return
5
}
return
val
.
inviteStatus
},
formatTime
(
val
,
key
)
{
if
(
key
==
'customerPhone'
)
{
return
val
.
slice
(
0
,
3
)
+
" "
+
val
.
slice
(
3
,
7
)
+
" "
+
val
.
slice
(
7
)
}
return
dayjs
(
val
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
},
//下拉分页
pageonReachBottom
()
{
let
{
pageNum
,
total
,
nothing
,
pageSize
}
=
this
if
(
!
nothing
)
nothing
=
'nothing'
if
(
Math
.
ceil
(
total
/
pageSize
)
>
pageNum
)
{
this
.
pageNum
+=
1
this
.
getRecordList
()
}
else
this
.
nothing
=
true
},
input
(
e
)
{
this
.
customerNameOrPhone
=
e
.
detail
.
value
if
(
this
.
customerNameOrPhone
==
''
)
this
.
isSearch
=
false
this
.
pageNum
=
1
this
.
flag
=
false
this
.
getRecordList
()
this
.
clearCanvas
()
},
focus
()
{
this
.
isSearch
=
true
},
handleClear
()
{
this
.
init
()
this
.
clearCanvas
()
},
getRecordList
()
{
const
{
pageNum
,
pageSize
,
customerNameOrPhone
}
=
this
,
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
{
shopMerchantId
}
=
userInfo
;
this
.
getList
(
'customerInviteRecordPage'
,
{
merchantIds
:
[
shopMerchantId
],
pageNum
,
pageSize
,
customerNameOrPhone
,
})
},
reception
(
item
)
{
this
.
chooseItem
=
item
this
.
$refs
.
receptionTips
.
open
()
},
jumpPage
:
uni
.
$throttle
(
function
()
{
this
.
$emit
(
'reception'
,
{
item
:
this
.
chooseItem
})
},
200
),
clearCanvas
()
{
this
.
$refs
.
invitationCanvas
.
clearBoard
()
},
openDetail
(
e
)
{
this
.
couponPopupRef
.
open
(
0
,
{
...
e
,
phoneNumber
:
e
.
customerPhone
,
carModel
:
e
.
carSeriesName
,
staffName
:
e
.
employeeName
})
}
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.layout
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100vw
;
height
:
100vh
;
background-image
:
linear-gradient
(
180deg
,
#f2f6ff
0%
,
#f7f9ff
100%
);
overflow
:
hidden
;
&-content
{
position
:
relative
;
height
:
100%
;
margin
:
$
margin
;
}
.bg
{
width
:
100%
;
height
:
toRpx
(
800
);
position
:
absolute
;
left
:
0
;
background-image
:
url('../../assets/images/boutique/record-bg.png')
;
background-size
:
100%
100%
;
top
:
0
;
}
.nav-bar
{
position
:
fixed
;
width
:
100%
;
height
:
toRpx
(
96
);
left
:
0
;
top
:
toRpx
(
48
);
z-index
:
9
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.nav-title
{
font-weight
:
700
;
font-size
:
toRpx
(
32
);
color
:
#1a1a1a
;
text-align
:
center
;
line-height
:
100%
;
flex
:
1
;
}
}
.box
{
padding-top
:
toRpx
(
154
);
.input-box
{
position
:
relative
;
margin
:
0
toRpx
(
64
);
.input
{
padding-left
:
toRpx
(
30
);
height
:
toRpx
(
80
);
background
:
#ffffff
;
border
:
toRpx
(
3
)
solid
#a8c1ff
;
border-radius
:
toRpx
(
16
);
width
:
100%
;
line-height
:
toRpx
(
80
);
text-align
:
center
;
}
.input-tips
{
color
:
#999999
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
toRpx
(
80
);
width
:
100%
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
pointer-events
:
none
;
.icon
{
margin-left
:
toRpx
(
12
);
}
}
.close
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
toRpx
(
120
);
height
:
toRpx
(
80
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
.record-box
{
height
:
calc
(
100vh
-
#{
toRpx
(
224
)}
);
padding-top
:
toRpx
(
48
);
}
.end-text
{
color
:
#999
;
text-align
:
center
;
padding
:
toRpx
(
50
)
0
;
font-size
:
toRpx
(
24
);
}
.list
{
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
gap
:
toRpx
(
48
);
margin
:
0
toRpx
(
64
);
.item
{
background
:
#ffffff
;
border-radius
:
toRpx
(
16
);
box-sizing
:
border-box
;
padding
:
toRpx
(
24
)
toRpx
(
32
);
position
:
relative
;
width
:
100%
;
overflow
:
hidden
;
.detail-btn
{
position
:
absolute
;
top
:
toRpx
(
24
);
right
:
toRpx
(
32
);
color
:
#2c66f7
;
font-size
:
toRpx
(
28
);
font-weight
:
500
;
line-height
:
toRpx
(
44
);
.sprite-icon
{
margin-left
:
toRpx
(
8
);
}
}
.status
{
flex-shrink
:
0
;
padding
:
toRpx
(
6
)
toRpx
(
16
);
border-radius
:
toRpx
(
4
);
font-weight
:
500
;
font-size
:
toRpx
(
24
);
justify-content
:
center
;
background
:
#fdece9
;
color
:
#f24724
;
margin-left
:
toRpx
(
16
);
&.status_1
{
background
:
#fff5e6
;
color
:
#ff9d0a
;
}
&
.status_2
,
&
.status_7
{
background
:
#eaf9f1
;
color
:
#35c376
;
}
&
.status_3
{
background
:
#eeeeee
;
color
:
#999999
;
}
&
.status_5
{
background
:
#fdece9
;
color
:
#f24724
;
}
}
.deal
{
background
:
#eaf9f1
;
color
:
#35c376
;
}
.top
{
width
:
calc
(
100%
-
#{
toRpx
(
124
)}
);
}
.name
{
font-weight
:
500
;
font-size
:
toRpx
(
32
);
color
:
#292d33
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.goods-name
{
font-weight
:
500
;
font-size
:
toRpx
(
32
);
color
:
#2c66f7
;
margin-top
:
toRpx
(
16
);
}
.info
{
margin-top
:
toRpx
(
16
);
font-size
:
toRpx
(
24
);
color
:
#999ea8
;
.value
{
margin-left
:
auto
;
color
:
#666666
;
}
}
}
}
}
}
.nothing
{
width
:
100vw
;
flex-direction
:
column
;
margin-top
:
toRpx
(
112
);
font-size
:
toRpx
(
28
);
color
:
#999999
;
.icon
{
width
:
toRpx
(
676
);
height
:
toRpx
(
284
);
margin-bottom
:
toRpx
(
24
);
}
}
</
style
>
store/modules/audio.js
View file @
8efa737
/*
* @Description:
* @Author: huyue
* @Date: 2024-04-07 18:15:11
* @LastEditors: limin
* @LastEditTime: 2025-01-03 21:26:31
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
import
utils
from
'@/utils/utils'
// const recorderManager = uni.getRecorderManager();
export
default
{
namespaced
:
true
,
state
()
{
return
{
booksList
:
[],
audioList
:
[],
receptionStatus
:
''
,
endReasonType
:
0
,
perRecordNumber
:
0
,
audioInfo
:
{
audioStatus
:
''
,
endReasonType
:
0
,
receptionStartTime
:
''
,
receptionEndTime
:
''
}
}
},
mutations
:
{
setAudioInfo
(
state
,
data
)
{
if
(
data
.
audioStatus
==
'start'
)
{
data
.
receptionStartTime
=
utils
.
convertDateTimeFormat
(
new
Date
(),
'/'
)
data
.
receptionEndTime
=
''
}
if
(
data
.
audioStatus
==
'end'
)
{
data
.
receptionEndTime
=
utils
.
convertDateTimeFormat
(
new
Date
(),
'/'
)
}
state
.
audioInfo
=
Object
.
assign
(
state
.
audioInfo
,
data
)
},
setReceptionStatus
(
state
,
data
)
{
state
.
receptionStatus
=
data
},
setAudioList
(
state
,
data
)
{
state
.
audioList
=
data
},
setBooks
(
state
,
data
)
{
state
.
booksList
=
data
},
setPerRecordNumber
(
state
,
data
)
{
state
.
perRecordNumber
=
data
}
},
actions
:
{
setPerRecordNumber
({
commit
},
value
)
{
commit
(
'setPerRecordNumber'
,
value
)
}
// startAudio({ commit, state, dispatch }) {
// if (state.isStart) return;
// commit("setAudioStart", true);
// commit("setAudioList", []);
// commit("setAudioEnd", false);
// recorderManager.start({
// duration: 20000,
// });
// recorderManager.onStop(async (res) => {
// console.log("结束录音");
// console.log(state.isEnd, "this.isEnd");
// if (!state.isEnd) {
// uni.getRecorderManager().start({
// duration: 20000,
// });
// }
// const result = await upload(res.tempFilePath);
// const storageFile = [...state.audioList, result];
// uni.$storage.set("storageFile", storageFile);
// commit("setAudioList", storageFile);
// if (state.isEnd) {
// console.log("上传语音");
// dispatch("uploadVoice", storageFile);
// }
// return true;
// });
// },
// stopAudio({ commit, state }) {
// commit("setAudioStart", false);
// commit("setAudioEnd", true);
// recorderManager.stop();
// },
// async uploadVoice({ commit, state }, tempFilePath) {
// const { shopMerchantId, phone } = uni.$storage.get("userInfo"),
// { customerName, phoneNumber, salesUuid, carModel } =
// store.state.user.customerInfo,
// receptionCustomerPaySourceList = state.booksList.map((item) => {
// return {
// id: item.id,
// sourceType: item.id,
// sourceUrl: item.imgUrl,
// };
// }),
// params = {
// carModel,
// endReasonType: state.endReasonType, //原因 1.异常 0.正常
// customerName,
// phoneNumber,
// loginPhone: phone,
// salesUuid,
// receptionStatus: state.receptionStatus, //接待结果 1.成交 0.战败
// recordUrlList: tempFilePath,
// receptionStartTime: state.receptionStartTime,
// receptionEndTime: state.receptionEndTime,
// receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
// merchantId: shopMerchantId,
// };
// commit("setBooks", []);
// console.log(params);
// if (customerName && phoneNumber && salesUuid && carModel)
// uni.$api.commonApi.saveRecCustomer(params).then((res) => {
// console.log(res);
// });
// store.dispatch("clearCustomerInfo");
// commit("setReceptionStatus", 1);
// commit("setReceptionStatus", 0);
// uni.$storage.set("storageFile", "");
// },
}
}
/*
* @Description:
* @Author: huyue
* @Date: 2024-04-07 18:15:11
* @LastEditors: limin
* @LastEditTime: 2025-01-03 21:26:31
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
import
utils
from
'@/utils/utils'
// const recorderManager = uni.getRecorderManager();
export
default
{
namespaced
:
true
,
state
()
{
return
{
booksList
:
[],
audioList
:
[],
receptionStatus
:
''
,
endReasonType
:
0
,
perRecordNumber
:
0
,
audioInfo
:
{
audioStatus
:
''
,
endReasonType
:
0
,
receptionStartTime
:
''
,
receptionEndTime
:
''
}
}
},
mutations
:
{
setAudioInfo
(
state
,
data
)
{
if
(
data
.
audioStatus
==
'start'
)
{
data
.
receptionStartTime
=
utils
.
convertDateTimeFormat
(
new
Date
(),
'/'
)
data
.
receptionEndTime
=
''
}
if
(
data
.
audioStatus
==
'end'
)
{
data
.
receptionEndTime
=
utils
.
convertDateTimeFormat
(
new
Date
(),
'/'
)
}
state
.
audioInfo
=
Object
.
assign
(
state
.
audioInfo
,
data
)
},
setReceptionStatus
(
state
,
data
)
{
console
.
log
(
data
,
'==='
)
state
.
receptionStatus
=
data
},
setAudioList
(
state
,
data
)
{
state
.
audioList
=
data
},
setBooks
(
state
,
data
)
{
state
.
booksList
=
data
},
setPerRecordNumber
(
state
,
data
)
{
state
.
perRecordNumber
=
data
}
},
actions
:
{
setPerRecordNumber
({
commit
},
value
)
{
commit
(
'setPerRecordNumber'
,
value
)
}
// startAudio({ commit, state, dispatch }) {
// if (state.isStart) return;
// commit("setAudioStart", true);
// commit("setAudioList", []);
// commit("setAudioEnd", false);
// recorderManager.start({
// duration: 20000,
// });
// recorderManager.onStop(async (res) => {
// console.log("结束录音");
// console.log(state.isEnd, "this.isEnd");
// if (!state.isEnd) {
// uni.getRecorderManager().start({
// duration: 20000,
// });
// }
// const result = await upload(res.tempFilePath);
// const storageFile = [...state.audioList, result];
// uni.$storage.set("storageFile", storageFile);
// commit("setAudioList", storageFile);
// if (state.isEnd) {
// console.log("上传语音");
// dispatch("uploadVoice", storageFile);
// }
// return true;
// });
// },
// stopAudio({ commit, state }) {
// commit("setAudioStart", false);
// commit("setAudioEnd", true);
// recorderManager.stop();
// },
// async uploadVoice({ commit, state }, tempFilePath) {
// const { shopMerchantId, phone } = uni.$storage.get("userInfo"),
// { customerName, phoneNumber, salesUuid, carModel } =
// store.state.user.customerInfo,
// receptionCustomerPaySourceList = state.booksList.map((item) => {
// return {
// id: item.id,
// sourceType: item.id,
// sourceUrl: item.imgUrl,
// };
// }),
// params = {
// carModel,
// endReasonType: state.endReasonType, //原因 1.异常 0.正常
// customerName,
// phoneNumber,
// loginPhone: phone,
// salesUuid,
// receptionStatus: state.receptionStatus, //接待结果 1.成交 0.战败
// recordUrlList: tempFilePath,
// receptionStartTime: state.receptionStartTime,
// receptionEndTime: state.receptionEndTime,
// receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
// merchantId: shopMerchantId,
// };
// commit("setBooks", []);
// console.log(params);
// if (customerName && phoneNumber && salesUuid && carModel)
// uni.$api.commonApi.saveRecCustomer(params).then((res) => {
// console.log(res);
// });
// store.dispatch("clearCustomerInfo");
// commit("setReceptionStatus", 1);
// commit("setReceptionStatus", 0);
// uni.$storage.set("storageFile", "");
// },
}
}
utils/recordManager/RecordSaveService.js
View file @
8efa737
...
...
@@ -337,7 +337,7 @@ class RecordSaveService {
async
_saveOrUpdate
(
data
)
{
uni
.
$logger
.
local
.
info
(
`【接待记录保存服务】 == 开始保存或更新接待记录!!`
)
const
{
status
,
tempFilePath
,
rec
eption
Status
,
...
record
}
=
data
const
{
status
,
tempFilePath
,
rec
ord
Status
,
...
record
}
=
data
const
fileList
=
Array
.
isArray
(
record
.
recordUrlList
)
?
record
.
recordUrlList
:
[]
const
isAllCompleted
=
status
===
FileStatus
.
NoFile
||
fileList
.
every
(
i
=>
[
FileStatus
.
Uploaded
,
FileStatus
.
Completed
].
includes
(
i
.
status
))
if
(
isAllCompleted
)
{
...
...
utils/recordManager/RecordService.js
View file @
8efa737
...
...
@@ -333,6 +333,7 @@ class RecordService {
}
updateReceptionStatus
(
status
)
{
console
.
log
(
'updateReceptionStatus'
,
status
)
this
.
record
.
updatePreRecords
({
receptionStatus
:
status
})
}
...
...
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