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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
| layui.define([ 'form', 'laydate', 'table' ], function(exports) {
| var form = layui.form;
| var laydate = layui.laydate;
| var table = layui.table;
| var moneyTable = null;
| var data = {};
| var view ={
|
| init:function(e){
| data = e;
| this.initTable();
| },
| initTable:function(){
| moneyTable = table.render({
| elem : '#complaint',
| method : 'post',
| enabledCurrCookie: true,
| id:'xxx',
| url : Common.ctxPath+ '/admin/complaint/order/queryComplaintList.json' //数据接口
| ,page : true //开启分页
| ,limit : 10,
| where: data,
| parseData :function(res){ //res 即为原始返回的数据
| if(res.data.length == 0){
| Common.info('并没有数据');
| }
| return res;
| },
| cols : [ [ //表头
| {
| field: 'orderId',
| title : '订单号',
| width : 200,
| templet: function (d) {
| if(d.orderId == null || d.orderId.length === 0){
| return '--';
| }
| return d.orderId;
| }
| },{
| field: 'createTime',
| title : '创建时间',
| width : 200,
| templet: function (d) {
| if(d.createTime == null || d.createTime.length === 0){
| return '--';
| }
| return d.createTime;
| },
| sort : true
| },{
| field : 'reserveTime',
| title : '预约时间',
| width : 200,
| templet: function (d) {
| if(d.reserveTime == null || d.reserveTime.length === 0){
| return '--';
| }
| return d.reserveTime;
| },
| sort : true
| }, {
| field : 'orderType',
| title : '订单类型',
| width : 120,
| templet:function (data) {
| if(data.orderType == 1){
| return '回收';
| }else if(data.orderType == 2){
| return '带丢';
| }else{
| 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 : 'afterSaleFlag',
| title : '售后状态',
| width : 120,
| templet: function (data) {
| if(data.afterSaleFlag == 0){
| return '未处理';
| }else if(data.afterSaleFlag == 1){
| return '已处理';
| }else if(data.afterSaleFlag == 2){
| return '已取消';
| }else if(data.afterSaleFlag == 3){
| return '重新派单';
| }else{
| return '未知状态';
| }
| }
| },
| {
| title : '回收员',
| width : 120,
| templet: function (d) {
| if(d.nickNamex == null || d.nickNamex.length === 0){
| return '--';
| }
| var base = new Base64();
| return base.decode(d.nickNamex);
|
| }
| },
| {
| field: 'relaName',
| title: '客户',
| width: 120,
| templet: function (d) {
| if(d.relaName == null || d.relaName.length === 0){
| return '--';
| }
| return d.relaName;
| }
| },{
| field: 'money',
| title: '金额',
| width: 120,
| templet: function (d) {
| if(d.money == null || d.money.length === 0){
| return '--';
| }
| return parseFloat(d.money).toFixed(2) + '元';
| },
| sort : true
| },
| {
| field: '',
| title: '操作',
| templet: function (data) {
| data['page'] = moneyTable.config.page.pages;
| data['limit'] = moneyTable.config.page.limit;
| return '<button class="layui-btn layui-btn-xs" ' +
| 'onclick="openDiv('+JSON.stringify(data).replace(/\"/g,"'")+')" ' +
| 'lay-event="detail">查看售后单</button>';
| }
| }
| ] ]
|
| });
| },
|
| }
|
|
| exports('index',view);
|
| });
|
|