<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=7; charset=utf-8"></meta>
<!-- 引入公共JSP文件 -->
<%@ include file="/WEB-INF/jsp/common/common.jsp" %>
<script type="text/javascript">
$(document).ready(function() {
var inputDialog = $("#channelInputDialog");
var resultList = $("#channelResultList");
var inputForm = $("#channelInputForm");
var searchForm = $("#channelSearchForm");
var resultPager = $("#channelResultPager");
var searchSolutionForm = $("#solutionSearchForm");
var searchAgentForm = $("#agentSearchForm");
var queryUrl = "<%=path%>/back/sales/channel/channel-listChannel.do";
var isNew = true;
//验证渠道增加加入校验 只针对页面上出现的输入域进行校验
var validator = $("#channelInputForm").validate({
rules:{
"channelVO.channelName":{required:true,minlength:1,maxlength:200},
"channelVO.groupCorpCode":{required:true,minlength:1,maxlength:32},
"channelVO.groupCorpName":{required:true,minlength:1,maxlength:200},
}
});
//为表单注册验证条件,当执行form()方法时执行校验
var searchvalid = $("#channelSearchForm").validate({
rules:{
"queryParam.channelCode":{required:false, minlength:1,maxlength:16},
"queryParam.channelName":{required:false, minlength:1,maxlength:100}
}
});
var channelFormatter = function(cellVal,options,rowObject) {
return "<a href='#' onclick='configSolution("+cellVal+")'>配置方案</a>";
};
var solutionFormatter = function(cellVal,options,rowObject) {
return "<a href='#' onclick='displaySolution("+cellVal+")'>查看方案</a>";
};
resultList.jqGrid({
url:queryUrl,
ajaxGridOptions: {type:"POST"},
datatype: "json",
prmNames: {page:"queryParam.page", rows:"queryParam.rows", sort:"queryParam.sort", order: "queryParam.order"},
colNames:['全选','渠道代码','渠道名称','操作','操作'],
colModel:[ {name:'channelId',index:'channelId', width:1, sortable:false,hidden:true},
{name:'channelCode',index:'channelCode', sortable:false,align:'center'},
{name:'channelName',index:'channelName',sortable:false,align:'center'},
{name:'channelId',index:'channelId',formatter:channelFormatter, sortable:false,align:'center'},
{name:'channelId',index:'channelId',formatter:solutionFormatter,sortable:false,align:'center'}
],
rowNum:10,
//rowList:[10,20,30],
pager: resultPager,
height: "100%",
autowidth: true,
viewrecords: true,
sortname: 'channelCode',
sortorder: "",
multiselect: true,
jsonReader: {repeatitems: false},
toolbar: [false,"top"]
});
//刷新
function reloadSearch(){
if(!searchvalid.form()){
searchvalid.focusInvalid();
return false;
}
var params = searchForm.serialize();
params = encodeURI(params); //解决jqGrid乱码
resultList.jqGrid('setGridParam',{url:queryUrl + "?" + params, page:1}).trigger("reloadGrid");
return false;
}
inputDialog.dialog({
bgiframe: true,
autoOpen: false,
//width: 1000,
width: 550,
resizable: false,
modal: true,
buttons: {
"关闭": function() {
$(this).dialog('close');
},
"保存": function(){
if(isNew) {
doSave();
}
else {
doUpdate();
}
}
}
});
// 新增,弹出输入框
function onNew() {
isNew = true;
$("#channelVO\\.groupCorpCode").removeAttr("readonly");
inputForm.clearForm();
validator.resetForm();
$.ajax({
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-prepareNewChannelInfo.do',
success : function(result) {
$("#branchCodeList").empty();
$("#channelVO\\.branchCodeList").empty();
for ( var i = 0; i < result.branchCodeList.length; i++) {
$("#branchCodeList").append("<option value='" + result.branchCodeList[i].orgCode + "'>" + result.branchCodeList[i].orgName + "</option>");
}
inputForm.deserialize(result, {
inputPrefix : 'channelVO.'
});
}
});
// set 企业团购输入DIV 为hidden
$("#groupCorpInfoDiv").hide();
inputDialog.dialog('open');
}
// 修改---弹出输入框
function onModify() {
isNew = false;
$("#channelVO\\.groupCorpCode").attr("readonly","readonly");
inputForm.clearForm();
validator.resetForm();
//回显数据
var rowNum = resultList.jqGrid('getGridParam','selarrrow');
if(rowNum.length>1){
alert("请选择唯一的一行记录");
return false;
}
var rowId = resultList.jqGrid('getGridParam', 'selrow');
var channelId = resultList.jqGrid('getCell', rowId, 'channelId');
//初始化全部的分公司
$.ajax({
//异步获取的话,已保存的数据无法展现,所以这里设置同步
async:false,
cache:false,
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-prepareNewChannelInfo.do',
success : function(result) {
$("#branchCodeList").empty();
$("#channelVO\\.branchCodeList").empty();
for ( var i = 0; i < result.branchCodeList.length; i++) {
$("#branchCodeList").append("<option value='" + result.branchCodeList[i].orgCode + "'>" + result.branchCodeList[i].orgName + "</option>");
}
}
});
if (channelId != false) {
var queryString = 'channelVO.channelId=' + channelId;
$.ajax({
//异步获取的话,已保存的数据可能无法展现,所以这里设置同步
async:false,
cache:false,
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-queryChannelById.do',
data : queryString,
success : function(result) {
//inputForm.clearForm();
inputForm.deserialize(result, {
inputPrefix : 'channelVO.'
});
//初始化已选择的分公司,同时删除分公司里相应的代码
for ( var i = 0; i < result.branchCodeList.length; i++) {
$("#channelVO\\.branchCodeList").append("<option selected='true' value='" + result.branchCodeList[i].branchCode + "'>" + result.branchCodeList[i].branchName + "</option>");
$("#branchCodeList option[value='" + result.branchCodeList[i].branchCode + "']").remove();
}
// 如果该方案为企业团购方案,set 企业团购DIV 为show,否则为Hidden
if (result.cooperationType == "02") {
$("#groupCorpInfoDiv").show();
} else {
$("#groupCorpInfoDiv").hide();
}
}
});
inputDialog.dialog('open');
} else {
alert("请选择唯一的一行记录");
return false;
}
}
//删除渠道,就要删除和渠道相关的信息(渠道--分公司,渠道方案配置信息)
function onDelete() {
var rowNum = resultList.jqGrid('getGridParam','selarrrow');
if(rowNum.length>1){
alert("不支持多条记录删除");
return false;
}
var rowId = resultList.jqGrid('getGridParam','selrow');
var channelId = resultList.jqGrid('getCell', rowId, 'channelId');
if(channelId != false) {
if(confirm("确定删除吗?")){
$.ajax({
type: "POST",
dataType: 'json',
url: ctxPath+'/back/sales/channel/channel-deleteChannel.do?configSolutionChannelId='+channelId,
success: function(result){
reloadSearch();
}
});
}
} else {
alert("请选择唯一的一行记录");
return false;
}
}
function doSave() {
if (!validator.form()) {
validator.focusInvalid();
return false;
}
var options = $("#channelVO\\.branchCodeList option");
options.attr("selected", true);
var postData = inputForm.serialize();
$.ajax({
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-createChannel.do',
data : postData,
success : function(result) {
alert(result.message);
reloadSearch();
inputDialog.dialog('close');
inputForm.clearForm();
}
});
}
function doUpdate() {
if (!validator.form()) {
validator.focusInvalid();
return false;
}
var options = $("#channelVO\\.branchCodeList option");
options.attr("selected", true);
var postData = inputForm.serialize();
$.ajax({
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-updateChannel.do',
data : postData,
success : function(result) {
alert(result.message);
reloadSearch();
inputDialog.dialog('close');
inputForm.clearForm();
}
});
}
//从左到右
$("#add").click(function(){
$("#branchCodeList option:selected").appendTo($("#channelVO\\.branchCodeList"));
});
$("#addAll").click(function(){
$("#branchCodeList option").appendTo($("#channelVO\\.branchCodeList"));
$("#channelVO\\.branchCodeList option").attr("selected",true);
});
$("#branchCodeList").dblclick(function(){
$("#branchCodeList option:selected").appendTo($("#channelVO\\.branchCodeList"));
});
//从右到左
$("#remove").click(function(){
$("#channelVO\\.branchCodeList option:selected").appendTo($("#branchCodeList"));
});
$("#removeAll").click(function(){
$("#channelVO\\.branchCodeList option").appendTo($("#branchCodeList"));
});
$("#channelVO\\.branchCodeList").dblclick(function(){
$("#channelVO\\.branchCodeList option:selected").appendTo($("#branchCodeList"));
});
// 企业员工直销 隐藏/显示
function displayGroupCorpInfo() {
if ($("#groupCorpInfoDiv").is(":visible") == false) {
if($("#channelVO\\.groupCorpCode").val()==''){
$("#channelVO\\.groupCorpCode").removeAttr("readonly");
}
$("#groupCorpInfoDiv").show();
} else {
$("#groupCorpInfoDiv").hide();
}
}
$("#queryParam\\.agentBranchCode").change(function() {
$('#queryParam\\.agentCenterBranchCode').empty();
var queryString = $("#queryParam\\.agentBranchCode option:selected").val();
$.ajax({
type : "POST",
dataType : 'json',
url : "<%=path%>/back/sales/agent/agent-queryCenterOrg.do",
data : 'agentVO.centerOrgCode=' + queryString,
success : function(result) {
var rlen = result.length;
if (rlen <= 0)
return;
for ( var i = 0; i < rlen; i++) {
$('#queryParam\\.agentCenterBranchCode').append('<option value="' + result[i].orgCode + '">' + result[i].orgName + '</option>');
}
}
});
});
$("#onSearch", searchForm).click(reloadSearch);
$('button').button();
$("#create").click(onNew);
$("#modify").click(onModify);
$("#delete").click(onDelete);
//$("#branchAdd").click(branchAdd);
//$("#branchDel").click(branchDel);
$("#channelVO\\.cooperationType").change(displayGroupCorpInfo);
$("#onSolutionSearch", searchSolutionForm).click(reloadSolutionSearch);
$("#onAgentSearch", searchAgentForm).click(reloadAgentSearch);
});
// 刷新
function reloadSolutionSearch() {
var searchSolutionForm = $("#solutionSearchForm");
var querySolutionUrl = "<%=path%>/back/sales/channel/channel-listSolution.do";
var params = searchSolutionForm.serialize();
params = encodeURI(params); //解决jqGrid乱码
$("#solutionResultList").jqGrid('setGridParam', {
url : querySolutionUrl + "?" + params,
page : 1
}).trigger("reloadGrid");
return false;
}
// 刷新
function reloadAgentSearch() {
//var channelId = $("#configSolutionChannelId").val();
var searchAgentForm = $("#agentSearchForm");
var queryAgentUrl = "<%=path%>/back/sales/channel/channel-listAgent.do";
var params = searchAgentForm.serialize();
params = encodeURI(params); //解决jqGrid乱码
var channelId = $("#configSolutionChannelId").val();
$("#agentResultList").jqGrid('setGridParam', {
url : queryAgentUrl + "?" + params + "&configSolutionChannelId=" + channelId,
page : 1
}).trigger("reloadGrid");
return false;
}
//存储查询出的待修改的渠道方案经办人关联信息,操作中不能修改
var updateArr = new Array();
//真正发生了修改的数据
var relChangeArr = new Array();
//经办人改变时触发
function updateAgent(currVal,row){
for(var i=0;i<updateArr.length;i++){
//rowNum#agentCode#policyRule#0
//分割完后是一个数组,各个值之间以逗号分割
var temp = updateArr[i].split("#");
if(temp[0]==row){//区分哪一行进行了操作,但是数据不一定真正改变,因为可以多次change
if(temp[1]!=currVal){//某一行的经办人发生了变化
//设置最新的值
temp[1] = currVal;
updateArr[i] = row+"#"+currVal+"#"+temp[2]+"#"+"1";
break;
}
}
}
}
//保单出单方式改变时触发
function updatePolicyRule(currVal,row){
for(var i=0;i<updateArr.length;i++){
//rowNum#agentCode#policyRule#0
var temp = updateArr[i].split("#");
if(temp[0]==row){//区分哪一行进行了操作,但是数据不一定真正改变,因为可以多次change
if(temp[2]!=currVal){//某一行的保单出单方式发生了变化
temp[2] = currVal;
temp[3] = "1";
//设置最新的值,上面分割的代码得到了数组,而数组的数据默认的分割格式是逗号
updateArr[i] = row+"#"+temp[1]+"#"+currVal+"#"+"1";
break;
}
}
}
}
/* 点击查看方案链接,显示渠道下方案信息dialog */
function displaySolution(channelCode) {
var resultList = $("#solutionAndAgentResultList");
//防止多次点击查看时,数据重复存储
updateArr.length=0;
//保单出单点展示.先查出行数据之后才格式化
var PIRFormatter = function(cellVal,options,rowObject) {
var temp = "";
if("1"==cellVal){
temp = "<option value='1' selected>经办人部门编码</option>"+
"<option value='2'>经办人科室编码</option>"+
"<option value='3'>经办人出单点编码</option>";
}else if("2"==cellVal){
temp = "<option value='1'>经办人部门编码</option>"+
"<option value='2' selected>经办人科室编码</option>"+
"<option value='3'>经办人出单点编码</option>";
}else if("3"==cellVal){
temp = "<option value='1'>经办人部门编码</option>"+
"<option value='2'>经办人科室编码</option>"+
"<option value='3' selected>经办人出单点编码</option>";
}else{
temp = "<option value=''>请选择</option>"+
"<option value='1'>经办人部门编码</option>"+
"<option value='2'>经办人科室编码</option>"+
"<option value='3'>经办人出单点编码</option>";
}
return "<select id='' onchange='updatePolicyRule(this.value,"+rowObject.rowNum+")'>"+temp+"</select>";
};
var agentFormat = function(cellVal,options,rowObject) {
//动态初始化页面查询出得方案渠道配置信息,刚开始是全部的信息。拼接的最后的0是表示未更新,即不会提交到数据库
//真正发生更新后最后的0会变成1
updateArr[updateArr.length] = rowObject.rowNum+"#"+rowObject.agentCode+"#"+rowObject.policyIssueRule+"#"+"0";
//当前记录经办人列的信息
var curr = rowObject.agentCode;
//cellVal数据格式形如:(8989:经办人1@9899:经办人2)
//所有经办人的拼接信息
var agents = cellVal.split("@");
var opts = "";
for(var i=0;i<agents.length;i++){
var text = agents[i];
var val = agents[i].split(":")[0];
if(val==curr){
//当前记录的经办人信息被选中
opts = opts+"<option selected value='"+val+"'>"+text+"</option>";
}else{
opts = opts+"<option value='"+val+"'>"+text+"</option>";
}
}
return "<select id='' onchange='updateAgent(this.value,"+rowObject.rowNum+")'>"+opts+"</select>";
};
var queryUrl = "<%=path%>/back/sales/channel/channel-getSolutionInfo.do?displaySolutionChannelId="+channelCode;
resultList.jqGrid('setGridParam',{url:queryUrl, page:1}).trigger("reloadGrid");
resultList.jqGrid({
url:queryUrl,
ajaxGridOptions: {type:"POST"},
datatype: "json",
prmNames: {page:"queryParam.page", rows:"queryParam.rows", sort:"queryParam.sort", order: "queryParam.order"},
colNames:['','方案名称','分公司','中支公司','','','','经办人编号与名称','保单出单方式','团购企业代码','团购企业名称','车险增值方案'],
colModel:[
{name:'rowNum',index:'rowNum', sortable:false,align:'center',hidden:true},
{name:'solutionName',index:'solutionName', sortable:false,align:'center'},
{name:'branchName',index:'branchName', sortable:false,align:'center'},
//{name:'centerOrgName',index:'centerOrgName',editable:true,edittype:'select',sortable:false,align:'center',editoptions:{value:"br:本人;fm:父母"}},
{name:'centerOrgName',index:'centerOrgName',sortable:false,align:'center'},
{name:'branchCode',index:'branchName', sortable:false,align:'center',hidden:true},
{name:'centerOrgCode',index:'branchName', sortable:false,align:'center',hidden:true},
{name:'agentCode',index:'agentCode', sortable:false,align:'center',hidden:true},
{name:'agentName',index:'agentName', sortable:false,align:'center',formatter:agentFormat},
{name:'policyIssueRule',index:'policyIssueRule', sortable:false,align:'center',formatter:PIRFormatter},
{name:'groupCorpCode',index:'groupCorpCode', sortable:false,align:'center'},
{name:'groupCorpName',index:'groupCorpName', sortable:false,align:'center'},
{name:'groupCorpPlan',index:'groupCorpPlan', sortable:false,align:'center'}
],
rowNum:1000,
height: "100%",
autowidth: true,
onSelectRow:function(id){
//resultList.editRow(id,true);
},
//width: 1000,
viewrecords: true,
sortname: 'solutionName',
sortorder: "",
multiselect: false,
jsonReader: {repeatitems: false},
editurl:'',
toolbar: [false,"top"]
});
$("#querySolutionAndAgentDialog").dialog({
bgiframe: true,
autoOpen: false,
width: 1010,
//width: 600,
autoheight: true,
//height: 540,
resizable: false,
//autoScroll:false,
modal: true,
buttons: {
"修改": function(){
//防止页面发生多次点击查看的情况
relChangeArr.length = 0;
for(var i=0;i<updateArr.length;i++){
var temp = updateArr[i].split("#");
if("1"==temp[3]){
relChangeArr[relChangeArr.length] = temp[0]+"#"+temp[1]+"#"+temp[2];
}
}
if(relChangeArr.length==0){
alert("数据未更新,请更新后再修改!");
}else{
var updateData = "";
for(var j=0;j<relChangeArr.length;j++){
var tempData = relChangeArr[j].split("#");
if(j==0){
updateData = tempData[0]+"#"+tempData[1]+"#"+tempData[2];
}else{
updateData = updateData+"@"+tempData[0]+"#"+tempData[1]+"#"+tempData[2];
}
}
var postData = "&upd="+updateData;
$.ajax({
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-updateChanSolu.do',
data : postData,
success : function(result) {
alert(result.message);
$("#querySolutionAndAgentDialog").dialog('close');
}
});
}
},
"关闭": function(){
$(this).dialog('close');
}
}
});
$("#querySolutionAndAgentDialog").dialog('open');
}
/* 经办人显示dialog,点击保存button ,触发事件,提交channelId,solutionId list,agentCode 到action 对应方法 */
function doConfigAgent() {
var resultList = $("#agentResultList");
var rowId = resultList.jqGrid('getGridParam', 'selrow');
var agentCode = resultList.jqGrid('getCell', rowId, 'agentCode');
// alert("agentCode is "+agentCode);
if (agentCode) {
$("#selectedAgentCode").val(agentCode);
var options = $("#selectedSolutionId option");
options.attr("selected", true);
var postData = $("#solutionInputForm").serialize();
$.ajax({
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-configSolution.do',
data : postData,
success : function(result) {
alert(result.message);
// reloadSolutionAndAgentSearch(); //刷新查询方案和经办人table
$("#queryAgentDialog").dialog('close');
$("#solutionInputForm").clearForm();
}
});
} else {
alert("请至少选择一条记录");
return false;
}
}
function doConfigAgent2() {
// alert("agentCode is "+agentCode);
var options = $("#selectedSolutionId option");
options.appendTo("#selectedSolutionId2");
var options2 = $("#selectedSolutionId2 option");
options2.attr("selected", true);
// 查询所有的agent list
var select = $("#agentConfigForm").find("#selectAgent");
var centerOrg = $("#agentConfigForm").find("#centerOrgCode");
var i = 0;
$.each(select, function(index, agent) {
if (agent.value != "" && agent.value != null) {
$.each(centerOrg, function(index, centerOrgCode) {
if (index == i) {
centerOrgCode.disabled = false;
}
});
}
i = i + 1;
}
);
var postData = $("#agentConfigForm").serialize();
$.ajax({
type : "POST",
dataType : 'json',
url : ctxPath + '/back/sales/channel/channel-configSolution2.do',
data : postData,
success : function(result) {
alert(result.message);
// 清空agentConfigForm 的值
$("#agentConfigForm").empty();
$("#agentResultList2").html('');
$("#queryAgentDialog").dialog('close');
$("#agentConfigForm").clearForm();
}
});
}
/* 方案显示dialog,点击保存button触发代码,保持用户选择方案Id list,关闭方案dialog,显示query agent dialog */
function doConfigSolution() {
var resultList = $("#solutionResultList");
var rowIds = resultList.jqGrid('getGridParam', 'selarrrow');
if (rowIds.length) {
$("#selectedSolutionId").empty();
for ( var i = 0; i < rowIds.length; i++) {
var solutionId = resultList.jqGrid('getCell', rowIds[i], 'solutionId');
$("#selectedSolutionId").append("<option value='" + solutionId + "'>" + solutionId + "</option>");
}
$("#querySolutionDialog").dialog('close');
var channelId = $("#configSolutionChannelId").val();
var queryUrl2 = "<%=path%>/back/sales/channel/channel-listAgent2.do?configSolutionChannelId=" + channelId;
$("#queryAgentDialog").dialog({
bgiframe : true,
autoOpen : false,
//width : 1000,
width : 650,
//height : 540,
height : 500,
resizable : false,
modal : true,
buttons : {
"关闭": function() {
$(this).dialog('close');
},
"保存" : function() {
$("#agentSearchForm").clearForm();
// reloadAgentSearch();
doConfigAgent2();
}
}
});
$.ajax({
type: "POST",
dataType: 'json',
url: queryUrl2,
//data: postData,
success: function(result){
var html = "<form name='agentConfigForm' id='agentConfigForm'><input type='hidden' name='configSolutionChannelId2' value='"+channelId+"' /><select multiple='multiple' id='selectedSolutionId2' name='selectedSolutionId2' style='display:none' ></select>";
html = html+"<table width='60%' border='0' cellspacing='0' cellpadding='0' class='common_table'>";
for (var branch in result) {
html = html+"<tr><th style='font-weight:bold;color:red;'>"+branch+"</th></tr>";
html = html+"<tr><th style='font-weight:bold'>中支公司名称</th><th style='font-weight:bold'>该中支公司下经办人</th><th style='font-weight:bold'>保单出单方式</th></tr>";
$.each(result[branch],function(index,centerOrg) {
html = html+"<tr><th align='center'><input disabled='true' type='hidden' name='centerOrgCode' id='centerOrgCode' value='"+centerOrg.orgCode+"' />"+centerOrg.orgName+"</th>";
html = html+ "<th><select name='selectAgent' id='selectAgent'>";
$.each(centerOrg.agentList,function(index2,agent) {
// 将agent.agentCode 改为 agent.agentCode+"_"+agent.agentId
html = html + "<option value='" + agent.agentCode+"_"+agent.agentId + "' selected='true'>" + agent.agentName + "</option>";
});
html = html+ "</select></th>";
html = html+ "<th><select name='policyIssueRule' id='policyIssueRule'><option value='1' selected>经办人部门编码</option><option value='2'>经办人科室编码</option><option value='3'>经办人出单点编码</option></select></th></tr>";
}
);
}
html = html+"</table></form>";
$("#agentResultList2").html(html);
}
});
$("#queryAgentDialog").dialog("open");
} else {
alert("请至少选择一条记录");
return false;
}
}
/* 点击配置方案触发代码,显示方案选择Dialog */
function configSolution(channelId) {
var resultListSolution = $("#solutionResultList");
var resultPagerSolution = $("#solutionResultPager");
var queryUrl = "<%=path%>/back/sales/channel/channel-listSolution.do";
var solutionDiscFormatter = function(cellVal,options,rowObject) {
return "<input type='text' id='solutionDiscId' onblur='checkInfo(this)'>%</input>";
};
resultListSolution.jqGrid({
url : queryUrl,
ajaxGridOptions : {
type : "POST"
},
datatype : "json",
prmNames : {page : "queryParam.page",rows : "queryParam.rows",sort : "queryParam.sort",order : "queryParam.order"},
colNames : [ '全选', '方案名称','方案描述','方案折扣率' ],
colModel : [ {name : 'solutionId',index : 'solutionId',width : 1,sortable : false,hidden : true},
{name : 'solutionName',index :'solutionName',width:40,sortable:false,align:'center',editable:true,edittype:'type'},
{name : 'f_1',index : 'f_1',width : 40,sortable : false,align : 'center'},
{name : 'solutionDisc',index : 'solutionDisc',width:40,sortable:false,align : 'center',formatter:solutionDiscFormatter}
],
rowNum : 10,
// rowList:[10,20,30],
pager : resultPagerSolution,
height : "100%",
width: 570,
sortname : 'solutionId',
sortorder : "",
multiselect : true,
jsonReader : {repeatitems : false},
toolbar : [ false, "top" ]
});
$("#querySolutionDialog").dialog({
bgiframe : true,
autoOpen : false,
//width : 1000,
width: 600,
autoScroll:true,
autoheight: true,
resizable : false,
modal : true,
buttons : {
"关闭":function(){
$(this).dialog('close');
},
"保存" : function() {
doConfigSolution();
}
}
});
$("#solutionSearchForm").clearForm();
$("#search_solution_box").show();
$("#querySolutionDialog").dialog('open');
$("#configSolutionChannelId").val(channelId);
reloadSolutionSearch();
}
function checkInfo(thisObj){
//节点层次input--td--tr
var trObj = thisObj.parentNode.parentNode;
var solutionResult = $("#solutionResultList");
var rowIds = solutionResult.jqGrid('getGridParam', 'selarrrow');
//var rowIdArr = rowIds.toString().split(",");
var selectFlag = false;
for(var i=0;i<rowIds.length;i++){
if(rowIds[i]==trObj.id){
selectFlag = true;
}
}
if(!selectFlag){
alert("请选中当前输入所在的行!!");
thisObj.value='';
return false;
}
var currVal = thisObj.value;
if(isNaN(currVal)){
alert("请输入数字!!");
thisObj.value='';
return false;
}
if(currVal>100 || currVal<=0 ){
alert("输入的数字必须在0---100之间");
//thisObj.focus();只对IE有效
thisObj.value='';
return false;
}
currVal = $.trim(currVal);
var soluId = solutionResult.jqGrid('getCell',trObj.id, 'solutionId');
solutionResult.jqGrid('setCell',trObj.id,'solutionId',soluId+"_"+currVal);
}
</script>
</head>
<body>
<div class="main">
<!-- <div class="bd_box pad10"> -->
<form id="channelSearchForm">
<h3 class="common_nav">汉子体似乎</h3>
<div class="search_box">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="common_table">
<tr>
<th>代码:</th>
<td><input name="queryParam.channelCode" type="text" class="common_input ccb" value="" id="queryParam.channelCode" /></td>
<th>名称:</th>
<td><input name="queryParam.channelName" type="text" class="common_input ccb" value="" id="queryParam.channelName" /></td>
</tr>
<tr>
<th>业务来源:</th>
<td>
<select class="common_select" id="queryParam.businessSource" name="queryParam.businessSource">
<option value="" >请选择</option>
<option value="01" >01 移动</option>
</select>
</td>
<th>其他来源:</th>
<td>
<select class="common_select" id="queryParam.otherSource" name="queryParam.otherSource">
<option value="" >请选择</option>
<option value="01" >01 上海建行</option>
</select>
</td>
<td><a href="#" class="b_btn" id="onSearch" name="onSearch">查 询</a></td>
</tr>
</table>
</div>
</form>
<!-- 操作按钮 -->
<div class="operation_bar">
<a href="javascript:void(0)" class="btn_2" id='create'>增加</a>
<a href="javascript:void(0)" class="btn_2" id='modify'>修改</a>
<a href="javascript:void(0)" class="btn_2" id='delete'>删除</a>
</div>
<!-- 结果集显示 -->
<table id="channelResultList"></table>
<div id="channelResultPager" style="text-align:center;"></div>
<!-- 渠道管理 添加 -->
<div align="center" id="channelInputDialog" title="渠道管理">
<!-- <p class="blank25"></p> -->
<form id="channelInputForm">
<input type="hidden" name="channelVO.channelId" />
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="common_table">
<tr align="left">
<th>渠道代码:</th>
<td><input type="text" class="common_input" name="channelVO.channelCode" readonly="readonly"/></td>
</tr>
<tr align="left">
<th>渠道名称:</th>
<td><input type="text" class="common_input" name="channelVO.channelName"/></td>
</tr>
<tr align="left">
<th>业务来源: </th>
<td>
<select id="channelVO.businessSource" name="channelVO.businessSource" class="common_select">
<option value="" >请选择</option>
<option value="01" >01 移动</option>
</select>
</td>
</tr>
<tr align="left">
<th>其他来源:</th>
<td>
<select id="channelVO.otherSource" name="channelVO.otherSource" class="common_select" >
<option value="" >请选择</option>
<option value="01" >01 上海建行</option>
</select>
</td>
</tr>
<tr align="left">
<th>企业员工直销:</th>
<td><input type="checkbox" name="channelVO.cooperationType" id="channelVO.cooperationType" value="02"/></td>
</tr>
<tr align="left">
<th>区域:</th>
<td>
<select id="branchCodeList" multiple="multiple" class="common_select" style="width:110px; height:100px;"></select>
<select id="channelVO.branchCodeList" name="channelVO.branchCodeList" multiple="multiple" class="common_select" style="width:110px; height:100px;"></select>
</td>
</tr>
<tr align="left">
<th> </th>
<td>
<a href="javascript:void(0)" class="btn_2" id="add">>></a>
<a href="javascript:void(0)" class="btn_2" id="remove"><<</a>
</td>
</tr>
<tr align="left">
<th> </th>
<td>
<a href="javascript:void(0)" class="btn_2" id="addAll">>>>></a>
<a href="javascript:void(0)" class="btn_2" id="removeAll"><<<<</a>
</td>
</tr>
</table>
<!-- 企业员工团购 -->
<div id="groupCorpInfoDiv">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="common_table">
<tr align="left">
<th>团购企业代码: </th>
<td>
<input type="text" class="common_input" name="channelVO.groupCorpCode" id="channelVO.groupCorpCode"/>
</td>
</tr>
<tr align="left">
<th>团购企业名称:</th>
<td>
<input type="text" class="common_input" name="channelVO.groupCorpName"/>
</td>
</tr>
<tr align="left">
<th>企业LOGO路径: </th>
<td>
<input type="text" class="common_input" name="channelVO.entLogoPath" id="channelVO.entLogoPath"/>
</td>
</tr>
<tr align="left">
<th>页面banner路径:</th>
<td>
<input type="text" class="common_input" name="channelVO.homeBannerPath" id="channelVO.homeBannerPath"/>
</td>
</tr>
<tr align="left">
<th>增值服务页面路径: </th>
<td>
<input type="text" class="common_input" name="channelVO.addPagePath" id="channelVO.addPagePath"/>
</td>
</tr>
<tr align="left">
<th>增值服务图片路径:</th>
<td>
<input type="text" class="common_input" name="channelVO.addImgPath" id="channelVO.addImgPath"/>
</td>
</tr>
<tr align="left">
<th>销售渠道来源: </th>
<td>
<input type="text" class="common_input" name="channelVO.saleChannelSource" id="channelVO.saleChannelSource"/>
</td>
</tr>
<tr align="left">
<th>是否显示新版banner:</th>
<td>
<select style="width:100px;height:27px;border:#BFBFBF 1px solid;" id="channelVO.dispNewBanner" name="channelVO.dispNewBanner">
<option value="" selected="selected">请选择</option>
<option value="Y">是</option>
<option value="N" >否</option>
</select>
</td>
</tr>
</table>
</div>
</form>
</div>
<form id="solutionInputForm">
<input type="hidden" id="configSolutionChannelId" name="configSolutionChannelId"/>
<select multiple="multiple" id="selectedSolutionId" name="selectedSolutionId" style="display: none"></select>
<input type="hidden" id="selectedAgentCode" name="selectedAgentCode"/>
</form>
<!-- 配置方案 -->
<div align="center" id="querySolutionDialog" title="配置方案">
<div class="search_box" id="search_solution_box" style="display: none">
<form id="solutionSearchForm">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="common_table">
<tr>
<td>方案名称: </td>
<td><input name="queryParam.solutionName" type="text" class="common_input ccb" value="" id="queryParam.solutionName" /></td>
<td><button class="onSearch" id="onSolutionSearch" name="onSolutionSearch">查 询</button></td>
</tr>
</table>
</form>
</div>
<!-- 结果集显示 -->
<table id="solutionResultList"></table>
<div id="solutionResultPager" style="text-align: center;"></div>
</div>
<!-- 为方案配置经办人-->
<div align="center" id="queryAgentDialog" title="配置经办人">
<div class="search_box" id="search_agent_box" style="display: none">
<form id="agentSearchForm">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="common_table">
<tr>
<td>经办人:</td>
<td>
<input type="text" name="queryParam.agentName" id="queryParam.agentName" class="common_select"/>
</td>
<td>类别:</td>
<td>
<select name="queryParam.agentType" id="queryParam.agentType" class="common_select">
<option value="">请选择</option>
<option value="01">车险</option>
<option value="02">产险非车险</option>
<option value="03">寿险</option>
</select>
</td>
<td >区域:</td>
<td>
<select name="queryParam.agentBranchCode" id="queryParam.agentBranchCode" class="common_select"></select>
<select name="queryParam.agentCenterBranchCode" id="queryParam.agentCenterBranchCode" class="common_select"></select>
</td>
<td><a href="#" class="b_btn" id="onAgentSearch" name="onAgentSearch">查 询</a></td>
</tr>
</table>
</form>
</div>
<br />
<!-- 结果集显示 -->
<div id="agentResultList2"></div>
<table id="agentResultList"></table>
<div id="agentResultPager" style="text-align: center;"></div>
</div>
<!-- 查看方案 -->
<div align="center" id="querySolutionAndAgentDialog" title="查看方案">
<table id="solutionAndAgentResultList"></table>
</div>
<!-- </div> -->
</div>
</body>
</html>
- 浏览: 787797 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (981)
- javascript (102)
- java (212)
- JQuery (81)
- 幽默笑话 (2)
- 只言片语 (6)
- 开发小记 (283)
- Hibernate (17)
- DWR (4)
- SQL (10)
- spring-ibatis (8)
- linux (24)
- Struts1 (8)
- Struts2 (16)
- spring (42)
- Mybatis (16)
- css (18)
- servlet (8)
- jdbc (4)
- jsp (1)
- spring-jdbc (2)
- FreeMarker (2)
- MySQL (24)
- JQuery-Grid (7)
- jstl (5)
- 正则表达式 (1)
- 面试集锦 (86)
- unix (18)
- 开发工具 (23)
- ajax (5)
- webservice (4)
- log4j (3)
- oracle (15)
- extjs (14)
- 其他 (9)
- 优秀技术参考地址 (1)
- 性能 (3)
- 数据库 (25)
- 算法 (15)
- 设计模式 (10)
- Python (3)
- AIX (5)
- weblogic (1)
- shell (14)
- quartz (5)
- 图形文件FusionCharts (1)
- Websphere (4)
- 转载 (5)
- hadoop (1)
- highchart (24)
- perl (22)
- DB2 (7)
- JBoss (1)
- JQuery Easy UI (9)
- SpringMVC (5)
- ant (5)
- echart (9)
- log4J配置 (3)
- 多线程 (10)
- 系统架构 (7)
- nginx (3)
- loadrunner1 (1)
- 分布式 (1)
- Dubbo (1)
- Redis (2)
- JMS (4)
- 自动化测试 (3)
- Spring循环依赖的三种方式 (1)
- spring-boot (2)
- 高级测试 (9)
- github (2)
- sonar (1)
- docker (6)
- web前端性能优化 (1)
- spring-aop (6)
- rabbit (1)
- ELK (1)
- maven (1)
- minio (1)
最新评论
-
zengshaotao:
jstl1point0 写道很好啊,如果有带Session会话 ...
Nginx+Tomcat搭建高性能负载均衡集群 -
jstl1point0:
很好啊,如果有带Session会话的怎么搞呢
Nginx+Tomcat搭建高性能负载均衡集群
发表评论
-
input 隐藏 方法传入字符串参数
2020-04-12 14:02 632JQuery 使用 $("#input[id='' ... -
JQuery 之empty and remove
2017-12-25 18:59 435$("table tr[id^=trAddColum ... -
easyui dialog隐藏与显示
2017-12-13 18:30 1595有时候需要对查询的结果进行过滤,当然如果是前端过滤,就不要再 ... -
cookie操作 JQuery
2017-03-23 22:18 519首先包含jQuery的库文件,在后面包含 jquery.coo ... -
表单参数一并提交
2017-03-23 13:09 565对于一般的table数据,并且还带有查询条件,我们都会使用j ... -
JQuery解析XML
2017-03-19 17:26 479用JavaScript解析XML数据是常见的编程任务,Ja ... -
表格动态展示与下钻
2016-09-13 08:37 1283<%@ page language="jav ... -
JQuery tree的使用
2016-07-12 09:32 1137$(function(){ $('#cardTree') ... -
兄弟frame之间控制页面
2016-05-17 18:05 867<FRAMESET cols=" ... -
easy ui 树的常用功能
2016-05-17 14:40 650遍历tree nodes function Trav ... -
attr(),css()
2016-05-04 17:54 421JQuery的attr()方法,设置属性,不同于css(), ... -
$.browser.msie为空
2016-03-03 17:34 487'$.browser.msie' 为空或不是对象,这个是j ... -
jOrgChart 后端取数--递归构建map
2016-03-03 11:41 774<!DOCTYPE html> <htm ... -
jOrgChart 后端取数--手工构建map
2016-03-03 11:39 654<!DOCTYPE html> <htm ... -
jOrgChart横向的组织机构树--手工构造json数据
2016-03-02 17:41 1263<!DOCTYPE html> <htm ... -
jOrgChart的调试模式
2016-03-02 14:41 1146jOrgChart是一个不错的横向组织树插件,在视觉体验上也 ... -
jOrgChart横向的组织机构数插件
2016-03-02 12:03 919<!DOCTYPE html> <htm ... -
easy ui data grid
2016-02-22 16:40 980JQuery Easy Ui dataGrid 数据表格 ... -
JQuery easy ui 图标扩展
2015-12-23 15:44 980JQuery easy ui 1.2.6有很多的图标, ... -
获取页面高度
2015-12-15 10:26 456$(document).height() //是获取整个页 ...
相关推荐
**jqGrid jQuery 表格插件** jqGrid是一款基于jQuery的开源数据网格插件,它为Web应用程序提供了强大的数据展示和管理能力。这个插件深受开发者喜爱,因为它提供了丰富的功能和自定义选项,使得在网页上创建交互式...
**jQuery网格插件jqGrid详解** jqGrid是一个强大的基于jQuery的开源插件,专门用于在Web页面上展示和操作网格数据。它提供了丰富的功能,包括数据分页、排序、搜索、编辑、添加、删除和导出,使得在网页中创建交互...
jqgrid jquey 样式 让表格变得更漂亮
《jqGrid与jQuery UI Theme深度解析》 jqGrid与jQuery UI Theme是两个在Web开发中广泛应用的工具,它们为创建动态、交互式的数据网格和美观的用户界面提供了强大的支持。jqGrid是一个基于JavaScript的开源网格插件...
《jQuery.jqGrid详解——打造高效数据管理界面》 jQuery.jqGrid是一款强大的JavaScript插件,主要用于构建数据密集型Web应用程序,特别是在展示和操作大量结构化数据时。它以其丰富的功能集、高度可定制性和易用性...
jqGrid是一款基于jQuery的表格插件,用于展示和操作数据,提供丰富的功能,如分页、排序、筛选、编辑等。在上述代码中,我们看到了一个使用jqGrid创建的本地数据表格实例。以下是对该代码的详细解释: 1. **初始化...
jqgrid-jquery-rails 由Doc Walker认可提供为Rails 3.1+资产管道打包的jqGrid jQuery插件。安装将这些行添加到应用程序的Gemfile : # jqgrid jquery plugin packaged for the rails asset pipelinegem 'jqgrid-...
jqGrid是一款基于jQuery的开源数据网格插件,用于在网页上展示和操作表格数据,它提供了丰富的功能,如数据分页、排序、过滤、编辑、添加、删除等,且具有高度自定义性。这个"jqGrid(jqueryGrid表格操作demo)"是一...
**jQuery.jqGrid-4.5.4**是一款基于JavaScript的开源库,是JQuery框架下的一个强大表格插件。这个版本(4.5.4)提供了丰富的功能,旨在帮助开发者构建交互性强、数据处理能力强的网格视图。在本文中,我们将深入探讨...
《基于jqgrid、jQuery和servlet的智能交通后台系统详解》 在当今信息化社会,智能交通系统的建设已经成为提升城市交通管理效率、优化交通环境的重要手段。本系统利用jqgrid、jQuery和servlet技术,构建了一个功能...
| jquery jqGrid min js | jquery jqGrid src js | jquery 1 9 0 min js plugins | grid addons js | grid postext js | grid setcolumns js | jquery contextmenu js | jquery searchFilter js | jquery tablednd ...
《jQuery.jqGrid 4.3.1与jQuery UI 1.8.17的深度解析》 在Web开发领域,jQuery是一个广泛使用的JavaScript库,它简化了HTML文档遍历、事件处理、动画以及Ajax交互。jQuery.jqGrid是基于jQuery的开源数据网格插件,...
《jQuery.jqGrid-4.4.3:Web页面列表分页显示的高效解决方案》 在Web开发领域,数据展示是不可或缺的一部分,特别是在处理大量数据时,如何有效地进行分页显示,提高用户体验,成为了开发者关注的重点。jQuery....
**jQuery表格插件jqGrid详解** jqGrid是一款强大的基于JavaScript的开源网格控件,它能够为Web应用程序提供灵活、功能丰富的数据展示和操作界面。这款插件是jQuery库的一个扩展,专为处理大量数据和实现复杂的表格...
《jQuery.jqGrid 4.4.5:构建动态数据表格的强大工具》 jQuery.jqGrid 是一个基于 jQuery 的开源网格插件,主要用于在网页上展示和操作结构化的数据,如数据库中的表格数据。版本 4.4.5 是这个强大组件的一个稳定...
jqGrid 是一个基于 jQuery 的数据网格插件,用于在网页上展示和操作大量结构化的数据。它提供了丰富的功能,包括分页、排序、搜索、编辑、添加和删除记录等,是Web开发中用于创建交互式数据表的常用工具。在最新版本...
**jQuery表格插件jqGrid 4.3.0详解** jqGrid是一款基于JavaScript的开源网格控件,它充分利用了jQuery库的强大功能,为Web开发者提供了丰富的数据展示和操作功能。jqGrid 4.3.0是该插件的一个重要版本,它在前一...
**JqGrid for ASP.NET** 是一个专门为ASP.NET平台设计的数据网格组件,它结合了jQuery库的灵活性和ASP.NET的强大功能,为Web应用程序提供了一种高效、可定制的数据展示和管理解决方案。JqGrid允许开发者在网页上创建...
《jQuery.jqGrid 4.5.2:构建高效数据网格的神器》 在Web开发领域,高效的数据展示和管理是不可或缺的一部分。jQuery.jqGrid 4.5.2作为一个强大的开源JavaScript插件,为开发者提供了强大的数据网格功能,使得在...