You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
4.0 KiB
114 lines
4.0 KiB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Stocktaking.CountingdetailViewModel>" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
test
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
<%=Html.QPSeach(100,true) %>
|
|
<%--<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>--%>
|
|
<table id="editTable" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.MATERIAL_TYPE_CODE)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.MATERIAL_TYPE_CODE)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.MATERIAL_CODE)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.MATERIAL_CODE)%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%=Html.QPEnd() %>
|
|
<%=Html.HiddenFor(p=>p.PLANID) %>
|
|
<%=Html.HiddenFor(p => p.MATERIAL_YPE_Name)%>
|
|
<%=Html.QPList() %>
|
|
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.Stocktaking.CountingdetailViewModel>(Model)%>
|
|
<%=Html.QPEnd() %>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
|
<table width="100%" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td>
|
|
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<script type="text/javascript">
|
|
function Save() {
|
|
if (isValidate() == false) {
|
|
return false;
|
|
}
|
|
|
|
|
|
var materialtype = $('#MATERIAL_TYPE_CODE').combobox('getValue');
|
|
var materialcode = $('#MATERIAL_CODE').combobox('getValue');
|
|
debugger;
|
|
if (materialtype == "" || materialcode == "") {
|
|
alert('物料信息不能为空!');
|
|
return false;
|
|
}
|
|
submitByButton("SubSave");
|
|
var plantData = [{ 'id': "", 'text': ""}];
|
|
$('#MATERIAL_CODE').combobox("loadData", plantData);
|
|
$('#MATERIAL_CODE').combobox("select", "");
|
|
$('#MATERIAL_CODE').combobox("setValue", "");
|
|
|
|
}
|
|
|
|
//添加
|
|
function Add() {
|
|
parent.submitByButton('SubEditWin');
|
|
}
|
|
|
|
window.onload = function () {
|
|
|
|
var plantData = [{ 'id': "", 'text': ""}];
|
|
$('#MATERIAL_CODE').combobox("loadData", plantData);
|
|
$('#MATERIAL_CODE').combobox("select", "");
|
|
$('#MATERIAL_CODE').combobox("setValue", "");
|
|
|
|
$('#MATERIAL_TYPE_CODE').combobox({
|
|
onSelect: function (e) {
|
|
|
|
if (document.getElementById("MATERIAL_YPE_Name").value != e.text) {
|
|
|
|
|
|
var plantData = [{ 'id': "", 'text': ""}];
|
|
$('#MATERIAL_CODE').combobox("loadData", plantData);
|
|
$('#MATERIAL_CODE').combobox("select", "");
|
|
$('#MATERIAL_CODE').combobox("setValue", "");
|
|
|
|
}
|
|
document.getElementById("MATERIAL_YPE_Name").value = e.text;
|
|
|
|
$('#MATERIAL_CODE').combobox({
|
|
url: '/StocktakingManage/GetMaterielList?MATERIAL_TYPE_CODE=' + e.id,
|
|
editable: 'false',
|
|
valueField: 'id',
|
|
textField: 'text'
|
|
|
|
});
|
|
var data = $('#MATERIAL_CODE').combobox('getData');
|
|
if (data.length > 0) {
|
|
$('#MATERIAL_CODE').combobox('select', data[0].id);
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
</script>
|
|
</asp:Content>
|
|
|