119 lines
6.5 KiB
Plaintext
119 lines
6.5 KiB
Plaintext
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Mould_Form.aspx.cs" Inherits="Mould_Form" %>
|
||
|
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<title></title>
|
||
|
<script type="text/javascript"></script>
|
||
|
<link href="../Css/index.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="../Css/edit.css" rel="stylesheet" type="text/css" />
|
||
|
<script src="../Js/Calendar3.js" type="text/javascript"></script>
|
||
|
<script src="../Jquery-ui/js/jquery-1.10.2.js" type="text/javascript"></script>
|
||
|
<script src="../Jquery-ui/js/jquery-ui-1.10.4.custom.js" type="text/javascript"></script>
|
||
|
<link href="../Jquery-ui/css/pepper-grinder/jquery-ui-1.10.4.custom.css" rel="stylesheet" type="text/css" />
|
||
|
<script src="../Js/commonality.js" type="text/javascript"></script>
|
||
|
<link rel="stylesheet" href="../Css/gh-buttons.css" type="text/css"/>
|
||
|
<link rel="stylesheet" href="../Css/prettify.css"/>
|
||
|
<script src="../Js/prettify.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
var beforval="";
|
||
|
$(document).ready(function () {
|
||
|
beforval = $("#mingcheng").val();
|
||
|
});
|
||
|
//调用添加方法
|
||
|
function setbcbd() {
|
||
|
$("#<%=severbc.ClientID%>").click();
|
||
|
}
|
||
|
|
||
|
function pd() {
|
||
|
if ($("#mingcheng").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
||
|
$("#z_error").text("模具名称不能为空!");
|
||
|
return false;
|
||
|
} else if ($("#pianshu").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
||
|
$("#z_error").text("片数不能为空!");
|
||
|
return false;
|
||
|
} else if ($("#sycs").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
||
|
$("#z_error").text("使用次数不能为空!");
|
||
|
return false;
|
||
|
} else if ($("#zhongliang").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
||
|
$("#z_error").text("重量不能为空!");
|
||
|
return false;
|
||
|
} else {
|
||
|
$("#z_error").text("");
|
||
|
}
|
||
|
if($("#id").val().replace(/(^\s*)|(\s*$)/g, "")=="")
|
||
|
{
|
||
|
var fanhuicount= Mould_Form.serchmingcheng($("#mingcheng").val()).value;
|
||
|
if(fanhuicount>0)
|
||
|
{
|
||
|
$("#z_error").html("此模具档案已存在");
|
||
|
return false;
|
||
|
}else{
|
||
|
$("#z_error").html("");
|
||
|
}
|
||
|
}else{
|
||
|
if($("#mingcheng").val()!=beforval)
|
||
|
{
|
||
|
var fanhuicount= Mould_Form.serchmingcheng($("#mingcheng").val()).value;
|
||
|
if(fanhuicount>0)
|
||
|
{
|
||
|
$("#z_error").html("此模具档案已存在");
|
||
|
return false;
|
||
|
}else{
|
||
|
$("#z_error").html("");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
<body>
|
||
|
<form id="form" runat="server">
|
||
|
<div class="rtbjdiv" >
|
||
|
<div class="add-top" >
|
||
|
<div class="add-top-dh" id="div_listdaohang"><h4>模具档案表单页   </h4> <a href="Mould_list.aspx" id="bt_fhlb" runat="server" style=" width:65px" class="button icon pin">回到列表</a></div>
|
||
|
<div class="add-top-cz" >
|
||
|
<a href="#button" id="bt_tj" onclick="setbcbd()" class="button icon log">保存</a>
|
||
|
<a href="#button" id="chongzhi" onclick="form.reset();" style=" width:60px; " class=" button icon reload">重置表单</a>
|
||
|
<a href="#button" id="fanhui" onclick="history.back();" style=" width:60px; " class="button icon arrowleft">返回上级</a>
|
||
|
<asp:label id="z_error" CssClass="error" runat="server"></asp:label>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="alert-tip">
|
||
|
<b>温馨提示:</b>
|
||
|
<p>• 信息表单中加*号红色标题框为必填项,为了可以顺利保存信息,请您注意填写红色栏目中的信息</p>
|
||
|
</div>
|
||
|
<div id="dd_kong" style=" overflow:auto;">
|
||
|
<table class="bule"> <tr class="tdlietou"><td><h4>模具基本信息</h4></td></tr></table>
|
||
|
<table class="tablewk">
|
||
|
<tr><td style=" height:20px" colspan="13"></td></tr>
|
||
|
<tr>
|
||
|
<td class="wktblm"><span>模具代码</span></td><td><asp:TextBox id="bh" runat="server" CssClass="tbinput_hx" ReadOnly Text="自动生成" ></asp:TextBox></td>
|
||
|
<td class="wktblm"><span><font>*模具名称</font></span></td><td><asp:TextBox id="mingcheng" runat="server" CssClass="tbinput_bt"></asp:TextBox></td>
|
||
|
<td class="wktblm"><span>模具类型</span></td><td><asp:dropdownlist id="mjlx" runat="server" CssClass="tbinput_xl"></asp:dropdownlist></td>
|
||
|
<td class="wktblm"><span><font>*片数</font></span></td><td ><asp:TextBox id="pianshu" runat="server" onkeyup="doubleshuru(this)" CssClass="tbinput_bt"></asp:TextBox></td>
|
||
|
<td class="wktblm"><span><font>*使用次数</font></span></td><td><asp:TextBox id="sycs" runat="server" onkeyup="doubleshuru(this)" CssClass="tbinput_bt"></asp:TextBox></td>
|
||
|
<td class="wktblm"><span>尺寸</span></td><td><asp:TextBox id="chicun" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td>  </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="wktblm"><span><font>*重量</font></span></td><td class="content"><asp:TextBox id="zhongliang" onkeyup="doubleshuru(this)" runat="server" CssClass="tbinput_bt"></asp:TextBox></td>
|
||
|
<td class="wktblm"><span>计价单位</span></td><td class="content"><asp:dropdownlist id="jjdw" runat="server" CssClass="tbinput_xl"></asp:dropdownlist></td>
|
||
|
<td class="wktblm"><span>建档日期</span></td><td class="content"><input name='control_date' type='text' id='riqi' size='10' maxlength='10' onclick='new Calendar().show(this);' readonly runat=server class="tbinput_rl" /></td>
|
||
|
<td class="wktblm"><span>备注</span></td><td class="content" colspan='5'> <asp:TextBox id="beizhu" runat="server" CssClass="tbinput" ></asp:TextBox></td>
|
||
|
<td>  </td>
|
||
|
</tr>
|
||
|
<tr><td style=" height:20px" colspan="13"></td></tr>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<span style=" display:none"> <asp:button id="severbc" runat="server" CssClass="button bluez small" Text="保存"
|
||
|
OnClientClick="return pd()" onclick="bt_tj_Click" ></asp:button> </span>
|
||
|
<asp:HiddenField ID="id" runat="server" Value="" />
|
||
|
<script src="../Js/messageshow.js" type="text/javascript"></script>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|