<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProcurementEdit.aspx.cs" Inherits="CY.WebForm.Pages.procurement.ProcurementEdit" %>
|
|
<!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">
|
<head runat="server">
|
<title>采购信息</title>
|
<uc:CMSHead ID="CMSHead1" runat="server" />
|
</head>
|
<body>
|
<form runat="server" id="form1" class="form2">
|
<table class="tableStyle1" style=" width:98%;">
|
<tr>
|
<td class="ali03 w100px">
|
货品类别:
|
</td>
|
<td>
|
<asp:DropDownList runat="server" ID="dwCommity" class="Sreq w120px" AutoPostBack="true" keepDefaultStyle="true" OnSelectedIndexChanged="dwCommity_SelectedIndexChanged" msg="请选择货品类别">
|
</asp:DropDownList>
|
</td>
|
<td class="ali03 w100px">
|
供应商:
|
</td>
|
<td>
|
<select id="selSuppliers" runat="server" class="w160px" datatextfield="Name" keepdefaultstyle="true" datavaluefield="Keyid" msg="请选择供应商">
|
</select>
|
</td>
|
|
</tr>
|
<tr>
|
<td class="ali03 w100px">
|
货品名称:
|
</td>
|
<td>
|
<asp:DropDownList runat="server" ID="dwGoodsList" class="Sreq w120px" AutoPostBack="true" keepDefaultStyle="true" OnSelectedIndexChanged="dwGoodsList_SelectedIndexChanged" msg="请选择货品名称">
|
</asp:DropDownList>
|
</td>
|
<td class="ali03 ">
|
货品品牌:
|
</td>
|
<td>
|
<asp:DropDownList runat="server" ID="dwBrand" class="Sreq w120px" AutoPostBack="false" keepDefaultStyle="true" msg="请选择货品品牌">
|
</asp:DropDownList>
|
</td>
|
</tr>
|
<tr>
|
<td class="ali03 ">
|
货品规格:
|
</td>
|
<td>
|
<asp:DropDownList runat="server" ID="dwSpecification" class="Sreq w120px" AutoPostBack="false" keepDefaultStyle="true" msg="请选择货品规格">
|
</asp:DropDownList>
|
</td>
|
<asp:Panel ID="div_td" runat="server">
|
<td class="ali03 w100px" runat="server" id="trWeight">
|
纸张克重:
|
</td>
|
<td>
|
<asp:DropDownList runat="server" ID="dwPaperWeight" class="Sreq w120px" AutoPostBack="false" keepDefaultStyle="true" msg="请选择纸张克重">
|
</asp:DropDownList>
|
</td>
|
</asp:Panel>
|
<asp:Panel ID="div_td1" runat="server">
|
</asp:Panel>
|
</tr>
|
<tr>
|
<td class="ali03 ">
|
采购数量:
|
</td>
|
<td>
|
<input type="text" runat="server" class="req int w120px" id="txtQuantity" msg="请填写采购数量"/>
|
</td>
|
<td class="ali03 ">
|
单价(元):
|
</td>
|
<td>
|
<input type="text" runat="server" class="req float w120px" id="txtPrice" msg="请填写单价"/>
|
</td>
|
|
</tr>
|
<tr>
|
<asp:Panel ID="tanDiv" runat="server">
|
<td class="ali03 ">
|
吨价(元):
|
</td>
|
<td>
|
<input type="text" runat="server" class=" float w120px" id="txtTenPrice" msg="请填写吨价"/>
|
</td>
|
</asp:Panel>
|
<td class="ali03 ">
|
金额(元):
|
</td>
|
<td>
|
<input type="text" runat="server" class="req float w120px" id="txtAllMoney" msg="请填写金额"/>
|
</td>
|
<asp:Panel ID="tanDiv1" runat="server">
|
</asp:Panel>
|
</tr>
|
<tr>
|
<td class="ali03">
|
备注:
|
</td>
|
<td colspan="5">
|
<textarea id="txtRemark" runat="server" style="width: 460px; height: 40px;"></textarea>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="6" align="center">
|
<asp:Button runat="server" Text="提交" ID="btn_config" OnClick="btn_config_Click" />
|
</td>
|
</tr>
|
</table>
|
</form>
|
<script type="text/javascript">
|
$(function () {
|
$("#dwCommity option").each(function (ii, vv) {
|
$(this).html($(this).html().replace(/[.]/g, " "));
|
});
|
|
GetAllPrice();
|
|
$("#txtPrice").blur(function () {
|
GetAllPrice();
|
});
|
$("#txtQuantity").blur(function () {
|
|
var price = parseFloat($("#txtPrice").val());
|
var quantity = parseFloat($("#txtQuantity").val());
|
if (isNaN(price) || isNaN(quantity)) {
|
$("#txtAllMoney").val("0");
|
} else {
|
var eda = (price * quantity).toFixed(2);
|
$("#txtAllMoney").val(eda);
|
}
|
});
|
|
$("#txtTenPrice").blur(function () {
|
var TenPrice = parseFloat($("#txtTenPrice").val());
|
if (!isNaN(TenPrice)) {
|
var PaperSize = $("#dwSpecification option:selected").text();
|
var PaperSizes = PaperSize.split("*");
|
var Width = PaperSizes[0];
|
var Height = PaperSizes[1];
|
// var PaperWeight = $("#dwPaperWeight").val();
|
var PaperWeight = parseFloat($("#dwPaperWeight option:selected").text());
|
var aa = (Width * Height * PaperWeight * TenPrice / 1000000000000).toFixed(4);
|
if (isNaN(aa)) {
|
$("#txtPrice").val(0);
|
}
|
else {
|
$("#txtPrice").val(aa);
|
var quantity = parseFloat($("#txtQuantity").val());
|
if (isNaN(quantity)) {
|
$("#txtAllMoney").val("0");
|
}
|
else {
|
var eda = (aa * quantity).toFixed(2);
|
$("#txtAllMoney").val(eda);
|
}
|
}
|
}
|
});
|
function GetAllPrice() {
|
var price = parseFloat($("#txtPrice").val());
|
if (!isNaN(price)) {
|
var TenPrice = parseFloat($("#txtTenPrice").val());
|
var PaperSize = $("#dwSpecification option:selected").text();
|
var PaperSizes = PaperSize.split("*");
|
var Width = PaperSizes[0];
|
var Height = PaperSizes[1];
|
var quantity = parseFloat($("#txtQuantity").val());
|
var PaperWeight = $("#dwPaperWeight option:selected").text();
|
|
var aa = (price * 1000000000000 / PaperWeight / Width / Height).toFixed(2);
|
if (isNaN(aa)) {
|
$("#txtTenPrice").val(0);
|
}
|
else {
|
$("#txtTenPrice").val(aa);
|
}
|
}
|
if (isNaN(price) || isNaN(quantity)) {
|
$("#txtAllMoney").val("0");
|
} else {
|
var eda = (price * quantity).toFixed(2);
|
$("#txtAllMoney").val(eda);
|
}
|
}
|
});
|
</script>
|
</body>
|
</html>
|