?? customer_edit.jsp
字號:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="/WEB-INF/jb-common.tld" prefix="jb"%>
<script src="validate.js" type="text/javascript"></script>
<script src="icommon.js" type="text/javascript"></script>
<html:errors />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<title>編輯客戶</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<script type="text/javascript">
function doDel(id){
if ( window.confirm("確定刪除?") ){
window.location.href = "?o=doDel&id=" + id;
}
}
</script>
</head>
<body class="main">
<html:form action="customer" method="post">
<html:hidden property="o" value="doAdd" />
<span class="page_title">編輯客戶</span>
<div class="button_bar">
<button class="common_button" onclick="javascript:help();">幫助</button>
<button class="common_button"
onclick="window.location.href='linkman.do?o=toList&id=${customerForm.item.custNo }';">聯系人</button>
<button class="common_button"
onclick="window.location.href='activity.do?o=toList&id=${customerForm.item.custNo }';">交往記錄</button>
<button class="common_button"
onclick="window.location.href='order.do?o=toList&id=${customerForm.item.custNo }';">歷史訂單</button>
<button class="common_button" onclick="javascript:history.go(-1);">返回</button>
<button class="common_button" onclick="javascript:doSubmit('doEdit');">保存</button>
</div>
<table class="query_form_table" border="0" cellPadding="3"
cellSpacing="0">
<tr>
<th>客戶編號</th>
<td><html:text property="item.custNo" readonly="true" /></td>
<th>客戶名稱</th>
<td><html:text property="item.custName" /><span class="red_star">*</span></td>
</tr>
<tr>
<th>地區</th>
<td>
<html:select property="item.custRegion">
<html:option value="">未指定</html:option>
<html:optionsCollection name="DICTS_OPTIONS_地區" label="dictItem" value="dictValue" />
</html:select><span class="red_star">*</span>
</td>
<th>客戶經理</th>
<td>
<html:select property="item.custManagerId" onchange="setLabel(this,'item.custManagerName');">
<html:option value="">未指定</html:option>
<html:optionsCollection name="USERS_OPTIONS" label="usrName" value="usrId" />
</html:select>
<html:hidden property="item.custManagerName" /><span class="red_star">*</span>
</td>
</tr>
<tr>
<th>客戶等級</th>
<td>
<html:select property="item.custLevel" onchange="setLabel(this,'item.custLevelLabel');">
<html:option value="">未指定</html:option>
<html:optionsCollection name="DICTS_OPTIONS_客戶等級" label="dictItem"
value="dictValue" />
</html:select><span class="red_star">*</span>
<html:hidden property="item.custLevelLabel" /></td>
<th>客戶狀態</th>
<td><bean:define id="status" name="customerForm" property="item.custStatus" type="java.lang.String" /><%
switch(Integer.parseInt(status.trim())){
case 1:out.print("正常");break;
case 2:out.print("流失");break;
case 3:out.print("刪除");break;
default:break;
}
%><html:hidden property="item.custStatus" />
</td>
</tr>
<tr>
<th>滿意度</th>
<td>
<html:select property="item.custSatisfy">
<html:option value="">未指定</html:option>
<html:option value="5">☆☆☆☆☆</html:option>
<html:option value="4">☆☆☆☆</html:option>
<html:option value="3">☆☆☆</html:option>
<html:option value="2">☆☆</html:option>
<html:option value="1">☆</html:option>
</html:select><span class="red_star">*</span>
</td>
<th>信用度</th>
<td>
<html:select property="item.custCredit">
<html:option value="">未指定</html:option>
<html:option value="5">☆☆☆☆☆</html:option>
<html:option value="3">☆☆☆</html:option>
<html:option value="2">☆☆</html:option>
<html:option value="1">☆</html:option>
</html:select><span class="red_star">*</span></td>
</tr>
</table>
<br />
<table class="query_form_table" border="0" cellPadding="3"
cellSpacing="0">
<tr>
<th>地址</th>
<td><html:text property="item.custAddr" /><span class="red_star">*</span></td>
<th>郵政編碼</th>
<td><html:text property="item.custZip" /><span class="red_star">*</span></td>
</tr>
<tr>
<th>電話</th>
<td><html:text property="item.custTel" /><span class="red_star">*</span></td>
<th>傳真</th>
<td><html:text property="item.custFax" /><span class="red_star">*</span></td>
</tr>
<tr>
<th>網址</th>
<td><html:text property="item.custWebsite" /><span class="red_star">*</span></td>
<th> </th>
<td> </td>
</tr>
</table>
<br />
<table class="query_form_table" border="0" cellPadding="3"
cellSpacing="0">
<tr>
<th>營業執照注冊號</th>
<td><html:text property="item.custLicenceNo" /></td>
<th>法人</th>
<td><html:text property="item.custChieftain" /><span class="red_star">*</span></td>
</tr>
<tr>
<th>注冊資金(萬元)</th>
<td><html:text property="item.custBankroll" /></td>
<th>年營業額</th>
<td><html:text property="item.custTurnover" /></td>
</tr>
<tr>
<th>開戶銀行</th>
<td><html:text property="item.custBank" /><span class="red_star">*</span></td>
<th>銀行賬號</th>
<td><html:text property="item.custBankAccount" /><span class="red_star">*</span></td>
</tr>
<tr>
<th>地稅登記號</th>
<td><html:text property="item.custLocalTaxNo" /></td>
<th>國稅登記號</th>
<td><html:text property="item.custNationalTaxNo" /></td>
</tr>
</table>
<script type="text/javascript">
function setLabel(oSrc,tTargetLabelName)
{
var oLabelCtl = document.forms[0].elements[tTargetLabelName];
oLabelCtl.value = oSrc.options[oSrc.selectedIndex].text;
}
build_validate("item.custNo","客戶編號,KHYYMMDDNNN不能為空","Limit","1","17");
build_validate("item.custName","客戶名稱不能為空","Limit","1","100");
build_validate("item.custRegion","地區不能為空","Limit","1","50");
build_validate("item.custManagerId","客戶經理不能為空","Limit","1","8");
//build_validate("item.custManagerName","客戶經理姓名不能為空","Limit","1","50");
build_validate("item.custLevel","客戶等級不能為空","Limit","1","40");
//build_validate("item.custLevelLabel","等級名稱不能為空","Limit","1","50");
build_validate("item.custSatisfy","滿意度不能為空","Limit","1","4");
build_validate("item.custCredit","信用度不能為空","Limit","1","4");
build_validate("item.custAddr","地址不能為空","Limit","1","300");
build_validate("item.custZip","郵政編碼不能為空","Limit","1","10");
build_validate("item.custTel","電話不能為空","Limit","1","50");
build_validate("item.custFax","傳真不能為空","Limit","1","50");
build_validate("item.custWebsite","網址不能為空","Limit","1","50");
//build_validate("item.custLicenceNo","營業執照注冊號不能為空","Limit","1","50");
build_validate("item.custChieftain","法人不能為空","Limit","1","50");
//build_validate("item.custBankroll","注冊資金不能為空","Limit","1","8");
//build_validate("item.custTurnover","營業額不能為空","Limit","1","8");
build_validate("item.custBank","開戶銀行不能為空","Limit","1","200");
build_validate("item.custBankAccount","銀行賬號不能為空","Limit","1","50");
//build_validate("item.custLocalTaxNo","地稅登記號不能為空","Limit","1","50");
//build_validate("item.custNationalTaxNo","國稅登記號不能為空","Limit","1","50");
//build_validate("item.custStatus","客戶狀態:1--正常;2--流失;3--刪除。不能為空","Limit","1","1");
</script>
</html:form>
</body>
</html:html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -