|
|
@@ -95,31 +95,6 @@ function orderSave() {
|
|
95
|
95
|
});
|
|
96
|
96
|
return;
|
|
97
|
97
|
}
|
|
98
|
|
- // if(!$.trim($('#order_company').val())) {
|
|
99
|
|
- // layer.confirm('请输入公司名称!', {
|
|
100
|
|
- // icon: 2,
|
|
101
|
|
- // btn: ['确定']
|
|
102
|
|
- // });
|
|
103
|
|
- // return;
|
|
104
|
|
- // }
|
|
105
|
|
- // if($('#order_iseffective').find('input[type="radio"]:checked').val() === '1') {
|
|
106
|
|
- // if(!$.trim($('#order_note').val())) {
|
|
107
|
|
- // layer.confirm('请输入无效原因!', {
|
|
108
|
|
- // icon: 2,
|
|
109
|
|
- // btn: ['确定']
|
|
110
|
|
- // });
|
|
111
|
|
- // return;
|
|
112
|
|
- // }
|
|
113
|
|
- // }
|
|
114
|
|
-
|
|
115
|
|
- // if($.trim($('#order_transfer_dept').val()) && $('#order_receiveUser').val() === "0"){
|
|
116
|
|
- // layer.confirm('请选择接收人!', {
|
|
117
|
|
- // icon: 2,
|
|
118
|
|
- // btn: ['确定']
|
|
119
|
|
- // });
|
|
120
|
|
- // return;
|
|
121
|
|
- // }
|
|
122
|
|
-
|
|
123
|
98
|
var order_handle = $('#order_handles').is(':visible') ? $('#order_handle').val() : 0,
|
|
124
|
99
|
order_transfer_dept = $('#order_transfer_dept').attr('data-id'),//int 接收部门
|
|
125
|
100
|
order_receiveUser = $('#order_receiveUser').val();//int 接收人
|
|
|
@@ -127,34 +102,58 @@ function orderSave() {
|
|
127
|
102
|
order_transfer_dept = 0;
|
|
128
|
103
|
order_receiveUser = 0;
|
|
129
|
104
|
}
|
|
130
|
|
-
|
|
131
|
|
- $.post(huayi.config.callcenter_url + 'CallInScreen/AddWorkOrder', {
|
|
132
|
|
- source: $('#order_source').val(),//int 工单来源-下拉,数据来源:数据字典GDLY;
|
|
133
|
|
- gdlx: $('#order_type').find('input[type="radio"]:checked').val(),//int 工单类型-单选,数据来源:数据字典GDLX;
|
|
134
|
|
- ywlx: order_handle,//int 业务办理-下拉,工单类型选择“业务办理”时数据来源:数据字典GDLX,工单类型选择“投诉”时数据是投诉,传值ID与工单类型一致
|
|
135
|
|
- // customerid: ,//int 客户id; -此参数可根据来电弹屏时的客户绑定
|
|
136
|
|
- callid: callId,//string; -此参数可根据来电弹屏时的客户绑定
|
|
137
|
|
- callCustomer: $('#order_name').val(),//string 客户姓名; -此参数可根据来电弹屏时的客户绑定
|
|
138
|
|
- tel: $('#order_tel').val(),//string 联系电话 ; -此参数可根据来电弹屏时的客户绑定
|
|
139
|
|
- company: $('#order_company').val(),// 公司名称
|
|
140
|
|
- limitdate:$('#sc_time').val(),//截止日期
|
|
141
|
|
- fkcont: $('#order_reception').val(),//string 反馈内容;
|
|
142
|
|
- iseffective: $('#order_iseffective').find('input[type="radio"]:checked').val(),//int 是否有效工单项(0有效,1无效);
|
|
143
|
|
- note: $('#order_note').val(),//string 无效工单必填备注;
|
|
144
|
|
- clbm: order_transfer_dept,//int 接收部门;
|
|
145
|
|
- clid: order_receiveUser,//int 接收人;
|
|
146
|
|
- eflag: $('#order_specialcase').find('input[type="radio"]:checked').val(), //特殊案件
|
|
147
|
|
- files:str,//附件id
|
|
148
|
|
- isover: $('#order_isover').find('input[type="radio"]:checked').val(), //int 是否立即处理(默认为0,立即处理为1,立即处理的工单无法指派接收人和接受部门)
|
|
149
|
|
- token: $.cookie("token")
|
|
150
|
|
- }, function(result) {
|
|
151
|
|
- result = $.parseJSON(result);
|
|
152
|
|
- if(result.state.toLowerCase() == "success") {
|
|
153
|
|
- cleanOrderForm();
|
|
154
|
|
- top.workcount();
|
|
155
|
|
- layer.msg("保存成功");
|
|
|
105
|
+ $.ajax({
|
|
|
106
|
+ type: "post",
|
|
|
107
|
+ url: huayi.config.callcenter_url + "CallInScreen/AddWorkOrder",
|
|
|
108
|
+ dataType: 'json',
|
|
|
109
|
+ async: true,
|
|
|
110
|
+ beforeSend: function() { //触发ajax请求开始时执行
|
|
|
111
|
+ $('#save_order').attr("disabled", true);
|
|
|
112
|
+ $('#save_order').text('创建中...');
|
|
|
113
|
+ $(document).off('click', '#save_order', orderSave);
|
|
|
114
|
+ loadIndex = layer.load();
|
|
|
115
|
+ $("#password").val('');
|
|
|
116
|
+ $("#password").attr('type', 'text');
|
|
|
117
|
+ debugger
|
|
|
118
|
+ },
|
|
|
119
|
+ data: {
|
|
|
120
|
+ source: $('#order_source').val(),//int 工单来源-下拉,数据来源:数据字典GDLY;
|
|
|
121
|
+ gdlx: $('#order_type').find('input[type="radio"]:checked').val(),//int 工单类型-单选,数据来源:数据字典GDLX;
|
|
|
122
|
+ ywlx: order_handle,//int 业务办理-下拉,工单类型选择“业务办理”时数据来源:数据字典GDLX,工单类型选择“投诉”时数据是投诉,传值ID与工单类型一致
|
|
|
123
|
+ // customerid: ,//int 客户id; -此参数可根据来电弹屏时的客户绑定
|
|
|
124
|
+ callid: callId,//string; -此参数可根据来电弹屏时的客户绑定
|
|
|
125
|
+ callCustomer: $('#order_name').val(),//string 客户姓名; -此参数可根据来电弹屏时的客户绑定
|
|
|
126
|
+ tel: $('#order_tel').val(),//string 联系电话 ; -此参数可根据来电弹屏时的客户绑定
|
|
|
127
|
+ company: $('#order_company').val(),// 公司名称
|
|
|
128
|
+ limitdate:$('#sc_time').val(),//截止日期
|
|
|
129
|
+ fkcont: $('#order_reception').val(),//string 反馈内容;
|
|
|
130
|
+ iseffective: $('#order_iseffective').find('input[type="radio"]:checked').val(),//int 是否有效工单项(0有效,1无效);
|
|
|
131
|
+ note: $('#order_note').val(),//string 无效工单必填备注;
|
|
|
132
|
+ clbm: order_transfer_dept,//int 接收部门;
|
|
|
133
|
+ clid: order_receiveUser,//int 接收人;
|
|
|
134
|
+ eflag: $('#order_specialcase').find('input[type="radio"]:checked').val(), //特殊案件
|
|
|
135
|
+ files:str,//附件id
|
|
|
136
|
+ isover: $('#order_isover').find('input[type="radio"]:checked').val(), //int 是否立即处理(默认为0,立即处理为1,立即处理的工单无法指派接收人和接受部门)
|
|
|
137
|
+ token: $.cookie("token")
|
|
|
138
|
+ },
|
|
|
139
|
+ success: function(data) {
|
|
|
140
|
+ /*验证请求*/
|
|
|
141
|
+ if(data.state == "success") {
|
|
|
142
|
+ $('#save_order').attr("disabled", false);
|
|
|
143
|
+ $('#save_order').text('创建');
|
|
|
144
|
+ $(document).on('click', '#save_order', orderSave);
|
|
|
145
|
+ layer.close(loadIndex);
|
|
|
146
|
+ debugger
|
|
|
147
|
+ cleanOrderForm();
|
|
|
148
|
+ top.workcount();
|
|
|
149
|
+ layer.msg("保存成功");
|
|
|
150
|
+ }
|
|
156
|
151
|
}
|
|
157
|
|
- })
|
|
|
152
|
+
|
|
|
153
|
+
|
|
|
154
|
+ });
|
|
|
155
|
+
|
|
|
156
|
+
|
|
158
|
157
|
}
|
|
159
|
158
|
|
|
160
|
159
|
initTable();
|