|
|
@ -25,8 +25,8 @@ |
|
|
|
</div> |
|
|
|
<div class="layui-inline layui-show-xs-block"> |
|
|
|
@*<button class="layui-btn layui-btn-sm layui-btn-normal" type="submit" lay-submit lay-filter="querysubmit"> |
|
|
|
<i class="layui-icon layui-icon-sm"></i> |
|
|
|
</button>*@ |
|
|
|
<i class="layui-icon layui-icon-sm"></i> |
|
|
|
</button>*@ |
|
|
|
<a class="layui-btn layui-btn-sm layui-btn-normal" id="attachment" title="文件上傳" lay-submit lay-filter="attachment" onclick="upload()"> |
|
|
|
<i class="layui-icon layui-icon-sm"></i> |
|
|
|
</a> |
|
|
@ -110,8 +110,8 @@ |
|
|
|
<div class="layui-col-xs2"> |
|
|
|
<div class="layui-form-item"> |
|
|
|
@*<div class="layui-input-block" style="margin-left:auto;"> |
|
|
|
<label class="layui-form-label" style="text-align: left; width: 150px;">@Model.CustomerNo</label> |
|
|
|
</div>*@ |
|
|
|
<label class="layui-form-label" style="text-align: left; width: 150px;">@Model.CustomerNo</label> |
|
|
|
</div>*@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs1"> |
|
|
@ -132,8 +132,8 @@ |
|
|
|
<div class="layui-col-xs1" style="text-align:center;display:none;" id="critIDDIV"> |
|
|
|
<input type="hidden" asp-action="CritID" value="@Model.CritID" /> |
|
|
|
@*<a class="layui-btn layui-btn-sm layui-btn-normal" id="attachment" title="抽驗係數" lay-submit lay-filter="attachment" onclick="openQC()"> |
|
|
|
<i class="layui-icon layui-icon-sm" style="font-size: 30px; color: #1E9FFF;"></i> |
|
|
|
</a>*@ |
|
|
|
<i class="layui-icon layui-icon-sm" style="font-size: 30px; color: #1E9FFF;"></i> |
|
|
|
</a>*@ |
|
|
|
<a title="抽驗係數" lay-submit lay-filter="attachment" onclick="openQC()"><i class="layui-icon layui-icon-form" style="font-size: 30px; color: #ff0000;"></i></a> |
|
|
|
</div> |
|
|
|
<div class="layui-col-xs3"> |
|
|
@ -359,7 +359,9 @@ |
|
|
|
<h2 class="layui-colla-title">細項資料</h2> |
|
|
|
<div class="layui-colla-content layui-show"> |
|
|
|
<table id="MydataTable" class="layui-table"> |
|
|
|
@{ int i = 0;} |
|
|
|
@{ |
|
|
|
int i = 0; |
|
|
|
} |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th>箱號</th> |
|
|
@ -508,11 +510,13 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
@section Scripts{ |
|
|
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|
|
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
|
|
|
@{ |
|
|
|
await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|
|
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); |
|
|
|
} |
|
|
|
<script type="text/javascript" src="~/js/grids.min.js"></script> |
|
|
|
<script type="text/javascript"> |
|
|
|
layui.use(['form' ,'layer','laydate'], function () { |
|
|
|
layui.use(['form', 'layer', 'laydate'], function () { |
|
|
|
var form = layui.form; |
|
|
|
|
|
|
|
}); |
|
|
@ -520,75 +524,98 @@ |
|
|
|
function detail(obj) { |
|
|
|
let InhouseNo = $("#hInhouseNo").val().trim(); |
|
|
|
let SeqID = $("#hSeqID").val().trim(); |
|
|
|
hg.open('FQC細項資料', '/FQC/FQC007V?inhouseNo=' + InhouseNo + '&seqID=' + SeqID+ '&boxNo=' + obj, '900', '500'); |
|
|
|
hg.open('FQC細項資料', '/FQC/FQC007V?inhouseNo=' + InhouseNo + '&seqID=' + SeqID + '&boxNo=' + obj, '900', '500'); |
|
|
|
} |
|
|
|
|
|
|
|
//UserName |
|
|
|
function getUserName(val) { |
|
|
|
if (val.value.length != 0) { |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
url: "@Url.Action("getUserName", "SYS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "userNo": val.value}, |
|
|
|
type: 'post', |
|
|
|
success: function (result) |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
$(val).closest('div.layui-col-xs2').find('label[id*=' + val.id + '_Name]').text(result.data); |
|
|
|
}, |
|
|
|
error: function (result) |
|
|
|
{ |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
|
url: "@Url.Action("getUserName", "SYS")", |
|
|
|
dataType: 'json', |
|
|
|
data: { "userNo": val.value }, |
|
|
|
type: 'post', |
|
|
|
success: function (result) { |
|
|
|
$(val).closest('div.layui-col-xs2').find('label[id*=' + val.id + '_Name]').text(result.data); |
|
|
|
}, |
|
|
|
error: function (result) { |
|
|
|
alert(result); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
function edit() { |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '抽驗', |
|
|
|
type: 2, |
|
|
|
area: ['600px', '550px'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: false, |
|
|
|
scrollbar: true, |
|
|
|
moveOut:true, |
|
|
|
content: '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', |
|
|
|
end: function () { |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
}); |
|
|
|
var data = $("#FQC007Form").serialize(); |
|
|
|
$.ajax({ |
|
|
|
url: "@Url.Action("FQC007AjaxJson", "FQC")", |
|
|
|
type: "POST", |
|
|
|
data: data, |
|
|
|
success: function (result) { |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '抽驗', |
|
|
|
type: 2, |
|
|
|
area: ['600px', '550px'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: false, |
|
|
|
scrollbar: true, |
|
|
|
moveOut: true, |
|
|
|
content: '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', |
|
|
|
end: function () { |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
error: function (result) { |
|
|
|
alert(`呼叫API失敗`); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//hg.open('抽驗', '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', 600, 600); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
function result() { |
|
|
|
//hg.open('判定結果', '/FQC/FQC007B/', 600, 400); |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '結果判定', |
|
|
|
type: 2, |
|
|
|
area: ['600px', '400px'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: true, |
|
|
|
content: '/FQC/FQC007B?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID&fqc=@Model.FqcID' |
|
|
|
}); |
|
|
|
var data = $("#FQC007Form").serialize(); |
|
|
|
$.ajax({ |
|
|
|
url: "@Url.Action("FQC007AjaxJson", "FQC")", |
|
|
|
type: "POST", |
|
|
|
data: data, |
|
|
|
success: function (result) { |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '結果判定', |
|
|
|
type: 2, |
|
|
|
area: ['600px', '400px'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: true, |
|
|
|
content: '/FQC/FQC007B?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID&fqc=@Model.FqcID' |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
error: function (result) { |
|
|
|
alert(`呼叫API失敗`); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
// 文件上傳 |
|
|
|
function upload() { |
|
|
|
if (@Model.FqcID == 0) {parent.hg.msg('請先抽驗一筆紀錄!'); |
|
|
|
if (@Model.FqcID == 0) { |
|
|
|
parent.hg.msg('請先抽驗一筆紀錄!'); |
|
|
|
return; |
|
|
|
}; |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '文件上傳', |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '文件上傳', |
|
|
|
type: 2, |
|
|
|
area: ['600px', '400px'], |
|
|
|
fixed: false, //不固定 |
|
|
@ -600,58 +627,59 @@ |
|
|
|
|
|
|
|
// QCITEM |
|
|
|
function addQcItem() { |
|
|
|
if ('@Model.WipNo' == '' ) {parent.hg.msg('請搜尋入庫單號!'); |
|
|
|
if ('@Model.WipNo' == '') { |
|
|
|
parent.hg.msg('請搜尋入庫單號!'); |
|
|
|
return; |
|
|
|
} |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '檢驗工項維護', |
|
|
|
type: 2, |
|
|
|
area: ['700px', '500px'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: true, |
|
|
|
content: '/FQC/FQC007A?wipNo=@Model.WipNo&itemNo=@Model.ItemNo', |
|
|
|
end: function () { |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
} |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: '檢驗工項維護', |
|
|
|
type: 2, |
|
|
|
area: ['700px', '500px'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: true, |
|
|
|
content: '/FQC/FQC007A?wipNo=@Model.WipNo&itemNo=@Model.ItemNo', |
|
|
|
end: function () { |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// OpenQC |
|
|
|
function openQC() { |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: 'QC', |
|
|
|
type: 2, |
|
|
|
area: ['700px', '500px'], |
|
|
|
btn:['確定','取消'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: false, |
|
|
|
content: '/FQC/FQC007E?AQLType=@Model.AQLType&QCQty=@Model.InhouseQty', |
|
|
|
yes: function (index, layero) { |
|
|
|
//var body = layer.getChildFrame('body', index); |
|
|
|
var obj = layero.find("iframe")[0].contentWindow; |
|
|
|
$('#CritID').val(obj.$("#critID").val()); |
|
|
|
$('#QuotDescription').val(obj.$("#quotDescription").val()); |
|
|
|
$('#AQL').text(obj.$("#aql").val()); |
|
|
|
$('#QcQty').text(obj.$("#qcQty").val()); |
|
|
|
$('#ReQty').text(obj.$("#reQty").val()); |
|
|
|
$('#AcQty').text(obj.$("#acQty").val()); |
|
|
|
layer.close(index); |
|
|
|
var data = $("#FQC007Form").serialize(); |
|
|
|
data += "&CritID=" + obj.$("#critID").val(); |
|
|
|
layui.use('layer', function () { |
|
|
|
var layer = layui.layer; |
|
|
|
layer.open({ |
|
|
|
title: 'QC', |
|
|
|
type: 2, |
|
|
|
area: ['700px', '500px'], |
|
|
|
btn: ['確定', '取消'], |
|
|
|
fixed: false, //不固定 |
|
|
|
maxmin: false, |
|
|
|
content: '/FQC/FQC007E?AQLType=@Model.AQLType&QCQty=@Model.InhouseQty', |
|
|
|
yes: function (index, layero) { |
|
|
|
//var body = layer.getChildFrame('body', index); |
|
|
|
var obj = layero.find("iframe")[0].contentWindow; |
|
|
|
$('#CritID').val(obj.$("#critID").val()); |
|
|
|
$('#QuotDescription').val(obj.$("#quotDescription").val()); |
|
|
|
$('#AQL').text(obj.$("#aql").val()); |
|
|
|
$('#QcQty').text(obj.$("#qcQty").val()); |
|
|
|
$('#ReQty').text(obj.$("#reQty").val()); |
|
|
|
$('#AcQty').text(obj.$("#acQty").val()); |
|
|
|
layer.close(index); |
|
|
|
var data = $("#FQC007Form").serialize(); |
|
|
|
data += "&CritID=" + obj.$("#critID").val(); |
|
|
|
$.ajax({ |
|
|
|
url: "@Url.Action("FQC007ByCritID", "FQC")", |
|
|
|
type: "POST", |
|
|
|
data: data, |
|
|
|
success: function (result) { |
|
|
|
} |
|
|
|
url: "@Url.Action("FQC007ByCritID", "FQC")", |
|
|
|
type: "POST", |
|
|
|
data: data, |
|
|
|
success: function (result) { |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -677,7 +705,7 @@ |
|
|
|
$("#CustomerVIP").attr("disabled", "disabled"); |
|
|
|
|
|
|
|
if ($(error).text() != '') { |
|
|
|
parent.hg.msg(error); |
|
|
|
parent.hg.msg(error); |
|
|
|
}; |
|
|
|
|
|
|
|
let InhouseNo = $("#hInhouseNo").val().trim(); |
|
|
@ -689,7 +717,7 @@ |
|
|
|
$("#critID").show(); |
|
|
|
} |
|
|
|
setupEnterToNext(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
function setupEnterToNext() { |
|
|
|
// add keydown event for all inputs |
|
|
|