Commit 3102a217 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 4fca25c1 0719084f
......@@ -368,7 +368,7 @@ Page({
});
},
//提供相应的建议
getSparring(user_message) {
getSparring(user_message,retryCount = 0) {
const {
step,
reject_reason,
......@@ -414,7 +414,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 +435,10 @@ Page({
defense_step,
step: next_step,
});
}).catch(e=>{
if (retryCount < 1) { // 如果重试次数小于1,则重试一次
this.getSparring(user_message, retryCount + 1);
}
});
},
handleShow(e) {
......
......@@ -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>
......
<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">
......
......@@ -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;
......@@ -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>
......
......@@ -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!