|
|
@@ -1,319 +1,406 @@
|
|
1
|
|
-$(document).ready(function () {
|
|
2
|
|
- initTable();
|
|
3
|
|
- $(".ss").click(function () {
|
|
4
|
|
- stype = 1;
|
|
5
|
|
- initTable();
|
|
6
|
|
- })
|
|
7
|
|
- /*高级查询*/
|
|
8
|
|
- $(".gjss").click(function () {
|
|
9
|
|
- $(".t-shade").addClass("cx");
|
|
10
|
|
- $(".gjsu").addClass("cx");
|
|
11
|
|
- $('.clgd').removeClass("cx");
|
|
12
|
|
- });
|
|
13
|
|
- $("#gjss").click(function () {
|
|
14
|
|
- stype = 2;
|
|
15
|
|
- initTable();
|
|
16
|
|
- $(".t-shade").removeClass("cx");
|
|
17
|
|
- $(".gjsu").removeClass("cx");
|
|
18
|
|
- })
|
|
19
|
|
- $(".setwin").click(function () {
|
|
20
|
|
- $(".t-shade").removeClass("cx");
|
|
21
|
|
- $(".gjsu").removeClass("cx");
|
|
22
|
|
- $(".cbgd").removeClass("cx");
|
|
23
|
|
- })
|
|
24
|
|
- //详情
|
|
25
|
|
- $(".ckxq ul li").click(function () {
|
|
26
|
|
- $(this).addClass("Active").siblings().removeClass("Active");
|
|
27
|
|
- var i = $(this).index();
|
|
28
|
|
- $(".gdxq").hide();
|
|
29
|
|
- $(".gdxq").eq(i).show();
|
|
30
|
|
- if (i > 0) { cljl(i); }
|
|
31
|
|
- });
|
|
32
|
|
- $(".Closed").click(function () {
|
|
33
|
|
- $(".ckxq").addClass("Hidens");
|
|
34
|
|
- });
|
|
35
|
|
- /*tree下拉框效果*/
|
|
36
|
|
- $(".inpBox .tree").click(function () {
|
|
37
|
|
- if ($(this).parent().find(".addTree").is(":hidden")) {
|
|
38
|
|
- $(this).parent().find(".addTree").show();
|
|
39
|
|
- }
|
|
40
|
|
- else {
|
|
41
|
|
- $(this).parent().find(".addTree").hide();
|
|
42
|
|
- }
|
|
43
|
|
- });
|
|
44
|
|
- /*普通下拉框效果*/
|
|
45
|
|
- $(".inpBox .select").click(function () {
|
|
46
|
|
- if ($(this).parent().find(".xl_common").is(":hidden")) {
|
|
47
|
|
- $(this).parent().find(".xl_common").show();
|
|
48
|
|
- }
|
|
49
|
|
- else {
|
|
50
|
|
- $(this).parent().find(".xl_common").hide();
|
|
51
|
|
- }
|
|
52
|
|
- });
|
|
53
|
|
- $(".xl").click(function () {
|
|
54
|
|
- if ($(this).parent().find(".addTree").is(":hidden")) {
|
|
55
|
|
- $(this).parent().find(".addTree").show();
|
|
56
|
|
- }
|
|
57
|
|
- else {
|
|
58
|
|
- $(this).parent().find(".addTree").hide();
|
|
59
|
|
- }
|
|
60
|
|
- if ($(this).parent().find(".xl_common").is(":hidden")) {
|
|
61
|
|
- $(this).parent().find(".xl_common").show();
|
|
62
|
|
- }
|
|
63
|
|
- else {
|
|
64
|
|
- $(this).parent().find(".xl_common").hide();
|
|
65
|
|
- }
|
|
66
|
|
- });
|
|
67
|
|
- $(".inpBox").mouseleave(function () {
|
|
68
|
|
- $(this).children(".addTree").hide();
|
|
69
|
|
- $(this).children(".xl_common").hide();
|
|
70
|
|
- })
|
|
71
|
|
- $(".xl_box").on("click", "li", function () {
|
|
72
|
|
- var obj = $(this).parent().parent().parent();
|
|
73
|
|
- obj.find("input").eq(0).val($(this).text());
|
|
74
|
|
- obj.find("input").eq(1).val($(this).attr("itemid"));
|
|
75
|
|
- obj.find(".xl_common").hide();
|
|
76
|
|
- })
|
|
77
|
|
- $("input[name='ltype']").click(function () {
|
|
78
|
|
- var val = $("input[name='ltype']:checked").val();
|
|
79
|
|
- if (val == '0') {
|
|
80
|
|
- $(".js").show();
|
|
81
|
|
- }
|
|
82
|
|
- else if (val == '1') {
|
|
83
|
|
- $(".js").hide();
|
|
84
|
|
- }
|
|
85
|
|
- })
|
|
86
|
|
- if ($("#zrbmtree")) {
|
|
87
|
|
- getBM($("#zrbmtree"));
|
|
88
|
|
- }
|
|
|
1
|
+$(document).ready(function() {
|
|
|
2
|
+ initTable();
|
|
|
3
|
+ $(".ss").click(function() {
|
|
|
4
|
+ stype = 1;
|
|
|
5
|
+ initTable();
|
|
|
6
|
+ })
|
|
|
7
|
+ /*高级查询*/
|
|
|
8
|
+ $(".gjss").click(function() {
|
|
|
9
|
+ $(".t-shade").addClass("cx");
|
|
|
10
|
+ $(".gjsu").addClass("cx");
|
|
|
11
|
+ $('.clgd').removeClass("cx");
|
|
|
12
|
+ });
|
|
|
13
|
+ $("#gjss").click(function() {
|
|
|
14
|
+ stype = 2;
|
|
|
15
|
+ initTable();
|
|
|
16
|
+ $(".t-shade").removeClass("cx");
|
|
|
17
|
+ $(".gjsu").removeClass("cx");
|
|
|
18
|
+ })
|
|
|
19
|
+ $(".setwin").click(function() {
|
|
|
20
|
+ $(".t-shade").removeClass("cx");
|
|
|
21
|
+ $(".gjsu").removeClass("cx");
|
|
|
22
|
+ $(".cbgd").removeClass("cx");
|
|
|
23
|
+ //图片清空
|
|
|
24
|
+ $(".space").html('');
|
|
|
25
|
+ })
|
|
|
26
|
+ //详情
|
|
|
27
|
+ $(".ckxq ul li").click(function() {
|
|
|
28
|
+ $(this).addClass("Active").siblings().removeClass("Active");
|
|
|
29
|
+ var i = $(this).index();
|
|
|
30
|
+ $(".gdxq").hide();
|
|
|
31
|
+ $(".gdxq").eq(i).show();
|
|
|
32
|
+ if(i > 0) {
|
|
|
33
|
+ cljl(i);
|
|
|
34
|
+ }
|
|
|
35
|
+ });
|
|
|
36
|
+ $(".Closed").click(function() {
|
|
|
37
|
+ $(".ckxq").addClass("Hidens");
|
|
|
38
|
+ });
|
|
|
39
|
+ /*tree下拉框效果*/
|
|
|
40
|
+ $(".inpBox .tree").click(function() {
|
|
|
41
|
+ if($(this).parent().find(".addTree").is(":hidden")) {
|
|
|
42
|
+ $(this).parent().find(".addTree").show();
|
|
|
43
|
+ } else {
|
|
|
44
|
+ $(this).parent().find(".addTree").hide();
|
|
|
45
|
+ }
|
|
|
46
|
+ });
|
|
|
47
|
+ /*普通下拉框效果*/
|
|
|
48
|
+ $(".inpBox .select").click(function() {
|
|
|
49
|
+ if($(this).parent().find(".xl_common").is(":hidden")) {
|
|
|
50
|
+ $(this).parent().find(".xl_common").show();
|
|
|
51
|
+ } else {
|
|
|
52
|
+ $(this).parent().find(".xl_common").hide();
|
|
|
53
|
+ }
|
|
|
54
|
+ });
|
|
|
55
|
+ $(".xl").click(function() {
|
|
|
56
|
+ if($(this).parent().find(".addTree").is(":hidden")) {
|
|
|
57
|
+ $(this).parent().find(".addTree").show();
|
|
|
58
|
+ } else {
|
|
|
59
|
+ $(this).parent().find(".addTree").hide();
|
|
|
60
|
+ }
|
|
|
61
|
+ if($(this).parent().find(".xl_common").is(":hidden")) {
|
|
|
62
|
+ $(this).parent().find(".xl_common").show();
|
|
|
63
|
+ } else {
|
|
|
64
|
+ $(this).parent().find(".xl_common").hide();
|
|
|
65
|
+ }
|
|
|
66
|
+ });
|
|
|
67
|
+ $(".inpBox").mouseleave(function() {
|
|
|
68
|
+ $(this).children(".addTree").hide();
|
|
|
69
|
+ $(this).children(".xl_common").hide();
|
|
|
70
|
+ })
|
|
|
71
|
+ $(".xl_box").on("click", "li", function() {
|
|
|
72
|
+ var obj = $(this).parent().parent().parent();
|
|
|
73
|
+ obj.find("input").eq(0).val($(this).text());
|
|
|
74
|
+ obj.find("input").eq(1).val($(this).attr("itemid"));
|
|
|
75
|
+ obj.find(".xl_common").hide();
|
|
|
76
|
+ })
|
|
|
77
|
+ $("input[name='ltype']").click(function() {
|
|
|
78
|
+ var val = $("input[name='ltype']:checked").val();
|
|
|
79
|
+ if(val == '0') {
|
|
|
80
|
+ $(".js").show();
|
|
|
81
|
+ } else if(val == '1') {
|
|
|
82
|
+ $(".js").hide();
|
|
|
83
|
+ }
|
|
|
84
|
+ })
|
|
|
85
|
+ if($("#zrbmtree")) {
|
|
|
86
|
+ getBM($("#zrbmtree"));
|
|
|
87
|
+ }
|
|
89
|
88
|
})
|
|
|
89
|
+
|
|
90
|
90
|
function View(val) {
|
|
91
|
|
- return '<div class="imgs" ><a class="xg" onclick= ck("' + val + '") >' + val + '</a></div>';
|
|
|
91
|
+ return '<div class="imgs" ><a class="xg" onclick= ck("' + val + '") >' + val + '</a></div>';
|
|
92
|
92
|
}
|
|
|
93
|
+
|
|
93
|
94
|
function OverTime(val, row) {
|
|
94
|
|
- var cs = 'Ctime';
|
|
95
|
|
- if (row.LimitTime) {
|
|
96
|
|
- if (row.totalhour * 1 > row.LimitTime * 1) {
|
|
97
|
|
- cs = 'overTime';
|
|
98
|
|
- }
|
|
99
|
|
- }
|
|
100
|
|
- return '<div class="' + cs + '" ><a class="xg" ></a></div>';
|
|
|
95
|
+ var cs = 'Ctime';
|
|
|
96
|
+ if(row.LimitTime) {
|
|
|
97
|
+ if(row.totalhour * 1 > row.LimitTime * 1) {
|
|
|
98
|
+ cs = 'overTime';
|
|
|
99
|
+ }
|
|
|
100
|
+ }
|
|
|
101
|
+ return '<div class="' + cs + '" ><a class="xg" ></a></div>';
|
|
101
|
102
|
}
|
|
|
103
|
+
|
|
102
|
104
|
function ck(val) {
|
|
103
|
|
- selid = val;
|
|
104
|
|
- $(".ckxq").removeClass("Hidens");
|
|
105
|
|
- $(".ckxq ul li").eq(0).trigger("click");
|
|
106
|
|
- xq();
|
|
|
105
|
+ selid = val;
|
|
|
106
|
+ $(".ckxq").removeClass("Hidens");
|
|
|
107
|
+ $(".ckxq ul li").eq(0).trigger("click");
|
|
|
108
|
+ xq();
|
|
107
|
109
|
}
|
|
|
110
|
+
|
|
108
|
111
|
function xq() {
|
|
109
|
|
- $.getJSON(huayi.config.callcenter_url+'WorkOrder/GetWorkOrder', { "orderid": selid, "token": $.cookie("token") }, function (result) {
|
|
110
|
|
- if (result.state.toLowerCase() == "success") {
|
|
111
|
|
- if (result.data.data.length > 0) {
|
|
112
|
|
- var data = result.data.data[0];
|
|
113
|
|
- $("#xq_gdbh").text(data.WorkOrderID);
|
|
114
|
|
- $("#xq_gdlx").text(GetTypeName(data.Type));
|
|
115
|
|
- $("#xq_cjsj").text(data.CreateTime);
|
|
116
|
|
- $("#xq_gdzt").html(GetStateName(data.State));
|
|
117
|
|
- $("#xq_khxm").text(data.Customer);
|
|
118
|
|
- $("#xq_khdh").text(data.CustomerTel);
|
|
119
|
|
- $("#xq_wtlx").text(data.TypeClassName);
|
|
120
|
|
- $("#xq_zxgh").text(data.CreateUser);
|
|
121
|
|
- $("#xq_zxxm").text(data.CreateUserName);
|
|
122
|
|
- $("#xq_gdnr").text(data.Detail);
|
|
|
112
|
+ $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
|
|
|
113
|
+ "orderid": selid,
|
|
|
114
|
+ "token": $.cookie("token")
|
|
|
115
|
+ }, function(result) {
|
|
|
116
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
117
|
+ if(result.data.data.length > 0) {
|
|
|
118
|
+ var data = result.data.data[0];
|
|
|
119
|
+ $("#xq_gdbh").text(data.WorkOrderID);
|
|
|
120
|
+ $("#xq_gdlx").text(GetTypeName(data.Type));
|
|
|
121
|
+ $("#xq_cjsj").text(data.CreateTime);
|
|
|
122
|
+ $("#xq_gdzt").html(GetStateName(data.State));
|
|
|
123
|
+ $("#xq_khxm").text(data.Customer);
|
|
|
124
|
+ $("#xq_khdh").text(data.CustomerTel);
|
|
|
125
|
+ $("#xq_wtlx").text(data.TypeClassName);
|
|
|
126
|
+ $("#xq_zxgh").text(data.CreateUser);
|
|
|
127
|
+ $("#xq_zxxm").text(data.CreateUserName);
|
|
|
128
|
+ $("#xq_gdnr").text(data.Detail);
|
|
123
|
129
|
|
|
124
|
|
- $(".gdxq").eq(0).find(".allbc").remove();
|
|
125
|
|
- if (result.data.item.length > 0) {
|
|
126
|
|
- var html = '<div class="allbc">补充记录'
|
|
127
|
|
- + '<table class="table table-hover table-striped"><thead><tr><th><div class="th-inner">补充人</div></th>'
|
|
128
|
|
- + '<th><div class="th-inner">补充详情</div></th><th><div class="th-inner">创建时间</div></th></tr></thead><tbody>';
|
|
|
130
|
+ $(".gdxq").eq(0).find(".allbc").remove();
|
|
|
131
|
+ if(result.data.item.length > 0) {
|
|
|
132
|
+ var html = '<div class="allbc">补充记录' +
|
|
|
133
|
+ '<table class="table table-hover table-striped"><thead><tr><th><div class="th-inner">补充人</div></th>' +
|
|
|
134
|
+ '<th><div class="th-inner">补充详情</div></th><th><div class="th-inner">创建时间</div></th></tr></thead><tbody>';
|
|
129
|
135
|
|
|
130
|
|
- $(result.data.item).each(function (i, n) {
|
|
131
|
|
- html += '<td>' + n.CreateUserName + '</td><td>' + n.Detail + '</td><td>' + n.CreateTime + '</td>';
|
|
132
|
|
- })
|
|
133
|
|
- html += '</tbody></table></div>';
|
|
134
|
|
- $(".gdxq").eq(0).append($(html));
|
|
135
|
|
- }
|
|
136
|
|
- }
|
|
137
|
|
- }
|
|
138
|
|
- })
|
|
|
136
|
+ $(result.data.item).each(function(i, n) {
|
|
|
137
|
+ html += '<td>' + n.CreateUserName + '</td><td>' + n.Detail + '</td><td>' + n.CreateTime + '</td>';
|
|
|
138
|
+ })
|
|
|
139
|
+ html += '</tbody></table></div>';
|
|
|
140
|
+ $(".gdxq").eq(0).append($(html));
|
|
|
141
|
+ }
|
|
|
142
|
+ }
|
|
|
143
|
+ }
|
|
|
144
|
+ })
|
|
139
|
145
|
}
|
|
|
146
|
+
|
|
140
|
147
|
function cljl(type) {
|
|
141
|
|
- //先销毁表格
|
|
142
|
|
- var table = $(".gdxq").eq(type).find("table");
|
|
143
|
|
- table.bootstrapTable('destroy');
|
|
144
|
|
- //初始化表格,动态从服务器加载数据
|
|
145
|
|
- table.bootstrapTable({
|
|
146
|
|
- method: "get", //使用get请求到服务器获取数据
|
|
147
|
|
- url: huayi.config.callcenter_url+"WorkOrder/GetItemList", //获取数据的Servlet地址
|
|
148
|
|
- striped: true, //表格显示条纹
|
|
149
|
|
- pagination: true, //启动分页
|
|
150
|
|
- pageSize: 5, //每页显示的记录数
|
|
151
|
|
- pageNumber: 1, //当前第几页
|
|
152
|
|
- pageList: [10, 20, 50, 100], //记录数可选列表
|
|
153
|
|
- search: false, //是否启用查询
|
|
154
|
|
- showColumns: false, //显示下拉框勾选要显示的列
|
|
155
|
|
- showRefresh: false, //显示刷新按钮
|
|
156
|
|
- sidePagination: "server", //表示服务端请求
|
|
157
|
|
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
158
|
|
- //设置为limit可以获取limit, offset, search, sort, order
|
|
159
|
|
- queryParamsType: "undefined",
|
|
160
|
|
- queryParams: function queryParams(params) { //设置查询参数
|
|
161
|
|
- var param = {
|
|
162
|
|
- page: params.pageNumber,
|
|
163
|
|
- pagesize: params.pageSize,
|
|
164
|
|
- type: type,
|
|
165
|
|
- id: selid,
|
|
166
|
|
- token: $.cookie("token")
|
|
167
|
|
- };
|
|
168
|
|
- return param;
|
|
169
|
|
- },
|
|
170
|
|
- onLoadSuccess: function () { //加载成功时执行
|
|
171
|
|
- //layer.msg("加载成功");
|
|
172
|
|
- },
|
|
173
|
|
- onLoadError: function () { //加载失败时执行
|
|
174
|
|
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
|
|
175
|
|
- }
|
|
176
|
|
- });
|
|
|
148
|
+ //先销毁表格
|
|
|
149
|
+ var table = $(".gdxq").eq(type).find("table");
|
|
|
150
|
+ table.bootstrapTable('destroy');
|
|
|
151
|
+ //初始化表格,动态从服务器加载数据
|
|
|
152
|
+ table.bootstrapTable({
|
|
|
153
|
+ method: "get", //使用get请求到服务器获取数据
|
|
|
154
|
+ url: huayi.config.callcenter_url + "WorkOrder/GetItemList", //获取数据的Servlet地址
|
|
|
155
|
+ striped: true, //表格显示条纹
|
|
|
156
|
+ pagination: true, //启动分页
|
|
|
157
|
+ pageSize: 5, //每页显示的记录数
|
|
|
158
|
+ pageNumber: 1, //当前第几页
|
|
|
159
|
+ pageList: [10, 20, 50, 100], //记录数可选列表
|
|
|
160
|
+ search: false, //是否启用查询
|
|
|
161
|
+ showColumns: false, //显示下拉框勾选要显示的列
|
|
|
162
|
+ showRefresh: false, //显示刷新按钮
|
|
|
163
|
+ sidePagination: "server", //表示服务端请求
|
|
|
164
|
+ //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
|
165
|
+ //设置为limit可以获取limit, offset, search, sort, order
|
|
|
166
|
+ queryParamsType: "undefined",
|
|
|
167
|
+ queryParams: function queryParams(params) { //设置查询参数
|
|
|
168
|
+ var param = {
|
|
|
169
|
+ page: params.pageNumber,
|
|
|
170
|
+ pagesize: params.pageSize,
|
|
|
171
|
+ type: type,
|
|
|
172
|
+ id: selid,
|
|
|
173
|
+ token: $.cookie("token")
|
|
|
174
|
+ };
|
|
|
175
|
+ return param;
|
|
|
176
|
+ },
|
|
|
177
|
+ onLoadSuccess: function() { //加载成功时执行
|
|
|
178
|
+ //layer.msg("加载成功");
|
|
|
179
|
+ },
|
|
|
180
|
+ onLoadError: function() { //加载失败时执行
|
|
|
181
|
+ //layer.msg("加载数据失败", { time: 1500, icon: 2 });
|
|
|
182
|
+ }
|
|
|
183
|
+ });
|
|
177
|
184
|
}
|
|
|
185
|
+
|
|
178
|
186
|
function GetTypeName(val) {
|
|
179
|
|
- var str = '';
|
|
180
|
|
- switch (val + '') {
|
|
181
|
|
- case '1': str = "咨询"; break;
|
|
182
|
|
- case '2': str = "报修服务"; break;
|
|
183
|
|
- case '3': str = "投诉建议"; break;
|
|
184
|
|
- }
|
|
185
|
|
- return str;
|
|
|
187
|
+ var str = '';
|
|
|
188
|
+ switch(val + '') {
|
|
|
189
|
+ case '1':
|
|
|
190
|
+ str = "咨询";
|
|
|
191
|
+ break;
|
|
|
192
|
+ case '2':
|
|
|
193
|
+ str = "报修服务";
|
|
|
194
|
+ break;
|
|
|
195
|
+ case '3':
|
|
|
196
|
+ str = "投诉建议";
|
|
|
197
|
+ break;
|
|
|
198
|
+ }
|
|
|
199
|
+ return str;
|
|
186
|
200
|
}
|
|
|
201
|
+
|
|
187
|
202
|
function GetStateName(val) {
|
|
188
|
|
-// var str = '';
|
|
189
|
|
-// switch (val + '') {
|
|
190
|
|
-// case '0': str = "待指派"; break;
|
|
191
|
|
-// case '1': str = "处理中"; break;
|
|
192
|
|
-// case '2': str = "已完结"; break;
|
|
193
|
|
-// }
|
|
194
|
|
-if(val==0){
|
|
195
|
|
- return '<div class="warning">待指派</div>'
|
|
196
|
|
-}else if(val==1){
|
|
197
|
|
- return '<div class="primary">处理中</div>'
|
|
198
|
|
-}else if(val==2){
|
|
199
|
|
- return '<div class="defauli">已完结</div>'
|
|
200
|
|
-}
|
|
201
|
|
- return str;
|
|
|
203
|
+ // var str = '';
|
|
|
204
|
+ // switch (val + '') {
|
|
|
205
|
+ // case '0': str = "待指派"; break;
|
|
|
206
|
+ // case '1': str = "处理中"; break;
|
|
|
207
|
+ // case '2': str = "已完结"; break;
|
|
|
208
|
+ // }
|
|
|
209
|
+ if(val == 0) {
|
|
|
210
|
+ return '<div class="warning">待指派</div>'
|
|
|
211
|
+ } else if(val == 1) {
|
|
|
212
|
+ return '<div class="primary">处理中</div>'
|
|
|
213
|
+ } else if(val == 2) {
|
|
|
214
|
+ return '<div class="defauli">已完结</div>'
|
|
|
215
|
+ }
|
|
|
216
|
+ return str;
|
|
202
|
217
|
}
|
|
|
218
|
+
|
|
203
|
219
|
function ComXQ(val, row) {
|
|
204
|
|
- var str = '';
|
|
205
|
|
- if (row.IsLast) {
|
|
206
|
|
- str = str + row.DealUserName + " 完结工单。" + "<br>";
|
|
207
|
|
- }
|
|
208
|
|
- if (row.DealTime) {
|
|
209
|
|
- str = str + row.DealUserName + " 处理工单:" + "<br>";
|
|
210
|
|
- str = str + row.Detail + "<br>";
|
|
211
|
|
- }
|
|
212
|
|
- if (row.SureUserName) {
|
|
213
|
|
- str = str + row.SureUserName + " 接单。" + "<br>";
|
|
214
|
|
- }
|
|
215
|
|
- if (row.ToDeptName) {
|
|
216
|
|
- str = str + row.CreateUserName + " 指派工单给 " + row.ToDeptName + " ";
|
|
217
|
|
- if (row.ToUserName) {
|
|
218
|
|
- str = str + row.ToUserName;
|
|
219
|
|
- }
|
|
220
|
|
- str = str + "<br>";
|
|
221
|
|
- }
|
|
222
|
|
- if (row.IsStart) {
|
|
223
|
|
- str = str + row.CreateUserName + " 重新开启工单。" + "<br>";
|
|
224
|
|
- }
|
|
225
|
|
- return str;
|
|
|
220
|
+ var str = '';
|
|
|
221
|
+ if(row.IsLast) {
|
|
|
222
|
+ str = str + row.DealUserName + " 完结工单。" + "<br>";
|
|
|
223
|
+ }
|
|
|
224
|
+ if(row.DealTime) {
|
|
|
225
|
+ str = str + row.DealUserName + " 处理工单:" + "<br>";
|
|
|
226
|
+ str = str + row.Detail + "<br>";
|
|
|
227
|
+ }
|
|
|
228
|
+ if(row.SureUserName) {
|
|
|
229
|
+ str = str + row.SureUserName + " 接单。" + "<br>";
|
|
|
230
|
+ }
|
|
|
231
|
+ if(row.ToDeptName) {
|
|
|
232
|
+ str = str + row.CreateUserName + " 指派工单给 " + row.ToDeptName + " ";
|
|
|
233
|
+ if(row.ToUserName) {
|
|
|
234
|
+ str = str + row.ToUserName;
|
|
|
235
|
+ }
|
|
|
236
|
+ str = str + "<br>";
|
|
|
237
|
+ }
|
|
|
238
|
+ if(row.IsStart) {
|
|
|
239
|
+ str = str + row.CreateUserName + " 重新开启工单。" + "<br>";
|
|
|
240
|
+ }
|
|
|
241
|
+ return str;
|
|
226
|
242
|
}
|
|
227
|
243
|
//获取部门
|
|
228
|
244
|
var setting = {
|
|
229
|
|
- data: {
|
|
230
|
|
- key: {
|
|
231
|
|
- name: "F_DeptName"
|
|
232
|
|
- },
|
|
233
|
|
- simpleData: {
|
|
234
|
|
- enable: true,
|
|
235
|
|
- idKey: "F_DeptId",
|
|
236
|
|
- pIdKey: "F_ParentId",
|
|
237
|
|
- rootPId: 0
|
|
238
|
|
- }
|
|
239
|
|
- },
|
|
240
|
|
- callback: {
|
|
241
|
|
- onClick: zTreeOnClick
|
|
242
|
|
- }
|
|
|
245
|
+ data: {
|
|
|
246
|
+ key: {
|
|
|
247
|
+ name: "F_DeptName"
|
|
|
248
|
+ },
|
|
|
249
|
+ simpleData: {
|
|
|
250
|
+ enable: true,
|
|
|
251
|
+ idKey: "F_DeptId",
|
|
|
252
|
+ pIdKey: "F_ParentId",
|
|
|
253
|
+ rootPId: 0
|
|
|
254
|
+ }
|
|
|
255
|
+ },
|
|
|
256
|
+ callback: {
|
|
|
257
|
+ onClick: zTreeOnClick
|
|
|
258
|
+ }
|
|
243
|
259
|
};
|
|
|
260
|
+
|
|
244
|
261
|
function getBM(obj) {
|
|
245
|
|
- $.getJSON(huayi.config.callcenter_url+'Department/GetAllList', { "token": $.cookie("token") }, function (result) {
|
|
246
|
|
- if (result.state.toLowerCase() == "success") {
|
|
247
|
|
- $.fn.zTree.init(obj, setting, result.data);
|
|
248
|
|
- }
|
|
249
|
|
- })
|
|
|
262
|
+ $.getJSON(huayi.config.callcenter_url + 'Department/GetAllList', {
|
|
|
263
|
+ "token": $.cookie("token")
|
|
|
264
|
+ }, function(result) {
|
|
|
265
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
266
|
+ $.fn.zTree.init(obj, setting, result.data);
|
|
|
267
|
+ }
|
|
|
268
|
+ })
|
|
250
|
269
|
}
|
|
|
270
|
+
|
|
251
|
271
|
function zTreeOnClick(event, treeId, treeNode) {
|
|
252
|
|
- if (event) {
|
|
253
|
|
- event.stopPropagation();
|
|
254
|
|
- }
|
|
255
|
|
- var obj = $("#" + event.data.treeId).parent();
|
|
256
|
|
- obj.parent().find("input").eq(0).val(treeNode.F_DeptName);
|
|
257
|
|
- obj.parent().find("input").eq(1).val(treeNode.F_DeptId);
|
|
258
|
|
- obj.hide();
|
|
259
|
|
- getRY($(".clid"), $("#clbm").val());
|
|
|
272
|
+ if(event) {
|
|
|
273
|
+ event.stopPropagation();
|
|
|
274
|
+ }
|
|
|
275
|
+ var obj = $("#" + event.data.treeId).parent();
|
|
|
276
|
+ obj.parent().find("input").eq(0).val(treeNode.F_DeptName);
|
|
|
277
|
+ obj.parent().find("input").eq(1).val(treeNode.F_DeptId);
|
|
|
278
|
+ obj.hide();
|
|
|
279
|
+ getRY($(".clid"), $("#clbm").val());
|
|
260
|
280
|
};
|
|
261
|
281
|
//获取人员
|
|
262
|
282
|
function getRY(obj, deptid) {
|
|
263
|
|
- obj.empty();
|
|
264
|
|
- obj.append('<li itemid="">--请选择--</li>');
|
|
265
|
|
- obj.parent().parent().find("input").eq(0).val("--请选择--");
|
|
266
|
|
- obj.parent().parent().find("input").eq(1).val("");
|
|
267
|
|
- $.getJSON(huayi.config.callcenter_url+'UserAccount/GetDeptUserList', { "deptid": deptid, "token": $.cookie("token") }, function (result) {
|
|
268
|
|
- if (result.state.toLowerCase() == "success") {
|
|
269
|
|
- $(result.data).each(function (i, n) {
|
|
270
|
|
- obj.append('<li itemid="' + n.F_UserId + '">' + n.F_UserName + '</li>');
|
|
271
|
|
- })
|
|
|
283
|
+ obj.empty();
|
|
|
284
|
+ obj.append('<li itemid="">--请选择--</li>');
|
|
|
285
|
+ obj.parent().parent().find("input").eq(0).val("--请选择--");
|
|
|
286
|
+ obj.parent().parent().find("input").eq(1).val("");
|
|
|
287
|
+ $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetDeptUserList', {
|
|
|
288
|
+ "deptid": deptid,
|
|
|
289
|
+ "token": $.cookie("token")
|
|
|
290
|
+ }, function(result) {
|
|
|
291
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
292
|
+ $(result.data).each(function(i, n) {
|
|
|
293
|
+ obj.append('<li itemid="' + n.F_UserId + '">' + n.F_UserName + '</li>');
|
|
|
294
|
+ })
|
|
272
|
295
|
|
|
273
|
|
- obj.find("li").click(function (event) {
|
|
274
|
|
- if (event) {
|
|
275
|
|
- event.stopPropagation();
|
|
276
|
|
- }
|
|
277
|
|
- $(this).parent().parent().parent().find("input").eq(0).val($(this).text());
|
|
278
|
|
- $(this).parent().parent().parent().find("input").eq(1).val($(this).attr("itemid"));
|
|
279
|
|
- $(this).parent().parent().hide();
|
|
280
|
|
- });
|
|
281
|
|
- }
|
|
282
|
|
- })
|
|
|
296
|
+ obj.find("li").click(function(event) {
|
|
|
297
|
+ if(event) {
|
|
|
298
|
+ event.stopPropagation();
|
|
|
299
|
+ }
|
|
|
300
|
+ $(this).parent().parent().parent().find("input").eq(0).val($(this).text());
|
|
|
301
|
+ $(this).parent().parent().parent().find("input").eq(1).val($(this).attr("itemid"));
|
|
|
302
|
+ $(this).parent().parent().hide();
|
|
|
303
|
+ });
|
|
|
304
|
+ }
|
|
|
305
|
+ })
|
|
283
|
306
|
}
|
|
284
|
307
|
|
|
285
|
308
|
function Appoint(val, row) {
|
|
286
|
|
- return czhtml(val, row, "处理");
|
|
|
309
|
+ return czhtml(val, row, "处理");
|
|
287
|
310
|
}
|
|
|
311
|
+
|
|
288
|
312
|
function Dispose(val, row) {
|
|
289
|
|
- return czhtml(val, row, "处理");
|
|
|
313
|
+ return czhtml(val, row, "处理");
|
|
290
|
314
|
}
|
|
|
315
|
+
|
|
291
|
316
|
function Expedite(val, row) {
|
|
292
|
|
- return czhtml(val, row, "催办");
|
|
|
317
|
+ return czhtml(val, row, "催办");
|
|
293
|
318
|
}
|
|
|
319
|
+
|
|
294
|
320
|
function Comment(val, row) {
|
|
295
|
|
- return czhtml(val, row, "评论");
|
|
296
|
|
-}
|
|
297
|
|
-function czhtml(val, row,str) {
|
|
298
|
|
- return '<div class="imgs" ><a class="xg" itemstr=\'' + JSON.stringify(row) + '\' onclick= oper("' + val + '",this) >' + str + '</a></div>';
|
|
|
321
|
+ return czhtml(val, row, "评论");
|
|
299
|
322
|
}
|
|
300
|
|
-function oper(val, obj) {
|
|
301
|
|
- zpid = val;
|
|
302
|
|
- var zp = JSON.parse($(obj).attr("itemstr"));
|
|
303
|
|
- $("#cl_gdbh").text(zp.WorkOrderID);
|
|
304
|
|
- $("#cl_gdlx").text(GetTypeName(zp.Type));
|
|
305
|
|
- $("#cl_khxm").text(zp.Customer);
|
|
306
|
|
- $("#cl_khdh").text(zp.CustomerTel);
|
|
307
|
|
- $("#cl_gdnr").text(zp.Detail);
|
|
308
|
323
|
|
|
309
|
|
- $("#clbmname").val("");
|
|
310
|
|
- $("#clbm").val("");
|
|
311
|
|
- $("#clidname").val("");
|
|
312
|
|
- $("#clid").val("");
|
|
313
|
|
- $(".clid").empty();
|
|
|
324
|
+function czhtml(val, row, str) {
|
|
|
325
|
+ return '<div class="imgs" ><a class="xg" itemstr=\'' + JSON.stringify(row) + '\' onclick= oper("' + val + '",this) >' + str + '</a></div>';
|
|
|
326
|
+}
|
|
314
|
327
|
|
|
315
|
|
- $("#cont").val("");
|
|
|
328
|
+function oper(val, obj) {
|
|
|
329
|
+ zpid = val;
|
|
|
330
|
+ var zp = JSON.parse($(obj).attr("itemstr"));
|
|
|
331
|
+ $("#cl_gdlx").text(GetTypeName(zp.Type));
|
|
|
332
|
+ $("#cl_khxm").text(zp.Customer);
|
|
|
333
|
+ $("#cl_khdh").text(zp.CustomerTel);
|
|
|
334
|
+ $("#cl_gdnr").text(zp.Detail);
|
|
|
335
|
+ //
|
|
|
336
|
+ // $("#clbmname").val("");
|
|
|
337
|
+ // $("#clbm").val("");
|
|
|
338
|
+ // $("#clidname").val("");
|
|
|
339
|
+ // $("#clid").val("");
|
|
|
340
|
+ // $(".clid").empty();
|
|
|
341
|
+ //
|
|
|
342
|
+ // $("#cont").val("");
|
|
|
343
|
+ $.ajax({
|
|
|
344
|
+ type: "get",
|
|
|
345
|
+ url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrder",
|
|
|
346
|
+ async: true,
|
|
|
347
|
+ dataType: 'json',
|
|
|
348
|
+ data: {
|
|
|
349
|
+ orderid: val,
|
|
|
350
|
+ "token": $.cookie("token")
|
|
|
351
|
+ },
|
|
|
352
|
+ success: function(data) {
|
|
|
353
|
+ /*验证请求*/
|
|
|
354
|
+ if(data.state == "success") {
|
|
|
355
|
+ var con = data;
|
|
|
356
|
+ var Str = con.data.data;
|
|
|
357
|
+ console.log(Str);
|
|
|
358
|
+ //图片展示
|
|
|
359
|
+ $('#cl_gdbh').text(Str[0].WorkOrderID);
|
|
|
360
|
+ var Files = Str[0].File;
|
|
|
361
|
+ console.log(Files);
|
|
|
362
|
+ if(Files.length > 0) {
|
|
|
363
|
+ $(Files).each(function(i, n) {
|
|
|
364
|
+ $('<div class="img-box"><img src="' + n.F_FileUrl + '" alt="" class="image-item" /><div>').appendTo(".space");
|
|
|
365
|
+ })
|
|
|
366
|
+ //图片放大
|
|
|
367
|
+ $('.image-item').click(function() {
|
|
|
368
|
+
|
|
|
369
|
+ })
|
|
|
370
|
+ }
|
|
|
371
|
+ }
|
|
|
372
|
+ }
|
|
|
373
|
+ });
|
|
316
|
374
|
|
|
317
|
|
- $(".t-shade").addClass("cx");
|
|
318
|
|
- $(".clgd").addClass("cx");
|
|
|
375
|
+ $(".t-shade").addClass("cx");
|
|
|
376
|
+ $(".clgd").addClass("cx");
|
|
|
377
|
+}
|
|
|
378
|
+ /// 审核信息
|
|
|
379
|
+ function Audit(val) {
|
|
|
380
|
+ var str = '';
|
|
|
381
|
+ switch(val + '') {
|
|
|
382
|
+ case '0':
|
|
|
383
|
+ str = "未审核";
|
|
|
384
|
+ break;
|
|
|
385
|
+ case '1':
|
|
|
386
|
+ str = "无效";
|
|
|
387
|
+ break;
|
|
|
388
|
+ case '2':
|
|
|
389
|
+ str = "有效";
|
|
|
390
|
+ break;
|
|
|
391
|
+ }
|
|
|
392
|
+ return str;
|
|
|
393
|
+ }
|
|
|
394
|
+ //限制字符串长度
|
|
|
395
|
+function Detail(val) {
|
|
|
396
|
+ if(val) {
|
|
|
397
|
+ var str = '<div '
|
|
|
398
|
+ if(val.length > 10) {
|
|
|
399
|
+ str = str + ' title="' + val + '" ';
|
|
|
400
|
+ val = val.substr(0, 10) + "...";
|
|
|
401
|
+ }
|
|
|
402
|
+ return str + '>' + val + '</div>';
|
|
|
403
|
+ } else {
|
|
|
404
|
+ return '';
|
|
|
405
|
+ }
|
|
319
|
406
|
}
|