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 d3bc6ce9
authored
Jul 11, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 场景集市&接待记录新增字段
1 parent
fca8df4f
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
248 additions
and
255 deletions
components/CarBrands.vue
mixin/aiUrlMixin.js
mixin/index.js
mixin/record/recorder.js
mixin/report.js
pages/boutique/preview.vue
pages/common/caseDetail.vue
pages/common/materialDetail/index.vue
pages/common/receptionDetail/index.vue
pages/equity/index.vue
store/modules/user.js
utils/DBManager.js
utils/recordManager/RecordDto.js
utils/recordManager/dbRecord.js
components/CarBrands.vue
View file @
d3bc6ce
...
@@ -123,6 +123,7 @@ export default {
...
@@ -123,6 +123,7 @@ export default {
carBrandList
=
[];
carBrandList
=
[];
list
?.
map
((
e
)
=>
{
list
?.
map
((
e
)
=>
{
e
.
childs
.
map
((
i
)
=>
{
e
.
childs
.
map
((
i
)
=>
{
i
.
brandName
=
e
.
name
i
.
brandId
=
e
.
id
;
i
.
brandId
=
e
.
id
;
carBrandList
.
push
(
i
);
carBrandList
.
push
(
i
);
});
});
...
@@ -199,7 +200,12 @@ export default {
...
@@ -199,7 +200,12 @@ export default {
handleSelect
(
item
)
{
handleSelect
(
item
)
{
const
customerInfo
=
this
.
$store
.
state
.
user
.
customerInfo
,
const
customerInfo
=
this
.
$store
.
state
.
user
.
customerInfo
,
{
selectItem
,
linkage
}
=
this
{
selectItem
,
linkage
}
=
this
customerInfo
.
carBrand
=
selectItem
.
carChildsBrandName
Object
.
assign
(
customerInfo
,
{
carBrand
:
selectItem
.
carChildsBrandName
,
carBrandId
:
selectItem
.
carChildsBrandId
,
oneCarBrand
:
selectItem
.
carBrand
,
oneCarBrandId
:
selectItem
.
carBrandId
})
if
(
linkage
)
{
if
(
linkage
)
{
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customerInfo
)
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customerInfo
)
this
.
$store
.
dispatch
(
'updateViewKey'
)
this
.
$store
.
dispatch
(
'updateViewKey'
)
...
...
mixin/aiUrlMixin.js
0 → 100644
View file @
d3bc6ce
export
default
{
data
()
{
return
{
AIUrl
:
''
}
},
mounted
()
{
},
methods
:
{
async
getAiagent
(
options
,
agentCode
=
'AI7'
)
{
const
{
phone
}
=
uni
.
$storage
.
get
(
'userInfo'
),
[
data
]
=
await
uni
.
$api
.
sceneMarketApi
.
getAiagent
({
ownerShipType
:
1
,
accountPhone
:
phone
,
agentCode
//AI6
})
if
(
data
)
{
const
{
sceneType
,
uuid
,
phone
,
channelType
=
1
}
=
uni
.
$storage
.
get
(
'userInfo'
),
bussinessType
=
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
brand
=
{
1
:
'问界'
,
2
:
'比亚迪'
,
3
:
'其他'
}[
channelType
],
title
=
options
.
title
||
''
let
{
agentUrl
,
domainName
}
=
data
this
.
AIUrl
=
`
${
agentUrl
}
?no_header=1&business_type=
${
bussinessType
}
&phone=
${
phone
}
&brand=
${
brand
}
&one_id=
${
uuid
}
&platformType=1&domain=
${
domainName
}
&presuppositionProblem=
${
title
}
`
this
.
setWebviewStyle
()
}
else
uni
.
showToast
({
title
:
'获取智能体失败'
,
icon
:
'error'
})
},
setWebviewStyle
()
{
const
setWebviewStyleWithRetry
=
()
=>
{
const
currentWebview
=
this
.
$scope
.
$getAppWebview
()
let
[
wv1
,
wv2
]
=
currentWebview
.
children
()
let
wv1Flag
=
false
,
wv2Flag
=
false
if
(
wv2
)
{
if
(
wv1
)
{
wv1
.
setStyle
({
left
:
'0'
,
top
:
'9.37%'
,
height
:
'90.63%'
,
width
:
'71.36%'
});
wv1Flag
=
true
;
}
if
(
wv2
)
{
wv2
.
setStyle
({
left
:
'71.9%'
,
top
:
'17.18%'
,
height
:
'82.82%'
,
width
:
'28.3%'
});
wv2Flag
=
true
;
}
}
else
{
if
(
wv1
)
{
wv1
.
setStyle
({
left
:
'71.9%'
,
top
:
'17.18%'
,
height
:
'82.82%'
,
width
:
'28.3%'
});
wv1Flag
=
true
;
wv2Flag
=
true
;
}
}
return
wv1Flag
&&
wv2Flag
};
const
retrySetWebviewStyle
=
()
=>
{
if
(
!
setWebviewStyleWithRetry
())
{
// 如果未成功,继续重试
setTimeout
(
retrySetWebviewStyle
,
50
);
}
else
{
// 成功设置样式,结束循环
console
.
log
(
'Webview样式设置成功'
);
}
};
setTimeout
(
retrySetWebviewStyle
,
100
);
}
}
}
mixin/index.js
View file @
d3bc6ce
import
loginMixin
from
'./loginMixin'
import
loginMixin
from
'./loginMixin'
import
receptionTrackMixin
from
'./receptionTrackMixin'
import
receptionTrackMixin
from
'./receptionTrackMixin'
import
aiUrlMixin
from
'./aiUrlMixin'
import
report
from
'./report'
module
.
exports
=
{
module
.
exports
=
{
loginMixin
,
loginMixin
,
receptionTrackMixin
receptionTrackMixin
,
aiUrlMixin
,
report
}
}
mixin/record/recorder.js
View file @
d3bc6ce
...
@@ -12,12 +12,12 @@ import utils from '@/utils/utils.js'
...
@@ -12,12 +12,12 @@ import utils from '@/utils/utils.js'
import
{
storageApi
}
from
'@/utils/cache'
import
{
storageApi
}
from
'@/utils/cache'
import
permision
from
'@/js_sdk/wa-permission/permission.js'
import
permision
from
'@/js_sdk/wa-permission/permission.js'
export
default
{
export
default
{
provide
()
{
provide
()
{
return
{
return
{
getRecorder
:
()
=>
this
.
record
getRecorder
:
()
=>
this
.
record
}
}
},
},
async
mounted
()
{
async
mounted
()
{
this
.
audioManager
=
new
AudioManager
(
this
.
onAudioStart
,
this
.
onAudioStop
,
this
.
onError
)
this
.
audioManager
=
new
AudioManager
(
this
.
onAudioStart
,
this
.
onAudioStop
,
this
.
onError
)
this
.
initDto
()
this
.
initDto
()
this
.
record
=
new
TempRecord
(
this
.
tempRecord
,
this
.
triggleTempNumber
)
this
.
record
=
new
TempRecord
(
this
.
tempRecord
,
this
.
triggleTempNumber
)
...
@@ -34,31 +34,31 @@ export default {
...
@@ -34,31 +34,31 @@ export default {
// },
// },
// deep: true
// deep: true
// },
// },
customerKey
:{
customerKey
:
{
handler
()
{
handler
()
{
this
.
handler
(
this
.
customerInfo
,
this
.
updateCustomerInfo
)
this
.
handler
(
this
.
customerInfo
,
this
.
updateCustomerInfo
)
},
},
deep
:
true
deep
:
true
},
},
booksList
:
{
booksList
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
handler
(
val
,
this
.
updateBookList
)
this
.
handler
(
val
,
this
.
updateBookList
)
}
}
},
},
receptionStatus
:
{
receptionStatus
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
handler
(
val
,
this
.
updateReceptionStatus
)
this
.
handler
(
val
,
this
.
updateReceptionStatus
)
}
}
},
},
receptionKey
:
{
receptionKey
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
handler
(
this
.
receptionTrack
,
this
.
updateMaterialPointList
)
this
.
handler
(
this
.
receptionTrack
,
this
.
updateMaterialPointList
)
}
}
}
}
},
},
computed
:
{
computed
:
{
...
mapState
([
'user.customerInfo'
]),
...
mapState
([
'user.customerInfo'
]),
...
mapGetters
([
'customerInfo'
,
'receptionStatus'
,
'booksList'
,
'receptionTrack'
,
'receptionKey'
,
'customerKey'
])
...
mapGetters
([
'customerInfo'
,
'receptionStatus'
,
'booksList'
,
'receptionTrack'
,
'receptionKey'
,
'customerKey'
])
},
},
methods
:
{
methods
:
{
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
,
'setBooks'
,
'setPerRecordNumber'
]),
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
,
'setBooks'
,
'setPerRecordNumber'
]),
...
@@ -72,20 +72,20 @@ export default {
...
@@ -72,20 +72,20 @@ export default {
this
.
audioManager
.
start
()
this
.
audioManager
.
start
()
},
300
),
},
300
),
initReception
()
{
initReception
()
{
this
.
setBooks
([])
this
.
setBooks
([])
this
.
clearCustomerInfo
()
this
.
clearCustomerInfo
()
this
.
setReceptionStatus
(
''
)
this
.
setReceptionStatus
(
''
)
this
.
initTime
()
this
.
initTime
()
},
},
async
onAudioStart
()
{
async
onAudioStart
()
{
if
(
this
.
audioManager
.
counter
===
0
)
{
if
(
this
.
audioManager
.
counter
===
0
)
{
await
this
.
record
.
add
()
await
this
.
record
.
add
()
}
else
{
}
else
{
this
.
record
.
addAudio
()
this
.
record
.
addAudio
()
}
}
},
},
async
onAudioStop
()
{
async
onAudioStop
()
{
if
(
this
.
audioManager
.
isRecording
)
{
if
(
this
.
audioManager
.
isRecording
)
{
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 接待中,再次开启录音! '
)
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 接待中,再次开启录音! '
)
this
.
audioManager
.
start
()
this
.
audioManager
.
start
()
...
@@ -93,7 +93,7 @@ export default {
...
@@ -93,7 +93,7 @@ export default {
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 断开录音! '
)
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 断开录音! '
)
}
}
},
},
onAudioError
(
error
)
{
onAudioError
(
error
)
{
const
message
=
error
.
message
const
message
=
error
.
message
this
.
reportError
(
`录音异常: error:
${
message
}
`
,
message
)
this
.
reportError
(
`录音异常: error:
${
message
}
`
,
message
)
},
},
...
@@ -102,12 +102,12 @@ export default {
...
@@ -102,12 +102,12 @@ export default {
* @params {boolean} status true 不保存记录/AUDIO_STATUS.ABNORMAL 只要断开录音
* @params {boolean} status true 不保存记录/AUDIO_STATUS.ABNORMAL 只要断开录音
* @returns {void}
* @returns {void}
*/
*/
async
stopAudio
(
isNotSave
=
false
)
{
async
stopAudio
(
isNotSave
=
false
)
{
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 结束接待! '
)
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 结束接待! '
)
this
.
stop
()
this
.
stop
()
await
this
.
saveAndClearRecord
(
isNotSave
)
await
this
.
saveAndClearRecord
(
isNotSave
)
},
},
async
saveAndClearRecord
(
isNotSave
=
false
)
{
async
saveAndClearRecord
(
isNotSave
=
false
)
{
if
(
isNotSave
)
{
if
(
isNotSave
)
{
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 不保存记录! '
)
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 不保存记录! '
)
return
this
.
record
.
clearLocalRecord
()
return
this
.
record
.
clearLocalRecord
()
...
@@ -116,24 +116,24 @@ export default {
...
@@ -116,24 +116,24 @@ export default {
//如果不需要保存记录
//如果不需要保存记录
await
this
.
record
.
save
()
await
this
.
record
.
save
()
},
},
stop
()
{
stop
()
{
this
.
endWatchClick
()
this
.
endWatchClick
()
this
.
record
.
clearLoopTimer
()
this
.
record
.
clearLoopTimer
()
if
(
this
.
audioManager
.
isRecording
)
{
if
(
this
.
audioManager
.
isRecording
)
{
this
.
audioManager
.
stop
()
this
.
audioManager
.
stop
()
}
}
},
},
handler
(
params
,
fn
)
{
handler
(
params
,
fn
)
{
if
(
this
.
audioManager
.
isRecording
||
this
.
record
?.
currentRecord
?.
endReasonType
==
1
)
{
if
(
this
.
audioManager
.
isRecording
||
this
.
record
?.
currentRecord
?.
endReasonType
==
1
)
{
fn
.
call
(
this
,
params
)
fn
.
call
(
this
,
params
)
}
}
},
},
reset
()
{
reset
()
{
this
.
audioManager
=
null
this
.
audioManager
=
null
this
.
record
=
null
this
.
record
=
null
this
.
tempRecord
=
null
this
.
tempRecord
=
null
},
},
initDto
()
{
initDto
()
{
const
{
shopMerchantId
,
phone
,
sceneType
,
uuid
,
name
,
merchantId
,
channelType
,
merchantName
}
=
storageApi
.
getUserInfo
()
const
{
shopMerchantId
,
phone
,
sceneType
,
uuid
,
name
,
merchantId
,
channelType
,
merchantName
}
=
storageApi
.
getUserInfo
()
const
{
deviceId
:
appCode
}
=
uni
.
getDeviceInfo
()
const
{
deviceId
:
appCode
}
=
uni
.
getDeviceInfo
()
const
dto
=
new
RecordDto
({
const
dto
=
new
RecordDto
({
...
@@ -146,22 +146,26 @@ export default {
...
@@ -146,22 +146,26 @@ export default {
merchantId
:
shopMerchantId
,
merchantId
:
shopMerchantId
,
merchantName
,
merchantName
,
bussinessType
:
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
bussinessType
:
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType
:
channelType
||
1
//1问界 2 比亚迪 3 其他
channelType
:
channelType
||
1
,
//1问界 2 比亚迪 3 其他
})
})
this
.
sceneType
=
sceneType
this
.
sceneType
=
sceneType
this
.
tempRecord
=
dto
this
.
tempRecord
=
dto
},
},
updateCustomerInfo
(
customerInfo
=
{})
{
updateCustomerInfo
(
customerInfo
=
{})
{
const
{
customerName
,
phoneNumber
,
salesUuid
,
carModel
,
staffName
:
salesName
}
=
customerInfo
const
{
customerName
,
phoneNumber
,
salesUuid
,
carModel
,
staffName
:
salesName
,
carBrand
,
carBrandId
,
oneCarBrand
,
oneCarBrandId
}
=
customerInfo
this
.
record
.
updatePreRecords
({
this
.
record
.
updatePreRecords
({
customerName
,
customerName
,
phoneNumber
,
phoneNumber
,
carModel
,
carModel
,
salesUuid
,
salesUuid
,
salesName
salesName
,
carBrand
,
carBrandId
,
oneCarBrand
,
oneCarBrandId
})
})
},
},
updateBookList
(
booksList
)
{
updateBookList
(
booksList
)
{
const
receptionCustomerPaySourceList
=
booksList
.
map
(
item
=>
{
const
receptionCustomerPaySourceList
=
booksList
.
map
(
item
=>
{
return
{
return
{
id
:
item
.
id
,
id
:
item
.
id
,
...
@@ -171,7 +175,7 @@ export default {
...
@@ -171,7 +175,7 @@ export default {
})
})
this
.
record
.
updatePreRecords
({
receptionCustomerPaySourceList
})
this
.
record
.
updatePreRecords
({
receptionCustomerPaySourceList
})
},
},
updateMaterialPointList
(
receptionTrack
)
{
updateMaterialPointList
(
receptionTrack
)
{
const
{
merchantId
,
staffUuid
,
staffName
}
=
this
.
tempRecord
const
{
merchantId
,
staffUuid
,
staffName
}
=
this
.
tempRecord
let
receptionCustomerMaterialPointList
=
[]
let
receptionCustomerMaterialPointList
=
[]
Object
.
keys
(
receptionTrack
).
map
(
key
=>
{
Object
.
keys
(
receptionTrack
).
map
(
key
=>
{
...
@@ -185,17 +189,17 @@ export default {
...
@@ -185,17 +189,17 @@ export default {
})
})
this
.
record
.
updatePreRecords
({
receptionCustomerMaterialPointList
})
this
.
record
.
updatePreRecords
({
receptionCustomerMaterialPointList
})
},
},
updateReceptionStatus
(
status
)
{
updateReceptionStatus
(
status
)
{
this
.
record
.
updatePreRecords
({
receptionStatus
:
status
})
this
.
record
.
updatePreRecords
({
receptionStatus
:
status
})
},
},
getRecorder
()
{
getRecorder
()
{
return
this
.
record
return
this
.
record
},
},
async
triggleTempNumber
()
{
async
triggleTempNumber
()
{
const
_records
=
await
this
.
record
.
getRecords
()
const
_records
=
await
this
.
record
.
getRecords
()
this
.
setPerRecordNumber
(
_records
.
length
)
this
.
setPerRecordNumber
(
_records
.
length
)
},
},
async
isPermission
(
hintText
=
'为了记录语音通话,请打开录音权限'
)
{
async
isPermission
(
hintText
=
'为了记录语音通话,请打开录音权限'
)
{
const
result
=
await
permision
.
requestAndroidPermission
(
'android.permission.RECORD_AUDIO'
)
const
result
=
await
permision
.
requestAndroidPermission
(
'android.permission.RECORD_AUDIO'
)
await
helpler
.
sleep
(
0
)
await
helpler
.
sleep
(
0
)
if
(
result
!==
1
)
{
if
(
result
!==
1
)
{
...
@@ -206,13 +210,13 @@ export default {
...
@@ -206,13 +210,13 @@ export default {
}
}
return
result
===
1
return
result
===
1
},
},
async
checkBeforeStart
()
{
async
checkBeforeStart
()
{
const
isPermission
=
await
this
.
isPermission
()
const
isPermission
=
await
this
.
isPermission
()
const
isRecording
=
this
.
audioManager
.
isRecording
const
isRecording
=
this
.
audioManager
.
isRecording
return
isPermission
&&
!
isRecording
return
isPermission
&&
!
isRecording
}
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
stop
()
this
.
stop
()
this
.
reset
()
this
.
reset
()
}
}
...
...
mixin/report.js
View file @
d3bc6ce
...
@@ -3,7 +3,7 @@ export default {
...
@@ -3,7 +3,7 @@ export default {
return
{
return
{
goodsId
:
''
,
goodsId
:
''
,
visitsId
:
''
,
visitsId
:
''
,
source
:
1
source
:
''
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -15,22 +15,22 @@ export default {
...
@@ -15,22 +15,22 @@ export default {
methods
:
{
methods
:
{
addRecord
()
{
addRecord
()
{
const
{
shopMerchantId
:
merchantId
,
shopMerchantName
:
merchantName
}
=
uni
.
$storage
.
get
(
'userInfo'
)
const
{
shopMerchantId
:
merchantId
,
shopMerchantName
:
merchantName
}
=
uni
.
$storage
.
get
(
'userInfo'
)
if
(
!
merchantId
||
!
this
.
goodsId
)
return
if
(
!
merchantId
||
!
this
.
goodsId
)
return
const
params
=
{
const
params
=
{
goodsId
:
this
.
goodsId
,
goodsId
:
this
.
goodsId
,
goodsType
:
0
,
goodsType
:
0
,
merchantId
,
merchantId
,
merchantName
,
merchantName
,
searchSource
:
this
.
source
}
}
if
(
this
.
visitsId
)
params
.
visitsId
=
this
.
visitsId
if
(
this
.
visitsId
)
params
.
visitsId
=
this
.
visitsId
if
(
this
.
source
)
params
.
searchSource
=
this
.
source
uni
.
$api
.
commonApi
.
addRecord
(
params
).
then
(
res
=>
{
uni
.
$api
.
commonApi
.
addRecord
(
params
).
then
(
res
=>
{
this
.
addId
=
res
this
.
addId
=
res
})
})
}
}
},
},
onUnload
()
{
onUnload
()
{
if
(
!
this
.
addId
)
return
if
(
!
this
.
addId
)
return
const
params
=
{
const
params
=
{
id
:
this
.
addId
id
:
this
.
addId
}
}
...
...
pages/boutique/preview.vue
View file @
d3bc6ce
...
@@ -44,8 +44,10 @@
...
@@ -44,8 +44,10 @@
</view>
</view>
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
report
from
"@/mixin/report.js"
;
import
{
aiUrlMixin
,
report
}
from
'@/mixin/index.js'
export
default
{
export
default
{
mixins
:
[
report
,
aiUrlMixin
],
props
:
{
props
:
{
isComponents
:
Boolean
,
isComponents
:
Boolean
,
show
:
Boolean
,
show
:
Boolean
,
...
@@ -56,7 +58,7 @@ export default {
...
@@ -56,7 +58,7 @@ export default {
title
:
''
,
title
:
''
,
sourceType
:
''
,
sourceType
:
''
,
detailUrl
:
''
,
detailUrl
:
''
,
AIUrl
:
''
}
}
},
},
watch
:
{
watch
:
{
...
@@ -77,7 +79,6 @@ export default {
...
@@ -77,7 +79,6 @@ export default {
return
status
return
status
},
},
},
},
mixins
:
[
report
],
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
init
(
options
)
this
.
init
(
options
)
},
},
...
@@ -87,66 +88,13 @@ export default {
...
@@ -87,66 +88,13 @@ export default {
this
.
title
=
tabName
this
.
title
=
tabName
this
.
sourceType
=
sourceType
this
.
sourceType
=
sourceType
this
.
detailUrl
=
detailUrl
this
.
detailUrl
=
detailUrl
options
.
title
=
tabName
if
(
specialFlag
==
1
)
this
.
getAiagent
(
options
)
if
(
specialFlag
==
1
)
this
.
getAiagent
(
options
)
},
},
back
()
{
back
()
{
if
(
this
.
isComponents
)
this
.
$emit
(
'previewBack'
)
if
(
this
.
isComponents
)
this
.
$emit
(
'previewBack'
)
else
uni
.
navigateBack
()
else
uni
.
navigateBack
()
},
},
async
getAiagent
(
options
)
{
const
{
phone
}
=
uni
.
$storage
.
get
(
'userInfo'
),
[
data
]
=
await
uni
.
$api
.
sceneMarketApi
.
getAiagent
({
ownerShipType
:
1
,
accountPhone
:
phone
,
agentCode
:
'AI7'
//AI6
})
if
(
data
)
{
const
{
sceneType
,
uuid
,
phone
,
channelType
=
1
}
=
uni
.
$storage
.
get
(
'userInfo'
),
bussinessType
=
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
brand
=
{
1
:
'问界'
,
2
:
'比亚迪'
,
3
:
'其他'
}[
channelType
],
title
=
options
.
title
||
''
let
{
agentUrl
,
domainName
}
=
data
this
.
AIUrl
=
`
${
agentUrl
}
?no_header=1&business_type=
${
bussinessType
}
&phone=
${
phone
}
&brand=
${
brand
}
&one_id=
${
uuid
}
&platformType=1&domain=
${
domainName
}
&presuppositionProblem=
${
title
}
`
this
.
setWebviewStyle
()
}
else
uni
.
showToast
({
title
:
'获取智能体失败'
,
icon
:
'error'
})
},
setWebviewStyle
()
{
//修改UA为PC端
const
setWebviewStyleWithRetry
=
()
=>
{
const
currentWebview
=
this
.
$scope
.
$getAppWebview
()
const
[
wv1
]
=
currentWebview
.
children
()
let
wv1Flag
=
false
if
(
wv1
)
{
wv1
.
setStyle
({
left
:
'71.9%'
,
top
:
'17.18%'
,
height
:
'82.82%'
,
width
:
'28.3%'
});
wv2Flag
=
true
;
// 成功设置样式
}
return
wv1Flag
};
const
retrySetWebviewStyle
=
()
=>
{
if
(
!
setWebviewStyleWithRetry
())
{
// 如果未成功,继续重试
setTimeout
(
retrySetWebviewStyle
,
50
);
}
else
{
// 成功设置样式,结束循环
console
.
log
(
'Webview样式设置成功'
);
}
};
setTimeout
(
retrySetWebviewStyle
,
100
);
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/common/caseDetail.vue
View file @
d3bc6ce
...
@@ -176,14 +176,15 @@
...
@@ -176,14 +176,15 @@
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
AudioComponent
from
'./components/AudioComponent.vue'
import
AudioComponent
from
'./components/AudioComponent.vue'
import
report
from
"@/mixin/report.js"
;
import
{
aiUrlMixin
,
report
}
from
'@/mixin/index.js'
let
view_padding_top
=
88
,
let
view_padding_top
=
88
,
menuHeight
=
68
menuHeight
=
68
export
default
{
export
default
{
components
:
{
components
:
{
AudioComponent
AudioComponent
},
},
mixins
:
[
report
],
mixins
:
[
report
,
aiUrlMixin
],
data
()
{
data
()
{
return
{
return
{
detailInfo
:
[],
detailInfo
:
[],
...
@@ -196,7 +197,6 @@ export default {
...
@@ -196,7 +197,6 @@ export default {
caseObject
:
{},
caseObject
:
{},
imgLength
:
0
,
imgLength
:
0
,
contentScrollNumber
:
0
,
contentScrollNumber
:
0
,
AIUrl
:
''
,
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -404,60 +404,6 @@ export default {
...
@@ -404,60 +404,6 @@ export default {
if
(
this
.
imgLength
==
0
)
uni
.
hideLoading
()
if
(
this
.
imgLength
==
0
)
uni
.
hideLoading
()
this
.
initScrollListTop
()
this
.
initScrollListTop
()
},
},
async
getAiagent
(
options
)
{
const
{
phone
}
=
uni
.
$storage
.
get
(
'userInfo'
),
[
data
]
=
await
uni
.
$api
.
sceneMarketApi
.
getAiagent
({
ownerShipType
:
1
,
accountPhone
:
phone
,
agentCode
:
'AI7'
//AI6
})
if
(
data
)
{
const
{
sceneType
,
uuid
,
phone
,
channelType
=
1
}
=
uni
.
$storage
.
get
(
'userInfo'
),
bussinessType
=
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
brand
=
{
1
:
'问界'
,
2
:
'比亚迪'
,
3
:
'其他'
}[
channelType
],
title
=
options
.
title
||
''
let
{
agentUrl
,
domainName
}
=
data
this
.
AIUrl
=
`
${
agentUrl
}
?no_header=1&business_type=
${
bussinessType
}
&phone=
${
phone
}
&brand=
${
brand
}
&one_id=
${
uuid
}
&platformType=1&domain=
${
domainName
}
&presuppositionProblem=
${
title
}
`
this
.
setWebviewStyle
()
}
else
uni
.
showToast
({
title
:
'获取智能体失败'
,
icon
:
'error'
})
},
setWebviewStyle
()
{
//修改UA为PC端
const
setWebviewStyleWithRetry
=
()
=>
{
const
currentWebview
=
this
.
$scope
.
$getAppWebview
()
const
[
wv1
]
=
currentWebview
.
children
()
let
wv1Flag
=
false
if
(
wv1
)
{
wv1
.
setStyle
({
left
:
'71.9%'
,
top
:
'17.18%'
,
height
:
'82.82%'
,
width
:
'28.3%'
});
wv2Flag
=
true
;
// 成功设置样式
}
return
wv1Flag
};
const
retrySetWebviewStyle
=
()
=>
{
if
(
!
setWebviewStyleWithRetry
())
{
// 如果未成功,继续重试
setTimeout
(
retrySetWebviewStyle
,
50
);
}
else
{
// 成功设置样式,结束循环
console
.
log
(
'Webview样式设置成功'
);
}
};
setTimeout
(
retrySetWebviewStyle
,
100
);
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/common/materialDetail/index.vue
View file @
d3bc6ce
...
@@ -26,19 +26,20 @@
...
@@ -26,19 +26,20 @@
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
report
from
"@/mixin/report.js"
;
import
{
aiUrlMixin
,
report
}
from
'@/mixin/index.js'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
mixins
:
[
report
],
mixins
:
[
report
,
aiUrlMixin
],
data
()
{
data
()
{
return
{
return
{
url
:
''
,
url
:
''
,
viewerUrl
:
'/hybrid/html/web/viewer.html'
,
viewerUrl
:
Object
.
freeze
(
'/hybrid/html/web/viewer.html'
)
,
AIUrl
:
''
,
AIUrl
:
''
,
title
:
''
title
:
''
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
)
if
(
options
.
fileUrl
)
this
.
url
=
`
${
this
.
viewerUrl
}
?file=
${
options
.
fileUrl
}
`
if
(
options
.
fileUrl
)
this
.
url
=
`
${
this
.
viewerUrl
}
?file=
${
options
.
fileUrl
}
`
else
this
.
url
=
options
.
url
else
this
.
url
=
options
.
url
if
(
options
.
title
)
this
.
title
=
options
.
title
if
(
options
.
title
)
this
.
title
=
options
.
title
...
@@ -54,70 +55,6 @@ export default {
...
@@ -54,70 +55,6 @@ export default {
animationDuration
:
100
animationDuration
:
100
})
})
},
},
async
getAiagent
(
options
)
{
const
{
phone
}
=
uni
.
$storage
.
get
(
'userInfo'
),
[
data
]
=
await
uni
.
$api
.
sceneMarketApi
.
getAiagent
({
ownerShipType
:
1
,
accountPhone
:
phone
,
agentCode
:
'AI7'
//AI6
})
if
(
data
)
{
const
{
sceneType
,
uuid
,
phone
,
channelType
=
1
}
=
uni
.
$storage
.
get
(
'userInfo'
),
bussinessType
=
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
brand
=
{
1
:
'问界'
,
2
:
'比亚迪'
,
3
:
'其他'
}[
channelType
],
title
=
options
.
title
||
''
let
{
agentUrl
,
domainName
}
=
data
this
.
AIUrl
=
`
${
agentUrl
}
?no_header=1&business_type=
${
bussinessType
}
&phone=
${
phone
}
&brand=
${
brand
}
&one_id=
${
uuid
}
&platformType=1&domain=
${
domainName
}
&presuppositionProblem=
${
title
}
`
this
.
setWebviewStyle
()
}
else
uni
.
showToast
({
title
:
'获取智能体失败'
,
icon
:
'error'
})
},
setWebviewStyle
()
{
//修改UA为PC端
const
setWebviewStyleWithRetry
=
()
=>
{
const
currentWebview
=
this
.
$scope
.
$getAppWebview
()
const
[
wv1
,
wv2
]
=
currentWebview
.
children
()
let
wv1Flag
=
false
,
wv2Flag
=
false
if
(
wv1
)
{
wv1
.
setStyle
({
left
:
'0'
,
top
:
'9.37%'
,
height
:
'90.63%'
,
width
:
'71.36%'
});
wv1Flag
=
true
;
// 成功设置样式
}
if
(
wv2
)
{
wv2
.
setStyle
({
left
:
'71.9%'
,
top
:
'17.18%'
,
height
:
'82.82%'
,
width
:
'28.3%'
});
wv2Flag
=
true
;
// 成功设置样式
}
return
wv1Flag
&&
wv2Flag
};
const
retrySetWebviewStyle
=
()
=>
{
if
(
!
setWebviewStyleWithRetry
())
{
// 如果未成功,继续重试
setTimeout
(
retrySetWebviewStyle
,
50
);
}
else
{
// 成功设置样式,结束循环
console
.
log
(
'Webview样式设置成功'
);
}
};
setTimeout
(
retrySetWebviewStyle
,
100
);
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/common/receptionDetail/index.vue
View file @
d3bc6ce
...
@@ -99,10 +99,7 @@
...
@@ -99,10 +99,7 @@
v-if=
"AIUrl"
v-if=
"AIUrl"
>
>
<view
class=
"AI-title flex"
>
AI导师
</view>
<view
class=
"AI-title flex"
>
AI导师
</view>
<web-view
<web-view
:src=
"AIUrl"
></web-view>
:src=
"AIUrl"
class=
"webview"
></web-view>
</view>
</view>
<
template
v-else
>
<
template
v-else
>
<view
class=
"nothing flex"
>
<view
class=
"nothing flex"
>
...
@@ -374,7 +371,7 @@ export default {
...
@@ -374,7 +371,7 @@ export default {
url
=
`
${
agentUrl
}
?no_header=1&business_type=
${
bussinessType
}
&phone=
${
phone
}
&brand=
${
brand
}
&one_id=
${
uuid
}
&platformType=1&domain=
${
domainName
}
&presuppositionProblem=
${
title
}
`
url
=
`
${
agentUrl
}
?no_header=1&business_type=
${
bussinessType
}
&phone=
${
phone
}
&brand=
${
brand
}
&one_id=
${
uuid
}
&platformType=1&domain=
${
domainName
}
&presuppositionProblem=
${
title
}
`
if
(
checkDate
)
url
+=
`&date=
${
checkDate
}
`
if
(
checkDate
)
url
+=
`&date=
${
checkDate
}
`
if
(
taskStatus
)
url
+=
`&practice_status=
${
taskStatus
}
`
if
(
taskStatus
)
url
+=
`&practice_status=
${
taskStatus
}
`
//
this.AIUrl = url
this
.
AIUrl
=
url
this
.
setWebviewStyle
()
this
.
setWebviewStyle
()
}
else
uni
.
showToast
({
}
else
uni
.
showToast
({
title
:
'获取智能体失败'
,
title
:
'获取智能体失败'
,
...
@@ -395,7 +392,6 @@ export default {
...
@@ -395,7 +392,6 @@ export default {
top
:
'16.65%'
,
top
:
'16.65%'
,
height
:
'78.17%'
,
height
:
'78.17%'
,
width
:
'56.52%'
,
width
:
'56.52%'
,
// margin: '0 0 1% 0'
});
});
return
true
;
// 成功设置样式
return
true
;
// 成功设置样式
}
else
{
}
else
{
...
@@ -620,24 +616,20 @@ export default {
...
@@ -620,24 +616,20 @@ export default {
opacity
:
1
;
opacity
:
1
;
background
:
#f5f9ff
;
background
:
#f5f9ff
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
overflow-y
:
auto
;
position
:
relative
;
.AI-window
{
.AI-window
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
.AI-title
{
.AI-title
{
height
:
96
rpx
;
height
:
96
rpx
;
font-size
:
36
rpx
;
font-size
:
36
rpx
;
font-weight
:
500
;
font-weight
:
500
;
justify-content
:
center
;
justify-content
:
center
;
color
:
#333333
;
color
:
#333333
;
}
}
.webview
{
iframe
{
border-radius
:
0
0
32
rpx
32
rpx
;
overflow
:
hidden
;
}
}
}
}
.nothing
{
.nothing
{
width
:
100%
;
width
:
100%
;
...
...
pages/equity/index.vue
View file @
d3bc6ce
...
@@ -115,6 +115,7 @@ export default {
...
@@ -115,6 +115,7 @@ export default {
subBrandIdList
=
[]
subBrandIdList
=
[]
list
?.
map
(
e
=>
{
list
?.
map
(
e
=>
{
e
.
childs
.
map
(
i
=>
{
e
.
childs
.
map
(
i
=>
{
i
.
brandName
=
e
.
name
i
.
brandId
=
e
.
id
i
.
brandId
=
e
.
id
carBrandList
.
push
(
i
)
carBrandList
.
push
(
i
)
subBrandIdList
.
push
(
i
.
id
)
subBrandIdList
.
push
(
i
.
id
)
...
...
store/modules/user.js
View file @
d3bc6ce
...
@@ -20,8 +20,10 @@ export default {
...
@@ -20,8 +20,10 @@ export default {
staffName
:
""
,
staffName
:
""
,
newCarFare
:
''
,
newCarFare
:
''
,
carModelId
:
''
,
carModelId
:
''
,
carBuyers
:
''
,
carBuyers
:
''
,
carPurchaseMethod
:
''
carPurchaseMethod
:
''
,
oneCarBrand
:
''
,
oneCarBrandId
:
''
},
},
historyStatus
:
Date
.
now
(),
historyStatus
:
Date
.
now
(),
carBrands
:
[],
carBrands
:
[],
...
@@ -32,11 +34,11 @@ export default {
...
@@ -32,11 +34,11 @@ export default {
receptionTrack
:
{},
//接待记录埋点
receptionTrack
:
{},
//接待记录埋点
boutiqueDefaultCarBrandId
:
''
,
boutiqueDefaultCarBrandId
:
''
,
viewKey
:
Date
.
now
(),
viewKey
:
Date
.
now
(),
boutiqueCarList
:[],
boutiqueCarList
:
[],
receptionKey
:
Date
.
now
(),
//接待记录埋点KEY
receptionKey
:
Date
.
now
(),
//接待记录埋点KEY
defaultCarId
:
''
,
defaultCarId
:
''
,
customerKey
:
Date
.
now
(),
//客户信息KEY
customerKey
:
Date
.
now
(),
//客户信息KEY
currentCarInfo
:{},
//当前选中的车品牌车系
currentCarInfo
:
{},
//当前选中的车品牌车系
};
};
},
},
mutations
:
{
mutations
:
{
...
@@ -60,7 +62,12 @@ export default {
...
@@ -60,7 +62,12 @@ export default {
phoneNumber
:
""
,
phoneNumber
:
""
,
salesUuid
:
""
,
salesUuid
:
""
,
staffName
:
""
,
staffName
:
""
,
newCarFare
:
''
newCarFare
:
''
,
carModelId
:
''
,
carBuyers
:
''
,
carPurchaseMethod
:
''
,
oneCarBrand
:
''
,
oneCarBrandId
:
''
};
};
uni
.
$storage
.
set
(
"customerInfo"
,
JSON
.
stringify
(
info
));
uni
.
$storage
.
set
(
"customerInfo"
,
JSON
.
stringify
(
info
));
state
.
customerInfo
=
info
state
.
customerInfo
=
info
...
@@ -98,7 +105,7 @@ export default {
...
@@ -98,7 +105,7 @@ export default {
state
.
receptionTrack
=
{}
state
.
receptionTrack
=
{}
state
.
receptionKey
=
Date
.
now
()
state
.
receptionKey
=
Date
.
now
()
},
},
updateViewKey
({
state
})
{
updateViewKey
({
state
})
{
state
.
viewKey
=
Date
.
now
();
state
.
viewKey
=
Date
.
now
();
},
},
...
...
utils/DBManager.js
View file @
d3bc6ce
...
@@ -19,7 +19,34 @@ class DBManager {
...
@@ -19,7 +19,34 @@ class DBManager {
db_table_name
=
'records'
db_table_name
=
'records'
db_description
=
'zyzs db'
db_description
=
'zyzs db'
db_size
=
50
*
1024
*
1024
db_size
=
50
*
1024
*
1024
table_columns
=
[
`id TEXT PRIMARY KEY`
,
`staffUuid TEXT`
,
`staffName TEXT`
,
`serviceMerchantId INTEGER`
,
'carModel TEXT'
,
'endReasonType INTEGER'
,
'customerName TEXT'
,
'phoneNumber TEXT'
,
'appCode TEXT'
,
'loginPhone TEXT'
,
'salesName TEXT'
,
'salesUuid TEXT'
,
'receptionStatus INTEGER'
,
'receptionStartTime TEXT'
,
'receptionEndTime TEXT'
,
'receptionCustomerPaySourceList TEXT'
,
'merchantId INTEGER'
,
'merchantName TEXT'
,
'bussinessType INTEGER'
,
'channelType INTEGER'
,
'receptionCustomerMaterialPointList TEXT'
,
'recordUrlList TEXT'
]
table_columns
=
[
`id TEXT PRIMARY KEY`
,
`staffUuid TEXT`
,
`staffName TEXT`
,
`serviceMerchantId INTEGER`
,
'carModel TEXT'
,
'endReasonType INTEGER'
,
'customerName TEXT'
,
'phoneNumber TEXT'
,
'appCode TEXT'
,
'loginPhone TEXT'
,
'salesName TEXT'
,
'salesUuid TEXT'
,
'receptionStatus INTEGER'
,
'receptionStartTime TEXT'
,
'receptionEndTime TEXT'
,
'receptionCustomerPaySourceList TEXT'
,
'merchantId INTEGER'
,
'merchantName TEXT'
,
'bussinessType INTEGER'
,
'channelType INTEGER'
,
'receptionCustomerMaterialPointList TEXT'
,
'recordUrlList TEXT'
,
'carBrand TEXT'
,
'carBrandId INTEGER'
,
'oneCarBrand TEXT'
,
'oneCarBrandId INTEGER'
]
sqlite
=
null
sqlite
=
null
isTableExists
=
false
isTableExists
=
false
constructor
(
table_name
,
table_columns
)
{
constructor
(
table_name
,
table_columns
)
{
...
@@ -27,7 +54,7 @@ class DBManager {
...
@@ -27,7 +54,7 @@ class DBManager {
this
.
table_columns
=
table_columns
||
this
.
table_columns
this
.
table_columns
=
table_columns
||
this
.
table_columns
this
.
db
=
new
SQLite
(
this
.
db_name
,
this
.
db_version
,
this
.
db_description
,
this
.
db_size
)
this
.
db
=
new
SQLite
(
this
.
db_name
,
this
.
db_version
,
this
.
db_description
,
this
.
db_size
)
}
}
async
init
()
{
async
init
()
{
try
{
try
{
const
isOpen
=
await
this
.
db
.
isOpen
()
const
isOpen
=
await
this
.
db
.
isOpen
()
if
(
!
isOpen
)
{
if
(
!
isOpen
)
{
...
@@ -43,7 +70,7 @@ class DBManager {
...
@@ -43,7 +70,7 @@ class DBManager {
throw
new
Error
(
error
.
message
)
throw
new
Error
(
error
.
message
)
}
}
}
}
async
openDB
()
{
async
openDB
()
{
}
}
/**
/**
...
@@ -52,7 +79,7 @@ class DBManager {
...
@@ -52,7 +79,7 @@ class DBManager {
* @param {Object} record - 要添加的新记录对象
* @param {Object} record - 要添加的新记录对象
* @returns {Array} - 包含新记录的更新后的记录列表
* @returns {Array} - 包含新记录的更新后的记录列表
*/
*/
async
addRecord
(
record
)
{
async
addRecord
(
record
)
{
await
this
.
db
.
insert
(
this
.
table_name
,
record
)
await
this
.
db
.
insert
(
this
.
table_name
,
record
)
}
}
/**
/**
...
@@ -61,7 +88,7 @@ class DBManager {
...
@@ -61,7 +88,7 @@ class DBManager {
* @param {number} id - 要移除的记录的ID
* @param {number} id - 要移除的记录的ID
* @returns {Array} - 移除记录后的更新后的记录列表
* @returns {Array} - 移除记录后的更新后的记录列表
*/
*/
async
removeRecord
(
id
)
{
async
removeRecord
(
id
)
{
return
this
.
db
.
delete
(
this
.
table_name
,
{
id
})
return
this
.
db
.
delete
(
this
.
table_name
,
{
id
})
}
}
/**
/**
...
@@ -71,7 +98,7 @@ class DBManager {
...
@@ -71,7 +98,7 @@ class DBManager {
* @returns {Object} - 具有给定 ID 的记录对象,如果没有找到符合条件的记录,则返回 undefined
* @returns {Object} - 具有给定 ID 的记录对象,如果没有找到符合条件的记录,则返回 undefined
*
*
*/
*/
async
getRecordById
(
id
)
{
async
getRecordById
(
id
)
{
const
records
=
await
this
.
db
.
select
(
this
.
table_name
,
{
id
})
const
records
=
await
this
.
db
.
select
(
this
.
table_name
,
{
id
})
return
Array
.
isArray
(
records
)
?
records
[
0
]
:
records
// sqlite 返回数组
return
Array
.
isArray
(
records
)
?
records
[
0
]
:
records
// sqlite 返回数组
}
}
...
@@ -80,7 +107,7 @@ class DBManager {
...
@@ -80,7 +107,7 @@ class DBManager {
*
*
* @returns {Array} - 从 storageApi 获取的记录列表
* @returns {Array} - 从 storageApi 获取的记录列表
*/
*/
async
getRecords
()
{
async
getRecords
()
{
return
this
.
db
.
select
(
this
.
table_name
)
return
this
.
db
.
select
(
this
.
table_name
)
}
}
/**
/**
...
@@ -89,7 +116,7 @@ class DBManager {
...
@@ -89,7 +116,7 @@ class DBManager {
* @param {Array} records - 要设置的记录列表
* @param {Array} records - 要设置的记录列表
* @returns {void} - 此函数不返回任何值
* @returns {void} - 此函数不返回任何值
*/
*/
async
setRecords
(
records
)
{
async
setRecords
(
records
)
{
return
records
.
forEach
(
async
record
=>
{
return
records
.
forEach
(
async
record
=>
{
this
.
addRecord
(
record
)
this
.
addRecord
(
record
)
})
})
...
@@ -102,17 +129,17 @@ class DBManager {
...
@@ -102,17 +129,17 @@ class DBManager {
* @param {Object} record - 要更新的记录对象,必须包含一个唯一的 id 属性
* @param {Object} record - 要更新的记录对象,必须包含一个唯一的 id 属性
* @throws {Error} 如果记录数组中找不到具有给定 id 的记录,将抛出错误
* @throws {Error} 如果记录数组中找不到具有给定 id 的记录,将抛出错误
*/
*/
async
updateRecord
(
setData
,
where
)
{
async
updateRecord
(
setData
,
where
)
{
const
{
id
,
...
record
}
=
setData
const
{
id
,
...
record
}
=
setData
if
(
!
where
)
{
if
(
!
where
)
{
where
=
{
id
}
where
=
{
id
}
}
}
return
this
.
db
.
update
(
this
.
table_name
,
record
,
where
)
return
this
.
db
.
update
(
this
.
table_name
,
record
,
where
)
}
}
async
isOpen
()
{
async
isOpen
()
{
return
this
.
db
.
isOpen
()
return
this
.
db
.
isOpen
()
}
}
async
isTableExists
()
{
async
isTableExists
()
{
return
this
.
db
.
isTableExists
(
this
.
table_name
)
return
this
.
db
.
isTableExists
(
this
.
table_name
)
}
}
/**
/**
...
@@ -120,10 +147,10 @@ class DBManager {
...
@@ -120,10 +147,10 @@ class DBManager {
*
*
* @returns {void} - 此函数不返回任何值
* @returns {void} - 此函数不返回任何值
*/
*/
async
clearRecords
()
{
async
clearRecords
()
{
this
.
db
.
delete
(
this
.
table_name
)
this
.
db
.
delete
(
this
.
table_name
)
}
}
async
drop
()
{
async
drop
()
{
this
.
db
.
drop
(
this
.
table_name
)
this
.
db
.
drop
(
this
.
table_name
)
}
}
}
}
...
...
utils/recordManager/RecordDto.js
View file @
d3bc6ce
...
@@ -28,6 +28,11 @@ export default class RecordDto {
...
@@ -28,6 +28,11 @@ export default class RecordDto {
bussinessType
=
0
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
bussinessType
=
0
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType
=
1
//1问界 2 比亚迪 3 其他
channelType
=
1
//1问界 2 比亚迪 3 其他
receptionCustomerMaterialPointList
=
[]
receptionCustomerMaterialPointList
=
[]
carBrand
=
''
carBrandId
=
''
oneCarBrand
=
''
oneCarBrandId
=
''
constructor
(
options
)
{
constructor
(
options
)
{
Object
.
assign
(
this
,
options
)
Object
.
assign
(
this
,
options
)
}
}
...
...
utils/recordManager/dbRecord.js
View file @
d3bc6ce
...
@@ -9,7 +9,35 @@
...
@@ -9,7 +9,35 @@
*/
*/
import
DBManager
from
'../DBManager.js'
import
DBManager
from
'../DBManager.js'
class
DBRecord
{
class
DBRecord
{
table_columns
=
[
`id TEXT PRIMARY KEY`
,
`staffUuid TEXT`
,
`staffName TEXT`
,
`serviceMerchantId INTEGER`
,
'carModel TEXT'
,
'endReasonType INTEGER'
,
'customerName TEXT'
,
'phoneNumber TEXT'
,
'appCode TEXT'
,
'loginPhone TEXT'
,
'salesName TEXT'
,
'salesUuid TEXT'
,
'receptionStatus INTEGER'
,
'receptionStartTime TEXT'
,
'receptionEndTime TEXT'
,
'receptionCustomerPaySourceList TEXT'
,
'merchantId INTEGER'
,
'merchantName TEXT'
,
'bussinessType INTEGER'
,
'channelType INTEGER'
,
'receptionCustomerMaterialPointList TEXT'
,
'recordUrlList TEXT'
,
'tempFilePath TEXT'
]
table_columns
=
[
`id TEXT PRIMARY KEY`
,
`staffUuid TEXT`
,
`staffName TEXT`
,
`serviceMerchantId INTEGER`
,
'carModel TEXT'
,
'endReasonType INTEGER'
,
'customerName TEXT'
,
'phoneNumber TEXT'
,
'appCode TEXT'
,
'loginPhone TEXT'
,
'salesName TEXT'
,
'salesUuid TEXT'
,
'receptionStatus INTEGER'
,
'receptionStartTime TEXT'
,
'receptionEndTime TEXT'
,
'receptionCustomerPaySourceList TEXT'
,
'merchantId INTEGER'
,
'merchantName TEXT'
,
'bussinessType INTEGER'
,
'channelType INTEGER'
,
'receptionCustomerMaterialPointList TEXT'
,
'recordUrlList TEXT'
,
'tempFilePath TEXT'
,
'carBrand TEXT'
,
'carBrandId INTEGER'
,
'oneCarBrand TEXT'
,
'oneCarBrandId INTEGER'
]
table_name
=
'temp_records'
table_name
=
'temp_records'
constructor
()
{
constructor
()
{
this
.
db
=
new
DBManager
(
this
.
table_name
,
this
.
table_columns
)
this
.
db
=
new
DBManager
(
this
.
table_name
,
this
.
table_columns
)
...
...
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