You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

50 lines
1.3 KiB

// pages/orderList/orderList.js
const app = getApp();
var network = require("../../utils/net.js");
var timechage = require("../../utils/dateTimeUtil.js");
var getOrderList = '/MainSystem/B3MiniProgramRpc/XuRpcs/Driver/CarRecordRpc/GetList'
Page({
data: {
orderList: [],
},
onShow: function(options) {
var that = this;
var method = getOrderList;
network.transfer_request(method, [app.globalData.Phone], function(res) {
var array = res.result;
if (array.length <= 0) {
wx: wx.showToast({
title: '暂无订单数据',
})
return;
}
let getArr = [];
for (var i = 0; i < array.length; i++) {
var dmo = {
ID: array[i].ID,
Customer_Name: array[i].Customer_Name,
LoadTime: timechage.formatTimeTwo(array[i].LoadTime.substring(6, 19), 'Y/M/D'),
Employee_Name: array[i].Employee_Name,
TotalNumber: array[i].TotalNumber,
Address: array[i].Address,
}
getArr.push(dmo);
}
that.setData({
orderList: getArr,
})
})
},
//点击进入详情页面
transToOrderDetail: function(event) {
var itemID = event.currentTarget.dataset.detailitemid;
wx.navigateTo({
url: 'orderDetail/orderDetail?id=' + itemID,
})
},
})