miaofuhao лет назад: 5
Родитель
Сommit
fcf29e1289

+ 1 - 3
CallCenterWeb.UI/Arrangefollow/arrange.html

@@ -80,14 +80,12 @@
80 80
 							<th data-field="Department" data-align="center">科室</th>
81 81
 							<th data-field="PTime" data-align="center" data-formatter="oprateTime">时间</th>
82 82
 							<th data-field="PatirntName" data-align="center">患者姓名</th>
83
-							<th data-field="Phone" data-align="center" data-formatter="opratePhone">电话</th>
83
+							<th data-field="Phone" data-align="center">电话</th>
84 84
 							<th data-field="Sex" data-align="center" data-formatter="oprateSex">性别</th>
85 85
 							<th data-field="Age" data-align="center">年龄</th>
86 86
 							<th data-field="Diagnosis" data-align="center">诊断</th>
87 87
 							<th data-field="Doctor" data-align="center">医生</th>
88 88
 							<th data-field="FollowUp" data-align="center" data-formatter="oprateFollowUp">随访状态</th>
89
-							<th data-field="Note" data-align="center">备注</th>
90
-							<th data-field="Satisfaction" data-align="center" data-formatter="oprateSatisfaction">满意度</th>
91 89
 							<th  data-field="WorkOrderID" data-align="center" data-formatter="formatterOprateDeal">操作</th>
92 90
 						</tr>
93 91
 					</thead>

+ 2 - 3
CallCenterWeb.UI/Arrangefollow/arrangeCall.html

@@ -69,7 +69,6 @@
69 69
 				</div>
70 70
 
71 71
 				<div class="pull-right tool_bars">
72
-					<button id="HY_import" class="btns">导入</button>
73 72
 					<a class="btns" onclick="dcexcel(this)">导出</a>
74 73
 					<button class="btns" id="sc_btns">搜索</button>
75 74
 					<!-- <a class="btns" onclick="dcexcel(this)">导出</a> -->
@@ -93,7 +92,7 @@
93 92
 							<th data-field="Diagnosis" data-align="center">诊断</th>
94 93
 							<th data-field="Doctor" data-align="center">医生</th>
95 94
 							<th data-field="FollowUp" data-align="center" data-formatter="oprateFollowUp">随访状态</th>
96
-							<th data-field="FilePath" data-formatter="oprateFile" data-align="center">录音</th>
95
+							<th data-field="Lvyin" data-formatter="oprateFile" data-align="center">录音</th>
97 96
 							<th data-field="Note" data-align="center">备注</th>
98 97
 							<th data-field="Satisfaction" data-align="center" data-formatter="oprateSatisfaction">满意度</th>
99 98
 							<th  data-field="WorkOrderID" data-align="center" data-formatter="formatterOprateDeal">操作</th>
@@ -120,7 +119,7 @@
120 119
 	            </div>
121 120
 	        </div>
122 121
 	    </div>
123
-	    
122
+	    <input type="hidden" id="ptirntID" />
124 123
 		<script src="../js/zTree/jquery.ztree.core.js"></script>
125 124
 		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
126 125
 		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>

+ 15 - 12
CallCenterWeb.UI/Arrangefollow/js/addOrEditArrange.js

@@ -54,21 +54,24 @@ function getDetail() {
54 54
 			token: token
55 55
 		},
56 56
 		success: function(data) {
57
-			var con = data.data;
58
-			$("#editId").val(con.F_CustomerId);
59
-			$("#seatList").selectpicker('val',con.Department) //科室
60
-			$("#sc_time").val(con.PTime.substring(0, con.PTime.indexOf(" "))); //时间
61
-			$("#PatirntName").val(con.PatirntName); //患者姓名
62
-			$("#Phone").val(con.Phone);//电话
63
-			$('#sexList').selectpicker('val', con.Sex);//性别
64
-			$("#stateList").selectpicker('val',con.FollowUp) //随访状态
65
-			$("#Age").val(con.Age); //年龄
66
-			$("#Diagnosis").val(con.Diagnosis); //诊断
67
-			$("#Doctor").val(con.Doctor); //医生
57
+			if (data.state=="success") {
58
+				var con = data.data;
59
+				$("#editId").val(con.F_CustomerId);
60
+				$("#seatList").selectpicker('val',con.Department) //科室
61
+				$("#sc_time").val(con.PTime.substring(0, con.PTime.indexOf(" "))); //时间
62
+				$("#PatirntName").val(con.PatirntName); //患者姓名
63
+				$("#Phone").val(con.Phone);//电话
64
+				$('#sexList').selectpicker('val', con.Sex);//性别
65
+				$("#stateList").selectpicker('val',con.FollowUp); //随访状态
66
+				$("#Age").val(con.Age); //年龄
67
+				$("#Diagnosis").val(con.Diagnosis); //诊断
68
+				$("#Doctor").val(con.Doctor); //医生
69
+			}
70
+			
68 71
 //			if(data.F_TaxID) {
69 72
 //					$('#customer_merrige').find("input[type='radio'][value= " + data.F_TaxID + "]").prop("checked", true); //性别
70 73
 //			}
71
-			dtd.resolve(); // 改变Deferred对象的执行状态
74
+			
72 75
 		}
73 76
 	});
74 77
 	return dtd.promise(); // 返回promise对象

+ 4 - 78
CallCenterWeb.UI/Arrangefollow/js/arrange.js

@@ -147,42 +147,13 @@ function btn_detail(seeid) {
147 147
 
148 148
 //格式化操作 (待指派)
149 149
 function formatterOprateDeal(val, row) {
150
-	if (row.FollowUp==1) {
151
-		return '<ul class="tool_downs">' +
152
-		'<li><a href="javascript:;" class="aBtn" onclick="btn_edit(\'' + row.PatirntID + '\')" title="修改">修改</a></li>' +
153
-		'<li><a href="javascript:;" class="aBtn" onclick="btn_delete(\'' + row.PatirntID + '\')" title="删除">删除</a></li>' +
154
-		'</ul>';
155
-	} else if (row.FollowUp==2) {
156
-		return '<ul class="tool_downs">' +
157
-		'<li><a href="javascript:;" class="aBtn" onclick="btn_satisfaction(\'' + row.PatirntID + '\')" title="满意度">满意度</a></li>' +
158
-		'<li><a href="javascript:;" class="aBtn" onclick="btn_remark(\'' + row.PatirntID + '\')" title="备注">备注</a></li>' +
159
-		'</ul>';
160
-	}
150
+	return '<ul class="tool_downs">' +
151
+	'<li><a href="javascript:;" class="aBtn" onclick="btn_edit(\'' + row.PatirntID + '\')" title="修改">修改</a></li>' +
152
+	'<li><a href="javascript:;" class="aBtn" onclick="btn_delete(\'' + row.PatirntID + '\')" title="删除">删除</a></li>' +
153
+	'</ul>';
161 154
 	
162 155
 }
163 156
 
164
-//电话格式处理
165
-function opratePhone (val, row) {
166
-	if (row.Satisfaction==0&&row.FollowUp==2) {
167
-        
168
-        return '<ul class="tool_downs">' +
169
-		'<li><a href="javascript:;" class="phoneBtn" onclick="phoneCall(\'' + val + '\')" title="满意度">'+val+'</a></li>' +
170
-		'</ul>';
171
-            
172
-    }else{
173
-    	return val
174
-    }
175
-}
176
-function phoneCall () {
177
-	layer.confirm('您确定要外呼吗?', {
178
-		icon: 7,
179
-		btn: ['确定', '取消'],
180
-		yes: function(index, layero) {
181
-			layer.msg("呼叫成功");
182
-			table.bootstrapTable('refresh');
183
-		},
184
-	});
185
-}
186 157
 function btn_edit(changes){
187 158
 	console.log(changes)
188 159
 	layer.open({
@@ -231,52 +202,7 @@ function oprateFollowUp(val){
231 202
 	}
232 203
 	
233 204
 }
234
-// 满意度
235
-function oprateSatisfaction(val, row){
236
-	if (row.FollowUp!=1) {
237
-		if (val==0) {
238
-			return "不满意"
239
-		} else if (val==1) {
240
-			return "满意"
241
-		} else if (val==2) {
242
-			return "表扬"
243
-		}
244
-	}
245
-	
246
-}
247 205
 
248
-//满意度
249
-function btn_satisfaction(changes){
250
-	console.log(changes)
251
-	layer.open({
252
-		type: 2,
253
-		title: '编辑满意度',
254
-		shadeClose: true, //是否开启点击遮罩关闭
255
-		shade: 0.4, //遮罩
256
-		maxmin: true, //开启最大化最小化按钮
257
-		moveType: 1, //拖拽类型 默认的拖拽风格正如你所见到的,会有个过度的透明框。但是如果你不喜欢,你可以设定moveType: 1切换到传统的拖拽模式
258
-		moveOut: false, //拖拽到窗口外
259
-		//resize: true,//是否允许拉伸
260
-		area: ['40%', '30%'],
261
-		content: "template/addOrEditSatisfaction.html?edit_id=" + changes
262
-	});
263
-}
264
-
265
-//备注
266
-function btn_remark (changes) {
267
-	layer.open({
268
-		type: 2,
269
-		title: '编辑备注',
270
-		shadeClose: true, //是否开启点击遮罩关闭
271
-		shade: 0.4, //遮罩
272
-		maxmin: true, //开启最大化最小化按钮
273
-		moveType: 1, //拖拽类型 默认的拖拽风格正如你所见到的,会有个过度的透明框。但是如果你不喜欢,你可以设定moveType: 1切换到传统的拖拽模式
274
-		moveOut: false, //拖拽到窗口外
275
-		//resize: true,//是否允许拉伸
276
-		area: ['40%', '30%'],
277
-		content: "template/addOrEditRemark.html?edit_id=" + changes
278
-	});
279
-}
280 206
 //绑定导入 按钮
281 207
 $('#HY_import').on('click', btn_import);
282 208
 

+ 57 - 18
CallCenterWeb.UI/Arrangefollow/js/arrangeCall.js

@@ -1,11 +1,7 @@
1 1
 var proimglist = []; //保存附件数组
2
-var uploader; //上传实例
3
-var limitNum = 6; //限制数量
4 2
 var token = $.cookie("token");
3
+var ptirntID;
5 4
 var kn_id = ""; //当前节点id
6
-var pid; //当前父节点ID
7
-var name = ''; //选择的name
8
-var pidName; //父节点name
9 5
 var keyWord = $('#searCon').val(); //关键字
10 6
 var table = $('#table1'); //右边表格
11 7
 var followUp = 2;
@@ -101,6 +97,7 @@ function setCode(val, row, index) {
101 97
 //格式化操作 (待指派)
102 98
 function formatterOprateDeal(val, row) {
103 99
 	return '<ul class="tool_downs">' +
100
+				
104 101
 		'<li><a href="javascript:;" class="aBtn" onclick="btn_satisfaction(\'' + row.PatirntID + '\')" title="满意度">满意度</a></li>' +
105 102
 		'<li><a href="javascript:;" class="aBtn" onclick="btn_remark(\'' + row.PatirntID + '\')" title="备注">备注</a></li>' +
106 103
 		'</ul>';
@@ -157,28 +154,77 @@ function oprateTime(val) {
157 154
 }
158 155
 //电话格式处理
159 156
 function opratePhone (val, row) {
160
-	console.log(row.Satisfaction)
157
+	//btn_transfer(\'' + val + '\', false, \''+ row.IsAdminSend +'\')
158
+	return '<ul class="tool_downs">' +
159
+	'<li><a href="javascript:;" class="phoneBtn" onclick="phoneCall(\''+val+'\',\''+row.PatirntID+'\')" title="满意度">'+val+'</a></li>' +
160
+	'</ul>';
161 161
 	if (row.Satisfaction==0) {
162 162
         
163
-        return '<ul class="tool_downs">' +
164
-		'<li><a href="javascript:;" class="phoneBtn" onclick="phoneCall(\'' + val + '\')" title="满意度">'+val+'</a></li>' +
165
-		'</ul>';
166 163
             
167 164
     }else{
168 165
     	return val
169 166
     }
170 167
 }
171 168
 //点击外呼
172
-function phoneCall () {
169
+function phoneCall (val,ptirntID) {
170
+	$("#ptirntID").val(ptirntID)
173 171
 	layer.confirm('您确定要外呼吗?', {
174 172
 		icon: 7,
175 173
 		btn: ['确定', '取消'],
176 174
 		yes: function(index, layero) {
177 175
 			layer.msg("呼叫成功");
176
+			console.log(val)
177
+			top.obj.Type = "MakeCall";
178
+			top.obj.DestinationNumber = val;
179
+			//top.obj.Header = result.data.fix;
180
+			top.obj.TaskType = "1"; //0:拨号外呼;1:问卷外呼;
181
+			//top.obj.TaskPhoneID = $("#F_Id").val(); //回访的电话ID
182
+			top.Send();
183
+//			$.ajax({
184
+//              type: "get",
185
+//              url:huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
186
+//              async: true,
187
+//              dataType: "json",
188
+//              data: {
189
+//                  token: $.cookie("token"),
190
+//                  phone: val,
191
+//              },
192
+//              success: function (result) {
193
+//                  //                		result = $.parseJSON(result);
194
+//                  if (result.state.toLowerCase() == "success") {
195
+//                  	top.obj.Type = "MakeCall";
196
+//						top.obj.DestinationNumber = result.data.phone;
197
+//						top.obj.Header = result.data.fix;
198
+//						top.obj.TaskType = "1"; //0:拨号外呼;1:问卷外呼;
199
+//						top.obj.TaskPhoneID = $("#F_Id").val(); //回访的电话ID
200
+//						top.Send();
201
+//                      
202
+//                  }
203
+//              },
204
+//          });
205
+            
178 206
 			table.bootstrapTable('refresh');
179 207
 		},
180 208
 	});
181 209
 }
210
+
211
+function getCallId (callId,actionID) {
212
+	
213
+	console.log($("#ptirntID").val())
214
+
215
+	$.post(huayi.config.callcenter_url + "Customer/CallId", {
216
+		id:$("#ptirntID").val(),
217
+		callid:callId,
218
+		actionid:1,
219
+		token: token
220
+	}, function(result) {
221
+		result = JSON.parse(result);
222
+		if(result.state.toLowerCase() == "success") {
223
+			layer.msg("成功");
224
+			table.bootstrapTable('refresh');
225
+		}
226
+	})
227
+}
182 228
 //录音
183 229
 function oprateFile(val) {
184 230
     if (val) {
@@ -218,14 +264,7 @@ function ck(val) {
218 264
         '">下载录音</a>'
219 265
     ).appendTo(".LY_box");
220 266
 }
221
-//录音
222
-//function ck(val) {
223
-//  var path = $(val).attr("item");
224
-//  $(".t-shade").addClass("cx");
225
-//  $(".Ly_box").empty();
226
-//  $(".LY_box").empty();
227
-//  $('<audio  style="width:100%;"class=" " src="' + path + '" loop="loop" type="audio/v3" controls="controls"></audio>').appendTo(".Ly_box");
228
-//}
267
+
229 268
 //性别
230 269
 function oprateSex(val){
231 270
 	if (val=="1") {

+ 10 - 0
CallCenterWeb.UI/js/main.js

@@ -240,6 +240,16 @@ function IncomingBack(data) {
240 240
 
241 241
 //***************************************************
242 242
 function CallIDBack(data) {
243
+	
244
+	$('#content-main .J_iframe').each(function(i,n){
245
+		
246
+		console.log($(this).attr('src'))
247
+		if($(this).attr('src') == "./Arrangefollow/arrangeCall.html"){
248
+			window.frames[0].getCallId(data.CurrID, data.ActionID);
249
+			
250
+			
251
+		}
252
+	})/*2018-05-24 zhangshuangnan 修改 解决通话中时 坐席监控状态不改变的问题*/
243 253
 	//$(".hidCallID").val(data.CurrID);
244 254
 }
245 255