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 6cf2b444
authored
Sep 12, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
4a145e97
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
60 deletions
api/module/boutique.js
mixin/click.js
mixin/receptionTrackMixin.js
pages/boutique/components/CouponPop.vue
pages/boutique/components/Reception.vue
pages/boutique/detail.vue
pages/boutique/index.vue
api/module/boutique.js
View file @
6cf2b44
...
...
@@ -55,4 +55,14 @@ module.exports = {
...
data
,
});
},
/**轻改素材配置 */
getBoutiqueMaterialConfig
(
data
)
{
return
http
.
post
({
method
:
"dj.api.boutique.recepiton.material.merchant.detail"
,
projectName
:
"boutique"
,
...
data
,
});
},
};
mixin/click.js
View file @
6cf2b44
...
...
@@ -16,7 +16,7 @@ const UPLOAD_STATUS = {
import
{
mapMutations
,
mapState
}
from
'vuex'
import
utils
from
'@/utils/utils.js'
export
default
{
data
()
{
data
()
{
return
{
voicePath
:
''
,
timer
:
null
,
...
...
@@ -25,7 +25,7 @@ export default {
reaction
:
1
}
},
mounted
()
{
mounted
()
{
// 获取当前页面栈数组
const
pages
=
getCurrentPages
()
const
currentPage
=
pages
[
pages
.
length
-
1
]
...
...
@@ -38,23 +38,23 @@ export default {
...
mapState
(
'audio'
,
[
'receptionStatus'
,
'booksList'
,
'audioInfo'
]),
...
mapState
([
'user.customerInfo'
])
},
created
()
{
created
()
{
console
.
log
(
'created'
)
},
onHide
()
{
onHide
()
{
console
.
log
(
'隐藏'
)
// recorderManager.stop();
// recorderManager.start({
// duration: 10000,
// });
},
onShow
()
{
onShow
()
{
// console.log(utils.requestAndroidPermission());
},
methods
:
{
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
,
'setBooks'
,
'setAudioInfo'
]),
// //关闭提示
tipCancel
()
{
tipCancel
()
{
this
.
stopAudio
()
this
.
setReceptionStatus
(
0
)
this
.
setAudioInfo
({
endReasonType
:
1
})
...
...
@@ -67,11 +67,11 @@ export default {
}
},
//结束提示
tipConfirm
()
{
tipConfirm
()
{
this
.
times
=
0
this
.
$refs
.
tipBox
?.
close
()
},
closeAudio
()
{
closeAudio
()
{
this
.
times
=
0
clearInterval
(
this
.
timer
)
this
.
timer
=
null
...
...
@@ -79,7 +79,7 @@ export default {
this
.
setReceptionStatus
(
0
)
this
.
setAudioInfo
({
endReasonType
:
1
})
},
getParams
()
{
getParams
()
{
const
{
shopMerchantId
,
phone
,
sceneType
,
uuid
,
name
,
merchantId
,
channelType
,
merchantName
}
=
uni
.
$storage
.
get
(
'userInfo'
),
{
customerName
,
phoneNumber
,
salesUuid
,
carModel
,
staffName
}
=
this
.
$store
.
state
.
user
.
customerInfo
,
receptionCustomerPaySourceList
=
this
.
booksList
.
map
(
item
=>
{
...
...
@@ -92,28 +92,40 @@ export default {
{
receptionStartTime
,
receptionEndTime
,
endReasonType
}
=
this
.
audioInfo
,
{
deviceId
:
appCode
}
=
uni
.
getDeviceInfo
(),
receptionTrack
=
this
.
$store
.
state
.
user
.
receptionTrack
,
params
=
{
staffUuid
:
uuid
,
staffName
:
name
,
serviceMerchantId
:
merchantId
,
carModel
,
endReasonType
,
//原因 1.异常 0.正常
customerName
,
phoneNumber
,
appCode
,
loginPhone
:
phone
,
salesName
:
staffName
,
salesUuid
,
receptionStatus
:
this
.
receptionStatus
,
//接待结果 1.成交 0.战败
receptionStartTime
,
receptionEndTime
,
receptionCustomerPaySourceList
,
//1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
receptionCustomerMaterialPointList
=
[]
Object
.
keys
(
receptionTrack
).
map
(
key
=>
{
receptionCustomerMaterialPointList
.
push
({
...
receptionTrack
[
key
],
merchantId
:
shopMerchantId
,
merchantName
,
bussinessType
:
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType
:
channelType
||
1
//1问界 2 比亚迪 3 其他
}
console
.
log
(
receptionTrack
)
businessScene
:
sceneType
,
staffUuid
:
salesUuid
,
staffName
,
receptionDate
:
Date
.
now
()
})
})
let
params
=
{
staffUuid
:
uuid
,
staffName
:
name
,
serviceMerchantId
:
merchantId
,
carModel
,
endReasonType
,
//原因 1.异常 0.正常
customerName
,
phoneNumber
,
appCode
,
loginPhone
:
phone
,
salesName
:
staffName
,
salesUuid
,
receptionStatus
:
this
.
receptionStatus
,
//接待结果 1.成交 0.战败
receptionStartTime
,
receptionEndTime
,
receptionCustomerPaySourceList
,
//1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId
:
shopMerchantId
,
merchantName
,
bussinessType
:
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType
:
channelType
||
1
,
//1问界 2 比亚迪 3 其他
receptionCustomerMaterialPointList
}
console
.
log
(
params
)
return
params
},
/**
...
...
@@ -121,7 +133,7 @@ export default {
* @param {旧的文件路径} oldFilePath
* @param {新的文件名} newFileName
*/
RenameFile
(
oldFilePath
,
newFileName
)
{
RenameFile
(
oldFilePath
,
newFileName
)
{
plus
.
io
.
resolveLocalFileSystemURL
(
oldFilePath
,
entry
=>
{
entry
.
getParent
(
_oldFile
=>
{
entry
.
moveTo
(
_oldFile
,
'/'
+
newFileName
,
newFilePath
=>
{
...
...
@@ -180,7 +192,7 @@ export default {
this
.
handleSave
(
newFilePath
)
})
},
300
),
handleSave
(
file
)
{
handleSave
(
file
)
{
const
audioList
=
[...
this
.
audioInfo
.
audioList
,
file
]
if
(
file
)
{
this
.
setAudioInfo
({
audioList
})
...
...
@@ -192,7 +204,7 @@ export default {
this
.
setAudioInfo
({
endReasonType
:
0
,
audioStatus
:
'finish'
})
},
/**保存记录*/
async
saveRecord
()
{
async
saveRecord
()
{
const
params
=
this
.
getParams
()
const
unlock
=
await
uni
.
$recordManager
.
lock
()
const
path
=
await
utils
.
getFileSaveFolderOnClient
()
...
...
@@ -258,7 +270,7 @@ export default {
recorderManager
.
stop
()
},
1500
),
//监听点击事件
initTime
()
{
initTime
()
{
if
(
this
.
audioInfo
.
audioStatus
!=
'start'
)
return
this
.
timer
=
setInterval
(()
=>
{
// console.log(this.times);
...
...
@@ -270,11 +282,11 @@ export default {
}
},
1000
*
10
)
},
handleTouchStart
()
{
handleTouchStart
()
{
this
.
times
=
0
}
},
beforeCreate
()
{
beforeCreate
()
{
clearInterval
(
this
.
timer
)
this
.
timer
=
null
}
...
...
mixin/receptionTrackMixin.js
View file @
6cf2b44
...
...
@@ -12,9 +12,9 @@ export default {
}
else
{
value
=
{
openCount
:
1
,
name
:
item
.
t
itle
,
i
d
:
item
.
id
,
stay
Time
:
0
,
materialName
:
item
.
detailT
itle
,
materialI
d
:
item
.
id
,
stay
Duration
:
0
,
entryTime
:
Date
.
now
()
}
}
...
...
@@ -31,7 +31,7 @@ export default {
receptionTrackLeave
()
{
let
key
=
this
.
id
,
value
=
this
.
receptionTrack
[
key
]
value
.
stay
Time
+=
Number
(((
Date
.
now
()
-
value
.
entryTime
)
/
1000
).
toFixed
(
2
)
)
value
.
stay
Duration
+=
Number
(
Date
.
now
()
-
value
.
entryTime
)
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
}
}
...
...
pages/boutique/components/CouponPop.vue
View file @
6cf2b44
...
...
@@ -237,12 +237,12 @@ export default {
watchStatus
:
{
immediate
:
true
,
handler
(
newval
)
{
console
.
log
(
'重新进入'
,
this
.
pageParams
)
let
item
=
this
.
couponList
.
find
(
e
=>
e
.
couponType
==
1
),
item2
=
this
.
couponList
.
find
(
e
=>
e
.
couponType
==
18
)
if
(
item
)
this
.
chooseCoupon
(
item
)
//默认填入类型为「太阳膜」类型
else
if
(
item2
)
this
.
chooseCoupon
(
item2
)
//次选填入「精品」类型
else
this
.
chooseCoupon
(
this
.
couponList
[
0
])
// 无此两种类型情况默认带入任意类型礼券
//
console.log('重新进入', this.pageParams)
//
let item = this.couponList.find(e => e.couponType == 1),
//
item2 = this.couponList.find(e => e.couponType == 18)
//
if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型
//
else if (item2) this.chooseCoupon(item2) //次选填入「精品」类型
//
else this.chooseCoupon(this.couponList[0]) // 无此两种类型情况默认带入任意类型礼券
}
}
},
...
...
@@ -276,9 +276,6 @@ export default {
},
mounted
()
{
console
.
log
(
qrcode
.
createQrCodeImg
(
'id=10086'
,
{
size
:
200
}))
},
methods
:
{
init
()
{
...
...
pages/boutique/components/Reception.vue
View file @
6cf2b44
<
template
>
<view
class=
"layout"
>
<view
class=
"tab-box flex"
>
<view
class=
"tab-box flex"
>
<template
v-for=
"(item, index) in carList"
>
<view
:key=
"index"
...
...
@@ -54,7 +52,7 @@
<view
class=
"coupon-btn flex"
v-if=
"!isPreview"
@
click=
"
$refs.couponPopup.open(customerType
)"
@
click=
"
couponPopupRef.open(customerType, customerInfo.customerCouponId
)"
>
{{couponText}}
</view>
</view>
</view>
...
...
@@ -154,15 +152,18 @@ export default {
couponText
()
{
return
this
.
customerType
==
0
?
'查看客户券码'
:
'为客户发券'
},
change_disabled
(){
return
this
.
customerType
==
0
||
this
.
$refs
.
couponPopup
.
pageParams
.
QRURL
change_disabled
()
{
return
this
.
customerType
==
0
||
this
.
couponPopupRef
.
pageParams
.
QRURL
},
couponPopupRef
()
{
return
this
.
$refs
.
couponPopup
}
},
methods
:
{
changeCar
(
item
)
{
if
(
this
.
change_disabled
)
return
if
(
this
.
change_disabled
)
return
this
.
currentCarString
=
item
this
.
updateViewKey
=
Date
.
now
()
},
...
...
@@ -179,7 +180,14 @@ export default {
this
.
currentImgUrl
=
e
},
reception
(
e
)
{
this
.
clearCustomerReceivedTimer
()
this
.
$emit
(
'reception'
,
e
)
},
clearCustomerReceivedTimer
()
{
if
(
this
.
couponPopupRef
.
pageParams
.
qrTimer
)
{
clearInterval
(
this
.
couponPopupRef
.
pageParams
.
qrTimer
)
this
.
couponPopupRef
.
pageParams
.
qrTimer
=
null
}
}
}
}
...
...
pages/boutique/detail.vue
View file @
6cf2b44
...
...
@@ -18,7 +18,7 @@
color=
"#000"
></uni-icons>
</view>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"title"
v-if=
"id != 1"
>
{{
title
}}
</view>
</view>
<template
v-for=
"(item, index) in media"
>
<view
...
...
@@ -71,7 +71,7 @@ import { mapMutations } from "vuex";
import
invitation
from
"./invitation.vue"
;
import
Case
from
"./case.vue"
;
import
history
from
"./history.vue"
;
import
{
receptionTrackMixin
}
from
'@/mixin/index.js'
import
{
receptionTrackMixin
}
from
'@/mixin/index.js'
export
default
{
components
:
{
ToolBox
,
...
...
@@ -165,7 +165,8 @@ export default {
phoneNumber
:
item
.
customerPhone
,
salesUuid
:
item
.
userId
,
staffName
:
item
.
employeeName
,
receiveCouponDate
:
item
.
receiveCouponDate
receiveCouponDate
:
item
.
receiveCouponDate
,
customerCouponId
:
item
.
customerCouponId
}
this
.
$emit
(
'reception'
,
customer
)
},
...
...
pages/boutique/index.vue
View file @
6cf2b44
...
...
@@ -235,6 +235,11 @@ export default {
this
.
$store
.
dispatch
(
"setEmployeeList"
,
res
);
});
/**获取车型素材配置 */
uni
.
$api
.
boutiqueApi
.
getBoutiqueMaterialConfig
({
merchantId
:
shopMerchantId
}).
then
(
res
=>
{
console
.
log
(
res
,
'==========='
)
})
let
boutiqueMediaConfig
=
{
M5
:
[
defaultConfig
[
0
],
defaultConfig
[
1
],
defaultConfig
[
2
]],
M7
:
[
defaultConfig
[
0
],
defaultConfig
[
1
]],
...
...
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