UU跑腿标准版

customeredit.aspx 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="customeredit.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.customermanage.customeredit" %>
  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>
  5. <title>编辑客户</title>
  6. <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  7. <script type="text/javascript" src="../scripts/jquery/jquery.form.js"></script>
  8. <script type="text/javascript" src="../scripts/jquery/jquery.validate.min.js"></script>
  9. <script type="text/javascript" src="../scripts/jquery/messages_cn.js"></script>
  10. <script type="text/javascript" src="../scripts/function.js"></script>
  11. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  12. <script src="../scripts/ui/json2.js" type="text/javascript"></script>
  13. <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
  14. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  15. <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
  16. <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  17. <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
  18. <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
  19. <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
  20. <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
  21. <script src="../scripts/ui/js/plugins/ligerTextBox.js" type="text/javascript"></script>
  22. <script src="../scripts/ui/js/plugins/ligerComboBox.js" type="text/javascript"></script>
  23. <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  24. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  25. <script type="text/javascript">
  26. var treelist = null;
  27. $(function () {
  28. treelist = $("#drpServiceDept").ligerComboBox({
  29. width: 130,
  30. selectBoxWidth: 200,
  31. selectBoxHeight: 150, valueField: 'id', resize: false, treeLeafOnly: false,
  32. tree: {
  33. url: 'ajax/customeredit.ashx?action=getservicedepttreelist',
  34. width: 200,
  35. height: 150,
  36. checkbox: false,
  37. ajaxType: 'get',
  38. onSuccess: function (data) { SetTreeValue(); }
  39. },
  40. onSelected: function (newvalue) {
  41. $("#hiddSeriveDeptId").val(newvalue);
  42. }
  43. });
  44. $("#drpProvince").ligerComboBox({
  45. url: 'ajax/customeredit.ashx?action=getregionlist',
  46. valueField: '_f_regionid',
  47. textField: '_f_regionname',
  48. autocomplete: true,
  49. onSelected: function (newvalue) {
  50. $("#hiddProvinceId").val(newvalue);
  51. $("#drpCity").ligerComboBox({
  52. url: 'ajax/customeredit.ashx?action=getregionlist&regionpid=' + newvalue,
  53. autocomplete: true,
  54. valueField: '_f_regionid',
  55. textField: '_f_regionname'
  56. });
  57. }
  58. });
  59. $("#drpCity").ligerComboBox({
  60. data: null,
  61. valueField: '_f_regionid',
  62. textField: '_f_regionname',
  63. autocomplete: true,
  64. isMultiSelect: false,
  65. isShowCheckBox: false,
  66. onSelected: function (newvalue) {
  67. $("#hiddCityId").val(newvalue);
  68. }
  69. });
  70. BindData("drpProductLine", "hiddProductLineId", "CPXL");
  71. BindData("drpCustomerNature", "hiddCustomerNatureId", "KHSX");
  72. BindData("drpCustomerClass", "hiddCustomerClassId", "KHDJ");
  73. BindData("drpCustomerIndustry", "hiddCustomerIndustryId", "SSHY");
  74. BindData("drpRelationShipClass", "hiddRelationShipClassId", "GXDJ");
  75. //BindData("txtCustomerStatus", "hiddCustomerStatus", "KHZT");
  76. $("#drpAfterSaleName").ligerComboBox({
  77. url: 'ajax/customeredit.ashx?action=getaftersalelist',
  78. valueField: '_f_userid',
  79. textField: '_f_username',
  80. autocomplete: true,
  81. onSelected: function (newvalue) {
  82. $("#hiddAfterSaleNameID").val(newvalue);
  83. }
  84. });
  85. $("#txtSystemStartTime").ligerDateEditor();
  86. $("#txtQualityGuaranteeEndTime").ligerDateEditor();
  87. LoadList();
  88. });
  89. function toDay() {
  90. var d = new Date();
  91. var str = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
  92. return str;
  93. }
  94. function BindData(objid, hiddid, param) {
  95. $("#" + objid).ligerComboBox({
  96. url: 'ajax/customeredit.ashx?action=getdictionarylist&param=' + param,
  97. valueField: '_f_dictionaryvalueid',
  98. textField: '_f_name',
  99. autocomplete: true,
  100. onSelected: function (newvalue) {
  101. $("#" + hiddid).val(newvalue);
  102. }
  103. });
  104. }
  105. function SetTreeValue() {
  106. try {
  107. treelist.setValue(document.getElementById("hidSeriveDeptParentId").value);
  108. if (document.getElementById("hidSeriveDeptParentId").value == "" || document.getElementById("hidSeriveDeptParentId").value == "0") {
  109. treelist.setText("顶级分类");
  110. }
  111. }
  112. catch (e) {
  113. }
  114. }
  115. var gridlist;
  116. var singleClick;
  117. function LoadList() {
  118. try {
  119. gridlist = $("#divDataList").ligerGrid({
  120. checkbox: false,
  121. height: '160',
  122. columns: [
  123. { display: 'Id', name: '_f_manid', hide: '_f_manid',width: '3%'},
  124. { display: '联系人', name: '_f_name', width: '10%' },
  125. { display: '性别', name: '_f_sex', width: '7%' },
  126. { display: '职务', name: '_f_duty',width:'10%' },
  127. { display: '手机', name: '_f_mobile', width: '10%' },
  128. { display: '联系电话', name: '_f_telephone', width: '10%' },
  129. { display: '邮箱', name: '_f_email', width: '10%' },
  130. { display: 'QQ', name: '_f_qq', width: '10%'},
  131. { display: '传真', name: '_f_fax', width: '10%'},
  132. { display: '备注', name: '_f_remark', width: '20%'}
  133. ],
  134. toolbar: {
  135. items: [
  136. { text: '增加', click: itemclick, icon: 'add' },
  137. { line: true },
  138. { text: '修改', click: itemclick, icon: 'modify' },
  139. { line: true },
  140. { text: '删除', click: itemclick, icon: 'delete' }
  141. ]
  142. },
  143. url: 'ajax/person.ashx?action=getpersonlist&cId=' + $("#hiddCustomerId").val(), pageSize: 2, rownumbers: true,
  144. onSelectRow: function (data, rowindex, rowobj) {
  145. singleClick = data._f_manid;
  146. },
  147. onDblClickRow: function (data, rowindex, rowobj) {
  148. var vheight = $("#form1").height();
  149. var vwidth = $("#form1").width() * 0.9;
  150. if (vwidth > 800) { vwidth = 800; }
  151. if (singleClick == "" || singleClick == undefined) {
  152. alert("请选择修改行!");
  153. } else {
  154. $.ligerDialog.open({
  155. url: 'personmodify.aspx?actionFlag=modify&personId=' + singleClick,
  156. title: '修改联系人信息', height: vheight, width: vwidth, isResize: true
  157. });
  158. }
  159. }
  160. });
  161. }
  162. catch (e) {
  163. alert(e.Message);
  164. }
  165. gridlist.changePage('first');
  166. }
  167. function LoadedFun(e) {
  168. tabs('#contentTab', 1);
  169. }
  170. function itemclick(item) {
  171. var vheight = $("#form1").height();
  172. var vwidth = $("#form1").width() * 0.9;
  173. if (vwidth > 800) { vwidth = 800; }
  174. if (item.icon == "add") {
  175. $.ligerDialog.open({
  176. url: 'personmodify.aspx?actionFlag=add&cid=' + document.getElementById("hiddCustomerId").value,
  177. title: '添加客户联系人信息', height: vheight, width: vwidth, isResize: true
  178. });
  179. }
  180. if (item.icon == "modify") {
  181. if (singleClick == "" || singleClick == undefined) {
  182. alert("请选择修改行!");
  183. } else {
  184. $.ligerDialog.open({
  185. url: 'personmodify.aspx?actionFlag=modify&personId=' + singleClick,
  186. title: '修改客户联系人信息', height: vheight, width: vwidth, isResize: true
  187. });
  188. }
  189. }
  190. if (item.icon == "delete") {
  191. try {
  192. //获取选择的行
  193. var rows = gridlist.getSelectedRows();
  194. if (rows.length > 0) {
  195. $.ligerDialog.confirm('确定要批量删除选择的记录吗?', function (yes) {
  196. if (yes) {
  197. try {
  198. var arr = new Array();
  199. var i = 0;
  200. for (var i = 0; i < rows.length; i++) {
  201. arr[i] = rows[i]._f_manid;
  202. }
  203. $.post("ajax/person.ashx?action=delete&arrid=" + arr.toString(), function (data) {
  204. if (data == "success") {
  205. $.ligerDialog.success('删除成功');
  206. LoadList();
  207. }
  208. else {
  209. $.ligerDialog.error('删除失败');
  210. }
  211. });
  212. }
  213. catch (e) {
  214. alert(e.Message);
  215. }
  216. }
  217. else {
  218. }
  219. });
  220. }
  221. else {
  222. $.ligerDialog.error('没有选择要删除的联系人');
  223. }
  224. }
  225. catch (e) {
  226. $.ligerDialog.error(e.Message);
  227. }
  228. }
  229. }
  230. function CloseThis() {
  231. var dialog = frameElement.dialog;
  232. parent.InitList();
  233. dialog.close();
  234. }
  235. function SaveInfo(res) {
  236. switch (res) {
  237. case 'success':
  238. $.ligerDialog.success('保存成功', function (yes) { CloseThis(); });
  239. break;
  240. case 'warn':
  241. $.ligerDialog.error('保存失败,请确认数据正确性');
  242. break;
  243. case 'error':
  244. $.ligerDialog.error('系统错误,请联系开发商');
  245. break;
  246. default:
  247. break;
  248. }
  249. }
  250. function validate() {
  251. lblCustomerName.innerHTML = "*";
  252. lblCustomerName.style.color = "#717171";
  253. lblCustomerCode.innerHTML = "*";
  254. lblCustomerCode.style.color = "#717171";
  255. if (document.getElementById("txtCustomerName").value == "") {
  256. lblCustomerName.innerHTML = "请填写客户名";
  257. lblCustomerName.style.color = "red";
  258. return false;
  259. }
  260. else if (document.getElementById("txtCustomerCode").value == "") {
  261. lblCustomerCode.innerHTML = "请填写客户编号";
  262. lblCustomerCode.style.color = "red";
  263. return false;
  264. }
  265. return true;
  266. }
  267. </script>
  268. </head>
  269. <body class="mainbody" scroll="no" style="margin-top: 0px;">
  270. <form id="form1" runat="server">
  271. <div id="contentTab">
  272. <table class="form_table">
  273. <col width="85px" />
  274. <col />
  275. <col width="85px" />
  276. <col />
  277. <col width="85px" />
  278. <col />
  279. <tbody>
  280. <tr>
  281. <th>
  282. 客户名称:
  283. </th>
  284. <td colspan="3">
  285. <asp:HiddenField ID="hiddCustomerId" runat="server" />
  286. <asp:TextBox ID="txtCustomerName" runat="server" CssClass="txtInput normal" Style="width: 300px;"></asp:TextBox><label
  287. id="lblCustomerName" for="txtCustomerName">*</label>
  288. </td>
  289. <th>
  290. 客户编号:
  291. </th>
  292. <td>
  293. <asp:TextBox ID="txtCustomerCode" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  294. <label id="lblCustomerCode" for="txtCustomerCode">*</label>
  295. </td>
  296. </tr>
  297. <tr>
  298. <th>
  299. 所属客服部:
  300. </th>
  301. <td>
  302. <div style="float:left"><asp:TextBox ID="drpServiceDept" runat="server"></asp:TextBox></div>
  303. <asp:HiddenField ID="hiddSeriveDeptId" runat="server" />
  304. <label id="lblServiceDept" for="drpServiceDept">*</label>
  305. </td>
  306. <th>
  307. 所属省份:
  308. </th>
  309. <td>
  310. <asp:HiddenField ID="hiddProvinceId" runat="server" />
  311. <div style="float:left"><asp:TextBox ID="drpProvince" runat="server"></asp:TextBox></div>
  312. <label id="lblProvince" for="drpProvince">*</label>
  313. </td>
  314. <th>
  315. 所属市县:
  316. </th>
  317. <td>
  318. <asp:HiddenField ID="hiddCityId" runat="server" />
  319. <asp:TextBox ID="drpCity" runat="server"></asp:TextBox>
  320. </td>
  321. </tr>
  322. <tr>
  323. <th>
  324. 产品系列:
  325. </th>
  326. <td>
  327. <asp:HiddenField ID="hiddProductLineId" runat="server" />
  328. <asp:TextBox ID="drpProductLine" runat="server"></asp:TextBox>
  329. </td>
  330. <th>
  331. 客户属性:
  332. </th>
  333. <td>
  334. <asp:HiddenField ID="hiddCustomerNatureId" runat="server" />
  335. <asp:TextBox ID="drpCustomerNature" runat="server"></asp:TextBox>
  336. </td>
  337. <th>
  338. 客户等级:
  339. </th>
  340. <td>
  341. <asp:HiddenField ID="hiddCustomerClassId" runat="server" />
  342. <asp:TextBox ID="drpCustomerClass" runat="server"></asp:TextBox>
  343. </td>
  344. </tr>
  345. <tr>
  346. <th>
  347. 所属行业:
  348. </th>
  349. <td>
  350. <asp:HiddenField ID="hiddCustomerIndustryId" runat="server" />
  351. <asp:TextBox ID="drpCustomerIndustry" runat="server"></asp:TextBox>
  352. </td>
  353. <th>
  354. 关系等级:
  355. </th>
  356. <td>
  357. <asp:HiddenField ID="hiddRelationShipClassId" runat="server" />
  358. <asp:TextBox ID="drpRelationShipClass" runat="server"></asp:TextBox>
  359. </td>
  360. <th>
  361. 售后负责人:
  362. </th>
  363. <td>
  364. <asp:HiddenField ID="hiddAfterSaleNameID" runat="server" />
  365. <asp:TextBox ID="drpAfterSaleName" runat="server"></asp:TextBox>
  366. </td>
  367. </tr>
  368. </tbody>
  369. </table>
  370. <ul class="tab_nav">
  371. <li class="selected"><a onclick="tabs('#contentTab',0);" href="javascript:;">联系人信息</a></li>
  372. <li><a onclick="tabs('#contentTab',1);" href="javascript:;">基本信息</a></li>
  373. <li><a onclick="tabs('#contentTab',2);" href="javascript:;">备注信息</a></li>
  374. <li><a onclick="tabs('#contentTab',3);" href="javascript:;">扩展信息</a></li>
  375. </ul>
  376. <div class="tab_con" style="display: block; height:160px; ">
  377. <div id="divDataList">
  378. </div>
  379. </div>
  380. <div class="tab_con" style="display: none; height:160px; ">
  381. <table class="form_table">
  382. <col width="85px" />
  383. <col />
  384. <col width="85px" />
  385. <col />
  386. <col width="85px" />
  387. <col />
  388. <tbody>
  389. <tr>
  390. <th>
  391. 客户传真:
  392. </th>
  393. <td>
  394. <asp:TextBox ID="txtFax" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox><label
  395. id="Label1" for="txtName">*</label>
  396. </td>
  397. <th>
  398. 客户邮箱:
  399. </th>
  400. <td>
  401. <asp:TextBox ID="txtEmail" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  402. <label id="Label2" for="txtUserCode">*</label>
  403. </td>
  404. <th>
  405. 办公电话:
  406. </th>
  407. <td>
  408. <asp:TextBox ID="txtTelephone" runat="server" CssClass="txtInput normal"
  409. Style="width: 120px;"></asp:TextBox><label id="Label3" for="txtOkPwd">*</label>
  410. </td>
  411. </tr>
  412. <tr>
  413. <th>
  414. 客户地址:
  415. </th>
  416. <td colspan="3">
  417. <asp:TextBox ID="txtAddress" runat="server" CssClass="txtInput normal"
  418. Style="width: 300px;"></asp:TextBox>
  419. </td>
  420. <th>
  421. 邮政编码:
  422. </th>
  423. <td>
  424. <asp:TextBox ID="txtPostCode" runat="server" CssClass="txtInput normal"
  425. Style="width: 120px;"></asp:TextBox>
  426. </td>
  427. </tr>
  428. <tr>
  429. <th>
  430. 当前版本:
  431. </th>
  432. <td>
  433. <asp:TextBox ID="txtCurrentVersion" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  434. </td>
  435. <th>
  436. 开通时间:
  437. </th>
  438. <td>
  439. <asp:TextBox ID="txtSystemStartTime" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  440. </td>
  441. <th>
  442. 质保时间:
  443. </th>
  444. <td>
  445. <asp:TextBox ID="txtQualityGuaranteeEndTime" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  446. </td>
  447. </tr>
  448. <tr>
  449. <th>
  450. 系统类型:
  451. </th>
  452. <td>
  453. <asp:TextBox ID="txtSystemType" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  454. </td>
  455. <th>
  456. 客户状态:
  457. </th>
  458. <td>
  459. <asp:TextBox ID="txtCustomerStatus" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  460. <asp:HiddenField ID="hiddCustomerStatus" runat="server" />
  461. </td>
  462. <th>
  463. 设备总数:
  464. </th>
  465. <td>
  466. <asp:TextBox ID="txtDeviceCount" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  467. </td>
  468. </tr>
  469. </tbody>
  470. </table>
  471. </div>
  472. <div class="tab_con" style="display: none; height:160px; ">
  473. <table class="form_table">
  474. <col width="85px" />
  475. <col />
  476. <tbody>
  477. <tr>
  478. <th>
  479. 乘车方案:
  480. </th>
  481. <td>
  482. <textarea
  483. id="txtTrackInfo" runat="server" class="txtInput normal" style="width:330px; height:60px;" cols="20" rows="3"></textarea>
  484. </td>
  485. </tr>
  486. <tr>
  487. <th>
  488. 备注信息:
  489. </th>
  490. <td>
  491. <textarea
  492. id="txtNotes" runat="server" class="txtInput normal" style="width:330px; height:60px;" cols="20" rows="3"></textarea>
  493. </td>
  494. </tr>
  495. </tbody>
  496. </table>
  497. </div>
  498. <div class="tab_con" style="display: none; height:160px; ">
  499. <table class="form_table">
  500. <col width="85px" />
  501. <col />
  502. <col width="85px" />
  503. <col />
  504. <col width="85px" />
  505. <col />
  506. <tbody>
  507. <tr>
  508. <th>
  509. 扩展1:
  510. </th>
  511. <td>
  512. <asp:TextBox ID="txtExtend1" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox><label
  513. id="Label4" for="txtName">*</label>
  514. </td>
  515. <th>
  516. 扩展2:
  517. </th>
  518. <td>
  519. <asp:TextBox ID="txtExtend2" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  520. <label id="Label5" for="txtUserCode">*</label>
  521. </td>
  522. <th>
  523. 扩展3:
  524. </th>
  525. <td>
  526. <asp:TextBox ID="txtExtend3" runat="server" CssClass="txtInput normal"
  527. Style="width: 120px;"></asp:TextBox><label id="Label6" for="txtOkPwd">*</label>
  528. </td>
  529. </tr>
  530. <tr>
  531. <th>
  532. 扩展4:
  533. </th>
  534. <td>
  535. <asp:TextBox ID="txtExtend4" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  536. </td>
  537. <th>
  538. 扩展5:
  539. </th>
  540. <td>
  541. <asp:TextBox ID="txtExtend5" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  542. </td>
  543. <th>
  544. 扩展6:
  545. </th>
  546. <td>
  547. <asp:TextBox ID="txtExtend6" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  548. </td>
  549. </tr>
  550. <tr>
  551. <th>
  552. 扩展7:
  553. </th>
  554. <td>
  555. <asp:TextBox ID="txtExtend7" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  556. </td>
  557. <th>
  558. 扩展8:
  559. </th>
  560. <td>
  561. <asp:TextBox ID="txtExtend8" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  562. </td>
  563. <th>
  564. 扩展9:
  565. </th>
  566. <td>
  567. <asp:TextBox ID="txtExtend9" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
  568. </td>
  569. </tr>
  570. </tbody>
  571. </table>
  572. </div>
  573. <div class="foot_btn_box">
  574. <asp:Button ID="btnSubmit" runat="server" Text="保&nbsp;&nbsp;存" CssClass="btnSubmit"
  575. OnClientClick="return validate();" OnClick="btnSubmit_Click" />
  576. </div>
  577. </div>
  578. </form>
  579. </body>
  580. </html>