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

279 lines
9.4 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.ProduceManage.ProducePlanModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
生产记录维护信息列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(130,true) %>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p=>p.PLANCODE) %>
</th>
<td>
<%=Html.QC(p => p.PLANCODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.PROCESSTYPE)%>
</th>
<td>
<%=Html.QC(p => p.PROCESSTYPE)%>
</td>
<th align="right">
<%=Html.QV(p => p.PRODUCTTYPE)%>
</th>
<td>
<%=Html.QC(p => p.PRODUCTTYPE)%>
</td>
<th align="right">
<%=Html.QV(p => p.PLANSTATUS)%>
</th>
<td>
<%=Html.QC(p => p.PLANSTATUS)%>
</td>
</tr>
<tr>
</td>
<th align="right">
<%=Html.QV(p => p.MACHINECODE)%>
</th>
<td>
<%=Html.QC(p => p.MACHINECODE)%>
</td>
</td>
<th align="right">
<%=Html.QV(p => p.PRODUCESHIFTTCODE)%>
</th>
<td>
<%=Html.QC(p => p.PRODUCESHIFTTCODE)%>
</td>
</td>
<th align="right">
<%=Html.QV(p => p.COLOR)%>
</th>
<td>
<%=Html.QC(p => p.COLOR)%>
</td>
</td>
<th align="right">
<%=Html.QV(p => p.HB)%>
</th>
<td>
<%=Html.QC(p => p.HB)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.STARTCREATEDATE)%>
</th>
<td>
<%=Html.QC(p => p.STARTCREATEDATE)%>
</td>
<th align="right">
<%=Html.QV(p => p.ENDCREATEDATE)%>
</th>
<td>
<%=Html.QC(p => p.ENDCREATEDATE)%>
</td>
</tr>
</table>
<div style="left: 1px; position: relative;">
</div>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.ProduceManage.ProducePlanModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<script language="javascript" type="text/javascript">
//搪塑
var slushData = [{ id: 0, text: "表皮"}];
//骨架
var injectData = [{ id: 1, text: "骨架"}];
//气囊支架
var injectAirBagData = [{ id: 2, text: "气囊支架"}];
//开关支架
var injectSwitchData = [{ id: 3, text: "开关支架"}];
//风道
var injectWindData = [{ id: 4, text: "风道"}];
//HUD风道
var injectHUDWindData = [{ id: 5, text: "HUD风道"}];
//中控支架
var injectControlData = [{ id: 7, text: "中控支架"}];
//中控支架
var mainData = [{ id: 8, text: "本体"}];
var MoajieData = [{ id: 4, text: "风道" }, { id: 5, text: "HUD风道" }, { id: 8, text: "本体"}];
//加工工序值
var ProcessTypeData = {
Slush: 0, Inject: 1,
AirbagInject: 2, WindInject: 3,
ControlInject: 4, HUDWindInject: 5,
SkinCore: 6, Frame: 7,
Cast: 9, Punch: 11,
Mill: 12, Maojie: 13,
Subno: 14, Weld: 15,
Gether: 16
};
//添加
function Add() {
openAppWindow1('生产记录添加', 'Edit', '350', '400');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('生产记录修改', 'Edit?PID=' + ids, '350', '400');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要删除选中的记录吗?", function () {
submitByButton("Delete");
})
}
}
//导出
function Export() {
document.getElementById("selectKey").value = getSelectKey();
submitByButton("ExportExcel");
}
//生产完成
function ProductOver() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能完成一条计划。");
return;
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要完成选中的计划吗?", function () {
submitByButton("ProductOver");
})
}
}
//查询
function Search() {
if (parseDate($("#STARTCREATEDATE").val()) > parseDate($("#ENDCREATEDATE").val())) {
alert("开始时间不能大于结束时间!");
return;
}
List(1);
}
$(function () {
//获取数据
List(1);
$('#PROCESSTYPE').combobox({
onSelect: function () {
var provalue = $('#PROCESSTYPE').combobox('getValue');
if (provalue == ProcessTypeData.Slush || provalue == ProcessTypeData.SkinCore) {
$('#PRODUCTTYPE').combobox('loadData', slushData);
}
else if (provalue == ProcessTypeData.Inject || provalue == ProcessTypeData.Frame) {
$('#PRODUCTTYPE').combobox('loadData', injectData);
}
else if (provalue == ProcessTypeData.AirbagInject) {
$('#PRODUCTTYPE').combobox('loadData', injectAirBagData);
}
else if (provalue == ProcessTypeData.WindInject) {
$('#PRODUCTTYPE').combobox('loadData', injectWindData);
}
else if (provalue == ProcessTypeData.ControlInject) {
$('#PRODUCTTYPE').combobox('loadData', injectControlData);
}
else if (provalue == ProcessTypeData.HUDWindInject) {
$('#PRODUCTTYPE').combobox('loadData', injectHUDWindData);
}
else if (provalue == ProcessTypeData.Maojie) {
$('#PRODUCTTYPE').combobox('loadData', MoajieData);
}
else {
$('#PRODUCTTYPE').combobox('loadData', mainData);
}
$('#PRODUCTTYPE').combobox('clear');
//气囊支架注塑、中控支架注塑、风道注塑、HUD风道注塑时
//设定为注塑
if (provalue == ProcessTypeData.AirbagInject || provalue == ProcessTypeData.WindInject
|| provalue == ProcessTypeData.ControlInject || provalue == ProcessTypeData.HUDWindInject) {
provalue = ProcessTypeData.Inject;
}
$('#MACHINECODE').combobox("clear");
//获取设备信息
$.ajax({
url: "/ProducePlan/GetMachineNo?PROCESSTYPE=" + provalue,
type: "GET",
cache: false,
dataType: "json",
async: false,
success: function (data) {
var machineData = eval(data);
$('#MACHINECODE').combobox('loadData', machineData);
}
});
}
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("ProducePlan", "List", "Search()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("ProducePlan", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("ProducePlan", "Update", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("ProducePlan", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("productOver", "ProductOver", QMFrameWork.WebUI.IconCls.redo, "ProductOver()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>