25 changed files with 1018 additions and 667 deletions
@ -0,0 +1,147 @@ |
|||
@model AMESCoreStudio.WebApi.Models.AMES.InspectionResultBlob |
|||
|
|||
|
|||
|
|||
@{ ViewData["Title"] = "SPC005R"; |
|||
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="SPC005RSave"> |
|||
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
|||
<input type="hidden" id="id" asp-for="InspectionID" value="@ViewBag.MasterID" /> |
|||
<input type="hidden" id="itemID" asp-for="InspectionItemID" value="@ViewBag.ItemID" /> |
|||
<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) { |
|||
if (obj.data.imageName) { |
|||
hg.confirm("圖片資料:" + obj.data.imageName + ",确定要删除吗?", function () { |
|||
$.ajax({ |
|||
url: '/REP/REP001D', |
|||
data: { id: obj.data.imageName }, |
|||
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: 80, |
|||
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="show">預覽</a>' |
|||
} |
|||
}] |
|||
]; |
|||
//基本数据表格 |
|||
var table; |
|||
$(function () { |
|||
tt(); |
|||
}); |
|||
function tt() { |
|||
//基本数据表格 |
|||
table = hg.table.datatable('sop', '巡檢上傳文件', '/SPC/GetInspectionResultBlobsByQuery?id=' + @ViewBag.MasterID +'&itemID=' + @ViewBag.ItemID, {}, tableCols, false, 'full-100'); |
|||
}; |
|||
|
|||
$(document).ready(function () { |
|||
var error = '@Html.ValidationMessage("error")'; |
|||
if ($(error).text() != '') { |
|||
parent.hg.msg(error); |
|||
} |
|||
}); |
|||
|
|||
</script> |
|||
|
|||
|
|||
} |
|||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,124 @@ |
|||
using System; |
|||
|
|||
|
|||
namespace AMESCoreStudio.WebApi.DTO.AMES |
|||
{ |
|||
/// <summary>
|
|||
/// 檢驗項目維護資料檔 DTO
|
|||
/// </summary>
|
|||
public partial class InspectionResultDetailDto |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 巡檢ID
|
|||
/// </summary>
|
|||
public int InspectionID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 巡檢項目ID
|
|||
/// </summary>
|
|||
public int InspectionItemID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 巡檢項目ID
|
|||
/// </summary>
|
|||
public string InspectionItemName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 線別
|
|||
/// </summary>
|
|||
public string Line { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 站別ID
|
|||
/// </summary>
|
|||
public string RuleStation { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 稽核結果
|
|||
/// P-PASS(允收) ; F-FAIL(批退) ; NA-無 ; A初始狀態 ;
|
|||
/// </summary>
|
|||
public string Result { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 區域
|
|||
/// </summary>
|
|||
public string Area { get; set; } = ""; |
|||
|
|||
/// <summary>
|
|||
/// 位置
|
|||
/// </summary>
|
|||
public string Location { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 缺失單位
|
|||
/// </summary>
|
|||
public string MissingUnitNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 缺失站別
|
|||
/// </summary>
|
|||
public string MissingStationID { get; set; } = ""; |
|||
|
|||
/// <summary>
|
|||
/// 缺失人員ID
|
|||
/// </summary>
|
|||
public string MissingUserID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 缺失類型
|
|||
/// </summary>
|
|||
public string MissingType { get; set; } = ""; |
|||
|
|||
/// <summary>
|
|||
/// 缺失備註
|
|||
/// </summary>
|
|||
public string MissingRemark { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否需要對策 METHOD : Y-YES : N-NO
|
|||
/// </summary>
|
|||
public string Method { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 回覆原因
|
|||
/// </summary>
|
|||
public string PeplyReason { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 回覆對策
|
|||
/// </summary>
|
|||
public string PeplyMethod { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 回覆人員ID
|
|||
public int PeplyUserID { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 創建者ID
|
|||
/// </summary>
|
|||
public string CreateUserID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 創建日期
|
|||
/// </summary>
|
|||
public DateTime CreateDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 更新者ID
|
|||
/// </summary>
|
|||
public string UpdateUserID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 更新日期
|
|||
/// </summary>
|
|||
public DateTime? UpdateDate { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue