Browse Source

1. FQC修正 抽驗結果 數量問題,抽驗跟檢驗結果儲存當前頁面資料

PTD
Ray 3 years ago
parent
commit
7d9df043be
  1. 57
      AMESCoreStudio.Web/Controllers/FQCController.cs
  2. 56
      AMESCoreStudio.Web/Views/FQC/FQC007.cshtml
  3. 16
      AMESCoreStudio.Web/Views/PCS/PCS004C.cshtml
  4. 1035
      AMES規格書(for 安勤科技及昶亨科技) - 追加客製 v4.pdf
  5. BIN
      安勤AMES流程盤點客製程式彙整(第2次規格會議).xlsx

57
AMESCoreStudio.Web/Controllers/FQCController.cs

@ -894,6 +894,61 @@ namespace AMESCoreStudio.Web.Controllers
return View(model); return View(model);
} }
[HttpPost]
public async Task FQC007AjaxJson(FqcDto model)
{
IResultModel<FqcDto> result;
result = await _fqcApi.GetFqcQuery(model.InhouseNo, model.SeqID);
var result_FQCResultMaster = await _fqcApi.GetFqcResultMaster(model.FqcID);
if (result_FQCResultMaster != null)
{
result_FQCResultMaster.OS = model.OS;
result_FQCResultMaster.CPU = model.CPU;
result_FQCResultMaster.RAM = model.RAM;
result_FQCResultMaster.BIOS = model.BIOS;
result_FQCResultMaster.Supervisor = model.Supervisor;
result_FQCResultMaster.Proved = model.Proved;
result_FQCResultMaster.OutfitNo = model.OutfitNo;
result_FQCResultMaster.InspectionType = model.InspectionType;
result_FQCResultMaster.Note = model.Note;
result_FQCResultMaster.ECN_Memo = model.ECN_Memo;
result_FQCResultMaster.InspectionStatus = model.InspectionStatus;
result_FQCResultMaster.PLM_ECN = model.PLMECN;
await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(result_FQCResultMaster));
ModelState.AddModelError("error", "儲存成功!");
}
else
{
var fqcResultMaster = new FqcResultMaster();
fqcResultMaster.InhouseNo = model.InhouseNo;
fqcResultMaster.SeqID = Convert.ToInt16(model.SeqID);
fqcResultMaster.LotQty = model.InhouseQty;
fqcResultMaster.WipNo = model.WipNo;
fqcResultMaster.QaQty = 1;
fqcResultMaster.ItemNo = model.ItemNo;
fqcResultMaster.ModelNo = model.ModelNo;
fqcResultMaster.StartTime = DateTime.Now;
fqcResultMaster.EndTime = DateTime.Now;
fqcResultMaster.CreateUserID = GetLogInUserID();
fqcResultMaster.OS = model.OS;
fqcResultMaster.CPU = model.CPU;
fqcResultMaster.RAM = model.RAM;
fqcResultMaster.BIOS = model.BIOS;
fqcResultMaster.Supervisor = model.Supervisor;
fqcResultMaster.Proved = model.Proved;
fqcResultMaster.OutfitNo = model.OutfitNo;
fqcResultMaster.InspectionType = model.InspectionType;
fqcResultMaster.Note = model.Note;
fqcResultMaster.ECN_Memo = model.ECN_Memo;
fqcResultMaster.InspectionStatus = model.InspectionStatus;
fqcResultMaster.PLM_ECN = model.PLMECN;
await _fqcApi.PostFqcResultMaster(JsonConvert.SerializeObject(fqcResultMaster));
}
}
#region 抽驗 #region 抽驗
[HttpGet] [HttpGet]
public async Task<IActionResult> FQC007C(string inhouseNo, string seq) public async Task<IActionResult> FQC007C(string inhouseNo, string seq)
@ -1072,7 +1127,7 @@ namespace AMESCoreStudio.Web.Controllers
// 抽驗數量 大於 本批次送驗量 // 抽驗數量 大於 本批次送驗量
if (fqcItem.QcQty > fqcItem.InhouseQty) if (fqcItem.QcQty > fqcItem.InhouseQty)
{ {
if (fqcItem.PassQty + fqcItem.FailQty != fqcItem.FailQty) if (fqcItem.PassQty + fqcItem.FailQty != fqcItem.InhouseQty)
{ {
var _msg = "抽樣數量不足,無法判定"; var _msg = "抽樣數量不足,無法判定";
return RedirectToAction("Refresh", "Home", new { msg = _msg }); return RedirectToAction("Refresh", "Home", new { msg = _msg });

56
AMESCoreStudio.Web/Views/FQC/FQC007.cshtml

@ -359,7 +359,9 @@
<h2 class="layui-colla-title">細項資料</h2> <h2 class="layui-colla-title">細項資料</h2>
<div class="layui-colla-content layui-show"> <div class="layui-colla-content layui-show">
<table id="MydataTable" class="layui-table"> <table id="MydataTable" class="layui-table">
@{ int i = 0;} @{
int i = 0;
}
<thead> <thead>
<tr> <tr>
<th>箱號</th> <th>箱號</th>
@ -508,11 +510,13 @@
</div> </div>
@section Scripts{ @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" src="~/js/grids.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
layui.use(['form' ,'layer','laydate'], function () { layui.use(['form', 'layer', 'laydate'], function () {
var form = layui.form; var form = layui.form;
}); });
@ -520,7 +524,7 @@
function detail(obj) { function detail(obj) {
let InhouseNo = $("#hInhouseNo").val().trim(); let InhouseNo = $("#hInhouseNo").val().trim();
let SeqID = $("#hSeqID").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 //UserName
@ -530,14 +534,12 @@
{ {
url: "@Url.Action("getUserName", "SYS")", url: "@Url.Action("getUserName", "SYS")",
dataType: 'json', dataType: 'json',
data: { "userNo": val.value}, data: { "userNo": val.value },
type: 'post', type: 'post',
success: function (result) success: function (result) {
{
$(val).closest('div.layui-col-xs2').find('label[id*=' + val.id + '_Name]').text(result.data); $(val).closest('div.layui-col-xs2').find('label[id*=' + val.id + '_Name]').text(result.data);
}, },
error: function (result) error: function (result) {
{
alert(result); alert(result);
} }
}); });
@ -545,6 +547,12 @@
}; };
function edit() { function edit() {
var data = $("#FQC007Form").serialize();
$.ajax({
url: "@Url.Action("FQC007AjaxJson", "FQC")",
type: "POST",
data: data,
success: function (result) {
layui.use('layer', function () { layui.use('layer', function () {
var layer = layui.layer; var layer = layui.layer;
layer.open({ layer.open({
@ -554,19 +562,31 @@
fixed: false, //不固定 fixed: false, //不固定
maxmin: false, maxmin: false,
scrollbar: true, scrollbar: true,
moveOut:true, moveOut: true,
content: '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', content: '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID',
end: function () { end: function () {
window.location.reload(); window.location.reload();
} }
}); });
}); });
},
error: function (result) {
alert(`呼叫API失敗`);
}
});
//hg.open('抽驗', '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', 600, 600); //hg.open('抽驗', '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', 600, 600);
}; };
function result() { function result() {
//hg.open('判定結果', '/FQC/FQC007B/', 600, 400); //hg.open('判定結果', '/FQC/FQC007B/', 600, 400);
var data = $("#FQC007Form").serialize();
$.ajax({
url: "@Url.Action("FQC007AjaxJson", "FQC")",
type: "POST",
data: data,
success: function (result) {
layui.use('layer', function () { layui.use('layer', function () {
var layer = layui.layer; var layer = layui.layer;
layer.open({ layer.open({
@ -578,11 +598,18 @@
content: '/FQC/FQC007B?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID&fqc=@Model.FqcID' content: '/FQC/FQC007B?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID&fqc=@Model.FqcID'
}); });
}); });
},
error: function (result) {
alert(`呼叫API失敗`);
}
});
}; };
// 文件上傳 // 文件上傳
function upload() { function upload() {
if (@Model.FqcID == 0) {parent.hg.msg('請先抽驗一筆紀錄!'); if (@Model.FqcID == 0) {
parent.hg.msg('請先抽驗一筆紀錄!');
return; return;
}; };
layui.use('layer', function () { layui.use('layer', function () {
@ -600,7 +627,8 @@
// QCITEM // QCITEM
function addQcItem() { function addQcItem() {
if ('@Model.WipNo' == '' ) {parent.hg.msg('請搜尋入庫單號!'); if ('@Model.WipNo' == '') {
parent.hg.msg('請搜尋入庫單號!');
return; return;
} }
layui.use('layer', function () { layui.use('layer', function () {
@ -627,7 +655,7 @@
title: 'QC', title: 'QC',
type: 2, type: 2,
area: ['700px', '500px'], area: ['700px', '500px'],
btn:['確定','取消'], btn: ['確定', '取消'],
fixed: false, //不固定 fixed: false, //不固定
maxmin: false, maxmin: false,
content: '/FQC/FQC007E?AQLType=@Model.AQLType&QCQty=@Model.InhouseQty', content: '/FQC/FQC007E?AQLType=@Model.AQLType&QCQty=@Model.InhouseQty',

16
AMESCoreStudio.Web/Views/PCS/PCS004C.cshtml

@ -2,7 +2,8 @@
@{ @{
Layout = "~/Views/Shared/_AMESLayout.cshtml"; } Layout = "~/Views/Shared/_AMESLayout.cshtml";
}
<style> <style>
.control-label { .control-label {
@ -116,7 +117,9 @@
<fieldset class="layui-elem-field layui-field-title"> <fieldset class="layui-elem-field layui-field-title">
<legend>內部條碼資料</legend> <legend>內部條碼資料</legend>
<table id="MydataTable" class="layui-table" style="width:50%"> <table id="MydataTable" class="layui-table" style="width:50%">
@{ int i = 0;} @{
int i = 0;
}
<thead> <thead>
<tr> <tr>
<th> <th>
@ -132,6 +135,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@if (Model.WipBarcodes != null)
{
@foreach (var index in Model.WipBarcodes) @foreach (var index in Model.WipBarcodes)
{ {
<tr> <tr>
@ -149,6 +154,7 @@
</tr> </tr>
i++; i++;
} }
}
</tbody> </tbody>
</table> </table>
</fieldset> </fieldset>
@ -198,13 +204,13 @@
}); });
// Table 刪除 // Table 刪除
function Remove(button,StrNo,EndNo) { function Remove(button, StrNo, EndNo) {
hg.confirm("起始生產條碼:" + StrNo + ",結束生產條碼:" + EndNo + ",确定要删除嗎?", function () { hg.confirm("起始生產條碼:" + StrNo + ",結束生產條碼:" + EndNo + ",确定要删除嗎?", function () {
$.ajax({ $.ajax({
url: '@Url.Action("PCS004D", "PCS")', url: '@Url.Action("PCS004D", "PCS")',
dataType:'json', dataType: 'json',
data: { "WipNo": $("#WipInfo_WipNO").val(), "StrNo": StrNo, "EndNo": EndNo}, data: { "WipNo": $("#WipInfo_WipNO").val(), "StrNo": StrNo, "EndNo": EndNo },
cache: false, cache: false,
type: "POST", type: "POST",
success: function (data) { success: function (data) {

1035
AMES規格書(for 安勤科技及昶亨科技) - 追加客製 v4.pdf

File diff suppressed because it is too large

BIN
安勤AMES流程盤點客製程式彙整(第2次規格會議).xlsx

Binary file not shown.
Loading…
Cancel
Save