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

145 lines
5.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.QPSeach(80,true) %>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p => p.FACTORY_CODE)%>
</th>
<td>
<%=Html.QC(p => p.FACTORY_CODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.SHIFT_CODE)%>
</th>
<td>
<%=Html.QC(p => p.SHIFT_CODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.TEAM_CODE)%>
</th>
<td>
<%=Html.QC(p => p.TEAM_CODE)%>
</td>
</tr>
</table>
<div style="left: 1px; position: relative;">
</div>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.MD.Web.Models.ScheduleModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<%=Html.Hidden("PID")%>
<script language="javascript" type="text/javascript">
$(function () {
//获取下拉数据源-班次
$('#SHIFT_CODE').combobox({
url: "/Dict/GetWorkcenterShiftComboxSource?workcentercode=All",
editable: 'false',
valueField: 'PRODUCESHIFTTCODE',
textField: 'PRODUCESHIFTNAME'
});
//新增时:级联班组
$('#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 Add() {
openAppWindow1('排班添加', 'Edit', '450', '350');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('排班修改', 'Edit?PID=' + ids, '450', '350');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要删除选中的记录吗?", function () {
submitByButton("Delete");
})
}
}
$(function () {
$('#FACTORY_CODE').combobox({
panelWidth: '350'
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("Schedule", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("Schedule", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("Schedule", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("Schedule", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>