Commit e5c4a01d authored by lvtz's avatar lvtz

fix

parent b4b88ada
......@@ -3,6 +3,9 @@ import {
cluesList,
editCrmclues
} from '../../../service/business/potentialcustomer.js';
import {
formatDay
} from '../../../utilities/index.js';
Page({
data: {
localImageRoot: '../../../images/',
......@@ -11,6 +14,8 @@ Page({
sid: 0,
searchName: '',
status: '',
start_date: '',//开始时间
end_date: '',//结束时间
page: 1,
perPage: 10,
hasmore: true,
......@@ -20,10 +25,12 @@ Page({
clueTotal: 0
},
onLoad: function (options) {
const {sid,status} = options;
let today = new Date().getTime()/1000;
const {sid,status,t} = options;
this.setData({
sid,
status: status || ''
status: status || '',
start_date: t? formatDay(today): ''
})
this.clueListGet('init')
},
......@@ -62,13 +69,11 @@ Page({
this.setData({
listLoading: true
})
cluesList({
cluesList(Object.assign({
page: this.data.page,
perPage: this.data.perPage,
school_id: this.data.sid,
name: this.data.searchName,
status: this.data.status
}).then((res) => {
school_id: this.data.sid
},this.data.searchName?{name: this.data.searchName}:'',this.data.status?{status: this.data.status}:'',this.data.start_date?{start_date: this.data.start_date}:'')).then((res) => {
const {
code,
data
......
......@@ -214,12 +214,17 @@ Page({
const {status} = e.currentTarget.dataset;
let url='';
if(status){
url = `/business/pages/orgpotentialcustomer/cluelist?sid=${this.data.sid}&status=${status}`
url = `/business/pages/orgpotentialcustomer/cluelist?sid=${this.data.sid}&status=${status}`
}else{
url = `/business/pages/orgpotentialcustomer/cluelist?sid=${this.data.sid}`
url = `/business/pages/orgpotentialcustomer/cluelist?sid=${this.data.sid}`
}
wx.navigateTo({
url: url
url: url
})
},
toClueListNow(){
wx.navigateTo({
url: `/business/pages/orgpotentialcustomer/cluelist?sid=${this.data.sid}&t=1`
})
},
// 新增线索
......
......@@ -19,11 +19,11 @@
<view class="section-title">关键数据</view>
<view class="static-box">
<view class="line-box">
<view class="item">
<view class="item-title">新增线索</view>
<view class="item" bindtap="toClueListNow">
<view class="item-title">今日新增线索</view>
<view class="item-num">{{cluseInfo.today_clue_count || 0}}</view>
</view>
<view class="item">
<view class="item" bindtap="toClueList" data-status="2">
<view class="item-title">持续跟进</view>
<view class="item-num">{{cluseInfo.following_clue_count || 0}}</view>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment