|
|
@@ -1,6 +1,6 @@
|
|
1
|
1
|
$(document).ready(function () {
|
|
2
|
2
|
initTable();
|
|
3
|
|
- initTables();
|
|
|
3
|
+ initTables();
|
|
4
|
4
|
$(".ss").click(function () {
|
|
5
|
5
|
stype = 1;
|
|
6
|
6
|
initTable();
|
|
|
@@ -97,7 +97,6 @@
|
|
97
|
97
|
// min: 0,
|
|
98
|
98
|
theme: '#00a1cb',
|
|
99
|
99
|
});
|
|
100
|
|
- //来电单位
|
|
101
|
100
|
getAccount()
|
|
102
|
101
|
//反馈单位
|
|
103
|
102
|
getAccounts()
|
|
|
@@ -231,8 +230,15 @@
|
|
231
|
230
|
|
|
232
|
231
|
|
|
233
|
232
|
})
|
|
234
|
|
-function View(val) {
|
|
235
|
|
- return '<div class="imgs" ><a class="xg" onclick= ck("' + val + '") >' + val + '</a></div>';
|
|
|
233
|
+//编辑器配置
|
|
|
234
|
+ KindEditor.ready(function(K) {
|
|
|
235
|
+ window.changeEditor = K.create('#cl_gdnr');//修改弹出框编辑器
|
|
|
236
|
+ });
|
|
|
237
|
+var F_UserCode=localStorage.getItem('F_UserCode');
|
|
|
238
|
+function View(val,row) {
|
|
|
239
|
+ return '<div class="imgs" ><a class="xg" index="'+row.CreateUser+'" onclick= ck("' + val + '") >' + val + '</a></div>';
|
|
|
240
|
+ $("#F_UserCode").val(row.CreateUser);
|
|
|
241
|
+ console.log( $("#F_UserCode").val())
|
|
236
|
242
|
}
|
|
237
|
243
|
function OverTime(val, row) {
|
|
238
|
244
|
var cs = 'Ctime';
|
|
|
@@ -245,10 +251,16 @@ function OverTime(val, row) {
|
|
245
|
251
|
}
|
|
246
|
252
|
function ck(val) {
|
|
247
|
253
|
selid = val;
|
|
248
|
|
- console.log( selid)
|
|
|
254
|
+ var CreateUser=$(this).attr('index');
|
|
|
255
|
+ console.log($(this))
|
|
|
256
|
+ console.log($("#F_UserCode").val());
|
|
|
257
|
+ console.log(F_UserCode);
|
|
249
|
258
|
$('.modify').attr('index',selid)
|
|
250
|
259
|
$(".ckxq").removeClass("Hidens");
|
|
251
|
260
|
$(".ckxq ul li").eq(0).trigger("click");
|
|
|
261
|
+ if($("#F_UserCode").val()==F_UserCode){
|
|
|
262
|
+ $('.modify').hide();
|
|
|
263
|
+ }
|
|
252
|
264
|
xq();
|
|
253
|
265
|
}
|
|
254
|
266
|
function Detail(val){
|
|
|
@@ -470,7 +482,7 @@ function oper(val, obj) {
|
|
470
|
482
|
$("#cl_gdlx").text(zp.TypeClassName);
|
|
471
|
483
|
$("#cl_khxm").text(zp.Customer);
|
|
472
|
484
|
$("#cl_khdh").text(zp.CustomerTel);
|
|
473
|
|
- $("#cl_gdnr").html(decodeURIComponent(zp.Detail));
|
|
|
485
|
+ changeEditor.html(decodeURIComponent(zp.Detail))
|
|
474
|
486
|
|
|
475
|
487
|
$("#clbmname").val("");
|
|
476
|
488
|
$("#clbm").val("");
|
|
|
@@ -496,22 +508,40 @@ $('.modify').click(function(){
|
|
496
|
508
|
// content: 'addZhiShiKuManger.html?addId=' + id + '&addPid='+ pid +'&addName='+ name +''
|
|
497
|
509
|
});
|
|
498
|
510
|
})
|
|
499
|
|
-var F_UserCode=localStorage.getItem('F_UserCode');
|
|
500
|
|
-
|
|
501
|
|
-console.log(typeof(F_UserCode))
|
|
|
511
|
+//
|
|
|
512
|
+function TZ(val){
|
|
|
513
|
+ var id=val;
|
|
|
514
|
+ console.log(id)
|
|
|
515
|
+ layer.open({
|
|
|
516
|
+ type: 2,
|
|
|
517
|
+ title: '修改工单',
|
|
|
518
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
519
|
+ area: ['80%', '90%'],
|
|
|
520
|
+ content: '../WorkOrder/Xga.html?id='+id
|
|
|
521
|
+ // content: 'addZhiShiKuManger.html?addId=' + id + '&addPid='+ pid +'&addName='+ name +''
|
|
|
522
|
+ });
|
|
|
523
|
+}
|
|
|
524
|
+console.log(F_UserCode)
|
|
502
|
525
|
function Remove(val,row){
|
|
503
|
526
|
console.log(row.CreateUser)
|
|
504
|
527
|
if(row.CreateUser==F_UserCode){
|
|
505
|
|
- return '<div class="imgs" ><a onclick= remove("' + val + '") >删除</a></div>';
|
|
|
528
|
+ return '<div class="imgs" ><a onclick= remove("' + val + '") >删除</a> <a onclick= TZ("' + row.WorkOrderID + '") >修改</a> </div>';
|
|
506
|
529
|
}
|
|
507
|
530
|
|
|
508
|
531
|
}
|
|
509
|
532
|
|
|
510
|
533
|
|
|
511
|
534
|
function remove(str,row){
|
|
|
535
|
+ var type=$('#orderSource').val(); //工单来源
|
|
|
536
|
+ var typeclass=$('#typeclassId').val(); //工单类型
|
|
|
537
|
+ var starttime=$('#greetingTimes').val() && $('#greetingTimes').val().split('~')[0]; //开始时间
|
|
|
538
|
+ var endtime=$('#greetingTimes').val() && $('#greetingTimes').val().split('~')[1]; //结束时间
|
|
|
539
|
+ var lddep=$('#comeCall_dep').val(); //来电单位
|
|
|
540
|
+ var fkdep=$('#comeCall_deps').val();//来电单位
|
|
|
541
|
+ var userid=$('#userid').val(); //坐席
|
|
512
|
542
|
layer.confirm('确定删除当前记录?', {
|
|
513
|
543
|
btn: ['是', '否'] //按钮
|
|
514
|
|
- }, function(row) {
|
|
|
544
|
+ }, function(index) {
|
|
515
|
545
|
/*执行删除*/
|
|
516
|
546
|
$.ajax({
|
|
517
|
547
|
type: "get",
|
|
|
@@ -523,7 +553,10 @@ function remove(str,row){
|
|
523
|
553
|
token: $.cookie("token")
|
|
524
|
554
|
},
|
|
525
|
555
|
success: function(data) {
|
|
526
|
|
- location.reload()
|
|
|
556
|
+ layer.msg("删除成功!");
|
|
|
557
|
+ initTable(type,typeclass,starttime,endtime,lddep,fkdep,userid);
|
|
|
558
|
+ initTables(type,typeclass,starttime,endtime,lddep,fkdep,userid);
|
|
|
559
|
+ layer.close(index) ;
|
|
527
|
560
|
}
|
|
528
|
561
|
});
|
|
529
|
562
|
});
|
|
|
@@ -537,3 +570,4 @@ if(val==0){
|
|
537
|
570
|
return '<div class="defauli">'+row.LastDealUserNameRel+'</div>'
|
|
538
|
571
|
}
|
|
539
|
572
|
}
|
|
|
573
|
+
|