Commit 9bfbbd9c by zhangxw

接待记录需求开发

1 parent e69cb42f
Showing 32 changed files with 1795 additions and 32 deletions
...@@ -144,7 +144,8 @@ ...@@ -144,7 +144,8 @@
"pages/aiCheck/start/start", "pages/aiCheck/start/start",
"pages/orderList/orderList", "pages/orderList/orderList",
"pages/equityQualityOrderList/equityQualityOrderList", "pages/equityQualityOrderList/equityQualityOrderList",
"pages/createDeafeatOrderBefore/createDeafeatOrderBefore" "pages/createDeafeatOrderBefore/createDeafeatOrderBefore",
"pages/receptionRecords/receptionRecords"
] ]
}, },
{ {
...@@ -211,11 +212,15 @@ ...@@ -211,11 +212,15 @@
"preloadRule": { "preloadRule": {
"pages/tabWorkOrder/pages/index/index": { "pages/tabWorkOrder/pages/index/index": {
"network": "all", "network": "all",
"packages": ["tabWorkOrder"] "packages": [
"tabWorkOrder"
]
}, },
"tabIndex/pages/index/index": { "tabIndex/pages/index/index": {
"network": "all", "network": "all",
"packages": ["tabWorkOrder"] "packages": [
"tabWorkOrder"
]
} }
}, },
"resolveAlias": { "resolveAlias": {
...@@ -229,4 +234,4 @@ ...@@ -229,4 +234,4 @@
}, },
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"resizable": true "resizable": true
} }
\ No newline at end of file \ No newline at end of file
...@@ -203,7 +203,7 @@ class Calendar { ...@@ -203,7 +203,7 @@ class Calendar {
range(e) { range(e) {
const _this = this[_CalendarObject_] const _this = this[_CalendarObject_]
let { index, data, ind } = e.currentTarget.dataset let { index, data, ind } = e.currentTarget.dataset
let { allowSameDay, showConfirm, monthList, rangeDate } = _this.data let { allowSameDay, showConfirm, monthList, rangeDate, maxDayRange } = _this.data
const start = Date.parse(rangeDate.start) const start = Date.parse(rangeDate.start)
if (rangeDate.end || start > Date.parse(data)) { if (rangeDate.end || start > Date.parse(data)) {
monthList = this.clearStatus({ monthList = this.clearStatus({
...@@ -215,6 +215,7 @@ class Calendar { ...@@ -215,6 +215,7 @@ class Calendar {
rangeDate.end = '' rangeDate.end = ''
} else { } else {
if (!allowSameDay && Date.parse(data) == Date.parse(rangeDate.start)) return if (!allowSameDay && Date.parse(data) == Date.parse(rangeDate.start)) return
if (maxDayRange && Date.parse(data) > (Date.parse(rangeDate.start) + (maxDayRange - 1) * 24 * 60 * 60 * 1000)) return wx.showToast({title: `选择天数不能超过${maxDayRange}天`, icon: 'none'})
monthList[index].data[ind].active = true monthList[index].data[ind].active = true
monthList[index].data[ind].end = true monthList[index].data[ind].end = true
rangeDate.end = data rangeDate.end = data
......
...@@ -82,7 +82,8 @@ export default { ...@@ -82,7 +82,8 @@ export default {
maxDate: String, maxDate: String,
/**隐藏水印 */ /**隐藏水印 */
hideMark: Boolean, hideMark: Boolean,
isComponents: Boolean isComponents: Boolean,
maxDayRange: Number // 最大可选天数范围
// dataDateStr: { // dataDateStr: {
// type: String, // type: String,
// observer: function (n) { // observer: function (n) {
......
...@@ -12,10 +12,15 @@ var isIncludesItem = function (list, item) { ...@@ -12,10 +12,15 @@ var isIncludesItem = function (list, item) {
return list.indexOf(item) != -1 return list.indexOf(item) != -1
} }
var filterMerchantName = function (list) {
return list.join(',')
}
/* /*
* 导出 * 导出
*/ */
module.exports = { module.exports = {
replaceItemText: replaceItemText, replaceItemText: replaceItemText,
isIncludesItem: isIncludesItem isIncludesItem: isIncludesItem,
filterMerchantName: filterMerchantName
} }
...@@ -656,7 +656,21 @@ Page({ ...@@ -656,7 +656,21 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {}, onShareAppMessage() {},
closeScreen() { // closeScreen() {
this.selectComponent("#page-1").back(); // this.selectComponent("#page-1").back();
// },
// 筛选确认
searchScreen(obj) {
console.log(obj)
let { tabIndex } = this.data;
this.selectComponent(`#page-${tabIndex}`)?.searchScreen &&
this.selectComponent(`#page-${tabIndex}`).searchScreen(obj)
},
// 筛选页面返回
containerBack() {
let { tabIndex } = this.data;
this.selectComponent(`#page-${tabIndex}`)?.back &&
this.selectComponent(`#page-${tabIndex}`).back()
}, },
}); });
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
"order-no-popup":"../../components/OrderNoPopup/OrderNoPopup", "order-no-popup":"../../components/OrderNoPopup/OrderNoPopup",
"tab-mine": "/components/TabMine/TabMine", "tab-mine": "/components/TabMine/TabMine",
"home": "../index/index", "home": "../index/index",
"makert-material":"../trainingMaterials/components/Materials/materials" "makert-material":"../trainingMaterials/components/Materials/materials",
"reception-screen": "../index/components/receptionScreen/receptionScreen",
"order-screen": "../carQuotation/components/OrderScreen/OrderScreen"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
<!-- pages/equity/index.wxml --> <!-- pages/equity/index.wxml -->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{showScreen}}"> <block wx:if="{{showScreen}}">
<navigation-bar showBack class="navigation-header" showWhiteMenu bindback="closeScreen" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar> <navigation-bar showBack class="navigation-header" showWhiteMenu bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar>
</block> </block>
<block wx:else> <block wx:else>
<navigation-bar class="navigation-header" showWhiteMenu bindnavbarReady="navbarReady" showMenu="{{ staffUuid&&tabIndex == 1?false:true }}" showBack="{{staffUuid&&tabIndex == 1?true:false}}" navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back" bindshowMenuPopup="showMenuPopup" > <navigation-bar class="navigation-header" showWhiteMenu bindnavbarReady="navbarReady" showMenu="{{ staffUuid&&tabIndex == 1?false:true }}" showBack="{{staffUuid&&tabIndex == 1?true:false}}" navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back" bindshowMenuPopup="showMenuPopup" >
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<block wx:if="{{ navBarHeight && showPage }}"> <block wx:if="{{ navBarHeight && showPage }}">
<!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" --> <!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" -->
<quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}" /> <quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}" />
<home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}"></home> <home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" navBarHeight="{{ navBarHeight }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}" showScreen="{{showScreen}}"></home>
<equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" /> <equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" />
<makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material> <makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material>
<tab-mine showCollege="{{ enableBusinessSchool }}" id="page-4" class="pagedetail {{ tabIndex == 4?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine> <tab-mine showCollege="{{ enableBusinessSchool }}" id="page-4" class="pagedetail {{ tabIndex == 4?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine>
...@@ -49,4 +49,12 @@ ...@@ -49,4 +49,12 @@
wx:if="{{ showOrderpop }}" wx:if="{{ showOrderpop }}"
flag="{{ showOrderpop }}" flag="{{ showOrderpop }}"
/> --> /> -->
<order-no-popup wx:if="{{ tipsProps }}" show="{{ tipsProps }}" title="请选择支付订单号" bind:success="navigator" orderNoList="{{ orderNoList }}" />
\ No newline at end of file \ No newline at end of file
<order-no-popup wx:if="{{ tipsProps }}" show="{{ tipsProps }}" title="请选择支付订单号" bind:success="navigator" orderNoList="{{ orderNoList }}" />
<page-container show="{{ show_order_confirm || show_reception_confirm }}" duration="{{ 0 }}" overlay="{{ false }}" bind:afterleave="containerBack">
<view wx:if="{{ showReceptionRendering }}">
<reception-screen show="{{ show_reception_confirm }}" userInfo="{{ userInfo }}" isFilterUpgrade="{{isFilterUpgrade}}" isFilterDefeat="{{isFilterDefeat}}" navBarHeight="{{ navBarHeight }}" bindconfirm="searchScreen" />
</view>
<view wx:if="{{ showOrderRendering }}">
<order-screen show="{{ show_order_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" bindconfirm="searchScreen" />
</view>
</page-container>
\ No newline at end of file \ No newline at end of file
...@@ -821,19 +821,17 @@ Component({ ...@@ -821,19 +821,17 @@ Component({
const thisPage = wx.$router.getPageInstance(); const thisPage = wx.$router.getPageInstance();
thisPage.setData({ thisPage.setData({
showScreen: false, showScreen: false,
}); show_order_confirm: false
this.setData({
show_confirm: false,
}); });
}, },
showConfirm() { showConfirm() {
const thisPage = wx.$router.getPageInstance(); const thisPage = wx.$router.getPageInstance();
let {orderStatus} = this.data
thisPage.setData({ thisPage.setData({
showScreen: true, showScreen: true,
}); showOrderRendering: true,
this.setData({ show_order_confirm: true,
showRendering: true, orderStatus
show_confirm: true,
}); });
}, },
searchScreen(e) { searchScreen(e) {
......
...@@ -283,11 +283,6 @@ ...@@ -283,11 +283,6 @@
</view> </view>
</view> </view>
</modal> </modal>
<page-container show="{{ show_confirm }}" duration="{{ 0 }}" overlay="{{ false }}" bind:afterleave="back">
<view wx:if="{{ showRendering }}">
<order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" bindconfirm="searchScreen" />
</view>
</page-container>
<view class="repeal-modal" wx:if="{{repealVisible}}"> <view class="repeal-modal" wx:if="{{repealVisible}}">
<view class="repeal-wrap"> <view class="repeal-wrap">
<view class="title"> <view class="title">
......
{
"component": true,
"usingComponents": {
"screen-select-popup": "../screenSelectPopup/screenSelectPopup"
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight}}px);margin-top:{{navBarHeight}}px;"
hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px">
<view class="box">
<view class="title">
日期
</view>
<view class="list-box" wx:for="{{form.dateTime}}" wx:key="index">
<calendar allowSameDay maxDayRange="7" shortcut bindselect='rangeSelect' id="orderCalendar" data-index="{{index}}" data-name="dateTime" dateType='range' calenderColor='#347BFF'
vertical minDate="2020-10-01" maxDate="{{maxDate}}" minDate="2024-01-01" isComponents>
</calendar>
<view style="display: flex;align-items: center;width: 100%;">
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.startDateTime ? 'grey' : ''}} {{item.active?'active':''}}">{{item.startDateTime || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.endDateTime ? 'grey' : ''}} {{item.active?'active':''}}">{{item.endDateTime || '结束时间'}}</view>
</view>
</view>
</view>
<view class="box">
<view class="title">
客户
</view>
<view class="list-box">
<view class="item flex-block">
<image src="/images/search.png" class="icon"></image>
<input placeholder="客户姓名/手机号" bindinput="input" value="{{customerKeyWord}}" type="text"/>
</view>
</view>
</view>
<view class="box">
<view class="title">
质检分数
</view>
<view class="list-box">
<block wx:for="{{form.scoreList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose"
data-list-name="scoreList" data-index="{{index}}"><text>{{item.name}}</text><text style="font-size: var(--fontSize20);">{{item.subName}}</text></view>
</block>
</view>
</view>
<view class="box">
<view class="title">
客户类型
</view>
<view class="list-box">
<block wx:for="{{form.customerTypes}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="customerTypes"
data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
车型
</view>
<view class="list-box">
<block wx:for="{{form.carModels}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="carModels"
data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
订单结果
</view>
<view class="list-box">
<block wx:for="{{form.orderResult}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderResult"
data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
<!-- 超管选择4s店 -->
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
门店
</view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!merchantShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view>
<view class="item text-center" bindtap="showSelectPopup" data-type="1">自定义</view>
<block wx:for="{{form.selectedMerchantList}}" wx:key="index">
<view class="item text-center active flex-1" bindtap="choose" hidden="{{index >= 3 && !merchantShowMore}}" data-list-name="selectedMerchantList" data-index="{{index}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantNo}}</view>
</view>
</block>
</view>
</view>
<!-- 超管选择员工 -->
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
员工
</view>
<view wx:if="{{form.staffRangeList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!staffShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<block wx:for="{{form.staffRangeList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" hidden="{{index >= 12 && !staffShowMore}}" data-list-name="staffRangeList"
data-index="{{index}}">{{item.staffName}}</view>
</block>
</view>
</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view>
<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>
/* pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxss */
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.box {
margin: 0 var(--fontSize32);
}
.box .title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
color: #292D33;
padding: var(--fontSize34) 0 var(--fontSize30);
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
}
.box .title .title-left{
display: flex;
align-items: flex-end;
}
.box .title .title-tips{
font-size: var(--fontSize22);
font-weight: 400;
color: #757980;
margin-left: var(--fontSize8);
}
.box .title .collapse-btn{
width: var(--fontSize48);
height: var(--fontSize48);
}
.box .title .collapse-btn.rotate-180{
transform: rotate(180deg);
}
.box .list-box {
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
}
.box:last-child .list-box{
border: none;
}
.box .list-box .item {
/* width: var(--fontSize214); */
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
border-radius: var(--fontSize4);
box-sizing: border-box;
border: var(--fontSize2) solid transparent;
padding: var(--fontSize16) 0;
flex-wrap: wrap;
font-size: var(--fontSize24);
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
}
.box .list-box .item .text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.box .list-box .item.flex-1{
width: 100%;
text-align: left;
margin-right: 0;
line-height: 100%;
}
.box .list-box .item.grey{
color: #999EA8;
}
.box .list-box .item.custom-time{
/* width: var(--fontSize316); */
width: calc(316 / 750 * 100%);
margin-bottom: 0;
}
.box .list-box .item.custom-time:last-child{
margin-right: 0;
margin-left: var(--fontSize20);
}
.box .list-box .item:nth-of-type(3n+3) {
margin-right: 0;
}
.box .list-box .calendar .item {
margin-right: 0;
}
.box .list-box .item.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
.box .list-box .item.disabled {
opacity: .4;
}
.box .list-box .item .inline-block{
display: inline-block;
}
.box .list-box .item .merchant-name{
max-width: calc(100% - var(--fontSize140));
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.box .list-box .item.flex-block{
width: 100%;
display: flex;
align-items: center;
padding: 0 var(--fontSize24);
}
.box .list-box .item input{
width: calc(100% - var(--fontSize50));
text-align: left;
}
.box .list-box .item .icon{
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize12);
}
.btn-box {
position: sticky;
padding: var(--fontSize10) var(--fontSize32);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize28);
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
}
.btn-box .btn {
border-radius: var(--fontSize12);
border: var(--fontSize2) solid #0075F9;
box-sizing: border-box;
height: var(--fontSize80);
}
.btn-box .btn.clear {
border: var(--fontSize2) solid #DEE0E3;
width: var(--fontSize186);
color: #292D33;
}
.btn-box .btn.done {
background: #347BFF;
color: #fff;
width: var(--fontSize480);
}
.isFullSucreen-btn {
padding-bottom: var(--fontSize68);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/index/components/record-item/recordItem.js
import contantsData from "../../constant"
Component({
/**
* 组件的属性列表
*/
properties: {
record: {
type: Object,
observer: function (params) {
let _this = this
_this.calculatePositions(params)
let query = wx.createSelectorQuery().in(_this)
query.select(`.line-status`).boundingClientRect()
query.exec(function(res){
const timelineWidth = res?.[0]?.width - 32; // 时间轴宽度
const totalMinutes = params.totalDuration / 1000 // 时间跨度 (秒数)
// if (params.receptionStaticInfoDetailDTOList) { // 质检环节
_this.getProcess(params.receptionStaticInfoDetailDTOList, timelineWidth, totalMinutes)
// }
if (params.receptionStaticInfoODDetailDTOList) { // 攻防点
_this.getDefensePoints(params.receptionStaticInfoODDetailDTOList, timelineWidth, totalMinutes)
}
})
}
}
},
/**
* 组件的初始数据
*/
data: {
contantsData,
itemInfo: {}
},
/**
* 组件的方法列表
*/
methods: {
phoneCall(e) {
let {
phone
} = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: phone
})
},
calculateTimeDifference(timeDifference) {
let totalSeconds = timeDifference / 1000
// 将时间差转换为分钟和秒数格式
let minutes = Math.floor(totalSeconds / 60)
let seconds = totalSeconds % 60
return `${minutes}分${seconds}秒`
},
calculatePositions(params) {
let _this = this
const startTimeStr = new Date(params.startTime).format('hh:mm')
const endTimeStr = new Date(params.endTime).format('hh:mm')
_this.setData({
itemInfo: params,
['itemInfo.startTimeStr']: startTimeStr,
['itemInfo.endTimeStr']: endTimeStr,
['itemInfo.duration']: _this.calculateTimeDifference(params.totalDuration)
})
},
// 质检环节
getProcess(events, timelineWidth, totalMinutes) {
events?.forEach((event, index) => {
event.stage = event.stage.replace('环节', '')
event.width = this.getWidth(event, totalMinutes, timelineWidth)
event.left = Math.ceil(Math.min(...event.mergedOffset) / totalMinutes * timelineWidth)
if (index == (events?.length - 1) && event.left > (timelineWidth - event.width)) { // 最后的质检环节
event.left = (timelineWidth - event.width)
}
event.bottom = 'var(--fontSize34)'
event.bottom = index % 2 == 0 ? 'var(--fontSize34)' : 0
if (event.totalScore == 4) { // 接待环节
event.customerClass = event.totalGetScore <= 1 ? 'red-tag' : event.totalGetScore > 1 && event.totalGetScore < 3 ? 'yellow-tag' : 'green-tag'
} else if (event.totalScore == 50) { // 车辆交付环节
event.customerClass = event.totalGetScore < 15 ? 'red-tag' : event.totalGetScore >= 15 && event.totalGetScore <= 40 ? 'yellow-tag' : 'green-tag'
} else if (event.totalScore == 40) { // 需求挖掘环节
event.customerClass = event.totalGetScore <= 10 ? 'red-tag' : event.totalGetScore >= 20 && event.totalGetScore <= 30 ? 'yellow-tag' : 'green-tag'
} else { // 结束环节
event.customerClass = event.totalGetScore < 6 ? 'red-tag' : 'green-tag'
}
})
// 质检环节未知
if (!events?.length) {
events = [
{
stage: '未知',
width: 150,
left: 70,
bottom: 'var(--fontSize34)',
customerClass: 'red-tag'
}
]
}
this.setData({
['itemInfo.receptionStaticInfoDetailDTOList'] : events,
})
},
// 攻防点
getDefensePoints(events, timelineWidth, totalMinutes) {
events?.forEach(event => {
event.left = Math.ceil(event.mergedOffset / totalMinutes * timelineWidth)
})
this.setData({
['itemInfo.receptionStaticInfoODDetailDTOList']: events
})
},
getWidth(item, totalMinutes, timelineWidth) {
let diff = Math.max(...item.mergedOffset) - Math.min(...item.mergedOffset)
let width = Math.ceil(diff / totalMinutes * timelineWidth)
let minWidth = item.stage?.length == 3 ? 56 : item.stage?.length == 4 ? 72 : 44 // 根据质检环节最小宽度
let filterWidth = width > minWidth ? width : minWidth // 最小宽度
return filterWidth
},
// 快速录战败单
createDefeatOrder() {
wx.$router.go('packageEquity.createDeafeatOrder', {scene: 0})
},
// 点击质检环节
handleTagsTap(e) {
let { item } = e.currentTarget.dataset
this.triggerEvent('tagsTap', item)
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/index/components/record-item/recordItem.wxss */
.content{
box-sizing: border-box;
width: 100%;
padding-bottom: var(--fontSize8);
background: #FFFFFF;
border-radius: var(--fontSize28);
&.border-red{
border: var(--fontSize2) solid #F56C50;
}
.record-header{
padding: var(--fontSize28) var(--fontSize16) var(--fontSize16) var(--fontSize32);
.base-message{
margin-bottom: var(--fontSize12);
.record-name{
font-weight: 600;
font-size: var(--fontSize30);
color: #292D33;
margin-right: var(--fontSize12);
}
.record-phone{
font-size: var(--fontSize26);
color: #347BFF;
}
}
.record-message{
display: flex;
justify-content: space-between;
align-items: center;
font-size: var(--fontSize22);
.record-label{
padding: 0 var(--fontSize8);
background: #E8ECF0;
height: var(--fontSize32);
border-radius: var(--fontSize4);
color: #79859E;
margin-right: var(--fontSize12);
}
.record-label-error{
padding: 0 var(--fontSize8);
height: var(--fontSize28);
border: var(--fontSize2) solid #F56C50;
color: #F56C50;
}
.record-amount{
font-size: var(--fontSize32);
color: #292D33;
font-family: "numberBold";
.line{
display: inline-block;
width: var(--fontSize2);
height: var(--fontSize14);
background: #D1DBE7;
margin: 0 var(--fontSize16);
}
}
.record-score{
font-size: var(--fontSize24);
font-weight: 600;
color: #F56C50;
.value{
font-size: var(--fontSize48);
font-family: "numberBold";
}
&.black{
color: #292D33;
}
}
}
}
.time-line-box{
box-sizing: border-box;
width: calc(100% - var(--fontSize16));
margin: 0 var(--fontSize8);
height: var(--fontSize168);
background: #FAFAFA;
border-radius: var(--fontSize24);
padding: var(--fontSize20);
.time-line{
height: var(--fontSize90);
position: relative;
.line-status{
width: 100%;
height: var(--fontSize2);
background: #D1DBE7;
position: absolute;
bottom: var(--fontSize32);
.circular{
position: absolute;
top: calc(-1 * var(--fontSize6));
width: var(--fontSize12);
height: var(--fontSize12);
border-radius: 50%;
background: #D1DBE7;
}
.circular-left{
left: 0;
}
.circular-right{
right: var(--fontSize40);
}
.reception-result{
position: absolute;
right: 0;
top: calc(-1 * var(--fontSize14));
width: var(--fontSize28);
height: var(--fontSize28);
border-radius: var(--fontSize28);
text-align: center;
font-size: var(--fontSize20);
color: #FFFFFF;
&.success{
background: #35C376;
&:before{
content: '√';
}
}
&.defeat{
background: #F24724;
&:before{
content: '×'
}
}
}
}
.creat-order-btn{
width: var(--fontSize144);
position: absolute;
right: 0;
top: calc(-1 * var(--fontSize40));
z-index: 100;
}
.bubble {
position: relative;
background: #00000099;
color: #FFFFFF;
padding: var(--fontSize12) var(--fontSize24);
border-radius: var(--fontSize8);
text-align: center;
font-size: var(--fontSize24);
.bubble-pointer {
width: 0;
height: 0;
border-left: var(--fontSize8) solid transparent;
border-right: var(--fontSize12) solid transparent;
border-top: var(--fontSize12) solid #555;
position: absolute;
right: var(--fontSize10);
bottom: calc(-1 * var(--fontSize16));
transform: translateY(-50%);
}
.bubble-content {
font-size: var(--fontSize24);
text-align: center;
white-space: nowrap;
}
}
.tags-box{
.tags-item{
text-align: center;
position: absolute;
display: flex;
bottom: 0;
.deep-colour-name{
flex-shrink: 0;
width: var(--fontSize6);
height: var(--fontSize32);
background: #F56C50;
&.red-tag{
background: #F56C50;
}
&.yellow-tag{
background: #FF9D0A;
}
&.green-tag{
background: #35C376;
}
}
.name{
flex-shrink: 0;
font-size: var(--fontSize24);
text-align: center;
height: var(--fontSize32);
width: calc(100% - var(--fontSize6));
line-height: var(--fontSize32);
overflow: hidden;
&.red-tag{
background: #FFE8E3;
color: #F56C50;
}
&.yellow-tag{
background: #FFECCE;
color: #FF9D0A;
}
&.green-tag{
background: #D0F1DF;
color: #35C376;
}
.score{
font-size: var(--fontSize20);
margin-left: var(--fontSize4);
}
}
}
}
.defense{
text-align: center;
position: absolute;
bottom: var(--fontSize34);
.defense-icon{
width: var(--fontSize30);
height: var(--fontSize60);
}
}
}
.total-time{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
margin-top: var(--fontSize10);
.line{
width: 100%;
height: var(--fontSize2);
background: #D1DBE74D;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
.time-bt{
background: #FFFFFF;
border-radius: var(--fontSize28);
z-index: 10;
&.pad-4{
padding: 0 var(--fontSize8);
}
&.pad-20{
padding: 0 var(--fontSize40);
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageEquity/pages/index/components/record-item/recordItem.wxml-->
<view class="content">
<view class="record-header">
<view class="base-message">
<text class="record-name">{{itemInfo.customerName}}</text>
<text class="record-phone" catchtap="phoneCall" data-phone="{{itemInfo.phoneNumber}}">{{itemInfo.phoneNumber}}</text>
</view>
<view class="record-message">
<view>
<text class="record-label" wx:if="{{itemInfo.carModel}}">{{itemInfo.carModel}}</text>
<text class="record-label" wx:if="{{itemInfo.tag}}">{{itemInfo.tag}}</text>
<text class="record-label-error" wx:if="{{itemInfo.qualityCheckScore <= 20}}">疑似虚假接待</text>
</view>
<view>
<text class="record-amount" wx:if="{{itemInfo.orderStatus == 1 && itemInfo.orderAmount}}">
<text>¥{{itemInfo.orderAmount}}</text>
<text class="line"></text>
</text>
<text class="record-score {{itemInfo.qualityCheckScore > 20 ? 'black': ''}}" wx:if="{{itemInfo.orderStatus != 3 && itemInfo.qualityCheckScore}}">
<text class="value">{{itemInfo.qualityCheckScore}}</text>分
</text>
<text class="record-score" wx:if="{{itemInfo.orderStatus == 3}}">
统计中
</text>
</view>
</view>
</view>
<view class="time-line-box">
<view class="time-line">
<view class="line-status">
<view class="circular circular-left"></view>
<view class="circular circular-right"></view>
<view class="reception-result {{itemInfo.orderStatus == 2 ? 'defeat' : itemInfo.orderStatus == 1 ? 'success' : ''}}">
<gl-image wx:if="{{itemInfo.orderStatus == 3}}" webp src="/equity/unknown-icon.png" />
</view>
</view>
<view class="creat-order-btn" wx:if="{{itemInfo.orderStatus == 2}}" catchtap="createDefeatOrder">
<view class="bubble">
<view class="bubble-content">快速录单</view>
<view class="bubble-pointer"></view>
</view>
</view>
<!-- 质检环节 -->
<view class="tags-box">
<block wx:key="index" wx:for="{{itemInfo.receptionStaticInfoDetailDTOList}}"
wx:for-item="item">
<view class="tags-item"
catchtap="handleTagsTap"
data-item="{{item}}"
style="left: var(--fontSize{{item.left * 2 + 12}});width: var(--fontSize{{item.width * 2}});bottom: {{item.bottom}};">
<view class="deep-colour-name {{item.customerClass}}"></view>
<view data-index="{{index}}" data-item="{{item}}" class="name {{item.customerClass}}">
{{item.stage}}<text class="score" wx:if="{{item.totalGetScore}}">{{item.totalGetScore}}</text>
</view>
</view>
</block>
</view>
<!-- 攻防点 -->
<block wx:for="{{itemInfo.receptionStaticInfoODDetailDTOList}}" wx:key="index">
<view class="defense" style="left: var(--fontSize{{item.left * 2 + 12}});">
<gl-image webp class="defense-icon" src="/equity/defense-icon.png" />
</view>
</block>
</view>
<view class="total-time">
<view class="line"></view>
<view class="time-bt pad-4">{{itemInfo.startTimeStr}}</view>
<view class="time-bt pad-20">{{itemInfo.duration}}</view>
<view class="time-bt pad-4">{{itemInfo.endTimeStr}}</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// components/StoreSelectPopup/StoreSelectPopup.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
if (n) {
let {selectedData} = this.data
this.setData({
scrollTop: 0,
searchValue: '',
copySelectedData: JSON.parse(JSON.stringify(selectedData))
}, () => {
this.resetListData()
})
}
}
},
list: {
type: Array,
observer: function (n) {
if (n) {
}
}
},
selectedData: Array
},
/**
* 组件的初始数据
*/
data: {
scrollTop: 0,
tempList: [],
copySelectedData: []
},
/**
* 组件的方法列表
*/
methods: {
open() {
if (this.data.disabled) return
this.setData({
edit: true,
inputFocus: true
})
},
setValue(value) {
if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
}
this.setData({
searchValue: value
})
},
input(e) {
let {
value
} = e.detail
this.setValue(value)
this.triggerEvent('input', {
value
})
},
inputConfifm(e) {
this.emit(e)
},
emit(e) {
let {
detail: {
value
}
} = e
this.setData({
edit: false,
nothing: false,
pageNum: 1
})
this.setValue(value)
this.triggerEvent('updata', value)
},
choose(e) {
let {
index,
item
} = e.currentTarget.dataset
let {
active
} = item
let {
list
} = this.data, tmpTarget,res;
if (list[index].merchantName !== '全部') {
let target = `list[${index}].active`
if (list[0].merchantName == '全部') tmpTarget = `list[0].active`
this.setData({
[target]: !active,
[tmpTarget]: false
}, () => {
this.setSelectedData()
})
} else {
if (!active) {
list.map(val => {
return val.active = false
})
list[0].active = true
}
this.setData({
list
}, () => {
this.setSelectedData()
})
}
},
resetListData() {
let {list, copySelectedData} = this.data
console.log(copySelectedData)
list?.forEach(val => {
val.active = false
if (!copySelectedData?.length) list[0].active = true
val.active = copySelectedData.some(v => v.merchantNo == val.merchantNo)
})
console.log(list)
this.setData({list})
},
setSelectedData() {
let {
list,
copySelectedData
} = this.data,res;
if (list.length >0 && !list[0].merchantNo) {
res = list.some(val => val.active)
if (!res) {
list[0].active = true
}
}
copySelectedData = list.filter(val => {
if (val.active) return val
})
this.setData({
copySelectedData,
list
})
this.triggerEvent('filterStore', list)
},
hidePopup() {
this.triggerEvent('cancel')
},
confirm() {
let {
copySelectedData
} = this.data
this.triggerEvent('confirm', copySelectedData)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/StoreSelectPopup/StoreSelectPopup.wxml-->
<popup title="选择门店" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup">
<view class="search-box">
<view class="search-input">
<block wx:if="{{ !edit }}">
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:if="{{ searchValue }}">{{searchValue}}</block>
<block wx:else>
<image src="/images/search.png" class="icon"></image>
查找
</block>
</view>
</block>
<block wx:else>
<input
type="text"
class="input"
value="{{ searchValue }}"
focus="{{ inputFocus }}"
confirm-type="search"
bindinput="input"
bindblur="inputBlur"
bindconfirm="inputConfifm"
maxlength="30"
/>
</block>
</view>
</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:for="{{list}}" wx:key="index">
<view class="item {{item.active?'active':''}}" bindtap="choose" data-item="{{item}}"
data-index="{{index}}">
<view
class="icon"
catchtap="choose"
data-index="{{index}}"
data-item="{{item}}">
<block wx:if="{{item.active}}">
<image src="/images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="merchant_item">
<view class="text-hide">{{item.merchantName}}</view>
<view>{{item.merchantId}}</view>
</view>
</view>
</block>
</view>
</view>
</scroll-view>
</popup>
\ No newline at end of file \ No newline at end of file
/* components/StoreSelectPopup/StoreSelectPopup.wxss */
.search-box {
height: var(--fontSize104);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize28);
}
.search-box .search-input {
width: var(--fontSize686);
height: var(--fontSize72);
background: #F7F8FA;
border-radius: var(--fontSize38);
color: #333;
}
.search-input .input{
display: flex;
align-items: center;
justify-content: center;
/* height: 100%; */
width: var(--fontSize686);
text-align: center;
height: var(--fontSize72);
line-height: var(--fontSize72);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search-input .icon{
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize10);
}
.search-input .placeholder{
color: #C8C9CC;
}
.title{
padding: var(--fontSize20) 0;
color: #292D33;
font-weight: 400;
font-size: var(--fontSize32);
border-top:var(--fontSize1) solid #EFF0F2;
}
.store-select-box{
height: calc(100% - var(--fontSize168));
}
.merchant-box .item{
display: flex;
height: var(--fontSize88);
align-items: center;
color: #292D33;
}
.merchant-box .item.active{
color: #347BFF;
}
.item .merchant_item{
height: var(--fontSize88);
font-size: var(--fontSize28);
display: flex;
align-items: center;
width: calc(100% - var(--fontSize52));
border-top: var(--fontSize1) solid #EFF0F2;
}
.item .merchant_item .text-hide{
max-width: calc(100% - var(--fontSize192));
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item .icon {
width: var(--fontSize32);
height: var(--fontSize32);
display: block;
margin-right: var(--fontSize20);
flex-shrink: 0;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
\ No newline at end of file \ No newline at end of file
const customerTypes = [
{
name: '独裁型客户',
value: 1
},
{
name: '沉默型客户',
value: 2
},
{
name: '理智型客户',
value: 3
},
{
name: '人际型客户',
value: 4
},
{
name: '犹豫型客户',
value: 5
},
{
name: '价格型客户',
value: 6
},
]
export default{
customerTypes
}
\ No newline at end of file \ No newline at end of file
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"task-dialog": "/components/TaskDialog/TaskDialog" "task-dialog": "/components/TaskDialog/TaskDialog",
"record-item": "./components/record-item/recordItem"
} }
} }
\ No newline at end of file \ No newline at end of file
/* packageCrowdFunding/pages/homePage/index/index.wxss */ /* packageCrowdFunding/pages/homePage/index/index.wxss */
.layout_box { .layout_box {
position:relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: var(--fontSize6); padding-top: var(--fontSize6);
overflow: scroll;
} }
.top_box { .top_box {
...@@ -188,7 +188,6 @@ box-shadow: 0 var(--fontSize24) var(--fontSize24) -var(--fontSize12) #d3d9e680 ...@@ -188,7 +188,6 @@ box-shadow: 0 var(--fontSize24) var(--fontSize24) -var(--fontSize12) #d3d9e680
padding:var(--fontSize16) var(--fontSize38) 0; padding:var(--fontSize16) var(--fontSize38) 0;
background: #FFFFFF; background: #FFFFFF;
border-radius:var(--fontSize16); border-radius:var(--fontSize16);
margin-bottom:var(--fontSize16);
} }
.menu_box .menu_item { .menu_box .menu_item {
...@@ -243,7 +242,7 @@ box-shadow: 0 var(--fontSize24) var(--fontSize24) -var(--fontSize12) #d3d9e680 ...@@ -243,7 +242,7 @@ box-shadow: 0 var(--fontSize24) var(--fontSize24) -var(--fontSize12) #d3d9e680
font-size: var(--fontSize28); font-size: var(--fontSize28);
color:#FFFFFF; color:#FFFFFF;
font-weight: 400; font-weight: 400;
margin:var(--fontSize12) 0 var(--fontSize16) var(--fontSize20); margin: 0 0 var(--fontSize16) var(--fontSize20);
} }
.tips .tips-text { .tips .tips-text {
...@@ -454,6 +453,138 @@ swiper{ ...@@ -454,6 +453,138 @@ swiper{
.menu_box { .menu_box {
grid-template-columns: repeat(7, var(--fontSize100))!important; grid-template-columns: repeat(7, var(--fontSize100))!important;
} }
} }
.receive-list{
margin-top: var(--fontSize20);
background: #F7F8FA;
&.minh100{
min-height: 100%;
}
}
.screen-box {
box-sizing: border-box;
background: #F7F8FA;
padding: 0 var(--fontSize28);
width: 100%;
height: var(--fontSize80);
display: flex;
align-items: center;
justify-content: space-between;
&.sticky-screen{
position: sticky;
top: 0;
left: 0;
z-index: 1000;
}
&.bg-white{
background: #FFFFFF;
}
view{
display: flex;
align-items: flex-end;
}
.title{
color: #292D33;
font-weight: 500;
font-size: var(--fontSize28);
margin: 0 var(--fontSize16) 0 var(--fontSize8);
}
.name{
color: #999EA8;
font-size: var(--fontSize24);
width: var(--fontSize430);
&.text-hide{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.text{
font-size: var(--fontSize24);
color: #292D33;
}
image{
display: inline-block;
width: var(--fontSize36);
height: var(--fontSize36);
}
}
.list-box{
padding: 0 var(--fontSize8);
.date-section {
height: var(--fontSize72);
line-height: var(--fontSize72);
padding: var(--fontSize16);
&.sticky-date-section{
position: sticky;
top: var(--fontSize80);
left: 0;
z-index: 1000;
}
&.bg-white{
background: #FFFFFF;
}
.date {
font-size: var(--fontSize28);
color: #292D33;
font-weight: 500;
margin-right: var(--fontSize36);
}
.summary-item{
font-size: var(--fontSize26);
color: #5A5E66;
&.blue{
color: #347BFF;
}
&.blue-blod{
font-weight: 600;
}
}
.line{
display: inline-block;
width: var(--fontSize2);
height: var(--fontSize14);
background: #D1DBE7;
margin: 0 var(--fontSize16);
}
&.first-child{
padding-top: 0;
}
}
.record-card-top{
display: flex;
flex-flow: column;
align-items: center;
margin-right: var(--fontSize4);
.round-dot{
width: var(--fontSize28);
height: var(--fontSize36);
border-radius: var(--fontSize14);
background: #5A5E66;
color: #FFFFFF;
text-align: center;
}
.record-time{
font-size: var(--fontSize24);
color: #5A5E66;
}
}
.record-card{
display: flex;
margin-top: var(--fontSize16);
.card-line{
width: var(--fontSize3);
height: var(--fontSize310);
background: repeating-linear-gradient(to bottom, transparent, transparent var(--fontSize10), #DEE0E3 var(--fontSize10), #DEE0E3 var(--fontSize20));
}
.card-item{
width: calc(100% - var(--fontSize27));
}
}
.show-more-btn{
margin: 0 auto;
width: var(--fontSize150);
padding: var(--fontSize20);
}
}
// packageEquity/pages/receptionRecords/receptionRecords.js
import { getReceptionRecordList, getRecordDetailList } from "../../receptionRecordsApi"
import carLifeApi from "../../carEquityApi";
Page({
/**
* 页面的初始数据
*/
data: {
navBarHeight: 113.5,
show_reception_confirm: false,
showReceptionRendering: false,
scrollTop: 0,
listData: [],
pageNum: 1,
staticPage: 1,
searchForm: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let userInfo = wx.$util.getUserInfo() || {}
// 超管获取所有质检门店/员工
if (userInfo?.isSuper) {
this.getStoreList()
} else {
this.getReceptionList()
}
},
getStoreList() {
carLifeApi.selectrecmerchantList({}).then(res => {
let {
code,
data,
message
} = res
if (code == 0) {
this.setData({
storeRangeList: data
}, () => {
this.getReceptionList()
})
} else {
wx.$util.showToast(message)
}
})
},
getParams(index) {
let { searchForm, isFilterDefeat, isFilterUpgrade, storeRangeList } = this.data
let userInfo = wx.$util.getUserInfo() || {};
let endDayNum = index > 1 ? (index - 1) * 7 : 0
let startDayNum = index > 1 ? index * 7 - 1 : index * 6
// 获取当前时间的时间戳
let timestamp = new Date().getTime()
let sevenDaysAgoTimestamp = timestamp - startDayNum * 24 * 60 * 60 * 1000
let sevenDaysAgoDate = new Date(sevenDaysAgoTimestamp).format('yyyy-MM-dd')
searchForm.orderResult = (isFilterDefeat ? [2] : []).concat(isFilterUpgrade ? [1] : []);
let obj = {
startDateTime: searchForm?.startDateTime || sevenDaysAgoDate,
endDateTime: searchForm?.endDateTime || new Date(timestamp - endDayNum * 24 * 60 * 60 * 1000).format('yyyy-MM-dd'),
// startDateTime: '2024-06-02',
// endDateTime: '2024-06-08',
customerName: searchForm?.customerName || '',
qualityCheckScoreBegin: searchForm?.qualityCheckScoreBegin || '',
qualityCheckScoreEnd: searchForm?.qualityCheckScoreEnd || '',
customerTypes: searchForm?.customerTypes,
carModels: searchForm?.carModels,
orderResult: searchForm?.orderResult,
merchantNo: userInfo?.isSuper && !searchForm?.merchantNo?.length ? storeRangeList.map(v => {if (v.merchantNo) return v.merchantNo}) : (searchForm?.merchantNo || [userInfo.default4SStoreInfo.merchantId]),
staffUuids: searchForm?.staffUuids
}
return obj
},
navbarReady(e) {
let navBarHeight = e.detail.height;
this.setData({
navBarHeight,
});
},
showScreenPop() {
this.setData({
showScreen: true,
showReceptionRendering: true,
show_reception_confirm: true,
});
},
hideScreenPopup() {
this.setData({
showScreen: false,
show_reception_confirm: false
})
},
// 筛选确认
searchScreen(e) {
let searchForm = e.detail
const { orderResult } = searchForm || {};
this.setData({
isFilterUpgrade: orderResult?.includes(1),
isFilterDefeat: orderResult?.includes(2)
})
this.setData({
searchForm
})
this.getReceptionList()
this.containerBack();
},
containerBack() {
this.hideScreenPopup()
},
// 获取接待记录统计数据
getReceptionList() {
let { staticPage, listData } = this.data
let params = this.getParams(staticPage)
getReceptionRecordList({
merchantNo: params.merchantNo,
startDateTime: params.startDateTime,
endDateTime: params.endDateTime
}).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)
}
})
},
// 获取接待记录接待时间轴详情数据
getReceptionRecordDetailInfo() {
let { pageNum, listData, staticPage } = this.data
let params = {
pageNum,
...this.getParams(staticPage)
}
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)
})
})
this.setData({
listData,
pageNum: pageNum + 1,
triggered: false
})
let listDataLength = listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0)
if (listDataLength < 5) { // 未铺满一屏 或
// 近七天数据加载完毕 继续加载上一个七天周期的数据
this.setData({
staticPage: staticPage + 1
})
setTimeout(() => {
this.getReceptionList()
}, 200)
}
} else {
wx.$util.showToast(message)
}
})
},
// 过滤升级/战败接待记录数据
filterItemData(e) {
let { type } = e.currentTarget.dataset
if (type == 'upgrade') {
this.setData({
isFilterUpgrade: !this.data.isFilterUpgrade
})
} else {
this.setData({isFilterDefeat: !this.data.isFilterDefeat})
}
this.getReceptionList()
},
// 触底加载更多
onBottomRefresh() {
this.getReceptionRecordDetailInfo()
},
// 下拉刷新数据
refreshListData() {
this.setData({
staticPage: 1,
listData: []
})
this.getReceptionList()
},
back() {
wx.$router.back()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"reception-screen": "../index/components/receptionScreen/receptionScreen",
"record-item": "../index/components/record-item/recordItem"
},
"navigationStyle": "custom"
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/receptionRecords/receptionRecords.wxss */
.records-page{
box-sizing: border-box;
position: relative;
font-size: var(--fontSize24);
color: #8A8C90;
height: calc(100vh - var(--constantSafeAreaInsetBottom));
height: calc(100vh - var(--envSafeAreaInsetBottom));
overflow: hidden;
background: #F7F8FA;
.screen-box {
box-sizing: border-box;
background: #FFFFFF;
padding: 0 var(--fontSize28);
width: 100%;
height: var(--fontSize80);
display: flex;
align-items: center;
justify-content: space-between;
view{
display: flex;
align-items: flex-end;
}
.title{
color: #292D33;
font-weight: 500;
font-size: var(--fontSize28);
margin: 0 var(--fontSize16) 0 var(--fontSize8);
}
.name{
color: #999EA8;
font-size: var(--fontSize24);
width: var(--fontSize430);
&.text-hide{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.text{
font-size: var(--fontSize24);
color: #292D33;
}
image{
display: inline-block;
width: var(--fontSize36);
height: var(--fontSize36);
}
}
.list-box{
.box-content{
position: relative;
}
.date-section {
height: var(--fontSize72);
line-height: var(--fontSize72);
padding: var(--fontSize16);
&.sticky-date-section{
position: sticky;
top: 0;
left: 0;
z-index: 1000;
}
&.bg-white{
background: #FFFFFF;
}
.date {
font-size: var(--fontSize28);
color: #292D33;
font-weight: 500;
margin-right: var(--fontSize36);
}
.summary-item{
font-size: var(--fontSize26);
color: #5A5E66;
&.blue{
color: #347BFF;
}
&.blue-blod{
font-weight: 600;
}
}
.line{
display: inline-block;
width: var(--fontSize2);
height: var(--fontSize14);
background: #D1DBE7;
margin: 0 var(--fontSize16);
}
&.first-child{
padding-top: 0;
}
}
.record-card-top{
display: flex;
flex-flow: column;
align-items: center;
margin-right: var(--fontSize4);
.round-dot{
width: var(--fontSize28);
height: var(--fontSize36);
border-radius: var(--fontSize14);
background: #5A5E66;
color: #FFFFFF;
text-align: center;
}
.record-time{
font-size: var(--fontSize24);
color: #5A5E66;
}
}
.record-card{
display: flex;
margin-top: var(--fontSize16);
padding: 0 var(--fontSize20) 0 var(--fontSize4);
.card-line{
width: var(--fontSize3);
height: var(--fontSize310);
background: repeating-linear-gradient(to bottom, transparent, transparent var(--fontSize10), #DEE0E3 var(--fontSize10), #DEE0E3 var(--fontSize20));
}
.card-item{
width: calc(100% - var(--fontSize27));
}
}
.show-more-btn{
margin: 0 auto;
width: var(--fontSize150);
padding: var(--fontSize20);
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageEquity/pages/receptionRecords/receptionRecords.wxml-->
<wxs src="../../index.wxs" module="filter" />
<block wx:if="{{showScreen}}">
<navigation-bar showBack class="navigation-header" showWhiteMenu bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar>
</block>
<block wx:else>
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack navStyle="{{'background-color: #FFFFFF;box-shadow:none;' }}" bindback="back">
<view class="navigation-title">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName}}</view>
</view>
</navigation-bar>
</block>
<view class="records-page" style="padding-top:{{ navBarHeight }}px;position: relative;">
<view class="screen-box">
<view>
<text class="title">接待记录</text>
<text class="name text-hide">{{searchForm.merchantNames.length ? filter.filterMerchantName(searchForm.merchantNames) : !userInfo.isSuper ? userInfo.default4SStoreInfo.merchantName : ''}}</text>
</view>
<view bindtap="showScreenPop">
<text class="text">筛选</text>
<gl-image webp src="/equity/screen-right-icon.png" />
</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">
<block wx:if="{{listData.length}}">
<block wx:for="{{listData}}" wx:key="date" wx:if="{{item.receptionStaticInfoDTOList.length}}">
<view class="date-section sticky-date-section bg-white">
<text class="date">{{item.staticDate}}</text>
<text class="summary-item">交付量 {{item.summary.deliveries}}</text>
<text class="line"></text>
<text class="summary-item">触客数 {{item.summary.customers}}</text>
<text class="line"></text>
<text class="summary-item blue {{item.isFilterUpgrade ? 'blue-blod' : ''}}" data-type="upgrade" bindtap="filterItemData">升级 {{item.upgrades}}</text>
<text class="line"></text>
<text class="summary-item blue {{item.isFilterDefeat ? 'blue-blod' : ''}}" data-type="defeat" bindtap="filterItemData">战败 {{item.losses}}</text>
</view>
<block wx:for="{{item.receptionStaticInfoDTOList}}" wx:key="time" wx:for-index="subIndex" wx:for-item="record">
<view class="record-card">
<view class="record-card-top">
<text class="round-dot">{{subIndex + 1}}</text>
<view class="card-line"></view>
</view>
<view class="card-item">
<record-item record="{{record}}"></record-item>
</view>
</view>
</block>
</block>
</block>
</view>
</scroll-view>
</view>
<page-container show="{{ show_reception_confirm }}" duration="{{ 0 }}" overlay="{{ false }}" bind:afterleave="containerBack">
<view wx:if="{{ showReceptionRendering }}">
<reception-screen show="{{ show_reception_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" bindconfirm="searchScreen" />
</view>
</page-container>
\ No newline at end of file \ No newline at end of file
import api from '~/utils/request/request.js'
module.exports = {
// 查询门店日期范围内接待记录统计数据
getReceptionRecordList(data) {
return api.post("dj.api.smartcarlife.recepiton.receptionStaticList", data)
},
// 获取员工数据(筛选)
getStaffListApi(data) {
return api.post("dj.api.smartcarlife.recepiton.findRecepStaffByMerchantId", data)
},
// 分页查询接待列表
getRecordDetailList(data) {
return api.post("dj.api.smartcarlife.reception.findReceptionByConditionPage", data)
}
}
\ No newline at end of file \ No newline at end of file
...@@ -63,7 +63,8 @@ const domain_items = { ...@@ -63,7 +63,8 @@ const domain_items = {
// dj: 'http://192.168.1.88:8292', //周杭 // dj: 'http://192.168.1.88:8292', //周杭
// dj: 'http://192.168.1.116:8292',//陈希 // dj: 'http://192.168.1.116:8292',//陈希
// dj: 'http://192.168.1.60:8292',//周立明 // dj: 'http://192.168.1.60:8292',//周立明
dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
dj: 'http://192.168.148.221:8292',
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
scrm: "https://scrm.dev.glsx.com.cn", scrm: "https://scrm.dev.glsx.com.cn",
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!