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.
136 lines
2.6 KiB
JavaScript
136 lines
2.6 KiB
JavaScript
// pages/underReview/index.js
|
|
let app = getApp();
|
|
import { timeShowXXX,getUserApplyOrderStatusById } from "../../utils/dateUtil";
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
billList:[],
|
|
from:'',
|
|
searchParam: {
|
|
pageNum: 1,
|
|
pageSize: 100,
|
|
roleTag: 1,
|
|
statusTag:0,
|
|
status:10},
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
|
|
console.log(options.from);
|
|
|
|
this.setData({
|
|
from: options.from
|
|
});
|
|
},
|
|
getList: function (under) {
|
|
var that = this;
|
|
console.log(app.globalData);
|
|
|
|
wx.showLoading({
|
|
title: "加载中",
|
|
});
|
|
|
|
wx.request({
|
|
url: app.globalData.ip + '/user/apply/order/list',
|
|
data: that.data.searchParam,
|
|
header: app.globalData.headers,
|
|
method: "GET",
|
|
success: function (res) {
|
|
console.log(res.data);
|
|
let data = res.data;
|
|
if (res.data.status == 200) {
|
|
if (res.data.data != null && res.data.data.length > 0) {
|
|
res.data.data.forEach((item) => {
|
|
item["updateTimeStr"] = timeShowXXX(item.updateTime);
|
|
item['statusText'] = getUserApplyOrderStatusById(item.status)
|
|
if (app.isNotEmptyCheck(item.userServeRecordDespLatest)) {
|
|
item.userServeRecordDespLatest = item.userServeRecordDespLatest.replace(/「/g, "<span style='color:#4DB54B;margin-right:4px;'>").replace(/」/g, "</span>");
|
|
}
|
|
});
|
|
}
|
|
that.setData({
|
|
billList: res.data.data,
|
|
});
|
|
wx.hideLoading();
|
|
} else {
|
|
app.showTips(that, res.data.msg);
|
|
}
|
|
|
|
},
|
|
fail: function (res) {
|
|
console.log(res);
|
|
|
|
},
|
|
});
|
|
},
|
|
makePhoneCall(e){
|
|
console.log(e);
|
|
wx.makePhoneCall({
|
|
phoneNumber: e.currentTarget.dataset.tel,
|
|
});
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
this.getList();
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
},
|
|
toDetail(e){
|
|
var that = this;
|
|
console.log(e.mark.id);
|
|
console.log(this.data.statusmark);
|
|
wx.navigateTo({
|
|
url: `/pages/channelOrder/index?workOrderId=${e.mark.id}&from=${that.data.from}`,
|
|
// url: `/pages/billDetail/index?id=${e.mark.id}&status=${this.data.statusmark}`
|
|
})
|
|
},
|
|
}) |