21 changed files with 933 additions and 90 deletions
@ -0,0 +1,100 @@ |
|||
@model AMESCoreStudio.WebApi.Models.AMES.OutfitInfo |
|||
|
|||
|
|||
@{ ViewData["Title"] = "JIG004D"; |
|||
Layout = "~/Views/Shared/_FormLayout.cshtml"; } |
|||
|
|||
|
|||
<style> |
|||
.control-label { |
|||
justify-content: flex-end !important; |
|||
} |
|||
</style> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<form enctype="multipart/form-data" method="post" asp-action="JIG004DSave"> |
|||
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
|||
<input type="hidden" asp-for="OutfitID" /> |
|||
<input type="hidden" asp-for="CreateUserID" /> |
|||
<input type="hidden" asp-for="UpdateUserID" value="@ViewBag.UserID" /> |
|||
<input type="hidden" asp-for="CreateDate" /> |
|||
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> |
|||
<input type="hidden" asp-for="CommodityID" /> |
|||
<input type="hidden" asp-for="VarietyID" /> |
|||
<input type="hidden" asp-for="StatusNo" /> |
|||
<input type="hidden" asp-for="UseStatusNo" /> |
|||
<input type="hidden" asp-for="Remark" /> |
|||
<input type="hidden" asp-for="BuyDay" /> |
|||
<input type="hidden" asp-for="ScheReturnDay" /> |
|||
<input type="hidden" asp-for="Custondian" /> |
|||
<input type="hidden" asp-for="AreaNo" /> |
|||
<input type="hidden" asp-for="LevelNo" /> |
|||
<input type="hidden" asp-for="SiteNo" /> |
|||
<input type="hidden" asp-for="LocationNo" /> |
|||
<input type="hidden" asp-for="PartNo" /> |
|||
<input type="hidden" asp-for="TypeFlag" /> |
|||
<input type="hidden" asp-for="OutfitFactoryNo" /> |
|||
<input type="hidden" asp-for="PuchaseDate" /> |
|||
<input type="hidden" asp-for="UnitPrice" /> |
|||
<input type="hidden" asp-for="QualityDate" /> |
|||
<input type="hidden" asp-for="VendorID" /> |
|||
<input type="hidden" asp-for="QANo" /> |
|||
<input type="hidden" asp-for="StockQty" /> |
|||
<input type="hidden" asp-for="Unit" /> |
|||
<input type="hidden" asp-for="LotNo" /> |
|||
<input type="hidden" asp-for="Boards" /> |
|||
<input type="hidden" asp-for="UseTimes" /> |
|||
<input type="hidden" asp-for="TotalTimes" /> |
|||
<input type="hidden" asp-for="ModelNo" /> |
|||
<input type="hidden" asp-for="BarcodeNo" /> |
|||
<input type="hidden" asp-for="TypeID" /> |
|||
<input type="hidden" asp-for="CycleID" /> |
|||
<input type="hidden" asp-for="ForeignExpenses" /> |
|||
<input type="hidden" asp-for="CheckDate" /> |
|||
<input type="hidden" asp-for="NextDate" /> |
|||
<input type="hidden" asp-for="Master" /> |
|||
<input type="hidden" asp-for="CustodianName" /> |
|||
<input type="hidden" asp-for="CustodianDept" /> |
|||
|
|||
|
|||
|
|||
<div class=" form-group form-inline my-sm-1"> |
|||
<label asp-for="OutfitNo" class="control-label col-sm-3"></label> |
|||
<input asp-for="OutfitNo" class="form-control col-sm-9" readonly /> |
|||
<span asp-validation-for="OutfitNo" class="text-danger offset-sm-3 my-sm-1"></span> |
|||
</div> |
|||
<div class="form-group form-inline my-sm-1"> |
|||
<label asp-for="UseStatusRemark" class="control-label col-sm-3"></label> |
|||
<input asp-for="UseStatusRemark" class="form-control col-sm-9" /> |
|||
<span asp-validation-for="UseStatusRemark" class="text-danger offset-sm-3 my-sm-1"></span> |
|||
</div> |
|||
|
|||
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span> |
|||
<div class="form-group"> |
|||
<input type="submit" value="保存" class="btn btn-primary offset-sm-3" /> |
|||
</div> |
|||
|
|||
</form> |
|||
</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); |
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
</script> |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,161 @@ |
|||
@model AMESCoreStudio.WebApi.Models.AMES.OutfitInfoBlob |
|||
|
|||
|
|||
|
|||
@{ ViewData["Title"] = "JIG004R"; |
|||
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="layui-card-body"> |
|||
<form enctype="multipart/form-data" class="layui-form" method="post" asp-action="JIG004RSave"> |
|||
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
|||
|
|||
<input type="hidden" id="id" asp-for="OutfitID" value="@ViewBag.OutfitID" /> |
|||
<div class="layui-form-item" style="text-align:center"> |
|||
<div class="layui-inline"> |
|||
<label class="layui-btn"> |
|||
<input type="file" name="formFile"> |
|||
</label> |
|||
<input type="submit" id="asubmit" value="上傳" class="layui-btn layui-icon " /> |
|||
</div> |
|||
</div> |
|||
<div style="text-align:center"> |
|||
<div class="layui-inline"> |
|||
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span> |
|||
@* <input type="submit" id="asubmit" value="上傳" class="layui-btn layui-btn-normal layui-btn-xs layui-icon " /> *@ |
|||
</div> |
|||
</div> |
|||
</form> |
|||
@* SOP文件 sheet *@ |
|||
<table class="layui-hide" id="sop" lay-filter="sop"></table> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
@section Scripts { |
|||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|||
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
|||
|
|||
<script type="text/javascript"> |
|||
//layui.use(['form', 'layer', 'laydate'], function () { |
|||
// form = layui.form; |
|||
// |
|||
// form.on('select(Type)', function (data) { |
|||
// var data = $("#Type").val(); |
|||
// getInspectionForms(data); |
|||
// }); |
|||
// |
|||
//}); |
|||
hg.form.onsubmit('asubmit', function (data) { |
|||
tt(); |
|||
//table && table.reload(data); |
|||
}); |
|||
//通过行tool编辑,lay-event="show" |
|||
function show(obj) { |
|||
layui.use('layer', function () { |
|||
var layer = layui.layer; |
|||
layer.open({ |
|||
type: 2, |
|||
title: '預覽文件', |
|||
shadeClose: true,//点击遮罩关闭层 |
|||
shade: 0.8, |
|||
area: ['90%', '90%'], |
|||
content: obj.data.filePath + obj.data.newName, //iframe的url |
|||
zIndex: 19891014, |
|||
//iframe: { |
|||
// src:obj.data.filePath + obj.data.newName |
|||
// |
|||
//} |
|||
}); |
|||
}); |
|||
|
|||
}; |
|||
//通过行tool删除,lay-event="del" |
|||
function del(obj) { |
|||
var id = @ViewBag.OutfitID; |
|||
if (obj.data.imageName) { |
|||
hg.confirm("資料:" + obj.data.imageName + ",确定要删除吗?", function () { |
|||
$.ajax({ |
|||
url: '/JIG/JIG004RD' , |
|||
data: { id: id }, |
|||
type: 'POST', |
|||
success: function (data) { |
|||
if (data.success) { |
|||
obj.del(); //只删本地数据 |
|||
hg.msghide("删除成功!"); |
|||
} |
|||
else { |
|||
hg.msg(data.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
hg.msg("网络请求失败!"); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
@* SOP文件 sheet *@ |
|||
var tableCols = [[ |
|||
{ |
|||
field: 'imageName', |
|||
title: '檔案名稱', |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'createDate', |
|||
templet: '<div>{{ layui.util.toDateString(d.createDate, "yyyy/MM/dd") }}</div>' |
|||
}, |
|||
{ |
|||
field: 'right', |
|||
width: 150, |
|||
title: '操作', |
|||
align: 'center', |
|||
fixed: 'right', |
|||
templet: function (d) { |
|||
var btn = '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-read" lay-event="show">預覽</a>'; |
|||
btn += ' <a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" lay-event="del">刪除</a>'; |
|||
|
|||
return btn; |
|||
} |
|||
}] |
|||
]; |
|||
//基本数据表格 |
|||
var table; |
|||
$(function () { |
|||
|
|||
tt(); |
|||
}); |
|||
function tt() { |
|||
|
|||
//基本数据表格 |
|||
table = hg.table.datatable('sop', '上傳文件', '/JIG/GetOutfitInfoBlobByOutfitID?id=' + @ViewBag.OutfitID , {}, tableCols, false, 'full-100'); |
|||
}; |
|||
|
|||
$(document).ready(function () { |
|||
var error = '@Html.ValidationMessage("error")'; |
|||
if ($(error).text() != '') { |
|||
parent.hg.msg(error); |
|||
} |
|||
}); |
|||
|
|||
</script> |
|||
|
|||
|
|||
} |
|||
|
Loading…
Reference in new issue