Commit a0ae7a04 by jiawei.su
parents 94f65e88 e76452b5
......@@ -720,6 +720,7 @@ export default {
'9000495': '未找到工装信息',
'9000496': 'ID重复',
'9000497': '父级和子级不能相同',
'9000498': '该类型绑定了工装,不能删除',
'9100000': 'Departments cannot be empty',
'9100001': 'Position cannot be empty',
......
......@@ -747,6 +747,7 @@ export default {
'9000495': '未找到工装信息',
'9000496': 'ID重复',
'9000497': '父级和子级不能相同',
'9000498': '该类型绑定了工装,不能删除',
'9100000': '部门不能为空',
......
......@@ -88,10 +88,12 @@
<span class="infoLabel">状态:</span>
<span class="info">{{
orderDetail.status == 1
? "待上料"
: orderDetail.status == 2
? "运行中"
: "待下料"
? "待上料"
: orderDetail.status == 2
? "运行中"
: orderDetail.status == 3
? "待下料"
: ""
}}</span>
</p>
<p class="flex">
......@@ -176,7 +178,9 @@
? "待上料"
: orderDetail.status == 2
? "运行中"
: "待下料"
: orderDetail.status == 3
? "待下料"
: ""
}}</span>
</p>
<p class="flex">
......
......@@ -10,6 +10,7 @@
class="searchSelect"
:data="datalevel"
:value="leveldata"
@on-change="getSectionId"
></Cascader>
</div>
<div class="searchBtn">
......@@ -20,7 +21,11 @@
@click="search()"
>{{ $t("1001") }}</Button
>
<Button type="primary" class="twoWord" icon="ios-search" @click="exportExcel()"
<Button
type="primary"
class="twoWord"
icon="ios-search"
@click="exportExcel()"
>导出</Button
>
</div>
......@@ -28,33 +33,33 @@
</div>
<div class="divborder">
<div class="stateTitle flex">
<p><span>4</span>生产中</p>
<p><span>4</span>待下料</p>
<p><span>4</span>待上料</p>
<p><span>4</span>不可用</p>
<p><span>{{summary.produceTotal}}</span>生产中</p>
<p><span>{{summary.complateTotal}}</span>待下料</p>
<p><span>{{summary.waittingTotal}}</span>待上料</p>
<p><span>{{summary.disableTotal}}</span>不可用</p>
</div>
<div class="stateWrap">
<template v-for="(item,index) in stateList">
<div class="stateItem" :key="index">
<template v-for="(item, index) in stateList">
<div class="stateItem" :key="index" :style="{background:item.bgc}">
<p class="flex">
<span class="infoLabel">工位:</span>
<span class="info">{{item}}</span>
<span class="info">{{ item.section }}</span>
</p>
<p class="flex">
<span class="infoLabel">产品:</span>
<span class="info"></span>
<span class="info">{{item.product}}</span>
</p>
<p class="flex">
<span class="infoLabel">工装:</span>
<span class="info"></span>
<span class="info">{{item.fixtureName}}</span>
</p>
<p class="flex">
<span class="infoLabel">储位:</span>
<span class="info"></span>
<span class="info">{{item.location}}</span>
</p>
<p class="flex">
<span class="infoLabel">工件:</span>
<span class="info"></span>
<span class="info">{{item.sn}}</span>
</p>
</div>
</template>
......@@ -63,14 +68,14 @@
class="tableClass"
:data="data1"
:columns="columns1"
:max-height="200"
></Table>
<div v-show="show1">
<Table
class="tableClass"
:data="data2"
:columns="columns2"
:max-height="200"
></Table>
</div>
<div v-show="show2">
......@@ -78,7 +83,7 @@
class="tableClass"
:data="data3"
:columns="columns3"
:max-height="200"
></Table>
</div>
</div>
......@@ -94,7 +99,7 @@ export default {
productionLine: [],
leveldata: [], // 产线层级插件所需数据
datalevel: [], // 产线层级选中数据
stateList:[0],
stateList: [0],
columns1: [
{
title: this.$t("1008"),
......@@ -102,22 +107,22 @@ export default {
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
params.index+1
);
},
width: 70,
},
{
title: "产线层级",
key: "warehouse",
},
{
title: "设备",
key: "storage_sn",
key: "section",
},
// {
// title: "设备",
// key: "storage_sn",
// },
{
title: "工装编号",
key: "install_sn",
key: "fixtureName",
render: (h, params) => {
return h(
"a",
......@@ -134,11 +139,11 @@ export default {
},
{
title: "产品编号",
key: "workpiece_sn",
key: "product",
},
{
title: "工件编号",
key: "storage_sn",
key: "sn",
render: (h, params) => {
return h(
"a",
......@@ -155,7 +160,7 @@ export default {
},
{
title: "状态",
key: "install_sn",
key: "status",
},
{
title: "最后更新时间",
......@@ -297,13 +302,52 @@ export default {
data3: [],
show2: false,
show1: false,
sectionid:0,
summary:{}
};
},
created() {
this.initlevel();
this.search();
},
methods: {
search() {},
search() {
// 初始化产线层级
this.axios
.request({
url: "/acc/AutomationState/GetStationMonitor?section="+this.sectionid,
method: "get",
})
.then((res) => {
const arr = [];
if (res.data.ret == 1) {
console.log(res.data.data);
// this.stateList = res.data.data.dts;
let arr = [];
arr = res.data.data.dts;
arr.forEach(ele => {
let bgc = '';
if (ele.enable == 0) {
bgc = 'red'
}
if(ele.status ==1){
bgc = '#2db7f5'
}
if(ele.status ==2){
bgc = '#ff9900'
}
if(ele.status ==3){
bgc = '#19be6b'
}
ele.bgc = bgc
});
this.stateList = arr;
this.data1 = arr;
this.summary = res.data.data.sum;
console.log(this.summary);
}
});
},
initlevel() {
// 初始化产线层级
this.axios
......@@ -320,7 +364,11 @@ export default {
}
});
},
exportExcel(){
getSectionId(val){
this.leveldata = val;
this.sectionid = this.leveldata.length>0?this.leveldata[this.leveldata.length-1]:0;
},
exportExcel() {
let data = {};
this.axios
.request({
......@@ -336,7 +384,7 @@ export default {
this.$Message.error(this.$t(res.data.msg));
}
});
}
},
},
};
</script>
......@@ -347,12 +395,15 @@ export default {
}
.stateWrap {
margin: 20px 10px;
display: flex;
flex-wrap: wrap;
}
.stateItem {
border: 1px solid #000;
width: 200px;
height: 150px;
border: 1px solid #d3d3d3;
width: 300px;
// height: 150px;
padding-left: 10px;
margin: 10px;
p {
height: 30px;
line-height: 30px;
......
......@@ -254,7 +254,7 @@ export default {
//导入方法
action:
this.axios.publicPath +
"wms/Upload/Submit?templateName=StorageLocation",
"acc/Upload/Submit?templateName=FixtureToolsAssmeblyTemplate",
headers: {
token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"),
......
......@@ -100,7 +100,6 @@
:class="table_scrollx ? 'collection_table' : ''"
style="
width: 100%;
float: left;
height: 100%;
padding-left: 5px;
"
......@@ -353,7 +352,6 @@
<div
style="
width: 870px;
float: left;
height: 100%;
padding-left: 5px;
overflow-y: scroll;
......
......@@ -401,18 +401,23 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
var details = GetSonCategoryList(entity.guid, categorys);
var detailIds = details.Select(q => q.id).Distinct().ToList();
var details = GetSonCategoryList(entity.guid, categorys).ToList();
details.Add(entity);
var detailGuids = details.Select(q => q.guid).Distinct().ToList();
if (_toolsRepository.GetList(q => q.projectId == ProjectId && detailGuids.Contains(q.category)).Any())
{
throw new BadRequestException(RequestEnum.CategoryBindFixtureToolData);
}
var delDetails = _toolsCategoryRepository.GetList(q => q.projectId == ProjectId && q.status == (int)RowState.Valid &&
detailIds.Contains(q.id)).ToList();
detailGuids.Contains(q.guid)).ToList();
foreach (var detail in delDetails)
{
detail.status = (int)RowState.Invalid;
_toolsCategoryRepository.Update(detail);
}
entity.status = (int)RowState.Invalid;
_toolsCategoryRepository.Update(entity);
if(_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
......@@ -427,7 +432,7 @@ namespace Siger.ApiACC.Controllers
{
var query = from c in sections where c.parent == parentId select c;
return query.ToList().Concat(query.ToList().SelectMany(t => GetSonCategoryList(t.parent, sections)));
return query.ToList().Concat(query.ToList().SelectMany(t => GetSonCategoryList(t.guid, sections)));
}
[HttpGet]
......
......@@ -1476,5 +1476,8 @@ namespace Siger.Middlelayer.Common
[Description("父级和子级不能相同")]
ParentSonSame,
[Description("该类型绑定了工装,不能删除")]
CategoryBindFixtureToolData,
}
}
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