Commit bfd7135d by 胡悦

Merge branch 'SAAS+V4.42' of http://192.168.3.233:8090/saas_plus/dj-car-boutique…

…-work-wechat into SAAS+V4.42
2 parents 44861abd 58b3db81
Showing 31 changed files with 333 additions and 138 deletions
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 4;
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -58,7 +58,8 @@ export default {
data,
[],
"/router/get/voice/config/1.0.0",
"AI"
"AI",
false
);
},
getSensitive(data = {}) {
......@@ -67,7 +68,8 @@ export default {
data,
[],
"/router/is/sensitive/1.0.0",
"AI"
"AI",
false
);
},
//同义化话术
......@@ -77,7 +79,8 @@ export default {
data,
[],
"/router/similar/phrases/1.0.0",
"AI"
"AI",
false
);
},
......@@ -88,7 +91,8 @@ export default {
data,
[],
"/router/get/voice/to/text/1.0.0",
"AI"
"AI",
false
);
},
/**
......
......@@ -76,10 +76,11 @@ Page({
if (list.length == 0) {
return this.back();
}
let isJump = true;
let isJump = true,Sentences = [];
list.forEach((i) => {
if (i.role == 2) {
isJump = false;
Sentences = [...Sentences, ...i.Sentences?i.Sentences:[]]
}
});
if (isJump) {
......@@ -89,16 +90,22 @@ Page({
wx.$util.showToast("AI还未回复");
return;
}
if(Sentences.length == 0) {
wx.$util.showToast("对话内容太短");
return;
}
const chatList = JSON.stringify(audioBox.data.list);
wx.setStorageSync("chatList", chatList);
const {
batch_id,
roleType,
step,
sparringTaskId
sparringTaskId,
entry
} = this.data;
console.log(entry)
wx.redirectTo({
url: `/packageEquity/pages/aiCheck/result/result?roleType=${roleType}&duration=${duration}&history_message=${history_message}&batch_id=${batch_id}&sparringLink=${step}&sparringTaskId=${sparringTaskId}`,
url: `/packageEquity/pages/aiCheck/result/result?roleType=${roleType}&duration=${duration}&history_message=${history_message}&batch_id=${batch_id}&sparringLink=${step}&sparringTaskId=${sparringTaskId}&entry=${entry}`,
});
},
toBottom() {
......@@ -137,6 +144,7 @@ Page({
wx.$util.showToast("语音还未识别");
return;
}
this.data.isSend = false;
const addVal = {
role: 1,
content: "",
......@@ -149,6 +157,7 @@ Page({
message
})
const content = Phrases.similar_words
this.data.isSend = true;
audioBox.setList({
content,
times: Math.ceil(content.length / 4),
......@@ -368,7 +377,7 @@ Page({
});
},
//提供相应的建议
getSparring(user_message) {
getSparring(user_message,retryCount = 0) {
const {
step,
reject_reason,
......@@ -387,7 +396,9 @@ Page({
content: ""
};
const audioBox = this.selectComponent("#audioBox");
audioBox.addList(addVal);
if(retryCount == 0) {
audioBox.addList(addVal);
}
const {
uuid
} = wx.$util.getUserInfo();
......@@ -414,7 +425,7 @@ Page({
} = res;
console.log('batch_id', batch_id, 'uuid', uuid)
audioBox.setList({
content: sale_message,
content: sale_message.replace(/,/g,','),
times: Math.ceil(sale_message.length / 4),
spkTime: new Date().format("yyyy-MM-dd hh:mm:ss"),
},
......@@ -435,6 +446,10 @@ Page({
defense_step,
step: next_step,
});
}).catch(e=>{
if (retryCount < 1) { // 如果重试次数小于1,则重试一次
this.getSparring(user_message, retryCount + 1);
}
});
},
handleShow(e) {
......@@ -527,7 +542,8 @@ Page({
roleType: type,
stage,
roleName: name,
isDemo
isDemo,
entry
} = options;
let params = {
roleType: type,
......@@ -536,6 +552,10 @@ Page({
params = {
roleName: name.replace('客户',''),
};
this.setData({entry:'other'})
}
if(entry == 'other') {
this.setData({entry:'other'})
}
const roleInfo = await carLifeApi.sparringRole({
currentPage: 1,
......
......@@ -51,9 +51,12 @@
font-weight: 500;
font-size: 28rpx;
color: #3989FE;
&:last-child {
margin-left: auto;;
margin-left: auto;
;
}
.suggest-icon {
width: 32rpx;
height: 32rpx;
......@@ -129,6 +132,7 @@
display: flex;
justify-content: flex-end;
margin-bottom: 32rpx;
.defense-box {
display: flex;
width: 560rpx;
......@@ -139,13 +143,15 @@
box-sizing: border-box;
border-radius: 16rpx;
border: 2rpx solid #B2C6FE;
.defense-img {
width: 56rpx;
height: 56rpx;
margin-right: 12rpx;
image {
width: 56rpx;
height: 56rpx;
height: 56rpx;
}
}
......@@ -191,16 +197,20 @@
height: 14rpx;
border-radius: 50%;
margin-right: 24rpx;
animation: load 1s ease-in infinite;
&.first {
animation-delay:0.13s;
background-color: rgba(57, 137, 254, 0.3);
}
&.second {
animation-delay:0.26s;
background-color: rgba(57, 137, 254, 0.5);
}
&.third {
animation-delay:0.39s;
background-color: rgba(57, 137, 254, 0.7);
}
}
......@@ -217,6 +227,11 @@
background: #fff;
border-radius: 37rpx 37rpx 37rpx 0;
&.loadding-box {
width: 154rpx;
border-radius: 37rpx 37rpx 37rpx 0;
}
.wifi-circle {
border: 5rpx solid #666;
}
......@@ -232,4 +247,13 @@
width: 40rpx;
height: 40rpx;
}
}
@keyframes load {
0% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
\ No newline at end of file
......@@ -30,7 +30,7 @@
<text>{{item.times}}"</text>
</view>
</view>
<view class="audio-left" wx:else>
<view class="audio-left loadding-box" wx:else>
<view class="first loadding"></view>
<view class="second loadding"></view>
<view class="third loadding"></view>
......
......@@ -162,16 +162,19 @@
height: 14rpx;
border-radius: 50%;
margin-right: 24rpx;
animation: load 1s ease-in infinite;
&.first {
animation-delay:0.13s;
background-color: rgba(57, 137, 254, 0.3);
}
&.second {
animation-delay:0.26s;
background-color: rgba(57, 137, 254, 0.5);
}
&.third {
animation-delay:0.39s;
background-color: rgba(57, 137, 254, 0.7);
}
}
......@@ -180,4 +183,12 @@
margin-top: 16rpx;
font-size: 28rpx;
color: #999999;
}
@keyframes load {
0% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
\ No newline at end of file
<pop-up class="scene-popup" bindcancel="cancel" bindmask="handleMask" hasClose="{{config.hasClose[popType]}}" title="{{config.titleObj[popType]}}" show="{{show}}" height="{{config.heightObj[popType]}}">
<pop-up class="scene-popup" bindcancel="cancel" bindmask="handleMask" hasClose="{{config.hasClose[popType]}}"
title="{{config.titleObj[popType]}}" show="{{show}}" height="{{config.heightObj[popType]}}">
<block wx:if="{{popType == 'scene'}}">
<view class="popup-discription">客户类型</view>
<view class="customer-list">
<block wx:for="{{customeTypeList}}" wx:key="{{item.id}}">
<view class="customer-item {{index === selectedIndex ? 'selected' : ''}}" bindtap="selectCustomerType" data-index="{{index}}">
<view class="customer-item {{index === selectedIndex ? 'selected' : ''}}" bindtap="selectCustomerType"
data-index="{{index}}">
<gl-image class="avatar" src="/avatar/{{item.imgUrl}}.png"></gl-image>
<view>{{item.name}}</view>
</view>
......@@ -22,22 +24,21 @@
</view>
<view class="inspiration-content">
<scroll-view scroll-y class="inspiration-scroll">
<view class="inspiration-loadding" wx:if="{{!content}}">
<view class="first loadding"></view>
<view class="second loadding"></view>
<view class="third loadding"></view>
</view>
<view class="content">{{content}}</view>
</scroll-view>
<view class="inspiration-loadding" wx:if="{{!content}}">
<view class="first loadding"></view>
<view class="second loadding"></view>
<view class="third loadding"></view>
</view>
</view>
<view wx:if="{{!content}}" class="loadding-text">对话灵感生成中...</view>
</view>
</block>
<block wx:if="{{popType == 'script'}}">
<view class="script-pop">
<view class="describe">可选择具体的攻防场景来模拟对练</view>
<view class="list">
<block wx:for="{{scriptList}}" wx:key="index" >
<block wx:for="{{scriptList}}" wx:key="index">
<view class="item" bindtap="selectScript" data-index="{{index}}" data-content="{{item.content}}">
<image class="avatar" src="{{avatar}}"></image>
<view class="content">
......
......@@ -89,6 +89,7 @@ Component({
activeIndex: index,
scrollTop: 0
})
this.onPause()
},
play() {
const {
......
......@@ -28,12 +28,17 @@ Page({
},
again() {
const {
id
id,
entry
} = this.data;
if (id) {
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene`,
});
} else if(entry == 'other'){
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene`,
});
} else {
wx.navigateBack({
delta: 2,
......@@ -46,6 +51,13 @@ Page({
backHome() {
const pages = getCurrentPages();
const prevPage = pages[pages.length - 3];
const {entry} = this.data
if(entry == 'other'){
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/start/start`,
});
return
}
if (prevPage.route == "packageEquity/pages/aiCheck/start/start") {
wx.navigateBack({
delta: 2,
......@@ -67,7 +79,8 @@ Page({
reportItem,
currentItem,
id,
avatar
avatar,
entry
}) => {
console.log(currentItem)
// this.setTitle(0);
......@@ -80,6 +93,7 @@ Page({
id,
reportItems,
avatar,
entry,
title: currentItem.reportItem
});
})
......
......@@ -110,19 +110,32 @@ Page({
},
again() {
const {
id
id,
entry
} = this.data;
if (id) {
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene`,
});
} else {
} else if(entry == 'other'){
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene`,
});
}else {
wx.$router.back();
}
},
backHome() {
const pages = getCurrentPages();
const prevPage = pages[pages.length - 2];
const {entry} = this.data
console.log(entry,'entry')
if(entry == 'other'){
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/start/start`,
});
return
}
if (prevPage.route == "packageEquity/pages/aiCheck/start/start") {
wx.navigateBack({
delta: 1,
......@@ -176,9 +189,11 @@ Page({
id,
sparringLink,
sparringTaskId,
entry
} = options;
this.setData({
id,
entry,
roleType,
sparringLink,
sparringTaskId,
......@@ -537,12 +552,16 @@ Page({
} = e.currentTarget.dataset, {
reportItem,
avatar,
score,
id,
entry
} = this.data
if(score == null) return
wx.$router.go("/packageEquity/pages/aiCheck/detail/detail", {
reportItem,
avatar,
id,
entry,
currentItem: item
})
},
......
......@@ -208,19 +208,22 @@ page {
margin: 0 auto;
position: relative;
overflow: hidden;
@keyframes rotateArc {
100% {
transform:translate(-50%,-50%) rotate(0deg);
}
transform: translate(-50%, -50%) rotate(0deg);
}
}
.loading-box {
width: 300rpx;
height: 300rpx;
transform:translate(-50%,-50%) rotate(360deg);
transform: translate(-50%, -50%) rotate(360deg);
animation: rotateArc 45s infinite linear;
position: absolute;
left: 50%;
top: 50%;
&::before {
position: absolute;
content: "";
......@@ -255,11 +258,13 @@ page {
animation: rotate 3s infinite ease-in-out;
}
}
@keyframes rotate {
100% {
transform: rotate(0deg);
transform: rotate(0deg);
}
}
}
.canvas {
width: 100%;
height: 100%;
......@@ -297,15 +302,6 @@ page {
margin-top: 24rpx;
height: 448rpx;
.score-bg {
width: 432rpx;
height: 432rpx;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
z-index: -1;
}
.categories {
.title {
......@@ -325,6 +321,7 @@ page {
transform: rotate(-45deg);
}
}
}
.categories-1 {
......@@ -359,11 +356,25 @@ page {
}
}
.pending {
.title {
color: #999EA8 !important;
&::after {
display: none !important;
}
}
&-text {
font-size: 22rpx;
color: #3275FA;
}
}
.type-4 {
.canvas {
// transform: scale(1.45) translateY(5%);
transform: scale(1.45) rotate(-45deg);
transform-origin:center center;
transform-origin: center center;
}
.categories-1 {
......
......@@ -11,7 +11,7 @@
</navigation-bar>
<view class="wrapper" style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight + footerHeight}}px);" wx:if="{{tabId == 1}}">
<block wx:if="{{duration}}">
<view class="canvas-box type-{{reportItem.length}}">
<view class="canvas-box type-{{reportItem.length}} {{score == null?'pending':''}}">
<view style="position: relative;">
<view class="canvas-view">
<block wx:if="{{radarImg}}">
......@@ -26,8 +26,13 @@
<block wx:for="{{reportItem}}" wx:key="index">
<view class="categories categories-{{index + 1}}" bindtap="jump" data-item="{{item}}">
<view class="title">{{item.reportItem}}</view>
<block wx:for="{{item.starList}}" wx:key="i" wx:for-item="i">
<gl-image class="star" src="/aiCheck/star-{{i}}.png"></gl-image>
<block wx:if="{{score == null && item.reportItem == '服务态度'}}">
<view class="pending-text">分析中...</view>
</block>
<block wx:else>
<block wx:for="{{item.starList}}" wx:key="i" wx:for-item="i">
<gl-image class="star" src="/aiCheck/star-{{i}}.png"></gl-image>
</block>
</block>
</view>
</block>
......@@ -119,7 +124,7 @@
</view>
<view class="line"></view>
<view class="polish">
<view class="title">
<view class="title">
<gl-image class="suggest-icon" src="/aiCheck/polish-icon.png"></gl-image>
润色表达
</view>
......@@ -136,7 +141,7 @@
<block wx:if="{{tabId == 1}}">
<view class="footer" id="footer">
<view class="back-home" bindtap="backHome">返回首页</view>
<view class="again" bindtap="again">再来一次</view>
</view>
<view class="back-home" bindtap="backHome">返回首页</view>
<view class="again" bindtap="again">再来一次</view>
</view>
</block>
\ No newline at end of file
......@@ -93,12 +93,12 @@ Page({
})
},
jump() {
const {selectedIndex,customeTypeList,stepName, step, linkChainList,isDemo} = this.data
const {selectedIndex,customeTypeList,stepName, step, linkChainList,isDemo,entry} = this.data
const { roleType } = customeTypeList[selectedIndex]
const { suggest } = linkChainList.find(item => item.type == step)
console.log(roleType, stepName, suggest,isDemo)
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/chat/chat?roleType=${roleType}&stage=${stepName}&suggest=${suggest}&isDemo=${isDemo}`
url: `/packageEquity/pages/aiCheck/chat/chat?roleType=${roleType}&stage=${stepName}&suggest=${suggest}&isDemo=${isDemo}&entry=${entry}`
})
this.setData({
show: false
......@@ -127,7 +127,8 @@ Page({
this.setData({
stepName: findChain.name,
step: findChain.type,
show:true
show:true,
entry:'other'
})
}
const {
......
......@@ -181,7 +181,8 @@ Component({
storeRangeList = tempList
}
this.setData({
storeRangeList: searchValue ? arr : tempList
storeRangeList: searchValue ? arr : tempList,
isReset: false
})
},
merchantChoose() {
......
......@@ -111,4 +111,4 @@
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
<screen-select-popup show="{{showSelectPopup}}" bindconfirm="popupConfirm" bindcancel="hidePopup" bindfilterStore="filterPopupList" selectedData="{{form.selectedMerchantList}}" list="{{storeRangeList || []}}" bindupdata="updata"></screen-select-popup>
<screen-select-popup show="{{showSelectPopup}}" bindconfirm="popupConfirm" bindcancel="hideStorePopup" bindfilterStore="filterPopupList" selectedData="{{form.selectedMerchantList}}" list="{{storeRangeList || []}}" bindupdata="updata"></screen-select-popup>
// components/StoreSelectPopup/StoreSelectPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
......@@ -13,11 +14,12 @@ Component({
this.setData({
scrollTop: 0,
searchValue: '',
edit: false,
copySelectedData: JSON.parse(JSON.stringify(selectedData))
}, () => {
this.resetListData()
// 清空搜索条件后重置全部门店数据
this.triggerEvent('updata', '')
this.resetListData()
})
}
}
......@@ -36,6 +38,7 @@ Component({
* 组件的初始数据
*/
data: {
IMG_URL,
scrollTop: 0,
tempList: [],
copySelectedData: []
......@@ -143,9 +146,13 @@ Component({
list[0].active = true
}
}
copySelectedData = list.filter(val => {
if (val.active) return val
let arr = []
// 已选的搜索后未显示出的数据置为选中状态
let selectedArr = wx.$util.arrayUnique(copySelectedData.concat(list), 'merchantNo')
selectedArr.forEach(val => {
if (val.active && val.merchantNo) arr.push(val)
})
copySelectedData = arr
this.setData({
copySelectedData,
list
......
......@@ -28,8 +28,9 @@
</view>
<view class="title">门店名称</view>
<scroll-view class="store-select-box" scroll-y enhanced="{{true}}" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom">
<view class="box">
<view class="merchant-box">
<block wx:if="{{list.length}}">
<view class="box">
<view class="merchant-box">
<block wx:for="{{list}}" wx:key="index">
<view class="item {{item.active?'active':''}}" bindtap="choose" data-item="{{item}}"
data-index="{{index}}">
......@@ -51,7 +52,14 @@
</view>
</view>
</block>
</view>
</view>
</view>
</block>
<block wx:else>
<view class="empty-box">
<image class="no-data-img" src="{{IMG_URL}}empty_data.png" />
<view class="list-not-text">暂无门店</view>
</view>
</block>
</scroll-view>
</popup>
\ No newline at end of file
......@@ -89,4 +89,22 @@
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.empty-box{
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.empty-box .no-data-img{
width: var(--fontSize160);
height: var(--fontSize160);
}
.empty-box .list-not-text{
margin-top: var(--fontSize10);
font-size: var(--fontSize28);
color: #BEC1C7;
}
\ No newline at end of file
......@@ -183,7 +183,8 @@ Component({
pageNum: 1, // 接待记录时间轴分页
searchForm: {},
showEmployeeName: false, // 是否展示销售顾问字段
isShowDefeatBtn: true // 是否展示录单按钮入口
isShowDefeatBtn: true, // 是否展示录单按钮入口
loaded: false
},
lifetimes: {
......@@ -505,7 +506,9 @@ Component({
})
}
this.setData({
storeRangeList: data
storeRangeList: data,
listData: [],
nothing: false
}, () => {
this.getReceptionList()
})
......@@ -523,29 +526,35 @@ Component({
// 获取接待记录统计数据
getReceptionList() {
let params = this.getParams()
wx.$util.showLoading()
getReceptionRecordList({
merchantNo: params.merchantNo,
startDateTime: params.startDateTime,
endDateTime: params.endDateTime,
staffUuids: params.staffUuids
}).then(res => {
let { code, message, data } = res
if (code == 0) {
data?.forEach(val => {
val.receptionStaticInfoDTOList = []
val.staticDateStr = `${new Date(val.staticDate).getMonth() + 1}月${new Date(val.staticDate).getDate()}日`
})
this.setData({
listData: data,
pageNum: 1,
nothing: false
}, () => {
this.getReceptionRecordDetailInfo()
})
} else {
wx.$util.showToast(message)
}
this.setData({
loaded: false
}, () => {
wx.showLoading('加载中')
getReceptionRecordList({
merchantNo: params.merchantNo,
startDateTime: params.startDateTime,
endDateTime: params.endDateTime,
staffUuids: params.staffUuids
}).then(res => {
let { code, message, data } = res
if (code == 0) {
data?.forEach(val => {
val.receptionStaticInfoDTOList = []
val.staticDateStr = `${new Date(val.staticDate).getMonth() + 1}月${new Date(val.staticDate).getDate()}日`
})
this.setData({
listData: data,
pageNum: 1,
nothing: false
}, () => {
this.getReceptionRecordDetailInfo()
})
} else {
wx.$util.showToast(message)
}
}).catch(err => {
wx.hideLoading()
})
})
},
// 获取接待记录接待时间轴详情数据
......@@ -556,24 +565,27 @@ Component({
...this.getParams()
}
if (nothing) return // 进获取近七天数据
wx.$util.showLoading()
wx.showLoading('加载中')
getRecordDetailList(params).then(res => {
let { code, data, message } = res
if (code == 0) {
listData?.forEach(val => {
data?.list?.forEach(subV => {
if (val.staticDate == subV.staticDate) val.receptionStaticInfoDTOList.push(subV)
if (val.staticDate == subV.staticDate && val.receptionStaticInfoDTOList?.findIndex(v => v.fileUrl == subV.fileUrl) < 0) val.receptionStaticInfoDTOList.push(subV)
})
})
this.setData({
loaded: true,
listData,
pageNum: pageNum + 1,
nothing: data?.total == listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0)
nothing: pageNum == data?.pages || data?.total == listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0)
})
} else {
wx.$util.showToast(message)
}
wx.$util.hideLoading()
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
})
},
// 过滤升级/战败接待记录数据
......@@ -1132,7 +1144,9 @@ Component({
this.setData({
isFilterUpgrade: orderResult?.includes(1),
isFilterDefeat: orderResult?.includes(2),
searchForm
searchForm,
listData: [],
nothing: false
}, () => {
this.getReceptionList()
})
......
......@@ -490,7 +490,7 @@ swiper{
margin: 0 var(--fontSize16) 0 var(--fontSize8);
}
.name{
color: #999EA8;
color: #292D33;
font-size: var(--fontSize24);
width: var(--fontSize430);
&.text-hide{
......@@ -573,8 +573,12 @@ swiper{
padding-top: var(--fontSize8);
margin-right: var(--fontSize4);
.round-dot{
font-size: var(--fontSize20);
width: var(--fontSize28);
height: var(--fontSize36);
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--fontSize14);
background: #5A5E66;
color: #FFFFFF;
......@@ -587,7 +591,7 @@ swiper{
}
.record-card{
display: flex;
margin-top: var(--fontSize16);
margin: var(--fontSize16) 0;
padding: 0 var(--fontSize20) 0 var(--fontSize4);
position: relative;
.card-line{
......@@ -629,7 +633,7 @@ swiper{
}
.list-not-text{
margin-top: var(--fontSize10);
font-size: var(--fontSize28);
font-size: var(--fontSize24);
color: #BEC1C7;
}
}
......
......@@ -105,7 +105,7 @@
<view class="receive-list" wx:if="{{storeRangeList.length}}">
<view class="'screen-box' {{showScreen ? '' : 'sticky-screen'}} {{isScrollTop ? 'bg-white' : ''}}">
<view>
<text class="title">接待记录</text>
<!-- <text class="title">接待记录</text> -->
<text class="name text-hide">{{searchForm.merchantNames.length > 1 ? '部分门店' : searchForm.merchantNames.length ? filter.filterMerchantName(searchForm.merchantNames) : !userInfo.isSuper ? userInfo.default4SStoreInfo.merchantName : '全部门店'}}</text>
</view>
<view bindtap="showScreenPop">
......@@ -141,7 +141,7 @@
<block wx:for="{{item.receptionStaticInfoDTOList}}" wx:key="time" wx:for-index="subIndex" wx:for-item="record">
<view class="record-card" bindtap="goReceptionDetail" data-item="{{record}}">
<view class="record-card-top">
<text class="round-dot">{{subIndex + 1}}</text>
<text class="round-dot" style="font-size: {{subIndex + 1 > 99 ? 'var(--fontSize16)' : 'var(--fontSize20)'}};">{{subIndex + 1}}</text>
<view class="card-line"></view>
</view>
<view class="card-item">
......@@ -151,7 +151,7 @@
</block>
</block>
</block>
<block wx:if="{{!filter.isShowEmpty(listData)}}">
<block wx:if="{{!filter.isShowEmpty(listData) && loaded}}">
<view class="empty-box">
<image class="no-data-img" src="{{IMG_URL}}empty_data.png" />
<view class="list-not-text">近七天暂无接待记录数据</view>
......
......@@ -35,7 +35,7 @@ Component({
} = e.currentTarget.dataset
this.setData({
activeIndex: index,
scrollTop: 9
scrollTop:0
})
},
getReceptionResult() {
......
......@@ -46,10 +46,12 @@ Component({
const {
dialogueList
} = this.data, {
paused
} = this.innerAudioContext, {
mergedOffset
} = this.setProgress(),
item = dialogueList.find(e => e.mergedOffset == mergedOffset)
this.setData({
if (!paused) this.setData({
isPlayIng: true
})
if (this.data.isScrollling) return
......
......@@ -100,13 +100,18 @@
color: #fff;
}
}
.hide-margin{
margin-bottom: 0;
}
.active {
background: #F0F6FF;
.appeal-btn {
display: block;
}
.text{
font-weight: 500;
}
}
.detail-box {
......
......@@ -4,7 +4,7 @@
<scroll-view class="scroll-view" enhanced scroll-y
scroll-into-view="{{toId}}" show-scrollbar="{{false}}" bindtouchstart="touchstart" bindtouchend="touchend">
<block wx:for="{{dialogueList}}" wx:key="index">
<view class="item {{activeId == item.text_id?'active':''}}" id="{{item.text_id}}" data-click bindtap="seekPlay" data-item="{{item}}" data-index="{{index}}">
<view class="item {{activeId == item.text_id?'active':''}} {{item.conversationCheckDetailDTO || item.defenceDetail ? 'hide-margin' :''}}" id="{{item.text_id}}" data-click bindtap="seekPlay" data-item="{{item}}" data-index="{{index}}">
<block wx:if="{{item.visible}}">
<view class="avatar-box">
<view class="icon">
......
......@@ -255,7 +255,9 @@ Component({
thisPage.setData({
activeIndex: 0
}, () => {
thisPage.dialogueRef().setTopId(item, true)
setTimeout(()=>{
thisPage.dialogueRef().setTopId(item, true)
},200)
})
},
......
......@@ -156,9 +156,13 @@ Page({
index
} = e.currentTarget.dataset
this.setData({
activeIndex: index,
avgDefence: ''
activeIndex: index
})
if(index!=2){
this.setData({
avgDefence: ''
})
}
},
navbarReady(e) {
let navBarHeight = e.detail.height;
......
......@@ -16,7 +16,8 @@ Page({
searchForm: {},
nothing: false,
showEmployeeName: false, // 是否展示销售顾问字段
isShowDefeatBtn: true
isShowDefeatBtn: true,
loaded: false
},
/**
......@@ -44,7 +45,8 @@ Page({
} = res
if (code == 0) {
this.setData({
storeRangeList: data
storeRangeList: data,
listData: []
}, () => {
this.getReceptionList()
})
......@@ -127,29 +129,36 @@ Page({
getReceptionList() {
let { listData } = this.data
let params = this.getParams()
wx.$util.showLoading()
getReceptionRecordList({
merchantNo: params.merchantNo,
startDateTime: params.startDateTime,
endDateTime: params.endDateTime,
staffUuids: params.staffUuids
}).then(res => {
let { code, message, data } = res
if (code == 0) {
data?.forEach(val => {
val.receptionStaticInfoDTOList = []
val.staticDateStr = `${new Date(val.staticDate).getMonth() + 1}月${new Date(val.staticDate).getDate()}日`
})
this.setData({
listData: listData.concat(data),
pageNum: 1
}, () => {
this.getReceptionRecordDetailInfo()
})
} else {
wx.$util.showToast(message)
}
this.setData({
loaded: false
}, () => {
wx.showLoading()
getReceptionRecordList({
merchantNo: params.merchantNo,
startDateTime: params.startDateTime,
endDateTime: params.endDateTime,
staffUuids: params.staffUuids
}).then(res => {
let { code, message, data } = res
if (code == 0) {
data?.forEach(val => {
val.receptionStaticInfoDTOList = []
val.staticDateStr = `${new Date(val.staticDate).getMonth() + 1}月${new Date(val.staticDate).getDate()}日`
})
this.setData({
listData: listData.concat(data),
pageNum: 1
}, () => {
this.getReceptionRecordDetailInfo()
})
} else {
wx.$util.showToast(message)
}
}).catch(err => {
wx.hideLoading()
})
})
},
// 获取接待记录接待时间轴详情数据
getReceptionRecordDetailInfo() {
......@@ -159,26 +168,29 @@ Page({
...this.getParams()
}
if (nothing) return
wx.$util.showLoading()
wx.showLoading('加载中')
getRecordDetailList(params).then(res => {
let { code, data, message } = res
if (code == 0) {
listData?.forEach(val => {
data?.list?.forEach(subV => {
if (val.staticDate == subV.staticDate) val.receptionStaticInfoDTOList.push(subV)
if (val.staticDate == subV.staticDate && val.receptionStaticInfoDTOList?.findIndex(v => v.fileUrl == subV.fileUrl) < 0) val.receptionStaticInfoDTOList.push(subV)
})
})
let listDataLength = listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0)
this.setData({
loaded: true,
listData,
pageNum: pageNum + 1,
triggered: false,
nothing: listDataLength == data?.total || pageNum + 1 == data?.pages
nothing: pageNum == data?.pages || listDataLength == data?.total
})
} else {
wx.$util.showToast(message)
}
wx.$util.hideLoading()
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
})
},
// 过滤升级/战败接待记录数据
......
......@@ -28,7 +28,7 @@
margin: 0 var(--fontSize16) 0 var(--fontSize8);
}
.name{
color: #999EA8;
color: #292D33;
font-size: var(--fontSize24);
width: var(--fontSize430);
&.text-hide{
......@@ -51,6 +51,9 @@
.box-content{
position: relative;
}
.empty-contant{
height: 100%;
}
.date-section {
height: var(--fontSize72);
line-height: var(--fontSize70);
......@@ -111,8 +114,12 @@
padding-top: var(--fontSize8);
margin-right: var(--fontSize4);
.round-dot{
font-size: var(--fontSize20);
width: var(--fontSize28);
height: var(--fontSize36);
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--fontSize14);
background: #5A5E66;
color: #FFFFFF;
......
......@@ -13,7 +13,7 @@
<view class="records-page" style="padding-top:{{ navBarHeight }}px;position: relative;">
<view class="screen-box">
<view>
<text class="title">接待记录</text>
<!-- <text class="title">接待记录</text> -->
<text class="name text-hide">{{searchForm.merchantNames.length > 1 ? '部分门店' : searchForm.merchantNames.length ? filter.filterMerchantName(searchForm.merchantNames) : !userInfo.isSuper ? userInfo.default4SStoreInfo.merchantName : '全部门店'}}</text>
</view>
<view bindtap="showScreenPop">
......@@ -22,7 +22,7 @@
</view>
</view>
<scroll-view scroll-y class="list-box" enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="refreshListData" bindscrolltolower="onBottomRefresh" style="height: calc(100% - var(--fontSize80));" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="box-content">
<view class="box-content {{!filter.isShowEmpty(listData) ? 'empty-contant' : ''}}">
<block wx:if="{{filter.isShowEmpty(listData)}}">
<block wx:for="{{listData}}" wx:key="date" wx:if="{{item.receptionStaticInfoDTOList.length}}">
<view class="date-section">
......@@ -50,7 +50,7 @@
<block wx:for="{{item.receptionStaticInfoDTOList}}" wx:key="subIndex" wx:for-index="subIndex" wx:for-item="record">
<view class="record-card" bind:tap="goto" data-record="{{record}}">
<view class="record-card-top">
<text class="round-dot">{{subIndex + 1}}</text>
<text class="round-dot" style="font-size: {{subIndex + 1 > 99 ? 'var(--fontSize16)' : 'var(--fontSize20)'}};">{{subIndex + 1}}</text>
<view class="card-line"></view>
</view>
<view class="card-item" wx:key="subIndex">
......@@ -63,7 +63,7 @@
<view class="list-nothing">到底了~</view>
</block>
</block>
<block wx:else>
<block wx:if="{{!filter.isShowEmpty(listData) && loaded}}">
<empty-data />
</block>
</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!