📄 taocan_config.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.doone.data.DataTable,
com.doone.data.DacClient,
com.doone.fj1w.fjmgr.config.*,
com.doone.data.DataRow,
java.util.Date,
com.doone.uurm.WebAuth" %>
<%request.setCharacterEncoding("gb2312");%>
<%String sPurvICode="NGB007010";%>
<%
WebAuth auth = WebAuth.getInstance(request);
if ( ! auth.IsAuthed() ) {
out.write("<script language=\"javascript\">self.parent.location.replace(\"" + request.getContextPath() + "/view/login/login.jsp" + "\");</script>");
return;
}
else if ( ! auth.CheckPurv(sPurvICode) ) {
out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
return;
}
String cityCode = request.getParameter("CITYCODE");
int pageNum = 0;
String sCity = "";
int pageNo = 1;
if(request.getParameter("pageList")==null || request.getParameter("pageList").equals("")){
pageNo = 1;
}
else{
pageNo = Integer.parseInt(request.getParameter("pageList"));
}
try{
if(auth.getCityCode()==null || auth.getCityCode().equals("")){
if(cityCode==null){
sCity = "0590" ; //默认没有CITYCODE是高级系统管理员,可以看到福建省的
}
else{
sCity = cityCode ;
}
}else{
sCity = auth.getCityCode();
}
}
catch(Exception ex){
sCity = "0590" ; //默认用0590来找,肯定找不到
}
%>
<html>
<head>
<title> 套餐配置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../../common/style/main.css" type="text/css" rel="stylesheet" />
<script language="JavaScript" src="../../common/script/ChangeStyle.js"></script>
<script language="JavaScript" src="../../common/mainTool.js"></script>
<script language="JavaScript">
function fn_onload() {
document.getElementById("ibtnEdit").Enabled = false;
cltScript_Toolbar();
}
function cltScript_Toolbar() {
if ( self.parent != self ){
var pel = parent.document.all.tags("frame");
for ( i=0; i< pel.length; i++)
{
if ( pel(i).name == "main") {
divTop.style.width = pel(i).width;
divMain.style.width = pel(i).width;
divMain.style.height = pel(i).height - divTop.clientHeight;
}
}
}
}
function fnToolEditTaoCan(cityCode) {
var id = "";
try {
if ( TaoCanList != undefined ) {
if ( parseInt(TaoCanList.selected) >= 0 ){
var taoCanId = TaoCanList.selectedCells[0];
if ( taoCanId != null && taoCanId != "" ) id = taoCanId;
}
}
}
catch(e){}
var sURL = "editTaoCan.jsp?cc=0"+cityCode+"&code="+taoCanId;//cityCode不能显示0,所以手动补0
windowOpen(sURL,560,430,"taoCan")
}
function setButtonEnabled(){
if ( TaoCanList != undefined ) {
if ( parseInt(TaoCanList.selected) >= 0 ){
if( TaoCanList.selectedCells[1]!=undefined )
document.getElementById("ibtnEdit").Enabled = true;
}
}
}
function onChoosed(){
var src = event.srcElement;
setButtonEnabled();
}
function submit() {
document.form1.submit();
}
function selectConfigType() {
document.form1.pageList.value = 1;
document.form1.submit();
}
function selectCity(){
document.form1.submit();
}
</script>
</head>
<body onload="fn_onload();">
<div onresize="cltScript_Toolbar();" style="width: 100%">
<div id="divTop" style="overflow: hidden">
<table id="ibtnPanel" style="font-size: 9pt; border-bottom: #efefef 1px outset" cellspacing="0"
cellpadding="0" width="100%" border="0">
<tr bgcolor="#efefef" height="33">
<td>
<td valign="middle" align="center" width="81" onClick="javascript:fnToolEditTaoCan(<%=sCity%>)" id="ibtnEdit" style="behavior:url(../../common/button.htc)" DefaultClass="btnDefault" OverClass="btnOver" DownClass="btnDown" title="">编辑套餐</td>
</td>
<td> </td>
</tr>
</table>
<jsp:include page="../../common/inc_top.jsp" >
<jsp:param name="purvCode" value="<%=sPurvICode%>"/>
</jsp:include>
</div>
<div id="divMain" style="overflow: auto" align="center">
<input id="txtSearchText" type="hidden" name="txtSearchText">
<table style="font-size: 9pt; border-bottom: #efefef 1px outset" cellspacing="0"
cellpadding="0" width="100%" border="1" class="OuterTable">
<tr class="OuterHead">
<td nowrap="nowrap" style="text-align:left" width="100%" colspan="6">
<form name="form1" method="post" action="">
<%
if(auth.getCityCode()==null || auth.getCityCode().equals("")){
%>
<span id="ItemTitle"><font face="webdings">8</font>
请选择城市:
</span>
<select name="CITYCODE" onChange="selectCity()">
<%
DataRow dr = null;
DataTable dt=PublicClass.getCityList(new DacClient());
if (dt != null) {
for (int i = 0; i < dt.getRows().getCount(); i++) {
dr = dt.getRow(i);
if(cityCode==null){
if(dr.getString(0).equals("0590")){
%>
<option value="<%=dr.getString(0)%>" selected="selected">
<%=dr.getString(1)%>
</option>
<%
}
else{
%>
<option value="<%=dr.getString(0)%>">
<%=dr.getString(1)%>
</option>
<%
}
}
else{
if(cityCode.equals(dr.getString(0))){
%>
<option value="<%=dr.getString(0)%>" selected="selected">
<%=dr.getString(1)%>
</option>
<%
}
else{
%>
<option value="<%=dr.getString(0)%>">
<%=dr.getString(1)%>
</option>
<%
}
}
}
}
%>
</select>
<%
}
String configType = "";
if(request.getParameter("ConfigType")==null || request.getParameter("ConfigType").equals("")){
%>
<span id="ItemTitle"><font face="webdings">8</font>
互转套餐配置类型:
</span>
<select name="ConfigType" onChange="selectConfigType()">
<option value="1">未配置互转套餐</option>
<option value="2" selected="selected">已配置互转套餐</option>
</select>
</td>
<%
}
else{
configType = request.getParameter("ConfigType");
if(configType.equals("1")){
%>
<span id="ItemTitle"><font face="webdings">8</font>
互转套餐配置类型:
</span>
<select name="ConfigType" onChange="selectConfigType()">
<option value="1" selected="selected">未配置互转套餐</option>
<option value="2">已配置互转套餐</option>
</select>
<%
}
else{
%>
<span id="ItemTitle"><font face="webdings">8</font>
互转套餐配置类型:
</span>
<select name="ConfigType" onChange="selectConfigType()">
<option value="1">未配置互转套餐</option>
<option value="2" selected="selected">已配置互转套餐</option>
</select>
<%
}
}
%>
</td>
</tr>
<tr class="OuterHead">
<td class="title_td" align="center" width="35%"><b>套餐编码</b></td>
<td class="title_td" align="center" width="65%"><b>套餐名称</b></td>
</tr>
</table>
<table id="TaoCanList" border=1 width=100% cellspacing=0 cellpadding=1 style="behavior:url(../../common/table.htc)" selectedtrcolor="#C8E6E6" keyName="SERIAL" trcolor="white" onselected="return onChoosed();" maxnum="5" pageSize="22" class="InnerTable">
<input type="hidden" name="CITYCODE" value="<%=sCity%>"/>
<%
String taoCanId = "";
String taoCanCode = "";
String taoCanName = "";
ProdfunBean pb = new ProdfunBean();
DataTable taoCanlist = null;
//套餐变更配置
//默认选择 已配置互转套餐
if(configType==null || configType.equals("") || configType.equals("2")){
taoCanlist = pb.getProdfunByProductId(new DacClient(),"2","T",sCity,pageNo,"1");
pageNum = pb.getPrudfunCount(new DacClient(),"2","T",sCity,"1");
}
else if(configType.equals("1")){//未配置互转套餐
taoCanlist = pb.getProdfunByProductId(new DacClient(),"2","T",sCity,pageNo,"0");
pageNum = pb.getPrudfunCount(new DacClient(),"2","T",sCity,"0");
}
if(taoCanlist.getRows().getCount() == 0){
if(configType ==null || configType.equals("")){
out.print("<tr class=\"InnerMain\" style=\"color: black\">"+
"<td align='center'>提示信息:对不起,该地区没有任何已配置互转套餐信息.</td></tr>");
}
else{
if(configType.equals("1")){
out.print("<tr class=\"InnerMain\" style=\"color: black\">"+
"<td align='center' colspan='3'>提示信息:对不起,该地区没有任何未配置互转套餐信息.</td></tr>");
}
else if(configType.equals("2")){
out.print("<tr class=\"InnerMain\" style=\"color: black\">"+
"<td align='center'>提示信息:对不起,该地区没有任何已配置互转套餐信息.</td></tr>");
}
}
out.print("<tr class=\"OuterHead\">");
out.print("<td align=\"right\" width=\"100%\" class=\"title_td\" colspan=\"9\" nowrap>");
out.print(" <input type=\"hidden\" name=\"pageList\" value=\"\"/></td></tr> ");
}
else{
for(int j=0;j<taoCanlist.getRows().getCount();j++) {
taoCanId = taoCanlist.getRow(j).getString("PRODFUNID");
taoCanCode = taoCanlist.getRow(j).getString("FUNCODE");
taoCanName = taoCanlist.getRow(j).getString("FUNNAME");
%>
<tr class="InnerMain" style="color: black">
<td class="body_td" align="left" width="35%" nowrap><%=taoCanCode%></td>
<td class="body_td" align="left" width="65%" nowrap><%=taoCanName%></td>
</tr>
<%
}
if(taoCanlist.getRows().getCount() > 0){
%>
<tr class="OuterHead">
<td align="right" class="class="title_td" colspan="6" nowrap>
第<select name="pageList" onChange="submit()">
<%
for(int k=1;k<=pageNum;k++){
if(k==pageNo){
%>
<option value="<%=k%>" selected="selected"><%=k%></option>
<%
}
else{
%>
<option value="<%=k%>"><%=k%></option>
<%
}
}
}
%>
</select>页
<input type="hidden" name="ConfigType" value="<%=configType%>"/>
</td>
</tr>
<%
}
%>
</form>
</table>
</div>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -