|
|
@ -211,8 +211,8 @@ |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input asp-for="wipAtt.ECN" class="layui-input" maxlength="20" /> |
|
|
|
@*<a onclick="GetPLM_ECN();" class="layui-btn layui-btn-sm layui-btn-normal" style="padding: 0 5px;" title="更新ECN/ECR"> |
|
|
|
<i class="layui-icon layui-icon-sm"></i> |
|
|
|
</a>*@ |
|
|
|
<i class="layui-icon layui-icon-sm"></i> |
|
|
|
</a>*@ |
|
|
|
</div> |
|
|
|
<label asp-for="wipAtt.EAN" class="layui-form-label"></label> |
|
|
|
<div class="layui-input-inline"> |
|
|
@ -280,14 +280,14 @@ |
|
|
|
<input asp-for="wipBarcodeOther.EndNO" class="layui-input" readonly="readonly" /> |
|
|
|
</div> |
|
|
|
@*<div id="barcodeOtherDiv" style="display:inline;"> |
|
|
|
<label class="layui-form-label">lotNo</label> |
|
|
|
<div class="layui-input-inline" style="width:100px;"> |
|
|
|
<input id="lotNo" class="layui-input" style="width:100px;" type="text" /> |
|
|
|
</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input id="GetBarcodeOther" class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm" type="button" value="產生出貨序號" /> |
|
|
|
</div> |
|
|
|
</div>*@ |
|
|
|
<label class="layui-form-label">lotNo</label> |
|
|
|
<div class="layui-input-inline" style="width:100px;"> |
|
|
|
<input id="lotNo" class="layui-input" style="width:100px;" type="text" /> |
|
|
|
</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input id="GetBarcodeOther" class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm" type="button" value="產生出貨序號" /> |
|
|
|
</div> |
|
|
|
</div>*@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-form-item"> |
|
|
@ -397,8 +397,8 @@ |
|
|
|
} |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
@* <div style="text-align: right"> |
|
|
|
<input type="submit" value="通知PE" name="action" class="layui-btn" /> |
|
|
|
@* <div style="text-align: right"> |
|
|
|
<input type="submit" value="通知PE" name="action" class="layui-btn" /> |
|
|
|
</div> *@ |
|
|
|
</div> |
|
|
|
|
|
|
@ -489,9 +489,18 @@ |
|
|
|
<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.DipSolderMask" /> |
|
|
|
<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.DipSolderMask" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -507,7 +516,10 @@ |
|
|
|
<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" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<label class="layui-form-label">燒機位置</label> |
|
|
@ -528,7 +540,10 @@ |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label">零件烘烤</label> |
|
|
|
<div class="layui-input-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> |
|
|
|
<label class="layui-form-label">零件烘烤溫度</label> |
|
|
|
<div class="layui-input-inline" style="width:100px"> |
|
|
@ -541,7 +556,10 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input @if (Model.wipBoard != null) { @(Model.wipBoard.PartsBakeOvertime == "Y" ? "checked" : "") } type="checkbox" title="零件烘烤超過48hrs" name="wipBoard.PartsBakeOvertime" /> |
|
|
|
<input @if (Model.wipBoard != null) |
|
|
|
{ |
|
|
|
@(Model.wipBoard.PartsBakeOvertime == "Y" ? "checked" : "") |
|
|
|
} type="checkbox" title="零件烘烤超過48hrs" name="wipBoard.PartsBakeOvertime" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -557,7 +575,10 @@ |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label">PCB烘烤</label> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input @if (Model.wipBoard != null) { @(Model.wipBoard.ISPcbBake == "Y" ? "checked" : "") } type="checkbox" title="PCB是否需要烘烤" name="wipBoard.ISPcbBake" /> |
|
|
|
<input @if (Model.wipBoard != null) |
|
|
|
{ |
|
|
|
@(Model.wipBoard.ISPcbBake == "Y" ? "checked" : "") |
|
|
|
} type="checkbox" title="PCB是否需要烘烤" name="wipBoard.ISPcbBake" /> |
|
|
|
</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<select asp-items="@ViewBag.GetPCBBakeTypeSelect" asp-for="wipBoard.PcbBake" class=""></select> |
|
|
@ -865,7 +886,10 @@ |
|
|
|
<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> |
|
|
@ -976,8 +1000,8 @@ |
|
|
|
SOP文件敘述 |
|
|
|
</th> |
|
|
|
@*<th> |
|
|
|
檔案路徑 |
|
|
|
</th>*@ |
|
|
|
檔案路徑 |
|
|
|
</th>*@ |
|
|
|
<th> |
|
|
|
SOP類型 |
|
|
|
</th> |
|
|
@ -1001,8 +1025,8 @@ |
|
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.SOPName" name="WipSops[@i].SOPName" /> |
|
|
|
</td> |
|
|
|
@*<td> |
|
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.SOPPath" name="WipSops[@i].SOPPath" /> |
|
|
|
</td>*@ |
|
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.SOPPath" name="WipSops[@i].SOPPath" /> |
|
|
|
</td>*@ |
|
|
|
<td> |
|
|
|
<select asp-for="@index.SOPType" name="WipSops[@i].SOPType" asp-items="@ViewBag.GetSOPTypeSelect" class=""></select> |
|
|
|
</td> |
|
|
@ -1020,8 +1044,8 @@ |
|
|
|
} |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
@* <div style="text-align: right"> |
|
|
|
<input type="submit" value="工程確認" name="action" class="layui-btn" /> |
|
|
|
@* <div style="text-align: right"> |
|
|
|
<input type="submit" value="工程確認" name="action" class="layui-btn" /> |
|
|
|
</div> *@ |
|
|
|
</div> |
|
|
|
|
|
|
@ -1155,25 +1179,15 @@ |
|
|
|
} |
|
|
|
RuleStation($("#flowId").val()); |
|
|
|
|
|
|
|
// 安勤統一只Show工程資訊 |
|
|
|
$("#system").show(); |
|
|
|
$("#board").hide(); |
|
|
|
|
|
|
|
if ("@ViewBag.WipSpecial" == "N") { |
|
|
|
if ($("#unitNo").val() == "B" || $("#unitNo").val() == "P" || $("#unitNo").val() == "T") { |
|
|
|
$("#system").show(); |
|
|
|
$("#board").hide(); |
|
|
|
} |
|
|
|
else { |
|
|
|
$("#system").hide(); |
|
|
|
$("#board").show(); |
|
|
|
} |
|
|
|
// 判斷工單製程切換工程資訊或板卡資訊 |
|
|
|
if ($("#unitNo").val() == "B" || $("#unitNo").val() == "P" || $("#unitNo").val() == "T") { |
|
|
|
$("#system").show(); |
|
|
|
$("#board").hide(); |
|
|
|
} |
|
|
|
else { |
|
|
|
$("#system").hide(); |
|
|
|
$("#board").show(); |
|
|
|
} |
|
|
|
|
|
|
|
//// DIV 出貨序號 |
|
|
|
//if ($('#wipBarcodeOther_StartNO').val() != "" && $('#wipBarcodeOther_EndNO').val() != "") { |
|
|
|
// $("#barcodeOtherDiv").hide(); |
|
|
|
//} |
|
|
|
|
|
|
|
getLineInfoList($("#unitNo").val()); |
|
|
|
|
|
|
@ -1194,86 +1208,86 @@ |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
@*// 產生出貨序號 |
|
|
|
@*// 產生出貨序號 |
|
|
|
$("#GetBarcodeOther").click(function (event) { |
|
|
|
var itemNo = $('#wipAtt_ItemNO').val(); |
|
|
|
var planQTY = $('#wipInfo_PlanQTY').val(); |
|
|
|
var lotNo = $('#lotNo').val(); |
|
|
|
var wipShcDate = $('#wipInfo_WipScheduleDate').val().replace(/\//g, '-'); |
|
|
|
if (itemNo == '' || !itemNo) { |
|
|
|
parent.hg.msg("請輸入工程編號"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (planQTY == '' || !planQTY || planQTY == 0) { |
|
|
|
parent.hg.msg("請確認計畫數量"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (wipShcDate == '') { |
|
|
|
parent.hg.msg("請確認預計開工日期有填寫"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (lotNo == '' || !lotNo) { |
|
|
|
lotNo = getLotNo(); |
|
|
|
} |
|
|
|
var itemNo = $('#wipAtt_ItemNO').val(); |
|
|
|
var planQTY = $('#wipInfo_PlanQTY').val(); |
|
|
|
var lotNo = $('#lotNo').val(); |
|
|
|
var wipShcDate = $('#wipInfo_WipScheduleDate').val().replace(/\//g, '-'); |
|
|
|
if (itemNo == '' || !itemNo) { |
|
|
|
parent.hg.msg("請輸入工程編號"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (planQTY == '' || !planQTY || planQTY == 0) { |
|
|
|
parent.hg.msg("請確認計畫數量"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (wipShcDate == '') { |
|
|
|
parent.hg.msg("請確認預計開工日期有填寫"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (lotNo == '' || !lotNo) { |
|
|
|
lotNo = getLotNo(); |
|
|
|
} |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
url: '@Url.Action("GetBarcodeOther", "PCS")', |
|
|
|
dataType: 'json', |
|
|
|
data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": '@Model.wipInfo.WipNO', "wipShcDate": wipShcDate }, |
|
|
|
cache: false, |
|
|
|
type: "POST", |
|
|
|
success: function (result) { |
|
|
|
// 錯誤訊息 |
|
|
|
if (!result.success) { |
|
|
|
parent.hg.msg(result.msg); |
|
|
|
} |
|
|
|
else { |
|
|
|
$("#wipBarcodeOther_StartNO").val(result.data.startNO); |
|
|
|
$("#wipBarcodeOther_EndNO").val(result.data.endNO); |
|
|
|
$("#barcodeOtherDiv").hide(); |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function (jqXHR, textStatus, errorThrown) { |
|
|
|
alert("Found error when using Ajax!!"); |
|
|
|
} |
|
|
|
}); |
|
|
|
$.ajax({ |
|
|
|
url: '@Url.Action("GetBarcodeOther", "PCS")', |
|
|
|
dataType: 'json', |
|
|
|
data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": '@Model.wipInfo.WipNO', "wipShcDate": wipShcDate }, |
|
|
|
cache: false, |
|
|
|
type: "POST", |
|
|
|
success: function (result) { |
|
|
|
// 錯誤訊息 |
|
|
|
if (!result.success) { |
|
|
|
parent.hg.msg(result.msg); |
|
|
|
} |
|
|
|
else { |
|
|
|
$("#wipBarcodeOther_StartNO").val(result.data.startNO); |
|
|
|
$("#wipBarcodeOther_EndNO").val(result.data.endNO); |
|
|
|
$("#barcodeOtherDiv").hide(); |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function (jqXHR, textStatus, errorThrown) { |
|
|
|
alert("Found error when using Ajax!!"); |
|
|
|
} |
|
|
|
}); |
|
|
|
});*@ |
|
|
|
|
|
|
|
// 產生MAC |
|
|
|
$("#GetMAC").click(function (event) { |
|
|
|
var wipNO = $('#wipAtt_ItemNO').val(); |
|
|
|
var planQTY = $('#wipInfo_PlanQTY').val(); |
|
|
|
if (wipNO == '' || !wipNO) { |
|
|
|
parent.hg.msg("請輸入工程編號"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (planQTY == '' || !planQTY || planQTY == 0) { |
|
|
|
parent.hg.msg("請確認計畫數量"); |
|
|
|
return; |
|
|
|
} |
|
|
|
$.ajax({ |
|
|
|
url: '@Url.Action("GetMAC", "PCS")', |
|
|
|
dataType: 'json', |
|
|
|
data: { "itemno": $("#wipAtt_ItemNO").val(), "wipNo": $('#wipInfo_WipNO').val(), "planQTY": $('#wipInfo_PlanQTY').val() }, |
|
|
|
cache: false, |
|
|
|
type: "POST", |
|
|
|
success: function (result, textStatus, jqXHR) { |
|
|
|
if (result.success) { |
|
|
|
var contactdiv = `<tr><td>${result.data.mix}</td><td>${result.data.max}</td></tr>`; |
|
|
|
$('#MACTable').append(contactdiv); |
|
|
|
if (result.msg.length != 0) { |
|
|
|
// 產生MAC |
|
|
|
$("#GetMAC").click(function (event) { |
|
|
|
var wipNO = $('#wipAtt_ItemNO').val(); |
|
|
|
var planQTY = $('#wipInfo_PlanQTY').val(); |
|
|
|
if (wipNO == '' || !wipNO) { |
|
|
|
parent.hg.msg("請輸入工程編號"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (planQTY == '' || !planQTY || planQTY == 0) { |
|
|
|
parent.hg.msg("請確認計畫數量"); |
|
|
|
return; |
|
|
|
} |
|
|
|
$.ajax({ |
|
|
|
url: '@Url.Action("GetMAC", "PCS")', |
|
|
|
dataType: 'json', |
|
|
|
data: { "itemno": $("#wipAtt_ItemNO").val(), "wipNo": $('#wipInfo_WipNO').val(), "planQTY": $('#wipInfo_PlanQTY').val() }, |
|
|
|
cache: false, |
|
|
|
type: "POST", |
|
|
|
success: function (result, textStatus, jqXHR) { |
|
|
|
if (result.success) { |
|
|
|
var contactdiv = `<tr><td>${result.data.mix}</td><td>${result.data.max}</td></tr>`; |
|
|
|
$('#MACTable').append(contactdiv); |
|
|
|
if (result.msg.length != 0) { |
|
|
|
parent.hg.msg(result.msg); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
parent.hg.msg(result.msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function (jqXHR, textStatus, errorThrown) { |
|
|
|
alert("Found error when using Ajax!!"); |
|
|
|
} |
|
|
|
else { |
|
|
|
parent.hg.msg(result.msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function (jqXHR, textStatus, errorThrown) { |
|
|
|
alert("Found error when using Ajax!!"); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
function PrefixInteger(num, length) { |
|
|
|
return (Array(length).join('0') + num).slice(-length); |
|
|
|