市长热线演示版

callplanmanage.aspx 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="callplanmanage.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.calloutmanage.callplanmanage" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head id="Head1" runat="server">
  5. <title>外呼计划</title>
  6. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="../scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
  9. <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
  10. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  11. <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
  12. <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  13. <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
  14. <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
  15. <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
  16. <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
  17. <script src="../scripts/CustomersData.js" type="text/javascript"></script>
  18. <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  19. <script src="../scripts/My97DatePicker/lang/zh-cn.js" type="text/javascript"></script>
  20. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  21. <script type="text/javascript">
  22. var selectplan = "";
  23. var planlist;
  24. var tellist;
  25. var pagername = "";
  26. var planname = "";
  27. function LoadPlanList() {
  28. var key = escape(document.getElementById("txtKeywords").value);
  29. planlist = $("#divPlanList").ligerGrid({
  30. height: '97%',
  31. width: 399,
  32. columns: [
  33. { display: '状态', frozen: true, width: '70', name: '_state', render: function (rowdata, rowindex, value) {
  34. if (value == "1")
  35. return "<img src='../images/icon_correct.png' style='width:16px' />&nbsp;&nbsp;<font color='green'>已启动</font>";
  36. else
  37. return "<img src='../images/icon_disable.png' style='width:16px' />&nbsp;&nbsp;<font color='red'>未启动</font>";
  38. }
  39. },
  40. { display: '计划名称', frozen: true, align: 'left', width: '130', name: '_taskname' },
  41. { display: '号码数量', align: 'center', width: '60', name: '_y_hmcount' },
  42. { display: '已呼数', align: 'center', width: '60', name: '_y_hccount' },
  43. { display: '未呼数', align: 'center', width: '60', name: '_y_hccount' },
  44. { display: '呼叫率', align: 'center', width: '60', name: '_y_hccount' },
  45. { display: '接通数', align: 'center', width: '60', name: '_y_yjcount' },
  46. { display: '未接通数', align: 'center', width: '60', name: '_y_yjcount' },
  47. { display: '接通率', align: 'center', width: '60', name: '_y_yjcount' }
  48. ],
  49. toolbar: {
  50. items: [
  51. { text: '增加', click: itemclick1, icon: 'add' },
  52. { line: true },
  53. { text: '修改', click: itemclick1, icon: 'modify' },
  54. { line: true },
  55. { text: '删除', click: itemclick1, icon: 'delete' },
  56. { line: true },
  57. { text: '启动', click: itemclick1, icon: 'ok' },
  58. { line: true },
  59. { text: '停止', click: itemclick1, icon: 'lock' }
  60. ]
  61. },
  62. url: 'ajax/callplan.ashx?action=getlist&key=' + key, pageSize: 50, pageSizeOptions: [10, 20, 50], rownumbers: true,
  63. onSelectRow: function (data, rowindex, rowobj) {
  64. selectplan = data._taskid;
  65. pagername = data._f_title;
  66. planname = data._taskname;
  67. LoadTelList();
  68. },
  69. onDblClickRow: function (data, rowindex, rowobj) {
  70. var id = "";
  71. var name = "";
  72. var vtitle = "修改计划";
  73. try {
  74. id = data._taskid;
  75. vtitle = "【<font color='red'>" + data._taskname + "</font>】修改计划";
  76. }
  77. catch (e) {
  78. }
  79. if (id != "") {
  80. $.ligerDialog.open({ url: 'callplanedit.aspx?otype=modify&id=' + id, title: vtitle, height: 380, width: 600, isResize: true
  81. });
  82. }
  83. else {
  84. $.ligerDialog.error('没有选择要修改的计划,请选择');
  85. }
  86. },
  87. onSuccess: function (data, obj) {
  88. try {
  89. planname = "";
  90. pagername = "";
  91. selectplan = "0";
  92. LoadTelList();
  93. }
  94. catch (e) {
  95. }
  96. }
  97. });
  98. $("#pageloading").hide();
  99. }
  100. function LoadTelList() {
  101. var key = escape(document.getElementById("txtKeywords").value);
  102. var fpstate = document.getElementById("dropFP").value;
  103. var hcstate = document.getElementById("dropHC").value;
  104. tellist = $("#divTelList").ligerGrid({
  105. height: '97%',
  106. checkbox: true,
  107. columns: [
  108. { display: '号码', frozen: true, width: '130', name: '_f_phone', render: function (rowdata, rowindex, value) {
  109. return "<img src='../images/phone3.png' style='width:16px' />&nbsp;&nbsp;<font color='green'>" + value + "</font>";
  110. }
  111. },
  112. { display: '名称', frozen: true, align: 'left', width: '130', name: '_f_customer' },
  113. { display: '导入时间', align: 'center', width: '130', name: '_f_createtime', type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  114. { display: '分配坐席', align: 'center', width: '70', name: '_f_username' },
  115. { display: '呼叫状态', align: 'center', width: '70', name: '_f_hcstate', render: function (rowdata, rowindex, value) {
  116. if (value == 0) {
  117. return "未呼叫";
  118. }
  119. else {
  120. return "已呼叫";
  121. }
  122. }
  123. },
  124. { display: '接通状态', align: 'center', width: '70', name: '_f_yjstate', render: function (rowdata, rowindex, value) {
  125. if (value == 0) {
  126. return "未接通";
  127. }
  128. else {
  129. return "已接通";
  130. }
  131. }
  132. }
  133. ],
  134. toolbar: {
  135. items: [
  136. { text: '计划页面设置', click: itemclick1, icon: 'settings' },
  137. { line: true },
  138. { text: '导入号码', click: itemclick1, icon: 'inputdata1' },
  139. { line: true },
  140. { text: '清空号码', click: itemclick1, icon: 'candle' },
  141. { line: true },
  142. { text: '<span id="spanPagerInfo" style="color:red">相关问卷:无</span>', click: itemclick1, icon: 'help' }
  143. ]
  144. },
  145. url: 'ajax/callplantelnum.ashx?action=getlist&taskid=' + selectplan + '&key=' + key + '&fpstate=' + fpstate + '&hcstate=' + hcstate, pageSize: 50, pageSizeOptions: [10, 20, 50, 100], rownumbers: true,
  146. onSelectRow: function (data, rowindex, rowobj) {
  147. },
  148. onSuccess: function (data, obj) {
  149. try {
  150. if (pagername != "") {
  151. document.getElementById("spanPagerInfo").innerHTML = "相关问卷: " + pagername;
  152. }
  153. else {
  154. document.getElementById("spanPagerInfo").innerHTML = "相关问卷: 无";
  155. }
  156. if (planname != "") {
  157. document.getElementById("spanPlanInfo").innerHTML = "计划【" + planname + "】的";
  158. }
  159. else {
  160. document.getElementById("spanPlanInfo").innerHTML = "";
  161. }
  162. }
  163. catch (e) {
  164. }
  165. }
  166. });
  167. $("#pageloading").hide();
  168. }
  169. function itemclick1(item) {
  170. switch (item.icon) {
  171. case "add":
  172. $.ligerDialog.open({ url: 'callplanedit.aspx?otype=new', title: '添加计划', height: 390, width: 500, isResize: true
  173. });
  174. break;
  175. case "modify":
  176. var id = "";
  177. var name = "";
  178. var vtitle = "修改计划";
  179. try {
  180. var rowobj = planlist.getSelectedRow();
  181. id = rowobj._taskid;
  182. vtitle = "【<font color='red'>" + rowobj._taskname + "</font>】修改计划";
  183. }
  184. catch (e) {
  185. alert(e.toString());
  186. }
  187. if (id != "") {
  188. $.ligerDialog.open({ url: 'callplanedit.aspx?otype=modify&id=' + id, title: vtitle, height: 380, width: 600, isResize: true
  189. });
  190. }
  191. else {
  192. $.ligerDialog.error('没有选择要修改的计划,请选择');
  193. }
  194. break;
  195. case "delete":
  196. var id = "";
  197. var rowobj;
  198. try {
  199. rowobj = planlist.getSelectedRow();
  200. id = rowobj._taskid;
  201. }
  202. catch (e) {
  203. }
  204. if (id != "") {
  205. $.ligerDialog.confirm('确定要删除【<font color="red">' + rowobj._taskname + '</font>】吗?', function (yes) {
  206. if (yes) {
  207. $.post("ajax/callplan.ashx?action=delete&id=" + id, function (data) {
  208. if (data == "success") {
  209. $.ligerDialog.success('删除成功');
  210. LoadPlanList();
  211. LoadTelList();
  212. }
  213. else if (data == "error") {
  214. $.ligerDialog.error('删除失败');
  215. }
  216. else {
  217. $.ligerDialog.error('删除失败,此计划下有【<font color="red">' + data + '</font>】个未完成呼叫,无法删除');
  218. }
  219. });
  220. }
  221. });
  222. }
  223. else {
  224. $.ligerDialog.error('没有选择要删除的计划,请选择');
  225. }
  226. break;
  227. case "candle":
  228. var id = "";
  229. var rowobj;
  230. try {
  231. rowobj = planlist.getSelectedRow();
  232. id = rowobj._taskid;
  233. }
  234. catch (e) {
  235. }
  236. if (id != "") {
  237. $.ligerDialog.confirm('确定要清空【<font color="red">' + rowobj._taskname + '</font>】的中的所有未分配号码吗?', function (yes) {
  238. if (yes) {
  239. $.post("ajax/callplan.ashx?action=clearphone&id=" + id, function (data) {
  240. if (data == "success") {
  241. $.ligerDialog.success('清空成功');
  242. LoadTelList();
  243. }
  244. else if (data == "error") {
  245. $.ligerDialog.error('清空失败');
  246. }
  247. else {
  248. $.ligerDialog.success('清空号码,此计划下有【<font color="red">' + data + '</font>】个未分配号码已清空');
  249. LoadTelList();
  250. }
  251. });
  252. }
  253. });
  254. }
  255. else {
  256. $.ligerDialog.error('没有选择要清空的计划,请选择');
  257. }
  258. break;
  259. case "ok":
  260. var id = "";
  261. var rowobj;
  262. try {
  263. rowobj = planlist.getSelectedRow();
  264. id = rowobj._taskid;
  265. }
  266. catch (e) {
  267. }
  268. if (id != "") {
  269. if (rowobj._state == "1") {
  270. $.ligerDialog.error('本计划已启动,无需再启动!');
  271. }
  272. else {
  273. $.ligerDialog.confirm('确定要启动【<font color="red">' + rowobj._taskname + '</font>】吗?', function (yes) {
  274. if (yes) {
  275. $.post("ajax/callplan.ashx?action=start&id=" + id, function (data) {
  276. if (data == "success") {
  277. $.ligerDialog.success('启动成功');
  278. LoadPlanList();
  279. LoadTelList();
  280. }
  281. else {
  282. $.ligerDialog.error('启动失败');
  283. }
  284. });
  285. }
  286. });
  287. }
  288. }
  289. else {
  290. $.ligerDialog.error('没有选择要启动的计划,请选择');
  291. }
  292. break;
  293. case "lock":
  294. var id = "";
  295. var rowobj;
  296. try {
  297. rowobj = planlist.getSelectedRow();
  298. id = rowobj._taskid;
  299. }
  300. catch (e) {
  301. }
  302. if (id != "") {
  303. if (rowobj._state == "0") {
  304. $.ligerDialog.error('本计划已停止,无需再停止!');
  305. }
  306. else {
  307. $.ligerDialog.confirm('确定要停止【<font color="red">' + rowobj._taskname + '</font>】吗?', function (yes) {
  308. if (yes) {
  309. $.post("ajax/callplan.ashx?action=stop&id=" + id, function (data) {
  310. if (data == "success") {
  311. $.ligerDialog.success('停止成功');
  312. LoadPlanList();
  313. LoadTelList();
  314. }
  315. else {
  316. $.ligerDialog.error('停止失败');
  317. }
  318. });
  319. }
  320. });
  321. }
  322. }
  323. else {
  324. $.ligerDialog.error('没有选择要停止的计划,请选择');
  325. }
  326. break;
  327. case "settings":
  328. var id = "";
  329. var rowobj;
  330. var vtitle = "页面设置";
  331. try {
  332. rowobj = planlist.getSelectedRow();
  333. id = rowobj._taskid;
  334. vtitle = "【<font color='red'>" + rowobj._taskname + "</font>】页面设置";
  335. }
  336. catch (e) {
  337. }
  338. if (id != "") {
  339. var vheight = 470;
  340. var vwidth = $("#form1").width() * 0.9;
  341. if (vwidth > 700) {
  342. vwidth = 700;
  343. }
  344. // $.ligerDialog.open({ url: 'pagerview.aspx?pagerid=' + pagerid, title: '预览问卷', height: vheight, width: vwidth, isResize: true
  345. // });
  346. $.ligerDialog.open({ url: 'callplanpageitems.aspx?otype=webset&taskid=' + id, title: vtitle, height: vheight, width: vwidth, isResize: true
  347. });
  348. }
  349. else {
  350. $.ligerDialog.error('没有选择要页面设置的计划,请选择');
  351. }
  352. break;
  353. case "help":
  354. var id = "";
  355. var rowobj;
  356. var vtitle = "问卷预览";
  357. try {
  358. rowobj = planlist.getSelectedRow();
  359. id = rowobj._taskid;
  360. vtitle = "【<font color='red'>" + rowobj._taskname + "</font>】问卷预览";
  361. }
  362. catch (e) {
  363. }
  364. if (id != "") {
  365. var vheight = $("#form1").height() - 30;
  366. var vwidth = $("#form1").width() * 0.9;
  367. if (vwidth > 700) {
  368. vwidth = 700;
  369. }
  370. $.ligerDialog.open({ url: '../askmanage/pagerview.aspx?pagerid=' + rowobj._y_tkmodelid, title: vtitle, height: vheight, width: vwidth, isResize: true
  371. });
  372. }
  373. else {
  374. $.ligerDialog.error('没有选择要问卷预览的计划,请选择');
  375. }
  376. break;
  377. case "inputdata1":
  378. var id = "";
  379. var rowobj;
  380. var vtitle = "导入号码";
  381. try {
  382. rowobj = planlist.getSelectedRow();
  383. id = rowobj._taskid;
  384. vtitle = "【<font color='red'>" + rowobj._taskname + "</font>】导入号码";
  385. }
  386. catch (e) {
  387. }
  388. if (id != "") {
  389. var vheight = $("#form1").height() - 30;
  390. var vwidth = $("#form1").width() * 0.9;
  391. if (vwidth > 700) {
  392. vwidth = 700;
  393. }
  394. // $.ligerDialog.open({ url: 'pagerview.aspx?pagerid=' + pagerid, title: '预览问卷', height: vheight, width: vwidth, isResize: true
  395. // });
  396. $.ligerDialog.open({ url: 'callplanintophone.aspx?otype=intophone&taskid=' + id, title: vtitle, height: vheight, width: vwidth, isResize: true
  397. });
  398. }
  399. else {
  400. $.ligerDialog.error('没有选择要导入号码的计划,请选择');
  401. }
  402. break;
  403. }
  404. }
  405. $(function () {
  406. selectplan = "0";
  407. LoadPlanList();
  408. LoadTelList();
  409. });
  410. function Init()
  411. {
  412. LoadPlanList();
  413. selectplan = "0";
  414. LoadTelList();
  415. }
  416. document.onkeydown = function (event) {
  417. var e = event || window.event || arguments.callee.caller.arguments[0];
  418. if (e && e.keyCode == 13) {
  419. Init();
  420. }
  421. };
  422. </script>
  423. </head>
  424. <body>
  425. <form id="form1" runat="server">
  426. <div class="tools_box">
  427. <asp:HiddenField ID="hdF_FunctionId" runat="server" />
  428. <asp:HiddenField ID="hdF_ModuleId" runat="server" />
  429. <div class="tools_bar">
  430. <div class="search_box">
  431. 关键字:<asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>&nbsp;&nbsp;
  432. <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="Init();" />
  433. </div>
  434. </div>
  435. </div>
  436. <table id="tableMessage" cellpadding="3" cellspacing="3" border="0" style="width: 100%;">
  437. <tr>
  438. <td valign="top" style="width: 399px; padding: 0px 2px 5px 2px;">
  439. <div class="tools_box" style="height: 30px;">
  440. <div class="tools_bar">
  441. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  442. color: red;">
  443. <img src="../images/icon_site.gif" />&nbsp;外呼计划</div>
  444. </div>
  445. </div>
  446. <div id="divPlanList">
  447. </div>
  448. </td>
  449. <td valign="top" style="padding: 0px 2px 5px 2px;">
  450. <div class="tools_box" style="height: 30px;">
  451. <div class="tools_bar">
  452. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  453. color: red;">
  454. <img src="../images/phone.png" style=" height:20px;" />&nbsp;<span id="spanPlanInfo"></span>外呼号码</div>
  455. <div style="float:right; padding-right:10px;">分配状态:<asp:DropDownList ID="dropFP" runat="server" onchange="LoadTelList();" CssClass="selectBox" Width="80px">
  456. <asp:ListItem Value="">--全部--</asp:ListItem>
  457. <asp:ListItem Value="0">未分配</asp:ListItem>
  458. <asp:ListItem Value="1">已分配</asp:ListItem>
  459. </asp:DropDownList>&nbsp;&nbsp;呼叫状态:<asp:DropDownList ID="dropHC" runat="server" onchange="LoadTelList();" CssClass="selectBox" Width="80px">
  460. <asp:ListItem Value="">--全部--</asp:ListItem>
  461. <asp:ListItem Value="0">未呼出</asp:ListItem>
  462. <asp:ListItem Value="1">已呼出</asp:ListItem>
  463. </asp:DropDownList></div>
  464. </div>
  465. </div>
  466. <div id="divTelList">
  467. </div>
  468. </td>
  469. </tr>
  470. </table>
  471. </form>
  472. </body>
  473. </html>