Browse Source

1. 修正過站Key Parts沒資料

PTD
ray 3 years ago
parent
commit
06aad85f92
  1. 14
      AMESCoreStudio.Web/Controllers/PCSController.cs
  2. 2
      AMESCoreStudio.Web/ViewModels/PCS/PCS021ViewModel.cs
  3. 2
      AMESCoreStudio.Web/Views/PCS/PCS021.cshtml

14
AMESCoreStudio.Web/Controllers/PCSController.cs

@ -3468,7 +3468,7 @@ namespace AMESCoreStudio.Web.Controllers
{
model.MaterialStationsItems = await _pcsApi.GetMaterialStationsItemByItemID(model.MaterialItem.ItemID);
model.MaterialStationsItems = model.MaterialStationsItems.Where(w => w.RuleStationID == model.RuleStation).ToList();
model.MaterialStationsItems = model.MaterialStationsItems.Where(w => w.RuleStationID == model.RuleStation).OrderBy(o => o.StationsItemSeq).ToList();
if (model.MaterialStationsItems.Count() == 0)
{
ModelState.AddModelError("error", "找不到該站別作業工項");
@ -3538,7 +3538,7 @@ namespace AMESCoreStudio.Web.Controllers
}
#endregion
var Kp = model.Inputs.Where(w => !w.Input.Contains("$")).ToList(); // 撈非不良代碼 = 組件序號
var Kp = model.Inputs.Where(w => !w.Contains("$")).ToList(); // 撈非不良代碼 = 組件序號
var q = await _pcsApi.GetBarCodeFromWip(model.Input);
// 判斷是否用內部序號有對應到工單號碼,沒對應到視為組件或不良代碼
if (q.Success)
@ -3569,7 +3569,7 @@ namespace AMESCoreStudio.Web.Controllers
model.StationSEQ = RuleStations.Where(w => w.StationID == model.Station).Select(s => s.Sequence).FirstOrDefault();
}
// 判斷是否有$符號,代表有不良代碼
if (model.Inputs.Where(w => w.Input.Contains("$")).Any())
if (model.Inputs.Where(w => w.Contains("$")).Any())
{
model.BarcodeNG = true;
// 判斷是否為投入站,投入站不能刷不良
@ -3618,12 +3618,12 @@ namespace AMESCoreStudio.Web.Controllers
}
keyParts.Add(new BarCodeCheckDto.inputItem
{
inputType = KeyPartItem.Input.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo,
inputData = KeyPartItem.Input,
oldInputData = KeyPartItem.InputNo
inputType = KeyPartItem.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo,
inputData = KeyPartItem,
//oldInputData = KeyPartItem.InputNo
});
if (!KeyPartItem.Input.Contains("$"))
if (!KeyPartItem.Contains("$"))
i += 1;
}

2
AMESCoreStudio.Web/ViewModels/PCS/PCS021ViewModel.cs

@ -109,7 +109,7 @@ namespace AMESCoreStudio.Web.ViewModels.PCS
/// inputs
/// </summary>
public List<Inputs> Inputs { get; set; } = new List<Inputs>();
public List<string> Inputs { get; set; } = new List<string>();
/// <summary>
/// 料號相關資料

2
AMESCoreStudio.Web/Views/PCS/PCS021.cshtml

@ -222,7 +222,7 @@
<input type="text" class="layui-input" asp-for="@index.KpName" name="WipKps[@j].KpName" style="width:100px" readonly="readonly" />
</td>
<td>
<select disabled asp-for="@index.KpNo" name="WipKps[@j].KpNo" asp-items="@ViewBag.ItemsList" class=""></select>
<select asp-for="@index.KpNo" name="WipKps[@j].KpNo" asp-items="@ViewBag.ItemsList" class=""></select>
</td>
<td>
<input type="text" class="layui-input" asp-for="@index.KpSeq" name="WipKps[@j].KpSeq" style="width:50px" readonly="readonly" />

Loading…
Cancel
Save