|
|
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
|
|
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.FIS.DashBoardPlanModel>" %>
|
|
|
|
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
|
|
仪表板订单计划信息编辑
|
|
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
|
|
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
|
|
|
|
<%
|
|
|
|
var editable = false;
|
|
|
|
if (string.IsNullOrEmpty(Model.PLAN_STATE) || string.Equals(Model.PLAN_STATE, "0"))
|
|
|
|
{
|
|
|
|
editable = true;
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
<table id="editTable" cellpadding="0" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%=Html.QV(p => p.PLAN_DATE)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%=Html.QC(p => p.PLAN_DATE)%>
|
|
|
|
<%--<input id="PLAN_DATE" name="PLAN_DATE" value="<%=string.IsNullOrEmpty(Model.PID)?DateTime.Now.ToString("yyyy-MM-dd"):Model.PLAN_DATE.ToString() %>"
|
|
|
|
type="text" class="easyui-datebox" required="required" <%=editable?"":"readonly =\"readonly\"" %> />--%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<span style="color: #FF0000">*</span>顺序号
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<input class="easyui-validatebox" type="text" id="PLAN_SEQ" name="PLAN_SEQ" value="<%=Model.PLAN_SEQ %>"
|
|
|
|
data-options="required:true,validType:['number','length[3,3]']" <%=editable?"":"readonly =\"readonly\"" %> />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<%--<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%=Html.QV(p => p.PLAN_NO)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%=Html.QC(p => p.PLAN_NO, new { Readonly ="readonly"})%>
|
|
|
|
<%if (editable)
|
|
|
|
{%>
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
$(function () {
|
|
|
|
$("#PLAN_SEQ").blur(function () { GeneratPlanNo() });
|
|
|
|
$("#PLAN_DATE").datebox({ onSelect: function () { GeneratPlanNo() } });
|
|
|
|
var GeneratPlanNo = function () {
|
|
|
|
|
|
|
|
var prefix = "IP";
|
|
|
|
var datestr = "YYYYMMDD";
|
|
|
|
if ($("#PLAN_DATE").datebox("getValue").length > 0) {
|
|
|
|
datestr = parseDate($("#PLAN_DATE").datebox("getValue")).format('yyyyMMdd');
|
|
|
|
}
|
|
|
|
var seqstr = "000";
|
|
|
|
var seqval = $("#PLAN_SEQ").val();
|
|
|
|
if (seqval.length <= seqstr.length) {
|
|
|
|
seqstr = seqstr.substring(0, seqstr.length - seqval.length) + seqval;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
seqstr = seqval.substring(seqval.length - seqstr.length);
|
|
|
|
}
|
|
|
|
$("#PLAN_NO").val("IP" + datestr + seqstr);
|
|
|
|
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<%} %>
|
|
|
|
</td>
|
|
|
|
</tr>--%>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%=Html.QV(p => p.MATERIAL_CODE)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%=Html.QC(p => p.MATERIAL_CODE,editable?null:new{Readonly="readonly"})%>
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
// $(function () {
|
|
|
|
// $("#MATERIAL_CODE").combobox({ panelWidth: 300 });
|
|
|
|
// });
|
|
|
|
</script>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%=Html.QV(p => p.QTY)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%=Html.QC(p => p.QTY)%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%=Html.QV(p => p.SHIFT_CODE)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%=Html.QC(p => p.SHIFT_CODE)%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%=Html.QV(p => p.PRODUCEREQUIRE)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%=Html.QC(p => p.PRODUCEREQUIRE)%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%--<th align="right" id="timeHead" style="display:none">--%>
|
|
|
|
<%=Html.QV(p => p.STARTTIME)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%-- <td id="timeValues" style="display:none">--%>
|
|
|
|
<%=Html.QC(p => p.STARTTIME)%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%--<th align="right" id="timeEndHead" style="display:none">--%>
|
|
|
|
<%=Html.QV(p => p.ENDTIME)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%-- <td id="timeEndValues" style="display:none">--%>
|
|
|
|
<%=Html.QC(p => p.ENDTIME)%>
|
|
|
|
<%--<script type="text/javascript" language="javascript">
|
|
|
|
$(function () {
|
|
|
|
$("#PRODUCEREQUIRE").combobox({ onSelect: function () { SetTime() } });
|
|
|
|
var SetTime = function () {
|
|
|
|
var uiHead = document.getElementById("timeHead");
|
|
|
|
var uiValues = document.getElementById("timeValues");
|
|
|
|
var uiEndHead = document.getElementById("timeEndHead");
|
|
|
|
var uiEndValues = document.getElementById("timeEndValues");
|
|
|
|
if ($("#PRODUCEREQUIRE").combobox("getValue") == 1) {
|
|
|
|
uiHead.style.display = "";
|
|
|
|
uiValues.style.display = "";
|
|
|
|
uiEndHead.style.display = "";
|
|
|
|
uiEndValues.style.display = "";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
uiHead.style.display = "none";
|
|
|
|
uiValues.style.display = "none";
|
|
|
|
uiEndHead.style.display = "none";
|
|
|
|
uiEndValues.style.display = "none";
|
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|
|
|
|
</script>--%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th align="right">
|
|
|
|
<%=Html.QV(p => p.REMARK)%>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<%=Html.QC(p => p.REMARK)%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<%=Html.HiddenFor(p=>p.PID) %>
|
|
|
|
<%=Html.HiddenFor(p=>p.WORKCENTER_CODE) %>
|
|
|
|
<%=Html.HiddenFor(p=>p.CREATEDATE) %>
|
|
|
|
<%=Html.HiddenFor(p=>p.CREATEUSER) %>
|
|
|
|
<%=Html.HiddenFor(p=>p.UPDATEDATE)%>
|
|
|
|
<%=Html.HiddenFor(p=>p.UPDATEUSER) %>
|
|
|
|
<%=Html.HiddenFor(p=>p.COMPLETE_QTY) %>
|
|
|
|
<%--<%=//Html.HiddenFor(p => p.PLAN_SEQ)%>--%>
|
|
|
|
<%=Html.HiddenFor(p => p.PLAN_STATE)%>
|
|
|
|
<%=Html.HiddenFor(p => p.FACTORY_CODE)%>
|
|
|
|
<%=Html.HiddenFor(p => p.ORDER_TYPE)%>
|
|
|
|
<%=Html.HiddenFor(p => p.ROUTE_CODE)%>
|
|
|
|
<%=Html.HiddenFor(p => p.PBOM_CODE)%>
|
|
|
|
<%=Html.HiddenFor(p => p.PLAN_NO)%>
|
|
|
|
<%=Html.HiddenFor(p => p.FACTORY_CODE)%>
|
|
|
|
<%=Html.Hidden("PLANSOURCE",1)%>
|
|
|
|
<%=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();")%>
|
|
|
|
<%=Html.QTButtonBack("close", "DashBoardPlanList", "parent.closeAppWindow1();return false;")%>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
var type = document.getElementById("ORDER_TYPE").value;
|
|
|
|
//获取物料下拉数据源
|
|
|
|
$('#MATERIAL_CODE').combotree({
|
|
|
|
url: "/Dict/GetFisMaterialTree?ordertype="+type ,
|
|
|
|
panelHeight: '250',
|
|
|
|
panelWidth: '500',
|
|
|
|
});
|
|
|
|
// var uiHead = document.getElementById("timeHead");
|
|
|
|
// var uiValues = document.getElementById("timeValues");
|
|
|
|
// var uiEndHead = document.getElementById("timeEndHead");
|
|
|
|
// var uiEndValues = document.getElementById("timeEndValues");
|
|
|
|
// if ($("#PRODUCEREQUIRE").combobox("getValue") == 1) {
|
|
|
|
// uiHead.style.display = "";
|
|
|
|
// uiValues.style.display = "";
|
|
|
|
// uiEndHead.style.display = "";
|
|
|
|
// uiEndValues.style.display = "";
|
|
|
|
// }
|
|
|
|
// else {
|
|
|
|
// uiHead.style.display = "none";
|
|
|
|
// uiValues.style.display = "none";
|
|
|
|
// uiEndHead.style.display = "none";
|
|
|
|
// uiEndValues.style.display = "none";
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
function Save() {
|
|
|
|
var reg = /^[0-9]+$/;
|
|
|
|
var netId = $("#QTY").val();
|
|
|
|
if (!reg.test(netId)) {
|
|
|
|
MSI("提示", "计划数量只能输入数字。");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var starttime = document.getElementById("STARTTIME").value;
|
|
|
|
var endtime = document.getElementById("ENDTIME").value;
|
|
|
|
// if ($("#PRODUCEREQUIRE").combobox("getValue") == 1) {
|
|
|
|
if (starttime == "" || endtime == "") {
|
|
|
|
alert("请输入以时间为准的时间段!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (parseDate($("#STARTTIME").val()) > parseDate($("#ENDTIME").val())) {
|
|
|
|
alert("开始日期不能大于截止时间!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (isValidate() == false) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
submitByButton("Save");
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</asp:Content>
|