6 changed files with 136 additions and 30 deletions
@ -1,13 +0,0 @@ |
|||||
@model AMESCoreStudio.WebApi.Models.AMES.ProductType |
|
||||
@{ |
|
||||
ViewData["Title"] = "系統資料管理"; |
|
||||
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
|
||||
} |
|
||||
|
|
||||
<h1>PCB001</h1> |
|
||||
<div class="form-group form-inline my-sm-1"> |
|
||||
<label asp-for="ProductTypeName" class="control-label col-sm-3"></label> |
|
||||
<select asp-for="ProductTypeName" asp-items="@ViewBag.ProductTypesList" class="custom-select col-sm-9"></select> |
|
||||
<span asp-validation-for="ProductTypeName" class="text-danger offset-sm-3 my-sm-1"></span> |
|
||||
</div> |
|
||||
|
|
@ -0,0 +1,73 @@ |
|||||
|
@model AMESCoreStudio.WebApi.DTO.AMES.MaterialKpDtos |
||||
|
@{ |
||||
|
ViewData["Title"] = "系統資料管理"; |
||||
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
||||
|
} |
||||
|
|
||||
|
<div class="layui-card"> |
||||
|
<div class="col-sm-12"> |
||||
|
<form enctype="multipart/form-data" method="post" asp-action="PCS999" id="PCS999Form" class="layui-form"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div style="text-align:center"> |
||||
|
<input type="submit" value="保存" class="layui-btn" /> |
||||
|
</div> |
||||
|
<input type="checkbox" checked="" name="open" lay-skin="switch" lay-filter="switchTest" lay-text="ON|OFF"> |
||||
|
<input type="checkbox" title="写作" name="MaterialKpDtos[' + key + '].kpSeq" lay-skin="primary" checked=""> |
||||
|
</div> |
||||
|
<div class="layui-form-item" style="padding-left:30px"> |
||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-read" onclick="input();">刷新</a> |
||||
|
<table id="tblCustomers" class="layui-table" cellpadding="0" cellspacing="0"> |
||||
|
<tbody id="tblCustomersBody"> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
||||
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
||||
|
<script type="text/javascript"> |
||||
|
layui.use(['form', 'laydate'], function () { |
||||
|
var form = layui.form; |
||||
|
}); |
||||
|
|
||||
|
function input() { |
||||
|
//var Inputs = GetAllEmpData(); |
||||
|
//var data = $("#PCS999Form").serialize(); |
||||
|
//$.each(Inputs, function (i, item) { |
||||
|
// data += "&Inputs[" + i + "]=" + item; |
||||
|
//}); |
||||
|
$.ajax({ |
||||
|
url: "@Url.Action("MaterialKpQuery", "PCS")", |
||||
|
type: "POST", |
||||
|
async: false, |
||||
|
data: { 'itemNo': 'JH168-AT-X'}, |
||||
|
success: function (result) { |
||||
|
var html = ''; |
||||
|
$.each(result.data, function (key, item) { |
||||
|
html += '<tr>'; |
||||
|
html += '<td>'+key+ ','+ item.materialKpID + '</td>'; |
||||
|
html += '<td><input type="hidden" name="MaterialKpDtos[' + key + '].kpName" value=' + item.itemName+'>' + item.itemName + '</td>'; |
||||
|
html += '<td>' + item.kpName + '</td>'; |
||||
|
html += '<td>' + item.kpNo + '</td>'; |
||||
|
html += '<td><input type="checkbox" name="MaterialKpDtos[' + key + '].Title" lay-skin="primary" checked=""></td>'; |
||||
|
html += '</tr>'; |
||||
|
}); |
||||
|
$("#tblCustomers").html(html); |
||||
|
//$('#tblCustomers').append(html); |
||||
|
} |
||||
|
}); |
||||
|
xuanran(); |
||||
|
}; |
||||
|
|
||||
|
function xuanran() { |
||||
|
alert("OK"); |
||||
|
layui.use(['form', 'laydate'], function () { |
||||
|
var form = layui.form; |
||||
|
form.render(); |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
} |
Loading…
Reference in new issue