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
ef14324c
Commit
ef14324c
authored
Mar 31, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
okkk
parent
7642b12a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1005 additions
and
911 deletions
+1005
-911
index.vue
...rocessDesign/ChangeSingle/technicalcoordination/index.vue
+311
-283
index.vue
pages/processDesign/ChangeSingle/unqualifiedorder/index.vue
+380
-322
index.vue
pages/resourceManagement/deviceType/index.vue
+314
-306
No files found.
pages/processDesign/ChangeSingle/technicalcoordination/index.vue
View file @
ef14324c
<
template
>
<div
class
>
<div
class
=
"vtr"
>
<div
class=
"contentRight"
>
<div
class=
"form_title"
>
<Input
v-model=
"value1"
placeholder=
"请输入技术协调单编号"
clearable
style=
"width: 240px"
/>
...
...
@@ -36,7 +36,13 @@
<Form
:model=
"formdata"
:label-width=
"150"
:rules=
"ruleValidate"
inline
>
<Row>
<FormItem
label=
"技术协调单编号"
>
<Input
v-model=
"formdata.technical_coordination_code"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
<Input
v-model=
"formdata.technical_coordination_code"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
</FormItem>
<FormItem
label=
"任务号"
>
<Input
v-model=
"formdata.taskCode"
placeholder=
"输入任务号"
size=
"large"
style=
"width:240px"
></Input>
...
...
@@ -55,7 +61,12 @@
<Input
v-model=
"formdata.drawing"
placeholder=
"输入图号"
size=
"large"
style=
"width:240px"
></Input>
</FormItem>
<FormItem
label=
"产品名称"
>
<Input
v-model=
"formdata.product_name"
placeholder=
"输入产品名称"
size=
"large"
style=
"width:240px"
></Input>
<Input
v-model=
"formdata.product_name"
placeholder=
"输入产品名称"
size=
"large"
style=
"width:240px"
></Input>
</FormItem>
</Row>
<!--
<Row>
...
...
@@ -67,23 +78,28 @@
<FormItem
label=
"在制品处理意见"
>
<textarea
v-model=
"formdata.handling_suggestion"
style=
"width: 600px"
></textarea>
</FormItem>
</Row>
-->
</Row>
-->
<Row>
<FormItem
label=
"产品标识"
>
<Input
v-model=
"formdata.product_mark"
placeholder=
"输入产品标识"
size=
"large"
style=
"width:240px"
></Input>
<Input
v-model=
"formdata.product_mark"
placeholder=
"输入产品标识"
size=
"large"
style=
"width:240px"
></Input>
</FormItem>
</Row>
</Row>
<Row>
<FormItem
label=
"协调内容"
>
<textarea
v-model=
"formdata.coordinate_content"
style=
"width: 645px"
></textarea>
</FormItem>
</Row>
<!--
<FormItem
label=
"是否更改设计文件"
>
<!--
<FormItem
label=
"是否更改设计文件"
>
<Select
v-model=
"formdata.change_design_file"
placeholder=
"请选择"
style=
"width:225px;"
>
<Option
value=
"是"
>
是
</Option>
<Option
value=
"否"
>
否
</Option>
</Select>
</FormItem>
-->
</FormItem>
-->
<!--
<Row>
<FormItem
label=
"是否更改工艺文件"
>
<Select
v-model=
"formdata.change_process_file"
placeholder=
"请选择"
style=
"width:225px;"
>
...
...
@@ -101,10 +117,16 @@
<Option
value=
"否"
>
否
</Option>
</Select>
</FormItem>
</Row>
-->
</Row>
-->
<Row>
<FormItem
label=
"检验员"
>
<Input
v-model=
"formdata.inspection_person_name"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
<Input
v-model=
"formdata.inspection_person_name"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
</FormItem>
<FormItem
label=
"检验日期"
>
<DatePicker
...
...
@@ -135,11 +157,11 @@
</div>
</
template
>
<
script
>
import
service
from
'@/plugins/request'
import
Department
from
'@/components/modalTree/department.vue'
import
Process
from
'@/components/orderOperator/process'
import
techSendReview
from
'./techSendReview.vue'
import
coordinate
from
'./coordinate.vue'
import
service
from
"@/plugins/request"
;
import
Department
from
"@/components/modalTree/department.vue"
;
import
Process
from
"@/components/orderOperator/process"
;
import
techSendReview
from
"./techSendReview.vue"
;
import
coordinate
from
"./coordinate.vue"
;
export
default
{
components
:
{
Department
,
...
...
@@ -154,20 +176,20 @@ export default {
modalInfo
:
false
,
//校验送审弹框
formExamine
:
{},
rules
:
{
approveUser
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
approveUser
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
technical_coordination_code
:
''
,
technical_coordination_code
:
""
,
total
:
0
,
page
:
1
,
pageSize
:
10
,
flag
:
0
,
id
:
''
,
id
:
""
,
data1
:
[],
value1
:
''
,
editId
:
''
,
up_id
:
''
,
value1
:
""
,
editId
:
""
,
up_id
:
""
,
treeData
:
[],
//下拉表格树数据
title
:
'新增设备类型'
,
title
:
"新增设备类型"
,
show
:
false
,
// show2: false,
upweb
:
false
,
...
...
@@ -175,120 +197,120 @@ export default {
selectModel02
:
false
,
isedit0
:
false
,
showDeptTree
:
false
,
tbHeight
:
''
,
tbHeight
:
""
,
seleId
:
0
,
cityList
:
[],
isShow
:
true
,
seldata
:
[],
//父权限菜单树
parent_name
:
''
,
//父权限名
parent_name
:
""
,
//父权限名
ruleValidate
:
{
equip_type_id
:
[
{
required
:
true
,
message
:
'设备类型编号不能为空!'
,
trigger
:
'blur'
message
:
"设备类型编号不能为空!"
,
trigger
:
"blur"
}
]
},
formdata
:
{
technical_coordination_code
:
''
,
id
:
0
,
taskCode
:
''
,
technical_coordination_code
:
""
,
id
:
0
,
taskCode
:
""
,
quantity
:
0
,
phase
:
''
,
drawing
:
''
,
product_name
:
''
,
product_mark
:
''
,
coordinate_content
:
''
,
coordinate_results
:
''
,
handling_suggestion
:
''
,
change_design_file
:
''
,
change_process_file
:
''
,
compilation_temporary_process
:
''
,
inspection_date
:
''
,
inspection_person_name
:
''
,
phase
:
""
,
drawing
:
""
,
product_name
:
""
,
product_mark
:
""
,
coordinate_content
:
""
,
coordinate_results
:
""
,
handling_suggestion
:
""
,
change_design_file
:
""
,
change_process_file
:
""
,
compilation_temporary_process
:
""
,
inspection_date
:
""
,
inspection_person_name
:
""
,
status
:
0
,
note
:
''
,
note
:
""
,
dispatch_id
:
0
,
execute_id
:
0
,
order_id
:
''
order_id
:
""
},
sysdata
:
[
{
value
:
'1'
,
label
:
'粉末'
value
:
"1"
,
label
:
"粉末"
},
{
value
:
'2'
,
label
:
'基板'
value
:
"2"
,
label
:
"基板"
},
{
value
:
'3'
,
label
:
'刮刀'
value
:
"3"
,
label
:
"刮刀"
}
],
column2
:
[
{
type
:
'index'
,
title
:
'序号'
,
width
:
'65'
,
align
:
'center'
type
:
"index"
,
title
:
"序号"
,
width
:
"65"
,
align
:
"center"
},
{
title
:
'技术协调单编号'
,
key
:
'technical_coordination_code'
,
align
:
'center'
,
width
:
'200'
title
:
"技术协调单编号"
,
key
:
"technical_coordination_code"
,
align
:
"center"
,
width
:
"200"
},
{
title
:
'任务号'
,
key
:
'taskCode'
,
align
:
'center'
,
width
:
'200'
title
:
"任务号"
,
key
:
"taskCode"
,
align
:
"center"
,
width
:
"200"
},
{
title
:
'数量'
,
key
:
'quantity'
,
align
:
'center'
,
width
:
'200'
title
:
"数量"
,
key
:
"quantity"
,
align
:
"center"
,
width
:
"200"
},
{
title
:
'阶段'
,
key
:
'phase'
,
align
:
'center'
,
width
:
'110'
title
:
"阶段"
,
key
:
"phase"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
'图号'
,
key
:
'drawing'
,
align
:
'center'
,
width
:
'110'
title
:
"图号"
,
key
:
"drawing"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
'产品名称'
,
key
:
'product_name'
,
align
:
'center'
,
width
:
'110'
title
:
"产品名称"
,
key
:
"product_name"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
'产品标识'
,
key
:
'product_mark'
,
align
:
'center'
,
width
:
'110'
title
:
"产品标识"
,
key
:
"product_mark"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
'状态'
,
key
:
'status'
,
align
:
'center'
,
title
:
"状态"
,
key
:
"status"
,
align
:
"center"
,
width
:
110
,
render
:
(
h
,
params
)
=>
{
return
h
(
'state'
,
{
render
:
(
h
,
params
)
=>
{
return
h
(
"state"
,
{
props
:
{
code
:
'unProduct.repairstatus'
,
type
:
'text'
,
value
:
params
.
row
.
status
+
''
code
:
"unProduct.repairstatus"
,
type
:
"text"
,
value
:
params
.
row
.
status
+
""
}
})
})
;
// let statuse = params.row.status
// let text = statuse == 1 ? '待送审' : (statuse==2? '审核中':(statuse==3? '通过':(statuse==4? '驳回':(statuse==5? '终止':''))))
// return h('span',{},text)
...
...
@@ -337,81 +359,82 @@ export default {
// width: '110'
// },
{
title
:
'操作'
,
key
:
'id'
,
align
:
'center'
,
width
:
'280'
,
title
:
"操作"
,
key
:
"id"
,
align
:
"center"
,
width
:
"280"
,
render
:
(
h
,
params
)
=>
{
let
actions
=
[]
let
actions
=
[]
;
if
(
params
.
row
.
status
==
3
)
{
actions
.
push
(
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow1
(
params
)
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow1
(
params
);
}
}
}
},
'预览'
),
)}
if
(
params
.
row
.
status
==
1
||
params
.
row
.
status
==
4
)
{
actions
.
push
(
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow
(
params
)
"预览"
)
);
}
if
(
params
.
row
.
status
==
1
||
params
.
row
.
status
==
4
)
{
actions
.
push
(
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow
(
params
);
}
}
}
},
'编辑'
)
,
)
}
return
h
(
'div'
,
{
class
:
'action'
},
actions
)
}
,
"编辑"
)
)
;
}
return
h
(
"div"
,
{
class
:
"action"
},
actions
);
}
}
],
data2
:
[],
data3
:
[],
userlist
:
[]
}
}
;
},
created
()
{
this
.
tbHeight
=
window
.
innerHeight
-
175
this
.
tbHeight
=
window
.
innerHeight
-
175
;
},
methods
:
{
// 分页
pageChange
(
num
)
{
//console.log(num);
this
.
page
=
num
this
.
loadchangelist
()
this
.
page
=
num
;
this
.
loadchangelist
()
;
},
pageSizeChange
(
limit
)
{
//console.log(limit)
this
.
pageSize
=
limit
this
.
loadchangelist
()
this
.
pageSize
=
limit
;
this
.
loadchangelist
()
;
},
//查询
searchData
()
{
this
.
page
=
1
this
.
pageSize
=
10
this
.
loadchangelist
()
this
.
page
=
1
;
this
.
pageSize
=
10
;
this
.
loadchangelist
()
;
},
loadchangelist
()
{
let
url
=
`
${
designUrl
}
/technicalcoordination/getpaged`
let
url
=
`
${
designUrl
}
/technicalcoordination/getpaged`
;
service
.
get
(
`
${
url
}
`
,
{
...
...
@@ -422,185 +445,190 @@ export default {
pageSize
:
this
.
pageSize
}
})
.
then
(
(
res
)
=>
{
this
.
data2
=
res
.
data
.
result
.
items
this
.
total
=
res
.
data
.
result
.
totalCount
})
.
then
(
res
=>
{
this
.
data2
=
res
.
data
.
result
.
items
;
this
.
total
=
res
.
data
.
result
.
totalCount
;
})
;
},
//新增库位
addData
()
{
this
.
submitShow
=
true
this
.
title
=
'生产过程技术协调单'
this
.
show
=
true
if
(
this
.
formdata
.
dispatch_id
==
0
)
{
this
.
formdata
.
taskCode
=
''
this
.
formdata
.
drawing
=
''
this
.
formdata
.
product_name
=
''
}
this
.
formdata
.
technical_coordination_code
=
''
this
.
formdata
.
id
=
''
;
this
.
formdata
.
quantity
=
0
this
.
formdata
.
phase
=
''
this
.
formdata
.
product_mark
=
''
this
.
formdata
.
coordinate_content
=
''
this
.
formdata
.
coordinate_results
=
''
this
.
formdata
.
handling_suggestion
=
''
this
.
formdata
.
change_design_file
=
''
this
.
formdata
.
change_process_file
=
''
this
.
formdata
.
compilation_temporary_process
=
''
this
.
formdata
.
inspection_date
=
''
this
.
formdata
.
inspection_person_name
=
localStorage
.
getItem
(
'userName'
)
this
.
formdata
.
status
=
1
this
.
formdata
.
note
=
''
this
.
submitShow
=
true
;
this
.
title
=
"生产过程技术协调单"
;
this
.
show
=
true
;
if
(
this
.
formdata
.
dispatch_id
==
0
)
{
this
.
formdata
.
taskCode
=
""
;
this
.
formdata
.
drawing
=
""
;
this
.
formdata
.
product_name
=
""
;
}
this
.
formdata
.
technical_coordination_code
=
""
;
this
.
formdata
.
id
=
""
;
this
.
formdata
.
quantity
=
0
;
this
.
formdata
.
phase
=
""
;
var
url1
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=JJXTD`
service
.
get
(
`
${
url1
}
`
).
then
((
response
)
=>
{
this
.
formdata
.
technical_coordination_code
=
response
.
data
.
result
})
this
.
formdata
.
product_mark
=
""
;
this
.
formdata
.
coordinate_content
=
""
;
this
.
formdata
.
coordinate_results
=
""
;
this
.
formdata
.
handling_suggestion
=
""
;
this
.
formdata
.
change_design_file
=
""
;
this
.
formdata
.
change_process_file
=
""
;
this
.
formdata
.
compilation_temporary_process
=
""
;
this
.
formdata
.
inspection_date
=
""
;
this
.
formdata
.
inspection_person_name
=
localStorage
.
getItem
(
"userName"
);
this
.
formdata
.
status
=
1
;
this
.
formdata
.
note
=
""
;
var
url1
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=JJXTD`
;
service
.
get
(
`
${
url1
}
`
).
then
(
response
=>
{
this
.
formdata
.
technical_coordination_code
=
response
.
data
.
result
;
});
},
handleChange1
(
date
)
{
this
.
formdata
.
inspection_date
=
date
this
.
formdata
.
inspection_date
=
date
;
},
// 添加/编辑 弹框的保存
saveOk
()
{
var
url
=
`
${
designUrl
}
/technicalcoordination/createorupdate`
var
url
=
`
${
designUrl
}
/technicalcoordination/createorupdate`
;
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
technicalCoordination
:
this
.
formdata
}))
.
then
((
res
)
=>
{
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
technicalCoordination
:
this
.
formdata
})
)
.
then
(
res
=>
{
if
(
res
.
data
.
success
)
{
this
.
loadchangelist
()
this
.
$Message
.
success
(
'保存成功'
)
this
.
show
=
false
if
(
this
.
checked
==
true
){
let
url
=
`
${
designUrl
}
/technicalcoordination/getpaged`
service
.
get
(
`
${
url
}
`
,
{
params
:
{
technical_coordination_code
:
this
.
formdata
.
technical_coordination_code
,
pageindex
:
1
,
pageSize
:
10
}
})
.
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
$refs
.
techSendReview
.
info
.
changeInfo
=
res
.
data
.
result
.
items
[
0
];
this
.
$refs
.
techSendReview
.
technical_coordination_code
=
this
.
formdata
.
technical_coordination_code
;
})
this
.
$refs
.
techSendReview
.
modalInfo
=
true
}
this
.
loadchangelist
();
this
.
$Message
.
success
(
"保存成功"
);
this
.
show
=
false
;
if
(
this
.
checked
==
true
)
{
let
url
=
`
${
designUrl
}
/technicalcoordination/getpaged`
;
service
.
get
(
`
${
url
}
`
,
{
params
:
{
technical_coordination_code
:
this
.
formdata
.
technical_coordination_code
,
pageindex
:
1
,
pageSize
:
10
}
})
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
$refs
.
techSendReview
.
info
.
changeInfo
=
res
.
data
.
result
.
items
[
0
];
this
.
$refs
.
techSendReview
.
technical_coordination_code
=
this
.
formdata
.
technical_coordination_code
;
});
this
.
$refs
.
techSendReview
.
modalInfo
=
true
;
}
}
})
})
;
},
changeOption
(
data
)
{},
selectDepart
()
{
this
.
showDeptTree
=
true
this
.
showDeptTree
=
true
;
},
editRow
(
params
)
{
this
.
title
=
'生产过程技术协调单'
this
.
submitShow
=
true
this
.
flag
=
1
var
url2
=
`
${
designUrl
}
/technicalcoordination/getforedit`
this
.
title
=
"生产过程技术协调单"
;
this
.
submitShow
=
true
;
this
.
flag
=
1
;
var
url2
=
`
${
designUrl
}
/technicalcoordination/getforedit`
;
service
.
get
(
`
${
url2
}
`
,
{
params
:
{
Id
:
params
.
row
.
id
}
})
.
then
(
(
response
)
=>
{
this
.
formdata
=
response
.
data
.
result
.
technicalCoordination
})
this
.
show
=
true
.
then
(
response
=>
{
this
.
formdata
=
response
.
data
.
result
.
technicalCoordination
;
})
;
this
.
show
=
true
;
},
editRow1
(
params
)
{
this
.
$refs
.
coordinate
.
formdata
=
[];
this
.
$refs
.
coordinate
.
formcontextdata
=
[];
this
.
$refs
.
coordinate
.
formcontextclosedata
=
[];
this
.
$refs
.
coordinate
.
auditedTime
=
''
;
this
.
$refs
.
coordinate
.
hqauditedTime
=
''
;
this
.
$refs
.
coordinate
.
name
=
''
;
this
.
$refs
.
coordinate
.
name1
=
''
;
this
.
flag
=
1
;
var
url2
=
`
${
designUrl
}
/technicalcoordination/getbyid`
editRow1
(
params
)
{
this
.
$refs
.
coordinate
.
formdata
=
[];
this
.
$refs
.
coordinate
.
formcontextdata
=
[];
this
.
$refs
.
coordinate
.
formcontextclosedata
=
[];
this
.
$refs
.
coordinate
.
auditedTime
=
""
;
this
.
$refs
.
coordinate
.
hqauditedTime
=
""
;
this
.
$refs
.
coordinate
.
name
=
""
;
this
.
$refs
.
coordinate
.
name1
=
""
;
this
.
flag
=
1
;
var
url2
=
`
${
designUrl
}
/technicalcoordination/getbyid`
;
service
.
get
(
`
${
url2
}
`
,
{
params
:
{
Id
:
params
.
row
.
id
}
})
.
then
(
(
response
)
=>
{
this
.
$refs
.
coordinate
.
formdata
=
response
.
data
.
result
})
var
url3
=
`
${
workflowUrl
}
/instance/getdetailbycode`
.
then
(
response
=>
{
this
.
$refs
.
coordinate
.
formdata
=
response
.
data
.
result
;
})
;
var
url3
=
`
${
workflowUrl
}
/instance/getdetailbycode`
;
service
.
get
(
`
${
url3
}
`
,
{
params
:
{
code
:
params
.
row
.
technical_coordination_code
}
})
.
then
((
response
)
=>
{
console
.
log
(
response
)
for
(
var
i
=
0
;
i
<
response
.
data
.
result
.
nodes
.
length
;
i
++
)
{
var
id
=
response
.
data
.
result
.
nodes
[
i
].
id
var
status
=
response
.
data
.
result
.
nodes
[
i
].
status
if
(
id
==
163
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
this
.
$refs
.
coordinate
.
formcontextdata
=
JSON
.
parse
(
context
);
}
if
(
id
==
164
&&
status
==
2
)
{
this
.
$refs
.
coordinate
.
hqauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
]
var
url5
=
`
${
systemUrl
}
/user/getuser`
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
((
response
)
=>
{
var
name
=
response
.
data
.
result
.
name
console
.
log
(
name
)
this
.
$refs
.
coordinate
.
name1
=
name
})
// console.log(this.$refs.coordinate.hqauditedTime)
}
if
(
id
==
165
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
]
this
.
$refs
.
coordinate
.
formcontextclosedata
=
JSON
.
parse
(
context
);
this
.
$refs
.
coordinate
.
auditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
var
url4
=
`
${
systemUrl
}
/user/getuser`
service
.
get
(
`
${
url4
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
((
response
)
=>
{
var
name
=
response
.
data
.
result
.
name
console
.
log
(
name
)
this
.
$refs
.
coordinate
.
name
=
name
})
}
.
get
(
`
${
url3
}
`
,
{
params
:
{
code
:
params
.
row
.
technical_coordination_code
}
})
.
then
(
response
=>
{
console
.
log
(
response
);
for
(
var
i
=
0
;
i
<
response
.
data
.
result
.
nodes
.
length
;
i
++
)
{
var
id
=
response
.
data
.
result
.
nodes
[
i
].
id
;
var
status
=
response
.
data
.
result
.
nodes
[
i
].
status
;
if
(
id
==
163
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
;
this
.
$refs
.
coordinate
.
formcontextdata
=
JSON
.
parse
(
context
);
}
if
(
id
==
164
&&
status
==
2
)
{
this
.
$refs
.
coordinate
.
hqauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
;
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
];
var
url5
=
`
${
systemUrl
}
/user/getuser`
;
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
(
response
=>
{
var
name
=
response
.
data
.
result
.
name
;
console
.
log
(
name
);
this
.
$refs
.
coordinate
.
name1
=
name
;
});
// console.log(this.$refs.coordinate.hqauditedTime)
}
if
(
id
==
165
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
;
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
];
this
.
$refs
.
coordinate
.
formcontextclosedata
=
JSON
.
parse
(
context
);
this
.
$refs
.
coordinate
.
auditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
;
var
url4
=
`
${
systemUrl
}
/user/getuser`
;
service
.
get
(
`
${
url4
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
(
response
=>
{
var
name
=
response
.
data
.
result
.
name
;
console
.
log
(
name
);
this
.
$refs
.
coordinate
.
name
=
name
;
});
}
}
//this.$refs.coordinate.formdata = response.data.result
})
this
.
$refs
.
coordinate
.
modelChange1
=
true
}
,
})
;
this
.
$refs
.
coordinate
.
modelChange1
=
true
;
}
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tbHeight
=
window
.
screenHeight
-
175
})()
}
window
.
screenHeight
=
window
.
innerHeight
;
this
.
tbHeight
=
window
.
screenHeight
-
175
;
})()
;
}
;
}
}
}
;
</
script
>
<
style
scoped
>
/
deep
/
.vertical-center-modal
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
/
deep
/
.vertical-center-modal
.ivu-modal
{
top
:
0
;
}
/
deep
/
.fontcolor
{
color
:
#249e91
;
margin
:
0
6px
;
}
.fr
{
float
:
right
;
}
.ml10
{
margin-left
:
10px
;
}
.mt10
{
margin-top
:
10px
;
<
style
lang=
"less"
>
.vtr {
.vertical-center-modal {
display: flex;
align-items: center;
justify-content: center;
}
.vertical-center-modal .ivu-modal {
top: 0;
}
.fontcolor {
color: #249e91;
margin: 0 6px;
}
}
</
style
>
pages/processDesign/ChangeSingle/unqualifiedorder/index.vue
View file @
ef14324c
<
template
>
<div
class
>
<div
class
=
"unq"
>
<div
class=
"contentRight"
>
<div
class=
"form_title"
>
<Input
v-model=
"value1"
placeholder=
"请输入不合格审理单编号"
clearable
style=
"width: 240px"
/>
...
...
@@ -11,15 +11,18 @@
</div>
<div
class=
"content_box mt10"
>
<Table
ref=
"table"
border
:columns=
"column2"
:data=
"data2"
highlight-row
ref=
"table"
border
:columns=
"column2"
:data=
"data2"
highlight-row
highlight-current-row
:height=
"this.tbHeight"
class=
"tableCommon"
>
class=
"tableCommon"
>
<!--
<template
slot-scope=
"
{ row,index }" slot="status"> @on-selection-change="selectFunction"
<state
code=
"unProduct.repairstatus"
type=
"text"
class=
"bold"
:value=
"row.status"
></state>
</
template
>
-->
</
template
>
-->
</Table>
<Page
:total=
"this.total"
...
...
@@ -38,26 +41,58 @@
<Form
:model=
"formdata"
:label-width=
"150"
:rules=
"ruleValidate"
inline
>
<Row>
<FormItem
label=
"审理单编号"
>
<Input
v-model=
"formdata.unqualified_order_code"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
<Input
v-model=
"formdata.unqualified_order_code"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
</FormItem>
<FormItem
label=
"申请部门"
>
<Input
v-model=
"formdata.department_name"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
<Input
v-model=
"formdata.department_name"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
</FormItem>
</Row>
<Row>
<FormItem
label=
"客户名称"
>
<Input
v-model=
"formdata.customer_name"
placeholder=
"输入客户名称"
size=
"large"
style=
"width:240px"
></Input>
<Input
v-model=
"formdata.customer_name"
placeholder=
"输入客户名称"
size=
"large"
style=
"width:240px"
></Input>
</FormItem>
<FormItem
label=
"外包供方名称"
>
<Input
v-model=
"formdata.outsourcing_name"
placeholder=
"输入外包供方名称"
size=
"large"
style=
"width:240px"
></Input>
<Input
v-model=
"formdata.outsourcing_name"
placeholder=
"输入外包供方名称"
size=
"large"
style=
"width:240px"
></Input>
</FormItem>
</Row>
<Row>
<FormItem
label=
"产品名称"
>
<Input
v-model=
"formdata.product_name"
placeholder=
"输入产品名称"
size=
"large"
style=
"width:240px"
></Input>
<Input
v-model=
"formdata.product_name"
placeholder=
"输入产品名称"
size=
"large"
style=
"width:240px"
></Input>
</FormItem>
<FormItem
label=
"材料牌号"
>
<Input
v-model=
"formdata.material"
placeholder=
"输入材料牌号"
size=
"large"
style=
"width:240px"
></Input>
<Input
v-model=
"formdata.material"
placeholder=
"输入材料牌号"
size=
"large"
style=
"width:240px"
></Input>
</FormItem>
</Row>
<Row>
...
...
@@ -70,13 +105,25 @@
</Row>
<Row>
<FormItem
label=
"问题描述"
>
<Input
type=
"textarea"
:autosize=
"{minRows: 1,maxRows: 6}"
v-model=
"formdata.problem_desc"
size=
"large"
style=
"width: 645px"
/>
<Input
type=
"textarea"
:autosize=
"{minRows: 1,maxRows: 6}"
v-model=
"formdata.problem_desc"
size=
"large"
style=
"width: 645px"
/>
<!-- <textarea v-model="formdata.problem_desc" style="width: 600px"></textarea> -->
</FormItem>
</Row>
<Row>
<FormItem
label=
"检验员"
>
<Input
v-model=
"formdata.inspection_person_name"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
<Input
v-model=
"formdata.inspection_person_name"
placeholder
size=
"large"
style=
"width:240px"
readonly
></Input>
</FormItem>
<FormItem
label=
"检验日期"
>
<DatePicker
...
...
@@ -89,13 +136,12 @@
></DatePicker>
</FormItem>
</Row>
</Form>
<div
slot=
"footer"
>
<Button
@
click=
"show=false"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"saveOk"
>
保存
</Button>
<Checkbox
v-model=
"checked"
class=
"ml10"
label=
"送审"
>
送审
</Checkbox>
<!-- v-show="submitShow" -->
<!-- v-show="submitShow" -->
</div>
</Modal>
<Department
...
...
@@ -111,22 +157,23 @@
width=
"800"
:mask-closable=
"false"
:scrollable=
"true"
fullscreen
>
fullscreen
>
<OrderSendReview
ref=
"orderSendReview"
></OrderSendReview>
<div
slot=
"footer"
>
<Button
@
click=
"canCelFn"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"upSave"
>
确定送审
</Button>
</div>
</Modal>
<trialOrder
ref=
"trialOrder"
></trialOrder>
<trialOrder
ref=
"trialOrder"
></trialOrder>
</div>
</template>
<
script
>
import
service
from
'@/plugins/request'
import
Department
from
'@/components/modalTree/department.vue'
import
Process
from
'@/components/orderOperator/process'
import
OrderSendReview
from
'../components/orderSendReview'
//送审页面
import
trialOrder
from
'./trialOrder'
import
service
from
"@/plugins/request"
;
import
Department
from
"@/components/modalTree/department.vue"
;
import
Process
from
"@/components/orderOperator/process"
;
import
OrderSendReview
from
"../components/orderSendReview"
;
//送审页面
import
trialOrder
from
"./trialOrder"
;
export
default
{
components
:
{
Department
,
...
...
@@ -140,15 +187,15 @@ export default {
total
:
0
,
page
:
1
,
pageSize
:
10
,
unqualified_order_code
:
''
,
id
:
''
,
unqualified_order_code
:
""
,
id
:
""
,
flag
:
0
,
data1
:
[],
value1
:
''
,
editId
:
''
,
up_id
:
''
,
value1
:
""
,
editId
:
""
,
up_id
:
""
,
treeData
:
[],
//下拉表格树数据
title
:
'新增设备类型'
,
title
:
"新增设备类型"
,
show
:
false
,
// show2: false,
upweb
:
false
,
...
...
@@ -156,7 +203,7 @@ export default {
selectModel02
:
false
,
isedit0
:
false
,
showDeptTree
:
false
,
tbHeight
:
''
,
tbHeight
:
""
,
seleId
:
0
,
cityList
:
[],
isShow
:
true
,
...
...
@@ -164,57 +211,59 @@ export default {
checked
:
true
,
//送审选择框
modalInfo
:
false
,
//校验送审弹框
dataListRetrunNew
:
{
schemaId
:
'c2e09c9b-02a9-4188-97a6-cdb68d50a64a'
,
//不合格品送审的schemaId
schemaId
:
"c2e09c9b-02a9-4188-97a6-cdb68d50a64a"
,
//不合格品送审的schemaId
idList
:
[],
//不合格品id List
code
:
''
,
//不合格品编号List
code
:
""
,
//不合格品编号List
operatorIdList
:
[]
//操作员id
},
//确定保存后返回数据
footerModel
:
false
,
formExamine
:
{},
rules
:
{
approveUser
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
approveUser
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
seldata
:
[],
//父权限菜单树
parent_name
:
''
,
//父权限名
parent_name
:
""
,
//父权限名
ruleValidate
:
{
equip_type_id
:
[
{
required
:
true
,
message
:
'设备类型编号不能为空!'
,
trigger
:
'blur'
message
:
"设备类型编号不能为空!"
,
trigger
:
"blur"
}
]
},
formdata
:
{
unqualified_order_code
:
''
,
customer_name
:
''
,
outsourcing_name
:
''
,
product_name
:
''
,
material
:
''
,
unqualified_order_code
:
""
,
customer_name
:
""
,
outsourcing_name
:
""
,
product_name
:
""
,
material
:
""
,
quantity
:
0
,
code
:
''
,
problem_desc
:
''
,
code
:
""
,
problem_desc
:
""
,
inspection_person
:
0
,
inspection_person_name
:
''
,
inspection_date
:
''
,
department_id
:
''
,
//部门ID
department_name
:
''
,
//部门名称
inspection_person_name
:
""
,
inspection_date
:
""
,
department_id
:
""
,
//部门ID
department_name
:
""
,
//部门名称
status
:
0
,
note
:
''
,
note
:
""
,
dispatch_id
:
0
,
execute_id
:
0
,
order_id
:
''
order_id
:
""
},
sysdata
:
[
{
value
:
'1'
,
label
:
'粉末'
},{
value
:
'2'
,
label
:
'基板'
},{
value
:
'3'
,
label
:
'刮刀'
value
:
"1"
,
label
:
"粉末"
},
{
value
:
"2"
,
label
:
"基板"
},
{
value
:
"3"
,
label
:
"刮刀"
}
],
column2
:
[
...
...
@@ -224,146 +273,157 @@ export default {
// align: 'center',
// },
{
type
:
'index'
,
title
:
'序号'
,
width
:
'65'
,
align
:
'center'
},{
title
:
'不合格审理单编号'
,
key
:
'unqualified_order_code'
,
align
:
'center'
,
width
:
'200'
},{
title
:
'发起人'
,
key
:
'inspection_person_name'
,
align
:
'center'
,
width
:
'200'
},{
title
:
'客户名称'
,
key
:
'customer_name'
,
align
:
'center'
,
width
:
'200'
},{
title
:
'外包供方名称'
,
key
:
'outsourcing_name'
,
align
:
'center'
,
width
:
'200'
},{
title
:
'产品名称'
,
key
:
'product_name'
,
align
:
'center'
,
width
:
'110'
},{
title
:
'状态'
,
key
:
'status'
,
align
:
'center'
,
type
:
"index"
,
title
:
"序号"
,
width
:
"65"
,
align
:
"center"
},
{
title
:
"不合格审理单编号"
,
key
:
"unqualified_order_code"
,
align
:
"center"
,
width
:
"200"
},
{
title
:
"发起人"
,
key
:
"inspection_person_name"
,
align
:
"center"
,
width
:
"200"
},
{
title
:
"客户名称"
,
key
:
"customer_name"
,
align
:
"center"
,
width
:
"200"
},
{
title
:
"外包供方名称"
,
key
:
"outsourcing_name"
,
align
:
"center"
,
width
:
"200"
},
{
title
:
"产品名称"
,
key
:
"product_name"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
"状态"
,
key
:
"status"
,
align
:
"center"
,
width
:
110
,
render
:
(
h
,
params
)
=>
{
return
h
(
'state'
,
{
render
:
(
h
,
params
)
=>
{
return
h
(
"state"
,
{
props
:
{
code
:
'unProduct.repairstatus'
,
type
:
'text'
,
value
:
params
.
row
.
status
+
''
code
:
"unProduct.repairstatus"
,
type
:
"text"
,
value
:
params
.
row
.
status
+
""
}
})
})
;
// let statuse = params.row.status
// let text = statuse == 1 ? '待送审' : (statuse==2? '审核中':(statuse==3? '通过':(statuse==4? '驳回':(statuse==5? '终止':''))))
// return h('span',{},text)
}
},{
title
:
'材料牌号'
,
key
:
'material'
,
align
:
'center'
,
width
:
'110'
},{
title
:
'数量'
,
key
:
'quantity'
,
align
:
'center'
,
width
:
'110'
},{
title
:
'代号'
,
key
:
'code'
,
align
:
'center'
,
width
:
'110'
},{
title
:
'操作'
,
key
:
'id'
,
align
:
'center'
,
width
:
'230'
,
},
{
title
:
"材料牌号"
,
key
:
"material"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
"数量"
,
key
:
"quantity"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
"代号"
,
key
:
"code"
,
align
:
"center"
,
width
:
"110"
},
{
title
:
"操作"
,
key
:
"id"
,
align
:
"center"
,
width
:
"230"
,
render
:
(
h
,
params
)
=>
{
let
actions
=
[]
let
actions
=
[]
;
if
(
params
.
row
.
status
==
3
)
{
actions
.
push
(
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow1
(
params
)
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow1
(
params
);
}
}
}
},
'预览'
)
,
)
}
if
(
params
.
row
.
status
==
1
||
params
.
row
.
status
==
4
)
{
}
,
"预览"
)
)
;
}
if
(
params
.
row
.
status
==
1
||
params
.
row
.
status
==
4
)
{
actions
.
push
(
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow
(
params
)
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
{
// e.stopPropagation()
this
.
editRow
(
params
);
}
}
}
},
'编辑'
)
)
}
,
"编辑"
)
)
;
}
return
h
(
'div'
,
{
class
:
'action'
},
actions
)
return
h
(
"div"
,
{
class
:
"action"
},
actions
);
}
}
],
data2
:
[],
data3
:
[],
userlist
:
[]
}
}
;
},
created
()
{
this
.
tbHeight
=
window
.
innerHeight
-
305
this
.
tbHeight
=
window
.
innerHeight
-
305
;
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
// 分页
pageChange
(
num
)
{
//console.log(num);
this
.
page
=
num
this
.
loadchangelist
()
this
.
page
=
num
;
this
.
loadchangelist
()
;
},
pageSizeChange
(
limit
)
{
//console.log(limit)
this
.
pageSize
=
limit
this
.
loadchangelist
()
this
.
pageSize
=
limit
;
this
.
loadchangelist
()
;
},
//查询
searchData
()
{
this
.
page
=
1
this
.
pageSize
=
10
this
.
loadchangelist
()
this
.
page
=
1
;
this
.
pageSize
=
10
;
this
.
loadchangelist
()
;
},
loadchangelist
()
{
let
url
=
`
${
designUrl
}
/unqualifiedorder/getpaged`
let
url
=
`
${
designUrl
}
/unqualifiedorder/getpaged`
;
service
.
get
(
`
${
url
}
`
,
{
params
:
{
...
...
@@ -373,225 +433,223 @@ export default {
pageSize
:
this
.
pageSize
}
})
.
then
(
(
res
)
=>
{
this
.
data2
=
res
.
data
.
result
.
items
this
.
total
=
res
.
data
.
result
.
totalCount
})
.
then
(
res
=>
{
this
.
data2
=
res
.
data
.
result
.
items
;
this
.
total
=
res
.
data
.
result
.
totalCount
;
})
;
},
handleChange1
(
date
)
{
this
.
formdata
.
inspection_date
=
date
this
.
formdata
.
inspection_date
=
date
;
},
//新增不合格审理单
addData
()
{
this
.
title
=
'不合格审理单'
this
.
show
=
true
this
.
title
=
"不合格审理单"
;
this
.
show
=
true
;
// this.submitShow = true
this
.
flag
=
0
this
.
flag
=
0
;
this
.
formdata
.
unqualified_order_code
=
''
this
.
formdata
.
customer_name
=
''
this
.
formdata
.
outsourcing_name
=
''
this
.
formdata
.
unqualified_order_code
=
""
;
this
.
formdata
.
customer_name
=
""
;
this
.
formdata
.
outsourcing_name
=
""
;
if
(
this
.
formdata
.
dispatch_id
==
0
)
{
this
.
formdata
.
product_name
=
''
this
.
formdata
.
product_name
=
""
;
}
this
.
formdata
.
material
=
''
this
.
formdata
.
quantity
=
0
this
.
formdata
.
code
=
''
this
.
formdata
.
problem_desc
=
''
this
.
formdata
.
inspection_person
=
0
this
.
formdata
.
inspection_person_name
=
''
this
.
formdata
.
inspection_date
=
''
this
.
formdata
.
department_id
=
''
//部门ID
this
.
formdata
.
department_name
=
''
//部门名称departmentTitle
this
.
formdata
.
status
=
1
this
.
formdata
.
note
=
''
var
userId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfo'
)).
userId
this
.
formdata
.
material
=
""
;
this
.
formdata
.
quantity
=
0
;
this
.
formdata
.
code
=
""
;
this
.
formdata
.
problem_desc
=
""
;
this
.
formdata
.
inspection_person
=
0
;
this
.
formdata
.
inspection_person_name
=
""
;
this
.
formdata
.
inspection_date
=
""
;
this
.
formdata
.
department_id
=
""
;
//部门ID
this
.
formdata
.
department_name
=
""
;
//部门名称departmentTitle
this
.
formdata
.
status
=
1
;
this
.
formdata
.
note
=
""
;
var
userId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"userInfo"
)).
userId
;
let
parma
=
{
Id
:
userId
}
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
(
(
res
)
=>
{
}
;
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
(
res
=>
{
// console.log(res)
if
(
res
.
result
)
{
this
.
formdata
.
department_name
=
res
.
result
.
departmentTitle
;
this
.
formdata
.
inspection_person_name
=
res
.
result
.
userName
;
this
.
formdata
.
department_name
=
res
.
result
.
departmentTitle
;
this
.
formdata
.
inspection_person_name
=
res
.
result
.
userName
;
}
})
})
;
var
url1
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=BHGSLD`
service
.
get
(
`
${
url1
}
`
).
then
(
(
response
)
=>
{
this
.
formdata
.
unqualified_order_code
=
response
.
data
.
result
})
var
url1
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=BHGSLD`
;
service
.
get
(
`
${
url1
}
`
).
then
(
response
=>
{
this
.
formdata
.
unqualified_order_code
=
response
.
data
.
result
;
})
;
},
// 添加/编辑 弹框的保存
saveOk
()
{
var
url
=
`
${
designUrl
}
/unqualifiedorder/createorupdate`
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
unqualifiedOrder
:
this
.
formdata
}))
.
then
((
res
)
=>
{
console
.
log
(
res
)
var
url
=
`
${
designUrl
}
/unqualifiedorder/createorupdate`
;
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
unqualifiedOrder
:
this
.
formdata
}))
.
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
success
)
{
let
itemId
=
res
.
data
.
result
.
id
let
itemId
=
res
.
data
.
result
.
id
;
this
.
dataListRetrunNew
.
idList
.
push
(
itemId
);
this
.
loadchangelist
()
this
.
$Message
.
success
(
'保存成功'
)
this
.
show
=
false
this
.
loadchangelist
()
;
this
.
$Message
.
success
(
"保存成功"
);
this
.
show
=
false
;
}
})
})
;
// 如果选择送审,则打开送审页面
if
(
this
.
checked
==
true
)
{
this
.
$refs
.
orderSendReview
.
intData
(
this
.
formdata
)
this
.
show
=
false
this
.
modalInfo
=
true
this
.
$refs
.
orderSendReview
.
intData
(
this
.
formdata
)
;
this
.
show
=
false
;
this
.
modalInfo
=
true
;
// return //暂时先屏蔽保存
}
},
upSave
()
{
let
operatorIdList
=
this
.
$refs
.
orderSendReview
.
returnDataList
()
let
itemCode
=
this
.
formdata
.
unqualified_order_code
this
.
dataListRetrunNew
.
code
=
itemCode
this
.
dataListRetrunNew
.
operatorIdList
=
operatorIdList
this
.
$http
.
order
.
batchOrderStart
(
this
.
dataListRetrunNew
)
let
operatorIdList
=
this
.
$refs
.
orderSendReview
.
returnDataList
();
let
itemCode
=
this
.
formdata
.
unqualified_order_code
;
this
.
dataListRetrunNew
.
code
=
itemCode
;
this
.
dataListRetrunNew
.
operatorIdList
=
operatorIdList
;
this
.
$http
.
order
.
batchOrderStart
(
this
.
dataListRetrunNew
)
.
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
loadchangelist
()
this
.
$Message
.
info
(
"送审成功!"
)
this
.
dataListRetrunNew
.
idList
=
[]
if
(
response
.
success
)
{
this
.
loadchangelist
()
;
this
.
$Message
.
info
(
"送审成功!"
)
;
this
.
dataListRetrunNew
.
idList
=
[]
;
}
else
{
this
.
$Message
.
error
(
'送审失败!'
)
this
.
$Message
.
error
(
"送审失败!"
);
}
this
.
modalInfo
=
false
})
this
.
modalInfo
=
false
;
})
;
},
//多选处理--表格选择项变化方法
canCelFn
(){
modalInfo
=
false
this
.
dataListRetrunNew
.
idList
=
[]
canCelFn
()
{
modalInfo
=
false
;
this
.
dataListRetrunNew
.
idList
=
[]
;
},
changeOption
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
;
},
selectDepart
()
{
this
.
showDeptTree
=
true
this
.
showDeptTree
=
true
;
},
editRow
(
params
)
{
// this.submitShow = false
this
.
title
=
'不合格审理单'
this
.
flag
=
1
var
url2
=
`
${
designUrl
}
/unqualifiedorder/getbyid`
this
.
title
=
"不合格审理单"
;
this
.
flag
=
1
;
var
url2
=
`
${
designUrl
}
/unqualifiedorder/getbyid`
;
service
.
get
(
`
${
url2
}
`
,
{
params
:
{
Id
:
params
.
row
.
id
}
})
.
then
(
(
response
)
=>
{
this
.
formdata
=
response
.
data
.
result
})
this
.
show
=
true
.
then
(
response
=>
{
this
.
formdata
=
response
.
data
.
result
;
})
;
this
.
show
=
true
;
},
editRow1
(
params
)
{
this
.
$refs
.
trialOrder
.
formdata
=
[];
this
.
$refs
.
trialOrder
.
formcontextdata
=
[];
this
.
$refs
.
trialOrder
.
formcontextclosedata
=
[];
this
.
$refs
.
trialOrder
.
gyauditedTime
=
''
;
this
.
$refs
.
trialOrder
.
jyauditedTime
=
''
;
this
.
$refs
.
trialOrder
.
hqauditedTime
=
''
;
this
.
$refs
.
trialOrder
.
name1
=
''
;
this
.
$refs
.
trialOrder
.
name2
=
''
;
this
.
$refs
.
trialOrder
.
name3
=
''
;
this
.
flag
=
1
;
var
url2
=
`
${
designUrl
}
/unqualifiedorder/getbyid`
editRow1
(
params
)
{
this
.
$refs
.
trialOrder
.
formdata
=
[];
this
.
$refs
.
trialOrder
.
formcontextdata
=
[];
this
.
$refs
.
trialOrder
.
formcontextclosedata
=
[];
this
.
$refs
.
trialOrder
.
gyauditedTime
=
""
;
this
.
$refs
.
trialOrder
.
jyauditedTime
=
""
;
this
.
$refs
.
trialOrder
.
hqauditedTime
=
""
;
this
.
$refs
.
trialOrder
.
name1
=
""
;
this
.
$refs
.
trialOrder
.
name2
=
""
;
this
.
$refs
.
trialOrder
.
name3
=
""
;
this
.
flag
=
1
;
var
url2
=
`
${
designUrl
}
/unqualifiedorder/getbyid`
;
service
.
get
(
`
${
url2
}
`
,
{
params
:
{
Id
:
params
.
row
.
id
}
})
.
then
(
(
response
)
=>
{
this
.
$refs
.
trialOrder
.
formdata
=
response
.
data
.
result
})
var
url3
=
`
${
workflowUrl
}
/instance/getdetailbycode`
.
then
(
response
=>
{
this
.
$refs
.
trialOrder
.
formdata
=
response
.
data
.
result
;
})
;
var
url3
=
`
${
workflowUrl
}
/instance/getdetailbycode`
;
service
.
get
(
`
${
url3
}
`
,
{
params
:
{
code
:
params
.
row
.
unqualified_order_code
}
})
.
then
((
response
)
=>
{
console
.
log
(
response
)
for
(
var
i
=
0
;
i
<
response
.
data
.
result
.
nodes
.
length
;
i
++
)
{
var
id
=
response
.
data
.
result
.
nodes
[
i
].
id
var
status
=
response
.
data
.
result
.
nodes
[
i
].
status
if
(
id
==
157
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
this
.
$refs
.
trialOrder
.
formcontextdata
=
JSON
.
parse
(
context
);
this
.
$refs
.
trialOrder
.
gyauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
]
console
.
log
(
nameid
)
var
url5
=
`
${
systemUrl
}
/user/getuser`
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
((
response
)
=>
{
var
name
=
response
.
data
.
result
.
name
console
.
log
(
nameid
)
this
.
$refs
.
trialOrder
.
name3
=
name
})
}
if
(
id
==
158
&&
status
==
2
)
{
this
.
$refs
.
trialOrder
.
hqauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
]
var
url5
=
`
${
systemUrl
}
/user/getuser`
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
((
response
)
=>
{
var
name
=
response
.
data
.
result
.
name
//console.log(name)
this
.
$refs
.
trialOrder
.
name2
=
name
})
}
if
(
id
==
159
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
this
.
$refs
.
trialOrder
.
formcontextclosedata
=
JSON
.
parse
(
context
);
this
.
$refs
.
trialOrder
.
jyauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
]
var
url5
=
`
${
systemUrl
}
/user/getuser`
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
((
response
)
=>
{
var
name
=
response
.
data
.
result
.
name
//console.log(name)
this
.
$refs
.
trialOrder
.
name1
=
name
})
}
.
then
(
response
=>
{
console
.
log
(
response
);
for
(
var
i
=
0
;
i
<
response
.
data
.
result
.
nodes
.
length
;
i
++
)
{
var
id
=
response
.
data
.
result
.
nodes
[
i
].
id
;
var
status
=
response
.
data
.
result
.
nodes
[
i
].
status
;
if
(
id
==
157
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
;
this
.
$refs
.
trialOrder
.
formcontextdata
=
JSON
.
parse
(
context
);
this
.
$refs
.
trialOrder
.
gyauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
;
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
];
console
.
log
(
nameid
);
var
url5
=
`
${
systemUrl
}
/user/getuser`
;
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
(
response
=>
{
var
name
=
response
.
data
.
result
.
name
;
console
.
log
(
nameid
);
this
.
$refs
.
trialOrder
.
name3
=
name
;
});
}
if
(
id
==
158
&&
status
==
2
)
{
this
.
$refs
.
trialOrder
.
hqauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
;
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
];
var
url5
=
`
${
systemUrl
}
/user/getuser`
;
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
(
response
=>
{
var
name
=
response
.
data
.
result
.
name
;
//console.log(name)
this
.
$refs
.
trialOrder
.
name2
=
name
;
});
}
if
(
id
==
159
&&
status
==
2
)
{
var
context
=
response
.
data
.
result
.
nodes
[
i
].
contextData
;
this
.
$refs
.
trialOrder
.
formcontextclosedata
=
JSON
.
parse
(
context
);
this
.
$refs
.
trialOrder
.
jyauditedTime
=
response
.
data
.
result
.
nodes
[
i
].
auditedTime
;
var
nameid
=
response
.
data
.
result
.
nodes
[
i
].
defaultUsers
.
immutable
[
0
];
var
url5
=
`
${
systemUrl
}
/user/getuser`
;
service
.
get
(
`
${
url5
}
`
,
{
params
:
{
id
:
nameid
}
})
.
then
(
response
=>
{
var
name
=
response
.
data
.
result
.
name
;
//console.log(name)
this
.
$refs
.
trialOrder
.
name1
=
name
;
});
}
}
//this.$refs.trialOrder.formdata = response.data.result
})
this
.
$refs
.
trialOrder
.
modelChange1
=
true
}
,
})
;
this
.
$refs
.
trialOrder
.
modelChange1
=
true
;
}
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tbHeight
=
window
.
screenHeight
-
175
})()
}
window
.
screenHeight
=
window
.
innerHeight
;
this
.
tbHeight
=
window
.
screenHeight
-
175
;
})()
;
}
;
}
}
}
;
</
script
>
<
style
scoped
>
/
deep
/
.vertical-center-modal
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
/
deep
/
.vertical-center-modal
.ivu-modal
{
top
:
0
;
}
/
deep
/
.fontcolor
{
color
:
#249e91
;
margin
:
0
6px
;
}
.fr
{
float
:
right
;
}
.ml10
{
margin-left
:
10px
;
}
.mt10
{
margin-top
:
10px
;
<
style
lang=
"less"
>
.unq {
.vertical-center-modal {
display: flex;
align-items: center;
justify-content: center;
}
.vertical-center-modal .ivu-modal {
top: 0;
}
.fontcolor {
color: #249e91;
margin: 0 6px;
}
}
</
style
>
pages/resourceManagement/deviceType/index.vue
View file @
ef14324c
<
template
>
<div
class=
"
"
>
<div
class=
"contentRight"
>
<div
class=
"form_title"
>
<Input
v-model=
"value1"
placeholder=
"请输入设备类型名称"
clearable
style=
"width: 240px"
/>
<Button
type=
"primary"
class=
""
@
click=
"searchData"
>
查询
</Button>
<div
class=
"paddingbtn fr"
>
<Button
type=
"primary"
@
click=
"addData"
>
新增设备类型
</Button>
</div>
</div>
<div
class=
"content_box mt10"
>
<Table
<div
class=
"ctb
"
>
<div
class=
"contentRight"
>
<div
class=
"form_title"
>
<Input
v-model=
"value1"
placeholder=
"请输入设备类型名称"
clearable
style=
"width: 240px"
/>
<Button
type=
"primary"
class
@
click=
"searchData"
>
查询
</Button>
<div
class=
"paddingbtn fr"
>
<Button
type=
"primary"
@
click=
"addData"
>
新增设备类型
</Button>
</div>
</div>
<div
class=
"content_box mt10"
>
<Table
ref=
"table"
:columns=
"columns"
:data=
"data1"
...
...
@@ -18,316 +18,324 @@
border
class=
"tableCommon"
></Table>
</div>
</div>
<!-- 新增和编辑 /api/services/app/storeroomlocation/createorupdate -->
<Modal
v-model=
"show"
:title=
"title"
:width=
"500"
:mask-closable=
"false"
ok-text=
"保存"
@
on-ok=
"saveOk"
cancel-text=
"取消"
>
<Form
:model=
"formItem"
:label-width=
"150"
:rules=
"ruleValidate"
>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"设备类型编号"
prop=
'equip_type_id'
>
<Input
v-model=
"formItem.equip_type_id"
placeholder=
"输入设备类型编号"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"设备类型名称"
>
<Input
v-model=
"formItem.equip_type_name"
placeholder=
"输入设备类型名称"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"备注"
>
<Input
v-model=
"formItem.notes"
placeholder=
"输入备注"
></Input>
</FormItem>
</Col>
</Row>
</Form>
</Modal>
<Department
:show
.
sync=
"showDeptTree"
:value
.
sync=
"formItem.depart_Id"
:text
.
sync=
"formItem.department"
:isAdd=
"false"
/>
</div>
</div>
<!-- 新增和编辑 /api/services/app/storeroomlocation/createorupdate -->
<Modal
v-model=
"show"
:title=
"title"
:width=
"500"
:mask-closable=
"false"
ok-text=
"保存"
@
on-ok=
"saveOk"
cancel-text=
"取消"
>
<Form
:model=
"formItem"
:label-width=
"150"
:rules=
"ruleValidate"
>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"设备类型编号"
prop=
"equip_type_id"
>
<Input
v-model=
"formItem.equip_type_id"
placeholder=
"输入设备类型编号"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"设备类型名称"
>
<Input
v-model=
"formItem.equip_type_name"
placeholder=
"输入设备类型名称"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"备注"
>
<Input
v-model=
"formItem.notes"
placeholder=
"输入备注"
></Input>
</FormItem>
</Col>
</Row>
</Form>
</Modal>
<Department
:show
.
sync=
"showDeptTree"
:value
.
sync=
"formItem.depart_Id"
:text
.
sync=
"formItem.department"
:isAdd=
"false"
/>
</div>
</
template
>
<
script
>
import
treeGrid
from
'./components/treeGrid'
import
service
from
'@/plugins/request'
import
Department
from
'@/components/modalTree/department.vue'
import
treeGrid
from
"./components/treeGrid"
;
import
service
from
"@/plugins/request"
;
import
Department
from
"@/components/modalTree/department.vue"
;
export
default
{
components
:
{
treeGrid
,
Department
,
},
data
()
{
return
{
data1
:
[],
value1
:
""
,
editId
:
''
,
up_id
:
''
,
treeData
:[],
//下拉表格树数据
title
:
"新增设备类型"
,
show
:
false
,
// show2: false,
upweb
:
false
,
selectModel
:
true
,
selectModel02
:
false
,
isedit0
:
false
,
showDeptTree
:
false
,
tbHeight
:
''
,
seleId
:
0
,
cityList
:[],
isShow
:
true
,
seldata
:
[],
//父权限菜单树
parent_name
:
''
,
//父权限名
ruleValidate
:
{
equip_type_id
:
[
{
required
:
true
,
message
:
'设备类型编号不能为空!'
,
trigger
:
'blur'
}
]
},
formItem
:{
equip_type_id
:
''
,
//设备类型编号
equip_type_name
:
''
,
//设备类型名称
notes
:
''
,
//备注
},
sysdata
:
[
components
:
{
treeGrid
,
Department
},
data
()
{
return
{
data1
:
[],
value1
:
""
,
editId
:
""
,
up_id
:
""
,
treeData
:
[],
//下拉表格树数据
title
:
"新增设备类型"
,
show
:
false
,
// show2: false,
upweb
:
false
,
selectModel
:
true
,
selectModel02
:
false
,
isedit0
:
false
,
showDeptTree
:
false
,
tbHeight
:
""
,
seleId
:
0
,
cityList
:
[],
isShow
:
true
,
seldata
:
[],
//父权限菜单树
parent_name
:
""
,
//父权限名
ruleValidate
:
{
equip_type_id
:
[
{
required
:
true
,
message
:
"设备类型编号不能为空!"
,
trigger
:
"blur"
}
]
},
formItem
:
{
equip_type_id
:
""
,
//设备类型编号
equip_type_name
:
""
,
//设备类型名称
notes
:
""
//备注
},
sysdata
:
[
{
value
:
"1"
,
label
:
"粉末"
},
{
value
:
"2"
,
label
:
"基板"
},
{
value
:
"3"
,
label
:
"刮刀"
}
],
columns
:
[
{
title
:
"设备类型编号"
,
key
:
"equip_type_id"
},
{
title
:
"设备类型名称"
,
key
:
"equip_type_name"
,
align
:
"left"
},
{
title
:
"备注"
,
key
:
"notes"
,
align
:
"left"
},
{
title
:
"操作"
,
key
:
"action"
,
align
:
"center"
,
width
:
400
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
value
:
'1'
,
label
:
'粉末'
},{
value
:
'2'
,
label
:
'基板'
},{
value
:
'3'
,
label
:
'刮刀'
}
],
columns
:
[
attrs
:
{
oprate
:
"detail"
,
class
:
"edit"
},
on
:
{
click
:
()
=>
{
this
.
edit
(
params
);
}
}
},
"编辑"
),
h
(
"op"
,
{
title
:
'设备类型编号'
,
key
:
'equip_type_id'
,
},{
title
:
'设备类型名称'
,
key
:
'equip_type_name'
,
align
:
"left"
,
},{
title
:
'备注'
,
key
:
'notes'
,
align
:
"left"
,
},
{
title
:
'操作'
,
key
:
'action'
,
align
:
'center'
,
width
:
400
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,{
class
:
'action'
},
[
h
(
'op'
,
{
attrs
:{
oprate
:
'detail'
,
class
:
'edit'
}
,
on
:
{
click
:
()
=>
{
this
.
edit
(
params
)
}
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:{
oprate
:
'delete'
},
style
:
{
color
:
'red'
,
},
on
:
{
click
:
()
=>
{
this
.
del
(
params
)
}
}
},
'删除'
)
])
}
},
],
attrs
:
{
oprate
:
"delete"
},
style
:
{
color
:
"red"
},
on
:
{
click
:
()
=>
{
this
.
del
(
params
);
}
}
},
"删除"
)
]);
}
}
]
};
},
created
()
{
this
.
laodaction
();
this
.
tbHeight
=
window
.
innerHeight
-
175
;
},
methods
:
{
//查询
searchData
()
{
var
name
=
this
.
value1
;
this
.
laodaction
(
name
);
},
created
(){
this
.
laodaction
();
this
.
tbHeight
=
window
.
innerHeight
-
175
laodaction
(
name
)
{
let
url
=
`
${
systemUrl
}
/equiptype/getpaged`
;
service
.
get
(
`
${
url
}
`
,
{
params
:
{
equip_type_name
:
name
}
}).
then
(
res
=>
{
// console.log(res)
this
.
data1
=
res
.
data
.
result
.
items
;
});
},
methods
:{
//查询
searchData
(){
var
name
=
this
.
value1
;
this
.
laodaction
(
name
)
},
laodaction
(
name
){
let
url
=
`
${
systemUrl
}
/equiptype/getpaged`
;
service
.
get
(
`
${
url
}
`
,
{
params
:{
equip_type_name
:
name
}}).
then
(
res
=>
{
// console.log(res)
this
.
data1
=
res
.
data
.
result
.
items
});
},
//新增库位
addData
(){
this
.
title
=
'新增设备类型'
;
this
.
show
=
true
;
this
.
upweb
=
false
;
this
.
selectModel
=
false
;
this
.
selectModel02
=
true
;
this
.
editId
=
''
;
this
.
formItem
=
{
equip_type_id
:
''
,
//设备类型编号
equip_type_name
:
''
,
//设备类型名称
notes
:
''
,
//备注
};
},
// 添加/编辑 弹框的保存
saveOk
(){
if
(
!
this
.
formItem
.
equip_type_id
)
{
this
.
$Message
.
error
(
'设备类型编号不能为空!'
)
return
}
let
saveId
=
this
.
editId
,
url
=
`
${
systemUrl
}
/equiptype/createorupdate`
;
if
(
!
saveId
){
saveId
==
""
}
if
(
this
.
title
==
'编辑设备类型'
){
// if(this.formItem.selectName){
var
ar1
=
this
.
data1
.
find
((
val
)
=>
{
if
(
val
.
id
!=
saveId
)
return
val
.
equip_type_id
==
this
.
formItem
.
equip_type_id
})
if
(
ar1
)
{
this
.
$Message
.
error
(
'设备类型编号已存在!'
);
return
}
let
paramsdata
=
{
"id"
:
saveId
,
"equip_type_id"
:
this
.
formItem
.
equip_type_id
,
"equip_type_name"
:
this
.
formItem
.
equip_type_name
,
"notes"
:
this
.
formItem
.
notes
,
};
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
equipType
:
paramsdata
})).
then
(
res
=>
{
if
(
res
.
data
.
success
)
{
this
.
laodaction
();
this
.
$Message
.
success
(
'编辑成功'
)
}
});
// }
//新增库位
addData
()
{
this
.
title
=
"新增设备类型"
;
this
.
show
=
true
;
this
.
upweb
=
false
;
this
.
selectModel
=
false
;
this
.
selectModel02
=
true
;
this
.
editId
=
""
;
this
.
formItem
=
{
equip_type_id
:
""
,
//设备类型编号
equip_type_name
:
""
,
//设备类型名称
notes
:
""
//备注
};
},
// 添加/编辑 弹框的保存
saveOk
()
{
if
(
!
this
.
formItem
.
equip_type_id
)
{
this
.
$Message
.
error
(
"设备类型编号不能为空!"
);
return
;
}
let
saveId
=
this
.
editId
,
url
=
`
${
systemUrl
}
/equiptype/createorupdate`
;
if
(
!
saveId
)
{
saveId
==
""
;
}
if
(
this
.
title
==
"编辑设备类型"
)
{
// if(this.formItem.selectName){
var
ar1
=
this
.
data1
.
find
(
val
=>
{
if
(
val
.
id
!=
saveId
)
return
val
.
equip_type_id
==
this
.
formItem
.
equip_type_id
;
});
if
(
ar1
)
{
this
.
$Message
.
error
(
"设备类型编号已存在!"
);
return
;
}
let
paramsdata
=
{
id
:
saveId
,
equip_type_id
:
this
.
formItem
.
equip_type_id
,
equip_type_name
:
this
.
formItem
.
equip_type_name
,
notes
:
this
.
formItem
.
notes
};
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
equipType
:
paramsdata
}))
.
then
(
res
=>
{
if
(
res
.
data
.
success
)
{
this
.
laodaction
();
this
.
$Message
.
success
(
"编辑成功"
);
}
if
(
this
.
title
==
'新增设备类型'
){
// console.log('第一个:' + saveId + '第二个:' + this.formItem.selectName)
var
ar
=
this
.
data1
.
find
((
val
)
=>
{
return
val
.
equip_type_id
==
this
.
formItem
.
equip_type_id
})
if
(
ar
)
{
this
.
$Message
.
error
(
'设备类型编号已存在!'
);
return
}
let
paramsdata
=
{
"id"
:
saveId
,
"equip_type_id"
:
this
.
formItem
.
equip_type_id
,
"equip_type_name"
:
this
.
formItem
.
equip_type_name
,
"notes"
:
this
.
formItem
.
notes
,
};
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
equipType
:
paramsdata
})).
then
(
res
=>
{
if
(
res
.
data
.
success
)
{
this
.
laodaction
();
this
.
$Message
.
success
(
'新增成功'
)
}
});
});
// }
}
if
(
this
.
title
==
"新增设备类型"
)
{
// console.log('第一个:' + saveId + '第二个:' + this.formItem.selectName)
var
ar
=
this
.
data1
.
find
(
val
=>
{
return
val
.
equip_type_id
==
this
.
formItem
.
equip_type_id
;
});
if
(
ar
)
{
this
.
$Message
.
error
(
"设备类型编号已存在!"
);
return
;
}
let
paramsdata
=
{
id
:
saveId
,
equip_type_id
:
this
.
formItem
.
equip_type_id
,
equip_type_name
:
this
.
formItem
.
equip_type_name
,
notes
:
this
.
formItem
.
notes
};
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
equipType
:
paramsdata
}))
.
then
(
res
=>
{
if
(
res
.
data
.
success
)
{
this
.
laodaction
();
this
.
$Message
.
success
(
"新增成功"
);
}
else
{
return
}
},
changeOption
(
data
){
console
.
log
(
data
)
},
selectDepart
()
{
this
.
showDeptTree
=
true
},
edit
(
data
){
this
.
title
=
'编辑设备类型'
;
//console.log(data)
this
.
isedit0
=
true
;
this
.
show
=
true
;
this
.
upweb
=
true
;
this
.
formItem
=
{
equip_type_id
:
data
.
row
.
equip_type_id
,
//设备类型编号
equip_type_name
:
data
.
row
.
equip_type_name
,
//设备类型名称
notes
:
data
.
row
.
notes
,
//备注
};
this
.
editId
=
data
.
row
.
id
;
});
}
else
{
return
;
}
},
changeOption
(
data
)
{
console
.
log
(
data
);
},
del
(
data
){
this
.
seleId
=
data
.
row
.
id
;
let
url
=
`
${
systemUrl
}
/equiptype/delete`
,
uId
=
this
.
seleId
;
service
.
delete
(
`
${
systemUrl
}
/equiptype/delete?id=
${
uId
}
`
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
result
==
1
)
{
this
.
laodaction
();
this
.
$Message
.
success
(
'删除成功'
)
}
else
{
this
.
$Message
.
error
(
'该类型有设备使用,不可删除。'
)
}
});
},
selectDepart
()
{
this
.
showDeptTree
=
true
;
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
tbHeight
=
window
.
screenHeight
-
175
})()
edit
(
data
)
{
this
.
title
=
"编辑设备类型"
;
//console.log(data)
this
.
isedit0
=
true
;
this
.
show
=
true
;
this
.
upweb
=
true
;
this
.
formItem
=
{
equip_type_id
:
data
.
row
.
equip_type_id
,
//设备类型编号
equip_type_name
:
data
.
row
.
equip_type_name
,
//设备类型名称
notes
:
data
.
row
.
notes
//备注
};
this
.
editId
=
data
.
row
.
id
;
},
del
(
data
)
{
this
.
seleId
=
data
.
row
.
id
;
let
url
=
`
${
systemUrl
}
/equiptype/delete`
,
uId
=
this
.
seleId
;
service
.
delete
(
`
${
systemUrl
}
/equiptype/delete?id=
${
uId
}
`
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
result
==
1
)
{
this
.
laodaction
();
this
.
$Message
.
success
(
"删除成功"
);
}
else
{
this
.
$Message
.
error
(
"该类型有设备使用,不可删除。"
);
}
});
}
}
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
tbHeight
=
window
.
screenHeight
-
175
;
})();
};
}
};
</
script
>
<
style
scoped
>
/
deep
/
.vertical-center-modal
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
/
deep
/
.vertical-center-modal
.ivu-modal
{
top
:
0
;
}
/
deep
/
.fontcolor
{
color
:
#249e91
;
margin
:
0
6px
}
.fr
{
float
:
right
;
}
.ml10
{
margin-left
:
10px
;
}
.mt10
{
margin-top
:
10px
;
}
<
style
lang=
"less"
>
.ctb {
.vertical-center-modal {
display: flex;
align-items: center;
justify-content: center;
}
.vertical-center-modal .ivu-modal {
top: 0;
}
.fontcolor {
color: #249e91;
margin: 0 6px;
}
}
</
style
>
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