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
| layui.define([ 'form', 'laydate', 'table' ], function(exports) {
| var form = layui.form;
| var laydate = layui.laydate;
| var table = layui.table;
| var orderStatisTodayMore = null;
| var data = null;
| laydate.render({
| elem: '#date',
| format: 'yyyy-MM-dd HH:mm'
| });
| laydate.render({
| elem: '#date1',
| format: 'yyyy-MM-dd HH:mm'
| });
|
|
| var view ={
|
| init:function(d){
| data = d;
| this.initTable();
| },
| initTable:function(){
| orderStatisTodayMore = table.render({
| elem : '#orderStatisTodayMore',
| // height : 'full-180',
| method : 'post',
| url : Common.ctxPath+ '/admin/order/statistics/detailList.json', //数据接口
| where :data,
| page : {"layout":['count','prev', 'page', 'next']} //开启分页
| ,limit : 20,
| parseData :function(res){ //res 即为原始返回的数据
| if(res.data.length == 0){
| Common.info('并没有数据');
| }
| return res;
| },
| cols : [ [ //表头
| {
| field : 'name',
| title : '回收人',
| width : 120,
| templet: function (data) {
| if (data.name == null) {
| return '--';
| } else {
| return data.name;
| }
| }
| },{
| field : 'ordertotal',
| title : '完成回收订单',
| width : 150
| },{
| field : 'weight',
| title : '入库重量',
| width : 120,
| templet:function(d){
| return d.weight.toFixed(2)+'kg';
| }
| }, {
| field : 'xx',
| title : '误差',
| width : 120,
| templet:function(d){
| return d.weightSub.toFixed(2)+'kg/'+d.moneySub.toFixed(2)+'元';
| }
| }, {
| field : 'money',
| title : '金额',
| width : 120,
| templet:function(d){
| return d.money.toFixed(2)+'元';
| }
| },{
| field : 'storageusername',
| title : '仓库员姓名',
| width : 120,
| templet: function (data) {
| if (data.storageusername == null) {
| return '--';
| } else {
| return $.base64.atob(data.storageusername, true);
| }
| }
| },
| {
| title : '操作',
| width : 120,
| templet:function(d){
| console.log(d);
| return '<a href="receiverDetal.do?name='+d.name+'&phone='+d.receiverphone+'&flag=1">更多</a>';
| },
| sort : true
| }
|
|
| ] ]
|
| });
| },
| };
|
|
|
|
|
|
|
| exports('orderStatisticsTodayMore',view);
|
| });
|
|