Commit ae693a98 by jiawei.su

fixedbug

parent 587d9cca
......@@ -422,6 +422,7 @@ export default {
this.tabindex = name;
if (this.tabindex == "2") {
this.orderDetail2 = {};
}
this.getStorages();
},
......@@ -433,7 +434,8 @@ export default {
: "";
let data = {
fillsn: this.tabindex == "1" ? 0 : 1,
productcode: code,
// productcode: code,
productcode: this.tabindex == "1" ? this.code:"",
};
this.request("/acc/AutomationLocation/GetLocationList", data, "get")
.then((res) => {
......
......@@ -200,13 +200,18 @@ export default {
key: "taskno",
width: 150,
},
{
title: "发起工站",
key: "fromsection",
width: 100,
},
{
title: "产线层级",
title: "目标工站",
key: "section",
width: 170,
},
{
title: "触发方",
title: "触发方",
key: "trigger",
width: 100,
},
......@@ -266,27 +271,55 @@ export default {
title: "下发状态",
key: "send",
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: "状态",
key: "status",
render: (h, params) => {
let str = "";
let str = "",bgc="";
switch (params.row.status) {
case 1:
str = "待执行";
bgc='Olive'
break;
case 2:
str = "执行中";
bgc='Orange'
break;
case 3:
str = "执行完成";
bgc='Green'
break;
case 4:
str = "取消";
bgc='Silver'
break;
}
return h("div", str);
return h("div",{
style:{
'background':bgc,
'color':'#fff'
}
} ,str);
},
},
{
......
......@@ -664,10 +664,11 @@ namespace Siger.ApiACC.Controllers
Logger.WriteLineError($"AutoProcess CNC加工中心空闲,上一个任务与本次任务指令重复");
return; //任务已经创建
}
var _sectProperty = _automationSectionProperty.Get(f => f.propertytype == 5);
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))
{
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;
using Siger.Middlelayer.Utility.Helpers;
using System.IO;
using Siger.Middlelayer.Log;
using Siger.Middlelayer.Common.ModuleEnum;
namespace Siger.ApiACC.Controllers
{
......@@ -267,6 +268,10 @@ namespace Siger.ApiACC.Controllers
{
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);
if (fixturetool == null)
{
......@@ -315,7 +320,10 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
if (!string.IsNullOrEmpty(entity.sn))
{
throw new BadRequestException(AccEnum.LocationSnExits);
}
entity.status = (int)RowState.Invalid;
_autoLocationRepository.Update(entity);
if (_unitOfWork.Commit() > 0)
......
......@@ -736,6 +736,7 @@ namespace Siger.ApiACC.Controllers
fixtureguid = monitor.fixtureguid,
locationid = monitor.locationId,
productcode = monitor.productCode,
productname=monitor.productName,
processid = 0,
programnumber = "",
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