鹤壁电销版 自用

callout.aspx 53KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="callout.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.calloutmanage.callout" %>
  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. <meta http-equiv="X-UA-Compatible" content="IE=8">
  6. <title>来电弹屏</title>
  7. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  8. <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  9. <script type="text/javascript" src="/scripts/jquery/jquery.form.js"></script>
  10. <script src="../scripts/ui/json2.js" type="text/javascript"></script>
  11. <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
  12. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  13. <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
  14. <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  15. <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
  16. <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
  17. <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
  18. <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
  19. <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  20. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  21. <script src="../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
  22. <script type="text/javascript">
  23. var gridlist;
  24. var treelist = null;
  25. var historylist;
  26. $(function () {
  27. $("#layout1").ligerLayout({
  28. leftWidth: 300
  29. });
  30. var w = $("#form1").width();
  31. //historylist = $("#divHistoryForm").ligerPanel({
  32. // title: '历史信息',
  33. // height: 150,
  34. // width: w
  35. //});
  36. $("#divOrderForm").ligerPanel({
  37. title: '问卷信息',
  38. height: 300,
  39. width: w - 350,
  40. });
  41. $("#divYHFKForm").ligerPanel({
  42. title: '用户反馈',
  43. height: 150,
  44. width: w - 350
  45. });
  46. $("#divFieldList").ligerPanel({
  47. title: '客户资料',
  48. height: 150,
  49. width: w - 350
  50. });
  51. //初始化选择
  52. //IVR业务流程
  53. //InitBusinessType(document.getElementById("hfBusinessType").value);
  54. //加载历史
  55. LoadList();
  56. //InitList();
  57. $.ajax({
  58. type: 'get',
  59. url: '../telmanage/ajax/telrecords.ashx?action=insertCallLogs&serverip=&ctiusercode=',
  60. dataType: 'html',
  61. success: function (res) {
  62. InitList();
  63. }
  64. });
  65. });
  66. function SetTreeValue() {
  67. try {
  68. treelist.setValue(document.getElementById("hidSeriveDeptParentId").value);
  69. if (document.getElementById("hidSeriveDeptParentId").value == "" || document.getElementById("hidSeriveDeptParentId").value == "0") {
  70. treelist.setText("顶级部门");
  71. }
  72. }
  73. catch (e) {
  74. }
  75. }
  76. function InitList() {
  77. $("#F_STANDARDADDRESS").ligerComboBox({
  78. selectBoxWidth: 200,
  79. selectBoxHeight: 200,
  80. valueField: 'id', resize: false, treeLeafOnly: true, isMultiSelect: false,
  81. onSelected: function (newvalue) {
  82. },
  83. tree: {
  84. url: '../workordermanage/ajax/ligerComboBox.ashx?action=getSTANDARDADDRESSlist',
  85. checkbox: false,
  86. ajaxType: 'get',
  87. onSuccess: function (data) {
  88. }
  89. }
  90. });
  91. treelist = $("#drpServiceDept").ligerComboBox({
  92. width: 130,
  93. selectBoxWidth: 200,
  94. selectBoxHeight: 150, valueField: 'id', resize: false, treeLeafOnly: false,
  95. tree: {
  96. url: '../customermanage/ajax/customeredit.ashx?action=getservicedepttreelist',
  97. checkbox: false,
  98. height: 150,
  99. ajaxType: 'get',
  100. onSuccess: function (data) { SetTreeValue(); }
  101. },
  102. onSelected: function (newvalue) {
  103. $("#hiddSeriveDeptId").val(newvalue);
  104. }
  105. });
  106. $("#txtByDept").ligerComboBox({
  107. width: 130,
  108. selectBoxWidth: 200,
  109. selectBoxHeight: 150, valueField: 'id', resize: false, treeLeafOnly: false,
  110. tree: {
  111. url: '../customermanage/ajax/customeredit.ashx?action=getservicedepttreelist',
  112. checkbox: false,
  113. height: 150,
  114. ajaxType: 'get',
  115. onSuccess: function (data) { }
  116. }
  117. });
  118. // $("#txtJDDept").ligerComboBox({
  119. // width: 130,
  120. // selectBoxWidth: 200,
  121. // selectBoxHeight: 150, valueField: 'id', resize: false, onBeforeOpen: function () { OpenWindowShow('selectdept.aspx', "选择接单部门", 300, 400); }
  122. // });
  123. $("#drpProvince").ligerComboBox({
  124. url: '../customermanage/ajax/customeredit.ashx?action=getregionlist',
  125. valueField: '_f_regionid',
  126. textField: '_f_regionname',
  127. autocomplete: true,
  128. onSelected: function (newvalue) {
  129. $("#hiddProvinceId").val(newvalue);
  130. $("#drpCity").ligerComboBox({
  131. url: '../customermanage/ajax/customeredit.ashx?action=getregionlist&regionpid=' + newvalue,
  132. valueField: '_f_regionid',
  133. textField: '_f_regionname', onSelected: function (newvalue) {
  134. $("#hiddCityId").val(newvalue);
  135. }
  136. });
  137. }
  138. });
  139. var cid = document.getElementById("hiddCityId").value;
  140. var sprovinceid = document.getElementById("hiddProvinceId").value;
  141. if (sprovinceid != "") {
  142. $("#drpCity").ligerComboBox({
  143. url: '../customermanage/ajax/customeredit.ashx?action=getregionlist&regionpid=' + sprovinceid,
  144. valueField: '_f_regionid',
  145. textField: '_f_regionname',
  146. isMultiSelect: false,
  147. isShowCheckBox: false,
  148. onSuccess: function (data) {
  149. if (cid != "") {
  150. liger.get("drpCity").setValue(cid);
  151. } else {
  152. liger.get("drpCity").setValue(data[0]._f_regionid);
  153. document.getElementById("hiddCityId").value = data[0]._f_regionid;
  154. }
  155. }, onSelected: function (newvalue) {
  156. $("#hiddCityId").val(newvalue);
  157. }
  158. });
  159. }
  160. else {
  161. $("#drpCity").ligerComboBox({
  162. data: null,
  163. valueField: '_f_regionid',
  164. textField: '_f_regionname',
  165. isMultiSelect: false,
  166. isShowCheckBox: false
  167. });
  168. }
  169. document.getElementById("hiddCityId").value = cid;
  170. BindData("drpProductLine", "hiddProductLineId", "CPXL");
  171. BindData("drpCustomerNature", "hiddCustomerNatureId", "KHSX");
  172. BindData("drpCustomerClass", "hiddCustomerClassId", "KHDJ");
  173. BindData("drpCustomerIndustry", "hiddCustomerIndustryId", "SSHY");
  174. BindData("drpRelationShipClass", "hiddRelationShipClassId", "GXDJ");
  175. BindData("txtZxType", "hiddZxType", "ZXLX");
  176. BindData("txtBxType", "hiddBxType", "BXLX");
  177. BindData("txtTsType", "hiddTsType", "TSLX");
  178. BindData("txtBxLevel", "hiddBxLevel", "BXJB");
  179. BindData("txtBxSystem", "hiddBxSystem", "XTLX");
  180. $("#drpAfterSaleName").ligerComboBox({
  181. url: '../customermanage/ajax/customeredit.ashx?action=getaftersalelist',
  182. valueField: '_f_userid',
  183. textField: '_f_username',
  184. autocomplete: true, onSelected: function (newvalue) {
  185. $("#hiddAfterSaleNameID").val(newvalue);
  186. }
  187. });
  188. $("#txtByName").ligerComboBox({
  189. url: '../customermanage/ajax/customeredit.ashx?action=getaftersalelist',
  190. valueField: '_f_userid',
  191. textField: '_f_username',
  192. autocomplete: true, onSelected: function (newvalue) {
  193. $("#hiddByName").val(newvalue);
  194. }
  195. });
  196. // $("#txtJDUser").ligerComboBox({
  197. // url: '../customermanage/ajax/customeredit.ashx?action=getaftersalelist',
  198. // valueField: '_f_userid',
  199. // textField: '_f_username',
  200. // autocomplete: true, onSelected: function (newvalue) {
  201. // $("#hiddJDUser").val(newvalue);
  202. // }
  203. // });
  204. //GetCustomerInfo();
  205. }
  206. function SelectJDDept(deptid, deptname) {
  207. document.getElementById("txtJDDept").value = deptname;
  208. document.getElementById("hiddJDDept").value = deptid;
  209. try {
  210. $("#txtJDUser").ligerComboBox({
  211. url: '../telmanage/ajax/selectuser.ashx?action=getaftersalelist&deptid=' + deptid,
  212. valueField: '_f_userid',
  213. textField: '_f_username',
  214. autocomplete: true, onSelected: function (newvalue) {
  215. $("#hiddJDUser").val(newvalue);
  216. }
  217. });
  218. }
  219. catch (e) { }
  220. }
  221. function BindData(objid, hiddid, param) {
  222. $("#" + objid).ligerComboBox({
  223. url: '../customermanage/ajax/customeredit.ashx?action=getdictionarylist&param=' + param,
  224. valueField: '_f_dictionaryvalueid',
  225. textField: '_f_name',
  226. autocomplete: true,
  227. onSelected: function (newvalue) {
  228. $("#" + hiddid).val(newvalue);
  229. }
  230. });
  231. }
  232. function ProvinceData() {
  233. $.post("../customermanage/ajax/customeredit.ashx?action=getprovincelist", function (data, states) {
  234. if (states == "success") {
  235. return data;
  236. }
  237. })
  238. }
  239. function GetCustomerInfo() {
  240. $.ajax({
  241. type: 'get',
  242. url: '../telmanage/ajax/customeropt.ashx?action=getCustomerInfoByPhone&tel=' + document.getElementById("hfPhone").value,
  243. dataType: 'html',
  244. success: function (res) {
  245. if (res != "") {
  246. }
  247. }
  248. });
  249. }
  250. function InitBusinessType(type) {
  251. switch (type) {
  252. case "1":
  253. tabs(0);
  254. break;
  255. case "2":
  256. tabs(1);
  257. break;
  258. case "3":
  259. tabs(2);
  260. break;
  261. case "31":
  262. tabs(2);
  263. break;
  264. case "32":
  265. tabs(2);
  266. break;
  267. default:
  268. tabs(0);
  269. break;
  270. }
  271. }
  272. function OpenWindowShow1(Url, Title, Width, Height) {
  273. $.ligerDialog.open({
  274. title: Title, url: Url, height: Height, width: Width, isResize: true, modal: true, buttons: [
  275. { text: '关闭', onclick: function (item, dialog) { dialog.close(); AgentFree(); } }
  276. ], isResize: true
  277. });
  278. }
  279. function OpenWindowShow(Url, Title, Width, Height) {
  280. $.ligerDialog.open({
  281. title: Title, url: Url, height: Height, width: Width, isResize: true, modal: true, isResize: true
  282. });
  283. }
  284. function Player(path) {
  285. OpenWindowShow1('voiceplay.aspx?path=' + path, '录音播放与下载', 600, 300);
  286. }
  287. function LoadList() {
  288. gridlist = $("#divDataList").ligerGrid({
  289. checkbox: false,
  290. height: 150,
  291. columns: [
  292. { display: '电话号码', name: '_callnumber', minWidth: 60 },
  293. {
  294. display: '呼叫状态', name: '_callstate', minWidth: 40, render: function (rowdata, rowindex, value) {
  295. if (value == "0")
  296. return "未接通";
  297. else
  298. return "已接通";
  299. }
  300. },
  301. {
  302. display: '是否处理', name: '_isdeal', minWidth: 40, render: function (rowdata, rowindex, value) {
  303. if (value == "0")
  304. return "未处理";
  305. else if (value == "1")
  306. return "已处理";
  307. else
  308. return "注销";
  309. }
  310. }, { display: '坐席工号', name: '_usercode', minWidth: 40 },
  311. { display: '坐席姓名', name: '_username', minWidth: 40 },
  312. { display: '通话开始时间', name: '_talkstarttime', minWidth: 140, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  313. { display: '通话时长(s)', name: '_talklongtime' },
  314. {
  315. display: '录音', name: '_filepath', render: function (rowdata, rowindex, value) {
  316. if (value == "") {
  317. return;
  318. }
  319. else {
  320. return "<img src=\"../images/notice.png\" style=\"cursor:hand;\" onclick=\"Player('" + encodeURI(value) + "');\" />";
  321. }
  322. }
  323. }], url: 'ajax/telrecords.ashx?action=getcallinlist&telnum=' + document.getElementById("hfPhone").value, pageSize: 3, rownumbers: true
  324. });
  325. //gridlist.changePage('first');
  326. $("#pageloading").hide();
  327. }
  328. function formatDateTime(value, rowData, rowIndex) {
  329. if (value != null) {
  330. var date = new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
  331. var result = date.getFullYear() + "-" + (date.getMonth() + 1 < 10 ? "0"
  332. + (date.getMonth() + 1) : date.getMonth() + 1) + "-"
  333. + (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "
  334. + (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":"
  335. + (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":"
  336. + (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
  337. return result;
  338. }
  339. return value;
  340. }
  341. function tabs(tabId) {
  342. document.getElementById("hfTab").value = tabId;
  343. for (var i = 0; i <= 2; i++) {
  344. if (tabId == i) {
  345. document.getElementById("tabli" + i).className = "selected";
  346. document.getElementById("tabdiv" + i).style.display = "block";
  347. document.getElementById("divOpt" + i).style.display = "block";
  348. }
  349. else {
  350. document.getElementById("tabli" + i).className = "";
  351. document.getElementById("tabdiv" + i).style.display = "none";
  352. document.getElementById("divOpt" + i).style.display = "none";
  353. }
  354. }
  355. }
  356. function validate(optid) {
  357. //alert(document.getElementById("hiddCityId").value);
  358. if (optid == "18" || optid == "19") {
  359. if (document.getElementById("hfTab").value == "1") {
  360. var jduserid = document.getElementById("hiddJDUser").value;
  361. if (jduserid == "" || jduserid == "0") {
  362. $.ligerDialog.warn('没有选择报修工单处理人');
  363. return false;
  364. }
  365. }
  366. // if (document.getElementById("hfTab").value == "2") {
  367. // var jduserid = document.getElementById("hiddJDUser").value;
  368. // }
  369. }
  370. if (optid == "12") {
  371. if (document.getElementById("hfTab").value == "1") {
  372. if (document.getElementById("txtBxPhone").value == "") {
  373. $.ligerDialog.warn('报修人电话不能为空');
  374. return false;
  375. }
  376. else if (document.getElementById("F_EXAMINETYPE").value == "") {
  377. $.ligerDialog.warn('请填写结单原因');
  378. return false;
  379. }
  380. }
  381. }
  382. if (optid == "6") {
  383. if (document.getElementById("hfTab").value == "1") {
  384. if (document.getElementById("txtBxPhone").value == "") {
  385. $.ligerDialog.warn('报修人电话不能为空');
  386. return false;
  387. }
  388. }
  389. }
  390. $.ligerDialog.waitting('工单提交中...');
  391. return true;
  392. }
  393. function TabCloseById() {
  394. var id = "callin_" + document.getElementById("hfCallId").value + "" + document.getElementById("hfPhone").value;
  395. //id = "callin_1402107209-522613335140729";
  396. parent.f_removeTab(id);
  397. }
  398. function SelectCustomer() {
  399. var vheight = $("#form1").height();
  400. var vwidth = $("#form1").width() * 0.9;
  401. OpenWindowShow('../telmanage/selectcustomer.aspx?name=' + escape(document.getElementById("txtCustomerName").value), "选择客户", vwidth, vheight);
  402. }
  403. function SelectJDUser() {
  404. var vheight = $("#form1").height();
  405. var vwidth = $("#form1").width() * 0.9;
  406. OpenWindowShow('selectdeptuser.aspx', "选择接单处理人", vwidth, vheight);
  407. }
  408. function ShowCustomer(id) {
  409. }
  410. function SetCustomerInfo(F_CustomerId,
  411. F_CustomerName,
  412. F_CustomerCode,
  413. F_ServiceDeptID,
  414. F_RegionId,
  415. F_CityID,
  416. F_ProductLineID,
  417. F_CustomerNatureID,
  418. F_CustomerClassID,
  419. F_IndustryId,
  420. F_RelationShipClassID,
  421. F_AfterSaleNameID,
  422. F_ServiceDept,
  423. F_Province,
  424. F_City,
  425. F_ProductLine,
  426. F_CustomerNature,
  427. F_CustomerClass,
  428. F_CustomerIndustry,
  429. F_RelationShipClass,
  430. F_AfterSaleName,
  431. F_QualityGuaranteeEndTime,
  432. F_SystemType, _f_chargename, F_Telephone, F_Mobile, F_ChargeTelephone) {
  433. document.getElementById("hiddCustomerId").value = F_CustomerId;
  434. document.getElementById("txtCustomerName").value = F_CustomerName;
  435. document.getElementById("divCustomerCode").innerHTML = "<a href=\"javascript:void(null)\" target=\"_self\" onclick=\"ShowCustomer('" + F_CustomerId + "');\">" + F_CustomerCode + "</a>";
  436. document.getElementById("hiddSeriveDeptId").value = F_ServiceDeptID;
  437. document.getElementById("hiddProvinceId").value = F_RegionId;
  438. document.getElementById("hiddCityId").value = F_CityID;
  439. document.getElementById("hiddProductLineId").value = F_ProductLineID;
  440. document.getElementById("hiddCustomerNatureId").value = F_CustomerNatureID;
  441. document.getElementById("hiddCustomerClassId").value = F_CustomerClassID;
  442. document.getElementById("hiddCustomerIndustryId").value = F_IndustryId;
  443. document.getElementById("hiddRelationShipClassId").value = F_RelationShipClassID;
  444. document.getElementById("hiddAfterSaleNameID").value = F_AfterSaleNameID;
  445. document.getElementById("hiddTelephone").value = F_Telephone;
  446. document.getElementById("hiddMobile").value = F_Mobile;
  447. document.getElementById("hiddChargeTelephone").value = F_ChargeTelephone;
  448. document.getElementById("drpServiceDept").value = F_ServiceDept;
  449. document.getElementById("drpProvince").value = F_Province;
  450. document.getElementById("drpCity").value = F_City;
  451. document.getElementById("drpProductLine").value = F_ProductLine;
  452. document.getElementById("drpCustomerNature").value = F_CustomerNature;
  453. document.getElementById("drpCustomerClass").value = F_CustomerClass;
  454. document.getElementById("drpCustomerIndustry").value = F_CustomerIndustry;
  455. document.getElementById("drpRelationShipClass").value = F_RelationShipClass;
  456. document.getElementById("drpAfterSaleName").value = F_AfterSaleName;
  457. document.getElementById("drpTelephone").value = F_Telephone;
  458. document.getElementById("drpMobile").value = F_Mobile;
  459. document.getElementById("drpChargeTelephone").value = F_ChargeTelephone;
  460. document.getElementById("txtZbDate").value = F_QualityGuaranteeEndTime;
  461. document.getElementById("txtBxSystem").value = F_SystemType;
  462. document.getElementById("txtZxName").value = _f_chargename;
  463. //document.getElementById("txtBxName").value = _f_chargename;
  464. document.getElementById("txtTsName").value = _f_chargename;
  465. }
  466. var sgridlist;
  467. function FastSearch() {
  468. var txtobj = document.getElementById("txtJDUser");
  469. var txtobjcode = document.getElementById("hiddJDUser");
  470. var divobj = document.getElementById("divJDDept");
  471. var divdataobj = document.getElementById("divDataJDDept");
  472. if (txtobj.value == "") {
  473. divobj.style.display = "none";
  474. //divdataobj.innerHTML = "";
  475. txtobjcode.value = "0";
  476. }
  477. else {
  478. divobj.style.display = "inline";
  479. document.getElementById("hiddJDUser").value = "0";
  480. document.getElementById("hiddJDDept").value = "0";
  481. sgridlist = $("#divDataJDDept").ligerGrid({
  482. height: 180,
  483. columns: [
  484. { display: 'ID', name: '_f_userid', align: 'left', width: 0, hide: true },
  485. { display: '用户名称', name: '_f_username', width: 100 },
  486. { display: '部门', name: '_f_deptname', width: 150 }
  487. ], url: '../telmanage/ajax/selectuser.ashx?action=getuserbyname' + '&name=' + encodeURI(txtobj.value), pageSize: 5, rownumbers: true,
  488. onDblClickRow: function (data, rowindex, rowobj) {
  489. try {
  490. document.getElementById("txtJDUser").value = data._f_username;
  491. document.getElementById("hiddJDUser").value = data._f_userid;
  492. document.getElementById("txtJDDept").value = data._f_deptname;
  493. document.getElementById("hiddJDDept").value = data._f_deptid;
  494. }
  495. catch (e) {
  496. alert(e.Message);
  497. }
  498. document.getElementById("divJDDept").style.display = "none";
  499. }
  500. });
  501. sgridlist.changePage('first');
  502. $("#pageloading").hide();
  503. }
  504. }
  505. function FastSearchZX() {
  506. var txtobj = document.getElementById("txtJDUserZX");
  507. var txtobjcode = document.getElementById("hiddJDUserZX");
  508. var divobj = document.getElementById("divJDDeptZX");
  509. var divdataobj = document.getElementById("divDataJDDeptZX");
  510. if (txtobj.value == "") {
  511. divobj.style.display = "none";
  512. //divdataobj.innerHTML = "";
  513. txtobjcode.value = "0";
  514. }
  515. else {
  516. divobj.style.display = "inline";
  517. document.getElementById("hiddJDUserZX").value = "0";
  518. document.getElementById("hiddJDDeptZX").value = "0";
  519. sgridlist = $("#divDataJDDeptZX").ligerGrid({
  520. height: 180,
  521. columns: [
  522. { display: 'ID', name: '_f_userid', align: 'left', width: 0, hide: true },
  523. { display: '用户名称', name: '_f_username', width: 100 },
  524. { display: '部门', name: '_f_deptname', width: 150 }
  525. ], url: '../telmanage/ajax/selectuser.ashx?action=getuserbyname' + '&name=' + encodeURI(txtobj.value), pageSize: 5, rownumbers: true,
  526. onDblClickRow: function (data, rowindex, rowobj) {
  527. try {
  528. document.getElementById("txtJDUserZX").value = data._f_username;
  529. document.getElementById("hiddJDUserZX").value = data._f_userid;
  530. document.getElementById("txtJDDeptZX").value = data._f_deptname;
  531. document.getElementById("hiddJDDeptZX").value = data._f_deptid;
  532. }
  533. catch (e) {
  534. alert(e.Message);
  535. }
  536. document.getElementById("divJDDeptZX").style.display = "none";
  537. }
  538. });
  539. sgridlist.changePage('first');
  540. $("#pageloading").hide();
  541. }
  542. }
  543. //function AddContact() {
  544. // if (document.getElementById("txtCustomerName").value == "") {
  545. // $.ligerDialog.error('没有填写客户姓名');
  546. // return;
  547. // }
  548. // if (document.getElementById("txtBxPhone").value == "") {
  549. // $.ligerDialog.error('没有填写客户电话');
  550. // return;
  551. // }
  552. // var customerid = encodeURIComponent(document.getElementById("hiddCustomerId").value);
  553. // //var callinname = encodeURIComponent(document.getElementById("txtBxName").value);
  554. // //var callinnumber = encodeURIComponent(document.getElementById("txtBxPhone").value);
  555. // var params = "&customerid=" + customerid + "&callinname=" + callinname + "&callinnumber=" + callinnumber;
  556. // $.post("ajax/addcontact.ashx?action=addcontact" + params, function (data, states) {
  557. // if (states == "success") {
  558. // if (data == "success") {
  559. // $.ligerDialog.success('保存客户联系人成功');
  560. // }
  561. // if (data == "error") {
  562. // $.ligerDialog.error('保存客户联系人失败');
  563. // }
  564. // }
  565. // })
  566. //}
  567. // 2015-4-11 张高炯
  568. function EditAndSaveCustomerInfo() {
  569. //客户名称
  570. var cid = encodeURIComponent(document.getElementById("hiddCustomerId").value);
  571. //if (cid == "" || cid <= 0 || cid == "undefined") { $.ligerDialog.warn('没有选择客户'); return; }
  572. if (document.getElementById("txtCustomerName").value == "") { $.ligerDialog.error('没有填写客户姓名'); return; }
  573. var cname = encodeURIComponent(document.getElementById("txtCustomerName").value);
  574. //客户编号
  575. //var ccode = encodeURIComponent(document.getElementById("divCustomerCode").innerHTML);
  576. //所属客服部
  577. var sdepid = encodeURIComponent(document.getElementById("hiddSeriveDeptId").value);
  578. var sdep = encodeURIComponent(document.getElementById("drpServiceDept").value);
  579. //所属省份
  580. var prid = encodeURIComponent(document.getElementById("hiddProvinceId").value);
  581. var pr = encodeURIComponent(document.getElementById("drpProvince").value);
  582. //所属市县
  583. var ctid = encodeURIComponent(document.getElementById("hiddCityId").value);
  584. var ct = encodeURIComponent(document.getElementById("drpCity").value);
  585. //系统类型
  586. var systype = encodeURIComponent(document.getElementById("txtBxSystem").value);
  587. //质保时间
  588. var zbdate = encodeURIComponent(document.getElementById("txtZbDate").value);
  589. //产品系列
  590. var plid = encodeURIComponent(document.getElementById("hiddProductLineId").value);
  591. var pl = encodeURIComponent(document.getElementById("drpProductLine").value);
  592. //客户属性
  593. var cnid = encodeURIComponent(document.getElementById("hiddCustomerNatureId").value);
  594. var cn = encodeURIComponent(document.getElementById("drpCustomerNature").value);
  595. //客户等级
  596. var ccid = encodeURIComponent(document.getElementById("hiddCustomerClassId").value);
  597. var cc = encodeURIComponent(document.getElementById("drpCustomerClass").value);
  598. //所属行业
  599. var ciid = encodeURIComponent(document.getElementById("hiddCustomerIndustryId").value);
  600. var ci = encodeURIComponent(document.getElementById("drpCustomerIndustry").value);
  601. //关系等级
  602. var rscid = encodeURIComponent(document.getElementById("hiddRelationShipClassId").value);
  603. var rsc = encodeURIComponent(document.getElementById("drpRelationShipClass").value);
  604. //售后负责人
  605. var asnid = encodeURIComponent(document.getElementById("hiddAfterSaleNameID").value);
  606. var asn = encodeURIComponent(document.getElementById("drpAfterSaleName").value);
  607. //联系电话
  608. if (document.getElementById("drpTelephone").value == '' && document.getElementById("drpMobile").value == '' && document.getElementById("drpChargeTelephone").value == '') {
  609. $.ligerDialog.error('至少填写一个联系电话'); return;
  610. }
  611. var tel = encodeURIComponent(document.getElementById("drpTelephone").value);
  612. var mobile = encodeURIComponent(document.getElementById("drpMobile").value);
  613. var tel1 = encodeURIComponent(document.getElementById("drpChargeTelephone").value);
  614. var params = "cid=" + cid + "&cname=" + cname
  615. //+ "&ccode=" + ccode
  616. + "&sdepid=" + sdepid + "&sdep=" + sdep
  617. + "&prid=" + prid + "&pr=" + pr
  618. + "&ctid=" + ctid + "&ct=" + ct
  619. + "&systype=" + systype
  620. + "&zbdate=" + zbdate
  621. + "&plid=" + plid + "&pl=" + pl
  622. + "&cnid=" + cnid + "&cn=" + cn
  623. + "&ccid=" + ccid + "&cc=" + cc
  624. + "&ciid=" + plid + "&ci=" + ci
  625. + "&rscid=" + rscid + "&rsc=" + rsc
  626. + "&asnid=" + asnid + "&asn=" + asn + "&tel="
  627. + tel + "&mobile=" + mobile + "&tel1=" + tel1;
  628. $.ajax({
  629. type: "get",
  630. url: "../telmanage/ajax/editandsavecustomerinfo.ashx?action=editAndSave",
  631. data: params,
  632. cache: false,
  633. success: function (res, state) {
  634. if (state == "success") {
  635. if (res == "True") {
  636. $.ligerDialog.success('修改客户信息成功');
  637. } else if (res == "False") {
  638. $.ligerDialog.error('修改客户信息失败');
  639. }
  640. }
  641. }
  642. });
  643. }
  644. document.onkeydown = function (event) {
  645. var e = event || window.event || arguments.callee.caller.arguments[0];
  646. if (e && e.keyCode == 13 && document.activeElement.id == "txtCustomerName") {
  647. SelectCustomer();
  648. }
  649. };
  650. function ReplaceValue(n) {
  651. var tel = document.getElementById("hfPhone").value;
  652. switch (n) {
  653. case 1:
  654. var t1 = document.getElementById("drpTelephone").value;
  655. var t2 = document.getElementById("hiddTelephone").value;
  656. if (t1 != tel) { document.getElementById("drpTelephone").value = tel; } else { document.getElementById("drpTelephone").value = t2; }
  657. break;
  658. case 2:
  659. var t1 = document.getElementById("drpMobile").value;
  660. var t2 = document.getElementById("hiddMobile").value;
  661. if (t1 != tel) { document.getElementById("drpMobile").value = tel; } else { document.getElementById("drpMobile").value = t2; }
  662. break;
  663. case 3:
  664. var t1 = document.getElementById("drpChargeTelephone").value;
  665. var t2 = document.getElementById("hiddChargeTelephone").value;
  666. if (t1 != tel) { document.getElementById("drpChargeTelephone").value = tel; } else { document.getElementById("drpChargeTelephone").value = t2; }
  667. break;
  668. }
  669. }
  670. function SaveData() {
  671. $.ligerDialog.waitting('提交保存中,请稍后...');
  672. var id = document.getElementById("hfCallId").value;
  673. var taskid = document.getElementById("hfTaskId").value;
  674. var pagerid = document.getElementById("hfPagerId").value;
  675. var userid = document.getElementById("txtUserId").value;
  676. var labels = "";
  677. $("#divKHBQList :checkbox").each(function (i, item) {
  678. labels += $(item).val() + ",";
  679. });
  680. $("#form1").ajaxSubmit({
  681. beforeSubmit: function (formData, jqForm, options) {
  682. },
  683. success: function (data, textStatus) {
  684. if (data.msg == 1) {
  685. SaveInfo("success", data.info);
  686. $.ligerDialog.closeWaitting();
  687. } else {
  688. $.ligerDialog.closeWaitting();
  689. $.ligerDialog.error(data.info);
  690. }
  691. },
  692. error: function (data, status, e) {
  693. $.ligerDialog.closeWaitting();
  694. $.ligerDialog.error("提交保存失败,错误信息:" + e);
  695. },
  696. url: "ajax/calloutopt.ashx?action=savedata&id=" + id + "&taskid=" + taskid + "&pagerid=" + pagerid + "&labels=" + labels,
  697. type: "post",
  698. dataType: "json",
  699. });
  700. }
  701. function SaveInfo(res, msg) {
  702. switch (res) {
  703. case 'success':
  704. $.ligerDialog.success(msg, function (yes) { CloseThis(); });
  705. break;
  706. case 'warn':
  707. $.ligerDialog.error('提交保存失败,请确认数据正确性');
  708. break;
  709. case 'error':
  710. $.ligerDialog.error('提交保存失败,请联系开发商');
  711. break;
  712. default:
  713. break;
  714. }
  715. }
  716. </script>
  717. </head>
  718. <body style="overflow: hidden;" scroll="no">
  719. <form id="form1" runat="server">
  720. <asp:HiddenField ID="hfBusinessType" Value="1" runat="server"></asp:HiddenField>
  721. <%--按键选择类型--%>
  722. <asp:HiddenField ID="hfPhone" Value="" runat="server"></asp:HiddenField>
  723. <%--来电号码--%>
  724. <asp:HiddenField ID="hfCallId" Value="0" runat="server"></asp:HiddenField>
  725. <%--来电callid--%>
  726. <asp:HiddenField ID="hfUserId" Value="0" runat="server"></asp:HiddenField>
  727. <asp:HiddenField ID="hfTab" Value="0" runat="server"></asp:HiddenField>
  728. <asp:HiddenField ID="hfTaskId" Value="0" runat="server"></asp:HiddenField>
  729. <asp:HiddenField ID="hfPagerId" Value="0" runat="server"></asp:HiddenField>
  730. <div class="tools_box">
  731. <div class="tools_bar">
  732. <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
  733. <tr>
  734. <td valign="middle" style="width: 61px; padding-left: 3px;">
  735. <img src="../images/phone.png" />
  736. </td>
  737. <td valign="middle" style="width: 400px;">
  738. <label id="txtWaiHuDian" runat="server" style="font-size: 20px; color: Red;">
  739. 0000--郑州
  740. </label>
  741. </td>
  742. <td valign="middle" style="padding-left: 3px;">
  743. <asp:CheckBox ID="cbBlack" runat="server" /><span>拉黑</span>&nbsp;&nbsp;<span id="ShiChang">拉黑时长:</span><asp:TextBox
  744. ID="txtBlackTime" runat="server" onchange="txtChange(this.value)" CssClass="txtInput normal"
  745. Text="0" onKeyUp="this.value=this.value.replace(/[^\d]/g,'');" Width="30px"></asp:TextBox>&nbsp;&nbsp;<input
  746. id="rdTimesType0" name="timetype" type="radio" checked runat="server" />&nbsp;分&nbsp;&nbsp;<input
  747. id="rdTimesType1" name="timetype" type="radio" runat="server" />&nbsp;时&nbsp;&nbsp;<input
  748. id="rdTimesType2" name="timetype" type="radio" runat="server" />&nbsp;天
  749. </td>
  750. <td style="width: 220px; padding-right: 3px;">外呼时间:<span style="color: #F00; font-weight: 800; font-size: 14px;"><%=System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") %></span>
  751. </td>
  752. </tr>
  753. </table>
  754. </div>
  755. </div>
  756. <div id="layout1">
  757. <div position="left" title="客户信息" style="overflow: auto; height: 95%;">
  758. <table class="form_table" style="width: 100%;">
  759. <col width="85px" />
  760. <col />
  761. <tbody>
  762. <tr>
  763. <th>姓名:
  764. </th>
  765. <td>
  766. <div style="float: left;">
  767. <asp:HiddenField ID="hiddCustomerId" runat="server" Value="0" />
  768. <asp:TextBox ID="txtCustomerName" runat="server" CssClass="txtInput normal" Style="width: 90px;"></asp:TextBox>
  769. </div>
  770. <div style="float: left; padding-top: 2px;">
  771. <img src="../images/btn_off_lookup.gif" onclick="SelectCustomer();" alt="选择客户" style="cursor: pointer;" />
  772. </div>
  773. </td>
  774. </tr>
  775. <tr>
  776. <th>性别:
  777. </th>
  778. <td>
  779. <asp:TextBox ID="drpGender" runat="server"></asp:TextBox><asp:HiddenField ID="hiddGender"
  780. runat="server" />
  781. </td>
  782. </tr>
  783. <tr>
  784. <th>出生日期:
  785. </th>
  786. <td>
  787. <asp:TextBox ID="drpBirthday" runat="server" CssClass="txtInput normal" Style="width: 120px;" onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox><asp:HiddenField ID="hiddBirthday"
  788. runat="server" />
  789. </td>
  790. </tr>
  791. <tr>
  792. <th>客户来源:
  793. </th>
  794. <td>
  795. <asp:TextBox ID="drpSource" runat="server"></asp:TextBox><asp:HiddenField ID="hiddSource"
  796. runat="server" />
  797. </td>
  798. </tr>
  799. <tr>
  800. <th>所属省份:
  801. </th>
  802. <td>
  803. <asp:TextBox ID="drpProvince" runat="server"></asp:TextBox><asp:HiddenField ID="hiddProvinceId"
  804. runat="server" />
  805. </td>
  806. </tr>
  807. <tr>
  808. <th>所属市县:
  809. </th>
  810. <td>
  811. <asp:TextBox ID="drpCity" runat="server"></asp:TextBox><asp:HiddenField ID="hiddCityId"
  812. runat="server" />
  813. </td>
  814. </tr>
  815. <tr>
  816. <th>详细地址:
  817. </th>
  818. <td>
  819. <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox><asp:HiddenField ID="hiddAddress"
  820. runat="server" />
  821. </td>
  822. </tr>
  823. <tr>
  824. <th>收入:
  825. </th>
  826. <td>
  827. <asp:TextBox ID="drpSalary" runat="server"></asp:TextBox><asp:HiddenField ID="hiddSalary"
  828. runat="server" />
  829. </td>
  830. </tr>
  831. <tr>
  832. <th>婚姻:
  833. </th>
  834. <td>
  835. <asp:TextBox ID="drpMarriage" runat="server"></asp:TextBox><asp:HiddenField ID="hiddMarriage"
  836. runat="server" />
  837. </td>
  838. </tr>
  839. <tr>
  840. <th>学历:
  841. </th>
  842. <td>
  843. <asp:TextBox ID="drpEducation" runat="server"></asp:TextBox><asp:HiddenField ID="hiddEducation"
  844. runat="server" />
  845. </td>
  846. </tr>
  847. <tr>
  848. <th>职业:
  849. </th>
  850. <td>
  851. <asp:TextBox ID="drpCustomerIndustry" runat="server"></asp:TextBox><asp:HiddenField
  852. ID="hiddCustomerIndustryId" runat="server" />
  853. </td>
  854. </tr>
  855. <tr>
  856. <th>备注:
  857. </th>
  858. <td>
  859. <asp:TextBox ID="txtRemark" runat="server"></asp:TextBox><asp:HiddenField ID="hiddRemark"
  860. runat="server" />
  861. </td>
  862. </tr>
  863. <tr>
  864. <th>联系电话1:
  865. </th>
  866. <td>
  867. <div style="float: left;">
  868. <asp:TextBox ID="drpTelephone" runat="server" CssClass="txtInput normal" Style="width: 90px;"></asp:TextBox><asp:HiddenField
  869. ID="hiddTelephone" runat="server" />
  870. </div>
  871. <div style="float: left; padding-top: 2px;">
  872. <img src="../images/timg.jpg" onclick="ReplaceValue(1);" alt="替换" style="cursor: pointer; width: 20px; height: 20px;" />
  873. </div>
  874. </td>
  875. </tr>
  876. <tr>
  877. <th>联系电话2:
  878. </th>
  879. <td>
  880. <div style="float: left;">
  881. <asp:TextBox ID="drpMobile" runat="server" CssClass="txtInput normal" Style="width: 90px;"></asp:TextBox><asp:HiddenField
  882. ID="hiddMobile" runat="server" />
  883. </div>
  884. <div style="float: left; padding-top: 2px;">
  885. <img src="../images/timg.jpg" onclick="ReplaceValue(2);" alt="替换" style="cursor: pointer; width: 20px; height: 20px;" />
  886. </div>
  887. </td>
  888. </tr>
  889. <tr>
  890. <th>联系电话3:
  891. </th>
  892. <td>
  893. <div style="float: left;">
  894. <asp:TextBox ID="drpChargeTelephone" runat="server" CssClass="txtInput normal" Style="width: 90px;"></asp:TextBox><asp:HiddenField
  895. ID="hiddChargeTelephone" runat="server" />
  896. </div>
  897. <div style="float: left; padding-top: 2px;">
  898. <img src="../images/timg.jpg" onclick="ReplaceValue(3);" alt="替换" style="cursor: pointer; width: 20px; height: 20px;" />
  899. </div>
  900. </td>
  901. </tr>
  902. <tr>
  903. <th colspan="2" style="text-align: center">
  904. <input id="editandsave" type="button" title="修改并保存" value="修改并保存" class="btnSubmit" onclick="EditAndSaveCustomerInfo()" />
  905. </th>
  906. </tr>
  907. </tbody>
  908. </table>
  909. </div>
  910. <div position="center" title="">
  911. <div id="divFieldList" style="overflow: auto; width: 100%;" runat="server">
  912. </div>
  913. <div id="divYHFKForm" style="overflow: auto; width: 100%;">
  914. <div id="YHFKdiv">
  915. <div style="float: left; width: 150px; height: 23px; padding: 3px;">&nbsp;&nbsp;&nbsp;<input id="YHFK1" type="radio" name="YHFK" value="443,已同意" /><label for="YHFK1">&nbsp;&nbsp;已同意</label></div>
  916. <div style="float: left; width: 150px; height: 23px; padding: 3px;">&nbsp;&nbsp;&nbsp;<input id="YHFK2" type="radio" name="YHFK" value="444,不同意" /><label for="YHFK2">&nbsp;&nbsp;不同意</label></div>
  917. <div style="float: left; width: 150px; height: 23px; padding: 3px;">&nbsp;&nbsp;&nbsp;<input id="YHFK3" type="radio" name="YHFK" value="445,下次沟通" /><label for="YHFK3">&nbsp;&nbsp;下次沟通</label></div>
  918. <div style="float: left; width: 150px; height: 23px; padding: 3px;">&nbsp;&nbsp;&nbsp;<input id="YHFK4" type="radio" name="YHFK" value="446,直接挂断" /><label for="YHFK4">&nbsp;&nbsp;直接挂断</label></div>
  919. <div style="float: left; width: 150px; height: 23px; padding: 3px;">&nbsp;&nbsp;&nbsp;<input id="YHFK5" type="radio" name="YHFK" value="447,强烈反感" /><label for="YHFK5">&nbsp;&nbsp;强烈反感</label></div>
  920. <div style="width: 200px; height: 70px; margin: 0 20px;">
  921. 备注:
  922. <textarea name="remarktxt" style="width: 200px; height: 65px;"></textarea>
  923. </div>
  924. </div>
  925. </div>
  926. <div id="divOrderForm" style="overflow: auto; width: 100%;">
  927. <div id="contentTab">
  928. <table id="tableMessage" cellpadding="3" cellspacing="3" border="0" style="width: 100%;">
  929. <tr>
  930. <td valign="top" style="padding: 0px 2px 5px 2px;">
  931. <table id="tableTree" cellpadding="0" cellspacing="0" style="width: 100%; background-color: White; border: 1px solid #D6D6D6;">
  932. <tr>
  933. <td valign="top">
  934. <asp:HiddenField ID="txtId" runat="server" Value="" />
  935. <asp:HiddenField ID="txtTaskId" runat="server" Value="" />
  936. <asp:HiddenField ID="txtPhone" runat="server" Value="" />
  937. <asp:HiddenField ID="txtPagerId" runat="server" Value="" />
  938. <asp:HiddenField ID="txtUserId" runat="server" Value="0" />
  939. <asp:HiddenField ID="txtcallstate" runat="server" Value="0" />
  940. <asp:HiddenField ID="txtHJJGId" runat="server" Value="0" />
  941. <asp:HiddenField ID="txtHJJGName" runat="server" Value="" />
  942. <table class="form_table" style="width: 100%;">
  943. <col width="100px" />
  944. <col />
  945. <tbody>
  946. <tr>
  947. <th style="border-right: 1px dotted #cccccc;">
  948. <span>问卷名称:</span>
  949. </th>
  950. <td>
  951. <span id="spanTitle" runat="server"></span>
  952. </td>
  953. </tr>
  954. <tr>
  955. <th style="border-top: 1px dotted #cccccc; border-right: 1px dotted #cccccc;">
  956. <span>问卷说明:</span>
  957. </th>
  958. <td style="border-top: 1px dotted #cccccc;">
  959. <span id="spanRemark" runat="server"></span>
  960. </td>
  961. </tr>
  962. </tbody>
  963. </table>
  964. <div id="divDataItems" runat="server">
  965. </div>
  966. </td>
  967. </tr>
  968. </table>
  969. </td>
  970. </tr>
  971. <tr>
  972. <td align="center" style="height: 50px;">
  973. <%--<asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="btnSubmit" OnClick="btnSubmit_Click" />--%>
  974. </td>
  975. </tr>
  976. </table>
  977. </div>
  978. </div>
  979. <div style="width: 100%; text-align: center;">
  980. <input id="btnSubmit" type="button" class="btnSubmit" onclick="SaveData();" value="提交保存" />
  981. </div>
  982. </div>
  983. </div>
  984. </form>
  985. <script>
  986. //$(function () {
  987. // $(":radio").click(function () {
  988. // $('#YHFKText').val($(this).attr('title'));
  989. // });
  990. // $(":radio").next("label").click(function () {
  991. // $('#YHFKText').val($(this).text());
  992. // alert($("#YHFKText").val());
  993. // });
  994. //});
  995. </script>
  996. </body>
  997. </html>