5 changed files with 342 additions and 23 deletions
@ -0,0 +1,123 @@ |
|||
@model AMESCoreStudio.Web.ViewModels.REP001ViewModel |
|||
|
|||
@{ |
|||
ViewData["Title"] = "後判維修輸入"; |
|||
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
|||
} |
|||
|
|||
<style type="text/css"> |
|||
.layui-table-main .layui-table-cell { |
|||
/*height: auto !important;*/ |
|||
white-space: normal; |
|||
} |
|||
|
|||
.layui-table img { |
|||
max-width: 60px; |
|||
max-height: 28px; |
|||
} |
|||
|
|||
.layui-tree-main { |
|||
cursor: pointer; |
|||
padding-right: 10px; |
|||
float: left; |
|||
border-width: 1px; |
|||
border-style: solid; |
|||
border-color: #e6e6e6; |
|||
margin: 10px 0; |
|||
} |
|||
</style> |
|||
|
|||
|
|||
<div class="layui-card"> |
|||
<div class="layui-card-header"> |
|||
<div class="layui-form"> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"><i class="fa fa-file-text-o fa-fw"></i> @ViewBag.Title</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">不良條碼:</label> |
|||
<div class="layui-input-inline"> |
|||
<input id="barcodeNo" name="barcodeNo" autocomplete="off" class="layui-input" placeholder="請輸入不良條碼"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline layui-show-xs-block"> |
|||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="querysubmit"> |
|||
<i class="layui-icon layui-icon-sm"></i> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="layui-card-body"> |
|||
<table class="layui-hide" id="test" lay-filter="test"></table> |
|||
</div> |
|||
</div> |
|||
|
|||
@section Scripts{ |
|||
<script type="text/javascript"> |
|||
|
|||
|
|||
layui.use(['form', 'jquery', 'layer'], function () { |
|||
form = layui.form; |
|||
|
|||
var qs = $('button[lay-filter="querysubmit"]'); |
|||
qs.click(); |
|||
}); |
|||
|
|||
//监听表单提交事件 |
|||
hg.form.onsubmit('querysubmit', function (data) { |
|||
hg.msghide("重新載入資料.."); |
|||
table && table.reload(data); |
|||
}); |
|||
|
|||
var tableCols = [[ |
|||
{ |
|||
field: 'ngID', |
|||
title: '測試不良ID' |
|||
}, |
|||
{ |
|||
field: 'typeNo', |
|||
width: 120, |
|||
title: '測試種類代碼' |
|||
}, |
|||
{ |
|||
field: 'station', |
|||
title: '站別名稱', |
|||
width: 160, |
|||
sort: true, |
|||
templet: function (d) { |
|||
return d.station['stationName']; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'testStatus', |
|||
width: 120, |
|||
title: '測試狀態' |
|||
}, |
|||
{ |
|||
field: 'status', |
|||
width: 120, |
|||
title: '處理狀態' |
|||
}, |
|||
{ |
|||
field: 'right', |
|||
width: 120, |
|||
title: '操作', |
|||
align: 'center', |
|||
fixed: 'right', |
|||
templet: function (d) { |
|||
return '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-read" lay-event="detail"> 檢視 </a>' |
|||
} |
|||
}] |
|||
]; |
|||
|
|||
function detail(obj) { |
|||
if (obj.data.ngID) { |
|||
hg.open('檢視不良資料', '/REP/REP002V/' + obj.data.ngID, '', '', true); |
|||
} |
|||
} |
|||
|
|||
//基本数据表格 |
|||
var table = hg.table.datatable('test', '測試不良資料', '/REP/GetNgInfoByBarcode', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
|||
|
|||
</script> |
|||
} |
@ -0,0 +1,161 @@ |
|||
@model AMESCoreStudio.Web.ViewModels.REP001ViewModel |
|||
|
|||
|
|||
@{ ViewData["Title"] = "REP001V"; |
|||
Layout = "~/Views/Shared/_AMESLayout.cshtml"; } |
|||
|
|||
<style> |
|||
.control-label { |
|||
justify-content: flex-end !important; |
|||
} |
|||
|
|||
.text-error { |
|||
color: #dc3545 !important; |
|||
} |
|||
|
|||
.my-read-only-class { |
|||
cursor: not-allowed; |
|||
} |
|||
</style> |
|||
|
|||
<div class="layui-card"> |
|||
<div class="col-sm-12"> |
|||
<form enctype="multipart/form-data" class="layui-form"> |
|||
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label" style="color:red">條碼資料</label> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<label asp-for="ngInfo.Barcode.BarcodeNo" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.Barcode.BarcodeNo" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.Barcode.BarcodeNo" class="layui-bg-red"></span> |
|||
</div> |
|||
<label asp-for="ngInfo.Wip.WipNO" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.Wip.WipNO" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.Wip.WipNO" class="layui-bg-red"></span> |
|||
</div> |
|||
<label asp-for="ngInfo.Station.TestType" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.Station.TestType" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.Station.TestType" class="layui-bg-red"></span> |
|||
</div> |
|||
<label asp-for="ngInfo.TestStatus" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.TestStatus" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.TestStatus" class="layui-bg-red"></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<label asp-for="ngInfo.OperatorID" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.OperatorID" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.OperatorID" class="layui-bg-red"></span> |
|||
</div> |
|||
<label asp-for="ngInfo.StartTime" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.StartTime" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.StartTime" class="layui-bg-red"></span> |
|||
</div> |
|||
<label asp-for="ngInfo.Station.StationName" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.Station.StationName" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.Station.StationName" class="layui-bg-red"></span> |
|||
</div> |
|||
<label asp-for="ngInfo.NgMemo" class="layui-form-label"></label> |
|||
<div class="layui-input-inline"> |
|||
<input asp-for="ngInfo.NgMemo" class="layui-input" autocomplete="off" /> |
|||
<span asp-validation-for="ngInfo.NgMemo" class="layui-bg-red"></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="layui-card-body"> |
|||
<table class="layui-hide" id="test" lay-filter="test"></table> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
@section Scripts { |
|||
<script type="text/javascript"> |
|||
|
|||
//监听表单提交事件 |
|||
hg.form.onsubmit('querysubmit', function (data) { |
|||
table && table.reload(data); |
|||
|
|||
}); |
|||
|
|||
var tableCols = [[ |
|||
{ |
|||
field: 'componentID', |
|||
width: 150, |
|||
title: '不良零件ID', |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'locationNo', |
|||
title: '零件位置代碼', |
|||
width: 200, |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'pinQty', |
|||
title: '不良腳位數量', |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'ngNo', |
|||
title: '不良原因代碼', |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'status', |
|||
title: '狀態', |
|||
width: 100, |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'createDate', |
|||
title: '建立日期', |
|||
width: 150, |
|||
templet: '<div>{{ layui.util.toDateString(d.createDate, "yyyy/MM/dd") }}</div>' |
|||
}, |
|||
{ |
|||
field: 'updateDate', |
|||
title: '更新日期', |
|||
width: 150, |
|||
templet: '<div>{{ layui.util.toDateString(d.updateDate, "yyyy/MM/dd") }}</div>' |
|||
}, |
|||
{ |
|||
field: 'right', |
|||
width: 120, |
|||
title: '操作', |
|||
align: 'center', |
|||
fixed: 'right', |
|||
templet: function (d) { |
|||
return '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="repair"> 維修 </a>' |
|||
} |
|||
}] |
|||
]; |
|||
|
|||
//通过行tool编辑,lay-event="edit" |
|||
function repair(obj) { |
|||
if (obj.data.componentID) { |
|||
hg.open('維修輸入', '/REP/REP001R/' + obj.data.componentID, 1080, 640); |
|||
} |
|||
} |
|||
|
|||
//基本数据表格 |
|||
var table = hg.table.datatable('test', '測試不良零件維護', '/REP/GetNgComponentByNGID/' + @Model.ngInfo.NgID, {}, tableCols, false, false, 'full-100'); |
|||
|
|||
</script> |
|||
|
|||
|
|||
} |
|||
|
Loading…
Reference in new issue