4 changed files with 700 additions and 79 deletions
@ -0,0 +1,615 @@ |
|||||
|
@model AMESCoreStudio.Web.ViewModels.QRS.QRS021ViewModel |
||||
|
@{ |
||||
|
ViewData["Title"] = "過站作業"; |
||||
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
||||
|
} |
||||
|
|
||||
|
<script src="~/js/sweetalert2.all.min.js"></script> |
||||
|
<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; |
||||
|
} |
||||
|
|
||||
|
.layui-form > iframe { |
||||
|
height: 100%; |
||||
|
width: 100%; |
||||
|
border: none; |
||||
|
} |
||||
|
|
||||
|
.element { |
||||
|
float: left; |
||||
|
} |
||||
|
|
||||
|
.layui-field-title { |
||||
|
margin: auto; |
||||
|
} |
||||
|
|
||||
|
.layui-form-item { |
||||
|
margin-bottom: auto; |
||||
|
} |
||||
|
|
||||
|
.barcodeInput { |
||||
|
border: 2px solid #090; |
||||
|
color: blue; |
||||
|
} |
||||
|
|
||||
|
.barcodeInput:focus { |
||||
|
border: 3px solid #0026ff; |
||||
|
color: blue; |
||||
|
} |
||||
|
|
||||
|
</style> |
||||
|
|
||||
|
|
||||
|
<div class="layui-card" style="height:auto;"> |
||||
|
<form id="QRS021Form" method="post" asp-action="QRS021" class="layui-form"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<div class="layui-card-body"> |
||||
|
<div class="layui-row"> |
||||
|
<div class="layui-col-md5 element"> |
||||
|
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> |
||||
|
<ul class="layui-tab-title"> |
||||
|
<li class="layui-this">過站資料</li> |
||||
|
<li>治具資料</li> |
||||
|
</ul> |
||||
|
<div class="layui-tab-content"> |
||||
|
<div class="layui-tab-item layui-show"> |
||||
|
<div class="layui-col-md12"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">製程:</label> |
||||
|
<div class="layui-input-inline" style="width:100px"> |
||||
|
<select id="unit" lay-filter="unit" lay-verify="required" asp-for="UnitNO" style="width:100px" lay-submit asp-items="@ViewBag.UnitList"> |
||||
|
</select> |
||||
|
</div> |
||||
|
<label class="layui-form-label">線別:</label> |
||||
|
<div class="layui-input-inline" style="width:100px"> |
||||
|
<select id="line" lay-filter="line" lay-verify="required" asp-for="LineID" lay-submit asp-items="@ViewBag.LineList" > |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-form-item"> |
||||
|
</div> |
||||
|
|
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">工單號碼:</label> |
||||
|
<div class="layui-input-inline" style="width:100px"> |
||||
|
<input type="text" onkeydown="SearchNo(event);" asp-for="WipNO" asp-action="QRS021_GetWip" class="layui-input" autocomplete="off" /> |
||||
|
<input type="hidden" asp-for="WipID" value="@Model.WipID" /> |
||||
|
<input type="hidden" asp-for="FlowRuleID" value="@Model.FlowRuleID" /> |
||||
|
<input type="hidden" asp-for="StationTypeNo" value="@Model.StationTypeNo" /> |
||||
|
<input type="submit" id="GetWipData" asp-action="QRS021_GetWip" style="display:none;" /> |
||||
|
</div> |
||||
|
<label class="layui-form-label">作業站:</label> |
||||
|
<div class="layui-input-inline" style="width:100px"> |
||||
|
<select id="stations" lay-filter="stations" lay-verify="required" asp-for="Station" asp-items="@ViewBag.GetRuleStationByFlowRuleIDList" lay-submit> |
||||
|
</select> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-col-md12"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">料號:</label> |
||||
|
<label class="layui-form-label" style="text-align: left; width: 150px;">@Model.ItemNO</label> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label" style="width:100px;text-align:left; padding: 9px 10px">已刷數/工單數:</label> |
||||
|
<label class="layui-form-label" style="width:150px;text-align:left"><span id="InputQty">@Model.InputQTY</span>/@Model.PlanQTY</label> |
||||
|
</div> |
||||
|
</div> |
||||
|
<fieldset class="layui-elem-field layui-field-title"> |
||||
|
<legend style="color: #e18917">刷讀條碼</legend> |
||||
|
</fieldset> |
||||
|
<div class="layui-form-item" style="background-color: #acdbe36b"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">刷讀條碼:</label> |
||||
|
<div class="layui-input-inline"> |
||||
|
<input type="text" onkeypress="if( event.keyCode == 13 ) { $(':input:visible:enabled:eq(' + ($(':input:visible:enabled').index(this) + 1) + ')').focus(); |
||||
|
event.preventDefault(); return false; }" asp-for="InputNo" id="inputNo" style="width:100px" class="layui-input" autocomplete="off" placeholder="可輸入異常位置" /> |
||||
|
</div> |
||||
|
<div class="layui-input-inline"> |
||||
|
<input type="text" onkeydown="input(event);" id="inputtxt" asp-for="Input" class="layui-input barcodeInput" autocomplete="off" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
@*<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span>*@ |
||||
|
</div> |
||||
|
</div> |
||||
|
<fieldset class="layui-elem-field layui-field-title"> |
||||
|
<legend style="color: #e18917">刷入資料</legend> |
||||
|
<table id="tblCustomers" class="layui-table" cellpadding="0" cellspacing="0"> |
||||
|
<tbody id="tblCustomersBody"> |
||||
|
</tbody> |
||||
|
@*<tfoot> |
||||
|
<tr> |
||||
|
<td><input type="text" id="txtInput" /></td> |
||||
|
<td><input type="button" value="Remove" onclick="Remove(this)" /></td> |
||||
|
</tr> |
||||
|
</tfoot>*@ |
||||
|
</table> |
||||
|
</fieldset> |
||||
|
<fieldset class="layui-elem-field layui-field-title"> |
||||
|
<legend style="color: #e18917">檢查項目</legend> |
||||
|
<table id="MydataTable" class="layui-table"> |
||||
|
@{ |
||||
|
int i = 0; |
||||
|
} |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th> |
||||
|
工項順序 |
||||
|
</th> |
||||
|
<th> |
||||
|
工項名稱 |
||||
|
</th> |
||||
|
<th> |
||||
|
工項描述 |
||||
|
</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
@foreach (var index in Model.MaterialStationsItems) |
||||
|
{ |
||||
|
<tr> |
||||
|
<td> |
||||
|
@index.StationsItemSeq |
||||
|
</td> |
||||
|
<td> |
||||
|
@index.StationsItemNo |
||||
|
</td> |
||||
|
<td> |
||||
|
<input asp-for="@index.StationsItemDesc" name="MaterialStationsItems[@i].StationsItemDesc" readonly="readonly" /> |
||||
|
</td> |
||||
|
</tr> |
||||
|
i++; |
||||
|
} |
||||
|
</tbody> |
||||
|
|
||||
|
</table> |
||||
|
</fieldset> |
||||
|
<fieldset id="KpItemDiv" class="layui-elem-field layui-field-title"> |
||||
|
<legend style="color: #e18917">指定KeyPart</legend> |
||||
|
<input type="text" class="layui-input" asp-for="KpItemName" /> |
||||
|
</fieldset> |
||||
|
<fieldset id="Memo" class="layui-elem-field layui-field-title"> |
||||
|
<legend style="color: #e18917">工程備註</legend> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label" style="width:auto; text-align: left; color: blue;">@Model.SystemMemo</label> |
||||
|
</div> |
||||
|
</fieldset> |
||||
|
<fieldset class="layui-elem-field layui-field-title"> |
||||
|
<legend style="color: #e18917">KeyParts</legend> |
||||
|
</fieldset> |
||||
|
<div class="layui-col-md12"> |
||||
|
<div class="layui-form-item"> |
||||
|
<table id="MydataTable" class="layui-table"> |
||||
|
@{ |
||||
|
int j = 0; |
||||
|
} |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th> |
||||
|
KP料號名稱 |
||||
|
</th> |
||||
|
<th> |
||||
|
KP料號NO |
||||
|
</th> |
||||
|
<th> |
||||
|
順序 |
||||
|
</th> |
||||
|
<th> |
||||
|
前置碼 |
||||
|
</th> |
||||
|
<th> |
||||
|
長度 |
||||
|
</th> |
||||
|
<th> |
||||
|
生產單位 |
||||
|
</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
@foreach (var index in Model.WipKps) |
||||
|
{ |
||||
|
<tr> |
||||
|
<td> |
||||
|
<input type="text" class="layui-input" asp-for="@index.KpName" name="WipKps[@j].KpName" style="width:100px" readonly="readonly" /> |
||||
|
<input type="hidden" name="WipKps[@j].KpNoName" value="@index.KpNoName" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="layui-input" asp-for="@index.KpNoName" name="WipKps[@j].KpNoName" style="width:100px" readonly="readonly" /> |
||||
|
<input type="hidden" asp-for="@index.KpNo" value="@index.KpNo" name="WipKps[@j].KpNo" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="layui-input" asp-for="@index.KpSeq" name="WipKps[@j].KpSeq" style="width:40px" readonly="readonly" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="layui-input" asp-for="@index.Title" name="WipKps[@j].Title" style="width:40px" readonly="readonly" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input asp-for="@index.Length" class="layui-input" name="WipKps[@j].Length" style="width:40px" readonly="readonly" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
@index.UnitNoName |
||||
|
</td> |
||||
|
</tr> |
||||
|
j++; |
||||
|
} |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-tab-item"> |
||||
|
<table id="MydataTable" class="layui-table"> |
||||
|
@{ |
||||
|
int k = 0; |
||||
|
} |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th> |
||||
|
治具種類 |
||||
|
</th> |
||||
|
<th> |
||||
|
生產單位 |
||||
|
</th> |
||||
|
<th> |
||||
|
作業站 |
||||
|
</th> |
||||
|
<th> |
||||
|
刷入治具條碼 |
||||
|
</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
@foreach (var index in Model.wipOutfits) |
||||
|
{ |
||||
|
<tr> |
||||
|
<td> |
||||
|
<input type="text" class="layui-input" asp-for="@index.PartNoName" name="wipOutfits[@k].PartNoName" readonly="readonly" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="layui-input" asp-for="@index.UnitNoName" name="wipOutfits[@k].UnitNoName" readonly="readonly" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type="text" class="layui-input" asp-for="@index.StationName" name="wipOutfits[@k].StationName" readonly="readonly" /> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input onkeypress="if( event.keyCode == 13 ) { return false; }" asp-for="@index.Inputs" name="wipOutfits[@k].Inputs" class="layui-input" /> |
||||
|
</td> |
||||
|
</tr> |
||||
|
k++; |
||||
|
} |
||||
|
</tbody> |
||||
|
|
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-col-md7 element" style="height:100%"> |
||||
|
@if (Model.Sops.Count != 0) |
||||
|
{ |
||||
|
bool sopfirst = true; |
||||
|
<div class="layui-tab layui-tab-brief"> |
||||
|
<ul class="layui-tab-title "> |
||||
|
@foreach (var index in Model.Sops) |
||||
|
{ |
||||
|
if (sopfirst) |
||||
|
{ |
||||
|
<li class="layui-this">@index.SopName</li> |
||||
|
sopfirst = false; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
<li>@index.SopName</li> |
||||
|
} |
||||
|
} |
||||
|
</ul> |
||||
|
|
||||
|
<div class="layui-tab-content"> |
||||
|
@foreach (var index in Model.Sops) |
||||
|
{ |
||||
|
if (!sopfirst) |
||||
|
{ |
||||
|
<div class="layui-tab-item layui-show" style="height:90vh"> |
||||
|
<iframe frameborder="0" style="width:100%;height:100%;" src='@index.SopPath'></iframe> |
||||
|
</div> |
||||
|
sopfirst = true; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
<div class="layui-tab-item" style="height:90vh"> |
||||
|
<iframe frameborder="0" style="width:100%;height:100%;" src='@index.SopPath'></iframe> |
||||
|
</div> |
||||
|
} |
||||
|
} |
||||
|
</div> |
||||
|
</div> |
||||
|
} |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
@{ |
||||
|
await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
||||
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); |
||||
|
} |
||||
|
<script type="text/javascript" src="~/js/grids.min.js"></script> |
||||
|
<script type="text/javascript"> |
||||
|
|
||||
|
$(document).ready(function () { |
||||
|
var error = '@Html.ValidationMessage("error")'; |
||||
|
if ($(error).text() != '') { |
||||
|
ShowInputError(error); |
||||
|
} |
||||
|
|
||||
|
if ($("#StationTypeNo").val() == "U" || $("#StationTypeNo").val() == "A") { |
||||
|
$("#inputNo").show(); |
||||
|
} |
||||
|
else { |
||||
|
$("#inputNo").hide(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@if (!string.IsNullOrWhiteSpace(Model.SystemMemo)) |
||||
|
{ |
||||
|
<text>$("#Memo").show(); </text> |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
<text>$("#Memo").hide(); </text> |
||||
|
} |
||||
|
|
||||
|
////if (!string.IsNullOrWhiteSpace(Model.KpItemName)) |
||||
|
//{ |
||||
|
// <text>$("#KpItemDiv").show(); </text> |
||||
|
//} |
||||
|
//else |
||||
|
//{ |
||||
|
// <text>$("#KpItemDiv").hide(); </text> |
||||
|
//} |
||||
|
}); |
||||
|
|
||||
|
// Jquery 將兩邊DIV設定同高度 |
||||
|
jQuery(function ($) { |
||||
|
$('.element').responsiveEqualHeightGrid(); |
||||
|
}); |
||||
|
|
||||
|
function SearchNo(e) { |
||||
|
if (e.keyCode == 13) { |
||||
|
$("#GetWipData").click(); |
||||
|
$("#KpItemName").val(''); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
function input(e) { |
||||
|
if (e.keyCode == 13) { |
||||
|
var Inputs = GetAllEmpData(); |
||||
|
var data = $("#QRS021Form").serialize(); |
||||
|
//$.each(Inputs, function (i, item) { |
||||
|
// data += "&Inputs[" + i + "]=" + item; |
||||
|
//}); |
||||
|
var InputsTotal = Inputs.length; |
||||
|
for (i = 0; i < InputsTotal; i++) { |
||||
|
data += "&Inputs[" + i + "].Input=" + Inputs[i].Input; |
||||
|
data += "&Inputs[" + i + "].InputNo=" + Inputs[i].InputNo; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
$.ajax({ |
||||
|
url: "@Url.Action("QRS021_Input", "QRS")", |
||||
|
type: "POST", |
||||
|
data: data, |
||||
|
success: function (result) { |
||||
|
$("#inputtxt").val(''); |
||||
|
$("#inputNo").val(''); |
||||
|
// 錯誤訊息 |
||||
|
if (!result.success) { |
||||
|
ShowInputError(result.msg); |
||||
|
} |
||||
|
else { |
||||
|
if (result.msg.length != 0) { ShowInputOK(result.msg); } |
||||
|
|
||||
|
// 指定KP 順序 |
||||
|
if (result.data1.length != 0) { |
||||
|
var value = $("#KpItemName").val(); |
||||
|
if (value != '') |
||||
|
$("#KpItemName").val(value + "," + result.data1); |
||||
|
else |
||||
|
$("#KpItemName").val(result.data1); |
||||
|
} |
||||
|
// 回傳有值 |
||||
|
else if (result.data.length != 0) { |
||||
|
// 新增資料 |
||||
|
|
||||
|
TableAddRow(result.data); |
||||
|
} |
||||
|
else { |
||||
|
$("#tblCustomersBody").empty(); |
||||
|
InputQty(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
event.preventDefault(); |
||||
|
return false; |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
layui.use(['form', 'layer'], function () { |
||||
|
form = layui.form; |
||||
|
|
||||
|
form.on('select(unit)', function (data) { |
||||
|
$("#stations").empty();//清空下拉框的值 |
||||
|
//getRuleStationList(data.value); |
||||
|
$("#KpItemName").val(''); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
form.on('select(stations)', function (data) { |
||||
|
$("#KpItemName").val(''); |
||||
|
$("#GetWipData").click(); |
||||
|
|
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
function InputQty() { |
||||
|
$.ajax({ |
||||
|
url: "@Url.Action("getBarcodeStationByInputQty", "QRS")", |
||||
|
type: "POST", |
||||
|
data: { "wipNo": $("#WipNO").val(), "unitNo": $("#unit").val(), "ststionID": $("#stations").val() }, |
||||
|
success: function (result) { |
||||
|
$("#InputQty").text(result.data); |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
// 新增trRow |
||||
|
function TableAddRow(e) { |
||||
|
var strAry = e.split('@'); |
||||
|
var InputNo = strAry[1]; |
||||
|
if (InputNo == undefined) |
||||
|
InputNo = ''; |
||||
|
|
||||
|
//var rowCount = $('.data-contact-person').length + 0; |
||||
|
var contactdiv = '<tr class="data-contact-person">' + |
||||
|
'<td><input readonly="readonly" onkeypress="if( event.keyCode == 13 ) { return false; }" type="text" name="f-name" class="form-control td-InputNo" value=' + InputNo + '></td>' + |
||||
|
'<td><input readonly="readonly" onkeypress="if( event.keyCode == 13 ) { return false; }" type="text" name="f-name" class="form-control td-Input" value=' + strAry[0] + ' /></td>' + |
||||
|
'<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' + |
||||
|
'</tr>'; |
||||
|
$('#tblCustomers').append(contactdiv); |
||||
|
AutoWindowSize(); |
||||
|
}; |
||||
|
|
||||
|
// Table 刪除 |
||||
|
function Remove(button) { |
||||
|
//Determine the reference of the Row using the Button. |
||||
|
var row = $(button).closest("TR"); |
||||
|
var table = $("#tblCustomers")[0]; |
||||
|
table.deleteRow(row[0].rowIndex); |
||||
|
//var name = $("TD", row).eq(0).html(); |
||||
|
//if (confirm("Do you want to delete: " + name)) { |
||||
|
// //Get the reference of the Table. |
||||
|
// var table = $("#tblCustomers")[0]; |
||||
|
|
||||
|
// //Delete the Table row using it's Index. |
||||
|
// table.deleteRow(row[0].rowIndex); |
||||
|
//} |
||||
|
}; |
||||
|
|
||||
|
// 紀錄表格欄位 |
||||
|
function GetAllEmpData() { |
||||
|
// 單筆 |
||||
|
//var data = []; |
||||
|
//$('tr.data-contact-person').each(function () { |
||||
|
// var firstName = $(this).find('.td-Input').val(); |
||||
|
// data.push(firstName); |
||||
|
//}); |
||||
|
//return data; |
||||
|
|
||||
|
var data = []; |
||||
|
$('tr.data-contact-person').each(function () { |
||||
|
var Input = $(this).find('.td-Input').val(); |
||||
|
var InputNo = $(this).find('.td-InputNo').val(); |
||||
|
data.push({ Input: Input, InputNo: InputNo }); |
||||
|
}); |
||||
|
return data; |
||||
|
} |
||||
|
|
||||
|
function AutoWindowSize() { |
||||
|
$(window).on('resize', function () { |
||||
|
//AdminInit(); |
||||
|
//var $content = $('#nav_xbs_tab .layui-tab-content'); |
||||
|
//$content.height($(this).height() - 125); |
||||
|
//$content.find('iframe').each(function () { |
||||
|
// $(this).height($content.height()); |
||||
|
//}); |
||||
|
}).resize(); |
||||
|
} |
||||
|
|
||||
|
function AdminInit() { |
||||
|
|
||||
|
var hgfull = function () { |
||||
|
var layfull = $('[lay-height]'); |
||||
|
if (layfull.attr('lay-height')) { |
||||
|
var arr = layfull.attr('lay-height').split('-'); |
||||
|
if (arr.length === 2) { |
||||
|
var height = window.innerHeight - arr[1]; |
||||
|
layfull.css('height', height + 'px'); |
||||
|
layfull.css('overflow-y', 'auto'); |
||||
|
} |
||||
|
else if (arr[0] === 'full') { |
||||
|
layfull.css('height', window.innerHeight - 200 + 'px'); |
||||
|
layfull.css('overflow-y', 'auto'); |
||||
|
} |
||||
|
else if (arr[0] === 'auto') { |
||||
|
var next = layfull.next(); |
||||
|
if (next.length > 0) { |
||||
|
setTimeout(function () { |
||||
|
//console.log(next.height()); |
||||
|
if (next.height() === 99) { |
||||
|
hgfull(); |
||||
|
return false; |
||||
|
} |
||||
|
layfull.children('.layui-card').css('height', next.height() + 'px'); |
||||
|
layfull.children('.layui-card').css('overflow-y', 'auto'); |
||||
|
}, 5); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
$(window).resize(function () { |
||||
|
hgfull(); |
||||
|
if (!document.fullscreenElement) { |
||||
|
$("body").find('.fa-compress').removeClass('fa-compress').addClass('fa-arrows-alt'); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// Alert |
||||
|
function ShowInputOK(Msg) { |
||||
|
Swal.fire({ |
||||
|
icon: 'success', |
||||
|
title: Msg, |
||||
|
showConfirmButton: false, |
||||
|
timer: 2000 |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
function ShowInputError(Msg) { |
||||
|
Swal.fire({ |
||||
|
color: '#716add', |
||||
|
icon: 'warning', |
||||
|
title: "<h5 style='color:#FFFFFF'>" + Msg + "</h5>", |
||||
|
background: '#db4444', |
||||
|
}) |
||||
|
} |
||||
|
</script> |
||||
|
} |
Loading…
Reference in new issue