Browse Source

按生产线下拉框选择工位

master
周红军 3 weeks ago
parent
commit
0be18e0d00
  1. 8
      MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs
  2. 14
      MESWebSite/HttpHandlers/StationHandler.ashx.cs
  3. 111
      MESWebSite/Manage/Bom_MK.aspx

8
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")
{

14
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();
}
}
}

111
MESWebSite/Manage/Bom_MK.aspx

@ -49,7 +49,7 @@
}
}
</style>
<title>门槛BOM信息</title>
<title>装配BOM信息</title>
</head>
<body>
<form id="form1" runat="server">
@ -60,12 +60,12 @@
<td><span class="title" style="width: 150px">BOM信息</span>
</td>
<td style="width: 50px;"></td>
<td style="width: 300px;">注塑件零件号:
<td style="width: 300px;">总成零件号:
<input type="text" id="PartNo1_s" style="width: 140px;" /></td>
<td style="width: 300px;">塑料粒子零件号:
<td style="width: 300px;">子零件号:
<input type="text" id="PartNo2_s" style="width: 140px;" /></td>
<td style="width: 200px;">地点
<input type="text" id="PlaceName_s" style="width: 140px;" /></td>
<td style="width: 200px;">产线
<input type="text" id="LineName_s" style="width: 140px;" /></td>
<td style="width: 80px" ><a class="topsearchBtn">查询</a></td>
<td style="width: 80px">
@ -88,7 +88,7 @@
<tr>
<td class="title" style="width: 110px;">
<p>
注塑件(零件号)
总成零件号
</p>
</td>
<td colspan="2">
@ -100,7 +100,7 @@
<tr>
<td class="title" style="width: 110px;">
<p>
塑料粒零件号
子零件号:
</p>
</td>
<td colspan="2">
@ -130,6 +130,18 @@
<input id="IsPartAssemble" type="checkbox"/>
</td>
</tr>
<tr>
<td class="title" style="width: 110px;">
<p>
产线:
</p>
</td>
<td colspan="2">
<select id="line_id" class="easyui-combobox" style="width: 234px; height: 36px;"
data-options="valueField: 'LineID',textField: 'LineName'">
</select><span style="color: red; font-size: 18px; vertical-align: middle;">*</span>
</td>
</tr>
<tr>
<td class="title" style="width: 110px;">
<p>
@ -137,19 +149,11 @@
</p>
</td>
<td colspan="2">
<input id="StationNo" type="text" class="text" style="width: 220px; height: 30px;" /><span style="color: red; font-size: 18px; vertical-align: middle;">*</span>
</td>
</tr>
<tr>
<td class="title" style="width: 110px;">
<p>
地点:
</p>
</td>
<td colspan="2">
<input id="PlaceName" type="text" class="text" style="width: 220px; height: 30px;" /><span style="color: red; font-size: 18px; vertical-align: middle;">*</span>
</td>
</tr>
<select id="station_id" class="easyui-combobox" style="width: 234px; height: 36px;"
data-options="valueField: 'StationID',textField: 'StationNo'">
</select><span style="color: red; font-size: 18px; vertical-align: middle;">*</span>
</td>
</tr>
</table>
</div>
<!-- 编辑窗口 - footer -->
@ -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);
},
});
}
});
}
</script>
</form>

Loading…
Cancel
Save