Commit ae693a98 by jiawei.su

fixedbug

parent 587d9cca
...@@ -422,6 +422,7 @@ export default { ...@@ -422,6 +422,7 @@ export default {
this.tabindex = name; this.tabindex = name;
if (this.tabindex == "2") { if (this.tabindex == "2") {
this.orderDetail2 = {}; this.orderDetail2 = {};
} }
this.getStorages(); this.getStorages();
}, },
...@@ -433,7 +434,8 @@ export default { ...@@ -433,7 +434,8 @@ export default {
: ""; : "";
let data = { let data = {
fillsn: this.tabindex == "1" ? 0 : 1, fillsn: this.tabindex == "1" ? 0 : 1,
productcode: code, // productcode: code,
productcode: this.tabindex == "1" ? this.code:"",
}; };
this.request("/acc/AutomationLocation/GetLocationList", data, "get") this.request("/acc/AutomationLocation/GetLocationList", data, "get")
.then((res) => { .then((res) => {
......
...@@ -201,12 +201,17 @@ export default { ...@@ -201,12 +201,17 @@ export default {
width: 150, width: 150,
}, },
{ {
title: "产线层级", title: "发起工站",
key: "fromsection",
width: 100,
},
{
title: "目标工站",
key: "section", key: "section",
width: 170, width: 170,
}, },
{ {
title: "触发方", title: "触发方",
key: "trigger", key: "trigger",
width: 100, width: 100,
}, },
...@@ -266,27 +271,55 @@ export default { ...@@ -266,27 +271,55 @@ export default {
title: "下发状态", title: "下发状态",
key: "send", key: "send",
width: 100, width: 100,
render: (h, params) => {
let str = "",bgc="";
switch (params.row.send) {
case 0:
str = "未下发";
bgc='Olive'
break;
case 1:
str = "已下发";
bgc='Green'
break;
}
return h("div",{
style:{
'background':bgc,
'color':'#fff'
}
} ,str);
},
}, },
{ {
title: "状态", title: "状态",
key: "status", key: "status",
render: (h, params) => { render: (h, params) => {
let str = ""; let str = "",bgc="";
switch (params.row.status) { switch (params.row.status) {
case 1: case 1:
str = "待执行"; str = "待执行";
bgc='Olive'
break; break;
case 2: case 2:
str = "执行中"; str = "执行中";
bgc='Orange'
break; break;
case 3: case 3:
str = "执行完成"; str = "执行完成";
bgc='Green'
break; break;
case 4: case 4:
str = "取消"; str = "取消";
bgc='Silver'
break; break;
} }
return h("div", str); return h("div",{
style:{
'background':bgc,
'color':'#fff'
}
} ,str);
}, },
}, },
{ {
......
...@@ -664,10 +664,11 @@ namespace Siger.ApiACC.Controllers ...@@ -664,10 +664,11 @@ namespace Siger.ApiACC.Controllers
Logger.WriteLineError($"AutoProcess CNC加工中心空闲,上一个任务与本次任务指令重复"); Logger.WriteLineError($"AutoProcess CNC加工中心空闲,上一个任务与本次任务指令重复");
return; //任务已经创建 return; //任务已经创建
} }
var _sectProperty = _automationSectionProperty.Get(f => f.propertytype == 5);
Logger.WriteLineInfo($"自动化业务流转--AutoProcess section{location.section} task:{TaskAction.Step_LK_JGZX.ToStr()} sn {location.sn}"); Logger.WriteLineInfo($"自动化业务流转--AutoProcess section{location.section} task:{TaskAction.Step_LK_JGZX.ToStr()} sn {location.sn}");
if (TargetFree(location.section, location.section, TaskAction.Step_LK_JGZX)) if (TargetFree(location.section, location.section, TaskAction.Step_LK_JGZX))
{ {
CreateTask(location.section, location.section, TaskActionType.Load, TaskAction.Step_LK_JGZX, location.fixture, location.fixturename, location.ordernumber, location.sn, location.pn, location.productId, location.productCode, location.productName, location.location, location.route); CreateTask(location.section, _sectProperty!=null? _sectProperty.sectionid: location.section, TaskActionType.Load, TaskAction.Step_LK_JGZX, location.fixture, location.fixturename, location.ordernumber, location.sn, location.pn, location.productId, location.productCode, location.productName, location.location, location.route);
} }
} }
......
...@@ -19,6 +19,7 @@ using Siger.Middlelayer.Utility.ImportEntities; ...@@ -19,6 +19,7 @@ using Siger.Middlelayer.Utility.ImportEntities;
using Siger.Middlelayer.Utility.Helpers; using Siger.Middlelayer.Utility.Helpers;
using System.IO; using System.IO;
using Siger.Middlelayer.Log; using Siger.Middlelayer.Log;
using Siger.Middlelayer.Common.ModuleEnum;
namespace Siger.ApiACC.Controllers namespace Siger.ApiACC.Controllers
{ {
...@@ -267,6 +268,10 @@ namespace Siger.ApiACC.Controllers ...@@ -267,6 +268,10 @@ namespace Siger.ApiACC.Controllers
{ {
throw new BadRequestException(CommonEnum.RecordNotFound); throw new BadRequestException(CommonEnum.RecordNotFound);
} }
if (!string.IsNullOrEmpty(entity.sn))
{
throw new BadRequestException(AccEnum.LocationSnExits);
}
var fixturetool = _toolsRepository.Get(q => q.id == req.fixturetoolid.ToInt() && q.projectId == ProjectId); var fixturetool = _toolsRepository.Get(q => q.id == req.fixturetoolid.ToInt() && q.projectId == ProjectId);
if (fixturetool == null) if (fixturetool == null)
{ {
...@@ -315,7 +320,10 @@ namespace Siger.ApiACC.Controllers ...@@ -315,7 +320,10 @@ namespace Siger.ApiACC.Controllers
{ {
throw new BadRequestException(CommonEnum.RecordNotFound); throw new BadRequestException(CommonEnum.RecordNotFound);
} }
if (!string.IsNullOrEmpty(entity.sn))
{
throw new BadRequestException(AccEnum.LocationSnExits);
}
entity.status = (int)RowState.Invalid; entity.status = (int)RowState.Invalid;
_autoLocationRepository.Update(entity); _autoLocationRepository.Update(entity);
if (_unitOfWork.Commit() > 0) if (_unitOfWork.Commit() > 0)
......
...@@ -736,6 +736,7 @@ namespace Siger.ApiACC.Controllers ...@@ -736,6 +736,7 @@ namespace Siger.ApiACC.Controllers
fixtureguid = monitor.fixtureguid, fixtureguid = monitor.fixtureguid,
locationid = monitor.locationId, locationid = monitor.locationId,
productcode = monitor.productCode, productcode = monitor.productCode,
productname=monitor.productName,
processid = 0, processid = 0,
programnumber = "", programnumber = "",
remark = "手动任务-拆卸完成", remark = "手动任务-拆卸完成",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment