| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613 |
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="customermodify.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.customermanage.customermodify" %>
- <!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 src="../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
- <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',
- isExpand: false,
- 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();
- //AddHistoryList();
- InitList();
- });
- 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: '225',
- 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: 5, 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: 380, width: 650, isResize: true
- });
- }
- if (item.icon == "modify") {
- if (singleClick == "" || singleClick == undefined) {
- alert("请选择修改行!");
- } else {
- $.ligerDialog.open({
- url: 'personmodify.aspx?actionFlag=modify&personId=' + singleClick,
- title: '修改客户联系人信息', height: 380, width: 650, 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;
- }
- function AddHistoryList() {
- var iframe = document.createElement('iframe');
- iframe.id = "iframe";
- iframe.src = "historyserviceinfo.aspx?customerid=" + document.getElementById("hiddCustomerId").value;
- iframe.width = "100%";
- iframe.height = "225px";
- document.getElementById("iframdiv").appendChild(iframe);
- $("#iframe").attr("frameborder", "0");
- }
- </script>
- <script type="text/javascript">
- var gridlist;
- var count = 0;
- var counts = 0;
- var arrayObj = new Array();
- function InitList() {
- count += 1;
- counts = count;
- try {
- gridlist = $("#divHistoryDataList").ligerGrid({
- height: '225',
- columns: [
- { display: '操作', isSort: false, width: 100, render: function (rowdata, rowindex, value) {
- var h = "";
- if (!rowdata._editing) {
- h += "<a href='javascript:ShowInfo(" + rowdata._f_workorderid + ")'>详情</a> ";
- }
- return h;
- }
- },
- { display: '状态', name: '_f_name', width: 80 },
- { display: '来电类型', name: '_f_typename', width: 80 },
- { display: '制单人', name: '_f_username', width: 80 },
- { display: '新建时间', name: '_f_createdate', width: 150, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
- { display: 'Id', name: '_f_workorderid', hide: 'Id', width: 1 },
- { display: '工单记录编号', name: '_f_code', width: 140 },
- { display: '客户名称', name: '_f_customername', minWidth: 120 },
- { display: '来电人', name: '_f_repairmanname', width: 80 },
- { display: '来电人联系方式', name: '_f_repairmanphone', width: 120 },
- { display: '客户属性', name: '_f_customernature', width: 80 },
- { display: '系统类型', name: '_f_systemtype', width: 120 },
- { display: '客户归属部门', name: '_f_servicedept', width: 120 },
- { display: '质保到期时间', name: '_f_qualityguaranteeendtime', width: 150, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' }
- ],
- url: 'ajax/historyserviceinfo.ashx?action=gethistoryservicelist&cid=' + document.getElementById("hiddCustomerId").value, pageSize: 5, rownumbers: true,
- onDblClickRow: function (data, rowindex, rowobj) {
- try {
- if (count > 1) {
- count -= 1;
- return;
- } else {
- count = counts;
- ShowInfo(data._f_workorderid);
- }
- }
- catch (e) {
- alert(e.Message);
- }
- },
- onSuccess: function (data, grid) {
- if (count > 1) {
- count -= 1;
- return;
- } else {
- count = counts;
- arrayObj = [];
- for (var i = 0; i < 10; i++) {
- if (data.Rows[i] != undefined) {
- arrayObj.push(data.Rows[i]._f_workorderid);
- }
- }
- }
- }
- });
- }
- catch (e) {
- alert(e.Message);
- }
- gridlist.changePage('first');
- $("#pageloading").hide();
- }
- function NextWorkOrderId(id, dir) {
- var length = arrayObj.length;
- for (var j = 0; j < length; j++) {
- if (arrayObj[j] == id) {
- if (dir == "next") {
- if (parseInt(j + 1) < length)
- ShowInfo(arrayObj[j + 1]);
- else
- $.ligerDialog.warn('没有了');
- }
- else if (dir == "pre") {
- if (j - 1 >= 0)
- ShowInfo(arrayObj[j - 1]);
- else
- $.ligerDialog.warn('没有了');
- }
- }
- }
- }
- function ShowInfo(id) {
- OpenWindowShow('/workordermanage/workorder/workordershow.aspx?id=' + id, '查看工单详细');
- }
- function OpenWindowShow(Url, Title) {
- var Height = $("#form1").height();
- var Width = $("#form1").width() * 0.9;
- $.ligerDialog.open({ title: Title, url: Url, height: Height, width: Width, isResize: true, modal: true, isResize: true
- });
- }
- function ReLoad() {
- gridlist.reload();
- }
- </script>
- </head>
- <body class="mainbody" style="margin-top: 0px;">
- <form id="form1" runat="server">
- <div id="contentTab">
- <table class="form_table">
- <col width="95px" />
- <col />
- <col width="95px" />
- <col />
- <col width="95px" />
- <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 style="display:block;">
- <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>
- <tr style="display:none;">
- <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 style="display:none;">
- <th>
- 客户地址:
- </th>
- <td colspan="3">
- <asp:TextBox ID="txtAddress" runat="server" CssClass="txtInput normal"
- Style="width: 80%;"></asp:TextBox>
- </td>
- <th>
- 邮政编码:
- </th>
- <td>
- <asp:TextBox ID="txtPostCode" runat="server" CssClass="txtInput normal"
- Style="width: 120px;"></asp:TextBox>
- </td>
- </tr>
- <tr style="display:none;">
- <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;" onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>
- </td>
- <th>
- 质保时间:
- </th>
- <td>
- <asp:TextBox ID="txtQualityGuaranteeEndTime" runat="server" CssClass="txtInput normal" Style="width: 120px;" onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>
- </td>
- </tr>
- <tr style="display:none;">
- <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>
- <tr style="display:none;">
- <th>
- 乘车方案:
- </th>
- <td colspan="5">
- <textarea
- id="txtTrackInfo" runat="server" class="txtInput normal" style="width:80%; height:60px;" cols="20" rows="3"></textarea>
- </td>
- </tr>
- <tr style="display:block;">
- <th>
- 备注信息:
- </th>
- <td colspan="5">
- <textarea
- id="txtNotes" runat="server" class="txtInput normal" style="width:80%; height:60px;" cols="20" rows="3"></textarea>
- </td>
- </tr>
- </tbody>
- </table>
- <div id="divForm" style="display: block;" runat="server">
-
- </div>
- <ul class="tab_nav">
- <li class="selected"><a onclick="tabs('#contentTab',0);" href="javascript:;">联系人信息</a></li>
- <li onclick="ReLoad()"><a onclick="tabs('#contentTab',1);" href="javascript:;">历史服务记录</a></li>
- </ul>
- <div class="tab_con" style="display: block;">
- <div id="divDataList">
- </div>
- </div>
- <div class="tab_con" style="display: none;">
- <%--<div id="iframdiv">
- <iframe id="iframe" frameborder="0" style="width:100%;height:225px;"></iframe>
- </div>--%>
- <div id="divHistoryDataList">
- </div>
- </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>
|