1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
| layui.define([ 'form', 'laydate', 'table' ], function(exports) {
| var form = layui.form;
| var laydate = layui.laydate;
| var table = layui.table;
| var userApi=layui.userApi;
| var userTable = null;
| var data = {};
| laydate.render({
| elem: '#date',
| format: 'yyyy-MM-dd HH:mm:ss'
| });
| laydate.render({
| elem: '#date1',
| format: 'yyyy-MM-dd HH:mm:ss'
| });
|
| var view ={
| init:function(d){
| data = d;
| this.initTable();
| },
| initTable:function(){
| userTable = table.render({
| elem : '#orderList',
| method : 'post',
| url : Common.ctxPath + '/admin/order/recovery/queryOrderList.json' //数据接口
| ,page : true //开启分页
| ,where: data
| ,limit : 20,
| cols : [ [ //表头
| {
| field : 'orderId',
| title : '订单号',
| width : 200,
| fixed:'left'
| }, {
| field : 'createTime',
| title : '下单时间',
| width : 160,
| sort : true
| }, {
| field : 'reserveTime',
| title : '预约时间',
| width : 160,
| sort : true
| }, {
| field : 'orderType',
| title : '服务类型',
| width : 120,
| templet:function (data) {
| if(data.orderType == 1){
| return '回收';
| }else if(data.orderType == 2){
| return '带丢';
| }
| }
| }, {
| field : 'orderStatus',
| title : '订单状态',
| width : 120,
| templet: function (data) {
| if(data.orderStatus == 1){
| return '待接单';
| }else if(data.orderStatus == 2){
| return '待服务';
| }else if(data.orderStatus == 3){
| return '待确认';
| }else if(data.orderStatus == 4){
| return '待入库';
| }else if(data.orderStatus == 5){
| return '完成';
| }else if(data.orderStatus == 6){
| return '已取消';
| }else{
| return '未知状态';
| }
| }
| },
| {
| field : 'nickName',
| title : '回收员',
| width : 250,
| templet: function (data) {
| if(data.nickName === null){
| return "--";
| }
| return $.base64.atob(data.nickName, true) + '( 姓名: ' +
| (data.name == null ? '--' : data.name) +')';
| }
| },
| {
| field : 'relaName',
| title : '客户',
| width : 80
| },{
| field: 'money',
| title: '金额',
| width: 80,
| templet:function (d) {
| if(d.money != null){
| return parseFloat(d.money).toFixed(2) + '元';
| }else{
| return 0+'元';
| }
| },
| sort : true
| },{
| field : 'weight',
| title : '重量',
| width : 120,
| templet: function (d) {
| if(d.weight != null){
| return d.weight.toFixed(3) + 'kg';
| }else{
| return 0+'kg';
| }
| },
| sort : true
| }
| ,{
| title : '操作',
| width : 180,
| templet:function(d){
| if(d.orderStatus == 1){
| return '<a class="layui-btn layui-btn-xs" href='+Common.ctxPath+'/admin/order/recovery/recoveryCuser.do?flag=0&userType=2&orderId='+d.orderId+'">派单</a>' +
| '<a onclick="orderDetailByNo(\''+d.orderId+'\')" class="layui-btn layui-btn-xs" lay-event="detail">订单详情</a>';
| }else {
| return '<a onclick="orderDetailByNo(\''+d.orderId+'\')" class="layui-btn layui-btn-xs" lay-event="detail">订单详情</a>';
| }
| }
| }
|
|
| ] ]
|
| });
| }
| };
|
| exports('index',view);
|
| });
|
|