前台界面2

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerInformationHandUpdate.aspx.cs" Inherits="CRM.UI.CustomerInformationHandUpdate" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" type="text/css" href="/assets/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="/assets/easyui/demo/demo.css" />
<link rel="stylesheet" type="text/css" href="/assets/easyui/themes/color.css" />
<link rel="stylesheet" type="text/css" href="/assets/easyui/themes/default/easyui.css" />
<script type="text/javascript" src="/assets/easyui/jquery.min.js"></script>
<script type="text/javascript" src="/assets/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/assets/jQueryFormJs/jquery-form.js"></script>
<script type="text/javascript" src="/assets/easyui/locale/easyui-lang-zh_CN.js"></script>
<style>
.tdming {
width: 100px;
text-align: right;
}
.tdkong {
width: 150px;
}
.checkbox {
width:100px;
}
</style>

</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width:100%">
<tr>
<td class="tdming">区域:</td>
<td class="tdkong">
<input id="quyu" class="easyui-combobox" /></td>
<td class="tdming">行业:</td>
<td class="tdkong"><input id="hangye" class="easyui-combobox" /></td>
<td class="tdming"></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="tdming">客户名称:</td>
<td class="tdkong">
<input id="kehumingcheng" class="easyui-textbox" /></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="tdming">线索搜集人:</td>
<td class="tdkong">
<input id="xiansuosoujiren" class="easyui-textbox" /></td>
<td class="tdming">线索获取时间:</td>
<td class="tdkong"><div id="huoqushijian" class="easyui-datetimebox" ></div></td>
<td class="tdming"></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="tdming">渠道来源:</td>
<td class="tdkong">
<input id="qudaolaiyuan" class="easyui-textbox" /></td>
<td class="tdming">省:</td>
<td class="tdkong"><input id="sheng" class="easyui-combobox" /></td>
<td class="tdming">市</td>
<td class="tdkong"><input id="shi" class="easyui-combobox" /></td>
<td></td>
</tr>
<tr>
<td class="tdming">客户地址:</td>
<td colspan="3">
<input id="kehudizhi" class="easyui-textbox" data-options="width:400" /></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="tdming" align="top">联系人相关:</td>
<td colspan="6">
<div style="width:500px; overflow:hidden; height:120px; ">
<table id="clientContactContainer" >
</table>
</div>
</td>
</tr>
<tr>
<td class="tdming">产品名称:</td>
<td class="tdkong">
<input id="chanpinmingcheng" class="easyui-textbox" /></td>
<td class="tdming">产品属性:</td>
<td class="tdkong"><input id="chanpinshuxing" class="easyui-combobox" /></td>
<td class="tdming">物流模式:</td>
<td class="tdkong"><input id="wuliumoshi" class="easyui-combobox" /></td>
<td></td>
</tr>
</table>
<table style="width:100%;padding-left:30px;">
<tr>
<td class="checkbox"><input id="chb_pipei" type="checkbox" name="name" value="" />与我公司匹配</td>
<td class="checkbox"><input id="ch_kehu" type="checkbox" name="name" value="" />TOP客户</td>
<td class="checkbox"><input id="ch_hangye" type="checkbox" name="name" value="" />行业TOP</td>
<td class="checkbox"><input id="ch_gongsi" type="checkbox" name="name" value="" />公司TOP</td>
<td class="checkbox"><input id="ch_pianqu" type="checkbox" name="name" value="" />片区TOP</td>
<td class="checkbox"><input id="ch_sheng" type="checkbox" name="name" value="" />省级TOP</td>
<td class="checkbox"><input id="ch_mubiaokehu" type="checkbox" name="name" value="" />目标客户</td>
<td></td>
</tr>
</table>
<table style="width:100%;padding-left:30px;">
<tr>
<td style="width:380px;">
物流需求表:<input id="liulan" name="liulan" class="easyui-filebox" data-options="width:250" /></td>
<td style="text-align:left;" id="oldDemandFileContainer">
</td>
<td>
<a id="btnmoban" href="/Handler/FileDownLoadHandler.ashx?filePath=~\template\logisticsDemand.xlsx" target="content">模板下载</a>
</td>
</tr>
</table>
<div style="height:20px;"></div>
<table style="width:100%;">
<tr>

<td style="width:300px;text-align:right;"><a id="btnqueding" class="easyui-linkbutton" data-options="iconCls:‘icon-save‘">确定</a></td>
<td style="text-align:left;"><a id="quxiao" class="easyui-linkbutton" data-options="iconCls:‘icon-cancel‘">取消</a></td>
</tr>
</table>
</div>
</form>

<script>
$(function () {
//用以保存所有当前客户的联系人信息
window["clientConactPersons"] = null;

//开启遮照
parent.parent.showMask();

//初始化客户联系人 grid
initClientContactGrid();

//联系人 ajax 获取
getClientConactPersons();

//物流需求表 ajax 获取
getClientDemand();

var lock1 = $.Deferred();
var lock2 = $.Deferred();
var lock3 = $.Deferred();
var lock4 = $.Deferred();
var lock5 = $.Deferred();

$.when(lock1, lock2, lock3, lock4, lock5).done(function () {
parent.parent.hideMask();
//初始化选中项数据
initSelectData();
}).fail(function () {
parent.parent.hideMask();
alert("e");
});

//显示当前日期
formatterDate = function (date) {
var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
+ (date.getMonth() + 1);
var hor = date.getHours();
var min = date.getMinutes();
var sec = date.getSeconds();
return date.getFullYear() + ‘-‘ + month + ‘-‘ + day + " " + hor + ":" + min + ":" + sec;
};
$(‘#huoqushijian‘).datetimebox(‘setValue‘, formatterDate(new Date()));

//区域
$.ajax({
url: "/Handler/GetAreasHandler.ashx", //请求的url地址

dataType: "json", //返回格式为json
type: "post", //请求方式
success: function (req) {
//请求成功时处理
//去除遮照
var resultToParse = req["data"];
jQuery("#quyu").combobox({
valueField: ‘CrmArea_ID‘,
textField: ‘CrmArea_Name‘
}).combobox("loadData", resultToParse);
var data = $(‘#quyu‘).combobox(‘getData‘);//默认选中第一条
$("#quyu").combobox(‘select‘, data[0]["CrmArea_ID"]);
lock1.resolve();
if (checkType()["t"] == "read") {
readDisableControls();
}
},
error: function (a, b, c) {
//请求出错处理
//去除遮照
console.log(a);
lock1.reject();
}
});

//行业
$.ajax({
url: "/Handler/GetTradeTypeHandler.ashx", //请求的url地址
dataType: "json", //返回格式为json
type: "post", //请求方式
success: function (req) {
//请求成功时处理
//去除遮照
var resultToParse = req["data"];
jQuery("#hangye").combobox({
valueField: ‘CrmTrade_ID‘,
textField: ‘CrmTrade_Name‘
}).combobox("loadData", resultToParse);
var data = $(‘#hangye‘).combobox(‘getData‘);//默认选中第一条
$("#hangye").combobox(‘select‘, data[0]["CrmTrade_ID"]);
lock2.resolve();
},
error: function (a, b, c) {
//请求出错处理
//去除遮照
console.log(a);
lock2.reject();
if (checkType()["t"] == "read") {
readDisableControls();
}
}
});
//产品属性
$.ajax({
url: "/Handler/GetProductTypeHandler.ashx", //请求的url地址
dataType: "json", //返回格式为json
type: "post", //请求方式
success: function (req) {
//请求成功时处理
//去除遮照
var resultToParse = req["data"];
jQuery("#chanpinshuxing").combobox({
valueField: ‘CrmProductType_ID‘,
textField: ‘CrmProductType_Name‘
}).combobox("loadData", resultToParse);

var data = $(‘#chanpinshuxing‘).combobox(‘getData‘);//默认选中第一条
$("#chanpinshuxing").combobox(‘select‘, data[0]["CrmProductType_ID"]);
lock3.resolve();
if (checkType()["t"] == "read") {
readDisableControls();
}
},
error: function (a, b, c) {
//请求出错处理
//去除遮照
console.log(a);
lock3.reject();
}
});
//物流模式
$.ajax({
url: "/Handler/GetLogisticsModelHandler.ashx", //请求的url地址
dataType: "json", //返回格式为json
type: "post", //请求方式
success: function (req) {
//请求成功时处理
//去除遮照
var resultToParse = req["data"];
jQuery("#wuliumoshi").combobox({
valueField: ‘CrmLogisticsModel_ID‘,
textField: ‘CrmLogisticsModel_Name‘
}).combobox("loadData", resultToParse);

var data = $(‘#wuliumoshi‘).combobox(‘getData‘);//默认选中第一条
$("#wuliumoshi").combobox(‘select‘, data[0]["CrmLogisticsModel_ID"]);
lock4.resolve();
if (checkType()["t"] == "read") {
readDisableControls();
}
},
error: function (a, b, c) {
//请求出错处理
//去除遮照
console.log(a);
lock4.reject();
}
});

//获取省
$.ajax({
url: "/Handler/GetAddressHandler.ashx", //请求的url地址
dataType: "json", //返回格式为json
type: "post", //请求方式
success: function (req) {
//请求成功时处理
//去除遮照
var resultToParse = req["data"]["province"];
jQuery("#sheng").combobox({
valueField: ‘CityCode‘,
textField: ‘CityName‘
}).combobox("loadData", resultToParse);
var data = $(‘#sheng‘).combobox(‘getData‘);//默认选中第一条
//绑定级联事件(省市)
$("#sheng").combobox({
"onSelect": function (record) {
var provinceCode = record["CityCode"];
//级联调整市级菜单
shijiTrigger(req["data"]["city"], provinceCode);
window["allCities"] = req["data"]["city"];
}
});
$("#sheng").combobox(‘select‘, data[0]["CityCode"]);
//初始化市
initCityCombox(req);
lock5.resolve();
if (checkType()["t"] == "read") {
readDisableControls();
}
},
error: function (a, b, c) {
//请求出错处理
//去除遮照
console.log(a);
lock5.reject();
}
});
addbtntrigger();//取消
btnCancel();//确定
if (checkType()["t"] == "read") {
readDisableControls();
}
});

</script>
<!-- 初始化市combox -->
<script>
function initCityCombox(provinceAndCityData) {

//请求成功时处理
//去除遮照
var resultToParse = provinceAndCityData["data"]["city"];

//看懂就行 start
var jsonData = [];
var cityArray = resultToParse[0];
for (var key in cityArray) {
for (var key2 in cityArray[key][0]) {
var tempJsonItme = { "CityCode": key2, "CityName": cityArray[key][0][key2] };
jsonData.push(tempJsonItme);
}
}
//看懂就行 end

jQuery("#shi").combobox({
valueField: ‘CityCode‘,
textField: ‘CityName‘
}).combobox("loadData", jsonData).combobox(‘select‘, jsonData[0]["CityCode"]);

}
</script>

<!-- 级联调整市级菜单 -->
<script>
function shijiTrigger(resultToParse, provinceCode) {
for (var i = 0; i < resultToParse.length; i++) {
for (var Pkey in resultToParse[i]) {
if (Pkey == provinceCode) {
var cityArray = resultToParse[i][Pkey];
var jsonData = [];
for (var key in cityArray) {
for (var key2 in cityArray[key]) {
var tempJsonItme = { "CityCode": key2, "CityName": cityArray[key][key2] };
jsonData.push(tempJsonItme);
}
}
jQuery("#shi").combobox({
valueField: ‘CityCode‘,
textField: ‘CityName‘
}).combobox("loadData", jsonData).combobox(‘select‘, jsonData[0]["CityCode"]);
}
}
}

}
</script>
<!--绑定搜索‘确定‘和‘取消’按钮事件-->
<script>
function addbtntrigger() {
//绑定搜索按钮事件
jQuery("#btnqueding").click(function () {
if (checkType()["t"] != "read") {
//获取前端联系人信息
var allClientContactsArray = getNewClientContacts();
//获取其他信息
var customInformation = getCustomInformation();
updateClientInformation(customInformation, allClientContactsArray);
}
});
}
function btnCancel() {
jQuery("#quxiao").click(function () {
if (checkType()["t"] != "read") {
parent.closeDialog();
}
});
}
</script>

<!-- 获取客户录入数据 -->
<script>
function getCustomInformation() {
var result = {};
result["CrmArea_ID"] = $("#quyu").combobox(‘getValue‘);
result["CrmTrade_ID"] = $("#hangye").combobox(‘getValue‘);
result["CrmClient_Name"] = $("#kehumingcheng").val();
result["CrmClient_SearchName"] = $("#xiansuosoujiren").val();
result["CrmClient_CluesTime"] = $("#huoqushijian").datetimebox(‘getValue‘);
result["CrmClient_Trench"] = $("#qudaolaiyuan").val();
result["CrmClient_ProvinceID"] = $("#sheng").combobox(‘getValue‘);
result["CrmClient_CityID"] = $("#shi").combobox(‘getValue‘);
result["CrmClient_Address"] = $("#kehudizhi").val();
result["CrmClient_ProductName"] = $("#chanpinmingcheng").val();
result["CrmClient_ProductAttributesID"] = $("#chanpinshuxing").combobox(‘getValue‘);
result["CrmClient_LogisticsModeID"] = $("#wuliumoshi").combobox(‘getValue‘);
result["CrmClient_IsMatched"] = $("#chb_pipei").get(0).checked == true ? 1 : -1;
result["CrmClient_IsTradeTop"] = $("#ch_hangye").get(0).checked == true ? 1 : -1;
result["CrmClient_IsCompanyTop"] = $("#ch_gongsi").get(0).checked == true ? 1 : -1;
result["CrmClient_IsAreaTop"] = $("#ch_pianqu").get(0).checked == true ? 1 : -1;
result["CrmClient_IsProvinceTop"] = $("#ch_sheng").get(0).checked == true ? 1 : -1;
result["CrmClient_IsTargetCustomer"] = $("#ch_mubiaokehu").get(0).checked == true ? 1 : -1;
return result;
}
</script>

<!-- 初始化已选择数据 -->
<script>
function initSelectData()
{
if (parent["clientData"] != null) {
var oldData = parent["clientData"];
var CrmClient_ID = oldData["CrmClient_ID"];

//绑定数据
jQuery("#quyu").combobox("setValue", oldData["CrmClient_AreaID"]);
jQuery("#hangye").combobox("setValue", oldData["CrmTrade_ID"]);
jQuery("#sheng").combobox("setValue", oldData["CrmClient_ProvinceID"]);
shijiTrigger(window["allCities"], oldData["CrmClient_ProvinceID"]);
jQuery("#shi").combobox("setValue", oldData["CrmClient_CityID"]);
jQuery("#chanpinshuxing").combobox("setValue", oldData["CrmClient_ProductAttributesID"]);
jQuery("#wuliumoshi").combobox("setValue", oldData["CrmClient_LogisticsModeID"]);

jQuery("#kehumingcheng").textbox("setValue", oldData["CrmClient_Name"]);
jQuery("#xiansuosoujiren").textbox("setValue", oldData["CrmClient_SearchName"]);
jQuery("#qudaolaiyuan").textbox("setValue", oldData["CrmClient_Trench"]);
jQuery("#kehudizhi").textbox("setValue", oldData["CrmClient_Address"]);
jQuery("#chanpinmingcheng").textbox("setValue", oldData["CrmClient_ProductName"]);

//复选框
$("#chb_pipei").get(0).checked = oldData["CrmClient_IsMatched"];
$("#ch_hangye").get(0).checked = oldData["CrmClient_IsTradeTop"];
$("#ch_gongsi").get(0).checked = oldData["CrmClient_IsCompanyTop"];
$("#ch_pianqu").get(0).checked = oldData["CrmClient_IsAreaTop"];
$("#ch_sheng").get(0).checked = oldData["CrmClient_IsProvinceTop"];
$("#ch_mubiaokehu").get(0).checked = oldData["CrmClient_IsTargetCustomer"];

//联系人,动态多行
if (window["clientConactPersons"] != null)
{
var clientContactArray = window["clientConactPersons"];
//填充 datagrid
var json = { "total": clientContactArray.length, "rows": clientContactArray };
$("#clientContactContainer").datagrid("loadData", json);
}

//时间控件
formatterDate = function (date) {
var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
+ (date.getMonth() + 1);
var hor = date.getHours();
var min = date.getMinutes();
var sec = date.getSeconds();
return date.getFullYear() + ‘-‘ + month + ‘-‘ + day + " " + hor + ":" + min + ":" + sec;
};
$(‘#huoqushijian‘).datetimebox(‘setValue‘, formatterDate(new Date(oldData["CrmClient_CluesTime"])));

//附件显示图标,可下载
if (window["clientDemandFilePath"] != null)
{
for(var i=0;i<window["clientDemandFilePath"].length;i++)
{
jQuery("#oldDemandFileContainer").append("<a href=‘/Handler/FileDownLoadHandler.ashx?filePath=" + encodeURIComponent(window["clientDemandFilePath"][i]["CrmDemand_FilePath"]) + "‘><img src=‘/Images/file_1.jpg‘ title=‘" + window["clientDemandFilePath"][i]["CrmDemand_CreaterName"] + "@" + window["clientDemandFilePath"][i]["CrmDemand_CreaterDate"] + "‘ /></a>");
}
}

}
else
{
alert("缺少数据");
}
}
</script>

<!-- 联系人 ajax 获取 -->
<script>
function getClientConactPersons()
{
if (parent["clientData"] != null) {
//联系人 ajax 获取,填充 window["clientConactPersons"]
//继续
//开启遮照
parent.parent.showMask();

$.ajax({
type: "post",
url: "/Handler/GetClientContacts.ashx",
dataType: "json",
data: { "CrmClient_ID": parent["clientData"]["CrmClient_ID"] },
success: function (data) {
if (data[0]["result"] == "1") {
var clientList = data[0]["data"];
window["clientConactPersons"] = clientList;
parent.parent.hideMask();
if (checkType()["t"] == "read") {
readDisableControls();
}
}
else {
parent.parent.hideMask();
}
}
});

}
}
</script>

<!-- 初始化客户联系人 DataGrid -->
<script>
function initClientContactGrid()
{
var datagrid;
var editRow = undefined;

datagrid = $("#clientContactContainer").datagrid({
iconCls: ‘icon-save‘, //图标
pagination: false, //显示分页
pageSize: 15, //页大小
pageList: [15, 30, 45, 60], //页大小下拉选项此项各value是pageSize的倍数
fit: true, //datagrid自适应宽度
fitColumn: false, //列自适应宽度
striped: true, //行背景交换
nowap: true, //列内容多时自动折至第二行
border: false,
idField: ‘ID‘, //主键
columns: [[//显示的列
{
field: ‘CrmClientConactPerson_Name‘, title: ‘联系人姓名‘, width: 100, sortable: true,
editor: { type: ‘validatebox‘, options: { required: false } }
},
{
field: ‘CrmClientConactPerson_Duty‘, title: ‘联系人职务‘, width: 100,
editor: { type: ‘validatebox‘, options: { required: false } }
},
{
field: ‘CrmClientConactPerson_PhoneNumber‘, title: ‘联系人电话‘, width: 150,
editor: { type: ‘validatebox‘, options: { required: false } }
}
]],
queryParams: { action: ‘query‘ }, //查询参数
toolbar: [{
text: ‘添加‘, iconCls: ‘icon-add‘, handler: function () {//添加列表的操作按钮添加,修改,删除等
//添加时先判断是否有开启编辑的行,如果有则把开户编辑的那行结束编辑
if (editRow != undefined) {
datagrid.datagrid("endEdit", editRow);
}
//添加时如果没有正在编辑的行,则在datagrid的第一行插入一行
if (editRow == undefined) {
datagrid.datagrid("insertRow", {
index: 0, // index start with 0
row: {

}
});
//将新插入的那一行开户编辑状态
datagrid.datagrid("beginEdit", 0);
//给当前编辑的行赋值
editRow = 0;
}

}
}, ‘-‘,
{
text: ‘删除‘, iconCls: ‘icon-remove‘, handler: function () {
$.messager.confirm("提示", "你确定要全部删除吗?", function (r) {
if (r) {
datagrid.datagrid(‘loadData‘, { total: 0, rows: [] });
editRow = null;
}
});
}
}, ‘-‘],
onAfterEdit: function (rowIndex, rowData, changes) {
//endEdit该方法触发此事件
console.info(rowData);
editRow = undefined;
},
onDblClickRow: function (rowIndex, rowData) {
//双击开启编辑行
if (editRow != undefined) {
datagrid.datagrid("endEdit", editRow);
}
if (editRow == undefined) {
datagrid.datagrid("beginEdit", rowIndex);
editRow = rowIndex;
window["clientContactEditRow"] = editRow; //定义全局变量:当前编辑的行
}
}
});

window["clientContactDataGrid"] = datagrid;//定义全局变量datagrid
}
</script>

<!-- 获取前端客户联系人信息 -->
<script>
function getNewClientContacts()
{
if (window["clientContactEditRow"] != undefined) {
window["clientContactDataGrid"].datagrid("endEdit", window["clientContactEditRow"]);
}

var result = [];

var temp = $("#clientContactContainer").datagrid("getRows");

result = temp;

return result;
}
</script>

<!-- 客户物流需求表 ajax 获取 -->
<script>
function getClientDemand()
{
if (parent["clientData"] != null) {
//物流需求表 ajax 获取,填充 window["clientDemandFilePath"]
//开启遮照
parent.parent.showMask();

$.ajax({
type: "post",
url: "/Handler/GetClientDemandFiles.ashx",
dataType: "json",
data: { "CrmClient_ID": parent["clientData"]["CrmClient_ID"] },
success: function (data) {
if (data[0]["result"] == "1") {
var demandFilePathList = data[0]["data"];
window["clientDemandFilePath"] = demandFilePathList;
parent.parent.hideMask();
}
else {
parent.parent.hideMask();
}
}
});

}
}
</script>

<!-- 保存数据 -->
<script>
function updateClientInformation(customInformation, allClientContactsArray)
{
if (allClientContactsArray.length > 0)
{
customInformation["contacts"] = allClientContactsArray;
}

customInformation["CrmClient_ID"] = parent["clientData"]["CrmClient_ID"];

//开启遮照
parent.parent.showMask();
$("#form1").ajaxSubmit({
type: "post",
url: "/Handler/UpdateClientHandler.ashx",
dataType: "json",
data: customInformation,
success: function (data) {
if (data[0]["result"] == "1") {
//提示修改成功,自动关闭dialog,刷新list
parent.parent.hideMask();

parent.closeDialog(1);
parent.getConditionAndRefreshData();
}
else if (data == -1) {
alert("请排错");
parent.parent.hideMask();
}
else {
alert("请排错");
parent.parent.hideMask();
}
}
});
}
</script>
<!--用于判断页面传值控制界面是否只读-->
<script>
function checkType() {
var aQuery = window.location.href.split("?"); //取得Get参数
var aGET = new Array();
if (aQuery.length > 1) {
var aBuf = aQuery[1].split("&");
for (var i = 0, iLoop = aBuf.length; i < iLoop; i++) {
var aTmp = aBuf[i].split("="); //分离key与Value
aGET[aTmp[0]] = aTmp[1];
}
}
return aGET;
}
//窗体禁用
function readDisableControls() {
$(document).contents().find(".easyui-textbox").each(function () {
jQuery("#" + this.id).textbox("disable", true);
});
$(document).contents().find(".easyui-databox").each(function () {
jQuery("#" + this.id).databox("disable", true);
});
$(document).contents().find(".easyui-datetimebox").each(function () {
jQuery("#" + this.id).datetimebox("disable", true);
});
$(document).contents().find(".easyui-combobox").each(function () {
jQuery("#" + this.id).combobox("readonly", true);
});
$(document).contents().find(".easyui-combo").each(function () {
jQuery("#" + this.id).combo("readonly", true);
});
$(document).contents().find(".easyui-filebox").each(function () {
jQuery("#" + this.id).filebox("disable", true);
});
$(document).contents().find(".easyui-linkbutton").each(function () {
jQuery("#" + this.id).linkbutton("disable", true);
});
$(document).contents().find(".easyui-datagrid").each(function () {
jQuery("#" + this.id).datagrid("disable", true);
});
$(document).contents().find("a").each(function () {
jQuery("#" + this.id).attr("href", "javascript:void(0)");
});
$(document).contents().find("input[type=‘checkbox‘]").each(function () {
jQuery("#" + this.id).attr("disabled", "disabled");
});
}

</script>
</body>
</html>

时间: 2024-10-29 13:14:56

前台界面2的相关文章

前台界面

<fieldset> <legend>查询</legend> <table style="width: 100%;"> <tr> <td class="tb1">区域:</td> <td class="td2"> <input id="quyu" name="quyu" class="easyui

关于easyui表格中从后台查询到的结果怎么显示到前台界面问题

首先要知道,easyui表格从后台接收的数据格式一定是json格式. 将查询出的结果以键值对的形式存入map集合中,最后将map集合转为json串在用字符流打印出来即可.前提要引入第三方架包 部分代码如下: //easyui表格从后台接收的数据格式一定是json格式 Map<String,Object> map = new HashMap<String, Object>(); map.put("rows",分页查询的结果集合); //注意这里的total是所有数

前台界面(3)--- 字符串和数组

目录 1. 字符串 1.1. 字符串中的转义序列 1.2. 字符串的不可变性 1.3. 字符串索引 1.4. 字符串分割:split 1.5. 数组连接成字符串:join 2. 数组 2.1. 数组索引 2.2. 多维数组 2.3. 数组方法 2.3.1. 数据追加到数组的尾部push() 函数 2.3.2. 移除数组最后一个元素pop() 函数 2.3.3. 移出数组第一个元素shift()函数 2.3.4. 加入到数组头部一个元素unshift()函数 2.3.5. 迭代数组:map 2.3

MVC的前台界面中冒号与等号的区别

View代码中:冒号和等号的区别:冒号后面的内容是经过Encode编码后输出内容等号后面是直接输出内容所以相对来说:后面更安全一些<%:Html.DropDownList("MyStyle)%>-----><span>111</span><%=Html.DropDownList("MyStyle)%>------->111

后台action处理数据传递给前台界面

package com.renmai.util; import java.io.IOException; import javax.servlet.http.HttpServletResponse; public class ResponseUtil { public static void writeGBK(HttpServletResponse response,String content) { response.setContentType("text/html;charset=GBK&

前台界面(1)---HTML基本定义及常见标签

已经很久没有更新博客了,从今天开始要继续走在学习的路上,话不多说,先来干货: 目录 1. HTML定义 2. H标签 3. Img标签 4. P标签 5. A标签 6. 无序列表 7. 有序列表 8. Form表单 9. Text input文本输入框 10. Button submit提交按钮 11. 单选按钮 12. 复选按钮 13. Div标签 -------------------------------------------黄金分割线-------------------------

模拟项目一(2)&amp;前台界面的理解和分析

<table id="tb" border="0" cellspacing="0" cellpadding="0" width="100%"> <ec:table items="resultList" autoIncludeParameters="${empty param.autoInc}" var="tdeSTU" actio

ASP.Net 打通服务器代码和前台界面的特殊符号

1.<% %>用来绑定后台代码 如: < % for(int i=0;i<100;i++) { Reaponse.Write(i.ToString()); } %> 2.<%# %> 是在绑定控件DataBind()方法执行时被执行,用于数据绑定 如: < %# Container.DataItem("title") %> 3.<%= %>用来绑定后台的变量或方法且有返回值 的,但此时的变量名或方法的访问修饰符为prot

用js在前台界面进行账户密码的检测,账户和密码符合要求后可进行登录

1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 <% 3 String path = request.getContextPath(); 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+requ