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
52938112
Commit
52938112
authored
Sep 04, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
7f08beb0
79d960c7
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1589 additions
and
925 deletions
+1589
-925
dataGrid.vue
components/page/dataGrid.vue
+43
-4
process.vue
components/page/import/process.vue
+7
-4
productSelect.vue
components/page/productSelect.vue
+175
-172
zh-CN.js
i18n/locale/zh-CN.js
+4
-3
index.vue
pages/aps/ai/index.vue
+1
-0
process.vue
pages/import/process.vue
+410
-26
masterData.vue
pages/materiel/masterData/masterData.vue
+9
-1
add.vue
pages/technology/add.vue
+262
-249
api.js
pages/technology/details/routingsupporting/api.js
+4
-0
index.vue
pages/technology/details/routingsupporting/index.vue
+110
-1
index.vue
pages/technology/index.vue
+564
-465
No files found.
components/page/dataGrid.vue
View file @
52938112
...
...
@@ -102,6 +102,7 @@ export default {
userId
:
this
.
$store
.
state
.
userInfo
.
userId
,
treeData
:
[],
//物料数据
codeRuleData
:
[],
//物料编码
routingHeaderData
:
[],
//工艺规程
};
},
props
:
{
...
...
@@ -276,6 +277,7 @@ export default {
//物料加载类型数据
this
.
getTreeData
();
this
.
getcodeRuleData
();
this
.
getRoutingHeaderData
();
},
methods
:
{
//数据加载
...
...
@@ -518,10 +520,11 @@ export default {
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
filterVal
=
[];
//list里对象的属性
var
tempCol
=
[];
var
tempCol1
=
[];
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columnsNow
);
//导出列标题信息griddata this.$refs.grid.columnsCur
var
tempCol1
=
[];
//存放物料相关表头
var
tempCol2
=
[];
//存放工艺规程相关表头
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columnsCur
);
//导出列标题信息griddata this.$refs.grid.columnsCur
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"
))
{
if
(
el
.
code
)
{
tempCol
.
push
({
key
:
el
.
key
,
...
...
@@ -534,6 +537,13 @@ export default {
code
:
el
.
materialKey
});
//临时存放物料管理大类和子类列表
}
if
(
el
.
techKey
)
{
tempCol2
.
push
({
key
:
el
.
key
,
code
:
el
.
techKey
});
//临时存放工艺规程相关转换
}
tHeader
.
push
(
el
.
title
);
filterVal
.
push
(
el
.
key
);
}
...
...
@@ -546,7 +556,7 @@ export default {
e
[
ele
.
key
]
);
});
//导出数据增加对应的物料管理信息
//导出数据增加对应的物料管理信息
code: 1【rootCategoryId 大类】 2【categoryId 大类】 3【codeRuleId 编码名称】
tempCol1
.
forEach
((
elcol1
)
=>
{
if
(
elcol1
.
code
==
1
)
{
e
[
elcol1
.
key
]
=
this
.
getType1
(
e
[
elcol1
.
key
])
...
...
@@ -556,6 +566,12 @@ export default {
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 {
return
codeRuleName
},
//物料大类和子类的解析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
:
{
columnsNow
()
{
...
...
components/page/import/process.vue
View file @
52938112
...
...
@@ -215,12 +215,13 @@ export default {
useData
.
forEach
(
eles
=>
{
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
if
(
eles
.
departmentTitle
&&
eles
.
departmentTitle
!=
""
&&
[(
eles
.
departmentTitle
&&
eles
.
departmentTitle
!=
""
)
||
(
eles
.
departmentName
&&
eles
.
departmentName
!=
""
)]
&&
(
!
eles
.
departmentId
||
eles
.
departmentId
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
eles
.
departmentTitle
&&
eles
.
departmentTitle
==
e
.
name
)
{
if
(
(
eles
.
departmentTitle
&&
eles
.
departmentTitle
==
e
.
name
)
||
(
eles
.
departmentName
&&
eles
.
departmentName
==
e
.
name
)
)
{
eles
.
departmentId
=
e
.
id
;
}
});
...
...
@@ -228,14 +229,16 @@ export default {
//如果导入文件没有departmentTitle,但存在departmentid的话,通过id获取departmentTitle
eles
.
departmentId
&&
eles
.
departmentId
+
""
!=
""
&&
(
!
eles
.
departmentTitle
||
eles
.
departmentTitle
==
""
)
(
!
eles
.
departmentTitle
||
eles
.
departmentTitle
==
""
)
&&
(
!
eles
.
departmentName
||
eles
.
departmentName
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
eles
.
departmentId
&&
eles
.
departmentId
==
e
.
id
)
{
eles
.
departmentTitle
=
e
.
name
;
eles
.
departmentName
=
e
.
name
;
}
});
}
arrTitleUse
.
forEach
((
elem
)
=>
{
if
(
eles
[
elem
.
key
]
&&
eles
[
elem
.
key
]
!=
""
&&
eles
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值
...
...
components/page/productSelect.vue
View file @
52938112
<
template
>
<Select
v-model=
"dep"
:placeholder=
"placeholdeinfo"
clearable
@
on-clear=
"onClear"
>
<Option
v-for=
"(item,index) in list"
:key=
"index"
:value=
"item.value"
style=
"display:none"
:label=
"item.label"
></Option>
<
template
>
<Select
v-model=
"dep"
:placeholder=
"placeholdeinfo"
clearable
@
on-clear=
"onClear"
>
<Option
v-for=
"(item,index) in list"
:key=
"index"
:value=
"item.value"
style=
"display:none"
:label=
"item.label"
></Option>
<Tree
key=
"mytree"
:data=
"data1"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
</Select>
</
template
>
<
script
>
<
script
>
export
default
{
name
:
"Add"
,
model
:
{
prop
:
"value"
,
event
:
"on-change"
},
data
()
{
return
{
dep
:
""
,
list
:
[],
data1
:
[],
selectdata
:
[],
placeholdeinfo
:
"请选择"
,
orderSearchForm
:
{
productId
:
null
,
//产品id
productName
:
""
,
//产品名称
drawingNo
:
""
,
//图号
bomId
:
null
//bomId
}
};
},
props
:
{
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择部门"
name
:
"Add"
,
model
:
{
prop
:
"value"
,
event
:
"on-change"
},
multiple
:
{
type
:
Boolean
,
default
:
false
data
()
{
return
{
dep
:
""
,
list
:
[],
data1
:
[],
selectdata
:
[],
placeholdeinfo
:
"请选择"
,
orderSearchForm
:
{
productId
:
null
,
//产品id
productName
:
""
,
//产品名称
drawingNo
:
""
,
//图号
bomId
:
null
//bomId
}
};
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
mounted
()
{},
created
()
{
this
.
dep
=
this
.
value
|
""
;
this
.
loadTree
();
},
methods
:
{
handleSelect
(
data
)
{
if
(
data
.
length
>
0
)
{
this
.
selectdata
=
[];
this
.
selectdata
=
data
;
if
(
data
[
0
].
isProduct
==
"1"
)
{
this
.
list
=
[];
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
});
this
.
orderSearchForm
.
productName
=
data
[
0
].
title
;
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
;
this
.
orderSearchForm
.
drawingNo
=
data
[
0
].
drawingNo
;
this
.
orderSearchForm
.
bomId
=
data
[
0
].
bomId
;
this
.
$emit
(
"on-change"
,
this
.
orderSearchForm
.
productId
,
this
.
orderSearchForm
);
}
else
{
this
.
$Message
.
error
(
"此节点不是产品,请选择产品节点!"
);
props
:
{
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择部门"
},
multiple
:
{
type
:
Boolean
,
default
:
false
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
}
},
resetFields
()
{
this
.
orderSearchForm
=
{
productId
:
null
,
//产品id
productName
:
""
,
//产品名称
drawingNo
:
""
,
//图号
bomId
:
null
};
},
loadTree
()
{
//打开新增订单窗口加载产品
this
.
resetFields
();
var
sumData
=
[];
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
]);
}
this
.
data1
=
sumData
;
}
else
{
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
mounted
()
{},
created
()
{
this
.
dep
=
this
.
value
|
""
;
this
.
loadTree
();
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
let
type
=
"md-folder"
;
let
title
=
data
.
title
;
if
(
data
.
isProduct
!=
0
)
{
let
version
=
this
.
$store
.
getters
.
dictionaryByCode
(
"material.main.version"
,
data
.
version
);
type
=
"ios-image"
;
if
(
version
)
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
"/"
+
version
.
name
+
")"
;
}
else
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
")"
;
}
}
//渲染树的样式
return
h
(
"span"
,
{
on
:
{
click
:
()
=>
{
let
arrTree
=
[];
arrTree
.
push
(
data
);
this
.
handleSelect
(
arrTree
);
//手动选择树节点
methods
:
{
handleSelect
(
data
)
{
if
(
data
.
length
>
0
)
{
this
.
selectdata
=
[];
this
.
selectdata
=
data
;
if
(
data
[
0
].
isProduct
==
"1"
)
{
this
.
list
=
[];
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
});
this
.
orderSearchForm
.
productName
=
data
[
0
].
title
;
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
;
this
.
orderSearchForm
.
drawingNo
=
data
[
0
].
drawingNo
;
this
.
orderSearchForm
.
bomId
=
data
[
0
].
bomId
;
this
.
$emit
(
"on-change"
,
this
.
orderSearchForm
.
productId
,
this
.
orderSearchForm
);
}
else
{
this
.
$Message
.
error
(
"此节点不是产品,请选择产品节点!"
);
}
}
}
},
[
h
(
"Icon"
,
{
props
:
{
type
:
type
},
style
:
{
marginRight
:
"8px"
}
}),
h
(
"span"
,
{
style
:
{
color
:
data
.
isProduct
==
0
?
"#000"
:
"rgba(38, 128, 235, 1)"
}
},
title
)
]
);
},
onClear
()
{
this
.
list
=
[];
this
.
placeholdeinfo
=
"请选择"
;
this
.
resetFields
();
this
.
$emit
(
"on-change"
,
null
,
this
.
orderSearchForm
);
}
},
watch
:
{
value
:
{
handler
(
v
,
o
)
{
this
.
dep
=
v
|
""
;
this
.
resetFields
();
var
sumData
=
[];
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
]);
}
this
.
data1
=
sumData
;
let
temData
=
this
.
$u
.
clone
(
this
.
data1
);
this
.
list
=
[];
if
(
v
!=
""
&&
v
!=
null
)
{
let
dataTemp
=
this
.
$u
.
treeToList
(
temData
);
dataTemp
.
forEach
(
data
=>
{
if
(
data
.
isProduct
==
1
&&
data
.
id
==
this
.
dep
)
{
this
.
placeholdeinfo
=
data
.
title
;
this
.
list
.
push
({
label
:
data
.
title
,
value
:
data
.
id
});
resetFields
()
{
this
.
orderSearchForm
=
{
productId
:
null
,
//产品id
productName
:
""
,
//产品名称
drawingNo
:
""
,
//图号
bomId
:
null
};
},
loadTree
()
{
//打开新增订单窗口加载产品
this
.
resetFields
();
var
sumData
=
[];
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
]);
}
this
.
data1
=
sumData
;
}
else
{
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
let
type
=
"md-folder"
;
let
title
=
data
.
title
;
if
(
data
.
isProduct
!=
0
)
{
let
version
=
this
.
$store
.
getters
.
dictionaryByCode
(
"material.main.version"
,
data
.
version
);
type
=
"ios-image"
;
if
(
version
)
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
"/"
+
version
.
name
+
")"
;
}
else
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
")"
;
}
});
}
}
else
{
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
},
deep
:
true
//渲染树的样式
return
h
(
"span"
,
{
on
:
{
click
:
()
=>
{
let
arrTree
=
[];
arrTree
.
push
(
data
);
this
.
handleSelect
(
arrTree
);
//手动选择树节点
}
}
},
[
h
(
"Icon"
,
{
props
:
{
type
:
type
},
style
:
{
marginRight
:
"8px"
}
}),
h
(
"span"
,
{
style
:
{
color
:
data
.
isProduct
==
0
?
"#000"
:
"rgba(38, 128, 235, 1)"
}
},
title
)
]
);
},
onClear
()
{
this
.
list
=
[];
this
.
placeholdeinfo
=
"请选择"
;
this
.
resetFields
();
this
.
$emit
(
"on-change"
,
null
,
this
.
orderSearchForm
);
}
},
watch
:
{
value
:
{
handler
(
v
,
o
)
{
this
.
dep
=
v
|
""
;
this
.
resetFields
();
var
sumData
=
[];
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
]);
}
this
.
data1
=
sumData
;
let
temData
=
this
.
$u
.
clone
(
this
.
data1
);
this
.
list
=
[];
if
(
v
!=
""
&&
v
!=
null
)
{
let
dataTemp
=
this
.
$u
.
treeToList
(
temData
);
dataTemp
.
forEach
(
data
=>
{
if
(
data
.
isProduct
==
1
&&
data
.
id
==
this
.
dep
)
{
this
.
placeholdeinfo
=
data
.
title
;
this
.
list
.
push
({
label
:
data
.
title
,
value
:
data
.
id
});
}
});
}
}
else
{
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
},
deep
:
true
}
}
}
};
</
script
>
i18n/locale/zh-CN.js
View file @
52938112
...
...
@@ -1175,10 +1175,11 @@ export default {
code
:
'工艺文件编号'
,
productId
:
'产品id'
,
productName
:
'产品名称'
,
productBomId
:
'产品BomId'
,
drawingNo
:
'图号'
,
version
:
'版本'
,
author
:
'编制人'
,
departmentId
:
'主制车间'
,
departmentId
:
'主制车间
Id
'
,
departmentName
:
'主制车间'
,
isMain
:
'主工艺'
,
upId
:
'父工艺'
,
...
...
@@ -1188,8 +1189,8 @@ export default {
approvalStatus
:
'审批状态'
,
remark
:
'工艺说明'
,
approvalStatusRemark
:
'审批备注'
,
auditUserId1
:
'审批人'
,
auditUserId2
:
'审批人'
,
auditUserId1
:
'审批人
1
'
,
auditUserId2
:
'审批人
2
'
,
isDeleted
:
'是否删除'
,
platesnum
:
'板数'
,
isEffect
:
'有效'
,
...
...
pages/aps/ai/index.vue
View file @
52938112
...
...
@@ -6,6 +6,7 @@
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
应用规则:
<Select
v-model=
"rulesAi"
multiple
style=
"width:280px;"
class=
"tl"
>
<Option
v-for=
"item in rulesAiList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
label
}}
</Option>
</Select>
...
...
pages/import/process.vue
View file @
52938112
...
...
@@ -331,15 +331,15 @@ export default {
code
:
"User.base.status"
,
},
],
columns
3
:
[{
columns
2
:
[{
key
:
"resourceCode"
,
title
:
this
.
l
3
(
"resourceId"
),
title
:
this
.
l
2
(
"resourceId"
),
align
:
"left"
,
easy
:
true
,
},
{
key
:
"nameOfResource"
,
title
:
this
.
l
3
(
"nameOfResource"
),
title
:
this
.
l
2
(
"nameOfResource"
),
align
:
"left"
,
easy
:
true
,
tooltip
:
true
,
...
...
@@ -351,56 +351,56 @@ export default {
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
3
(
"creatorUserId"
),
title
:
this
.
l
2
(
"creatorUserId"
),
hide
:
false
,
type
:
"user"
,
align
:
"left"
,
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
3
(
"lastModificationTime"
),
title
:
this
.
l
2
(
"lastModificationTime"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
3
(
"lastModifierUserId"
),
title
:
this
.
l
2
(
"lastModifierUserId"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"isDeleted"
,
title
:
this
.
l
3
(
"isDeleted"
),
title
:
this
.
l
2
(
"isDeleted"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"deletionTime"
,
title
:
this
.
l
3
(
"deletionTime"
),
title
:
this
.
l
2
(
"deletionTime"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
3
(
"deleterUserId"
),
title
:
this
.
l
2
(
"deleterUserId"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"totalNum"
,
title
:
this
.
l
3
(
"totalNum"
),
title
:
this
.
l
2
(
"totalNum"
),
align
:
"right"
,
easy
:
true
,
},
{
key
:
"numberAvailable"
,
title
:
this
.
l
3
(
"numberAvailable"
),
title
:
this
.
l
2
(
"numberAvailable"
),
align
:
"right"
,
easy
:
true
,
},
{
key
:
"measuringUnit"
,
title
:
this
.
l
3
(
"measuringUnit"
),
title
:
this
.
l
2
(
"measuringUnit"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
...
...
@@ -408,7 +408,7 @@ export default {
},
{
key
:
"qualityCharacteristics"
,
title
:
this
.
l
3
(
"qualityCharacteristics"
),
title
:
this
.
l
2
(
"qualityCharacteristics"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
...
...
@@ -416,7 +416,7 @@ export default {
},
{
key
:
"batchNo"
,
title
:
this
.
l
3
(
"batchNo"
),
title
:
this
.
l
2
(
"batchNo"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
...
...
@@ -424,24 +424,24 @@ export default {
},
{
key
:
"storeId"
,
title
:
this
.
l
3
(
"storeId"
),
title
:
this
.
l
2
(
"storeId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"storeTitle"
,
title
:
this
.
l
3
(
"storeTitle"
),
title
:
this
.
l
2
(
"storeTitle"
),
align
:
"left"
,
},
{
key
:
"state"
,
title
:
this
.
l
3
(
"state"
),
title
:
this
.
l
2
(
"state"
),
align
:
"center"
,
code
:
"mes_xingchi_resource.resource.state"
,
}
],
columns
4
:
[{
columns
3
:
[{
key
:
"codeRuleType"
,
title
:
"类型"
,
align
:
"center"
,
...
...
@@ -518,6 +518,226 @@ export default {
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
:
""
,
excelData
:
[],
excelDataBack
:
[],
//临时存储原始数据
...
...
@@ -540,6 +760,7 @@ export default {
//物料管理
treeData
:
[],
//物料管理左侧类别树
codeRuleData
:
[],
//物料编码等信息
routingHeaderData
:
[],
//工艺规程列表信息
};
},
props
:
{
...
...
@@ -561,6 +782,8 @@ export default {
//物料加载类型数据
this
.
getTreeData
();
this
.
getcodeRuleData
();
//获取工艺规程信息
this
.
getRoutingHeaderData
();
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
...
...
@@ -596,7 +819,6 @@ export default {
}
}
}).
catch
(
e
=>
{
//this.$Message.error("数据解析失败,请下载原文件后转为Excel重新进行上传!")
this
.
noDataText
=
"文件无法解析,建议下载原文件后转换为Excel文件格式重新上传!"
})
...
...
@@ -678,12 +900,13 @@ export default {
useData
.
forEach
(
eles
=>
{
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
if
(
eles
.
departmentTitle
&&
eles
.
departmentTitle
!=
""
&&
[(
eles
.
departmentTitle
&&
eles
.
departmentTitle
!=
""
)
||
(
eles
.
departmentName
&&
eles
.
departmentName
!=
""
)]
&&
(
!
eles
.
departmentId
||
eles
.
departmentId
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
eles
.
departmentTitle
&&
eles
.
departmentTitle
==
e
.
name
)
{
if
(
(
eles
.
departmentTitle
&&
eles
.
departmentTitle
==
e
.
name
)
||
(
eles
.
departmentName
&&
eles
.
departmentName
==
e
.
name
)
)
{
eles
.
departmentId
=
e
.
id
;
}
});
...
...
@@ -691,11 +914,12 @@ export default {
//如果导入文件没有departmentTitle,但存在departmentid的话,通过id获取departmentTitle
eles
.
departmentId
&&
eles
.
departmentId
+
""
!=
""
&&
(
!
eles
.
departmentTitle
||
eles
.
departmentTitle
==
""
)
(
!
eles
.
departmentTitle
||
eles
.
departmentTitle
==
""
)
&&
(
!
eles
.
departmentName
||
eles
.
departmentName
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
eles
.
departmentId
&&
eles
.
departmentId
==
e
.
id
)
{
eles
.
departmentTitle
=
e
.
name
;
eles
.
departmentName
=
e
.
name
;
}
});
}
...
...
@@ -850,12 +1074,18 @@ export default {
case
1
:
this
.
loadColum
(
this
.
columns1
);
break
;
case
2
:
this
.
loadColum
(
this
.
columns2
);
break
;
case
3
:
this
.
loadColum
(
this
.
columns3
);
break
;
case
4
:
this
.
loadColum
(
this
.
columns4
);
break
;
case
5
:
this
.
loadColum
(
this
.
columns5
);
break
;
default
:
this
.
loadColum
(
this
.
columns0
);
}
...
...
@@ -879,12 +1109,18 @@ export default {
case
0
:
this
.
importUser
();
break
;
case
3
:
case
2
:
this
.
importResource
();
break
;
case
4
:
case
3
:
this
.
importMateriel
();
break
;
case
4
:
this
.
importRountingHeader
();
break
;
case
5
:
this
.
importRountingBom
();
break
;
default
:
//this.loadColum(this.columns1);
}
...
...
@@ -1083,6 +1319,146 @@ export default {
},
//获取编码名称等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按钮
changeExcel
(
val
)
{
...
...
@@ -1107,10 +1483,18 @@ export default {
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
l
3
(
key
)
{
l
2
(
key
)
{
key
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
l4
(
key
)
{
key
=
"routingHeader"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
l5
(
key
)
{
key
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
...
...
pages/materiel/masterData/masterData.vue
View file @
52938112
...
...
@@ -74,12 +74,16 @@ export default {
key
:
"codeRuleType"
,
title
:
"类型"
,
align
:
"center"
,
code
:
"material.code.type"
code
:
"material.code.type"
,
import
:
true
,
hide
:
true
,
},
{
key
:
"codeRuleId"
,
title
:
"编码名称"
,
materialKey
:
'3'
,
import
:
true
,
hide
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
...
...
@@ -92,6 +96,8 @@ export default {
title
:
"大类"
,
align
:
"right"
,
materialKey
:
'1'
,
import
:
true
,
hide
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
...
...
@@ -104,6 +110,8 @@ export default {
title
:
"子类"
,
align
:
"right"
,
materialKey
:
'2'
,
import
:
true
,
hide
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
...
...
pages/technology/add.vue
View file @
52938112
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"110"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"110"
>
<Row>
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('classId')"
prop=
"classId"
>
<InputNumber
v-model=
"entity.classId"
></InputNumber>
</FormItem>
...
...
@@ -11,56 +11,56 @@
<Input
v-model=
"entity.unicode"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"8"
>
<Col
:span=
"8"
>
<!--
<FormItem
v-if=
"title=='新增'"
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
></Input>
</FormItem>
v-else-if="title=='克隆'"-->
<FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
disabled
v-model=
"entity.code"
></Input>
<Input
disabled
v-model=
"entity.code"
></Input>
</FormItem>
</Col>
<Col
:span=
"8"
>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
></Input>
<Input
v-model=
"entity.name"
></Input>
</FormItem>
</Col>
</Col>
<Col
:span=
"8"
>
<Col
:span=
"8"
>
<FormItem
:label=
"l('routingType')"
prop=
"routingType"
>
<Dictionary
code=
"Process.Routing.routingType"
v-model=
"entity.routingType"
></Dictionary>
<Dictionary
code=
"Process.Routing.routingType"
v-model=
"entity.routingType"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"8"
>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('phase')"
prop=
"phase"
>
<Dictionary
code=
"Process.Routing.phase"
v-model=
"entity.phase"
></Dictionary>
<Dictionary
code=
"Process.Routing.phase"
v-model=
"entity.phase"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"8"
>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('productName')"
prop=
"productId"
>
<ProductSelect
v-model=
"entity.productId"
@
on-change=
"proChange"
></ProductSelect>
<ProductSelect
v-model=
"entity.productId"
@
on-change=
"proChange"
></ProductSelect>
</FormItem>
</Col>
<Col
:span=
"8"
>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('drawingNo')"
prop=
"drawingNo"
>
<Input
v-model=
"entity.drawingNo"
disabled
></Input>
<Input
v-model=
"entity.drawingNo"
disabled
></Input>
</FormItem>
</Col>
<Col
:span=
"8"
>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('version')"
prop=
"versionid"
>
<Dictionary
code=
"Process.Routing.version"
v-model=
"entity.versionid"
></Dictionary>
<Dictionary
code=
"Process.Routing.version"
v-model=
"entity.versionid"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"8"
>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('departmentName')"
prop=
"departmentId"
>
<departmentSelect
v-model=
"entity.departmentId"
type=
"3"
@
on-change=
"departChange"
></departmentSelect>
<departmentSelect
v-model=
"entity.departmentId"
:
type=
"3"
@
on-change=
"departChange"
></departmentSelect>
</FormItem>
</Col>
<Col
:span=
"8"
>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('isEffect')"
prop=
"isEffect"
>
<Dictionary
code=
"Process.Status"
v-model=
"entity.isEffect"
type=
"radio"
></Dictionary>
<Dictionary
code=
"Process.Status"
v-model=
"entity.isEffect"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<!--
</Col>
<!--
<Col
:span=
"8"
>
<FormItem
:label=
"l('isMain')"
prop=
"isMain"
>
<Dictionary
code=
"Process.state"
v-model=
"entity.isMain"
type=
"radio"
></Dictionary>
...
...
@@ -76,13 +76,13 @@
<InputNumber
v-model=
"entity.upId"
></InputNumber>
</FormItem>
</Col>
-->
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('upDetailId')"
prop=
"upDetailId"
>
<InputNumber
v-model=
"entity.upDetailId"
></InputNumber>
</FormItem>
</Col>
-->
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"Process.Status"
v-model=
"entity.status"
></Dictionary>
</FormItem>
...
...
@@ -93,7 +93,7 @@
</FormItem>
</Col>
-->
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('approvalStatusRemark')"
prop=
"approvalStatusRemark"
>
<Input
v-model=
"entity.approvalStatusRemark"
></Input>
</FormItem>
...
...
@@ -114,17 +114,17 @@
</FormItem>
</Col>
-->
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('versionnotes')"
prop=
"versionnotes"
>
<Input
v-model=
"entity.versionnotes"
></Input>
</FormItem>
</Col>
-->
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('phase')"
prop=
"phase"
>
<InputNumber
v-model=
"entity.phase"
></InputNumber>
</FormItem>
</Col>
-->
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('versionid')"
prop=
"versionid"
>
<InputNumber
v-model=
"entity.versionid"
></InputNumber>
</FormItem>
...
...
@@ -135,238 +135,251 @@
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<i-quill
v-model=
"entity.remark"
:height=
"300"
border
v-paste=
"handleImg"
/>
<i-quill
v-model=
"entity.remark"
:height=
"300"
border
v-paste=
"handleImg"
/>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
label=
"多媒体附件"
prop=
"files"
>
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
/>
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
/>
</FormItem>
</Col>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</Form>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
ApiWorkflow
from
"../workflow/process/api"
;
import
iQuill
from
"@/components/quill"
;
export
default
{
name
:
"Add"
,
components
:
{
iQuill
// VueUeditorWrap
},
data
()
{
return
{
disabled
:
false
,
entity
:
{
classId
:
null
,
unicode
:
""
,
name
:
""
,
code
:
""
,
productId
:
null
,
productName
:
""
,
productBomId
:
null
,
version
:
""
,
author
:
null
,
departmentId
:
null
,
departmentName
:
""
,
isMain
:
1
,
upId
:
null
,
upDetailId
:
null
,
routingType
:
null
,
status
:
0
,
approvalStatus
:
4
,
remark
:
""
,
approvalStatusRemark
:
""
,
auditUserId1
:
""
,
auditUserId2
:
""
,
platesnum
:
null
,
isEffect
:
1
,
versionnotes
:
""
,
phase
:
null
,
versionid
:
null
,
isSendPpm
:
1
,
fileId
:
""
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
routingType
:
[
{
required
:
true
,
message
:
"请选择工艺类型"
,
trigger
:
"change"
,
type
:
"number"
}
]
},
parms
:
{
app
:
"technology"
,
eid
:
null
,
name
:
""
,
field
:
""
}
};
},
props
:
{
v
:
Object
,
eid
:
Number
,
title
:
String
},
mounted
()
{
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
$refs
.
refFile
.
intFiles
();
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
else
{
this
.
getCodNumber
();
}
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
if
(
this
.
title
==
"克隆"
)
{
this
.
$Message
.
success
(
"克隆"
);
this
.
getcloneData
();
}
else
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
fileId
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
fileId
=
""
;
}
ApiWorkflow
.
getbyid
({
id
:
"2085025d-9c38-4834-846a-8f9d2f4c8553"
})
.
then
(
res
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
entity
.
approvalStatus
=
4
;
}
else
{
this
.
entity
.
approvalStatus
=
1
;
}
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
console
.
warn
(
err
);
});
}
}
});
name
:
"Add"
,
components
:
{
iQuill
// VueUeditorWrap
},
// 克隆工艺
getcloneData
()
{
let
parmese
=
{
headerId
:
this
.
eid
,
code
:
this
.
entity
.
code
};
Api
.
getCloneHeader
(
parmese
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"克隆成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"克隆失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"克隆失败"
);
console
.
warn
(
err
);
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
handleImg
(
e
)
{
console
.
warn
(
e
);
let
file
=
null
;
if
(
e
.
clipboardData
&&
e
.
clipboardData
.
items
[
0
]
&&
e
.
clipboardData
.
items
[
0
].
type
&&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
"image"
)
>
-
1
)
{
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
();
let
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
setTimeout
(()
=>
{
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
;
this
.
entity
.
remark
+=
img
;
},
1000
);
// new R
}
data
()
{
return
{
disabled
:
false
,
entity
:
{
classId
:
null
,
unicode
:
""
,
name
:
""
,
code
:
""
,
productId
:
null
,
productName
:
""
,
productBomId
:
null
,
version
:
""
,
author
:
null
,
departmentId
:
null
,
departmentName
:
""
,
isMain
:
1
,
upId
:
null
,
upDetailId
:
null
,
routingType
:
null
,
status
:
0
,
approvalStatus
:
4
,
remark
:
""
,
approvalStatusRemark
:
""
,
auditUserId1
:
""
,
auditUserId2
:
""
,
platesnum
:
null
,
isEffect
:
1
,
versionnotes
:
""
,
phase
:
null
,
versionid
:
null
,
isSendPpm
:
1
,
fileId
:
""
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
routingType
:
[{
required
:
true
,
message
:
"请选择工艺类型"
,
trigger
:
"change"
,
type
:
"number"
}]
},
parms
:
{
app
:
"technology"
,
eid
:
null
,
name
:
""
,
field
:
""
}
};
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
isEffect
=
parseInt
(
r
.
result
.
isEffect
);
this
.
entity
.
id
=
0
;
});
this
.
getCodNumber
();
props
:
{
v
:
Object
,
eid
:
Number
,
title
:
String
},
getCodNumber
()
{
Api
.
getCodeNumber
({
code
:
"GY"
,
count
:
"1"
}).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
entity
.
code
=
r
.
result
[
0
];
mounted
()
{
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
$refs
.
refFile
.
intFiles
();
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
else
{
this
.
$Message
.
error
(
"生成编号失败"
);
this
.
getCodNumber
(
);
}
});
},
l
(
key
)
{
key
=
"routingHeader"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
proChange
(
v
,
items
)
{
this
.
entity
.
productName
=
items
.
productName
;
this
.
entity
.
drawingNo
=
items
.
drawingNo
;
this
.
entity
.
productBomId
=
items
.
bomId
;
},
departChange
(
v
,
items
)
{
this
.
entity
.
departmentName
=
items
.
name
;
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
if
(
this
.
title
==
"克隆"
)
{
this
.
$Message
.
success
(
"克隆"
);
this
.
getcloneData
();
}
else
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
fileId
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
fileId
=
""
;
}
ApiWorkflow
.
getbyid
({
id
:
"2085025d-9c38-4834-846a-8f9d2f4c8553"
})
.
then
(
res
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
entity
.
approvalStatus
=
4
;
}
else
{
this
.
entity
.
approvalStatus
=
1
;
}
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
console
.
warn
(
err
);
});
}
}
});
},
// 克隆工艺
getcloneData
()
{
let
parmese
=
{
headerId
:
this
.
eid
,
code
:
this
.
entity
.
code
};
Api
.
getCloneHeader
(
parmese
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"克隆成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"克隆失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"克隆失败"
);
console
.
warn
(
err
);
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
handleImg
(
e
)
{
console
.
warn
(
e
);
let
file
=
null
;
if
(
e
.
clipboardData
&&
e
.
clipboardData
.
items
[
0
]
&&
e
.
clipboardData
.
items
[
0
].
type
&&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
"image"
)
>
-
1
)
{
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
();
let
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
setTimeout
(()
=>
{
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
;
this
.
entity
.
remark
+=
img
;
},
1000
);
// new R
}
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
isEffect
=
parseInt
(
r
.
result
.
isEffect
);
this
.
entity
.
id
=
0
;
});
this
.
getCodNumber
();
},
getCodNumber
()
{
Api
.
getCodeNumber
({
code
:
"GY"
,
count
:
"1"
}).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
entity
.
code
=
r
.
result
[
0
];
}
else
{
this
.
$Message
.
error
(
"生成编号失败"
);
}
});
},
l
(
key
)
{
key
=
"routingHeader"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
proChange
(
v
,
items
)
{
this
.
entity
.
productName
=
items
.
productName
;
this
.
entity
.
drawingNo
=
items
.
drawingNo
;
this
.
entity
.
productBomId
=
items
.
bomId
;
},
departChange
(
v
,
items
)
{
this
.
entity
.
departmentName
=
items
.
name
;
}
},
eid
(
v
)
{
// console.log("id:",v)
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
},
eid
(
v
)
{
// console.log("id:",v)
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
};
</
script
>
\ No newline at end of file
</
script
>
pages/technology/details/routingsupporting/api.js
View file @
52938112
...
...
@@ -27,4 +27,8 @@ export default {
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 @
52938112
...
...
@@ -16,11 +16,13 @@
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
v-show=
"headerStatus==0||headerStatus==4"
>
新增
</Button>
<Button
@
click=
"openModalIm"
>
导入
</Button>
</
template
>
</DataGrid>
<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"
/>
</Modal>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</div>
</template>
...
...
@@ -56,7 +58,9 @@ export default {
detail
:
null
,
curId
:
0
,
hid
:
0
,
columns
:
[{
columns
:
[
{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
...
...
@@ -64,12 +68,31 @@ export default {
width
:
100
,
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"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
high
:
true
},
{
key
:
"routingDetailId"
,
title
:
this
.
l
(
"routingDetailId"
),
hide
:
true
,
import
:
true
,
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
...
...
@@ -93,6 +116,13 @@ export default {
easy
:
true
,
high
:
true
},
{
key
:
"materialId"
,
title
:
this
.
l
(
"materialId"
),
align
:
"left"
,
hide
:
true
,
import
:
true
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
...
...
@@ -229,6 +259,9 @@ export default {
],
headerStatus
:
-
1
,
productBomId
:
-
1
,
ModalIm
:
false
,
temTitle
:
"工艺Bom"
,
routingHeaderData
:
[],
};
},
created
()
{
...
...
@@ -243,6 +276,7 @@ export default {
},
mounted
()
{
console
.
log
(
this
);
this
.
getRoutingHeaderData
();
this
.
search
();
},
async
fetch
({
...
...
@@ -298,6 +332,81 @@ export default {
this
.
curId
=
0
;
this
.
modal
=
false
;
},
//批量导入start
//导入功能
openModalIm
()
{
this
.
ModalIm
=
true
},
ModalImCancel
()
{
this
.
ModalIm
=
false
},
getData
(
val
)
{
let
url
=
`
${
technologyUrl
}
productinfoimportservice/import`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
cols
,
this
.
formatMethod
(
val
))
},
//根据页面二次处理数据
formatMethod
(
val
)
{
// alert(JSON.stringify(val))
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
routingHeaderId
:
Number
(
this
.
headerid
),
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
)
{
obj
.
ico
=
false
}
else
{
obj
.
ico
=
true
}
tempList
.
push
(
obj
);
});
return
tempList
},
//批量导入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
)
{
let
vkey
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
pages/technology/index.vue
View file @
52938112
...
...
@@ -2,117 +2,99 @@
@import "./technolog.less";
.fullWindow {
position: fixed;
width: 100%;
left: 0;
top: 50px;
bottom: 0;
right: 0;
// bottom:100%;
// right: 100%;
z-index: 100;
background-color: white;
// background: red;
.top {
height: 42px;
line-height: 42px;
background: #f5f7f9;
}
position: fixed;
width: 100%;
left: 0;
top: 50px;
bottom: 0;
right: 0;
// bottom:100%;
// right: 100%;
z-index: 100;
background-color: white;
// background: red;
.top {
height: 42px;
line-height: 42px;
background: #f5f7f9;
}
}
</
style
>
<
template
>
<Layout
class=
"lay100"
>
<Layout
class=
"lay100"
>
<Sider
hide-trigger
v-if=
"showMenu"
class=
"menu_side"
width=
"300"
>
<ProductTree
@
on-hide=
"onHide"
@
on-select=
"productSearch"
/>
<ProductTree
@
on-hide=
"onHide"
@
on-select=
"productSearch"
/>
</Sider>
<div
v-if=
"!showMenu"
class=
"show_menu"
>
<a
class=
"menu_play fr"
@
click=
"showMenuFn"
title=
"展开"
>
<Icon
type=
"ios-arrow-forward"
size=
"24"
/>
</a>
<a
class=
"menu_play fr"
@
click=
"showMenuFn"
title=
"展开"
>
<Icon
type=
"ios-arrow-forward"
size=
"24"
/>
</a>
</div>
<Content
class=
"con"
:class=
"!showMenu?'con_bord':''"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入工艺名称/工艺编号"
v-width=
"200"
v-model=
"easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1120"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:uid=
"uId"
:title=
"title"
:headid=
"hid"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
<Modal
v-model=
"documentShow"
title=
"送审"
:mask-closable=
"false"
:scrollable=
"true"
ok-text=
"确定"
cancel-text=
"取消"
fullscreen
>
<sendAudit
ref=
"sendAudit"
></sendAudit>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
exportTitle=
"工艺规程"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入工艺名称/工艺编号"
v-width=
"200"
v-model=
"easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
<Button
@
click=
"openModalIm"
>
导入
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1120"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:uid=
"uId"
:title=
"title"
:headid=
"hid"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
<Modal
v-model=
"documentShow"
title=
"送审"
:mask-closable=
"false"
:scrollable=
"true"
ok-text=
"确定"
cancel-text=
"取消"
fullscreen
>
<sendAudit
ref=
"sendAudit"
></sendAudit>
<div
slot=
"footer"
>
<Button
@
click=
"documentShow = false"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"passDocument"
>
工艺规程送审
</Button>
<div
slot=
"footer"
>
<Button
@
click=
"documentShow = false"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"passDocument"
>
工艺规程送审
</Button>
</div>
</Modal>
<!-- 工艺更改弹框 -->
<routingchangeorder
ref=
"routingchangeorder"
></routingchangeorder>
<!-- 工艺更改表弹框 -->
<changelist
ref=
"changelist"
></changelist>
<div
class=
"fullWindow flex fd"
v-if=
"viewModal"
>
<div
class=
"top flex"
>
<div
v-width=
"200"
>
<a
class=
"back_href"
@
click=
"viewClose"
>
<Icon
type=
"ios-undo-outline"
size=
"24"
/>
返回工艺规程
</a>
</div>
<div
class=
"fg tc f14 fwBold blueTitle"
style=
"padding-right:200px;"
>
{{l('code')}}:
<span
class=
"grayTitle mr10"
>
{{titleObj.code}}
</span>
{{l('name')}}:
<span
class=
"grayTitle mr10"
>
{{titleObj.name}}
</span>
{{l('routingType')}}:
<span
class=
"grayTitle mr10"
>
<state
code=
"Process.Routing.routingType"
:value=
"titleObj.routingType"
type=
"text"
></state>
</span>
{{l('version')}}:
<span
class=
"grayTitle"
>
{{titleObj.version}}
</span>
{{l('departmentName')}}:
<span
class=
"grayTitle"
>
{{titleObj.departmentName}}
</span>
</div>
</div>
<div
class=
"fg"
>
<iframe
width=
"100%"
id=
"infoFrame"
height=
"100%"
frameborder=
"0"
:src=
"src"
></iframe>
</div>
</div>
</Modal>
<!-- 工艺更改弹框 -->
<routingchangeorder
ref=
"routingchangeorder"
></routingchangeorder>
<!-- 工艺更改表弹框 -->
<changelist
ref=
"changelist"
></changelist>
<div
class=
"fullWindow flex fd"
v-if=
"viewModal"
>
<div
class=
"top flex"
>
<div
v-width=
"200"
>
<a
class=
"back_href"
@
click=
"viewClose"
>
<Icon
type=
"ios-undo-outline"
size=
"24"
/>
返回工艺规程
</a>
</div>
<div
class=
"fg tc f14 fwBold blueTitle"
style=
"padding-right:200px;"
>
{{l('code')}}:
<span
class=
"grayTitle mr10"
>
{{titleObj.code}}
</span>
{{l('name')}}:
<span
class=
"grayTitle mr10"
>
{{titleObj.name}}
</span>
{{l('routingType')}}:
<span
class=
"grayTitle mr10"
>
<state
code=
"Process.Routing.routingType"
:value=
"titleObj.routingType"
type=
"text"
></state>
</span>
{{l('version')}}:
<span
class=
"grayTitle"
>
{{titleObj.version}}
</span>
{{l('departmentName')}}:
<span
class=
"grayTitle"
>
{{titleObj.departmentName}}
</span>
</div>
</div>
<div
class=
"fg"
>
<iframe
width=
"100%"
id=
"infoFrame"
height=
"100%"
frameborder=
"0"
:src=
"src"
></iframe>
</div>
</div>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</Content>
</Layout>
</Layout>
</template>
<
script
>
...
...
@@ -124,392 +106,509 @@ import sendAudit from "./sendAudit.vue";
import
routingchangeorder
from
"../processDesign/Process/routingchangeorder.vue"
;
import
changelist
from
"../processDesign/Process/changelist.vue"
;
export
default
{
components
:
{
ProductTree
,
Search
,
sendAudit
,
routingchangeorder
,
changelist
},
head
:
{
title
:
"工艺规程"
,
author
:
"henq"
,
description
:
"routing_header 4/26/2020 10:12:38 AM"
},
data
()
{
return
{
showMenu
:
true
,
treeHeight
:
""
,
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"unicode,name,code"
,
value
:
null
}
},
hid
:
0
,
modal
:
false
,
title
:
"新增"
,
info
:
null
,
viewModal
:
false
,
src
:
null
,
detail
:
null
,
curId
:
0
,
uId
:
""
,
documentShow
:
false
,
columns
:
[
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
width
:
200
,
easy
:
true
,
high
:
true
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
tooltip
:
true
,
},
{
key
:
"phase"
,
title
:
this
.
l
(
"phase"
),
align
:
"center"
,
high
:
true
,
width
:
100
,
code
:
"Process.Routing.phase"
},
{
key
:
"versionid"
,
title
:
this
.
l
(
"version"
),
align
:
"center"
,
high
:
true
,
width
:
100
,
code
:
"Process.Routing.version"
},
{
title
:
this
.
l
(
"approvalStatus"
),
key
:
"approvalStatus"
,
align
:
"center"
,
width
:
"120"
,
code
:
"process.RoutingStatus"
},
{
key
:
"routingType"
,
title
:
this
.
l
(
"routingType"
),
align
:
"center"
,
width
:
100
,
high
:
true
,
code
:
"Process.Routing.routingType"
},
{
key
:
"drawingNo"
,
title
:
this
.
l
(
"drawingNo"
),
align
:
"left"
,
high
:
true
},
{
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
{
key
:
"departmentName"
,
title
:
this
.
l
(
"departmentName"
),
width
:
100
,
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
{
key
:
"isEffect"
,
title
:
this
.
l
(
"isEffect"
),
align
:
"center"
,
width
:
80
,
high
:
true
,
code
:
"Process.Status"
},
//{ key: "id", title: this.$t("id"), hide: true, align: "left" },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { key:"upDetailId",title:this.l("upDetailId") ,hide:true ,align:"left" ,high:true },
//{ key: "classId", title: this.l("classId"), align: "left", hide: true },
//{ key: "unicode", title: this.l("unicode"),align: "left",easy: false,hide: true},
// { key:"approvalStatus",title:this.l("approvalStatus") ,align:"left" ,high:true ,code:'process.RoutingStatus' },
// { key:"approvalStatusRemark",title:this.l("approvalStatusRemark") ,align:"left" ,high:true },
// { key:"auditUserId1",title:this.l("auditUserId1") ,align:"left" ,high:true },
// { key:"auditUserId2",title:this.l("auditUserId2") ,align:"left" ,high:true },
// { key:"platesnum",title:this.l("platesnum") ,align:"left" ,high:true },
// { key: "isMain", title: this.l("isMain"),align: "center",width: 80,high: true,code: "Process.state"},
//{key: "creatorUserId",title: this.l("author"),align: "left", high: true,type: "user",hide: true},
//{key: "versionnotes",title: this.l("versionnotes"),align: "left", high: true,hide: true},
//{key: "versionid", title: this.l("versionid"), align: "left", hide: true, code: "Process.Routing.version"},
{
key
:
"creationTime"
,
title
:
this
.
$t
(
"creationTime"
),
align
:
"left"
,
hide
:
true
},
{
key
:
"creatorUserId"
,
title
:
this
.
$t
(
"creatorUserId"
),
align
:
"left"
,
hide
:
true
,
type
:
"user"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
$t
(
"lastModificationTime"
),
align
:
"left"
,
hide
:
true
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
$t
(
"lastModifierUserId"
),
align
:
"left"
,
hide
:
true
,
type
:
"user"
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
260
,
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
components
:
{
ProductTree
,
Search
,
sendAudit
,
routingchangeorder
,
changelist
},
head
:
{
title
:
"工艺规程"
,
author
:
"henq"
,
description
:
"routing_header 4/26/2020 10:12:38 AM"
},
data
()
{
return
{
showMenu
:
true
,
treeHeight
:
""
,
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"unicode,name,code"
,
value
:
null
}
},
hid
:
0
,
modal
:
false
,
title
:
"新增"
,
info
:
null
,
viewModal
:
false
,
src
:
null
,
detail
:
null
,
curId
:
0
,
uId
:
""
,
documentShow
:
false
,
columns
:
[{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
width
:
200
,
easy
:
true
,
high
:
true
},
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
viewprocess
(
params
.
row
)
}
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
tooltip
:
true
,
},
"预览"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
}
key
:
"phase"
,
title
:
this
.
l
(
"phase"
),
align
:
"center"
,
high
:
true
,
width
:
100
,
code
:
"Process.Routing.phase"
},
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"copy"
},
on
:
{
click
:
()
=>
this
.
copy
(
params
.
row
.
id
)
}
key
:
"versionid"
,
title
:
this
.
l
(
"version"
),
align
:
"center"
,
high
:
true
,
width
:
100
,
code
:
"Process.Routing.version"
},
"克隆"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
title
:
this
.
l
(
"approvalStatus"
),
key
:
"approvalStatus"
,
align
:
"center"
,
width
:
"120"
,
code
:
"process.RoutingStatus"
},
'编辑'
// params.row.approvalStatus == 4||params.row.approvalStatus == 0 ? "编辑" : ""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
key
:
"routingType"
,
title
:
this
.
l
(
"routingType"
),
align
:
"center"
,
width
:
100
,
high
:
true
,
code
:
"Process.Routing.routingType"
},
params
.
row
.
approvalStatus
==
4
||
params
.
row
.
approvalStatus
==
0
?
"删除"
:
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
TechnologyChange
(
params
.
row
)
}
key
:
"drawingNo"
,
title
:
this
.
l
(
"drawingNo"
),
align
:
"left"
,
high
:
true
},
params
.
row
.
approvalStatus
==
1
?
"新增更改单"
:
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
sendAuditFun
(
params
.
row
)
}
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
params
.
row
.
approvalStatus
==
4
?
"送审"
:
""
)
]);
}
}
],
titleObj
:
{
code
:
""
,
//工艺编号
name
:
""
,
//工艺名称
routingType
:
0
,
//工艺类型
version
:
""
,
//工艺版本
departmentName
:
null
//车间
},
processviewModal
:
false
};
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
120
;
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
this
.
treeHeight
=
window
.
innerHeight
-
120
;
})();
};
},
computed
:
{},
methods
:
{
onHide
()
{
// this.$Message.info("收起左侧树")
this
.
showMenu
=
false
;
},
showMenuFn
()
{
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
productSearch
(
id
,
item
,
ids
)
{
let
where
=
{
productId
:
{
op
:
"In"
,
value
:
ids
}
};
this
.
$refs
.
grid
.
reload
(
where
);
},
// 详情页面
view
(
row
)
{
this
.
viewModal
=
true
;
this
.
titleObj
=
{
code
:
row
.
code
,
name
:
row
.
name
,
routingType
:
row
.
routingType
,
version
:
row
.
version
,
departmentName
:
row
.
departmentName
};
// this.info=()=>import("./details")
this
.
src
=
"/technology/details?id="
+
row
.
id
+
"&headerStatus="
+
row
.
approvalStatus
+
"&productBomId="
+
row
.
productBomId
;
},
viewClose
()
{
this
.
viewModal
=
false
;
this
.
src
=
null
;
},
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
// view(id) {
// this.curId = id;
// this.title = "详情";
// this.detail = () => import("./detail");
// this.modal = true;
// },
viewprocess
(
row
)
{
this
.
curId
=
row
.
id
;
if
(
row
.
fileId
)
{
this
.
uId
=
row
.
fileId
;
}
else
{
this
.
uId
=
this
.
$u
.
guid
();
//未上传过文件
}
this
.
title
=
"预览"
;
this
.
detail
=
()
=>
import
(
"./processview"
);
this
.
modal
=
true
;
},
edit
(
row
)
{
this
.
curId
=
row
.
id
;
if
(
row
.
fileId
)
{
this
.
uId
=
row
.
fileId
;
}
else
{
this
.
uId
=
this
.
$u
.
guid
();
//未上传过文件
}
{
key
:
"productId"
,
title
:
this
.
l
(
"productId"
),
align
:
"left"
,
import
:
true
,
hide
:
true
,
},
{
key
:
"productBomId"
,
title
:
this
.
l
(
"productBomId"
),
align
:
"left"
,
import
:
true
,
hide
:
true
,
},
{
key
:
"departmentName"
,
title
:
this
.
l
(
"departmentName"
),
width
:
100
,
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
{
key
:
"departmentId"
,
title
:
this
.
l
(
"departmentId"
),
align
:
"left"
,
import
:
true
,
hide
:
true
,
},
{
key
:
"isEffect"
,
title
:
this
.
l
(
"isEffect"
),
align
:
"center"
,
width
:
80
,
high
:
true
,
code
:
"Process.Status"
},
//{ key: "id", title: this.$t("id"), hide: true, align: "left" },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { key:"upDetailId",title:this.l("upDetailId") ,hide:true ,align:"left" ,high:true },
//{ key: "classId", title: this.l("classId"), align: "left", hide: true },
//{ key: "unicode", title: this.l("unicode"),align: "left",easy: false,hide: true},
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
let
vkey
=
"routingHeader"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
//送审
sendAuditFun
(
row
)
{
this
.
documentShow
=
true
;
this
.
$refs
.
sendAudit
.
intData
(
row
);
// { key:"approvalStatus",title:this.l("approvalStatus") ,align:"left" ,high:true ,code:'process.RoutingStatus' },
// { key:"approvalStatusRemark",title:this.l("approvalStatusRemark") ,align:"left" ,high:true },
// { key:"auditUserId1",title:this.l("auditUserId1") ,align:"left" ,high:true },
// { key:"auditUserId2",title:this.l("auditUserId2") ,align:"left" ,high:true },
// { key:"platesnum",title:this.l("platesnum") ,align:"left" ,high:true },
// { key: "isMain", title: this.l("isMain"),align: "center",width: 80,high: true,code: "Process.state"},
//{key: "creatorUserId",title: this.l("author"),align: "left", high: true,type: "user",hide: true},
//{key: "versionnotes",title: this.l("versionnotes"),align: "left", high: true,hide: true},
//{key: "versionid", title: this.l("versionid"), align: "left", hide: true, code: "Process.Routing.version"},
{
key
:
"creationTime"
,
title
:
this
.
$t
(
"creationTime"
),
align
:
"left"
,
hide
:
true
},
{
key
:
"creatorUserId"
,
title
:
this
.
$t
(
"creatorUserId"
),
align
:
"left"
,
hide
:
true
,
type
:
"user"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
$t
(
"lastModificationTime"
),
align
:
"left"
,
hide
:
true
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
$t
(
"lastModifierUserId"
),
align
:
"left"
,
hide
:
true
,
type
:
"user"
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
260
,
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
viewprocess
(
params
.
row
)
}
},
"预览"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
}
},
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"copy"
},
on
:
{
click
:
()
=>
this
.
copy
(
params
.
row
.
id
)
}
},
"克隆"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
},
'编辑'
// params.row.approvalStatus == 4||params.row.approvalStatus == 0 ? "编辑" : ""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
params
.
row
.
approvalStatus
==
4
||
params
.
row
.
approvalStatus
==
0
?
"删除"
:
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
TechnologyChange
(
params
.
row
)
}
},
params
.
row
.
approvalStatus
==
1
?
"新增更改单"
:
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
sendAuditFun
(
params
.
row
)
}
},
params
.
row
.
approvalStatus
==
4
?
"送审"
:
""
)
]);
}
}
],
titleObj
:
{
code
:
""
,
//工艺编号
name
:
""
,
//工艺名称
routingType
:
0
,
//工艺类型
version
:
""
,
//工艺版本
departmentName
:
null
//车间
},
processviewModal
:
false
,
ModalIm
:
false
,
temTitle
:
"工艺规程"
,
};
},
saveDocument
()
{
this
.
documentShow
=
true
;
this
.
$refs
.
sendAudit
.
intData
(
this
.
headerInfo
);
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
120
;
},
passDocument
()
{
this
.
dataListRetrun
=
[];
this
.
dataListRetrun
=
this
.
$refs
.
sendAudit
.
returnDataList
();
this
.
$http
.
order
.
batchstart
(
this
.
dataListRetrun
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"工艺规程送审成功!"
);
this
.
loaddata
();
//this.easySearch('')
}
else
{
this
.
$Message
.
error
(
"工艺规程送审失败!"
);
}
});
this
.
documentShow
=
false
;
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
//工艺更改
TechnologyChange
(
row
)
{
this
.
hid
=
row
.
id
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./details/routinghcorder/add"
);
this
.
modal
=
true
;
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
this
.
treeHeight
=
window
.
innerHeight
-
120
;
})();
};
},
computed
:
{},
methods
:
{
onHide
()
{
// this.$Message.info("收起左侧树")
this
.
showMenu
=
false
;
},
showMenuFn
()
{
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
productSearch
(
id
,
item
,
ids
)
{
let
where
=
{
productId
:
{
op
:
"In"
,
value
:
ids
}
};
this
.
$refs
.
grid
.
reload
(
where
);
},
// 详情页面
view
(
row
)
{
this
.
viewModal
=
true
;
this
.
titleObj
=
{
code
:
row
.
code
,
name
:
row
.
name
,
routingType
:
row
.
routingType
,
version
:
row
.
version
,
departmentName
:
row
.
departmentName
};
// this.info=()=>import("./details")
this
.
src
=
"/technology/details?id="
+
row
.
id
+
"&headerStatus="
+
row
.
approvalStatus
+
"&productBomId="
+
row
.
productBomId
;
},
viewClose
()
{
this
.
viewModal
=
false
;
this
.
src
=
null
;
},
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
// view(id) {
// this.curId = id;
// this.title = "详情";
// this.detail = () => import("./detail");
// this.modal = true;
// },
viewprocess
(
row
)
{
this
.
curId
=
row
.
id
;
if
(
row
.
fileId
)
{
this
.
uId
=
row
.
fileId
;
}
else
{
this
.
uId
=
this
.
$u
.
guid
();
//未上传过文件
}
this
.
title
=
"预览"
;
this
.
detail
=
()
=>
import
(
"./processview"
);
this
.
modal
=
true
;
},
edit
(
row
)
{
this
.
curId
=
row
.
id
;
if
(
row
.
fileId
)
{
this
.
uId
=
row
.
fileId
;
}
else
{
this
.
uId
=
this
.
$u
.
guid
();
//未上传过文件
}
Main
(
data
)
{
// this.eid1 = ''
this
.
seleId
=
data
.
row
.
id
;
this
.
$refs
.
changelist
.
seleId
=
data
.
row
.
id
;
let
url
=
`
${
designUrl
}
/routingheaderchangeorder/getpaged`
;
service
.
get
(
`
${
url
}
`
,
{
routing_header_id
:
this
.
seleId
}).
then
(
res
=>
{
//console.log(res)
this
.
$refs
.
changelist
.
data2
=
res
.
result
.
items
;
this
.
$refs
.
changelist
.
myloading
=
false
;
if
(
this
.
$refs
.
changelist
.
data2
.
length
==
0
)
{
this
.
$Message
.
error
(
"该工艺规程没有更改单!"
);
this
.
$refs
.
changelist
.
show3
=
false
;
return
;
}
this
.
$refs
.
changelist
.
show3
=
true
;
});
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
let
vkey
=
"routingHeader"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
//送审
sendAuditFun
(
row
)
{
this
.
documentShow
=
true
;
this
.
$refs
.
sendAudit
.
intData
(
row
);
},
saveDocument
()
{
this
.
documentShow
=
true
;
this
.
$refs
.
sendAudit
.
intData
(
this
.
headerInfo
);
},
passDocument
()
{
this
.
dataListRetrun
=
[];
this
.
dataListRetrun
=
this
.
$refs
.
sendAudit
.
returnDataList
();
this
.
$http
.
order
.
batchstart
(
this
.
dataListRetrun
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"工艺规程送审成功!"
);
this
.
loaddata
();
//this.easySearch('')
}
else
{
this
.
$Message
.
error
(
"工艺规程送审失败!"
);
}
});
this
.
documentShow
=
false
;
},
//工艺更改
TechnologyChange
(
row
)
{
this
.
hid
=
row
.
id
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./details/routinghcorder/add"
);
this
.
modal
=
true
;
},
Main
(
data
)
{
// this.eid1 = ''
this
.
seleId
=
data
.
row
.
id
;
this
.
$refs
.
changelist
.
seleId
=
data
.
row
.
id
;
let
url
=
`
${
designUrl
}
/routingheaderchangeorder/getpaged`
;
service
.
get
(
`
${
url
}
`
,
{
routing_header_id
:
this
.
seleId
}).
then
(
res
=>
{
//console.log(res)
this
.
$refs
.
changelist
.
data2
=
res
.
result
.
items
;
this
.
$refs
.
changelist
.
myloading
=
false
;
if
(
this
.
$refs
.
changelist
.
data2
.
length
==
0
)
{
this
.
$Message
.
error
(
"该工艺规程没有更改单!"
);
this
.
$refs
.
changelist
.
show3
=
false
;
return
;
}
this
.
$refs
.
changelist
.
show3
=
true
;
});
},
//批量导入start
//导入功能
openModalIm
()
{
this
.
ModalIm
=
true
},
ModalImCancel
()
{
this
.
ModalIm
=
false
},
getData
(
val
)
{
let
url
=
`
${
technologyUrl
}
routingheaderimportservice/import`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
columns
,
this
.
formatMethod
(
val
))
},
//根据页面二次处理数据
formatMethod
(
val
)
{
let
tempData
=
this
.
$u
.
clone
(
val
);
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
!=
''
)
{
obj
.
ico
=
false
}
else
{
obj
.
ico
=
true
}
tempList
.
push
(
obj
);
});
return
tempList
},
//批量导入end
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
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