|
|
@ -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> |
|
|
@ -254,20 +260,20 @@ |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
@*<div class="layui-form-item"> |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label">生產序號</label> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input asp-for="wipBarcode.StartNO" class="layui-input" /> |
|
|
|
</div> |
|
|
|
<div class="layui-form-mid">-</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input asp-for="wipBarcode.EndNO" class="layui-input" /> |
|
|
|
</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input id="GetBarCode" class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm" type="button" value="產生條碼" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div>*@ |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label">生產序號</label> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input asp-for="wipBarcode.StartNO" class="layui-input" /> |
|
|
|
</div> |
|
|
|
<div class="layui-form-mid">-</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input asp-for="wipBarcode.EndNO" class="layui-input" /> |
|
|
|
</div> |
|
|
|
<div class="layui-input-inline"> |
|
|
|
<input id="GetBarCode" class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm" type="button" value="產生條碼" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div>*@ |
|
|
|
|
|
|
|
<div class="layui-form-item"> |
|
|
|
<div class="layui-inline"> |
|
|
@ -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,12 +480,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.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="點防焊膠" />*@ |
|
|
|
<input asp-for="wipBoard.DipTape" type="checkbox" title="貼付膠帶" /> |
|
|
|
<input asp-for="wipBoard.SmdSolderMask" type="checkbox" title="點防焊膠" />*@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -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,15 +967,17 @@ |
|
|
|
<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%;"> |
|
|
|
SOP文件敘述 |
|
|
|
</th> |
|
|
|
@*<th> |
|
|
|
檔案路徑 |
|
|
|
</th>*@ |
|
|
|
檔案路徑 |
|
|
|
</th>*@ |
|
|
|
<th> |
|
|
|
SOP類型 |
|
|
|
</th> |
|
|
@ -974,8 +998,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> |
|
|
@ -1042,52 +1066,52 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
@* 上傳資料sheet *@ |
|
|
|
<div class="layui-tab-item"> |
|
|
|
<span style="color:red">**預覽只能顯示圖檔、PDF、文字檔**</span> |
|
|
|
<div class="layui-form-item"> |
|
|
|
<table lay-filter="demo" class="layui-table"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th lay-data="{field:'username'}">檔案名稱</th> |
|
|
|
<th lay-data="{field:'experience', sort:true}">檔案路徑</th> |
|
|
|
<th lay-data="{field:'right', width:80, sort:true}">預覽</th> |
|
|
|
<th lay-data="{field:'right', width:80, sort:true}">下載</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
@foreach (var index in Model.wipInfoBlobs) |
|
|
|
{ |
|
|
|
<div class="layui-tab-item"> |
|
|
|
<span style="color:red">**預覽只能顯示圖檔、PDF、文字檔**</span> |
|
|
|
<div class="layui-form-item"> |
|
|
|
<table lay-filter="demo" class="layui-table"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<td> |
|
|
|
<span id="FileName">@index.ImageName</span> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<span id="Filepath">@index.Filepath</span> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-read" onclick="show(this)">預覽</a> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs" onclick="filedownload(this)">下載</a> |
|
|
|
</td> |
|
|
|
<th lay-data="{field:'username'}">檔案名稱</th> |
|
|
|
<th lay-data="{field:'experience', sort:true}">檔案路徑</th> |
|
|
|
<th lay-data="{field:'right', width:80, sort:true}">預覽</th> |
|
|
|
<th lay-data="{field:'right', width:80, sort:true}">下載</th> |
|
|
|
</tr> |
|
|
|
} |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<div class="layui-form-item"> |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label" asp-for="wipInfoBlob.ImageName">檔案</label> |
|
|
|
<label class="layui-btn"> |
|
|
|
<input type="file" name="formFile"> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
@foreach (var index in Model.wipInfoBlobs) |
|
|
|
{ |
|
|
|
<tr> |
|
|
|
<td> |
|
|
|
<span id="FileName">@index.ImageName</span> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<span id="Filepath">@index.Filepath</span> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-read" onclick="show(this)">預覽</a> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs" onclick="filedownload(this)">下載</a> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
} |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<div class="layui-form-item"> |
|
|
|
<div class="layui-inline"> |
|
|
|
<label class="layui-form-label" asp-for="wipInfoBlob.ImageName">檔案</label> |
|
|
|
<label class="layui-btn"> |
|
|
|
<input type="file" name="formFile"> |
|
|
|
|
|
|
|
@*<i class="layui-icon"></i>上傳文件*@ |
|
|
|
</label> |
|
|
|
<input type="hidden" asp-for="wipInfoBlob.ImageName"> |
|
|
|
@*<i class="layui-icon"></i>上傳文件*@ |
|
|
|
</label> |
|
|
|
<input type="hidden" asp-for="wipInfoBlob.ImageName"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span> |
|
|
@ -1145,16 +1169,16 @@ |
|
|
|
} |
|
|
|
|
|
|
|
// DIV keyPartsExcel |
|
|
|
@if(Model.wipInfo.WipNO.StartsWith("981")) |
|
|
|
{ |
|
|
|
<text>$("#keyPartExcel").show();</text> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<text>$("#keyPartExcel").hide();</text> |
|
|
|
} |
|
|
|
@if (Model.wipInfo.WipNO.StartsWith("981")) |
|
|
|
{ |
|
|
|
<text>$("#keyPartExcel").show(); </text> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<text>$("#keyPartExcel").hide(); </text> |
|
|
|
} |
|
|
|
|
|
|
|
getLineInfoList($("#unit").val()); |
|
|
|
getLineInfoList($("#unit").val()); |
|
|
|
|
|
|
|
// 產生條碼 |
|
|
|
$('#GetBarCode').click(function () { |
|
|
@ -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) { |
|
|
@ -1225,10 +1253,10 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
else { |
|
|
|
$.ajax({ |
|
|
|
$.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) { |
|
|
@ -1244,7 +1272,7 @@ |
|
|
|
error: function (jqXHR, textStatus, errorThrown) { |
|
|
|
alert("Found error when using Ajax!!"); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
}); |
|
|
@ -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"); |
|
|
@ -1288,7 +1315,7 @@ |
|
|
|
function PrefixInteger(num, length) { |
|
|
|
return (Array(length).join('0') + num).slice(-length); |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
layui.config({ |
|
|
|
base: '/js/' //假设这是test.js所在的目录 |
|
|
@ -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()}, |
|
|
|
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()}, |
|
|
|
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();//清空下拉框的值 |
|
|
@ -1438,11 +1460,10 @@ |
|
|
|
|
|
|
|
}); |
|
|
|
//$("#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");//重新渲染 固定写法 |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1451,38 +1472,34 @@ |
|
|
|
//UserName |
|
|
|
function getUserName(val) { |
|
|
|
if (val.value.length != 0) { |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("getUserName", "SYS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "userNo": val.value}, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
$(val).closest('div.layui-inline').find('input[id*=' + val.id + '_Name]').val(result.data); |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
|
url: "@Url.Action("getUserName", "SYS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "userNo": val.value }, |
|
|
|
type: 'post', |
|
|
|
success: function (result) { |
|
|
|
$(val).closest('div.layui-inline').find('input[id*=' + val.id + '_Name]').val(result.data); |
|
|
|
}, |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
// RuleStation 備註 |
|
|
|
function RuleStation(NewID) { |
|
|
|
$.ajax( |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("getMaterialFlowRuleRemark", "PCS")", |
|
|
|
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', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
$("#wipInfo_FlowRemark").val(result.data); |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1524,7 +1541,7 @@ |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
@ -1547,8 +1564,8 @@ |
|
|
|
var contactdiv = '<tr>' + |
|
|
|
'<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>' + |
|
|
|
'<td>'+SelectKPNo+'</td>' + |
|
|
|
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpSeq" value=' + (No+1)+' /></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 + '].Title" /></td>' + |
|
|
|
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Length" /></td>' + |
|
|
|
'<td>' + Select + '</td>' + |
|
|
@ -1576,7 +1593,7 @@ |
|
|
|
var SelectPartNo = "<select name=WipOutfits[" + No + "].PartNo>"; |
|
|
|
$.each(OutfitCommodity, function (index, item) { |
|
|
|
SelectPartNo += '<option value=' + item.value + '>' + item.text + '</option>'; |
|
|
|
}); |
|
|
|
}); |
|
|
|
SelectPartNo += '</select>'; |
|
|
|
|
|
|
|
var RuleStation = getRuleStationByFlowID(); |
|
|
@ -1588,7 +1605,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
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>' + SelectStation + '</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>' + |
|
|
|
'<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>' + |
|
|
|
/* '<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>' + Select + '</td>' + |
|
|
|
'<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' + |
|
|
@ -1628,7 +1645,7 @@ |
|
|
|
layui.form.render("select");//重新渲染 固定写法 |
|
|
|
}); |
|
|
|
|
|
|
|
// Table 刪除 |
|
|
|
// Table 刪除 |
|
|
|
function Remove(button) { |
|
|
|
//Determine the reference of the Row using the Button. |
|
|
|
hg.confirm("確認要刪除此筆資料嗎?", function () { |
|
|
@ -1642,22 +1659,19 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//生產單位By工單號碼選單 |
|
|
|
function getFactoryUnitByWipNoList() |
|
|
|
{ |
|
|
|
function getFactoryUnitByWipNoList() { |
|
|
|
var a; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("GetFactoryUnitByWipNoJson", "PCS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "wipNo": $("#wipInfo_WipNO").val()}, |
|
|
|
async:false, |
|
|
|
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,22 +1679,19 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//KP Items 選單 |
|
|
|
function getItemsList() |
|
|
|
{ |
|
|
|
function getItemsList() { |
|
|
|
var b; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("getKpItemsJson", "PCS")", |
|
|
|
dataType: 'json', |
|
|
|
data: {}, |
|
|
|
async:false, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
b = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1688,22 +1699,19 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//治具種類 |
|
|
|
function getOutfitCommodityList() |
|
|
|
{ |
|
|
|
function getOutfitCommodityList() { |
|
|
|
var a; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("GetOutfitCommodityInfoJson", "PCS")", |
|
|
|
dataType: 'json', |
|
|
|
data: {}, |
|
|
|
async:false, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
a = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1711,22 +1719,19 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
//流程ID對應作業站 |
|
|
|
function getRuleStationByFlowID(data) |
|
|
|
{ |
|
|
|
function getRuleStationByFlowID(data) { |
|
|
|
var b; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("GetRuleStationByWipNoUnitNoJson", "PCS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "wipNo": $("#wipInfo_WipNO").val()}, |
|
|
|
async:false, |
|
|
|
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); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1735,20 +1740,18 @@ |
|
|
|
|
|
|
|
//SOPType |
|
|
|
function getSOPType() { |
|
|
|
var a; |
|
|
|
var a; |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("GetSOPTypeJson", "PCS")", |
|
|
|
dataType: 'json', |
|
|
|
data: {}, |
|
|
|
async:false, |
|
|
|
async: false, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
{ |
|
|
|
success: function (result) { |
|
|
|
a = result.data; |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
@ -1763,7 +1766,7 @@ |
|
|
|
url: "@Url.Action("GetFactoryInfoes", "BAS")", |
|
|
|
dataType: 'json', |
|
|
|
data: {}, |
|
|
|
async:false, |
|
|
|
async: false, |
|
|
|
type: 'get', |
|
|
|
success: function (result) { |
|
|
|
$.each(result.data, function (index, item) { |
|
|
@ -1789,10 +1792,10 @@ |
|
|
|
shade: [0.4, '#000'], |
|
|
|
content: '匯入中...', |
|
|
|
success: function (layero) { |
|
|
|
layero.find('.layui-layer-content').css({ |
|
|
|
'padding-top': '40px', |
|
|
|
'width':'200px' |
|
|
|
}) |
|
|
|
layero.find('.layui-layer-content').css({ |
|
|
|
'padding-top': '40px', |
|
|
|
'width': '200px' |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
$.ajax({ |
|
|
@ -1825,7 +1828,7 @@ |
|
|
|
SelectKPNo += '</select>'; |
|
|
|
var contactdiv = '<tr>' + |
|
|
|
'<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><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>' + |
|
|
@ -1849,7 +1852,7 @@ |
|
|
|
}, |
|
|
|
error: function () { |
|
|
|
hg.msg("上傳文件錯誤!"); |
|
|
|
layer.close(index); |
|
|
|
layer.close(index); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|