📄 product_config.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.doone.uurm.*, com.doone.data.*, com.doone.fj1w.common.*, com.doone.util.*"%>
<%@ page import="com.doone.fj1w.fjmgr.statana.Simpreportqry" %>
<%@ page import="com.doone.fj1w.fjmgr.rpt.*"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="/WEB-INF/curstom-tags.tld" prefix="custom" %>
<%
String sPurvICode = request.getParameter("code");
if ( sPurvICode == null || sPurvICode.length() == 0 ) {
sPurvICode = "NGB007009";
}
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=auth.getCityCode();
if(_citycode==null || _citycode.equals("")) _citycode = "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" src="../../Resource/xmlhttpclient.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="../calendar/calendar-blue2.css"/>
<script type="text/javascript" src="../calendar/calendar.js"></script>
<script type="text/javascript" src="../calendar/calendar-zh.js"></script>
<script type="text/javascript" src="../calendar/calendar-action.js"></script>
<script language="JavaScript" src="../rpt/common/rpt_fixparam.js"></script>
<script id="setHistorySrc" language="javascript" src=""></script>
<script id="getHistorySrc" language="javascript" src=""></script>
<script language="JavaScript">
function fn_onload() {
document.getElementById("ibtnEdit").Enabled = false;
setDefaultCity();
setDefaultProduct();
setDefaultConfigType();
var oForm = document.getElementById("Default");
fn_OnSubmit(oForm);
window.setTimeout("cltScript_Toolbar();",30);
}
function setDefaultCity() {
var qrSimp = document.getElementById("QueryTable");
if ( qrSimp == null) return true;
var selectsSimp = qrSimp.getElementsByTagName("SELECT");
var cityCode = "<%=_citycode%>";
for ( var i = 0; i<selectsSimp.length; i++ ) {
for ( var j =0; j<selectsSimp[i].options.length; j++ ) {
if(selectsSimp[i].name == "CITYCODE" && cityCode!="0590" && selectsSimp[i].options(j).value == cityCode){
selectsSimp[i].options(j).selected = true;
selectsSimp[i].disabled = true;
return;
}
}
}
}
function setDefaultProduct() {
var qrSimp = document.getElementById("QueryTable");
if ( qrSimp == null) return true;
var selectsSimp = qrSimp.getElementsByTagName("SELECT");
for ( var i = 0; i<selectsSimp.length; i++ ) {
for ( var j =0; j<selectsSimp[i].options.length; j++ ) {
if(selectsSimp[i].name == "PRODUCTTYPE" && selectsSimp[i].options(j).value == "-1"){
selectsSimp[i].options(j).selected = true;
return;
}
}
}
}
function setDefaultConfigType() {
var qrSimp = document.getElementById("QueryTable");
if ( qrSimp == null) return true;
var selectsSimp = qrSimp.getElementsByTagName("SELECT");
for ( var i = 0; i<selectsSimp.length; i++ ) {
for ( var j =0; j<selectsSimp[i].options.length; j++ ) {
if(selectsSimp[i].name == "CONFIGTYPE" && selectsSimp[i].options(j).value == "0"){
selectsSimp[i].options(j).selected = true;
return;
}
}
}
}
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 fn_Submit(that) {
var qrSimp = document.getElementById("QueryTable");
var qt = document.getElementById("Result");
if ( qrSimp == null || qt == null) return true;
//try {
if ( qt.caption == null ) {
qt.createCaption();
}
else {
while ( qt.caption.childNodes.length > 0 ) {
qt.caption.removeChild(qt.caption.childNodes[0]);
}
}
var inputsSimp = qrSimp.getElementsByTagName("INPUT");
var selectsSimp = qrSimp.getElementsByTagName("SELECT");
for ( var i = 0; i<inputsSimp.length; i++ ) {
if ( inputsSimp[i].value == "" || inputsSimp[i].name == "" ) continue;
var newInput = document.createElement("<INPUT NAME='" + inputsSimp[i].name + "'>");
newInput.value = inputsSimp[i].value;
qt.caption.appendChild(newInput);
}
for ( var i = 0; i<selectsSimp.length; i++ ) {
var sValue = selectsSimp[i].value;
if ( selectsSimp[i].disabled ) {
for ( var j =0; j<selectsSimp[i].options.length; j++ ) {
if ( selectsSimp[i].options(j).selected ) {
sValue=selectsSimp[i].options(j).value;
}
}
}
if ( sValue == "" || selectsSimp[i].name == "") continue;
var newInput = document.createElement("<INPUT NAME='" + selectsSimp[i].name + "'>");
newInput.value = selectsSimp[i].value;
qt.caption.appendChild(newInput);
}
qt.reload();
//}
//catch(ex){
// alert(ex.description);
//}
}
function fn_OnSubmit(that) {
fn_Submit(that);
document.getElementById("ibtnEdit").Enabled = true;
return false;
}
function fn_dblClick(){
}
function fnToolEditProduct() {
var id = "";
var qt = document.getElementById("Result");
try {
if ( qt != undefined ) {
var productIds = document.getElementsByName("PRODUCTID");
var sURL = "";
if(productIds.length > 0){
for(var i=0;i<productIds.length;i++){
if(productIds[i].checked == true){
if ( sURL == "" )
sURL += "editProduct.jsp?id=" + productIds[i].value;
else
sURL += "&id=" + productIds[i].value;
}
}
}
if(sURL != "")
windowOpen(sURL,400,300,"product")
else alert("请您选择要编辑的产品!");
}
}
catch(e){}
}
function fnToolAddProduct() {
var cityCode = document.getElementById("CITYCODE").value;
var sURL = "addProduct.jsp?cityCode="+cityCode;
windowOpen(sURL,400,300,"product")
}
function fSelectOne(obj){
document.getElementById("chkall_text").checked = false;
if(obj.checked == true){
obj.checked = false;
obj.parentElement.parentElement.style.backgroundColor = 'white';
}
else{
obj.checked = true;
obj.parentElement.parentElement.style.backgroundColor = '#C8E6E6';
}
return true;
}
function CheckAll(form){
var inputs = form.all.tags("input");
var src = event.srcElement;
for (var i=0;i<inputs.length;i++){
e = inputs[i];
if(e.type == 'checkbox' && e.name == 'PRODUCTID'){
e.checked = src.checked;
var oTr = e.parentElement.parentElement;
oTr.style.backgroundColor = e.checked ? '#C8E6E6' : 'white';
}
}
}
function onChoosed() {
try {
document.getElementById("chkall_text").checked = false;
if ( Result.selectedRow != null && Result.selectedRow.cells[0].children(0) != null
&& Result.selectedRow.cells[0].children(0).type == "checkbox" ) {
if(Result.selectedRow.cells[0].children(0).checked == true){
Result.selectedRow.cells[0].children(0).checked = false;
Result.selectedRow.style.backgroundColor = 'white';
}
else{
Result.selectedRow.cells[0].children(0).checked = true;
Result.selectedRow.style.backgroundColor = '#C8E6E6';
}
}
return true;
}
catch(exception) {
return true;
}
}
function onUnChoosed(){
}
function onContentLoad(){
}
function fnToolOrderAccept(){
}
function fnToolRecision() {
}
function loadParamAll() {
}
</script>
</head>
<body onload="fn_onload();">
<form id="Default" method="post" action="" onsubmit="return fn_OnSubmit(this);">
<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 valign="middle" align="center" width="91"
onClick="javascript:fnToolAddProduct()"
id="ibtnEdit"
style="behavior:url(../../common/button.htc)"
DefaultClass="btnDefault"
OverClass="btnOver"
DownClass="btnDown">添加产品</td>
<td valign="middle" align="center" width="91"
onClick="javascript:fnToolEditProduct()"
id="ibtnEdit"
style="behavior:url(../../common/button.htc)"
DefaultClass="btnDefault"
OverClass="btnOver"
DownClass="btnDown">编辑产品</td>
<td> </td>
</tr>
</table>
<jsp:include page="../../common/inc_top.jsp" >
<jsp:param name="purvCode" value="<%=sPurvICode%>"/>
</jsp:include>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="OuterTable">
<tr>
<td width="100%" colspan="2" class="InnerMain" align="left">
<table id="QueryTable" border="0" cellspacing="0" cellpadding="0" width="100%">
<caption style="display:none;">
</caption>
<tbody>
<!--常用简单的查询条件-->
<tr height="25">
<td width="100%" align="left">
<table id="QuerySimp" border="0" width="100%" cellspacing="0"
cellpadding="0"
style="behavior:url(../../Resource/table.htc)"
DefaultClass="DefaltRow"
SelectedClass="SelectedRow"
keyName="key"
serviceURL="<%=request.getContextPath()%>/XmlHttpService"
service="JspService"
dataService="/view/config/common/config_param.jsp?type=1"
rcService="/view/config/common/config_param.jsp?type=0"
class="InnerTable"
locked='true'>
<!--
<caption style="display:none"><input name="CITYCODE" value="<%=_citycode%>"></caption>
-->
</table>
</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="OuterFoot">
<td align="right" class="Caption_Td" style="padding-right:10px ">
<input name="submit" type="submit" class="button" value="查询">
<input name="reset" type="reset" class="button" value="重填">
</td>
</tr>
<tr height="3">
<td colspan="2"><img src="../../common/images/spacer.gif"></td>
</tr>
</table>
</div>
<div id="divMain" style="overflow: auto">
<!--service表的服务名-->
<!--dataService表的内容-->
<!--rcService表的行数-->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="OuterTable">
<tr class="OuterHead">
<td width="100%" class="title_td" align="left">
<span id="ItemTitle"><font face="webdings">8</font>产品列表</span>
<input type="checkbox" name="chkall_text" id="chkall_text" onclick="return CheckAll(this.form);"
title='选中/取消选中 本页所有产品' /><span id="ItemTitle">全选</span>
</td>
</tr>
</table>
<table id="Result" border="0" width="100%" cellspacing="0"
cellpadding="1"
style="behavior:url(../../Resource/table.htc)"
DefaultClass="DefaltRow"
keyName="key"
SelectedClass="SelectedRow"
multiple="true"
onselected="return onChoosed();"
onunselected="return onUnChoosed();"
ontableload="return onContentLoad();"
ondblclick="return fn_dblClick();"
serviceURL="<%=request.getContextPath()+"/XmlHttpService"%>"
service="ProductQueryImpl"
dataService="genHtml"
rcService="getProductListCount"
pageStyle="0"
refresh = "true"
autoLoad="false"
class="OuterTable">
<caption style="display:none;"></caption>
<tr key="-1" type="">
<td class="InnerHead" style="cursor: default;" onclick="" colspan="6">
<%
out.print("没有任何记录信息");
%>
</td>
</tr>
<tfoot>
<tr class="OuterFoot">
<td width="100%" align="left" class="foot_td">
分页:<span id="pageSet">0</span>
</td>
</tr>
</tfoot>
</table>
<table id="oldParam" cellpadding="0" cellspacing="0" border="0" width="100%" class="OuterTable">
<caption style="display:none;"></caption>
</table>
</div>
</div>
</form>
<IFRAME id="orderAccept" style="display:none;"></IFRAME>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -