天津投入产出系统后端
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.

214 lines
8.2 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.MD.Web.Models.ScheduleModel>" %>
<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)%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
<%=Html.QV(p => p.FACTORY_CODE)%>
</th>
<td>
<%=Html.QC(p => p.FACTORY_CODE)%>
</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.TEAM_CODE)%>
</th>
<td>
<%=Html.QC(p => p.TEAM_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.START_DATE)%>
</th>
<td>
<%=Html.QC(p => p.START_DATE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.END_DATE)%>
</th>
<td>
<%=Html.QC(p => p.END_DATE)%>
</td>
</tr>
<%--<tr>
<th align="right">
<%=Html.QV(p => p.WORK_START_TIME)%>
</th>
<td>
<%=Html.QC(p => p.WORK_START_TIME)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.WORK_END_TIME)%>
</th>
<td>
<%=Html.QC(p => p.WORK_END_TIME)%>
</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.TEAM_NAME)%>
<%=Html.HiddenFor(p => p.SHIFT_NAME)%>
<%=Html.HiddenFor(p => p.CREATEDATE)%>
<%=Html.HiddenFor(p => p.CREATEUSER)%>
<%=Html.HiddenFor(p => p.UPDATEDATE)%>
<%=Html.HiddenFor(p => p.UPDATEUSER)%>
<%=Html.HiddenFor(p => p.FLGDEL)%>
<%=Html.QPEnd() %>
<script type="text/javascript">
$(function () {
//获取下拉数据源-班次
$('#SHIFT_CODE').combobox({
url: "/Dict/GetWorkcenterShiftComboxSource?workcentercode=All",
editable: 'false',
valueField: 'PRODUCESHIFTTCODE',
textField: 'PRODUCESHIFTNAME'
});
//修改时:班组赋值
var selectCode = $('#FACTORY_CODE').combobox('getValue');
if (selectCode != "") {
//获取下拉数据源-班组
$('#TEAM_CODE').combobox({
url: "/Dict/GetFactoryTeamComboxSource?factoryCode=" + selectCode,
editable: 'false',
valueField: 'TEAM_CODE',
textField: 'TEAM_NAME'
});
//$('#TEAM_CODE').combobox("setText", $('#TEAM_NAME').val());
//$('#SHIFT_CODE').combobox("setText", $('#SHIFT_NAME').val());
}
else {
$('#TEAM_CODE').combobox("setValue", "");
$('#SHIFT_CODE').combobox("setValue", "");
}
//新增时:级联班组
$('#FACTORY_CODE').combobox({
onSelect: function () {
var selectCode = $('#FACTORY_CODE').combobox('getValue');
if (selectCode != "") {
//获取下拉数据源-班组
$('#TEAM_CODE').combobox({
url: "/Dict/GetFactoryTeamComboxSource?factoryCode=" + selectCode,
editable: 'false',
valueField: 'TEAM_CODE',
textField: 'TEAM_NAME'
});
$('#TEAM_CODE').combobox("setValue", "");
//获取下拉数据源-班次
// $('#SHIFT_CODE').combobox({
// url: "/Dict/GetFactoryShiftComboxSource?factoryCode=" + selectCode,
// editable: 'false',
// valueField: 'SHIFT_CODE',
// textField: 'SHIFT_NAME'
// });
// $('#SHIFT_CODE').combobox("setValue", "");
}
else {
//清空工序下拉框-班组
var emptyData = [{ 'TEAM_CODE': "", 'TEAM_NAME': ""}];
$('#TEAM_CODE').combobox("loadData", emptyData);
$('#TEAM_CODE').combobox("select", "");
//清空工序下拉框-班组
// var emptyShift = [{ 'SHIFT_CODE': "", 'SHIFT_NAME': ""}];
// $('#SHIFT_CODE').combobox("loadData", emptyShift);
// $('#SHIFT_CODE').combobox("select", "");
}
}
});
});
$(function () {
$('#FACTORY_CODE').combobox({
panelWidth: '350'
});
});
//联动事件
// $('#WORKCENTER_PID').combobox({
// onSelect: function () {
// var workcentername = $('#WORKCENTER_PID').combobox('getText');
// $('#WORKCENTER_NAME').val(workcentername.split("/")[1]);
// }
// });
//保存
function Save() {
// var code = /^[0-9]*$/;
// var teamcode = document.getElementById("TEAM_CODE").value;
// if (isValidate() == false) {
// return false;
// }
// else if (!code.test(teamcode)) {
// alert("班组编码必须为有效数字");
// return false;
// }
var starttime = document.getElementById("START_DATE").value;
var endtime = document.getElementById("END_DATE").value;
if (starttime == "" || endtime == "") {
alert("请输入以时间为准的时间段!");
return;
}
if (parseDate($("#START_DATE").val()) > parseDate($("#END_DATE").val())) {
alert("开始时间不能大于结束时间!");
return;
}
if (isValidate() == false) {
return false;
}
submitByButton("Save");
}
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("Team", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
</asp:Content>