You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
3.9 KiB
136 lines
3.9 KiB
@model AMESCoreStudio.WebApi.Models.AMES.NgInfoAlertBlob
|
|
|
|
|
|
|
|
@{ ViewData["Title"] = "FQC014RV";
|
|
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="FQC014RSave">
|
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
|
|
|
<input type="hidden" id="id" asp-for="CaseID" value="@ViewBag.CaseID" />
|
|
<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">
|
|
|
|
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 filedownload(obj) {
|
|
|
|
if (obj.data.imageName) {
|
|
// alert(obj.data.imageName);
|
|
// alert(obj.data.filePath);
|
|
var Path = obj.data.filePath;
|
|
Path = Path.replace(/\\/g, '/');
|
|
var FileName = obj.data.imageName;
|
|
filePath = '/FQC/FileDownload_byPath?Path=' + Path + '&FileName=' + FileName;
|
|
window.open(filePath);
|
|
}
|
|
};
|
|
@* SOP文件 sheet *@
|
|
|
|
var tableCols = [[
|
|
{
|
|
field: 'imageName',
|
|
title: '檔案名稱',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'memos',
|
|
title: '備註',
|
|
sort: true
|
|
},
|
|
{
|
|
field: 'right',
|
|
width: 150,
|
|
title: '操作',
|
|
align: 'center',
|
|
fixed: 'right',
|
|
templet: function (d) {
|
|
var btn = ' <a class="layui-btn layui-btn-normal layui-btn-xs " lay-event="filedownload">下載</a>';
|
|
return btn;
|
|
}
|
|
}]
|
|
];
|
|
//基本数据表格
|
|
var table;
|
|
$(function () {
|
|
|
|
tt();
|
|
});
|
|
function tt() {
|
|
|
|
//基本数据表格
|
|
// alert("/FQC/GetNgInfoAlertBlobs/"+ id.value);
|
|
table = hg.table.datatable('sop', '上傳文件', '/FQC/GetNgInfoAlertBlobs/' + id.value , {}, tableCols, false, 'full-100');
|
|
};
|
|
|
|
$(document).ready(function () {
|
|
var error = '@Html.ValidationMessage("error")';
|
|
if ($(error).text() != '') {
|
|
parent.hg.msg(error);
|
|
}
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
}
|
|
|
|
|