|
|
@ -1,8 +1,10 @@ |
|
|
|
@model AMESCoreStudio.Web.ViewModels.PCS.WipDataViewModel |
|
|
|
|
|
|
|
|
|
|
|
@{ ViewData["Title"] = "PCS003"; |
|
|
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; } |
|
|
|
@{ |
|
|
|
ViewData["Title"] = "PCS003"; |
|
|
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
|
|
|
} |
|
|
|
|
|
|
|
<style> |
|
|
|
.control-label { |
|
|
@ -26,8 +28,12 @@ |
|
|
|
<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="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="wipMAC.WipNO" type="hidden" value="@if(Model.wipMAC != null){ @Model.wipMAC.WipNO }" /> |
|
|
|
<input asp-for="wipBarcodeOther.OtherID" type="hidden" value="@if(Model.wipBarcodeOther != null){ |
|
|
|
@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"> |
|
|
|
<input @(Model.wipInfo.InputFlag == "Y" ? "checked" : "") type="checkbox" name="wipInfo.InputFlag" title="判斷前製程是否已經投入" /> |
|
|
|
</div> |
|
|
@ -334,7 +340,9 @@ |
|
|
|
</div> |
|
|
|
<input type="hidden" value=@Model.WipKps.Count() id="WipKpCount" /> |
|
|
|
<table id="KPTable" class="layui-table"> |
|
|
|
@{int k = 0;} |
|
|
|
@{ |
|
|
|
int k = 0; |
|
|
|
} |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th> |
|
|
@ -472,9 +480,15 @@ |
|
|
|
<label class="layui-form-label">DIP</label> |
|
|
|
<div class="layui-input-block"> |
|
|
|
<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) { @(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 @if (Model.wipBoard != null) { |
|
|
|
@(Model.wipBoard.DipCarrier == "Y" ? "checked" : "") |
|
|
|
} 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.DipTape" type="checkbox" title="貼付膠帶" /> |
|
|
|
<input asp-for="wipBoard.SmdSolderMask" type="checkbox" title="點防焊膠" />*@ |
|
|
@ -493,7 +507,9 @@ |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label">燒錄</label> |
|
|
|
<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="是否燒入" />*@ |
|
|
|
</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
@ -515,7 +531,9 @@ |
|
|
|
|
|
|
|
<div class="layui-form-item"> |
|
|
|
<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 class="layui-inline"> |
|
|
|
<label class="layui-form-label">零件烘烤溫度</label> |
|
|
@ -845,7 +863,9 @@ |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label">FINE_PACKAGE</label> |
|
|
|
<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> |
|
|
@ -897,7 +917,9 @@ |
|
|
|
<a id="OutfitTableAdd" class="layui-btn">新增</a> |
|
|
|
<input type="hidden" value=@Model.WipOutfits.Count() id="WipOutfitCount" /> |
|
|
|
<table id="OutfitTable" class="layui-table"> |
|
|
|
@{int l = 0;} |
|
|
|
@{ |
|
|
|
int l = 0; |
|
|
|
} |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th> |
|
|
@ -945,7 +967,9 @@ |
|
|
|
<a id="SopTableAdd" class="layui-btn">新增</a> |
|
|
|
<input type="hidden" value=@Model.WipSops.Count() id="WipSopCount" /> |
|
|
|
<table id="SopTable" class="layui-table"> |
|
|
|
@{int i = 0;} |
|
|
|
@{ |
|
|
|
int i = 0; |
|
|
|
} |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th style="width:50%;"> |
|
|
@ -1178,6 +1202,7 @@ |
|
|
|
var itemNo = $('#wipAtt_ItemNO').val(); |
|
|
|
var planQTY = $('#wipInfo_PlanQTY').val(); |
|
|
|
var lotNo = $('#lotNo').val(); |
|
|
|
var wipShcDate = $('#wipInfo_WipScheduleDate').val(); |
|
|
|
|
|
|
|
if (itemNo == '' || !itemNo) { |
|
|
|
parent.hg.msg("請輸入料號"); |
|
|
@ -1188,11 +1213,14 @@ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (wipShcDate == '') { |
|
|
|
parent.hg.msg("請確認預計開工日期有填寫"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (lotNo == '' || !lotNo) { |
|
|
|
lotNo = getLotNo(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var StartNO = $("#wipBarcodeOther_StartNO").val(); |
|
|
|
var EndNO = $("#wipBarcodeOther_EndNO").val(); |
|
|
|
|
|
|
@ -1204,7 +1232,7 @@ |
|
|
|
$.ajax({ |
|
|
|
url: '@Url.Action("GetBarcodeOther", "PCS")', |
|
|
|
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, |
|
|
|
type: "POST", |
|
|
|
success: function (result) { |
|
|
@ -1228,7 +1256,7 @@ |
|
|
|
$.ajax({ |
|
|
|
url: '@Url.Action("GetBarcodeOther", "PCS")', |
|
|
|
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, |
|
|
|
type: "POST", |
|
|
|
success: function (result) { |
|
|
@ -1271,8 +1299,7 @@ |
|
|
|
if (data._msg != undefined) { |
|
|
|
parent.hg.msg(data._msg); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
else { |
|
|
|
$("#wipMAC_StartNO").val(data.mix); |
|
|
|
$("#wipMAC_EndNO").val(data.max); |
|
|
|
$("#wipMAC_StartNO").attr("readonly", "readonly"); |
|
|
@ -1394,16 +1421,14 @@ |
|
|
|
$(obj).attr("href", filePath); |
|
|
|
}; |
|
|
|
|
|
|
|
function getFlowRuleList(data) |
|
|
|
{ |
|
|
|
function getFlowRuleList(data) { |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("GetMaterialFlowRuleJson", "PCS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "itemno": $("#wipAtt_ItemNO").val(), "unit_no": $("#wipInfo_UnitNO").val() }, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
console.info(result.data); |
|
|
|
$("#wipInfo_FlowRuleID").empty();//清空下拉框的值 |
|
|
|
$.each(result.data, function (index, item) { |
|
|
@ -1413,23 +1438,20 @@ |
|
|
|
layui.form.render("select");//重新渲染 固定写法 |
|
|
|
|
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
function getLineInfoList(data) |
|
|
|
{ |
|
|
|
function getLineInfoList(data) { |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("GetUnitLineJson", "BAS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "unit_no": $("#wipInfo_UnitNO").val() }, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
console.info(result.data); |
|
|
|
var value = $("#wipInfo_LineID").val(); |
|
|
|
$("#wipInfo_LineID").empty();//清空下拉框的值 |
|
|
@ -1441,8 +1463,7 @@ |
|
|
|
$("#wipInfo_LineID option[value=" + value + "]").prop("selected", true); |
|
|
|
layui.form.render("select");//重新渲染 固定写法 |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1457,12 +1478,10 @@ |
|
|
|
dataType: 'json', |
|
|
|
data: { "userNo": val.value }, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
$(val).closest('div.layui-inline').find('input[id*=' + val.id + '_Name]').val(result.data); |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1477,12 +1496,10 @@ |
|
|
|
dataType: 'json', |
|
|
|
data: { "itemno": $("#wipAtt_ItemNO").val(), "unit_no": $("#wipInfo_UnitNO").val(), "flowID": NewID }, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
$("#wipInfo_FlowRemark").val(result.data); |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1642,8 +1659,7 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//生產單位By工單號碼選單 |
|
|
|
function getFactoryUnitByWipNoList() |
|
|
|
{ |
|
|
|
function getFactoryUnitByWipNoList() { |
|
|
|
var a; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
@ -1652,12 +1668,10 @@ |
|
|
|
data: { "wipNo": $("#wipInfo_WipNO").val() }, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
a = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1665,8 +1679,7 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//KP Items 選單 |
|
|
|
function getItemsList() |
|
|
|
{ |
|
|
|
function getItemsList() { |
|
|
|
var b; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
@ -1675,12 +1688,10 @@ |
|
|
|
data: {}, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
b = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1688,8 +1699,7 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//治具種類 |
|
|
|
function getOutfitCommodityList() |
|
|
|
{ |
|
|
|
function getOutfitCommodityList() { |
|
|
|
var a; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
@ -1698,12 +1708,10 @@ |
|
|
|
data: {}, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
a = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1711,8 +1719,7 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//流程ID對應作業站 |
|
|
|
function getRuleStationByFlowID(data) |
|
|
|
{ |
|
|
|
function getRuleStationByFlowID(data) { |
|
|
|
var b; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
@ -1721,12 +1728,10 @@ |
|
|
|
data: { "wipNo": $("#wipInfo_WipNO").val() }, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
b = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1743,12 +1748,10 @@ |
|
|
|
data: {}, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
a = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
|