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