Commit 90f58ed46d4ae5ec91a4082202c335e739463bc2

Authored by wangfan
1 parent 81667ca6

manager-invitation

... ... @@ -39,7 +39,8 @@
"pages/manager-invitation/setting/index",
"pages/manager-invitation/setting/sellers",
"pages/manager-invitation/setting/seller-editor",
"pages/manager-invitation/crm/index"
"pages/manager-invitation/crm/index",
"pages/manager-invitation/setting/history"
],
"subpackages": [
{
... ...
... ... @@ -4,6 +4,7 @@
position:fixed;
width: 100%;
z-index: 10;
top:0;
}
.nav{
font-size: 30rpx;
... ...
... ... @@ -24,6 +24,7 @@
</block>
</view>
</view>
<nav wx:else="" backgroundColor="rgba(0,0,0,0)" style="position: fixed;"></nav>
<view class="editor flex-vc" bindtap="goEditor" wx:if="{{!options.rid}}">修改内容</view>
<!--//商务-->
<template name="tpl-1">
... ...
... ... @@ -56,6 +56,7 @@ image{
line-height: 50rpx;
text-align: center;
align-items:flex-start;
width: 90%;
}
.seller .content:last-child{
margin-bottom: 0;
... ...
// pages/manager-invitation/setting/history.js
import util from '../../../utils/util';
import App from '../../../utils/api';
const {regeneratorRuntime} = global
Page({
offset: 0,
limit: 10,
hasMore: true,
/**
* 页面的初始数据
*/
data: {
list:{},
hasMore:true,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getLists();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if(this.hasMore){
this.getLists(true);
}
},
getLists(hasReachBottom=false){
App.Invitation.InvitationList({
openid:getApp().openid,
offset: this.offset,
limit: this.limit,
}).then(res => {
let list = this.data.list;
let dl=res.data.length;
if (dl > 0) {
res.data.forEach(r => {
let ctime=util.unixtoTime(r.ctime,'YYYY/MM/DD')
r.arrival_timeStr = util.unixtoTime(r.arrival_time, 'HH:II')
list[ctime]=list[ctime]||{'date':ctime,data:[]};
list[ctime].data.push(r)
})
}
let obj={list:list};
if(dl<this.limit && hasReachBottom){
this.hasMore=false;
obj.hasMore=false;
}else{
this.offset+=this.limit;
}
this.setData(obj)
})
},
})
\ No newline at end of file
... ...
{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle":"white",
"usingComponents": {
"nav":"/components/nav/nav",
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
<!--pages/manager-invitation/setting/history.wxml-->
<nav>通知客户记录</nav>
<view class="table-header flex-lr">
<view class="Medium td1 flex-vc" style="align-items: flex-start">客户</view>
<view class="Medium td2 flex-vc" style="align-items: flex-start">桌号</view>
<view class="Medium td3">时间</view>
<view class="Medium td4">操作</view>
</view>
<view class="pages">
<view class="table-body">
<view class="table-block" wx:for="{{list}}" wx:key="list.key">
<view class="date">{{item.date}}</view>
<block wx:for="{{item.data}}" wx:key="item.data.key">
<formids url="/pages/manager-invitation/review?rid={{item.id}}&tplid={{item.template_id}}">
<view class="table-tr flex-lr">
<view class="Medium td1 flex-vc" style="align-items: flex-start">
<block wx:if="{{item.nickname}}">
{{item.nickname}}
</block>
<block wx:elif="{{item.in_openid}}">
客户已查看
</block>
<block wx:else="">
<text style="color:#F05522;">客户未查看</text>
</block>
</view>
<view class="Medium td2 flex-vc" style="align-items: flex-start">{{item.room_name}}</view>
<view class="Medium td3">{{item.arrival_timeStr}}</view>
<view class="Medium td4">详情</view>
</view>
</formids>
</block>
</view>
<view wx:if="{{!hasMore}}" class="hasMore flex-vc">已经到底了</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/manager-invitation/setting/history.wxss */
page{
background-color: #f5f5f5;
}
.table-header{
width: 100%;
position: fixed;
left: 0;
right: 0;
background-color: #ffffff;
height: 120rpx;
line-height: 120rpx;
z-index: 10;
font-size: 34rpx;
}
.pages{
margin-top: 120rpx;
background-color: #F5F5F5;
}
.td1{
margin-left: 40rpx;
}
.td4{
margin-right: 40rpx;
min-width: 68rpx;
}
.td1,.td2{
width: 208rpx;
min-width: 208rpx;
}
.td3{
width: 100%;
text-align: left;
}
.td1,.td2{
height: 80rpx;
overflow: hidden;
}
.date{
background-color: #F5F5F5;
height: 60rpx;
line-height: 60rpx;
font-size: 26rpx;
width: 100%;
text-indent: 40rpx;
}
.table-tr{
background-color: #ffffff;
font-size: 30rpx;
height: 160rpx;
width: 100%;
}
.hasMore{
height: 100rpx;
line-height: 100rpx;
font-size: 30rpx;
color: #aaaaaa;
}
.table-body .td4{
color:#199095;
}
... ...
... ... @@ -17,9 +17,9 @@
</view>
</view>
</formids>
<formids url="/pages/manager-invitation/setting/sellers">
<formids url="/pages/manager-invitation/setting/history">
<view class="row flex-lr" style="padding-top: 34rpx;">
<view>我的预订安排</view>
<view>通知客户记录</view>
<view class="flex-rr">
<view class="more"></view>
</view>
... ...
... ... @@ -39,9 +39,9 @@
</view>
</view>
</formids>
<formids bindclick="gotoSellerBook" wx:if="{{hasManagerInvitation}}">
<formids url="/pages/manager-invitation/review" wx:if="{{hasManagerInvitation}}">
<view class="item flex-lr">
<view class="left">切换到客户经理</view>
<view class="left">客户经理模式</view>
<view class="right">
<image src="http://qn.colorcun.com/custom/lite-yd/image/click.png"></image>
</view>
... ...
... ... @@ -31,7 +31,7 @@
"list": []
},
"miniprogram": {
"current": 47,
"current": 48,
"list": [
{
"id": 0,
... ... @@ -391,6 +391,12 @@
"pathName": "pages/manager-invitation/setting/sellers",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/manager-invitation/setting/history",
"pathName": "pages/manager-invitation/setting/history",
"scene": null
}
]
}
... ...
... ... @@ -215,6 +215,9 @@ export default {
//根据客户经理openid 获取当前用户所负责的顾客
'App.Invitation.Members':null,
//根据客户经理openid 获取当前用户预定列表
'App.Invitation.InvitationList':null,
//上传图片,只能上传单个图片文件
'App.Examples_Upload.UploadQn':null,
}
\ No newline at end of file
... ...