Commit a4a5cb29 by 张立顺

feat 功能联调

1 parent ee89d401
...@@ -20,7 +20,8 @@ Page({ ...@@ -20,7 +20,8 @@ Page({
count: 0, count: 0,
text: '亏损预警' text: '亏损预警'
} }
] ],
list: []
}, },
getWarningStores() { getWarningStores() {
let { month, staffUuid, regionId, tabList } = this.data let { month, staffUuid, regionId, tabList } = this.data
...@@ -33,18 +34,18 @@ Page({ ...@@ -33,18 +34,18 @@ Page({
} }
IndexApi.getWarningStores(params).then(res => { IndexApi.getWarningStores(params).then(res => {
console.log(res, 'res') console.log(res, 'res')
let { backstopWarningList = [], lostShopWarningList = [], lossWarningList = [] } = let { backstopWarningCount, lostShopWarningCount, lossWarningCount, backstopWarningList = [], lostShopWarningList = [], lossWarningList = [] } =
res.data res.data
tabList[0].count = backstopWarningList?.length || 0 tabList[0].count = backstopWarningCount || 0
tabList[1].count = lostShopWarningList?.length || 0 tabList[1].count = lostShopWarningCount || 0
tabList[2].count = lossWarningList?.length || 0 tabList[2].count = lossWarningCount
// list 根据 // list 根据
this.setData({ this.setData({
tabList, tabList,
backstopWarningList, backstopWarningList,
lostShopWarningList, lostShopWarningList,
lossWarningList, lossWarningList,
list: backstopWarningList list: backstopWarningList || []
}) })
}) })
}, },
...@@ -94,7 +95,7 @@ Page({ ...@@ -94,7 +95,7 @@ Page({
: lossWarningList : lossWarningList
this.setData({ this.setData({
activeIndex: e.detail, activeIndex: e.detail,
list list: list || []
}) })
}, },
navigateToStoreDetail(e) { navigateToStoreDetail(e) {
......
...@@ -151,4 +151,22 @@ ...@@ -151,4 +151,22 @@
margin-right: 10rpx; margin-right: 10rpx;
line-height: 40rpx; line-height: 40rpx;
padding: 0rpx 8rpx; padding: 0rpx 8rpx;
}
.nothing {
padding: var(--fontSize30) 0;
text-align: center;
// font-size: var(--fontSize28);
color: #999ea8;
font-size: 24rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.img {
width: 172rpx;
height: 172rpx;
// margin-bottom: 40rpx;
}
} }
\ No newline at end of file \ No newline at end of file
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" /> <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" />
<scroll-view class="scrollView" scroll-y style="height: calc(100vh - 80px);"> <scroll-view class="scrollView" scroll-y style="height: calc(100vh - 80px);">
<view class="list"> <view class="list">
<!-- wx:for="{{ list }}" wx:key="index" --> <!-- wx:for="{{ list }}" wx:key="index" -->
<view class="box" wx:for="{{ list }}" wx:key="index" data-item="{{ item }}" bindtap="navigateToStoreDetail"> <view class="box" wx:for="{{ list }}" wx:key="index" data-item="{{ item }}" bindtap="navigateToStoreDetail">
<text class="merchant"><text class="status {{ item.storeType == 1?'newStore':'oldStore' }}">{{item.storeType == 1?'新店':'老店'}}</text><text class="merchantName">{{item.merchantName}}</text></text> <text class="merchant"><text class="status {{ item.storeType == 1?'newStore':'oldStore' }}">{{item.storeType == 1?'新店':'老店'}}</text><text class="merchantName">{{item.merchantName}}</text></text>
<view class="introduction merchantInfo"> <view class="introduction merchantInfo">
<view class="item"> <view class="item">
<!-- <view class="left children"> --> <!-- <view class="left children"> -->
<view class="label">拜访次数</view> <view class="label">拜访次数</view>
<view class="content">{{item.visitTimes?item.visitTimes+'次':'-'}}</view> <view class="content">{{item.visitTimes?item.visitTimes+'次':'-'}}</view>
<!-- </view> --> <!-- </view> -->
<!-- <view class="right children"> <!-- <view class="right children">
<view class="label">销售人员</view> <view class="label">销售人员</view>
<view class="content text-hide">{{item.visitCount?item.visitCount+'次':'-'}}</view> <view class="content text-hide">{{item.visitCount?item.visitCount+'次':'-'}}</view>
</view> --> </view> -->
</view> </view>
<view class="item"> <view class="item">
<view class="label person">销售人员</view> <view class="label person">销售人员</view>
<!-- <view class="content text-hide" wx:for="{{item.salePersonnelInfoDTOList}}" wx:key="index" >{{item.salePersonnelInfoDTOList[index].salePersonnelName}}</view> --> <!-- <view class="content text-hide" wx:for="{{item.salePersonnelInfoDTOList}}" wx:key="index" >{{item.salePersonnelInfoDTOList[index].salePersonnelName}}</view> -->
</view> </view>
<view class="item"> <view class="item">
<view class="label person">签约时间</view> <view class="label person">签约时间</view>
<view class="content">{{item.signedTime||'-'}}</view> <view class="content">{{item.signedTime||'-'}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label person">展业时间</view> <view class="label person">展业时间</view>
<view class="content">{{item.expectedOperationDate||'-'}}</view> <view class="content">{{item.expectedOperationDate||'-'}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label person">门店地址</view> <view class="label person">门店地址</view>
<view class="content">{{item.address||'-'}}</view> <view class="content">{{item.address||'-'}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<block wx:if="{{ list.length <= 0 }}">
<view class="nothing">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
<view class="text">暂无数据</view>
</view>
</block>
</scroll-view> </scroll-view>
\ No newline at end of file \ No newline at end of file
...@@ -23,7 +23,7 @@ Page({ ...@@ -23,7 +23,7 @@ Page({
table: result table: result
}) })
}) })
.catch(err => {}) .catch(err => { })
}, },
handleMonthChange: function (e) { handleMonthChange: function (e) {
// 判断是不是当前月,是取当前日期;不是取该月第一天 // 判断是不是当前月,是取当前日期;不是取该月第一天
...@@ -62,6 +62,9 @@ Page({ ...@@ -62,6 +62,9 @@ Page({
console.log(reportDate) console.log(reportDate)
this.getList() this.getList()
}, },
onCreateVisit() {
wx.$router.go('salesDailyReport')
},
toDetail(e) { toDetail(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let { orderObj } = this.data let { orderObj } = this.data
...@@ -171,35 +174,35 @@ Page({ ...@@ -171,35 +174,35 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
/* packageTool/pages/salesReport/salesReport.wxss */ /* packageTool/pages/salesReport/salesReport.wxss */
Page { Page {
background: #f7f8fa; background: #f7f8fa;
padding-bottom: 50rpx; padding-bottom: 125rpx;
} }
.main { .main {
...@@ -118,4 +118,32 @@ Page { ...@@ -118,4 +118,32 @@ Page {
height: 172rpx; height: 172rpx;
// margin-bottom: 40rpx; // margin-bottom: 40rpx;
} }
}
.bottom-bar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #fff;
box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
.inner {
padding: 20rpx 32rpx calc(8px + env(safe-area-inset-bottom));
.btn {
height: 80rpx;
text-align: center;
line-height: 80rpx;
color: #FFFFFF;
font-size: 32rpx;
font-weight: 500;
border-radius: 12rpx;
background: #347BFF;
}
}
}
.safe-area-bottom {
padding-bottom: calc(8px + env(safe-area-inset-bottom));
} }
\ No newline at end of file \ No newline at end of file
<!--packageTool/pages/salesReport/salesReport.wxml--> <!--packageTool/pages/salesReport/salesReport.wxml-->
<!-- <view style="margin-top:{{ navBarHeight }}px"> --> <!-- <view style="margin-top:{{ navBarHeight }}px"> -->
<view class="main"> <view class="main">
<!-- <weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar> --> <!-- <weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar> -->
<month-switcher bind:monthChange="handleMonthChange" currentMonth="{{ currentMonth }}"></month-switcher> <month-switcher bind:monthChange="handleMonthChange" currentMonth="{{ currentMonth }}"></month-switcher>
<view class="staffBox"> <view class="staffBox">
<view class="title"> <view class="title">
<view class="name">销售名称</view> <view class="name">销售名称</view>
<view class="num">已填日报</view> <view class="num">已填日报</view>
<view class="num">未填日报</view> <view class="num">未填日报</view>
<view class="num">应填日报</view> <view class="num">应填日报</view>
</view> </view>
<view class="listItem" wx:for="{{ table }}" bind:tap="toDetail" data-item="{{ item }}" wx:key="index"> <view class="listItem" wx:for="{{ table }}" bind:tap="toDetail" data-item="{{ item }}" wx:key="index">
<view class="name"> <view class="name">
<view class="text-hide">{{item.staffName}}</view> <view class="text-hide">{{item.staffName}}</view>
<view class="area" wx:if="{{ userInfo.loginRole == 1 }}">{{item.regionName}}</view> <view class="area" wx:if="{{ userInfo.loginRole == 1 }}">{{item.regionName}}</view>
</view> </view>
<view class="num">{{item.filledReportNum||0}}</view> <view class="num">{{item.filledReportNum||0}}</view>
<view class="num {{ item.notFilledReportNum > 0?'danger':'' }}">{{item.notFilledReportNum||0}}</view> <view class="num {{ item.notFilledReportNum > 0?'danger':'' }}">{{item.notFilledReportNum||0}}</view>
<view class="num">{{ item.shouldFilledReportNum ||0}}</view> <view class="num">{{ item.shouldFilledReportNum ||0}}</view>
</view> </view>
<block wx:if="{{ table.length <= 0 }}"> <block wx:if="{{ table.length <= 0 }}">
<view class="nothing"> <view class="nothing">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image> <glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
<view class="text">暂无数据</view> <view class="text">暂无数据</view>
</view> </view>
</block> </block>
</view> </view>
</view>
<!-- 底部固定操作条:新增拜访 -->
<view class="bottom-bar" wx:if="{{userInfo.loginRole == 2}}">
<view class="inner safe-area-bottom">
<view class="btn" bind:tap="onCreateVisit">日报填写</view>
</view>
</view> </view>
<!-- </view> --> <!-- </view> -->
\ No newline at end of file \ No newline at end of file
...@@ -45,7 +45,7 @@ Component({ ...@@ -45,7 +45,7 @@ Component({
{ {
name: '完成率', name: '完成率',
key: 'completionRate', key: 'completionRate',
width: 'var(--fontSize84)', width: 'var(--fontSize100)',
unit: '%' unit: '%'
} }
], ],
...@@ -154,7 +154,7 @@ Component({ ...@@ -154,7 +154,7 @@ Component({
// 跳转客户页面 // 跳转客户页面
getCustomerPage(e) { getCustomerPage(e) {
let { type } = e.currentTarget.dataset let { type } = e.currentTarget.dataset
app.setTabParams('customer', {type}) app.setTabParams('customer', { type })
wx.switchTab({ wx.switchTab({
url: `/pages/tab/customer/customer` url: `/pages/tab/customer/customer`
}) })
......
...@@ -41,6 +41,8 @@ Component({ ...@@ -41,6 +41,8 @@ Component({
monthPickerShow: false, monthPickerShow: false,
minMonthDate: __MIN_YM_TS__, minMonthDate: __MIN_YM_TS__,
maxMonthDate: __CUR_YM_TS__, maxMonthDate: __CUR_YM_TS__,
monthPickerValue: __CUR_YM_TS__,
pendingMonthValue: 0,
warningStores: { warningStores: {
backstopWarningCount: 0, backstopWarningCount: 0,
lossWarningCount: 0, lossWarningCount: 0,
...@@ -67,15 +69,25 @@ Component({ ...@@ -67,15 +69,25 @@ Component({
const val = this.data.pendingMonthValue || this.data.monthPickerValue const val = this.data.pendingMonthValue || this.data.monthPickerValue
if (val) { if (val) {
const d = new Date(val) const d = new Date(val)
console.log(val, d)
this.setData( this.setData(
{ {
monthPickerValue: val, monthPickerValue: val,
boardMonthText: `${d.getMonth() + 1}月`, boardMonthText: `${d.getMonth() + 1}月`,
boardMonthActive: true, boardMonthActive: true,
boardScopeActive: false boardScopeActive: false,
// yyyy-MM(月份补零)
// value: `${y}-${String(m).padStart(2, '0')}`,
// M(回显用,不补零)
// name: `${m}月`
month: `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(
2,
'0'
)}`,
showMonth: `${d.getMonth() + 1}月`
}, },
() => { () => {
this.getPageData() this.getWarningStores()
} }
) )
} }
......
...@@ -12,47 +12,38 @@ ...@@ -12,47 +12,38 @@
style="height: {{ tableHeight }};" style="height: {{ tableHeight }};"
> --> > -->
<view class="table" wx:if="{{ table.length > 0 }}"> <view class="table" wx:if="{{ table.length > 0 }}">
<view class="table-box"> <view class="table-box">
<view class="table-header" style="width: var(--fontSize{{ tableWidth }})"> <view class="table-header" style="width: var(--fontSize{{ tableWidth }})">
<view class="label">{{headerConfig.name}}</view> <view class="label">{{headerConfig.name}}</view>
<view class="values"> <view class="values">
<!-- {{ tableSort == index?'active':'' }} --> <!-- {{ tableSort == index?'active':'' }} -->
<block wx:for="{{ tableObj }}" wx:key="index"> <block wx:for="{{ tableObj }}" wx:key="index">
<!-- bindtap="changeTableSort" --> <!-- bindtap="changeTableSort" -->
<view class="value" style="width: {{ item.width }};" id="header-{{ index }}" data-index="{{ index }}"> <view class="value" style="width: {{ item.width }};" id="header-{{ index }}" data-index="{{ index }}">
<view class="lable"> <view class="lable">
<view class="name">{{item.name}}{{item.unit}}</view> <view class="name">{{item.name}}</view>
</view> </view>
<!-- <view class="sort-list"> <!-- <view class="sort-list">
<view class="up {{ item.sort?'sort-active':'' }}" /> <view class="up {{ item.sort?'sort-active':'' }}" />
<view class="down {{ !item.sort?'sort-active':'' }}" /> <view class="down {{ !item.sort?'sort-active':'' }}" />
</view> --> </view> -->
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<scroll-view <scroll-view scroll-x scroll-y show-scrollbar="{{ false }}" bindrefresherrefresh="restPageNum" bindscrolltolower="scrollonReachBottom" refresher-threshold="304" refresher-triggered="{{ triggered }}" style="height: {{ itemTableHeight }}rpx;">
scroll-x <view class="table-body">
scroll-y <block wx:if="{{ tableFlag }}">
show-scrollbar="{{ false }}" <block wx:if="{{ table.length > 0 }}">
bindrefresherrefresh="restPageNum" <block wx:for="{{ table }}" wx:key="index">
bindscrolltolower="scrollonReachBottom" <view class="th" style="width: var(--fontSize{{ tableWidth }})">
refresher-threshold="304" <view class="name" bind:tap="onTableClick" data-item="{{ item }}">
refresher-triggered="{{ triggered }}" <view class="labelName {{ item[headerConfig.key].length<=10?'oneLine':'' }}">{{item[headerConfig.key]}}</view>
style="height: {{ itemTableHeight }}rpx;" </view>
> <view class="values">
<view class="table-body"> <block wx:for="{{ tableObj }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<block wx:if="{{ tableFlag }}"> <view class="td text-center" style="width: {{ tableObj[ind]['width'] }};">
<block wx:if="{{ table.length > 0 }}"> <!-- <block wx:if="{{ i.key == 'filmTimes' }}">
<block wx:for="{{ table }}" wx:key="index">
<view class="th" style="width: var(--fontSize{{ tableWidth }})">
<view class="name" bind:tap="onTableClick" data-item="{{ item }}">
<view class="labelName {{ item[headerConfig.key].length<=10?'oneLine':'' }}">{{item[headerConfig.key]}}</view>
</view>
<view class="values">
<block wx:for="{{ tableObj }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view class="td text-center" style="width: {{ tableObj[ind]['width'] }};">
<!-- <block wx:if="{{ i.key == 'filmTimes' }}">
<view <view
class="text-center" class="text-center"
style="width:100%;height: 100%;color:{{ isYqdSuper?'#347BFF':'#333333' }}" style="width:100%;height: 100%;color:{{ isYqdSuper?'#347BFF':'#333333' }}"
...@@ -61,23 +52,23 @@ ...@@ -61,23 +52,23 @@
>{{item[i.key] || 0}}</view> >{{item[i.key] || 0}}</view>
</block> </block>
<block wx:elif="{{ i.key == 'upgradeRate' }}">{{item[i.key] || 0}}%</block> --> <block wx:elif="{{ i.key == 'upgradeRate' }}">{{item[i.key] || 0}}%</block> -->
<block>{{item[i.key] || 0}}</block> <block>{{item[i.key] || 0}}{{i.unit}}</block>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</block> </block>
</block> </block>
</block> </block>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<block wx:if="{{ table.length <= 0 }}"> <block wx:if="{{ table.length <= 0 }}">
<view class="nothing"> <view class="nothing">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image> <glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
<view class="text">暂无数据</view> <view class="text">暂无数据</view>
</view> </view>
</block> </block>
<!-- <view class="showMore"> <!-- <view class="showMore">
<view class="btn">加载更多</view> <view class="btn">加载更多</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!