|
@ -1,7 +1,8 @@ |
|
|
@model AMESCoreStudio.WebApi.Models.AMES.InspectionResultMaster |
|
|
@model AMESCoreStudio.WebApi.Models.AMES.InspectionResultMaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@{ ViewData["Title"] = "SPC005U"; |
|
|
@{ |
|
|
|
|
|
ViewData["Title"] = "SPC005U"; |
|
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
|
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
|
|
//Layout = "~/Views/Shared/_FormLayout.cshtml"; |
|
|
//Layout = "~/Views/Shared/_FormLayout.cshtml"; |
|
|
} |
|
|
} |
|
@ -15,12 +16,24 @@ |
|
|
margin-left: -10px; |
|
|
margin-left: -10px; |
|
|
margin-right: -10px; |
|
|
margin-right: -10px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.layui-table-cell { |
|
|
.layui-table-cell { |
|
|
height: auto; |
|
|
height: auto; |
|
|
overflow: visible; |
|
|
overflow: visible; |
|
|
text-overflow: inherit; |
|
|
text-overflow: inherit; |
|
|
white-space: normal |
|
|
white-space: normal |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.layui-disabled-red { |
|
|
|
|
|
color: red !important; |
|
|
|
|
|
cursor: not-allowed !important |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.layui-disabled-green { |
|
|
|
|
|
color: green !important; |
|
|
|
|
|
cursor: not-allowed !important |
|
|
|
|
|
} |
|
|
|
|
|
green |
|
|
</style> |
|
|
</style> |
|
|
<div class="layui-card"> |
|
|
<div class="layui-card"> |
|
|
<div class="layui-card-body"> |
|
|
<div class="layui-card-body"> |
|
@ -67,12 +80,14 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@section Scripts { |
|
|
@section Scripts { |
|
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|
|
@{ |
|
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
|
|
await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|
|
|
|
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@*回復*@ |
|
|
@*回復*@ |
|
|
<script type="text/html" id="selectResult"> |
|
|
<script type="text/html" id="selectResult"> |
|
|
<select name="selectResult" lay-filter="selectResult" id="selectResult" data-value={{d.result}} class="layui-form" disabled> |
|
|
<select name="selectResult" lay-filter="selectResult" id="selectResult" data-value={{d.result}} class="layui-form selectResult" disabled> |
|
|
<option value="NA">N/A</option> |
|
|
<option value="NA">N/A</option> |
|
|
<option value="P">PASS</option> |
|
|
<option value="P">PASS</option> |
|
|
<option value="F">FAIL </option> |
|
|
<option value="F">FAIL </option> |
|
@ -168,9 +183,24 @@ |
|
|
elem.val(elem.data('value')).parents('div.layui-table-cell').css('overflow', 'visible'); |
|
|
elem.val(elem.data('value')).parents('div.layui-table-cell').css('overflow', 'visible'); |
|
|
}); |
|
|
}); |
|
|
form.render(); |
|
|
form.render(); |
|
|
|
|
|
handleSelectResult(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Table SelectResult 選項字體換色 |
|
|
|
|
|
function handleSelectResult() { |
|
|
|
|
|
$('.selectResult').each(function () { |
|
|
|
|
|
console.log($(this)); |
|
|
|
|
|
if ($(this).val() === 'P') { |
|
|
|
|
|
$(this).next().find('input').addClass('layui-disabled-green'); |
|
|
|
|
|
} |
|
|
|
|
|
else if ($(this).val() === 'F') { |
|
|
|
|
|
$(this).next().find('input').addClass('layui-disabled-red'); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/*表格列表操作*/ |
|
|
/*表格列表操作*/ |
|
|
table.on('tool(test)', function (obj) { |
|
|
table.on('tool(test)', function (obj) { |
|
|
var data = obj.data, layEvent = obj.event; |
|
|
var data = obj.data, layEvent = obj.event; |
|
|