diff --git a/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs b/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs index 33e42c5..86f79e7 100644 --- a/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs +++ b/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs @@ -58,7 +58,7 @@ namespace MESWebSite.HttpHandlers string pagesize = Request.Params["rows"]; string partNo1 = Request.Params["PartNo1"]; string partNo2 = Request.Params["PartNo2"]; - string placeName = Request.Params["PlaceName"]; + string lineName = Request.Params["LineName"]; if (string.IsNullOrEmpty(page)) { @@ -69,7 +69,7 @@ namespace MESWebSite.HttpHandlers pagesize = "15"; } Bom_MKBLL bll = new Bom_MKBLL(); - Response.Write(bll.SearchInfoAll(page, pagesize, partNo1, partNo2, placeName)); + Response.Write(bll.SearchInfoAll(page, pagesize, partNo1, partNo2, lineName)); Response.End(); @@ -82,7 +82,7 @@ namespace MESWebSite.HttpHandlers string IsChecked = Request.Params["IsChecked"]; string IsPartAssemble = Request.Params["IsPartAssemble"]; string StationNo = Request.Params["StationNo"]; - string PlaceName = Request.Params["PlaceName"]; + string LineName = Request.Params["LineName"]; string stationNo = ""; @@ -105,7 +105,7 @@ namespace MESWebSite.HttpHandlers md.PartNo1 = PartNo1; md.PartNo2 = PartNo2; - md.PlaceName = PlaceName; + md.LineName = LineName; md.StationNo = StationNo; if(IsPartAssemble == "1") { diff --git a/MESWebSite/HttpHandlers/StationHandler.ashx.cs b/MESWebSite/HttpHandlers/StationHandler.ashx.cs index fdcedcb..e873782 100644 --- a/MESWebSite/HttpHandlers/StationHandler.ashx.cs +++ b/MESWebSite/HttpHandlers/StationHandler.ashx.cs @@ -41,6 +41,9 @@ namespace MESWebSite.HttpHandlers case "QueryForComboboxByLineID": QueryForComboboxByLineID(); break; + case "QueryForComboboxByLineIDNew": + QueryForComboboxByLineIDNew(); + break; default: break; @@ -147,5 +150,16 @@ namespace MESWebSite.HttpHandlers Response.End(); } + + void QueryForComboboxByLineIDNew() + { + string LineID = Request.Params["LineID"]; + + StationBLL bll = new StationBLL(); + Response.Write(bll.GetComboboxDataByLine(LineID)); + Response.End(); + + } + } } \ No newline at end of file diff --git a/MESWebSite/Manage/Bom_MK.aspx b/MESWebSite/Manage/Bom_MK.aspx index 6cdda30..bd4c6b8 100644 --- a/MESWebSite/Manage/Bom_MK.aspx +++ b/MESWebSite/Manage/Bom_MK.aspx @@ -49,7 +49,7 @@ } } - 门槛BOM信息 + 装配BOM信息
@@ -60,12 +60,12 @@ BOM信息 - 注塑件零件号: + 总成零件号: - 塑料粒子零件号: + 子零件号: - 地点: - + 产线: + 查询 @@ -88,7 +88,7 @@

- 注塑件(零件号): + 总成零件号:

@@ -100,7 +100,7 @@

- 塑料粒子(零件号): + 子零件号:

@@ -130,6 +130,18 @@ + + +

+ 产线: +

+ + + * + +

@@ -137,19 +149,11 @@

- * - - - - -

- 地点: -

- - - * - - + * + + @@ -174,6 +178,7 @@ cache: false //关闭AJAX缓存 }); + reloadline_station(); //新增按钮点击 $('.topaddBtn').first().click(function () { @@ -237,9 +242,9 @@ remoteSort: false, columns: [[ { field: 'BomID', title: 'BomID', hidden: true }, - { field: 'PartNo1', title: '注塑件(零件号)', sortable: 'true', width: 10 }, + { field: 'PartNo1', title: '总成零件号', sortable: 'true', width: 10 }, { field: 'ProductName1', title: '产品名称', sortable: 'true', width: 10 }, - { field: 'PartNo2', title: '塑料粒子(零件号)', sortable: 'true', width: 10 }, + { field: 'PartNo2', title: '子零件号', sortable: 'true', width: 10 }, { field: 'ProductName2', title: '原料名称', sortable: 'true', width: 10 }, { field: 'IsChecked', title: '是否检测', sortable: 'true', width: 10, @@ -261,8 +266,9 @@ } } }, + { field: 'LineName', title: '产线', sortable: 'true', width: 10 }, { field: 'StationNo', title: '工位号', sortable: 'true', width: 10 }, - { field: 'PlaceName', title: '地点', sortable: 'true', width: 10 }, + ]], pagination: true,//表示在datagrid设置分页 @@ -287,8 +293,8 @@ var BomID = isEdit == true ? PrimaryID : 0; var PartNo1 = $('#fl_id_1').combo('getValue'); var PartNo2 = $('#fl_id_2').combo('getValue'); - var PlaceName = $('#PlaceName').val(); - var StationNo = $('#StationNo').val(); + var LineName = $('#line_id').combo('getText'); + var StationNo = $('#station_id').combo('getText'); var IsChecked = 0; if ($('#IsChecked').is(':checked')) { @@ -302,22 +308,23 @@ } if (PartNo1 == "") { - $.messager.alert('提示', '注塑件不能为空,请重新输入', 'warning'); + $.messager.alert('提示', '总成零件号不能为空,请重新输入', 'warning'); return; } if (PartNo2 == "") { - $.messager.alert('提示', '塑料粒子不能为空,请重新输入', 'warning'); + $.messager.alert('提示', '子零件不能为空,请重新输入', 'warning'); return; } - if (StationNo == "") { - $.messager.alert('提示', '工位号不能为空,请重新输入', 'warning'); + if (LineName == "") { + $.messager.alert('提示', '产线不能为空,请重新输入', 'warning'); return; } - if (PlaceName == "") { - $.messager.alert('提示', '地点不能为空,请重新输入', 'warning'); + if (StationNo == "") { + $.messager.alert('提示', '工位号不能为空,请重新输入', 'warning'); return; } + var model = { BomID: BomID, @@ -326,7 +333,7 @@ IsChecked: IsChecked, IsPartAssemble: IsPartAssemble, StationNo: StationNo, - PlaceName: PlaceName, + LineName: LineName, method: 'SaveInfo' }; SaveModel(model); @@ -358,12 +365,12 @@ var PartNo1 = $('#PartNo1_s').val(); var PartNo2 = $('#PartNo2_s').val(); - var PlaceName = $('#PlaceName_s').val(); + var LineName = $('#LineName_s').val(); var queryParams = { PartNo1: PartNo1, PartNo2: PartNo2, - PlaceName: PlaceName + LineName: LineName }; dg.datagrid({ queryParams: queryParams @@ -400,8 +407,9 @@ $('#IsPartAssemble').prop("checked", "checked") } - $('#PlaceName').val(row.PlaceName); - $('#StationNo').val(row.StationNo); + $('#line_id').combobox('select', row.LineName); + $('#station_id').combobox('select', row.StationNo); + $('#w').window('open'); } @@ -451,16 +459,39 @@ $('#fl_id_2').combo('clear'); $('#IsChecked').removeAttr("checked"); $('#IsPartAssemble').removeAttr("checked"); - $('#PlaceName').val(''); - $('#StationNo').val(''); + $('#line_id').combo('clear'); + $('#station_id').combo('clear'); } function reloadfl_id() { - $('#fl_id_1').combobox('reload', '/HttpHandlers/ProductHandler.ashx?method=QueryForCombobox&ProductTypeNo=2000'); - $('#fl_id_2').combobox('reload', '/HttpHandlers/ProductHandler.ashx?method=QueryForCombobox&ProductTypeNo=1101'); + $('#fl_id_1').combobox('reload', '/HttpHandlers/ProductHandler.ashx?method=QueryForCombobox&ProductTypeNo=6000'); + $('#fl_id_2').combobox('reload', '/HttpHandlers/ProductHandler.ashx?method=QueryForCombobox&ProductTypeNo=6001'); + } + function reloadline_station() { + + $('#line_id').combobox({ + url: '/HttpHandlers/LineHandler.ashx?method=QueryForCombobox', + onLoadSuccess: function () { + var val = $(this).combobox('getData'); + $(this).combobox('select', val[0].LineID); + }, + onSelect: function (row) { + $('#station_id').combobox({ + url: '/HttpHandlers/StationHandler.ashx?method=QueryForComboboxByLineIDNew&&LineID=' + row.LineID + '', + onLoadSuccess: function () { + //var val = $(this).combobox('getData'); + //$(this).combobox('select', val[0].ID); + }, + + }); + } + }); + } + +