|
|
@ -220,16 +220,14 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
return View(); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<IActionResult> PCB014QueryAsync(string steelPlateNo, string pcbPartNo |
|
|
|
, string side, string status, int page = 0, int limit = 10) |
|
|
|
public async Task<IActionResult> PCB014QueryAsync(string solderPasteNo, string status, int page = 0, int limit = 10) |
|
|
|
{ |
|
|
|
//IResultModel<SteelPlateInfoDto> result = await _pcbApi.GetSolderPasteInfoQuery(steelPlateNo: steelPlateNo, pcbPartNo: pcbPartNo
|
|
|
|
//, side: side, status: status, page: page, limit: limit);
|
|
|
|
IResultModel<SolderPasteInfoDto> result = await _pcbApi.GetSolderPasteInfoQuery(solderPasteNo: solderPasteNo, status: status, page: page, limit: limit); |
|
|
|
|
|
|
|
//if (result.Data.Count() != 0)
|
|
|
|
//{
|
|
|
|
// return Json(new Table() { code = 0, msg = "", data = result.Data, count = result.DataTotal });
|
|
|
|
//}
|
|
|
|
if (result.Data.Count() != 0) |
|
|
|
{ |
|
|
|
return Json(new Table() { code = 0, msg = "", data = result.Data, count = result.DataTotal }); |
|
|
|
} |
|
|
|
return Json(new Table() { count = 0, data = null }); |
|
|
|
} |
|
|
|
|
|
|
@ -249,12 +247,12 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
|
|
|
|
//頁面提交,id=0 添加,id>0 修改
|
|
|
|
[HttpPost] |
|
|
|
public async Task<IActionResult> PCB014Async(SteelPlateInfo model) |
|
|
|
public async Task<IActionResult> PCB014Async(SolderPasteInfo model) |
|
|
|
{ |
|
|
|
if (ModelState.IsValid) |
|
|
|
{ |
|
|
|
IResultModel result; |
|
|
|
if (model.SteelPlateID == 0) |
|
|
|
if (model.SolderPasteID == 0) |
|
|
|
{ |
|
|
|
model.CreateUserID = GetLogInUserID(); |
|
|
|
model.CreateDate = DateTime.Now; |
|
|
@ -271,7 +269,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
|
|
|
|
if (result.Success) |
|
|
|
{ |
|
|
|
var _msg = model.SteelPlateID == 0 ? "新增成功!" : "修改成功!"; |
|
|
|
var _msg = model.SolderPasteID == 0 ? "新增成功!" : "修改成功!"; |
|
|
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
|
|
|
} |
|
|
|
else |
|
|
@ -281,7 +279,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (model.SteelPlateID == 0) |
|
|
|
if (model.SolderPasteID == 0) |
|
|
|
{ |
|
|
|
return View("PCB014C", model); |
|
|
|
} |
|
|
|