|
|
@@ -4,12 +4,20 @@
|
|
4
|
4
|
|
|
5
|
5
|
$(document).ready(function() {
|
|
6
|
6
|
var ID = helper.request.queryString("str");
|
|
|
7
|
+ laydate.render({
|
|
|
8
|
+ elem: '#t_inqtime',
|
|
|
9
|
+ theme: '#1ab394',
|
|
|
10
|
+ calendar: 'true',
|
|
|
11
|
+ });
|
|
7
|
12
|
autosize($('textarea'));
|
|
8
|
|
- if(ID){
|
|
9
|
|
- getWorkOrderInfo(ID);//获取工单信息
|
|
10
|
|
- getDealDept();//获取交办单位
|
|
11
|
|
- getInfoClass();//获取信息分类
|
|
12
|
|
- }
|
|
|
13
|
+ getDealDept(); //获取交办单位
|
|
|
14
|
+ //获取乡镇下拉//获取信息分类
|
|
|
15
|
+ $.when(helper.getDropList.getlistDropByDic($('#t_county'), 'JBDW'), getInfoClass())
|
|
|
16
|
+ .then(function() {
|
|
|
17
|
+ if(ID) {
|
|
|
18
|
+ getWorkOrderInfo(ID); //获取工单信息
|
|
|
19
|
+ }
|
|
|
20
|
+ });
|
|
13
|
21
|
/*tree下拉框效果*/
|
|
14
|
22
|
$(".inpBox .tree").click(function() {
|
|
15
|
23
|
if($(this).parent().find(".addTree").is(":hidden")) {
|
|
|
@@ -80,13 +88,13 @@ $(document).ready(function() {
|
|
80
|
88
|
});
|
|
81
|
89
|
return;
|
|
82
|
90
|
}
|
|
83
|
|
-
|
|
|
91
|
+
|
|
84
|
92
|
dealWorkOrder(ID);
|
|
85
|
93
|
});
|
|
86
|
94
|
|
|
87
|
95
|
})
|
|
88
|
96
|
//获取交办单位
|
|
89
|
|
-function getDealDept(){
|
|
|
97
|
+function getDealDept() {
|
|
90
|
98
|
$.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlag', {
|
|
91
|
99
|
flag: 'JBDW',
|
|
92
|
100
|
token: $.cookie("token")
|
|
|
@@ -100,7 +108,8 @@ function getDealDept(){
|
|
100
|
108
|
})
|
|
101
|
109
|
}
|
|
102
|
110
|
//获取信息分类
|
|
103
|
|
-function getInfoClass(){
|
|
|
111
|
+function getInfoClass() {
|
|
|
112
|
+ var dtd = $.Deferred(); //在函数内部,新建一个Deferred对象
|
|
104
|
113
|
$.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlag', {
|
|
105
|
114
|
flag: 'XXFL',
|
|
106
|
115
|
token: $.cookie("token")
|
|
|
@@ -108,12 +117,14 @@ function getInfoClass(){
|
|
108
|
117
|
if(result.state.toLowerCase() == "success") {
|
|
109
|
118
|
for(var i = 0; i < result.data.length; i++) {
|
|
110
|
119
|
var html = '<label class="radio-inline" style="font-weight: normal;">' +
|
|
111
|
|
- '<input type="radio" value="' + result.data[i].F_DictionaryValueId + '" name="ltypes" /> ' + result.data[i].F_Name + '' +
|
|
112
|
|
- '</label>';
|
|
|
120
|
+ '<input type="radio" value="' + result.data[i].F_DictionaryValueId + '" name="ltypes" /> ' + result.data[i].F_Name + '' +
|
|
|
121
|
+ '</label>';
|
|
113
|
122
|
$(html).appendTo(".Message_box");
|
|
114
|
123
|
}
|
|
115
|
124
|
}
|
|
116
|
|
- })
|
|
|
125
|
+ dtd.resolve(); // 改变Deferred对象的执行状态
|
|
|
126
|
+ });
|
|
|
127
|
+ return dtd.promise(); // 返回promise对象
|
|
117
|
128
|
}
|
|
118
|
129
|
|
|
119
|
130
|
//获取工单信息
|
|
|
@@ -132,25 +143,22 @@ function getWorkOrderInfo(oid) {
|
|
132
|
143
|
if(data.state == "success") {
|
|
133
|
144
|
var con = data;
|
|
134
|
145
|
var Str = con.data.data;
|
|
135
|
|
- $('#cl_gdbh').text(Str[0].WorkOrderID);//工单编号
|
|
136
|
|
- $("#cl_gdlx").text(getTypeName(Str[0].Type));//工单类型
|
|
137
|
|
- $("#cl_khxm").text(Str[0].Customer);//姓名
|
|
138
|
|
- $("#cl_khdh").text(Str[0].CustomerTel);//电话
|
|
139
|
|
- $("#t_county").text(Str[0].County); //乡镇
|
|
140
|
|
- $("#t_address").text(Str[0].Address);//地址
|
|
141
|
|
- $("#t_inqtime").text(Str[0].Inqtime);//调查时间
|
|
142
|
|
- $("#t_inquser").text(Str[0].Inquser);//调查员
|
|
143
|
|
- $("#t_detail").text(Str[0].Detail);//string 是 反映问题
|
|
144
|
|
- $("#t_answer").text(Str[0].Answer);//string 否 回访反馈情况
|
|
145
|
|
- $("#t_remarks").text(Str[0].Remark);//string 否 备注
|
|
146
|
|
- $("#xl_box").val(Str[0].UnitID);//交办单位
|
|
147
|
|
-
|
|
148
|
|
- $('.Message_box').find('input[value="'+ Str[0].InfoTypeID +'"]').attr('checked',true);//信息分类
|
|
149
|
|
-
|
|
150
|
|
-
|
|
151
|
|
-
|
|
152
|
|
- //$("#cl_gdnr").text(Str[0].Detail);//工单内容
|
|
153
|
|
-
|
|
|
146
|
+ $('#cl_gdbh').text(Str[0].WorkOrderID); //工单编号
|
|
|
147
|
+ $("#cl_gdlx").text(getTypeName(Str[0].Type)); //工单类型
|
|
|
148
|
+ $("#cl_khxm").val(Str[0].Customer); //姓名
|
|
|
149
|
+ $("#cl_khdh").text(Str[0].CustomerTel); //电话
|
|
|
150
|
+ $("#t_county").val(Str[0].County); //乡镇
|
|
|
151
|
+ $("#t_address").val(Str[0].Address); //地址
|
|
|
152
|
+ $("#t_inqtime").val(Str[0].Inqtime && Str[0].Inqtime.split(' ')[0]); //调查时间
|
|
|
153
|
+ $("#t_inquser").val(Str[0].Inquser); //调查员
|
|
|
154
|
+ $("#t_detail").val(Str[0].Detail); //string 是 反映问题
|
|
|
155
|
+ $("#t_answer").val(Str[0].Answer); //string 否 回访反馈情况
|
|
|
156
|
+ $("#t_remarks").val(Str[0].Remark); //string 否 备注
|
|
|
157
|
+
|
|
|
158
|
+ $("#xl_box").val(Str[0].UnitID); //交办单位
|
|
|
159
|
+
|
|
|
160
|
+ $('.Message_box').find('input[value="' + Str[0].InfoTypeID + '"]').attr('checked', true); //信息分类
|
|
|
161
|
+
|
|
154
|
162
|
var Files = Str[0].Files;
|
|
155
|
163
|
if(Files) {
|
|
156
|
164
|
var a;
|
|
|
@@ -255,33 +263,34 @@ function getRY(obj, deptid) {
|
|
255
|
263
|
}
|
|
256
|
264
|
|
|
257
|
265
|
//处理
|
|
258
|
|
-function dealWorkOrder(oid){
|
|
|
266
|
+function dealWorkOrder(oid) {
|
|
259
|
267
|
$.post(huayi.config.callcenter_url + 'WorkOrder/DealWorkOrder', {
|
|
260
|
|
- orderid: oid, //string 是 工单编号
|
|
261
|
|
- customer: $('#cl_khxm').text(), //string 是 客户姓名
|
|
262
|
|
- country: $('#t_county').text(), //string 否 乡镇
|
|
263
|
|
- address: $('#t_address').text(), //string 否 住址
|
|
264
|
|
- inqtime: $('#t_inqtime').text(), //string 否 调查时间
|
|
265
|
|
- inquser: $('#t_inquser').text(), //string 否 调查员
|
|
266
|
|
- detail: $('#t_detail').text(), //string 是 反映问题
|
|
267
|
|
- answer: $('#t_answer').text(), //string 否 回访反馈情况
|
|
268
|
|
- remark: $('#t_remarks').text(), //string 否 备注
|
|
|
268
|
+ orderid: oid, //string 是 工单编号
|
|
|
269
|
+ customer: $('#cl_khxm').val(), //string 是 客户姓名
|
|
|
270
|
+ //country: $('#t_county').val(), //string 否 乡镇
|
|
|
271
|
+ country: $("#t_county").find("option:selected").text(),
|
|
|
272
|
+ address: $('#t_address').val(), //string 否 住址
|
|
|
273
|
+ inqtime: $('#t_inqtime').val(), //string 否 调查时间
|
|
|
274
|
+ inquser: $('#t_inquser').val(), //string 否 调查员
|
|
|
275
|
+ detail: $('#t_detail').val(), //string 是 反映问题
|
|
|
276
|
+ answer: $('#t_answer').val(), //string 否 回访反馈情况
|
|
|
277
|
+ remark: $('#t_remarks').val(), //string 否 备注
|
|
269
|
278
|
|
|
270
|
|
- isend: $("input[name='ltype']:checked").val(), //int 是 是否结束 0否,1是
|
|
271
|
|
- clbm: $("#clbm").val(), //int 否 处理部门
|
|
272
|
|
- clid: $("#clid").val(), //int 否 处理人
|
|
273
|
|
- cont: $("#cont").val(), //string 否 问题处理情况
|
|
274
|
|
- infotypeid: $("input[name='ltypes']:checked").val(), //int 否 信息分类id,默认为0
|
|
275
|
|
- unitid: $("#xl_box").val(), //int 否 交办单位id,默认为0
|
|
276
|
|
- token: $.cookie("token")
|
|
277
|
|
- }, function(result) {
|
|
278
|
|
- result = $.parseJSON(result);
|
|
279
|
|
- if(result.state.toLowerCase() == "success") {
|
|
280
|
|
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
281
|
|
- parent.layer.close(index); //再执行关闭
|
|
282
|
|
- parent.initTable();
|
|
283
|
|
- parent.Hiden();
|
|
284
|
|
- parent.layer.msg("处理工单成功");
|
|
285
|
|
- }
|
|
286
|
|
- })
|
|
287
|
|
-}
|
|
|
279
|
+ isend: $("input[name='ltype']:checked").val(), //int 是 是否结束 0否,1是
|
|
|
280
|
+ clbm: $("#clbm").val(), //int 否 处理部门
|
|
|
281
|
+ clid: $("#clid").val(), //int 否 处理人
|
|
|
282
|
+ cont: $("#cont").val(), //string 否 问题处理情况
|
|
|
283
|
+ infotypeid: $("input[name='ltypes']:checked").val(), //int 否 信息分类id,默认为0
|
|
|
284
|
+ unitid: $("#xl_box").val(), //int 否 交办单位id,默认为0
|
|
|
285
|
+ token: $.cookie("token")
|
|
|
286
|
+ }, function(result) {
|
|
|
287
|
+ result = $.parseJSON(result);
|
|
|
288
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
289
|
+ var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
290
|
+ parent.layer.close(index); //再执行关闭
|
|
|
291
|
+ parent.initTable();
|
|
|
292
|
+ parent.Hiden();
|
|
|
293
|
+ parent.layer.msg("处理工单成功");
|
|
|
294
|
+ }
|
|
|
295
|
+ })
|
|
|
296
|
+}
|