|
|
@@ -0,0 +1,897 @@
|
|
|
1
|
+<!DOCTYPE html>
|
|
|
2
|
+<html>
|
|
|
3
|
+
|
|
|
4
|
+<head>
|
|
|
5
|
+ <meta charset="UTF-8">
|
|
|
6
|
+ <script src="../Script/Common/huayi.load.js"></script>
|
|
|
7
|
+ <script src="../Script/Common/huayi.config.js"></script>
|
|
|
8
|
+ <link href="../css/layer/need/layer.css" />
|
|
|
9
|
+ <link rel="stylesheet" href="../css/init.css" />
|
|
|
10
|
+ <title>办理工单</title>
|
|
|
11
|
+ <style>
|
|
|
12
|
+ .input {
|
|
|
13
|
+ background-color: #FFF;
|
|
|
14
|
+ background-image: none;
|
|
|
15
|
+ border: 1px solid #ccc;
|
|
|
16
|
+ border-radius: 1px;
|
|
|
17
|
+ color: inherit;
|
|
|
18
|
+ padding: 6px 12px
|
|
|
19
|
+ }
|
|
|
20
|
+
|
|
|
21
|
+ .fjnr {
|
|
|
22
|
+ padding: 0 !important;
|
|
|
23
|
+ border: none !important;
|
|
|
24
|
+ }
|
|
|
25
|
+
|
|
|
26
|
+ .HGXX td {
|
|
|
27
|
+ padding: 8px;
|
|
|
28
|
+ }
|
|
|
29
|
+ </style>
|
|
|
30
|
+</head>
|
|
|
31
|
+
|
|
|
32
|
+<body>
|
|
|
33
|
+ <!--办理内容-->
|
|
|
34
|
+ <div style="width: 100%;padding: 10px;">
|
|
|
35
|
+ <table class="table" border="" cellspacing="0" cellpadding="0" style="border: 1px solid #e7eaec;">
|
|
|
36
|
+ <theard>
|
|
|
37
|
+ <tr>
|
|
|
38
|
+ <td class="text-center" style="min-width: 100px;">派单时间</td>
|
|
|
39
|
+ <td class="text-center" style="min-width: 100px;">办理期限</td>
|
|
|
40
|
+ <td class="text-center" style="min-width: 100px;">派单意见</td>
|
|
|
41
|
+ </tr>
|
|
|
42
|
+ </theard>
|
|
|
43
|
+ <tbody class="BLNR" style="border-top: none; padding: 8px;"></tbody>
|
|
|
44
|
+ </table>
|
|
|
45
|
+ </div>
|
|
|
46
|
+ <!--重新办理-->
|
|
|
47
|
+ <div style="width: 100%;padding: 10px;">
|
|
|
48
|
+ <table class="table" border="" cellspacing="0" cellpadding="0" style="border: 1px solid #e7eaec;">
|
|
|
49
|
+ <theard>
|
|
|
50
|
+ <tr>
|
|
|
51
|
+ <td class="text-center" style="min-width:70px;">序号</td>
|
|
|
52
|
+ <td class="text-center" style="min-width:70px;">承办人</td>
|
|
|
53
|
+ <td class="text-center" style="min-width:70px;">联系方式</td>
|
|
|
54
|
+ <td class="text-center" style="min-width:70px;">职务</td>
|
|
|
55
|
+ <td class="text-center" style="min-width:70px;">处理结果</td>
|
|
|
56
|
+ <td class="text-center" style="min-width:70px;">办理时间</td>
|
|
|
57
|
+ <td class="text-center" style="min-width:70px;">办理结果</td>
|
|
|
58
|
+ <td class="text-center" style="min-width:70px;">审批时间</td>
|
|
|
59
|
+ <td class="text-center" style="min-width:70px;">审批内容</td>
|
|
|
60
|
+ <td class="text-center" style="min-width:70px;">审批意见</td>
|
|
|
61
|
+ <td class="text-center" style="min-width:70px;">类型</td>
|
|
|
62
|
+ <td class="text-center" style="min-width:70px;">是/否向当事人反馈</td>
|
|
|
63
|
+ <td class="text-center" style="min-width:70px;">处理方案/进程</td>
|
|
|
64
|
+ <!-- <td class="text-center" style="min-width:70px;">沟通时间</td>
|
|
|
65
|
+ <td class="text-center" style="min-width:70px;">沟通方式</td>
|
|
|
66
|
+ <td class="text-center" style="min-width:70px;">是否满意</td> -->
|
|
|
67
|
+ <td class="text-center" style="min-width:70px;">附件</td>
|
|
|
68
|
+ </tr>
|
|
|
69
|
+ </theard>
|
|
|
70
|
+ <tbody class="HGXX" style="border-top: none; padding: 8px;"></tbody>
|
|
|
71
|
+ <!--<div class="FJ"></div>-->
|
|
|
72
|
+ </table>
|
|
|
73
|
+ </div>
|
|
|
74
|
+
|
|
|
75
|
+ <div class="Common">
|
|
|
76
|
+ <table>
|
|
|
77
|
+ <tr>
|
|
|
78
|
+ <th class="Importent">承办人:</th>
|
|
|
79
|
+ <td>
|
|
|
80
|
+ <input id="dealman" list="dealmanList" type="text" style="height: 32px;" autocomplete="off">
|
|
|
81
|
+ <datalist id="dealmanList">
|
|
|
82
|
+ </datalist>
|
|
|
83
|
+ </td>
|
|
|
84
|
+ <th class="Importent">职务:</th>
|
|
|
85
|
+ <td>
|
|
|
86
|
+ <input type="text" id="duties">
|
|
|
87
|
+ </td>
|
|
|
88
|
+ <th class="Importent">联系方式:</th>
|
|
|
89
|
+ <td>
|
|
|
90
|
+ <input type="text" id="dealcontact">
|
|
|
91
|
+ </td>
|
|
|
92
|
+ </tr>
|
|
|
93
|
+ <tr>
|
|
|
94
|
+ <th class="Importent">审核领导:</th>
|
|
|
95
|
+ <td>
|
|
|
96
|
+ <input type="text" id="auditUser" />
|
|
|
97
|
+ </td>
|
|
|
98
|
+ <th class="Importent">职务:</th>
|
|
|
99
|
+ <td>
|
|
|
100
|
+ <input type="text" id="auditUserDuties" />
|
|
|
101
|
+ </td>
|
|
|
102
|
+ <th class="Importent">联系方式:</th>
|
|
|
103
|
+ <td>
|
|
|
104
|
+ <input type="text" id="auditContact" />
|
|
|
105
|
+ </td>
|
|
|
106
|
+ </tr>
|
|
|
107
|
+ <tr>
|
|
|
108
|
+ <th class="Importent">处理结果:</th>
|
|
|
109
|
+ <td colspan="5"><textarea data-adaptheight id="situation" name="" rows="6" cols=""></textarea></td>
|
|
|
110
|
+ </tr>
|
|
|
111
|
+ <tr>
|
|
|
112
|
+ <th>工单内容:</th>
|
|
|
113
|
+ <td colspan="5">
|
|
|
114
|
+ <span id="workremark" name="" rows="6" cols="" readonly="readonly"></span>
|
|
|
115
|
+ </td>
|
|
|
116
|
+ </tr>
|
|
|
117
|
+ <tr>
|
|
|
118
|
+ <th class="Importent">是/否向当事人反馈:</th>
|
|
|
119
|
+ <td id="isProResultRadio" style="font-size: 12px">
|
|
|
120
|
+ <label style="margin-right: 10px">
|
|
|
121
|
+ <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px;" />是
|
|
|
122
|
+ </label>
|
|
|
123
|
+ <label>
|
|
|
124
|
+ <input type="radio" value="0" name="isDisposeResult" style="vertical-align: -2px;" />否
|
|
|
125
|
+ </label>
|
|
|
126
|
+ </td>
|
|
|
127
|
+ </tr>
|
|
|
128
|
+ <!-- <tr class="dealWithRemark-wrapper">
|
|
|
129
|
+ <th>已办未果备注:</th>
|
|
|
130
|
+ <td colspan="5">
|
|
|
131
|
+ <textarea data-adaptheight id="dealWithRemark" name="" rows="6" cols=""></textarea>
|
|
|
132
|
+ </td>
|
|
|
133
|
+ </tr> -->
|
|
|
134
|
+ <tr class="prosituation-wrapper">
|
|
|
135
|
+ <th>处理方案/进程:</th>
|
|
|
136
|
+ <td colspan="5">
|
|
|
137
|
+ <textarea data-adaptheight id="prosituation" name="" rows="6" cols=""></textarea>
|
|
|
138
|
+ </td>
|
|
|
139
|
+ </tr>
|
|
|
140
|
+ <tr class="annotation-wrapper">
|
|
|
141
|
+ <th style="color:#FF0000;">注释:</th>
|
|
|
142
|
+ <td style="color:#FF0000" colspan="5">请提交加盖单位公章的相关说明文件,不添加文件说明将被扣考核分</td>
|
|
|
143
|
+ </tr>
|
|
|
144
|
+ <tr class="connecttime-wrapper">
|
|
|
145
|
+ <th>沟通时间:</th>
|
|
|
146
|
+ <td>
|
|
|
147
|
+ <input type="text" class="laydate-icon" id="connecttime"
|
|
|
148
|
+ style="width: 172px; height: 32px; border-color: rgb(158, 158, 158);">
|
|
|
149
|
+ </td>
|
|
|
150
|
+ </tr>
|
|
|
151
|
+ <tr class="connectmode-wrapper">
|
|
|
152
|
+ <th>沟通方式:</th>
|
|
|
153
|
+ <td>
|
|
|
154
|
+ <input type="text" id="connectmode">
|
|
|
155
|
+ </td>
|
|
|
156
|
+ </tr>
|
|
|
157
|
+ <!--<tr class="replycontent-wrapper">
|
|
|
158
|
+ <th>答复内容:</th>
|
|
|
159
|
+ <td colspan="5">
|
|
|
160
|
+ <textarea id="replycontent" name="" rows="6" cols="" ></textarea>
|
|
|
161
|
+ </td>
|
|
|
162
|
+ </tr>-->
|
|
|
163
|
+ <tr class="isstaisfied-wrapper">
|
|
|
164
|
+ <th>是否满意:</th>
|
|
|
165
|
+ <td id="isStaisfiedRadio" style="font-size: 12px" colspan="5">
|
|
|
166
|
+ <label style="margin-right: 10px;">
|
|
|
167
|
+ <input type="radio" value="1" name="isstaisfied" style="vertical-align: -2px;" />满意
|
|
|
168
|
+ </label>
|
|
|
169
|
+ <label style="margin-right: 10px;">
|
|
|
170
|
+ <input type="radio" value="2" name="isstaisfied" style="vertical-align: -2px;" />基本满意
|
|
|
171
|
+ </label>
|
|
|
172
|
+ <label style="margin-right: 10px;">
|
|
|
173
|
+ <input type="radio" value="3" name="isstaisfied" style="vertical-align: -2px;" />不满意
|
|
|
174
|
+ </label>
|
|
|
175
|
+ </td>
|
|
|
176
|
+ </tr>
|
|
|
177
|
+ <tr>
|
|
|
178
|
+ <th class="Importent">附件:</th>
|
|
|
179
|
+ <td colspan="5">
|
|
|
180
|
+ <div class="fileBox">
|
|
|
181
|
+ </div>
|
|
|
182
|
+ <!--<span class="fjnr"></span>-->
|
|
|
183
|
+ <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
|
|
|
184
|
+ style="display: none;">
|
|
|
185
|
+ <input class="input" type="button" value="上传" id="scwj" />
|
|
|
186
|
+ <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
|
|
|
187
|
+ <input type="hidden" id="file" />
|
|
|
188
|
+ <span style="color:#FF0000; border: none;">
|
|
|
189
|
+ (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
|
|
|
190
|
+ </span>
|
|
|
191
|
+ </td>
|
|
|
192
|
+ </tr>
|
|
|
193
|
+ <tr>
|
|
|
194
|
+ <td style="text-align: right"><button class="btns handleBtn">查看办理结果</button></td>
|
|
|
195
|
+ <td colspan="5">
|
|
|
196
|
+ <textarea data-adaptheight id="result" name="" rows="4" cols=""></textarea>
|
|
|
197
|
+ </td>
|
|
|
198
|
+ <input type="hidden" id="ID" />
|
|
|
199
|
+ </tr>
|
|
|
200
|
+ </table>
|
|
|
201
|
+ <div class="btn_box">
|
|
|
202
|
+ <button class="btns Submit">提交</button>
|
|
|
203
|
+ </div>
|
|
|
204
|
+ </div>
|
|
|
205
|
+ <script src="../css/laydate/laydate.js"></script>
|
|
|
206
|
+ <script src="../js/adjustHeight.js"></script>
|
|
|
207
|
+ <script src="../Script/Common/huayi.common.js"></script>
|
|
|
208
|
+ <script>
|
|
|
209
|
+ var wid = helper.request.queryString("wid");
|
|
|
210
|
+ var isProtect = helper.request.queryString("isProtect");
|
|
|
211
|
+ var State;
|
|
|
212
|
+ var a = $("#ID").val();
|
|
|
213
|
+ var simpleDetailStrStart = "";
|
|
|
214
|
+ var simpleDetailStrEnd = "";
|
|
|
215
|
+ var simpleDetailStr = "";
|
|
|
216
|
+ Detail();
|
|
|
217
|
+ $(document).ready(function () {
|
|
|
218
|
+ laydate.skin('blue');
|
|
|
219
|
+ laydate({
|
|
|
220
|
+ elem: '#connecttime',
|
|
|
221
|
+ event: 'focus',
|
|
|
222
|
+ istoday: true,
|
|
|
223
|
+ istime: true,
|
|
|
224
|
+ type: 'datetime',
|
|
|
225
|
+ format: 'YYYY-MM-DD hh:mm:ss',
|
|
|
226
|
+ });
|
|
|
227
|
+ simpleDetail();
|
|
|
228
|
+ HGXX();
|
|
|
229
|
+ BLNR();
|
|
|
230
|
+ getHistoryList();
|
|
|
231
|
+ orderdetail();
|
|
|
232
|
+ // Hove();
|
|
|
233
|
+ // LOAD();
|
|
|
234
|
+
|
|
|
235
|
+ //上传附件
|
|
|
236
|
+ $("#scwj").click(function () {
|
|
|
237
|
+ $("#upFile").trigger("click");
|
|
|
238
|
+ })
|
|
|
239
|
+ $("#upFile").change(function () {
|
|
|
240
|
+ upload('upFile','.fileBox',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx'],"#file");
|
|
|
241
|
+ })
|
|
|
242
|
+ $("#scfj").click(function () {
|
|
|
243
|
+ $(".fjnr").text("");
|
|
|
244
|
+ $("#scfj").hide();
|
|
|
245
|
+ })
|
|
|
246
|
+ // $('.BC').click(function() {
|
|
|
247
|
+ // if($("#dealman").val()==""){
|
|
|
248
|
+ // layer.msg("办理人不能为空");
|
|
|
249
|
+ // }else if($("#result").val()==""){
|
|
|
250
|
+ // layer.msg("办理内容不能为空");
|
|
|
251
|
+ // }else{
|
|
|
252
|
+ // State = 0;
|
|
|
253
|
+ // JA();
|
|
|
254
|
+ // }
|
|
|
255
|
+ //
|
|
|
256
|
+ // })
|
|
|
257
|
+ $('.Submit').click(function () {
|
|
|
258
|
+ if ($("#dealman").val() == "") {
|
|
|
259
|
+ layer.msg("办理人不能为空");
|
|
|
260
|
+ } else if ($("#situation").val() == "") {
|
|
|
261
|
+ layer.msg("处理结果不能为空");
|
|
|
262
|
+ } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == null) {
|
|
|
263
|
+ layer.msg("请选择是/否向当事人反馈");
|
|
|
264
|
+ } else if ($("#dealcontact").val() == "") {
|
|
|
265
|
+ layer.msg("联系方式不能为空")
|
|
|
266
|
+ } else if ($("#duties").val() == "") {
|
|
|
267
|
+ layer.msg("职务不能为空")
|
|
|
268
|
+ } else if ($("#result").val() == "") {
|
|
|
269
|
+ layer.msg("请生成办理结果")
|
|
|
270
|
+ } else {
|
|
|
271
|
+ State = 1;
|
|
|
272
|
+ JA();
|
|
|
273
|
+ }
|
|
|
274
|
+ })
|
|
|
275
|
+
|
|
|
276
|
+ $(".prosituation-wrapper").hide(); //处理方案/进程
|
|
|
277
|
+ $(".annotation-wrapper").hide(); //注释
|
|
|
278
|
+ $(".connecttime-wrapper").hide(); //沟通时间
|
|
|
279
|
+ $(".connectmode-wrapper").hide(); //沟通方式
|
|
|
280
|
+ // $(".replycontent-wrapper").hide(); //答复内容
|
|
|
281
|
+ $(".isstaisfied-wrapper").hide(); //是否满意
|
|
|
282
|
+ // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
|
|
|
283
|
+
|
|
|
284
|
+
|
|
|
285
|
+ /*
|
|
|
286
|
+ * 处理结果
|
|
|
287
|
+ * 是 1
|
|
|
288
|
+ * 否 2
|
|
|
289
|
+ */
|
|
|
290
|
+ $('#isProResultRadio').find('input[type="radio"]').on('change', function () {
|
|
|
291
|
+ $("#prosituation").val(""); //处理方案/进程
|
|
|
292
|
+ $("#connecttime").val(""); //沟通时间
|
|
|
293
|
+ $("#connectmode").val(""); //沟通方式
|
|
|
294
|
+ $("#result").val(""); //办理结果
|
|
|
295
|
+ // $("#replycontent").val(""); //答复内容
|
|
|
296
|
+ $('#isStaisfiedRadio input[name="isstaisfied"]:checked').prop("checked", false); //是否满意
|
|
|
297
|
+ isProResultJudge($(this).val());
|
|
|
298
|
+ });
|
|
|
299
|
+
|
|
|
300
|
+
|
|
|
301
|
+ //办理结果
|
|
|
302
|
+ $('.handleBtn').click(function () {
|
|
|
303
|
+ simpleDetailStrEnd = $("#situation").val()
|
|
|
304
|
+ simpleDetailStr =
|
|
|
305
|
+ simpleDetailStrStart + simpleDetailStrEnd;
|
|
|
306
|
+ $("#result").val(simpleDetailStr);
|
|
|
307
|
+ })
|
|
|
308
|
+
|
|
|
309
|
+ });
|
|
|
310
|
+ //交办
|
|
|
311
|
+ function JA() {
|
|
|
312
|
+ $.post(huayi.config.callcenter_url + 'WorkOrder/EJAppendWorkOrder', {
|
|
|
313
|
+ workorderid: wid,
|
|
|
314
|
+ dealman: $("#dealman").val(), //承办人
|
|
|
315
|
+ AuditUser: $("#auditUser").val(), //审核领导
|
|
|
316
|
+ post: $("#auditUserDuties").val(), //审核领导职务
|
|
|
317
|
+ auditContact: $("#auditContact").val(), //审核领导联系方式
|
|
|
318
|
+ result: $('#result').val(), //处理情况
|
|
|
319
|
+ situation: $("#situation").val(), //办理结果
|
|
|
320
|
+ isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
|
|
|
321
|
+ // IsProResult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), // 已办未果
|
|
|
322
|
+ prosituation: $("#prosituation").val(), //处理方案/进程
|
|
|
323
|
+ // Unsuccessful: $("#dealWithRemark").val(), //已办未果备注
|
|
|
324
|
+ dealcontact: $("#dealcontact").val(), //联系方式
|
|
|
325
|
+ duties: $("#duties").val(), //职务
|
|
|
326
|
+ connecttime: $("#connecttime").val(), //沟通时间
|
|
|
327
|
+ connectmode: $("#connectmode").val(), //沟通方式
|
|
|
328
|
+ // replycontent: $("#replycontent").val(), //答复内容
|
|
|
329
|
+ isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
|
|
|
330
|
+ state: State,
|
|
|
331
|
+ feedbackid: a,
|
|
|
332
|
+ files: $("#file").val(),
|
|
|
333
|
+ token: $.cookie("token")
|
|
|
334
|
+ }, function (result) {
|
|
|
335
|
+ result = JSON.parse(result);
|
|
|
336
|
+
|
|
|
337
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
338
|
+ addHistory();
|
|
|
339
|
+ var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
340
|
+ parent.layer.close(index); //再执行关闭
|
|
|
341
|
+ parent.load();
|
|
|
342
|
+ parent.layer.msg("办理成功");
|
|
|
343
|
+ $('.fileBox').html('');
|
|
|
344
|
+ }
|
|
|
345
|
+ })
|
|
|
346
|
+ }
|
|
|
347
|
+ //工单详情
|
|
|
348
|
+ function orderdetail(){
|
|
|
349
|
+ $.getJSON(
|
|
|
350
|
+ huayi.config.callcenter_url + "WorkOrder/GetWorkOrderNew", {
|
|
|
351
|
+ workorderid: wid,
|
|
|
352
|
+ type: 0,
|
|
|
353
|
+ token: $.cookie("token"),
|
|
|
354
|
+ },
|
|
|
355
|
+ function (result) {
|
|
|
356
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
357
|
+ var Data = result.data.data;
|
|
|
358
|
+ $('#workremark').text(Data[0].F_ComContent);
|
|
|
359
|
+ }
|
|
|
360
|
+ }
|
|
|
361
|
+ );
|
|
|
362
|
+ }
|
|
|
363
|
+ // 工单详情
|
|
|
364
|
+ function HGXX() {
|
|
|
365
|
+
|
|
|
366
|
+ $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
|
|
|
367
|
+ workorderid: wid,
|
|
|
368
|
+ token: $.cookie("token")
|
|
|
369
|
+ }, function (result) {
|
|
|
370
|
+ // result = JSON.stringify(result)
|
|
|
371
|
+ // alert(result)
|
|
|
372
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
373
|
+ var temp;
|
|
|
374
|
+ var Agree;
|
|
|
375
|
+ $.each(result.data.fkinfo, function (i, n) {
|
|
|
376
|
+ // var r = JSON.stringify(n.File);
|
|
|
377
|
+ if (n.F_IsAudit == 1) {
|
|
|
378
|
+ Agree = "同意";
|
|
|
379
|
+ } else if (n.F_IsAudit == 2) {
|
|
|
380
|
+ Agree = "拒绝";
|
|
|
381
|
+ } else if (n.F_IsAudit == 0) {
|
|
|
382
|
+ Agree = "";
|
|
|
383
|
+ }
|
|
|
384
|
+ var bval = n.F_Type;
|
|
|
385
|
+ switch (bval + '') {
|
|
|
386
|
+ case '1':
|
|
|
387
|
+ bval = '主办';
|
|
|
388
|
+ break;
|
|
|
389
|
+ case '2':
|
|
|
390
|
+ bval = '协办';
|
|
|
391
|
+ break;
|
|
|
392
|
+ }
|
|
|
393
|
+ //是/否向当事人反馈
|
|
|
394
|
+ var isProResultValue = n.F_IsProResult + "";
|
|
|
395
|
+ switch (isProResultValue) {
|
|
|
396
|
+ case "0":
|
|
|
397
|
+ isProResultValue = "否";
|
|
|
398
|
+ break;
|
|
|
399
|
+ case "1":
|
|
|
400
|
+ isProResultValue = "是";
|
|
|
401
|
+ break;
|
|
|
402
|
+ case "2":
|
|
|
403
|
+ isProResultValue = "已办未果";
|
|
|
404
|
+ break;
|
|
|
405
|
+ }
|
|
|
406
|
+ //是否满意
|
|
|
407
|
+ var isSatisfiedValue = n.F_IsSatisfied + "";
|
|
|
408
|
+ switch (isSatisfiedValue) {
|
|
|
409
|
+ case "0":
|
|
|
410
|
+ isSatisfiedValue = "未评价";
|
|
|
411
|
+ break;
|
|
|
412
|
+ case "1":
|
|
|
413
|
+ isSatisfiedValue = "满意";
|
|
|
414
|
+ break;
|
|
|
415
|
+ case "2":
|
|
|
416
|
+ isSatisfiedValue = "基本满意";
|
|
|
417
|
+ break;
|
|
|
418
|
+ case "3":
|
|
|
419
|
+ isSatisfiedValue = "不满意";
|
|
|
420
|
+ break;
|
|
|
421
|
+ }
|
|
|
422
|
+ //沟通时间
|
|
|
423
|
+ var connectTimeValue = n.F_ConnectTime;
|
|
|
424
|
+ switch (connectTimeValue) {
|
|
|
425
|
+ case null:
|
|
|
426
|
+ connectTimeValue = "";
|
|
|
427
|
+ break;
|
|
|
428
|
+ default:
|
|
|
429
|
+ connectTimeValue = n.F_ConnectTime;
|
|
|
430
|
+ }
|
|
|
431
|
+
|
|
|
432
|
+ // 审批时间
|
|
|
433
|
+ var auditTimeValue
|
|
|
434
|
+ switch (n.F_AuditTime) {
|
|
|
435
|
+ case "":
|
|
|
436
|
+ auditTimeValue = ""
|
|
|
437
|
+ break;
|
|
|
438
|
+ case null:
|
|
|
439
|
+ auditTimeValue = ""
|
|
|
440
|
+ break;
|
|
|
441
|
+ default:
|
|
|
442
|
+ auditTimeValue = n.F_AuditTime
|
|
|
443
|
+ break;
|
|
|
444
|
+ }
|
|
|
445
|
+ //审批内容
|
|
|
446
|
+ var auditReasonValue
|
|
|
447
|
+ switch (n.F_AuditReason) {
|
|
|
448
|
+ case "":
|
|
|
449
|
+ auditReasonValue = ""
|
|
|
450
|
+ break;
|
|
|
451
|
+ case null:
|
|
|
452
|
+ auditReasonValue = ""
|
|
|
453
|
+ break;
|
|
|
454
|
+ default:
|
|
|
455
|
+ auditReasonValue = n.F_AuditReason
|
|
|
456
|
+ break;
|
|
|
457
|
+ }
|
|
|
458
|
+
|
|
|
459
|
+ //职务
|
|
|
460
|
+ var dutiesValue
|
|
|
461
|
+ switch (n.F_Duties) {
|
|
|
462
|
+ case "":
|
|
|
463
|
+ dutiesValue = ""
|
|
|
464
|
+ break;
|
|
|
465
|
+ case null:
|
|
|
466
|
+ dutiesValue = ""
|
|
|
467
|
+ break;
|
|
|
468
|
+ default:
|
|
|
469
|
+ dutiesValue = n.F_Duties
|
|
|
470
|
+ break;
|
|
|
471
|
+ }
|
|
|
472
|
+ //处理情况
|
|
|
473
|
+ var situationValue
|
|
|
474
|
+ switch (n.F_Situation) {
|
|
|
475
|
+ case "":
|
|
|
476
|
+ situationValue = ""
|
|
|
477
|
+ break;
|
|
|
478
|
+ case null:
|
|
|
479
|
+ situationValue = ""
|
|
|
480
|
+ break;
|
|
|
481
|
+ default:
|
|
|
482
|
+ situationValue = n.F_Situation
|
|
|
483
|
+ break;
|
|
|
484
|
+ }
|
|
|
485
|
+
|
|
|
486
|
+ temp = '<tr>' +
|
|
|
487
|
+ '<td class="text-center">' + (i + 1) + '</td>' +
|
|
|
488
|
+ '<td class="text-center">' + n.F_DealUser + '</td>' +
|
|
|
489
|
+ '<td class="text-center">' + n.F_DealUserContact + '</td>' +
|
|
|
490
|
+ '<td class="text-center">' + dutiesValue + '</td>' +
|
|
|
491
|
+ '<td class="text-center">' + situationValue + '</td>' +
|
|
|
492
|
+ '<td class="text-center">' + n.F_CreateTime + '</td>' +
|
|
|
493
|
+ '<td class="text-center">' + n.F_Result + '</td>' +
|
|
|
494
|
+ '<td class="text-center">' + auditTimeValue + '</td>' +
|
|
|
495
|
+ '<td class="text-center">' + auditReasonValue + '</td>' +
|
|
|
496
|
+ '<td class="text-center">' + Agree + '</td>' +
|
|
|
497
|
+ '<td class="text-center" data-formatter="shtype">' + bval + '</td>' +
|
|
|
498
|
+ '<td class="text-center">' + isProResultValue + '</td>' +
|
|
|
499
|
+ '<td class="text-center">' + n.F_ProSituation + '</td>' +
|
|
|
500
|
+ // '<td class="text-center">' + connectTimeValue + '</td>' +
|
|
|
501
|
+ // '<td class="text-center">' + n.F_ConnectMode + '</td>' +
|
|
|
502
|
+ // '<td class="text-center">' + isSatisfiedValue + '</td>' +
|
|
|
503
|
+ '<td class="text-center FJ" style="color:#00a1cb;"></td>' +
|
|
|
504
|
+ '</tr>';
|
|
|
505
|
+
|
|
|
506
|
+ var tmp = '';
|
|
|
507
|
+ if (n.File) {
|
|
|
508
|
+ $.each(n.File, function (d, f) {
|
|
|
509
|
+ tmp += '<a style="margin-right:5px;" href="' + f.F_FileUrl +
|
|
|
510
|
+ '" download="' + f.F_FileUrl + '">' + f.F_FileName
|
|
|
511
|
+ .substring(19) + '</a>';
|
|
|
512
|
+ })
|
|
|
513
|
+ }
|
|
|
514
|
+ $(temp).appendTo($('.HGXX'))
|
|
|
515
|
+ .find('.FJ')
|
|
|
516
|
+ .append(tmp);
|
|
|
517
|
+
|
|
|
518
|
+ });
|
|
|
519
|
+
|
|
|
520
|
+ //
|
|
|
521
|
+ // alert(i);
|
|
|
522
|
+
|
|
|
523
|
+
|
|
|
524
|
+ }
|
|
|
525
|
+ })
|
|
|
526
|
+
|
|
|
527
|
+ }
|
|
|
528
|
+ // <a class="tiaozhuan" style="margin-right:5px;" href="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" download="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" >附件</a>
|
|
|
529
|
+ // function Hove(){
|
|
|
530
|
+ // $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
|
|
|
531
|
+ // if(event.type == "mouseover"){
|
|
|
532
|
+ // //鼠标悬浮
|
|
|
533
|
+ // var miao=$(this).attr("href");
|
|
|
534
|
+ // if (miao=="") {
|
|
|
535
|
+ // $(this).removeAttr("href");
|
|
|
536
|
+ // $(this).removeAttr("download");
|
|
|
537
|
+ // $(this).html("");
|
|
|
538
|
+ //
|
|
|
539
|
+ // } else{
|
|
|
540
|
+ // $(this).attr("href");
|
|
|
541
|
+ // $(this).attr("download");
|
|
|
542
|
+ // }
|
|
|
543
|
+ // }else if(event.type == "mouseout"){
|
|
|
544
|
+ // //鼠标离开
|
|
|
545
|
+ // }
|
|
|
546
|
+ // })
|
|
|
547
|
+ //
|
|
|
548
|
+ //
|
|
|
549
|
+ // }
|
|
|
550
|
+
|
|
|
551
|
+ // $(window).load(function(){
|
|
|
552
|
+ // alert("DDD");
|
|
|
553
|
+ // alert($(".tiaozhuan").attr("href"));
|
|
|
554
|
+ // var miao1=$(".tiaozhuan").attr("href");
|
|
|
555
|
+ // if (miao1=="") {
|
|
|
556
|
+ // alert("aaa");
|
|
|
557
|
+ //// $(this).html("");
|
|
|
558
|
+ // } else{
|
|
|
559
|
+ // alert("bbb");
|
|
|
560
|
+ // $(this).html("");
|
|
|
561
|
+ // }
|
|
|
562
|
+ // });
|
|
|
563
|
+
|
|
|
564
|
+
|
|
|
565
|
+ // 派单内容给
|
|
|
566
|
+ function BLNR() {
|
|
|
567
|
+ $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
|
|
|
568
|
+ workorderid: wid,
|
|
|
569
|
+ token: $.cookie("token")
|
|
|
570
|
+ }, function (result) {
|
|
|
571
|
+ // result = JSON.stringify(result)
|
|
|
572
|
+
|
|
|
573
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
574
|
+ var temp2;
|
|
|
575
|
+ $.each(result.data.pdinfo, function (i, n) {
|
|
|
576
|
+
|
|
|
577
|
+ temp2 = temp2 + '<tr><td class="text-center">' + n.F_CreateTime +
|
|
|
578
|
+ '</td><td class="text-center">' + n.F_LimitTime +
|
|
|
579
|
+ '</td><td class="text-center">' + n.F_AssignedOpinion + '</td></tr>';
|
|
|
580
|
+ });
|
|
|
581
|
+ $('.BLNR').append(temp2);
|
|
|
582
|
+ }
|
|
|
583
|
+ })
|
|
|
584
|
+ }
|
|
|
585
|
+ //草稿详情
|
|
|
586
|
+ function Detail() {
|
|
|
587
|
+ $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
|
|
|
588
|
+ workorderid: wid,
|
|
|
589
|
+ type: 2,
|
|
|
590
|
+ token: $.cookie("token")
|
|
|
591
|
+ }, function (result) {
|
|
|
592
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
593
|
+ if (result.data.length > 0) {
|
|
|
594
|
+ var IsProResultValue = result.data[0].F_IsProResult + "";
|
|
|
595
|
+ isProResultJudge(IsProResultValue);
|
|
|
596
|
+ $("#dealman").val(result.data[0].F_DealUser); //承办人
|
|
|
597
|
+ $("#duties").val(result.data[0].F_Duties); //职务
|
|
|
598
|
+ // $("#result").text(result.data[0].F_Result); //处理结果
|
|
|
599
|
+ $("#situation").val(result.data[0].F_Situation); //处理情况
|
|
|
600
|
+ $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0]
|
|
|
601
|
+ .F_IsProResult + '"]').prop("checked", true); //是/否向当事人反馈
|
|
|
602
|
+ $("#prosituation").val(result.data[0].F_ProSituation); //处理方案/进程
|
|
|
603
|
+ $("#dealcontact").val(result.data[0].F_DealUserContact); //联系方式
|
|
|
604
|
+ $("#connecttime").val(result.data[0].F_ConnectTime); //沟通时间
|
|
|
605
|
+ $("#connectmode").val(result.data[0].F_ConnectMode); //沟通方式
|
|
|
606
|
+ // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
|
|
|
607
|
+ $('#isStaisfiedRadio input[name="isstaisfied"][value="' + result.data[0].F_IsSatisfied +
|
|
|
608
|
+ '"]').prop("checked", true); //是否满意
|
|
|
609
|
+ a = result.data[0].F_Id;
|
|
|
610
|
+ };
|
|
|
611
|
+
|
|
|
612
|
+ }
|
|
|
613
|
+ })
|
|
|
614
|
+ }
|
|
|
615
|
+ //清除
|
|
|
616
|
+ function Clean() {
|
|
|
617
|
+ $("#startTime").val(''),
|
|
|
618
|
+ $('#assignedopinion').val('')
|
|
|
619
|
+ }
|
|
|
620
|
+ //上传文件
|
|
|
621
|
+// function upload() {
|
|
|
622
|
+// var Files = document.getElementById("upFile").files;
|
|
|
623
|
+// if (Files.length > 0) {
|
|
|
624
|
+// var formData = new FormData();
|
|
|
625
|
+// for (var i = 0; i < Files.length; i++) {
|
|
|
626
|
+// formData.append('file' + i, Files[i]);
|
|
|
627
|
+// }
|
|
|
628
|
+// formData.append("token", $.cookie("token"));
|
|
|
629
|
+// var typeName = Files[0].name.split('.')[1];
|
|
|
630
|
+// if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName ==
|
|
|
631
|
+// 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
|
|
|
632
|
+// $.ajax({
|
|
|
633
|
+// url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
|
|
|
634
|
+// type: "POST",
|
|
|
635
|
+// data: formData,
|
|
|
636
|
+// /**
|
|
|
637
|
+// *必须false才会自动加上正确的Content-Type
|
|
|
638
|
+// */
|
|
|
639
|
+// contentType: false,
|
|
|
640
|
+// /**
|
|
|
641
|
+// * 必须false才会避开jQuery对 formdata 的默认处理
|
|
|
642
|
+// * XMLHttpRequest会对 formdata 进行正确的处理
|
|
|
643
|
+// */
|
|
|
644
|
+// processData: false,
|
|
|
645
|
+// success: function (result) {
|
|
|
646
|
+// document.getElementById("upFile").outerHTML = document.getElementById("upFile")
|
|
|
647
|
+// .outerHTML;
|
|
|
648
|
+// $("#upFile").change(function () {
|
|
|
649
|
+// upload();
|
|
|
650
|
+// });
|
|
|
651
|
+// var r = $.parseJSON(result);
|
|
|
652
|
+// if (r.state.toLowerCase() == "success") {
|
|
|
653
|
+// //$(".fjnr").text(r.data[0].F_FileName);
|
|
|
654
|
+// var a = r.data;
|
|
|
655
|
+// $(a).each(function (i, n) {
|
|
|
656
|
+// var strs = '<span class="files" fiel-num="' + n.F_FileId +
|
|
|
657
|
+// '">' + n.F_FileName.substring(19) +
|
|
|
658
|
+// '<i class="fa fa-remove del_file"></i></span>'
|
|
|
659
|
+// $(strs).appendTo($('.fileBox')).find('.del_file').click(
|
|
|
660
|
+// function (event) {
|
|
|
661
|
+// event.stopPropagation();
|
|
|
662
|
+// $(this).parent().remove();
|
|
|
663
|
+// file_num()
|
|
|
664
|
+// })
|
|
|
665
|
+// })
|
|
|
666
|
+// file_num();
|
|
|
667
|
+// }
|
|
|
668
|
+// }
|
|
|
669
|
+// });
|
|
|
670
|
+// } else {
|
|
|
671
|
+// layer.msg("格式不正确");
|
|
|
672
|
+// }
|
|
|
673
|
+// } else {
|
|
|
674
|
+// layer.confirm('请上传文件!', {
|
|
|
675
|
+// btn: ['确定']
|
|
|
676
|
+// });
|
|
|
677
|
+// }
|
|
|
678
|
+// }
|
|
|
679
|
+// //上传文件隐藏域值
|
|
|
680
|
+// function file_num() {
|
|
|
681
|
+// var str = '';
|
|
|
682
|
+// var Str;
|
|
|
683
|
+// $('.fileBox .files').each(function (j, m) {
|
|
|
684
|
+// var aa = $(m).attr("fiel-num")
|
|
|
685
|
+// str += aa + ",";
|
|
|
686
|
+// Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
|
|
|
687
|
+// })
|
|
|
688
|
+// $("#file").val(Str);
|
|
|
689
|
+// }
|
|
|
690
|
+ // 处理结果判断
|
|
|
691
|
+ function isProResultJudge(isProResultdata) {
|
|
|
692
|
+ // if (isProResultdata === '1') {
|
|
|
693
|
+ // if (isProtect === "1") {
|
|
|
694
|
+ // $(".prosituation-wrapper").hide(); //处理方案/进程
|
|
|
695
|
+ // $(".annotation-wrapper").hide(); //注释
|
|
|
696
|
+ // $(".connecttime-wrapper").hide(); //沟通时间
|
|
|
697
|
+ // $(".connectmode-wrapper").hide(); //沟通方式
|
|
|
698
|
+ // // $(".replycontent-wrapper").hide(); //答复内容
|
|
|
699
|
+ // $(".isstaisfied-wrapper").hide(); //是否满意
|
|
|
700
|
+ // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
|
|
|
701
|
+ // } else if (isProtect === "0") {
|
|
|
702
|
+ // $(".prosituation-wrapper").hide(); //处理方案/进程
|
|
|
703
|
+ // $(".annotation-wrapper").hide(); //注释
|
|
|
704
|
+ // $(".connecttime-wrapper").show(); //沟通时间
|
|
|
705
|
+ // $(".connectmode-wrapper").show(); //沟通方式
|
|
|
706
|
+ // // $(".replycontent-wrapper").show(); //答复内容
|
|
|
707
|
+ // $(".isstaisfied-wrapper").show(); //是否满意
|
|
|
708
|
+ // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
|
|
|
709
|
+ // }
|
|
|
710
|
+ // } else if (isProResultdata === '2') {
|
|
|
711
|
+ // $(".prosituation-wrapper").show(); //处理方案/进程
|
|
|
712
|
+ // $(".annotation-wrapper").show(); //注释
|
|
|
713
|
+ // $(".connecttime-wrapper").hide(); //沟通时间
|
|
|
714
|
+ // $(".connectmode-wrapper").hide(); //沟通方式
|
|
|
715
|
+ // // $(".replycontent-wrapper").hide(); //答复内容
|
|
|
716
|
+ // $(".isstaisfied-wrapper").hide(); //是否满意
|
|
|
717
|
+ // // $(".dealWithRemark-wrapper").show(); // 已办未果备注
|
|
|
718
|
+ // }
|
|
|
719
|
+ if (isProResultdata === "1") {
|
|
|
720
|
+ // if (isProtect === "1") {
|
|
|
721
|
+ // $(".prosituation-wrapper").hide(); //处理方案/进程
|
|
|
722
|
+ // $(".annotation-wrapper").hide(); //注释
|
|
|
723
|
+ // $(".connecttime-wrapper").hide(); //沟通时间
|
|
|
724
|
+ // $(".connectmode-wrapper").hide(); //沟通方式
|
|
|
725
|
+ // // $(".replycontent-wrapper").hide(); //答复内容
|
|
|
726
|
+ // $(".isstaisfied-wrapper").show(); //是否满意
|
|
|
727
|
+ // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
|
|
|
728
|
+ // } else if (isProtect === "0") {
|
|
|
729
|
+ $(".prosituation-wrapper").hide(); //处理方案/进程
|
|
|
730
|
+ $(".annotation-wrapper").hide(); //注释
|
|
|
731
|
+ $(".connecttime-wrapper").hide(); //沟通时间
|
|
|
732
|
+ $(".connectmode-wrapper").hide(); //沟通方式
|
|
|
733
|
+ // $(".replycontent-wrapper").show(); //答复内容
|
|
|
734
|
+ $(".isstaisfied-wrapper").show(); //是否满意
|
|
|
735
|
+ $(".dealWithRemark-wrapper").hide(); // 已办未果备注
|
|
|
736
|
+ // }
|
|
|
737
|
+ } else if (isProResultdata === "2") {
|
|
|
738
|
+ $(".prosituation-wrapper").show(); //处理方案/进程
|
|
|
739
|
+ $(".annotation-wrapper").show(); //注释
|
|
|
740
|
+ $(".connecttime-wrapper").hide(); //沟通时间
|
|
|
741
|
+ $(".connectmode-wrapper").hide(); //沟通方式
|
|
|
742
|
+ // $(".replycontent-wrapper").hide(); //答复内容
|
|
|
743
|
+ $(".isstaisfied-wrapper").hide(); //是否满意
|
|
|
744
|
+ $(".dealWithRemark-wrapper").show(); // 已办未果备注
|
|
|
745
|
+ } else if (isProResultdata === "0") {
|
|
|
746
|
+ $(".prosituation-wrapper").hide(); //处理方案/进程
|
|
|
747
|
+ $(".annotation-wrapper").hide(); //注释
|
|
|
748
|
+ $(".connecttime-wrapper").hide(); //沟通时间
|
|
|
749
|
+ $(".connectmode-wrapper").hide(); //沟通方式
|
|
|
750
|
+ // $(".replycontent-wrapper").show(); //答复内容
|
|
|
751
|
+ $(".isstaisfied-wrapper").hide(); //是否满意
|
|
|
752
|
+ $(".dealWithRemark-wrapper").hide(); // 已办未果备注
|
|
|
753
|
+ }
|
|
|
754
|
+ }
|
|
|
755
|
+
|
|
|
756
|
+ //简易版工单详情
|
|
|
757
|
+ function simpleDetail() {
|
|
|
758
|
+ $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkorderSimp', {
|
|
|
759
|
+ workorderid: wid,
|
|
|
760
|
+ token: $.cookie("token")
|
|
|
761
|
+ }, function (result) {
|
|
|
762
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
763
|
+ var data = result.data[0];
|
|
|
764
|
+ var date = new Date()
|
|
|
765
|
+ var year = date.getFullYear();
|
|
|
766
|
+ var month = date.getMonth();
|
|
|
767
|
+ var day = date.getDate();
|
|
|
768
|
+ var hour = date.getHours();
|
|
|
769
|
+ var minutes = date.getMinutes();
|
|
|
770
|
+ var seconds = date.getSeconds();
|
|
|
771
|
+ month = month + 1;
|
|
|
772
|
+ if (month >= 1 && month <= 9) {
|
|
|
773
|
+ month = "0" + month
|
|
|
774
|
+ }
|
|
|
775
|
+ if (day >= 1 && day <= 9) {
|
|
|
776
|
+ day = "0" + day
|
|
|
777
|
+ }
|
|
|
778
|
+ var daysTime = year + "年" + month + "月" + day + "日 " + hour + "时" + minutes + "分" +
|
|
|
779
|
+ seconds + "秒"
|
|
|
780
|
+ // simpleDetailStrStart =
|
|
|
781
|
+ // data.deptname +
|
|
|
782
|
+ // "于时间(" +
|
|
|
783
|
+ // daysTime +
|
|
|
784
|
+ // ")回复:"
|
|
|
785
|
+ // data.SourceName +
|
|
|
786
|
+ // "来源工单(编号:" +
|
|
|
787
|
+ // data.F_WorkOrderId +
|
|
|
788
|
+ // ")反映" +
|
|
|
789
|
+ // data.F_ComTitle +
|
|
|
790
|
+ // "问题,";
|
|
|
791
|
+ }
|
|
|
792
|
+ })
|
|
|
793
|
+ }
|
|
|
794
|
+
|
|
|
795
|
+ function getHistoryList() {
|
|
|
796
|
+ $("#dealmanList").empty()
|
|
|
797
|
+ $.ajax({
|
|
|
798
|
+ type: "get",
|
|
|
799
|
+ url: huayi.config.callcenter_url + "History/GetList",
|
|
|
800
|
+ async: true,
|
|
|
801
|
+ dataType: "json",
|
|
|
802
|
+ data: {
|
|
|
803
|
+ name: "contractor",
|
|
|
804
|
+ token: $.cookie("token"),
|
|
|
805
|
+ },
|
|
|
806
|
+ success: function (res) {
|
|
|
807
|
+ if (res.state == "success") {
|
|
|
808
|
+ $.each(res.data, function (index, val) {
|
|
|
809
|
+ if (val.F_Count !== "") {
|
|
|
810
|
+ var data = JSON.parse(val.F_Count)
|
|
|
811
|
+ $("#dealmanList").append("<option value='" + data.name +
|
|
|
812
|
+ "'data-contact='" + data.contact + "'data-job='" + data
|
|
|
813
|
+ .job + "'>")
|
|
|
814
|
+ }
|
|
|
815
|
+ })
|
|
|
816
|
+ $("#dealmanList").append("<option value='清除历史记录'>")
|
|
|
817
|
+ } else {
|
|
|
818
|
+ layer.confirm(res.message, {
|
|
|
819
|
+ icon: 2,
|
|
|
820
|
+ btn: ['确定']
|
|
|
821
|
+ });
|
|
|
822
|
+ }
|
|
|
823
|
+ }
|
|
|
824
|
+ });
|
|
|
825
|
+ }
|
|
|
826
|
+
|
|
|
827
|
+ $("#dealman").change(function () {
|
|
|
828
|
+ var name = $("#dealman").val()
|
|
|
829
|
+ if (name === "清除历史记录") {
|
|
|
830
|
+ $("#dealman").val("")
|
|
|
831
|
+ deleteHistory()
|
|
|
832
|
+ return
|
|
|
833
|
+ }
|
|
|
834
|
+ $("#dealmanList").find("option").each(function () {
|
|
|
835
|
+ if (name == $(this).val()) {
|
|
|
836
|
+ $("#dealcontact").val($(this).attr("data-contact"))
|
|
|
837
|
+ $("#duties").val($(this).attr("data-job"))
|
|
|
838
|
+ }
|
|
|
839
|
+ })
|
|
|
840
|
+ // $("#dealcontact").attr("data-contact")
|
|
|
841
|
+ // $("#duties").attr("data-job")
|
|
|
842
|
+ })
|
|
|
843
|
+
|
|
|
844
|
+ function addHistory() {
|
|
|
845
|
+ var contractorObject = {
|
|
|
846
|
+ name: $("#dealman").val(),
|
|
|
847
|
+ contact: $("#dealcontact").val(),
|
|
|
848
|
+ job: $("#duties").val(),
|
|
|
849
|
+ }
|
|
|
850
|
+ var contractorObjectStr = JSON.stringify(contractorObject);
|
|
|
851
|
+ $.ajax({
|
|
|
852
|
+ type: "post",
|
|
|
853
|
+ url: huayi.config.callcenter_url + "History/Add",
|
|
|
854
|
+ async: true,
|
|
|
855
|
+ dataType: "json",
|
|
|
856
|
+ data: {
|
|
|
857
|
+ name: "contractor",
|
|
|
858
|
+ count: contractorObjectStr,
|
|
|
859
|
+ token: $.cookie("token"),
|
|
|
860
|
+ },
|
|
|
861
|
+ success: function (res) {
|
|
|
862
|
+ var res = $.parseJSON(res)
|
|
|
863
|
+ if (res.state == "success") {
|
|
|
864
|
+
|
|
|
865
|
+ } else {
|
|
|
866
|
+ layer.confirm(res.message, {
|
|
|
867
|
+ icon: 2,
|
|
|
868
|
+ btn: ['确定']
|
|
|
869
|
+ });
|
|
|
870
|
+ }
|
|
|
871
|
+ }
|
|
|
872
|
+ });
|
|
|
873
|
+ }
|
|
|
874
|
+
|
|
|
875
|
+ function deleteHistory() {
|
|
|
876
|
+ $.ajax({
|
|
|
877
|
+ type: "post",
|
|
|
878
|
+ url: huayi.config.callcenter_url + "History/Delete",
|
|
|
879
|
+ async: true,
|
|
|
880
|
+ dataType: "json",
|
|
|
881
|
+ data: {
|
|
|
882
|
+ type: 1,
|
|
|
883
|
+ token: $.cookie("token"),
|
|
|
884
|
+ },
|
|
|
885
|
+ success: function (res) {
|
|
|
886
|
+ if (res.state == "success") {
|
|
|
887
|
+ getHistoryList()
|
|
|
888
|
+ } else {
|
|
|
889
|
+
|
|
|
890
|
+ }
|
|
|
891
|
+ }
|
|
|
892
|
+ });
|
|
|
893
|
+ }
|
|
|
894
|
+ </script>
|
|
|
895
|
+</body>
|
|
|
896
|
+
|
|
|
897
|
+</html>
|