|
|
@ -25,9 +25,9 @@ |
|
|
|
<input asp-for="wipInfo.WipID" type="hidden" value="@Model.wipInfo.WipID" /> |
|
|
|
<input asp-for="wipInfo.UnitNO" type="hidden" value="@Model.wipInfo.UnitNO" /> |
|
|
|
<input asp-for="wipInfo.WipNO" type="hidden" value="@Model.wipInfo.WipNO" /> |
|
|
|
@* <input asp-for="wipInfo.PlanQTY" type="hidden" value="@Model.wipInfo.PlanQTY" />*@ |
|
|
|
@* <input asp-for="wipInfo.PlanQTY" type="hidden" value="@Model.wipInfo.PlanQTY" />*@ |
|
|
|
<input asp-for="wipInfo.WipType" type="hidden" value="@Model.wipInfo.WipType" /> |
|
|
|
@* <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="wipAtt.ItemNO" type="hidden" value="@Model.wipAtt.ItemNO" /> |
|
|
|
<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 }" /> |
|
|
@ -941,8 +941,8 @@ |
|
|
|
SOP文件敘述 |
|
|
|
</th> |
|
|
|
@*<th> |
|
|
|
檔案路徑 |
|
|
|
</th>*@ |
|
|
|
檔案路徑 |
|
|
|
</th>*@ |
|
|
|
<th> |
|
|
|
SOP類型 |
|
|
|
</th> |
|
|
@ -963,8 +963,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> |
|
|
@ -1031,47 +1031,52 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
@* 上傳資料sheet *@ |
|
|
|
<div class="layui-tab-item"> |
|
|
|
<div class="layui-form-item"> |
|
|
|
<table lay-filter="demo" class="layui-table"> |
|
|
|
<thead> |
|
|
|
<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', width:100}">檔案名稱</th> |
|
|
|
<th lay-data="{field:'experience', width:80, 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) |
|
|
|
{ |
|
|
|
<tr> |
|
|
|
<th lay-data="{field:'username', width:100}">檔案名稱</th> |
|
|
|
<th lay-data="{field:'experience', width:80, sort:true}">檔案路徑</th> |
|
|
|
<th lay-data="{field:'right', width:80, sort:true}">預覽</th> |
|
|
|
<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> |
|
|
|
</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> |
|
|
|
</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"> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</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"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span> |
|
|
@ -1311,6 +1316,15 @@ |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// 檔案下載 |
|
|
|
function filedownload(obj) { |
|
|
|
var Path = $(obj).closest("TR").find('span[id*=Filepath]').text(); |
|
|
|
var FileName = $(obj).closest("TR").find('span[id*=FileName]').text(); |
|
|
|
filePath = `/PCS/FileDownload?Path=${Path}&FileName=${FileName}`; |
|
|
|
console.log(filePath); |
|
|
|
$(obj).attr("href", filePath); |
|
|
|
}; |
|
|
|
|
|
|
|
function getFlowRuleList(data) |
|
|
|
{ |
|
|
|
$.ajax( |
|
|
|