Browse Source

1. 更新出貨序號取得方式

2. 工單修改調整防呆
PTD
Ray 3 years ago
parent
commit
8767475c48
  1. 10
      AMESCoreStudio.Web/Controllers/PCSController.cs
  2. 6
      AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs
  3. 8
      AMESCoreStudio.Web/Views/PCS/PCS001N.cshtml
  4. 181
      AMESCoreStudio.Web/Views/PCS/PCS003.cshtml
  5. 8
      AMESCoreStudio.Web/Views/PCS/PCS034.cshtml

10
AMESCoreStudio.Web/Controllers/PCSController.cs

@ -87,9 +87,6 @@ namespace AMESCoreStudio.Web.Controllers
if (string.IsNullOrWhiteSpace(model.wipInfo.UnitNO)) if (string.IsNullOrWhiteSpace(model.wipInfo.UnitNO))
Msg += model.wipInfo.GetAttributeFrom<DisplayAttribute>(nameof(model.wipInfo.UnitNO)).Name + ","; Msg += model.wipInfo.GetAttributeFrom<DisplayAttribute>(nameof(model.wipInfo.UnitNO)).Name + ",";
if (model.wipInfo.FlowRuleID == 0)
Msg += model.wipInfo.GetAttributeFrom<DisplayAttribute>(nameof(model.wipInfo.FlowRuleID)).Name + ",";
if (model.wipInfo.WipDueDate == DateTime.MinValue) if (model.wipInfo.WipDueDate == DateTime.MinValue)
Msg += model.wipInfo.GetAttributeFrom<DisplayAttribute>(nameof(model.wipInfo.WipDueDate)).Name + ","; Msg += model.wipInfo.GetAttributeFrom<DisplayAttribute>(nameof(model.wipInfo.WipDueDate)).Name + ",";
@ -1413,11 +1410,12 @@ namespace AMESCoreStudio.Web.Controllers
/// <param name="lotNo">生產序號</param> /// <param name="lotNo">生產序號</param>
/// <param name="num">生產數量</param> /// <param name="num">生產數量</param>
/// <param name="wipNo">工單號碼</param> /// <param name="wipNo">工單號碼</param>
/// <param name="wipShcDate">預計開工日</param>
/// <returns>RuleStation </returns> /// <returns>RuleStation </returns>
[HttpPost] [HttpPost]
public async Task<JsonResult> GetBarcodeOther(string itemNo, string lotNo, int num, string wipNo) public async Task<JsonResult> GetBarcodeOther(string itemNo, string lotNo, int num, string wipNo , DateTime wipShcDate)
{ {
var result = await _pcsApi.GetSerialRuleByQurey(itemNo, lotNo.Trim().ToUpper(), num); var result = await _pcsApi.GetSerialRuleByQurey(itemNo, lotNo.Trim().ToUpper(), num, wipShcDate);
string StartNO = ""; string StartNO = "";
string EndNO = ""; string EndNO = "";
@ -5648,7 +5646,7 @@ namespace AMESCoreStudio.Web.Controllers
await GetLineInfo(); await GetLineInfo();
await GetFlowRuleList(); await GetFlowRuleList();
var aa = GetBarcodeOther(model.WipAtt.ItemNO, model.WipInfo.Werks.Substring(2, 2), model.WipInfo.PlanQTY, model.WipInfo.WipNO); //var aa = GetBarcodeOther(model.WipAtt.ItemNO, model.WipInfo.Werks.Substring(2, 2), model.WipInfo.PlanQTY, model.WipInfo.WipNO , model.WipInfo.WipScheduleDate);
IResultModel result; IResultModel result;
model.WipBarcode.WipNO = model.WipInfo.WipNO; model.WipBarcode.WipNO = model.WipInfo.WipNO;

6
AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs

@ -984,7 +984,7 @@ namespace AMESCoreStudio.Web
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[WebApiClient.Attributes.HttpGet("api/WipInfos/GetWipInfo4QRS009")] [WebApiClient.Attributes.HttpGet("api/WipInfos/GetWipInfo4QRS009")]
ITask<ResultModel<dynamic>> GetWipInfo4QRS009(string unitNo,string factoryNo); ITask<ResultModel<dynamic>> GetWipInfo4QRS009(string unitNo, string factoryNo);
/// <summary> /// <summary>
@ -1304,8 +1304,8 @@ namespace AMESCoreStudio.Web
#endregion #endregion
#region 取出貨序號 #region 取出貨序號
[WebApiClient.Attributes.HttpGet("api/SerialRules/ByQurey/{itemNo}/{lotNo}/{num}")] [WebApiClient.Attributes.HttpGet("api/SerialRules/ByQurey/{itemNo}/{lotNo}/{num}/{wipShcDate}")]
ITask<ResultModel<string>> GetSerialRuleByQurey(string itemNo, string lotNo, int num); ITask<ResultModel<string>> GetSerialRuleByQurey(string itemNo, string lotNo, int num, DateTime wipShcDate);
#endregion #endregion
#region 樣品出貨序號紀錄 #region 樣品出貨序號紀錄

8
AMESCoreStudio.Web/Views/PCS/PCS001N.cshtml

@ -433,6 +433,7 @@
var planQTY = $('#wipInfo_PlanQTY').val(); var planQTY = $('#wipInfo_PlanQTY').val();
var lotNo = $('#lotNo').val(); var lotNo = $('#lotNo').val();
var wipNo = $('#wipInfo_WipNO').val(); var wipNo = $('#wipInfo_WipNO').val();
var wipShcDate = $('#wipInfo_WipScheduleDate').val();
if (wipNo == '' || !wipNo) { if (wipNo == '' || !wipNo) {
parent.hg.msg("請輸入工單號碼"); parent.hg.msg("請輸入工單號碼");
return; return;
@ -445,7 +446,10 @@
parent.hg.msg("請確認計畫數量"); parent.hg.msg("請確認計畫數量");
return; return;
} }
if (wipShcDate == '') {
parent.hg.msg("請確認預計開工日期有填寫");
return;
}
if (lotNo == '' || !lotNo) { if (lotNo == '' || !lotNo) {
lotNo = getLotNo(); lotNo = getLotNo();
} }
@ -453,7 +457,7 @@
$.ajax({ $.ajax({
url: '@Url.Action("GetBarcodeOther", "PCS")', url: '@Url.Action("GetBarcodeOther", "PCS")',
dataType: 'json', dataType: 'json',
data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY ,"wipNo":wipNo}, data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": wipNo, "wipShcDate": wipShcDate },
cache: false, cache: false,
type: "POST", type: "POST",
success: function (result) { success: function (result) {

181
AMESCoreStudio.Web/Views/PCS/PCS003.cshtml

@ -1,8 +1,10 @@
@model AMESCoreStudio.Web.ViewModels.PCS.WipDataViewModel @model AMESCoreStudio.Web.ViewModels.PCS.WipDataViewModel
@{ ViewData["Title"] = "PCS003"; @{
Layout = "~/Views/Shared/_AMESLayout.cshtml"; } ViewData["Title"] = "PCS003";
Layout = "~/Views/Shared/_AMESLayout.cshtml";
}
<style> <style>
.control-label { .control-label {
@ -26,8 +28,12 @@
<input asp-for="wipInfo.WipNO" type="hidden" value="@Model.wipInfo.WipNO" /> <input asp-for="wipInfo.WipNO" type="hidden" value="@Model.wipInfo.WipNO" />
<input asp-for="wipAtt.ItemNO" type="hidden" value="@Model.wipAtt.ItemNO" /> <input asp-for="wipAtt.ItemNO" type="hidden" value="@Model.wipAtt.ItemNO" />
@*<input asp-for="wipInfo.FlowRuleID" type="hidden" value="@Model.wipInfo.FlowRuleID" />*@ @*<input asp-for="wipInfo.FlowRuleID" type="hidden" value="@Model.wipInfo.FlowRuleID" />*@
<input asp-for="wipBarcodeOther.OtherID" type="hidden" value="@if(Model.wipBarcodeOther != null){ @Model.wipBarcodeOther.OtherID }" /> <input asp-for="wipBarcodeOther.OtherID" type="hidden" value="@if(Model.wipBarcodeOther != null){
<input asp-for="wipMAC.WipNO" type="hidden" value="@if(Model.wipMAC != null){ @Model.wipMAC.WipNO }" /> @Model.wipBarcodeOther.OtherID
}" />
<input asp-for="wipMAC.WipNO" type="hidden" value="@if(Model.wipMAC != null){
@Model.wipMAC.WipNO
}" />
<div class="layui-form-item " style="padding-left:30px"> <div class="layui-form-item " style="padding-left:30px">
<input @(Model.wipInfo.InputFlag == "Y" ? "checked" : "") type="checkbox" name="wipInfo.InputFlag" title="判斷前製程是否已經投入" /> <input @(Model.wipInfo.InputFlag == "Y" ? "checked" : "") type="checkbox" name="wipInfo.InputFlag" title="判斷前製程是否已經投入" />
</div> </div>
@ -334,7 +340,9 @@
</div> </div>
<input type="hidden" value=@Model.WipKps.Count() id="WipKpCount" /> <input type="hidden" value=@Model.WipKps.Count() id="WipKpCount" />
<table id="KPTable" class="layui-table"> <table id="KPTable" class="layui-table">
@{int k = 0;} @{
int k = 0;
}
<thead> <thead>
<tr> <tr>
<th> <th>
@ -472,9 +480,15 @@
<label class="layui-form-label">DIP</label> <label class="layui-form-label">DIP</label>
<div class="layui-input-block"> <div class="layui-input-block">
<cl-checkbox asp-items="@ViewBag.GetCheckboxDIP" asp-for="wipBoard.DipSides" asp-skin="defult"></cl-checkbox> <cl-checkbox asp-items="@ViewBag.GetCheckboxDIP" asp-for="wipBoard.DipSides" asp-skin="defult"></cl-checkbox>
<input @if (Model.wipBoard != null) { @(Model.wipBoard.DipCarrier == "Y" ? "checked" : "") } type="checkbox" title="CARRIER" name="wipBoard.DipCarrier" /> <input @if (Model.wipBoard != null) {
<input @if (Model.wipBoard != null) { @(Model.wipBoard.DipTape == "Y" ? "checked" : "") } type="checkbox" title="貼付膠帶" name="wipBoard.DipTape" /> @(Model.wipBoard.DipCarrier == "Y" ? "checked" : "")
<input @if (Model.wipBoard != null) { @(Model.wipBoard.DipSolderMask == "Y" ? "checked" : "") } type="checkbox" title="點防焊膠" name="wipBoard.SmdSolderMask" /> } type="checkbox" title="CARRIER" name="wipBoard.DipCarrier" />
<input @if (Model.wipBoard != null) {
@(Model.wipBoard.DipTape == "Y" ? "checked" : "")
} type="checkbox" title="貼付膠帶" name="wipBoard.DipTape" />
<input @if (Model.wipBoard != null) {
@(Model.wipBoard.DipSolderMask == "Y" ? "checked" : "")
} type="checkbox" title="點防焊膠" name="wipBoard.SmdSolderMask" />
@*<input asp-for="wipBoard.DipCarrier" type="checkbox" title="CARRIER" /> @*<input asp-for="wipBoard.DipCarrier" type="checkbox" title="CARRIER" />
<input asp-for="wipBoard.DipTape" type="checkbox" title="貼付膠帶" /> <input asp-for="wipBoard.DipTape" type="checkbox" title="貼付膠帶" />
<input asp-for="wipBoard.SmdSolderMask" type="checkbox" title="點防焊膠" />*@ <input asp-for="wipBoard.SmdSolderMask" type="checkbox" title="點防焊膠" />*@
@ -493,7 +507,9 @@
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">燒錄</label> <label class="layui-form-label">燒錄</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input @if (Model.wipBoard != null) { @(Model.wipBoard.Burn == "Y" ? "checked" : "") } type="checkbox" title="是否燒入" name="wipBoard.Burn" /> <input @if (Model.wipBoard != null) {
@(Model.wipBoard.Burn == "Y" ? "checked" : "")
} type="checkbox" title="是否燒入" name="wipBoard.Burn" />
@*<input asp-for="wipBoard.Burn" type="checkbox" title="是否燒入" />*@ @*<input asp-for="wipBoard.Burn" type="checkbox" title="是否燒入" />*@
</div> </div>
<div class="layui-input-inline"> <div class="layui-input-inline">
@ -515,7 +531,9 @@
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <div class="layui-inline">
<input @if (Model.wipBoard != null) { @(Model.wipBoard.ISPartsBake == "Y" ? "checked" : "") } type="checkbox" title="零件是否需要烘烤" name="wipBoard.ISPartsBake" /> <input @if (Model.wipBoard != null) {
@(Model.wipBoard.ISPartsBake == "Y" ? "checked" : "")
} type="checkbox" title="零件是否需要烘烤" name="wipBoard.ISPartsBake" />
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">零件烘烤溫度</label> <label class="layui-form-label">零件烘烤溫度</label>
@ -845,7 +863,9 @@
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">FINE_PACKAGE</label> <label class="layui-form-label">FINE_PACKAGE</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input @if (Model.wipSystem != null) { @(Model.wipSystem.FinePackage == "Y" ? "checked" : "") } type="checkbox" title="是否為精裝" name="wipSystem.FinePackage" /> <input @if (Model.wipSystem != null) {
@(Model.wipSystem.FinePackage == "Y" ? "checked" : "")
} type="checkbox" title="是否為精裝" name="wipSystem.FinePackage" />
</div> </div>
</div> </div>
</div> </div>
@ -897,7 +917,9 @@
<a id="OutfitTableAdd" class="layui-btn">新增</a> <a id="OutfitTableAdd" class="layui-btn">新增</a>
<input type="hidden" value=@Model.WipOutfits.Count() id="WipOutfitCount" /> <input type="hidden" value=@Model.WipOutfits.Count() id="WipOutfitCount" />
<table id="OutfitTable" class="layui-table"> <table id="OutfitTable" class="layui-table">
@{int l = 0;} @{
int l = 0;
}
<thead> <thead>
<tr> <tr>
<th> <th>
@ -945,7 +967,9 @@
<a id="SopTableAdd" class="layui-btn">新增</a> <a id="SopTableAdd" class="layui-btn">新增</a>
<input type="hidden" value=@Model.WipSops.Count() id="WipSopCount" /> <input type="hidden" value=@Model.WipSops.Count() id="WipSopCount" />
<table id="SopTable" class="layui-table"> <table id="SopTable" class="layui-table">
@{int i = 0;} @{
int i = 0;
}
<thead> <thead>
<tr> <tr>
<th style="width:50%;"> <th style="width:50%;">
@ -1145,13 +1169,13 @@
} }
// DIV keyPartsExcel // DIV keyPartsExcel
@if(Model.wipInfo.WipNO.StartsWith("981")) @if (Model.wipInfo.WipNO.StartsWith("981"))
{ {
<text>$("#keyPartExcel").show();</text> <text>$("#keyPartExcel").show(); </text>
} }
else else
{ {
<text>$("#keyPartExcel").hide();</text> <text>$("#keyPartExcel").hide(); </text>
} }
getLineInfoList($("#unit").val()); getLineInfoList($("#unit").val());
@ -1178,6 +1202,7 @@
var itemNo = $('#wipAtt_ItemNO').val(); var itemNo = $('#wipAtt_ItemNO').val();
var planQTY = $('#wipInfo_PlanQTY').val(); var planQTY = $('#wipInfo_PlanQTY').val();
var lotNo = $('#lotNo').val(); var lotNo = $('#lotNo').val();
var wipShcDate = $('#wipInfo_WipScheduleDate').val();
if (itemNo == '' || !itemNo) { if (itemNo == '' || !itemNo) {
parent.hg.msg("請輸入料號"); parent.hg.msg("請輸入料號");
@ -1188,11 +1213,14 @@
return; return;
} }
if (wipShcDate == '') {
parent.hg.msg("請確認預計開工日期有填寫");
return;
}
if (lotNo == '' || !lotNo) { if (lotNo == '' || !lotNo) {
lotNo = getLotNo(); lotNo = getLotNo();
} }
var StartNO = $("#wipBarcodeOther_StartNO").val(); var StartNO = $("#wipBarcodeOther_StartNO").val();
var EndNO = $("#wipBarcodeOther_EndNO").val(); var EndNO = $("#wipBarcodeOther_EndNO").val();
@ -1204,7 +1232,7 @@
$.ajax({ $.ajax({
url: '@Url.Action("GetBarcodeOther", "PCS")', url: '@Url.Action("GetBarcodeOther", "PCS")',
dataType: 'json', dataType: 'json',
data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": '@Model.wipInfo.WipNO' }, data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": '@Model.wipInfo.WipNO', "wipShcDate": wipShcDate },
cache: false, cache: false,
type: "POST", type: "POST",
success: function (result) { success: function (result) {
@ -1228,7 +1256,7 @@
$.ajax({ $.ajax({
url: '@Url.Action("GetBarcodeOther", "PCS")', url: '@Url.Action("GetBarcodeOther", "PCS")',
dataType: 'json', dataType: 'json',
data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": '@Model.wipInfo.WipNO' }, data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": '@Model.wipInfo.WipNO', "wipShcDate": wipShcDate },
cache: false, cache: false,
type: "POST", type: "POST",
success: function (result) { success: function (result) {
@ -1271,8 +1299,7 @@
if (data._msg != undefined) { if (data._msg != undefined) {
parent.hg.msg(data._msg); parent.hg.msg(data._msg);
} }
else else {
{
$("#wipMAC_StartNO").val(data.mix); $("#wipMAC_StartNO").val(data.mix);
$("#wipMAC_EndNO").val(data.max); $("#wipMAC_EndNO").val(data.max);
$("#wipMAC_StartNO").attr("readonly", "readonly"); $("#wipMAC_StartNO").attr("readonly", "readonly");
@ -1394,16 +1421,14 @@
$(obj).attr("href", filePath); $(obj).attr("href", filePath);
}; };
function getFlowRuleList(data) function getFlowRuleList(data) {
{
$.ajax( $.ajax(
{ {
url: "@Url.Action("GetMaterialFlowRuleJson", "PCS")", url: "@Url.Action("GetMaterialFlowRuleJson", "PCS")",
dataType: 'json', dataType: 'json',
data: { "itemno": $("#wipAtt_ItemNO").val(), "unit_no": $("#wipInfo_UnitNO").val()}, data: { "itemno": $("#wipAtt_ItemNO").val(), "unit_no": $("#wipInfo_UnitNO").val() },
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
console.info(result.data); console.info(result.data);
$("#wipInfo_FlowRuleID").empty();//清空下拉框的值 $("#wipInfo_FlowRuleID").empty();//清空下拉框的值
$.each(result.data, function (index, item) { $.each(result.data, function (index, item) {
@ -1413,23 +1438,20 @@
layui.form.render("select");//重新渲染 固定写法 layui.form.render("select");//重新渲染 固定写法
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
}; };
function getLineInfoList(data) function getLineInfoList(data) {
{
$.ajax( $.ajax(
{ {
url: "@Url.Action("GetUnitLineJson", "BAS")", url: "@Url.Action("GetUnitLineJson", "BAS")",
dataType: 'json', dataType: 'json',
data: { "unit_no": $("#wipInfo_UnitNO").val()}, data: { "unit_no": $("#wipInfo_UnitNO").val() },
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
console.info(result.data); console.info(result.data);
var value = $("#wipInfo_LineID").val(); var value = $("#wipInfo_LineID").val();
$("#wipInfo_LineID").empty();//清空下拉框的值 $("#wipInfo_LineID").empty();//清空下拉框的值
@ -1438,11 +1460,10 @@
}); });
//$("#wipInfo_LineID option:eq(1)").attr("selected", 'selected'); //默认选择第一个选项 //$("#wipInfo_LineID option:eq(1)").attr("selected", 'selected'); //默认选择第一个选项
$("#wipInfo_LineID option[value=" + value+"]").prop("selected", true); $("#wipInfo_LineID option[value=" + value + "]").prop("selected", true);
layui.form.render("select");//重新渲染 固定写法 layui.form.render("select");//重新渲染 固定写法
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1455,14 +1476,12 @@
{ {
url: "@Url.Action("getUserName", "SYS")", url: "@Url.Action("getUserName", "SYS")",
dataType: 'json', dataType: 'json',
data: { "userNo": val.value}, data: { "userNo": val.value },
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
$(val).closest('div.layui-inline').find('input[id*=' + val.id + '_Name]').val(result.data); $(val).closest('div.layui-inline').find('input[id*=' + val.id + '_Name]').val(result.data);
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1477,12 +1496,10 @@
dataType: 'json', dataType: 'json',
data: { "itemno": $("#wipAtt_ItemNO").val(), "unit_no": $("#wipInfo_UnitNO").val(), "flowID": NewID }, data: { "itemno": $("#wipAtt_ItemNO").val(), "unit_no": $("#wipInfo_UnitNO").val(), "flowID": NewID },
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
$("#wipInfo_FlowRemark").val(result.data); $("#wipInfo_FlowRemark").val(result.data);
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1524,7 +1541,7 @@
sort: true sort: true
},] },]
]; ];
var tableruleStation = hg.table.datatable('ruleStation', '', '/PCS/GetRuleStationByWipNo?wipNo=' + $("#wipInfo_WipNO").val() + '&newID='+NewID+'&oldID='+OldID , {}, tableCols_rule, '', false, 'full-100'); var tableruleStation = hg.table.datatable('ruleStation', '', '/PCS/GetRuleStationByWipNo?wipNo=' + $("#wipInfo_WipNO").val() + '&newID=' + NewID + '&oldID=' + OldID, {}, tableCols_rule, '', false, 'full-100');
tableruleStation; tableruleStation;
} }
@ -1547,8 +1564,8 @@
var contactdiv = '<tr>' + var contactdiv = '<tr>' +
'<td><input type="hidden" value="" name="WipKps[' + No + '].WipKpID" />' + '<td><input type="hidden" value="" name="WipKps[' + No + '].WipKpID" />' +
'<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpName" /></td>' + '<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpName" /></td>' +
'<td>'+SelectKPNo+'</td>' + '<td>' + SelectKPNo + '</td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpSeq" value=' + (No+1)+' /></td>' + '<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpSeq" value=' + (No + 1) + ' /></td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Title" /></td>' + '<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Title" /></td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Length" /></td>' + '<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Length" /></td>' +
'<td>' + Select + '</td>' + '<td>' + Select + '</td>' +
@ -1588,7 +1605,7 @@
var contactdiv = '<tr>' + var contactdiv = '<tr>' +
'<td><input type="hidden" value="" name="WipOutfits[' + No + '].WipOutfitID" />'+ SelectPartNo+'</td>'+ '<td><input type="hidden" value="" name="WipOutfits[' + No + '].WipOutfitID" />' + SelectPartNo + '</td>' +
'<td>' + Select + '</td>' + '<td>' + Select + '</td>' +
'<td>' + SelectStation + '</td>' + '<td>' + SelectStation + '</td>' +
'<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' + '<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' +
@ -1618,7 +1635,7 @@
var contactdiv = '<tr>' + var contactdiv = '<tr>' +
'<td><input type="hidden" value="" name="WipSops[' + No + '].WipSOPID" />' + '<td><input type="hidden" value="" name="WipSops[' + No + '].WipSOPID" />' +
'<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPName" /></td>' + '<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPName" /></td>' +
/* '<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPPath" /></td>' +*/ /* '<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPPath" /></td>' +*/
'<td>' + SelectSOPType + '</td>' + '<td>' + SelectSOPType + '</td>' +
'<td>' + Select + '</td>' + '<td>' + Select + '</td>' +
'<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' + '<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' +
@ -1642,22 +1659,19 @@
}; };
//生產單位By工單號碼選單 //生產單位By工單號碼選單
function getFactoryUnitByWipNoList() function getFactoryUnitByWipNoList() {
{
var a; var a;
$.ajax( $.ajax(
{ {
url: "@Url.Action("GetFactoryUnitByWipNoJson", "PCS")", url: "@Url.Action("GetFactoryUnitByWipNoJson", "PCS")",
dataType: 'json', dataType: 'json',
data: { "wipNo": $("#wipInfo_WipNO").val()}, data: { "wipNo": $("#wipInfo_WipNO").val() },
async:false, async: false,
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
a = result.data; a = result.data;
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1665,22 +1679,19 @@
}; };
//KP Items 選單 //KP Items 選單
function getItemsList() function getItemsList() {
{
var b; var b;
$.ajax( $.ajax(
{ {
url: "@Url.Action("getKpItemsJson", "PCS")", url: "@Url.Action("getKpItemsJson", "PCS")",
dataType: 'json', dataType: 'json',
data: {}, data: {},
async:false, async: false,
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
b = result.data; b = result.data;
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1688,22 +1699,19 @@
}; };
//治具種類 //治具種類
function getOutfitCommodityList() function getOutfitCommodityList() {
{
var a; var a;
$.ajax( $.ajax(
{ {
url: "@Url.Action("GetOutfitCommodityInfoJson", "PCS")", url: "@Url.Action("GetOutfitCommodityInfoJson", "PCS")",
dataType: 'json', dataType: 'json',
data: {}, data: {},
async:false, async: false,
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
a = result.data; a = result.data;
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1711,22 +1719,19 @@
}; };
//流程ID對應作業站 //流程ID對應作業站
function getRuleStationByFlowID(data) function getRuleStationByFlowID(data) {
{
var b; var b;
$.ajax( $.ajax(
{ {
url: "@Url.Action("GetRuleStationByWipNoUnitNoJson", "PCS")", url: "@Url.Action("GetRuleStationByWipNoUnitNoJson", "PCS")",
dataType: 'json', dataType: 'json',
data: { "wipNo": $("#wipInfo_WipNO").val()}, data: { "wipNo": $("#wipInfo_WipNO").val() },
async:false, async: false,
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
b = result.data; b = result.data;
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1741,14 +1746,12 @@
url: "@Url.Action("GetSOPTypeJson", "PCS")", url: "@Url.Action("GetSOPTypeJson", "PCS")",
dataType: 'json', dataType: 'json',
data: {}, data: {},
async:false, async: false,
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
a = result.data; a = result.data;
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -1763,7 +1766,7 @@
url: "@Url.Action("GetFactoryInfoes", "BAS")", url: "@Url.Action("GetFactoryInfoes", "BAS")",
dataType: 'json', dataType: 'json',
data: {}, data: {},
async:false, async: false,
type: 'get', type: 'get',
success: function (result) { success: function (result) {
$.each(result.data, function (index, item) { $.each(result.data, function (index, item) {
@ -1791,7 +1794,7 @@
success: function (layero) { success: function (layero) {
layero.find('.layui-layer-content').css({ layero.find('.layui-layer-content').css({
'padding-top': '40px', 'padding-top': '40px',
'width':'200px' 'width': '200px'
}) })
} }
}); });
@ -1825,7 +1828,7 @@
SelectKPNo += '</select>'; SelectKPNo += '</select>';
var contactdiv = '<tr>' + var contactdiv = '<tr>' +
'<td><input type="hidden" value="" name="WipKps[' + No + '].WipKpID" />' + '<td><input type="hidden" value="" name="WipKps[' + No + '].WipKpID" />' +
'<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpName" value=' + item.kpName+' /></td>' + '<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpName" value=' + item.kpName + ' /></td>' +
'<td>' + SelectKPNo + '</td>' + '<td>' + SelectKPNo + '</td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpSeq" value=' + item.kpSeq + ' ></td>' + '<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpSeq" value=' + item.kpSeq + ' ></td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Title" value=' + item.title + ' ></td>' + '<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Title" value=' + item.title + ' ></td>' +

8
AMESCoreStudio.Web/Views/PCS/PCS034.cshtml

@ -1156,6 +1156,7 @@
var itemNo = $('#wipAtt_ItemNO').val(); var itemNo = $('#wipAtt_ItemNO').val();
var planQTY = $('#wipInfo_PlanQTY').val(); var planQTY = $('#wipInfo_PlanQTY').val();
var lotNo = $('#lotNo').val(); var lotNo = $('#lotNo').val();
var wipShcDate = $('#wipInfo_WipScheduleDate').val();
if (itemNo == '' || !itemNo) { if (itemNo == '' || !itemNo) {
parent.hg.msg("請輸入料號"); parent.hg.msg("請輸入料號");
return; return;
@ -1164,7 +1165,10 @@
parent.hg.msg("請確認計畫數量"); parent.hg.msg("請確認計畫數量");
return; return;
} }
if (wipShcDate == '') {
parent.hg.msg("請確認預計開工日期有填寫");
return;
}
if (lotNo == '' || !lotNo) { if (lotNo == '' || !lotNo) {
lotNo = getLotNo(); lotNo = getLotNo();
} }
@ -1172,7 +1176,7 @@
$.ajax({ $.ajax({
url: '@Url.Action("GetBarcodeOther", "PCS")', url: '@Url.Action("GetBarcodeOther", "PCS")',
dataType: 'json', dataType: 'json',
data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY ,"wipNo":'@Model.wipInfo.WipNO'}, data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY ,"wipNo":'@Model.wipInfo.WipNO', "wipShcDate": wipShcDate},
cache: false, cache: false,
type: "POST", type: "POST",
success: function (result) { success: function (result) {

Loading…
Cancel
Save