You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
3.3 KiB
JavaScript
139 lines
3.3 KiB
JavaScript
// pages/processed/index.js
|
|
const app = getApp();
|
|
const dateUtil = require('../../utils/dateUtil.js');
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
pageBean:{},
|
|
recordList: [],
|
|
currTime: ''
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
|
|
},
|
|
getServiceOrder: function () {
|
|
var that = this;
|
|
wx.request({
|
|
url: app.globalData.ip + '/user/serviceOrder/console/getServiceOrderListByFollowUserId',
|
|
data: {
|
|
pageNum: 1,
|
|
pageSize: 100,
|
|
state: 2,
|
|
followupUserIdForTest: 232823,
|
|
},
|
|
header: app.globalData.header,
|
|
method: "POST",
|
|
success: function (res) {
|
|
|
|
console.log(res.data);
|
|
if (res.data.status == 200) {
|
|
res.data.data.pageBean.recordList.forEach((item, index) => {
|
|
// console.log(dateUtil.getDataName(item.orderStatusTime));
|
|
// item({ "currTime": dateUtil.getDataName(item.orderStatusTime)})
|
|
item['currTime'] = dateUtil.getDataName(item.orderStatusTime);
|
|
item['orderStatusTimeStr'] = dateUtil.formatDateYMDHM(item.orderStatusTime)+ ' ' + dateUtil.getDataName(item.orderStatusTime);
|
|
// item['updateTimeStr'] = new Date(item.updateTime.replace(/-/g, "/")).getTime()
|
|
})
|
|
that.setData({
|
|
pageBean: res.data.data.pageBean,
|
|
recordList: res.data.data.pageBean.recordList,
|
|
});
|
|
} else {
|
|
//app.showTips(that, res.data.msg);
|
|
}
|
|
|
|
|
|
},
|
|
fail: function (res) {
|
|
console.log(res);
|
|
}
|
|
})
|
|
},
|
|
toDetail(e) {
|
|
var serviceOrderId = e.currentTarget.dataset.serviceorderid;
|
|
var followId = e.currentTarget.dataset.followid;
|
|
var type = e.currentTarget.dataset.type;
|
|
|
|
// * 30.入职跟进
|
|
// * 40.在职维护
|
|
// * 50.离职跟进
|
|
// * 200.已完成
|
|
// * 250.已放弃
|
|
|
|
var urlPath = '/pages/orderDetailOfInterview/index?comeFrom=1&serviceOrderId=' + serviceOrderId + "&followId=" + followId;
|
|
if (type == 30) {
|
|
urlPath = '/pages/orderDetailOfEntry/index?comeFrom=1&serviceOrderId=' + serviceOrderId + "&followId=" + followId;
|
|
} else if (type == 40 || type == 50) {
|
|
urlPath = '/pages/orderDetailOfLeave/index?comeFrom=1&serviceOrderId=' + serviceOrderId + "&followId=" + followId;
|
|
}
|
|
|
|
wx.navigateTo({
|
|
url: urlPath,
|
|
success: function (res) { },
|
|
fail: function (res) { },
|
|
complete: function (res) { },
|
|
})
|
|
},
|
|
makePhone: function (e) {
|
|
console.log(e);
|
|
let telNum = e.currentTarget.dataset['tel'];
|
|
wx.makePhoneCall({
|
|
phoneNumber: telNum //仅为示例,并非真实的电话号码
|
|
})
|
|
},
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
this.getServiceOrder();
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage: function () {
|
|
|
|
}
|
|
}) |