Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
1ea98a1e
Commit
1ea98a1e
authored
Sep 04, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工艺规程&&工艺Bom......ing
parent
5d7f2c42
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
527 additions
and
38 deletions
+527
-38
dataGrid.vue
components/page/dataGrid.vue
+41
-2
process.vue
pages/import/process.vue
+404
-21
api.js
pages/technology/details/routingsupporting/api.js
+4
-0
index.vue
pages/technology/details/routingsupporting/index.vue
+77
-14
index.vue
pages/technology/index.vue
+1
-1
No files found.
components/page/dataGrid.vue
View file @
1ea98a1e
...
@@ -102,6 +102,7 @@ export default {
...
@@ -102,6 +102,7 @@ export default {
userId
:
this
.
$store
.
state
.
userInfo
.
userId
,
userId
:
this
.
$store
.
state
.
userInfo
.
userId
,
treeData
:
[],
//物料数据
treeData
:
[],
//物料数据
codeRuleData
:
[],
//物料编码
codeRuleData
:
[],
//物料编码
routingHeaderData
:
[],
//工艺规程
};
};
},
},
props
:
{
props
:
{
...
@@ -276,6 +277,7 @@ export default {
...
@@ -276,6 +277,7 @@ export default {
//物料加载类型数据
//物料加载类型数据
this
.
getTreeData
();
this
.
getTreeData
();
this
.
getcodeRuleData
();
this
.
getcodeRuleData
();
this
.
getRoutingHeaderData
();
},
},
methods
:
{
methods
:
{
//数据加载
//数据加载
...
@@ -518,7 +520,8 @@ export default {
...
@@ -518,7 +520,8 @@ export default {
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
filterVal
=
[];
//list里对象的属性
const
filterVal
=
[];
//list里对象的属性
var
tempCol
=
[];
var
tempCol
=
[];
var
tempCol1
=
[];
var
tempCol1
=
[];
//存放物料相关表头
var
tempCol2
=
[];
//存放工艺规程相关表头
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columnsCur
);
//导出列标题信息griddata this.$refs.grid.columnsCur
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columnsCur
);
//导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur
.
forEach
((
el
)
=>
{
columnsCur
.
forEach
((
el
)
=>
{
if
((
el
.
hide
&&
el
.
import
)
||
(
!
el
.
hide
&&
el
.
key
!=
"action"
&&
el
.
type
!=
"selection"
&&
el
.
key
!=
"ico"
))
{
if
((
el
.
hide
&&
el
.
import
)
||
(
!
el
.
hide
&&
el
.
key
!=
"action"
&&
el
.
type
!=
"selection"
&&
el
.
key
!=
"ico"
))
{
...
@@ -534,6 +537,13 @@ export default {
...
@@ -534,6 +537,13 @@ export default {
code
:
el
.
materialKey
code
:
el
.
materialKey
});
//临时存放物料管理大类和子类列表
});
//临时存放物料管理大类和子类列表
}
}
if
(
el
.
techKey
)
{
tempCol2
.
push
({
key
:
el
.
key
,
code
:
el
.
techKey
});
//临时存放工艺规程相关转换
}
tHeader
.
push
(
el
.
title
);
tHeader
.
push
(
el
.
title
);
filterVal
.
push
(
el
.
key
);
filterVal
.
push
(
el
.
key
);
}
}
...
@@ -546,7 +556,7 @@ export default {
...
@@ -546,7 +556,7 @@ export default {
e
[
ele
.
key
]
e
[
ele
.
key
]
);
);
});
});
//导出数据增加对应的物料管理信息
//导出数据增加对应的物料管理信息
code: 1【rootCategoryId 大类】 2【categoryId 大类】 3【codeRuleId 编码名称】
tempCol1
.
forEach
((
elcol1
)
=>
{
tempCol1
.
forEach
((
elcol1
)
=>
{
if
(
elcol1
.
code
==
1
)
{
if
(
elcol1
.
code
==
1
)
{
e
[
elcol1
.
key
]
=
this
.
getType1
(
e
[
elcol1
.
key
])
e
[
elcol1
.
key
]
=
this
.
getType1
(
e
[
elcol1
.
key
])
...
@@ -556,6 +566,12 @@ export default {
...
@@ -556,6 +566,12 @@ export default {
e
[
elcol1
.
key
]
=
this
.
getType3
(
e
[
elcol1
.
key
])
e
[
elcol1
.
key
]
=
this
.
getType3
(
e
[
elcol1
.
key
])
}
}
});
});
//导出工艺规程相关转换表头信息
tempCol2
.
forEach
((
elcol2
)
=>
{
if
(
elcol2
.
code
==
1
)
{
e
[
elcol2
.
key
]
=
this
.
getRoutingHeaderName
(
e
[
elcol2
.
key
])
}
});
});
});
...
@@ -620,6 +636,29 @@ export default {
...
@@ -620,6 +636,29 @@ export default {
return
codeRuleName
return
codeRuleName
},
},
//物料大类和子类的解析end
//物料大类和子类的解析end
//工艺规程的解析start
//获取工艺规程名称
getRoutingHeaderData
()
{
let
data
=
{
conditions
:
[]
};
this
.
$api
.
post
(
`
${
technologyUrl
}
routingheader/list`
,
data
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
routingHeaderData
=
r
.
result
||
[]
}
});
},
getRoutingHeaderName
(
val
)
{
let
routingHeaderDataList
=
this
.
$u
.
clone
(
this
.
routingHeaderData
)
let
routingHeaderName
=
""
routingHeaderDataList
.
forEach
(
ele
=>
{
if
(
ele
.
id
==
val
)
{
routingHeaderName
=
ele
.
name
}
})
return
routingHeaderName
},
//工艺规程的解析end
},
},
computed
:
{
computed
:
{
columnsNow
()
{
columnsNow
()
{
...
...
pages/import/process.vue
View file @
1ea98a1e
...
@@ -331,15 +331,15 @@ export default {
...
@@ -331,15 +331,15 @@ export default {
code
:
"User.base.status"
,
code
:
"User.base.status"
,
},
},
],
],
columns
3
:
[{
columns
2
:
[{
key
:
"resourceCode"
,
key
:
"resourceCode"
,
title
:
this
.
l
3
(
"resourceId"
),
title
:
this
.
l
2
(
"resourceId"
),
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
easy
:
true
,
},
},
{
{
key
:
"nameOfResource"
,
key
:
"nameOfResource"
,
title
:
this
.
l
3
(
"nameOfResource"
),
title
:
this
.
l
2
(
"nameOfResource"
),
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
easy
:
true
,
tooltip
:
true
,
tooltip
:
true
,
...
@@ -351,56 +351,56 @@ export default {
...
@@ -351,56 +351,56 @@ export default {
},
},
{
{
key
:
"creatorUserId"
,
key
:
"creatorUserId"
,
title
:
this
.
l
3
(
"creatorUserId"
),
title
:
this
.
l
2
(
"creatorUserId"
),
hide
:
false
,
hide
:
false
,
type
:
"user"
,
type
:
"user"
,
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"lastModificationTime"
,
key
:
"lastModificationTime"
,
title
:
this
.
l
3
(
"lastModificationTime"
),
title
:
this
.
l
2
(
"lastModificationTime"
),
hide
:
true
,
hide
:
true
,
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"lastModifierUserId"
,
key
:
"lastModifierUserId"
,
title
:
this
.
l
3
(
"lastModifierUserId"
),
title
:
this
.
l
2
(
"lastModifierUserId"
),
hide
:
true
,
hide
:
true
,
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"isDeleted"
,
key
:
"isDeleted"
,
title
:
this
.
l
3
(
"isDeleted"
),
title
:
this
.
l
2
(
"isDeleted"
),
hide
:
true
,
hide
:
true
,
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"deletionTime"
,
key
:
"deletionTime"
,
title
:
this
.
l
3
(
"deletionTime"
),
title
:
this
.
l
2
(
"deletionTime"
),
hide
:
true
,
hide
:
true
,
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"deleterUserId"
,
key
:
"deleterUserId"
,
title
:
this
.
l
3
(
"deleterUserId"
),
title
:
this
.
l
2
(
"deleterUserId"
),
hide
:
true
,
hide
:
true
,
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"totalNum"
,
key
:
"totalNum"
,
title
:
this
.
l
3
(
"totalNum"
),
title
:
this
.
l
2
(
"totalNum"
),
align
:
"right"
,
align
:
"right"
,
easy
:
true
,
easy
:
true
,
},
},
{
{
key
:
"numberAvailable"
,
key
:
"numberAvailable"
,
title
:
this
.
l
3
(
"numberAvailable"
),
title
:
this
.
l
2
(
"numberAvailable"
),
align
:
"right"
,
align
:
"right"
,
easy
:
true
,
easy
:
true
,
},
},
{
{
key
:
"measuringUnit"
,
key
:
"measuringUnit"
,
title
:
this
.
l
3
(
"measuringUnit"
),
title
:
this
.
l
2
(
"measuringUnit"
),
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
...
@@ -408,7 +408,7 @@ export default {
...
@@ -408,7 +408,7 @@ export default {
},
},
{
{
key
:
"qualityCharacteristics"
,
key
:
"qualityCharacteristics"
,
title
:
this
.
l
3
(
"qualityCharacteristics"
),
title
:
this
.
l
2
(
"qualityCharacteristics"
),
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
...
@@ -416,7 +416,7 @@ export default {
...
@@ -416,7 +416,7 @@ export default {
},
},
{
{
key
:
"batchNo"
,
key
:
"batchNo"
,
title
:
this
.
l
3
(
"batchNo"
),
title
:
this
.
l
2
(
"batchNo"
),
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
...
@@ -424,24 +424,24 @@ export default {
...
@@ -424,24 +424,24 @@ export default {
},
},
{
{
key
:
"storeId"
,
key
:
"storeId"
,
title
:
this
.
l
3
(
"storeId"
),
title
:
this
.
l
2
(
"storeId"
),
align
:
"left"
,
align
:
"left"
,
high
:
true
,
high
:
true
,
hide
:
true
,
hide
:
true
,
},
},
{
{
key
:
"storeTitle"
,
key
:
"storeTitle"
,
title
:
this
.
l
3
(
"storeTitle"
),
title
:
this
.
l
2
(
"storeTitle"
),
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"state"
,
key
:
"state"
,
title
:
this
.
l
3
(
"state"
),
title
:
this
.
l
2
(
"state"
),
align
:
"center"
,
align
:
"center"
,
code
:
"mes_xingchi_resource.resource.state"
,
code
:
"mes_xingchi_resource.resource.state"
,
}
}
],
],
columns
4
:
[{
columns
3
:
[{
key
:
"codeRuleType"
,
key
:
"codeRuleType"
,
title
:
"类型"
,
title
:
"类型"
,
align
:
"center"
,
align
:
"center"
,
...
@@ -518,6 +518,226 @@ export default {
...
@@ -518,6 +518,226 @@ export default {
type
:
"user"
type
:
"user"
}
}
],
],
columns4
:
[{
key
:
"code"
,
title
:
this
.
l4
(
"code"
),
align
:
"left"
,
width
:
200
,
easy
:
true
,
high
:
true
},
{
key
:
"name"
,
title
:
this
.
l4
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
tooltip
:
true
,
},
{
key
:
"phase"
,
title
:
this
.
l4
(
"phase"
),
align
:
"center"
,
high
:
true
,
width
:
100
,
code
:
"Process.Routing.phase"
},
{
key
:
"versionid"
,
title
:
this
.
l4
(
"version"
),
align
:
"center"
,
high
:
true
,
width
:
100
,
code
:
"Process.Routing.version"
},
{
title
:
this
.
l4
(
"approvalStatus"
),
key
:
"approvalStatus"
,
align
:
"center"
,
width
:
"120"
,
code
:
"process.RoutingStatus"
},
{
key
:
"routingType"
,
title
:
this
.
l4
(
"routingType"
),
align
:
"center"
,
width
:
100
,
high
:
true
,
code
:
"Process.Routing.routingType"
},
{
key
:
"drawingNo"
,
title
:
this
.
l4
(
"drawingNo"
),
align
:
"left"
,
high
:
true
},
{
key
:
"productName"
,
title
:
this
.
l4
(
"productName"
),
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
{
key
:
"productId"
,
title
:
this
.
l4
(
"productId"
),
align
:
"left"
,
import
:
true
,
hide
:
true
,
},
{
key
:
"productBomId"
,
title
:
this
.
l4
(
"productBomId"
),
align
:
"left"
,
import
:
true
,
hide
:
true
,
},
{
key
:
"departmentName"
,
title
:
this
.
l4
(
"departmentName"
),
width
:
100
,
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
{
key
:
"departmentId"
,
title
:
this
.
l4
(
"departmentId"
),
align
:
"left"
,
import
:
true
,
hide
:
true
,
},
{
key
:
"isEffect"
,
title
:
this
.
l4
(
"isEffect"
),
align
:
"center"
,
width
:
80
,
high
:
true
,
code
:
"Process.Status"
}
],
columns5
:
[{
key
:
"routingDetailNo"
,
title
:
this
.
l5
(
"routingDetailNo"
),
align
:
"left"
,
high
:
true
,
width
:
100
,
sortable
:
true
},
{
key
:
"routingHeaderId"
,
title
:
this
.
l5
(
"routingHeaderName"
),
hide
:
true
,
import
:
true
,
techKey
:
'1'
,
// render: (h, params) => {
// return h(
// "span", {},
// this.getRoutingHeaderName(params.row.routingHeaderId)
// );
// }
},
{
key
:
"routingDetailName"
,
title
:
this
.
l5
(
"routingDetailName"
),
align
:
"left"
,
high
:
true
},
{
key
:
"routingDetailId"
,
title
:
this
.
l5
(
"routingDetailId"
),
hide
:
true
,
import
:
true
,
},
{
key
:
"quantity"
,
title
:
this
.
l5
(
"quantity"
),
align
:
"right"
,
high
:
true
,
width
:
80
,
},
{
key
:
"materialType"
,
title
:
this
.
l5
(
"materialType"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
code
:
"mes_xingchi_resource.material.materialReType"
,
width
:
100
,
},
{
key
:
"materialNumber"
,
title
:
this
.
l5
(
"materialNumber"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"materialId"
,
title
:
this
.
l5
(
"materialId"
),
align
:
"left"
,
hide
:
true
,
import
:
true
},
{
key
:
"nameMaterial"
,
title
:
this
.
l5
(
"nameMaterial"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"brand"
,
title
:
this
.
l5
(
"brand"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"specifications"
,
title
:
this
.
l5
(
"specifications"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"xhgg"
,
title
:
this
.
l5
(
"xhgg"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"texture"
,
title
:
this
.
l5
(
"texture"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"procurementStandards"
,
title
:
this
.
l5
(
"procurementStandards"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"qualityGrade"
,
title
:
this
.
l5
(
"qualityGrade"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"drawNum"
,
title
:
this
.
l5
(
"drawNum"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
],
tdHeightExcel
:
""
,
tdHeightExcel
:
""
,
excelData
:
[],
excelData
:
[],
excelDataBack
:
[],
//临时存储原始数据
excelDataBack
:
[],
//临时存储原始数据
...
@@ -540,6 +760,7 @@ export default {
...
@@ -540,6 +760,7 @@ export default {
//物料管理
//物料管理
treeData
:
[],
//物料管理左侧类别树
treeData
:
[],
//物料管理左侧类别树
codeRuleData
:
[],
//物料编码等信息
codeRuleData
:
[],
//物料编码等信息
routingHeaderData
:
[],
//工艺规程列表信息
};
};
},
},
props
:
{
props
:
{
...
@@ -561,6 +782,8 @@ export default {
...
@@ -561,6 +782,8 @@ export default {
//物料加载类型数据
//物料加载类型数据
this
.
getTreeData
();
this
.
getTreeData
();
this
.
getcodeRuleData
();
this
.
getcodeRuleData
();
//获取工艺规程信息
this
.
getRoutingHeaderData
();
window
.
onresize
=
()
=>
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
///浏览器窗口大小变化
return
(()
=>
{
return
(()
=>
{
...
@@ -852,12 +1075,18 @@ export default {
...
@@ -852,12 +1075,18 @@ export default {
case
1
:
case
1
:
this
.
loadColum
(
this
.
columns1
);
this
.
loadColum
(
this
.
columns1
);
break
;
break
;
case
2
:
this
.
loadColum
(
this
.
columns2
);
break
;
case
3
:
case
3
:
this
.
loadColum
(
this
.
columns3
);
this
.
loadColum
(
this
.
columns3
);
break
;
break
;
case
4
:
case
4
:
this
.
loadColum
(
this
.
columns4
);
this
.
loadColum
(
this
.
columns4
);
break
;
break
;
case
5
:
this
.
loadColum
(
this
.
columns5
);
break
;
default
:
default
:
this
.
loadColum
(
this
.
columns0
);
this
.
loadColum
(
this
.
columns0
);
}
}
...
@@ -881,12 +1110,18 @@ export default {
...
@@ -881,12 +1110,18 @@ export default {
case
0
:
case
0
:
this
.
importUser
();
this
.
importUser
();
break
;
break
;
case
3
:
case
2
:
this
.
importResource
();
this
.
importResource
();
break
;
break
;
case
4
:
case
3
:
this
.
importMateriel
();
this
.
importMateriel
();
break
;
break
;
case
4
:
this
.
importRountingHeader
();
break
;
case
5
:
this
.
importRountingBom
();
break
;
default
:
default
:
//this.loadColum(this.columns1);
//this.loadColum(this.columns1);
}
}
...
@@ -1085,6 +1320,146 @@ export default {
...
@@ -1085,6 +1320,146 @@ export default {
},
},
//获取编码名称等end
//获取编码名称等end
//插入物料管理end
//插入物料管理end
//插入工艺规程 及工艺相关start
importRountingHeader
()
{
let
tempData
=
this
.
$u
.
clone
(
this
.
dataIm
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
classId
:
null
,
unicode
:
""
,
name
:
ele
.
name
?
ele
.
name
:
''
,
code
:
ele
.
code
?
ele
.
code
:
''
,
productId
:
ele
.
productId
?
ele
.
productId
:
''
,
//?
productName
:
ele
.
productName
?
ele
.
productName
:
""
,
//?
productBomId
:
ele
.
productBomId
?
ele
.
productBomId
:
""
,
//?
drawingNo
:
ele
.
drawingNo
?
ele
.
drawingNo
:
""
,
//?
version
:
""
,
versionid
:
ele
.
versionid
?
ele
.
versionid
:
""
,
author
:
null
,
departmentId
:
ele
.
departmentId
?
ele
.
departmentId
:
null
,
//?
departmentName
:
ele
.
departmentName
?
ele
.
departmentName
:
""
,
//?
isMain
:
1
,
upId
:
null
,
upDetailId
:
null
,
routingType
:
ele
.
routingType
?
ele
.
routingType
:
null
,
status
:
0
,
approvalStatus
:
4
,
//?
remark
:
""
,
approvalStatusRemark
:
""
,
auditUserId1
:
""
,
auditUserId2
:
""
,
platesnum
:
null
,
versionnotes
:
""
,
isSendPpm
:
1
,
fileId
:
""
,
phase
:
ele
.
phase
?
ele
.
phase
:
null
,
isEffect
:
ele
.
isEffect
?
ele
.
isEffect
:
1
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
tempList
.
push
(
obj
);
}
});
if
(
tempList
.
length
==
0
)
{
this
.
$Message
.
error
(
"所有导入的数据均不合法!"
);
}
else
{
let
parms
=
{
list
:
tempList
,
};
let
url
=
`
${
technologyUrl
}
routingheaderimportservice/import`
this
.
$api
.
post
(
url
,
parms
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"成功批量导入工艺规程模块 "
+
tempList
.
length
+
" 条数据"
);
this
.
imBtn
=
false
;
this
.
cancelExcel
();
}
else
{
this
.
$Message
.
error
(
"批量导入失败"
)
}
}).
catch
(
err
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
},
//导入工艺bom
importRountingBom
()
{
let
tempData
=
this
.
$u
.
clone
(
this
.
dataIm
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
routingHeaderId
:
Number
(
this
.
getRoutingHeaderId
(
ele
.
routingHeaderId
)),
routingDetailId
:
ele
.
routingDetailId
?
Number
(
ele
.
routingDetailId
)
:
null
,
routingDetailNo
:
ele
.
routingDetailNo
?
Number
(
ele
.
routingDetailNo
)
:
null
,
routingDetailName
:
ele
.
routingDetailName
?
ele
.
routingDetailName
:
''
,
routingStepId
:
0
,
quantity
:
ele
.
quantity
?
Number
(
ele
.
quantity
)
:
0
,
materialId
:
ele
.
materialId
?
ele
.
materialId
:
''
,
materialType
:
ele
.
materialType
?
Number
(
ele
.
materialType
)
:
''
,
materialNumber
:
ele
.
materialNumber
?
ele
.
materialNumber
:
''
,
nameMaterial
:
ele
.
nameMaterial
?
ele
.
nameMaterial
:
''
,
brand
:
ele
.
brand
?
ele
.
brand
:
''
,
specifications
:
ele
.
specifications
?
ele
.
specifications
:
''
,
xhgg
:
ele
.
xhgg
?
ele
.
xhgg
:
''
,
texture
:
ele
.
texture
?
ele
.
texture
:
''
,
procurementStandards
:
ele
.
procurementStandards
?
ele
.
procurementStandards
:
''
,
qualityGrade
:
ele
.
qualityGrade
?
ele
.
qualityGrade
:
''
,
state
:
null
,
extend
:
""
,
remark
:
""
,
drawNum
:
ele
.
drawNum
?
ele
.
drawNum
:
''
};
if
(
ele
.
routingDetailId
&&
ele
.
routingDetailId
!=
null
)
{
tempList
.
push
(
obj
);
}
});
if
(
tempList
.
length
==
0
)
{
this
.
$Message
.
error
(
"所有导入的数据均不合法!"
);
}
else
{
let
parms
=
{
list
:
tempList
,
};
let
url
=
`
${
technologyUrl
}
productinfoimportservice/import`
this
.
$api
.
post
(
url
,
parms
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"成功批量导入工艺Bom模块 "
+
tempList
.
length
+
" 条数据"
);
this
.
imBtn
=
false
;
this
.
cancelExcel
();
}
else
{
this
.
$Message
.
error
(
"批量导入失败"
)
}
}).
catch
(
err
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
},
//获取工艺规程列表
getRoutingHeaderData
()
{
let
url
=
`
${
technologyUrl
}
routingheader/list`
;
let
data
=
{
conditions
:
[]
};
this
.
$api
.
post
(
url
,
data
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
routingHeaderData
=
r
.
result
||
[]
}
});
},
//根据工艺规程ID获得name
getRoutingHeaderId
(
val
)
{
let
routingHeaderDataList
=
this
.
$u
.
clone
(
this
.
routingHeaderData
)
let
routingHeaderId
=
0
routingHeaderDataList
.
forEach
(
ele
=>
{
if
(
ele
.
name
==
val
)
{
routingHeaderId
=
ele
.
id
}
})
return
routingHeaderId
},
//插入工艺规程 及工艺相关end
//切换列表和excel按钮
//切换列表和excel按钮
changeExcel
(
val
)
{
changeExcel
(
val
)
{
...
@@ -1109,10 +1484,18 @@ export default {
...
@@ -1109,10 +1484,18 @@ export default {
key
=
"user"
+
"."
+
key
;
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
l
3
(
key
)
{
l
2
(
key
)
{
key
=
"resource"
+
"."
+
key
;
key
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
l4
(
key
)
{
key
=
"routingHeader"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
l5
(
key
)
{
key
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
...
...
pages/technology/details/routingsupporting/api.js
View file @
1ea98a1e
...
@@ -27,4 +27,8 @@ export default {
...
@@ -27,4 +27,8 @@ export default {
getmaterialids
(
params
)
{
getmaterialids
(
params
)
{
return
Api
.
get
(
`
${
technologyUrl
}
productinfo/getmaterialids`
,
params
);
return
Api
.
get
(
`
${
technologyUrl
}
productinfo/getmaterialids`
,
params
);
},
},
//获取所有工艺规程
getRoutingheaderList
(
params
)
{
return
Api
.
post
(
`
${
technologyUrl
}
routingheader/list`
,
params
);
},
}
}
pages/technology/details/routingsupporting/index.vue
View file @
1ea98a1e
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:headid=
"hid"
:productBomId=
"productBomId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
<component
:is=
"detail"
:eid=
"curId"
:headid=
"hid"
:productBomId=
"productBomId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Modal>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"cols"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"col
umn
s"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</div>
</div>
</template>
</template>
...
@@ -58,7 +58,9 @@ export default {
...
@@ -58,7 +58,9 @@ export default {
detail
:
null
,
detail
:
null
,
curId
:
0
,
curId
:
0
,
hid
:
0
,
hid
:
0
,
columns
:
[{
columns
:
[
{
key
:
"routingDetailNo"
,
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
align
:
"left"
,
...
@@ -66,12 +68,31 @@ export default {
...
@@ -66,12 +68,31 @@ export default {
width
:
100
,
width
:
100
,
sortable
:
true
sortable
:
true
},
},
{
key
:
"routingHeaderId"
,
title
:
this
.
l
(
"routingHeaderName"
),
hide
:
true
,
import
:
true
,
techKey
:
'1'
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
this
.
getRoutingHeaderName
(
params
.
row
.
routingHeaderId
)
);
}
},
{
{
key
:
"routingDetailName"
,
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
align
:
"left"
,
high
:
true
high
:
true
},
},
{
key
:
"routingDetailId"
,
title
:
this
.
l
(
"routingDetailId"
),
hide
:
true
,
import
:
true
,
},
{
{
key
:
"quantity"
,
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
title
:
this
.
l
(
"quantity"
),
...
@@ -95,6 +116,13 @@ export default {
...
@@ -95,6 +116,13 @@ export default {
easy
:
true
,
easy
:
true
,
high
:
true
high
:
true
},
},
{
key
:
"materialId"
,
title
:
this
.
l
(
"materialId"
),
align
:
"left"
,
hide
:
true
,
import
:
true
},
{
{
key
:
"nameMaterial"
,
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
title
:
this
.
l
(
"nameMaterial"
),
...
@@ -233,6 +261,7 @@ export default {
...
@@ -233,6 +261,7 @@ export default {
productBomId
:
-
1
,
productBomId
:
-
1
,
ModalIm
:
false
,
ModalIm
:
false
,
temTitle
:
"工艺Bom"
,
temTitle
:
"工艺Bom"
,
routingHeaderData
:
[],
};
};
},
},
created
()
{
created
()
{
...
@@ -247,6 +276,7 @@ export default {
...
@@ -247,6 +276,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
);
console
.
log
(
this
);
this
.
getRoutingHeaderData
();
this
.
search
();
this
.
search
();
},
},
async
fetch
({
async
fetch
({
...
@@ -316,23 +346,33 @@ export default {
...
@@ -316,23 +346,33 @@ export default {
},
},
//根据页面二次处理数据
//根据页面二次处理数据
formatMethod
(
val
)
{
formatMethod
(
val
)
{
// alert(JSON.stringify(val))
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
let
obj
=
{
name
:
ele
.
name
?
ele
.
name
:
''
,
routingHeaderId
:
Number
(
this
.
headerid
),
version
:
ele
.
version
?
Number
(
ele
.
version
)
:
''
,
routingDetailId
:
ele
.
routingDetailId
?
Number
(
ele
.
routingDetailId
)
:
null
,
drawing
:
ele
.
drawing
?
ele
.
drawing
:
''
,
routingDetailNo
:
ele
.
routingDetailNo
?
Number
(
ele
.
routingDetailNo
)
:
null
,
description
:
ele
.
description
?
ele
.
description
:
""
,
routingDetailName
:
ele
.
routingDetailName
?
ele
.
routingDetailName
:
''
,
code
:
0
,
routingStepId
:
0
,
status
:
this
.
nodeInfo
.
status
==
1
?
3
:
0
,
quantity
:
ele
.
quantity
?
Number
(
ele
.
quantity
)
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
materialId
:
ele
.
materialId
?
ele
.
materialId
:
''
,
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
materialType
:
ele
.
materialType
?
Number
(
ele
.
materialType
)
:
''
,
customProperties
:
{},
materialNumber
:
ele
.
materialNumber
?
ele
.
materialNumber
:
''
,
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
,
//左侧树点击的数据的最顶层id
nameMaterial
:
ele
.
nameMaterial
?
ele
.
nameMaterial
:
''
,
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
brand
:
ele
.
brand
?
ele
.
brand
:
''
,
specifications
:
ele
.
specifications
?
ele
.
specifications
:
''
,
xhgg
:
ele
.
xhgg
?
ele
.
xhgg
:
''
,
texture
:
ele
.
texture
?
ele
.
texture
:
''
,
procurementStandards
:
ele
.
procurementStandards
?
ele
.
procurementStandards
:
''
,
qualityGrade
:
ele
.
qualityGrade
?
ele
.
qualityGrade
:
''
,
state
:
null
,
extend
:
""
,
remark
:
""
,
drawNum
:
ele
.
drawNum
?
ele
.
drawNum
:
''
};
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
if
(
ele
.
routingDetailId
&&
ele
.
routingDetailId
!=
null
)
{
obj
.
ico
=
false
obj
.
ico
=
false
}
else
{
}
else
{
obj
.
ico
=
true
obj
.
ico
=
true
...
@@ -344,6 +384,29 @@ export default {
...
@@ -344,6 +384,29 @@ export default {
},
},
//批量导入end
//批量导入end
//工艺规程id和name之间的转换
//获取工艺规程信息
getRoutingHeaderData
()
{
let
data
=
{
conditions
:
[]
};
Api
.
getRoutingheaderList
(
data
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
routingHeaderData
=
r
.
result
||
[]
}
});
},
//根据工艺规程ID获得name
getRoutingHeaderName
(
val
)
{
let
routingHeaderDataList
=
this
.
$u
.
clone
(
this
.
routingHeaderData
)
let
routingHeaderName
=
""
routingHeaderDataList
.
forEach
(
ele
=>
{
if
(
ele
.
id
==
Number
(
val
))
{
routingHeaderName
=
ele
.
name
}
})
return
routingHeaderName
},
l
(
key
)
{
l
(
key
)
{
let
vkey
=
"routingsupporting"
+
"."
+
key
;
let
vkey
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
pages/technology/index.vue
View file @
1ea98a1e
...
@@ -595,7 +595,7 @@ export default {
...
@@ -595,7 +595,7 @@ export default {
isSendPpm
:
1
,
isSendPpm
:
1
,
fileId
:
""
,
fileId
:
""
,
phase
:
ele
.
phase
?
ele
.
phase
:
null
,
phase
:
ele
.
phase
?
ele
.
phase
:
null
,
isEffect
:
ele
.
phase
?
ele
.
phase
:
1
isEffect
:
ele
.
isEffect
?
ele
.
isEffect
:
1
};
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
obj
.
ico
=
false
obj
.
ico
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment