|
|
@ -1,7 +1,8 @@ |
|
|
|
@model AMESCoreStudio.WebApi.Models.AMES.InspectionResultMaster |
|
|
|
|
|
|
|
|
|
|
|
@{ ViewData["Title"] = "SPC005U"; |
|
|
|
@{ |
|
|
|
ViewData["Title"] = "SPC005U"; |
|
|
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
|
|
|
//Layout = "~/Views/Shared/_FormLayout.cshtml"; |
|
|
|
} |
|
|
@ -15,12 +16,24 @@ |
|
|
|
margin-left: -10px; |
|
|
|
margin-right: -10px; |
|
|
|
} |
|
|
|
|
|
|
|
.layui-table-cell { |
|
|
|
height: auto; |
|
|
|
overflow: visible; |
|
|
|
text-overflow: inherit; |
|
|
|
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> |
|
|
|
<div class="layui-card"> |
|
|
|
<div class="layui-card-body"> |
|
|
@ -64,15 +77,17 @@ |
|
|
|
<table class="layui-hide" id="test" lay-filter="test" lay-data="{id:'test'}"></table> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@section Scripts { |
|
|
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|
|
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
|
|
|
@{ |
|
|
|
await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|
|
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); |
|
|
|
} |
|
|
|
|
|
|
|
@*回復*@ |
|
|
|
<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="P">PASS</option> |
|
|
|
<option value="F">FAIL </option> |
|
|
@ -142,7 +157,7 @@ |
|
|
|
{ field: 'location', title: '插件位置', width: 100, align: "left" }, |
|
|
|
{ field: 'missingUnitNo', title: '缺失單位', width: 100, align: "left", templet: '#selectDept' }, |
|
|
|
{ field: 'missingUserID', title: '缺失人員', width: 100, align: "left", templet: '#selectUser' }, |
|
|
|
{ field: 'missingRemark', title: '備註', width: 250, align: "left"},//templet: '#inputTest' |
|
|
|
{ field: 'missingRemark', title: '備註', width: 250, align: "left" },//templet: '#inputTest' |
|
|
|
{ |
|
|
|
field: 'right', |
|
|
|
width: 120, |
|
|
@ -168,9 +183,24 @@ |
|
|
|
elem.val(elem.data('value')).parents('div.layui-table-cell').css('overflow', 'visible'); |
|
|
|
}); |
|
|
|
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) { |
|
|
|
var data = obj.data, layEvent = obj.event; |
|
|
|