You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
265 lines
10 KiB
265 lines
10 KiB
@model AMESCoreStudio.WebApi.Models.AMES.NgInfoAlertMaster
|
|
|
|
|
|
@{ ViewData["Title"] = "FQC014UV";
|
|
// Layout = "~/Views/Shared/_FormLayout.cshtml";
|
|
Layout = "~/Views/Shared/_AMESLayout.cshtml";}
|
|
<style>
|
|
.control-label {
|
|
justify-content: flex-end !important;
|
|
}
|
|
|
|
.custom-select {
|
|
font-size: 1.2rem; /* 调整字体大小 */
|
|
padding: 0.5rem; /* 增加内边距,使其看起来更大 */
|
|
height: auto; /* 确保下拉框的高度自动适应内容 */
|
|
border-color: #d3d3d3; /* 设置淡灰色边框 */
|
|
/*background-color: #f0f0f0; 设置灰色背景 */
|
|
border-width: 1px; /* 可选,设置边框宽度 */
|
|
border-radius: 4px; /* 可选,设置圆角 */
|
|
}
|
|
</style>
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<div class="col-sm-12">
|
|
<form enctype="multipart/form-data" method="post" id="myForm">
|
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
|
<input type="hidden" asp-for="UserID" />
|
|
<input type="hidden" asp-for="CreateDate" />
|
|
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" />
|
|
<input type="hidden" asp-for="FinishDate" />
|
|
<input type="hidden" asp-for="BarcodeNo" />
|
|
<input type="hidden" asp-for="WipNoH" />
|
|
<input type="hidden" asp-for="ItemNoH" />
|
|
<input type="hidden" asp-for="GetFactoryInfo.FactoryNameCh" />
|
|
<input type="hidden" asp-for="GetFactoryInfo.FactoryNameEn" />
|
|
<input type="hidden" asp-for="FactoryID" />
|
|
<input type="hidden" asp-for="StationID" />
|
|
<input type="hidden" asp-for="BarcodeNoH" />
|
|
<input type="hidden" asp-for="Source" />
|
|
<table class="layui-table">
|
|
@*// <table class="table table-bordered">*@
|
|
<tr>
|
|
<td style="width: 90px;"><label asp-for="CaseID" class="control-label"></label></td>
|
|
<td colspan="2"><input asp-for="CaseID" name="CaseID" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" /></td>
|
|
|
|
<td style="width: 90px;"><label asp-for="ModelName" class="control-label"></label></td>
|
|
<td colspan="2"><input asp-for="ModelName" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" /></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="ItemNoF" class="control-label"></label></td>
|
|
<td colspan="5"><input asp-for="ItemNoF" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" /></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="GetFactoryInfo.FactoryNo" class="control-label"></label></td>
|
|
<td style="width: 150px;"><input asp-for="GetFactoryInfo.FactoryNo" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" /></td>
|
|
|
|
<td><label asp-for="WipNoF" class="control-label"></label></td>
|
|
<td style="width: 150px;"><input asp-for="WipNoF" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" /></td>
|
|
|
|
<td><label asp-for="ReasonNo" class="control-label"></label></td>
|
|
<td><input asp-for="ReasonNo" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" /></td>
|
|
</tr>
|
|
</table>
|
|
<a>CASE 編輯</a>
|
|
<table class="layui-table">
|
|
<tr>
|
|
<td><label asp-for="CreateDate" class="control-label"></label></td>
|
|
<td><input class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" value="@Model.CreateDate.ToString("yyyy-MM-dd")" /></td>
|
|
<td><label asp-for="FinishDate" class="control-label"></label></td>
|
|
<td><input class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" value="@Model.FinishDate?.ToString("yyyy-MM-dd")" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="StatusNo" class="control-label"></label></td>
|
|
<td><input asp-for="StatusNo" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" id="statusInput" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="ShortTerm" class="control-label"></label></td>
|
|
<td colspan="3">
|
|
<textarea asp-for="ShortTerm" class="layui-textarea" rows="4" readonly></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="LongTerm" class="control-label"></label></td>
|
|
<td colspan="3"><textarea asp-for="LongTerm" class="layui-textarea" rows="4" readonly></textarea></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="Memos" class="control-label"></label></td>
|
|
<td colspan="3"><textarea asp-for="Memos" class="layui-textarea" rows="4" readonly></textarea></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="Link" class="control-label"></label></td>
|
|
<td colspan="3"><textarea asp-for="Link" class="layui-textarea" rows="4" readonly></textarea></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td><label asp-for="UpdateUserID" class="control-label"></label></td>
|
|
|
|
<td colspan="3"><input value="@ViewBag.UpdateUserName" class="layui-input" style="background-color: #D3D3D3;" readonly="readonly" /></tdtd>
|
|
</tr>
|
|
</table>
|
|
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span>
|
|
|
|
<div class="form-group">
|
|
<table class="layui-hide" id="test" lay-filter="test"></table>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@section Scripts {
|
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); }
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
var error = '@Html.ValidationMessage("error")';
|
|
if ($(error).text() != '') {
|
|
parent.hg.msg(error);
|
|
}
|
|
});
|
|
|
|
var toolbar = [];
|
|
|
|
var tableCols = [[
|
|
{
|
|
field: 'barcodeNo',
|
|
width: 100,
|
|
title: '生產序號',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'factoryNo',
|
|
width: 100,
|
|
title: '廠別',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'wipNoF',
|
|
width: 100,
|
|
title: '系統工單',
|
|
sort: true,
|
|
templet: '#wipNoF1'
|
|
},
|
|
{
|
|
field: 'itemNoF',
|
|
width: 100,
|
|
title: '系統料號',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'modelName',
|
|
width: 100,
|
|
title: '機種',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'wipNoH',
|
|
width: 100,
|
|
title: '單板工單',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'itemNoH',
|
|
width: 100,
|
|
title: '單板料號',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'createDate',
|
|
width: 100,
|
|
title: '警報異常時間',
|
|
templet: '<div>{{ layui.util.toDateString(d.createDate, "yyyy/MM/dd") }}</div>',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'reasonNo',
|
|
width: 100,
|
|
title: '警報原因',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'stationNo',
|
|
width: 100,
|
|
title: '發生站別',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'repairNo',
|
|
width: 100,
|
|
title: '維修代碼',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'repairDesc',
|
|
width: 100,
|
|
title: '維修原因',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'userName',
|
|
width: 100,
|
|
title: '作業人員',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'right',
|
|
width: 130,
|
|
title: '操作',
|
|
fixed: 'right',
|
|
templet: function (d) {
|
|
btn = `<a class="layui-btn layui-bg-blue layui-btn-xs" lay-event="Download">下載</a>`
|
|
return btn
|
|
}
|
|
}
|
|
|
|
]];
|
|
|
|
var caseID = $("#CaseID").val();
|
|
|
|
var table = hg.table.datatable('test', '異常不良警示資料維護', '/FQC/GetNGINFOAlertDetailByQuery?caseID=' + caseID, {}, tableCols, '', false, 'full-100');
|
|
//上傳
|
|
function Upload(obj) {
|
|
if (obj.data.caseID) {
|
|
|
|
hg.open('上傳檔案', '/FQC/FQC014R/' + obj.data.caseID, 800, 550);
|
|
}
|
|
};
|
|
//下載
|
|
function Download(obj) {
|
|
if (obj.data.caseID) {
|
|
|
|
hg.open('下載檔案', '/FQC/FQC014RV/' + obj.data.caseID, 800, 550);
|
|
}
|
|
};
|
|
|
|
|
|
</script>
|
|
<script type="text/html" id="wipNoF1">
|
|
{{# if(d.wipNoF === '尚未投產' ){ }}
|
|
<span style="color: #FF0000">{{ d.wipNoF }}</span>
|
|
{{# } else { }}
|
|
{{ d.wipNoF }}
|
|
{{# } }}
|
|
</script>
|
|
<script>
|
|
// 获取 StatusNo 的值(假设它已经绑定了服务器的值)
|
|
var status = document.querySelector('input[name="StatusNo"]').value;
|
|
// 获取显示 StatusNo 的 input 元素
|
|
var statusInput = document.getElementById('statusInput');
|
|
|
|
// 根据 StatusNo 的值修改显示文本
|
|
if (status === 'F') {
|
|
statusInput.value = '已完結';
|
|
} else if (status === 'E') {
|
|
statusInput.value = '處理中';
|
|
} else {
|
|
statusInput.value = '未處理'; // 如果有其他情况,清空显示内容
|
|
}
|
|
</script>
|
|
|
|
}
|
|
|