Browse Source

1.修改前判维修输入

1.1.当未更换组件时,过站时传null
1.2.修改已维修的零件,无法再次维修
PTD
Marvin 3 years ago
parent
commit
1274d4b1a8
  1. 7
      AMESCoreStudio.Web/Controllers/REPController.cs
  2. 8
      AMESCoreStudio.Web/Views/REP/REP001V.cshtml

7
AMESCoreStudio.Web/Controllers/REPController.cs

@ -511,7 +511,7 @@ namespace AMESCoreStudio.Web.Controllers
//判斷組件是否更換 //判斷組件是否更換
for (int i = 0; i < ng_component.Count; i++) for (int i = 0; i < ng_component.Count; i++)
{ {
if (ng_component[i].NewPartNo != "") if (ng_component[i].NewPartNo != "" && ng_component[i].NewPartNo != null)
{ {
items.Add(new BarCodeCheckDto.inputItem items.Add(new BarCodeCheckDto.inputItem
{ {
@ -522,6 +522,11 @@ namespace AMESCoreStudio.Web.Controllers
} }
} }
if (items.Count == 0)
{
items = null;
}
if (repairComplete) if (repairComplete)
{ {
//判断全部维修完成过站 //判断全部维修完成过站

8
AMESCoreStudio.Web/Views/REP/REP001V.cshtml

@ -134,14 +134,20 @@
templet: '<div>{{ layui.util.toDateString(d.updateDate, "yyyy/MM/dd") }}</div>' templet: '<div>{{ layui.util.toDateString(d.updateDate, "yyyy/MM/dd") }}</div>'
}, },
{ {
field: 'right', field: 'status',
width: 120, width: 120,
title: '操作', title: '操作',
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
templet: function (d) { templet: function (d) {
if (d.status == 0) {
return '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="repair"> 維修 </a>' return '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="repair"> 維修 </a>'
} }
else
{
return "";
}
}
}] }]
]; ];

Loading…
Cancel
Save