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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title>个人工作台-已办</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
@@include('../include/common_css.html')
@@include('../include/common_js.html')
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="x-nav">
<span class="layui-breadcrumb">
<a href="">首页</a>
<a href="">个人工作台</a>
<a><cite>已办事项</cite></a>
</span>
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
onclick="location.reload()" title="刷新">
<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
@@include('../include/common_table.html')
<div class="layui-card-body " style="min-height: 300px">
<table id="already" lay-filter="survey" style="text-align: center"></table>
</div>
</div>
</div>
</div>
</div>
</body>
<style>
.layui-table-cell {
text-align: center;
}
.layui-table-cell .layui-table-link {
color: #666;
}
.layui-table-page > div {
text-align: end;
}
.layui-btn-primary {
border: 1px solid #e6e6e6;
background-color: #fbfbfb;
color: #C9C9C9;
}
.layui-btn-primary:hover {
border: 1px solid #e6e6e6;
background-color: #FBFBFB;
}
.layui-table-cell {
height: 31px;
}
</style>
@@include('../include/common_card_style.html')
<script>
var pageNow = 1
$(function () {
let temp = window.location.href.split('?')[1]?window.location.href.split('?')[1].split('pageBack=')[1].split('&')[0]:""
if (temp) {
pageNow = temp
}
})
layui.use('table', function () {
var table = layui.table;
var searchAlreadyTitle=util.interfaceUrl+interfacenName.getCompleteTask;
//第一个实例
table.render({
elem: '#already'
, height: 525
, method: "get"
, url: util.interfaceUrl + interfacenName.getCompleteTask
, limits:[10,20,30]
, headers: {
'Authorization': userToken,
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
done: function (res) {
},
parseData: function (res) {
if(res.rows&&res.rows.length==0){
return {
"code": 500, //解析接口状态
"msg": "无数据", //解析提示文本
}
}
for (let i in res.rows){
res.rows[i]['pageNow'] = res.pageNu
}
return {
"code": 0, //解析接口状态
"msg": "", //解析提示文本
"count": res.total, //解析数据长度
"data": res.rows
};
}
, contentType: "json"
, request: {
pageName: "page",
limitName: "rows",
}
, edit: "text"
,where:{
sort:"aht.END_TIME_ desc",
}
, cols: [[ //表头
{
field: 'projectId', title: '项目ID', fixed: 'left', width: 110,
templet: function (d) {
if(d.jzType==0){
return '<div><a class="layui-table-link" href="baseReplace.html?businessId=' + d.jzBusinessKey+ '&pageNow='+d.pageNow+'&pageName=already">' + util.dealWithFormatTextByLen(d.projectId, 20, true) + '</a></div>'
}
else if(d.jzType==1){
return '<div><a class="layui-table-link" href="base.html?businessId=' + d.jzBusinessKey+ '&pageNow='+d.pageNow+'&pageName=already">' + util.dealWithFormatTextByLen(d.projectId, 20, true) + '</a></div>'
}
else if(d.jzType==2){
return '<div><a class="layui-table-link" href="baseOther.html?businessId=' + d.jzBusinessKey+ '&pageNow='+d.pageNow+'&pageName=already">' + util.dealWithFormatTextByLen(d.projectId, 20, true) + '</a></div>'
}
}
}
, {
field: 'jzCode', title: '基站号', width: 110,
templet: function (d) {
return '<div>' + util.dealWithFormatTextByLen(d.jzCode, 20, true) + '</a></div>'
}
}
, {
field: 'jzName', title: '基站名', width: 110,
templet: function (d) {
return '<div>' + util.dealWithFormatTextByLen(d.jzName, 20, true) + '</a></div>'
}
}
, {
field: 'ywxName', title: '业务线', width: 110,
templet: function (d) {
return '<div>' + util.dealWithFormatTextByLen(d.ywxName, 20, true) + '</a></div>'
}
}
, {
field: 'jzYys', title: '运营商', width: 110,
templet: function (d) {
return '<div>' + util.dealWithFormatTextByLen(d.yysName, 20, true) + '</a></div>'
}
}
, {
field: 'jzQy', title: '区域', width: 110,
templet: function (d) {
return '<div>' + util.dealWithFormatTextByLen(d.jzQy, 20, true) + '</a></div>'
}
}
, {
field: 'jzType', title: '类型', width: 110,
templet:function (d) {
if(d.jzType){
if(d.jzType==0){
return '<div>' + util.dealWithFormatTextByLen('代缴站',20,true)+ '</a></div>'
}
else if (d.jzType==1){
return '<div>' + util.dealWithFormatTextByLen('移动',20,true)+ '</a></div>'
}
else {
return '<div>' + util.dealWithFormatTextByLen('铁塔', 20, true) + '</a></div>'
}
}
}
}
, {
field: 'jzDept', title: '部门', width: 110,
templet: function (d) {
return '<div>' + util.dealWithFormatTextByLen(d.jzDept, 20, true) + '</a></div>'
}
},
{
field: 'jzCreatDate', title: '创建时间', width:110, sort: true,
templet: function (d) {
return '<div>' + util.dealWithFormatTextByLen(d.jzCreatDate, 10, false) + '</a></div>'
}
}
,{field: 'typeTemplate', title: '所属流程', width: 110,
templet: function (d){
if(d.typeTemplate){
var jsonTemp = {
"S01": '修改信息',
"S02": '更换负责人',
"S03": '需求取消 ',
"S04":"拆站",
"S05":"维护部拆站",
"S06":"维护部修改",
"M01": '选址成功',
"M02": '选址失败',
"M03": '勘察',
"M04": '会审',
"M05": '交底',
"M06": '领料',
"M07": '施工验收',
"M08": '开通',
"M09": '签署订单',
"M10": '交资',
"M11": '交维',
"T01": '选址成功',
"T02": '选址失败',
"T03": '勘察',
"T04": '会审',
"T05": '立项',
"T06": '领料',
"T07": '施工',
"T08": '完工',
"T09": '交付',
"T10": '起租',
"T11": '签订租赁与电费合同',
"T12": '交维',
}
var jtemp = jsonTemp[d.typeTemplate]
let spanclassName = "";
switch (jtemp) {
case '需求取消':
case '已取消':
spanclassName = 'layui-btn layui-btn-primary layui-btn-xs';
break;
default:
spanclassName = "layui-btn layui-btn-normal layui-btn-xs";
break;
}
return '<div> '+'<span class="' + spanclassName + '" style="display: inline-block;min-width: 70px;text-align: justify;text-align-last: justify;">' +jtemp + '</span>'+'</a></div>'
}else{
return '<div></div>'
}
}
}
,{field: 'taskName', title: '当前节点', width: 110,
templet: function (d){
return '<div>' + util.dealWithFormatTextByLen(d.taskName,6,false) + '</a></div>'
}
}, {title: '操作', width: 190, toolbar: "#barDemo", fixed: 'right'}
]]
, id: 'testReload'
, page: {
curr: pageNow,
}
});
var $ = layui.$, active = {
reload: function (searchAlreadyTitle) {
var jzm = $('#name').val();
var jzm = $("#name").val();
var jzh = $("#number").val();
var fzr = $("#principal").val();
var jzbh = $("#projectnumber").val();
var qy = $("#area").val() == '请选择区域' ? '' : $("#area").val();
var ywx = $("#businessline").val() == '请选择业务线' ? '' : $("#businessline").val();
var sykh = $("#upcustom").val() == '请选择上游客户' ? '' : $("#upcustom").val();
var yys = $("#jz_costom").val() == '请选择运营商' ? '' : $("#jz_costom").val();
var jzzt = $("#state").val() == '请选择基站状态' ? '' : $("#state").val();
var bm = $("#department").val() == '部门' ? '' : $("#department").val()
//执行重载
table.reload('testReload', {
page: {
url:searchAlreadyTitle,
curr: 1 //重新从第 1 页开始
}
, where: {
jzName: jzm,
jzCode: jzh,
jzProjectOwner: fzr,
projectCode: jzbh,
jzQy: qy,
businessLine: ywx,
jzUpCustom: sykh,
jzYys: yys,
jzState: jzzt,
deptName: bm,
}
}, 'data');
}
};
$('#searchbox #btn-submit').on('click', function () {
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
$('#searchbox #restbtn').on('click', function(){
$('#name').val("");
$("#number").val("");
$("#principal").val("");
$("#projectnumber").val("");
$("#area").val("");
$("#businessline").val("");
$("#upcustom").val("");
$("#jz_costom").val("");
$("#state").val("");
$("#department").val("");
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
})
</script>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-mini" lay-event="dealWith" href="./already-click.html?taskId={{d.taskId}}&pageNow={{d.pageNow}}"><i class="layui-icon"></i>查看</a>
</script>