|
@ -250,14 +250,14 @@ |
|
|
<tbody> |
|
|
<tbody> |
|
|
@foreach (var index in Model.wipBarcodes) |
|
|
@foreach (var index in Model.wipBarcodes) |
|
|
{ |
|
|
{ |
|
|
<tr> |
|
|
<tr> |
|
|
<td> |
|
|
<td> |
|
|
@index.StartNO |
|
|
@index.StartNO |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
@index.EndNO |
|
|
@index.EndNO |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
} |
|
|
} |
|
|
</tbody> |
|
|
</tbody> |
|
|
</table> |
|
|
</table> |
|
@ -309,14 +309,14 @@ |
|
|
<tbody> |
|
|
<tbody> |
|
|
@foreach (var index in Model.wipMACs) |
|
|
@foreach (var index in Model.wipMACs) |
|
|
{ |
|
|
{ |
|
|
<tr> |
|
|
<tr> |
|
|
<td> |
|
|
<td> |
|
|
@index.Title@index.StartNO |
|
|
@index.Title@index.StartNO |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
@index.Title@index.EndNO |
|
|
@index.Title@index.EndNO |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
} |
|
|
} |
|
|
</tbody> |
|
|
</tbody> |
|
|
</table> |
|
|
</table> |
|
@ -346,6 +346,11 @@ |
|
|
<button type="button" id="attachment" title="文件上傳" lay-submit lay-filter="attachment" class="layui-btn layui-btn-normal"> |
|
|
<button type="button" id="attachment" title="文件上傳" lay-submit lay-filter="attachment" class="layui-btn layui-btn-normal"> |
|
|
<i class="layui-icon layui-icon-upload-circle" style="font-size: 20px"></i> |
|
|
<i class="layui-icon layui-icon-upload-circle" style="font-size: 20px"></i> |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
<span>確認筆數:</span> |
|
|
|
|
|
<input class="layui-input" style="width:50px;display: initial;" id="wipKpDbCount" name="wipKpDbCount" readonly="readonly" /> |
|
|
|
|
|
<a onclick="GetKpDbCount();" class="layui-btn layui-btn-sm layui-btn-normal" style="padding: 0 5px;" title="更新燒機資訊"> |
|
|
|
|
|
<i class="layui-icon layui-icon-sm"></i> |
|
|
|
|
|
</a> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<input type="hidden" value=@Model.WipKps.Count() id="WipKpCount" /> |
|
|
<input type="hidden" value=@Model.WipKps.Count() id="WipKpCount" /> |
|
@ -381,30 +386,30 @@ |
|
|
<tbody> |
|
|
<tbody> |
|
|
@foreach (var index in Model.WipKps) |
|
|
@foreach (var index in Model.WipKps) |
|
|
{ |
|
|
{ |
|
|
<tr> |
|
|
<tr> |
|
|
<td> |
|
|
<td> |
|
|
<input name="WipKps[@k].WipKpID" type="hidden" value="@index.WipKpID" /> |
|
|
<input name="WipKps[@k].WipKpID" type="hidden" value="@index.WipKpID" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.KpName" name="WipKps[@k].KpName" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.KpName" name="WipKps[@k].KpName" /> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<select asp-for="@index.KpNo" name="WipKps[@k].KpNo" asp-items="@ViewBag.ItemsList" class=""></select> |
|
|
<select asp-for="@index.KpNo" name="WipKps[@k].KpNo" asp-items="@ViewBag.ItemsList" class=""></select> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.KpSeq" name="WipKps[@k].KpSeq" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.KpSeq" name="WipKps[@k].KpSeq" /> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.Title" name="WipKps[@k].Title" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.Title" name="WipKps[@k].Title" /> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.Length" name="WipKps[@k].Length" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.Length" name="WipKps[@k].Length" /> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<select asp-for="@index.UnitNo" name="WipKps[@k].UnitNo" asp-items="@ViewBag.FactoryUnitByWipNo" class=""></select> |
|
|
<select asp-for="@index.UnitNo" name="WipKps[@k].UnitNo" asp-items="@ViewBag.FactoryUnitByWipNo" class=""></select> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a> |
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
k++; |
|
|
k++; |
|
|
} |
|
|
} |
|
|
</tbody> |
|
|
</tbody> |
|
@ -455,11 +460,11 @@ |
|
|
<input asp-for="itemNoCT1" type="hidden" value="@Model.itemNoCT1" /> |
|
|
<input asp-for="itemNoCT1" type="hidden" value="@Model.itemNoCT1" /> |
|
|
@if (!string.IsNullOrWhiteSpace(Model.itemNoCT1)) |
|
|
@if (!string.IsNullOrWhiteSpace(Model.itemNoCT1)) |
|
|
{ |
|
|
{ |
|
|
<span style="color:red">有維護標準工時</span> |
|
|
<span style="color:red">有維護標準工時</span> |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
<span style="color:red">**無維護標準工時**</span> |
|
|
<span style="color:red">**無維護標準工時**</span> |
|
|
} |
|
|
} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -502,9 +507,18 @@ |
|
|
<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" /> |
|
|
{ |
|
|
<input @if (Model.wipBoard != null) { @(Model.wipBoard.DipSolderMask == "Y" ? "checked" : "") } type="checkbox" title="點防焊膠" name="wipBoard.DipSolderMask" /> |
|
|
@(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> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -520,7 +534,10 @@ |
|
|
<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" /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<label class="layui-form-label">燒機位置</label> |
|
|
<label class="layui-form-label">燒機位置</label> |
|
@ -541,7 +558,10 @@ |
|
|
<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.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> |
|
|
<label class="layui-form-label">零件烘烤溫度</label> |
|
|
<label class="layui-form-label">零件烘烤溫度</label> |
|
|
<div class="layui-input-inline" style="width:100px"> |
|
|
<div class="layui-input-inline" style="width:100px"> |
|
@ -554,7 +574,10 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="layui-input-inline"> |
|
|
<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> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -570,7 +593,10 @@ |
|
|
<div class="layui-inline"> |
|
|
<div class="layui-inline"> |
|
|
<label class="layui-form-label">PCB烘烤</label> |
|
|
<label class="layui-form-label">PCB烘烤</label> |
|
|
<div class="layui-input-inline"> |
|
|
<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> |
|
|
<div class="layui-input-inline"> |
|
|
<div class="layui-input-inline"> |
|
|
<select asp-items="@ViewBag.GetPCBBakeTypeSelect" asp-for="wipBoard.PcbBake" class=""></select> |
|
|
<select asp-items="@ViewBag.GetPCBBakeTypeSelect" asp-for="wipBoard.PcbBake" class=""></select> |
|
@ -700,11 +726,11 @@ |
|
|
<input asp-for="itemNoCT1" type="hidden" value="@Model.itemNoCT1" /> |
|
|
<input asp-for="itemNoCT1" type="hidden" value="@Model.itemNoCT1" /> |
|
|
@if (!string.IsNullOrWhiteSpace(Model.itemNoCT1)) |
|
|
@if (!string.IsNullOrWhiteSpace(Model.itemNoCT1)) |
|
|
{ |
|
|
{ |
|
|
<span style="color:red">有維護標準工時</span> |
|
|
<span style="color:red">有維護標準工時</span> |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
<span style="color:red">**無維護標準工時**</span> |
|
|
<span style="color:red">**無維護標準工時**</span> |
|
|
} |
|
|
} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -878,7 +904,10 @@ |
|
|
<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> |
|
@ -952,23 +981,23 @@ |
|
|
<tbody> |
|
|
<tbody> |
|
|
@foreach (var index in Model.WipOutfits) |
|
|
@foreach (var index in Model.WipOutfits) |
|
|
{ |
|
|
{ |
|
|
<tr> |
|
|
<tr> |
|
|
|
|
|
|
|
|
<td> |
|
|
<td> |
|
|
<input name="WipOutfits[@l].WipOutfitID" type="hidden" value="@index.WipOutfitID" /> |
|
|
<input name="WipOutfits[@l].WipOutfitID" type="hidden" value="@index.WipOutfitID" /> |
|
|
<select asp-for="@index.PartNo" name="WipOutfits[@l].PartNo" asp-items="@ViewBag.OutfitCommodityInfo" class=""></select> |
|
|
<select asp-for="@index.PartNo" name="WipOutfits[@l].PartNo" asp-items="@ViewBag.OutfitCommodityInfo" class=""></select> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<select asp-for="@index.UnitNo" name="WipOutfits[@l].UnitNo" asp-items="@ViewBag.FactoryUnitByWipNo" class=""></select> |
|
|
<select asp-for="@index.UnitNo" name="WipOutfits[@l].UnitNo" asp-items="@ViewBag.FactoryUnitByWipNo" class=""></select> |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td> |
|
|
<td> |
|
|
<select asp-for="@index.StationID" name="WipOutfits[@l].StationID" asp-items="@ViewBag.RuleStationByWipNoUnitNoList" class=""></select> |
|
|
<select asp-for="@index.StationID" name="WipOutfits[@l].StationID" asp-items="@ViewBag.RuleStationByWipNoUnitNoList" class=""></select> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a> |
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
l++; |
|
|
l++; |
|
|
} |
|
|
} |
|
|
</tbody> |
|
|
</tbody> |
|
@ -994,8 +1023,8 @@ |
|
|
SOP文件敘述 |
|
|
SOP文件敘述 |
|
|
</th> |
|
|
</th> |
|
|
@*<th> |
|
|
@*<th> |
|
|
檔案路徑 |
|
|
檔案路徑 |
|
|
</th>*@ |
|
|
</th>*@ |
|
|
<th> |
|
|
<th> |
|
|
SOP類型 |
|
|
SOP類型 |
|
|
</th> |
|
|
</th> |
|
@ -1013,27 +1042,27 @@ |
|
|
<tbody> |
|
|
<tbody> |
|
|
@foreach (var index in Model.WipSops) |
|
|
@foreach (var index in Model.WipSops) |
|
|
{ |
|
|
{ |
|
|
<tr> |
|
|
<tr> |
|
|
<td> |
|
|
<td> |
|
|
<input name="WipSops[@i].WipSOPID" type="hidden" value="@index.WipSOPID" /> |
|
|
<input name="WipSops[@i].WipSOPID" type="hidden" value="@index.WipSOPID" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.SOPName" name="WipSops[@i].SOPName" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.SOPName" name="WipSops[@i].SOPName" /> |
|
|
</td> |
|
|
</td> |
|
|
@*<td> |
|
|
@*<td> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.SOPPath" name="WipSops[@i].SOPPath" /> |
|
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" asp-for="@index.SOPPath" name="WipSops[@i].SOPPath" /> |
|
|
</td>*@ |
|
|
</td>*@ |
|
|
<td> |
|
|
<td> |
|
|
<select asp-for="@index.SOPType" name="WipSops[@i].SOPType" asp-items="@ViewBag.GetSOPTypeSelect" class=""></select> |
|
|
<select asp-for="@index.SOPType" name="WipSops[@i].SOPType" asp-items="@ViewBag.GetSOPTypeSelect" class=""></select> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<select asp-for="@index.UnitNo" name="WipSops[@i].UnitNo" asp-items="@ViewBag.FactoryUnitByWipNo" class=""></select> |
|
|
<select asp-for="@index.UnitNo" name="WipSops[@i].UnitNo" asp-items="@ViewBag.FactoryUnitByWipNo" class=""></select> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<input onfocus="this.blur()" class="layui-input" asp-for="@index.SOPVer" name="WipSops[@i].SOPVer" /> |
|
|
<input onfocus="this.blur()" class="layui-input" asp-for="@index.SOPVer" name="WipSops[@i].SOPVer" /> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a> |
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
i++; |
|
|
i++; |
|
|
} |
|
|
} |
|
|
</tbody> |
|
|
</tbody> |
|
@ -1105,23 +1134,23 @@ |
|
|
<tbody> |
|
|
<tbody> |
|
|
@foreach (var index in Model.wipInfoBlobs) |
|
|
@foreach (var index in Model.wipInfoBlobs) |
|
|
{ |
|
|
{ |
|
|
<tr> |
|
|
<tr> |
|
|
<td> |
|
|
<td> |
|
|
<span id="FileName">@index.ImageName</span> |
|
|
<span id="FileName">@index.ImageName</span> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<span id="Filepath">@index.Filepath</span> |
|
|
<span id="Filepath">@index.Filepath</span> |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<span id="Remark">@index.Remark</span> |
|
|
<span id="Remark">@index.Remark</span> |
|
|
|
|
|
|
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-read" onclick="show(this)">預覽</a> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-read" onclick="show(this)">預覽</a> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs" onclick="filedownload(this)">下載</a> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs" onclick="filedownload(this)">下載</a> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-danger" onclick="deleteFile(this)">刪除</a> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-danger" onclick="deleteFile(this)">刪除</a> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
} |
|
|
} |
|
|
</tbody> |
|
|
</tbody> |
|
|
</table> |
|
|
</table> |
|
@ -1340,7 +1369,7 @@ |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// 產生MAC |
|
|
// 產生MAC |
|
|
$("#GetMAC").click(function (event) { |
|
|
$("#GetMAC").click(function (event) { |
|
|
var wipNO = $('#wipAtt_ItemNO').val(); |
|
|
var wipNO = $('#wipAtt_ItemNO').val(); |
|
|
var planQTY = $('#wipInfo_PlanQTY').val(); |
|
|
var planQTY = $('#wipInfo_PlanQTY').val(); |
|
|
if (wipNO == '' || !wipNO) { |
|
|
if (wipNO == '' || !wipNO) { |
|
@ -1970,18 +1999,18 @@ |
|
|
hg.msghide("查無資料,不需要更新!"); |
|
|
hg.msghide("查無資料,不需要更新!"); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
var result_data = result.data.eaN_NO; |
|
|
var result_data = result.data.eaN_NO; |
|
|
console.log(result_data.eaN_NO); |
|
|
console.log(result_data.eaN_NO); |
|
|
if (result_data.length == 0) { |
|
|
if (result_data.length == 0) { |
|
|
hg.msghide("不需要更新!"); |
|
|
hg.msghide("不需要更新!"); |
|
|
} |
|
|
} |
|
|
else if ('@Model.wipAtt.ECN' != result_data) { |
|
|
else if ('@Model.wipAtt.ECN' != result_data) { |
|
|
layer.confirm('比對與PLM ECN/ECR不一樣,確定更新ECN/ECR嗎?', { |
|
|
layer.confirm('比對與PLM ECN/ECR不一樣,確定更新ECN/ECR嗎?', { |
|
|
btn: ['確定', '取消'] |
|
|
btn: ['確定', '取消'] |
|
|
}, function () { |
|
|
}, function () { |
|
|
layer.closeAll('dialog'); |
|
|
layer.closeAll('dialog'); |
|
|
$("#wipAtt_ECN").val(result_data); |
|
|
$("#wipAtt_ECN").val(result_data); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -2024,59 +2053,77 @@ |
|
|
layer.confirm('確定要同步料號SOP資料嗎?', { |
|
|
layer.confirm('確定要同步料號SOP資料嗎?', { |
|
|
btn: ['確定', '取消'] |
|
|
btn: ['確定', '取消'] |
|
|
}, function () { |
|
|
}, function () { |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
type: "POST", |
|
|
type: "POST", |
|
|
url: "@Url.Action("GetMaterialSop", "PCS")", |
|
|
url: "@Url.Action("GetMaterialSop", "PCS")", |
|
|
type: "Post", |
|
|
type: "Post", |
|
|
async: true, |
|
|
async: true, |
|
|
data: { "ItemNo": '@Model.wipAtt.ItemNO' }, |
|
|
data: { "ItemNo": '@Model.wipAtt.ItemNO' }, |
|
|
success: function (result) { |
|
|
success: function (result) { |
|
|
if (result.success) { |
|
|
if (result.success) { |
|
|
let No = 0; |
|
|
let No = 0; |
|
|
var Unit = getFactoryUnitByWipNoList(); |
|
|
var Unit = getFactoryUnitByWipNoList(); |
|
|
var SopType = getSOPType(); |
|
|
var SopType = getSOPType(); |
|
|
$("#SopTable").find("tr:not(:first)").remove(); |
|
|
$("#SopTable").find("tr:not(:first)").remove(); |
|
|
$.each(result.data, function (index, item) { |
|
|
$.each(result.data, function (index, item) { |
|
|
var FactoryUnit = Unit; |
|
|
var FactoryUnit = Unit; |
|
|
var Select = "<select id=WipSops[" + No + "].UnitNo name=WipSops[" + No + "].UnitNo>"; |
|
|
var Select = "<select id=WipSops[" + No + "].UnitNo name=WipSops[" + No + "].UnitNo>"; |
|
|
$.each(FactoryUnit, function (index, item1) { |
|
|
$.each(FactoryUnit, function (index, item1) { |
|
|
if (item1.value == item.unitNo) { |
|
|
if (item1.value == item.unitNo) { |
|
|
Select += '<option value=' + item1.value + '>' + item1.text + '</option>'; |
|
|
Select += '<option value=' + item1.value + '>' + item1.text + '</option>'; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
Select += '</select>'; |
|
|
Select += '</select>'; |
|
|
var SoptypeItem = SopType; |
|
|
var SoptypeItem = SopType; |
|
|
var SelectSoptype = "<select id=WipSops[" + No + "].SOPType name=WipSops[" + No + "].SOPType>"; |
|
|
var SelectSoptype = "<select id=WipSops[" + No + "].SOPType name=WipSops[" + No + "].SOPType>"; |
|
|
$.each(SoptypeItem, function (index, item2) { |
|
|
$.each(SoptypeItem, function (index, item2) { |
|
|
if (item2.value == item.sopType) { |
|
|
if (item2.value == item.sopType) { |
|
|
SelectSoptype += '<option value=' + item2.value + '>' + item2.text + '</option>'; |
|
|
SelectSoptype += '<option value=' + item2.value + '>' + item2.text + '</option>'; |
|
|
} |
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
SelectSoptype += '</select>'; |
|
|
|
|
|
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" value=' + item.sopName + ' /></td>' + |
|
|
|
|
|
'<td>' + SelectSoptype + '</td>' + |
|
|
|
|
|
'<td>' + Select + '</td>' + |
|
|
|
|
|
'<td> <input onfocus="this.blur()" class="layui-input" name="WipSops[' + No + '].SOPVer" /></td>' + |
|
|
|
|
|
'<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' + |
|
|
|
|
|
'</tr>'; |
|
|
|
|
|
$('#SopTable').append(contactdiv); |
|
|
|
|
|
No += 1; |
|
|
}); |
|
|
}); |
|
|
SelectSoptype += '</select>'; |
|
|
$('#WipSopCount').val(No); |
|
|
var contactdiv = '<tr>' + |
|
|
layui.form.render("select");//重新渲染 固定写法 |
|
|
'<td><input type="hidden" value="" name="WipSops[' + No + '].WipSOPID" />' + |
|
|
} |
|
|
'<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPName" value=' + item.sopName + ' /></td>' + |
|
|
else { |
|
|
'<td>' + SelectSoptype + '</td>' + |
|
|
hg.msg("同步SOP失敗:" + result.data); |
|
|
'<td>' + Select + '</td>' + |
|
|
} |
|
|
'<td> <input onfocus="this.blur()" class="layui-input" name="WipSops[' + No + '].SOPVer" /></td>' + |
|
|
}, |
|
|
'<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' + |
|
|
error: function () { |
|
|
'</tr>'; |
|
|
hg.msg("同步SOP失敗"); |
|
|
$('#SopTable').append(contactdiv); |
|
|
|
|
|
No += 1; |
|
|
|
|
|
}); |
|
|
|
|
|
$('#WipSopCount').val(No); |
|
|
|
|
|
layui.form.render("select");//重新渲染 固定写法 |
|
|
|
|
|
} |
|
|
} |
|
|
else { |
|
|
}); |
|
|
hg.msg("同步SOP失敗:" + result.data); |
|
|
layer.closeAll('dialog'); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 抓DB目前KP數量 |
|
|
|
|
|
function GetKpDbCount() { |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: "@Url.Action("GetKpDbCount", "PCS")", |
|
|
|
|
|
type: "Post", |
|
|
|
|
|
async: true, |
|
|
|
|
|
data: { "wipNo": '@Model.wipInfo.WipNO' }, |
|
|
|
|
|
success: function (result) { |
|
|
|
|
|
if (result.success) { |
|
|
|
|
|
$("#wipKpDbCount").val(result.data); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
error: function () { |
|
|
error: function (result) { |
|
|
hg.msg("同步SOP失敗"); |
|
|
parent.hg.msg(`呼叫API失敗`); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
layer.closeAll('dialog'); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
} |
|
|
} |
|
|