| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582 |
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="customeredit.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.customermanage.customeredit" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>编辑客户</title>
- <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script type="text/javascript" src="../scripts/jquery/jquery.form.js"></script>
- <script type="text/javascript" src="../scripts/jquery/jquery.validate.min.js"></script>
- <script type="text/javascript" src="../scripts/jquery/messages_cn.js"></script>
- <script type="text/javascript" src="../scripts/function.js"></script>
- <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="../scripts/ui/json2.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
- <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
- <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
- <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/plugins/ligerTextBox.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
- <link href="../images/style.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
- var treelist = null;
- $(function () {
- treelist = $("#drpServiceDept").ligerComboBox({
- width: 130,
- selectBoxWidth: 200,
- selectBoxHeight: 150, valueField: 'id', resize: false, treeLeafOnly: false,
- tree: {
- url: 'ajax/customeredit.ashx?action=getservicedepttreelist',
- width: 200,
- height: 150,
- checkbox: false,
- ajaxType: 'get',
- onSuccess: function (data) { SetTreeValue(); }
- },
- onSelected: function (newvalue) {
- $("#hiddSeriveDeptId").val(newvalue);
- }
- });
- $("#drpProvince").ligerComboBox({
- url: 'ajax/customeredit.ashx?action=getregionlist',
- valueField: '_f_regionid',
- textField: '_f_regionname',
- autocomplete: true,
- onSelected: function (newvalue) {
- $("#hiddProvinceId").val(newvalue);
- $("#drpCity").ligerComboBox({
- url: 'ajax/customeredit.ashx?action=getregionlist®ionpid=' + newvalue,
- autocomplete: true,
- valueField: '_f_regionid',
- textField: '_f_regionname'
- });
- }
- });
- $("#drpCity").ligerComboBox({
- data: null,
- valueField: '_f_regionid',
- textField: '_f_regionname',
- autocomplete: true,
- isMultiSelect: false,
- isShowCheckBox: false,
- onSelected: function (newvalue) {
- $("#hiddCityId").val(newvalue);
- }
- });
- BindData("drpProductLine", "hiddProductLineId", "CPXL");
- BindData("drpCustomerNature", "hiddCustomerNatureId", "KHSX");
- BindData("drpCustomerClass", "hiddCustomerClassId", "KHDJ");
- BindData("drpCustomerIndustry", "hiddCustomerIndustryId", "SSHY");
- BindData("drpRelationShipClass", "hiddRelationShipClassId", "GXDJ");
- //BindData("txtCustomerStatus", "hiddCustomerStatus", "KHZT");
- $("#drpAfterSaleName").ligerComboBox({
- url: 'ajax/customeredit.ashx?action=getaftersalelist',
- valueField: '_f_userid',
- textField: '_f_username',
- autocomplete: true,
- onSelected: function (newvalue) {
- $("#hiddAfterSaleNameID").val(newvalue);
- }
- });
- $("#txtSystemStartTime").ligerDateEditor();
- $("#txtQualityGuaranteeEndTime").ligerDateEditor();
- LoadList();
- });
- function toDay() {
- var d = new Date();
- var str = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
- return str;
- }
- function BindData(objid, hiddid, param) {
- $("#" + objid).ligerComboBox({
- url: 'ajax/customeredit.ashx?action=getdictionarylist¶m=' + param,
- valueField: '_f_dictionaryvalueid',
- textField: '_f_name',
- autocomplete: true,
- onSelected: function (newvalue) {
- $("#" + hiddid).val(newvalue);
- }
- });
- }
- function SetTreeValue() {
- try {
- treelist.setValue(document.getElementById("hidSeriveDeptParentId").value);
- if (document.getElementById("hidSeriveDeptParentId").value == "" || document.getElementById("hidSeriveDeptParentId").value == "0") {
- treelist.setText("顶级分类");
- }
- }
- catch (e) {
- }
- }
- var gridlist;
- var singleClick;
- function LoadList() {
- try {
- gridlist = $("#divDataList").ligerGrid({
- checkbox: false,
- height: '160',
- columns: [
- { display: 'Id', name: '_f_manid', hide: '_f_manid',width: '3%'},
- { display: '联系人', name: '_f_name', width: '10%' },
- { display: '性别', name: '_f_sex', width: '7%' },
- { display: '职务', name: '_f_duty',width:'10%' },
- { display: '手机', name: '_f_mobile', width: '10%' },
- { display: '联系电话', name: '_f_telephone', width: '10%' },
- { display: '邮箱', name: '_f_email', width: '10%' },
- { display: 'QQ', name: '_f_qq', width: '10%'},
- { display: '传真', name: '_f_fax', width: '10%'},
- { display: '备注', name: '_f_remark', width: '20%'}
- ],
- toolbar: {
- items: [
- { text: '增加', click: itemclick, icon: 'add' },
- { line: true },
- { text: '修改', click: itemclick, icon: 'modify' },
- { line: true },
- { text: '删除', click: itemclick, icon: 'delete' }
- ]
- },
- url: 'ajax/person.ashx?action=getpersonlist&cId=' + $("#hiddCustomerId").val(), pageSize: 2, rownumbers: true,
- onSelectRow: function (data, rowindex, rowobj) {
- singleClick = data._f_manid;
- },
- onDblClickRow: function (data, rowindex, rowobj) {
- var vheight = $("#form1").height();
- var vwidth = $("#form1").width() * 0.9;
- if (vwidth > 800) { vwidth = 800; }
- if (singleClick == "" || singleClick == undefined) {
- alert("请选择修改行!");
- } else {
- $.ligerDialog.open({
- url: 'personmodify.aspx?actionFlag=modify&personId=' + singleClick,
- title: '修改联系人信息', height: vheight, width: vwidth, isResize: true
- });
- }
- }
- });
- }
- catch (e) {
- alert(e.Message);
- }
- gridlist.changePage('first');
- }
- function LoadedFun(e) {
- tabs('#contentTab', 1);
- }
- function itemclick(item) {
- var vheight = $("#form1").height();
- var vwidth = $("#form1").width() * 0.9;
- if (vwidth > 800) { vwidth = 800; }
- if (item.icon == "add") {
- $.ligerDialog.open({
- url: 'personmodify.aspx?actionFlag=add&cid=' + document.getElementById("hiddCustomerId").value,
- title: '添加客户联系人信息', height: vheight, width: vwidth, isResize: true
- });
- }
- if (item.icon == "modify") {
- if (singleClick == "" || singleClick == undefined) {
- alert("请选择修改行!");
- } else {
- $.ligerDialog.open({
- url: 'personmodify.aspx?actionFlag=modify&personId=' + singleClick,
- title: '修改客户联系人信息', height: vheight, width: vwidth, isResize: true
- });
- }
- }
- if (item.icon == "delete") {
- try {
- //获取选择的行
- var rows = gridlist.getSelectedRows();
- if (rows.length > 0) {
- $.ligerDialog.confirm('确定要批量删除选择的记录吗?', function (yes) {
- if (yes) {
- try {
- var arr = new Array();
- var i = 0;
- for (var i = 0; i < rows.length; i++) {
- arr[i] = rows[i]._f_manid;
- }
- $.post("ajax/person.ashx?action=delete&arrid=" + arr.toString(), function (data) {
- if (data == "success") {
- $.ligerDialog.success('删除成功');
- LoadList();
- }
- else {
- $.ligerDialog.error('删除失败');
- }
- });
- }
- catch (e) {
- alert(e.Message);
- }
- }
- else {
- }
- });
- }
- else {
- $.ligerDialog.error('没有选择要删除的联系人');
- }
- }
- catch (e) {
- $.ligerDialog.error(e.Message);
- }
- }
- }
- function CloseThis() {
- var dialog = frameElement.dialog;
- parent.InitList();
- dialog.close();
- }
- function SaveInfo(res) {
- switch (res) {
- case 'success':
- $.ligerDialog.success('保存成功', function (yes) { CloseThis(); });
- break;
- case 'warn':
- $.ligerDialog.error('保存失败,请确认数据正确性');
- break;
- case 'error':
- $.ligerDialog.error('系统错误,请联系开发商');
- break;
- default:
- break;
- }
- }
- function validate() {
- lblCustomerName.innerHTML = "*";
- lblCustomerName.style.color = "#717171";
- lblCustomerCode.innerHTML = "*";
- lblCustomerCode.style.color = "#717171";
- if (document.getElementById("txtCustomerName").value == "") {
- lblCustomerName.innerHTML = "请填写客户名";
- lblCustomerName.style.color = "red";
- return false;
- }
- else if (document.getElementById("txtCustomerCode").value == "") {
- lblCustomerCode.innerHTML = "请填写客户编号";
- lblCustomerCode.style.color = "red";
- return false;
- }
- return true;
- }
- </script>
- </head>
- <body class="mainbody" scroll="no" style="margin-top: 0px;">
- <form id="form1" runat="server">
- <div id="contentTab">
- <table class="form_table">
- <col width="85px" />
- <col />
- <col width="85px" />
- <col />
- <col width="85px" />
- <col />
- <tbody>
- <tr>
- <th>
- 客户名称:
- </th>
- <td colspan="3">
- <asp:HiddenField ID="hiddCustomerId" runat="server" />
- <asp:TextBox ID="txtCustomerName" runat="server" CssClass="txtInput normal" Style="width: 300px;"></asp:TextBox><label
- id="lblCustomerName" for="txtCustomerName">*</label>
- </td>
- <th>
- 客户编号:
- </th>
- <td>
- <asp:TextBox ID="txtCustomerCode" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- <label id="lblCustomerCode" for="txtCustomerCode">*</label>
- </td>
- </tr>
- <tr>
- <th>
- 所属客服部:
- </th>
- <td>
- <div style="float:left"><asp:TextBox ID="drpServiceDept" runat="server"></asp:TextBox></div>
- <asp:HiddenField ID="hiddSeriveDeptId" runat="server" />
- <label id="lblServiceDept" for="drpServiceDept">*</label>
- </td>
- <th>
- 所属省份:
- </th>
- <td>
- <asp:HiddenField ID="hiddProvinceId" runat="server" />
- <div style="float:left"><asp:TextBox ID="drpProvince" runat="server"></asp:TextBox></div>
- <label id="lblProvince" for="drpProvince">*</label>
- </td>
- <th>
- 所属市县:
- </th>
- <td>
- <asp:HiddenField ID="hiddCityId" runat="server" />
- <asp:TextBox ID="drpCity" runat="server"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <th>
- 产品系列:
- </th>
- <td>
- <asp:HiddenField ID="hiddProductLineId" runat="server" />
- <asp:TextBox ID="drpProductLine" runat="server"></asp:TextBox>
- </td>
- <th>
- 客户属性:
- </th>
- <td>
- <asp:HiddenField ID="hiddCustomerNatureId" runat="server" />
- <asp:TextBox ID="drpCustomerNature" runat="server"></asp:TextBox>
- </td>
- <th>
- 客户等级:
- </th>
- <td>
- <asp:HiddenField ID="hiddCustomerClassId" runat="server" />
- <asp:TextBox ID="drpCustomerClass" runat="server"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <th>
- 所属行业:
- </th>
- <td>
- <asp:HiddenField ID="hiddCustomerIndustryId" runat="server" />
- <asp:TextBox ID="drpCustomerIndustry" runat="server"></asp:TextBox>
- </td>
- <th>
- 关系等级:
- </th>
- <td>
- <asp:HiddenField ID="hiddRelationShipClassId" runat="server" />
- <asp:TextBox ID="drpRelationShipClass" runat="server"></asp:TextBox>
- </td>
- <th>
- 售后负责人:
- </th>
- <td>
- <asp:HiddenField ID="hiddAfterSaleNameID" runat="server" />
- <asp:TextBox ID="drpAfterSaleName" runat="server"></asp:TextBox>
- </td>
- </tr>
- </tbody>
- </table>
- <ul class="tab_nav">
- <li class="selected"><a onclick="tabs('#contentTab',0);" href="javascript:;">联系人信息</a></li>
- <li><a onclick="tabs('#contentTab',1);" href="javascript:;">基本信息</a></li>
- <li><a onclick="tabs('#contentTab',2);" href="javascript:;">备注信息</a></li>
- <li><a onclick="tabs('#contentTab',3);" href="javascript:;">扩展信息</a></li>
- </ul>
- <div class="tab_con" style="display: block; height:160px; ">
- <div id="divDataList">
- </div>
- </div>
- <div class="tab_con" style="display: none; height:160px; ">
- <table class="form_table">
- <col width="85px" />
- <col />
- <col width="85px" />
- <col />
- <col width="85px" />
- <col />
- <tbody>
- <tr>
- <th>
- 客户传真:
- </th>
- <td>
- <asp:TextBox ID="txtFax" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox><label
- id="Label1" for="txtName">*</label>
- </td>
- <th>
- 客户邮箱:
- </th>
- <td>
- <asp:TextBox ID="txtEmail" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- <label id="Label2" for="txtUserCode">*</label>
- </td>
- <th>
- 办公电话:
- </th>
- <td>
- <asp:TextBox ID="txtTelephone" runat="server" CssClass="txtInput normal"
- Style="width: 120px;"></asp:TextBox><label id="Label3" for="txtOkPwd">*</label>
- </td>
- </tr>
- <tr>
- <th>
- 客户地址:
- </th>
- <td colspan="3">
- <asp:TextBox ID="txtAddress" runat="server" CssClass="txtInput normal"
- Style="width: 300px;"></asp:TextBox>
- </td>
- <th>
- 邮政编码:
- </th>
- <td>
- <asp:TextBox ID="txtPostCode" runat="server" CssClass="txtInput normal"
- Style="width: 120px;"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <th>
- 当前版本:
- </th>
- <td>
- <asp:TextBox ID="txtCurrentVersion" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- <th>
- 开通时间:
- </th>
- <td>
- <asp:TextBox ID="txtSystemStartTime" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- <th>
- 质保时间:
- </th>
- <td>
- <asp:TextBox ID="txtQualityGuaranteeEndTime" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <th>
- 系统类型:
- </th>
- <td>
- <asp:TextBox ID="txtSystemType" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- <th>
- 客户状态:
- </th>
- <td>
- <asp:TextBox ID="txtCustomerStatus" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- <asp:HiddenField ID="hiddCustomerStatus" runat="server" />
- </td>
- <th>
- 设备总数:
- </th>
- <td>
- <asp:TextBox ID="txtDeviceCount" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="tab_con" style="display: none; height:160px; ">
- <table class="form_table">
- <col width="85px" />
- <col />
- <tbody>
- <tr>
- <th>
- 乘车方案:
- </th>
- <td>
- <textarea
- id="txtTrackInfo" runat="server" class="txtInput normal" style="width:330px; height:60px;" cols="20" rows="3"></textarea>
- </td>
- </tr>
- <tr>
- <th>
- 备注信息:
- </th>
- <td>
- <textarea
- id="txtNotes" runat="server" class="txtInput normal" style="width:330px; height:60px;" cols="20" rows="3"></textarea>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="tab_con" style="display: none; height:160px; ">
- <table class="form_table">
- <col width="85px" />
- <col />
- <col width="85px" />
- <col />
- <col width="85px" />
- <col />
- <tbody>
- <tr>
- <th>
- 扩展1:
- </th>
- <td>
- <asp:TextBox ID="txtExtend1" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox><label
- id="Label4" for="txtName">*</label>
- </td>
- <th>
- 扩展2:
- </th>
- <td>
- <asp:TextBox ID="txtExtend2" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- <label id="Label5" for="txtUserCode">*</label>
- </td>
- <th>
- 扩展3:
- </th>
- <td>
- <asp:TextBox ID="txtExtend3" runat="server" CssClass="txtInput normal"
- Style="width: 120px;"></asp:TextBox><label id="Label6" for="txtOkPwd">*</label>
- </td>
- </tr>
- <tr>
- <th>
- 扩展4:
- </th>
- <td>
- <asp:TextBox ID="txtExtend4" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- <th>
- 扩展5:
- </th>
- <td>
- <asp:TextBox ID="txtExtend5" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- <th>
- 扩展6:
- </th>
- <td>
- <asp:TextBox ID="txtExtend6" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <th>
- 扩展7:
- </th>
- <td>
- <asp:TextBox ID="txtExtend7" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- <th>
- 扩展8:
- </th>
- <td>
- <asp:TextBox ID="txtExtend8" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- <th>
- 扩展9:
- </th>
- <td>
- <asp:TextBox ID="txtExtend9" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="foot_btn_box">
- <asp:Button ID="btnSubmit" runat="server" Text="保 存" CssClass="btnSubmit"
- OnClientClick="return validate();" OnClick="btnSubmit_Click" />
- </div>
- </div>
- </form>
- </body>
- </html>
|