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
24792d89
Commit
24792d89
authored
Apr 01, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质量检验
parent
6e020789
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
475 additions
and
393 deletions
+475
-393
index.vue
pages/processDesign/productTree/index.vue
+458
-393
index.vue
pages/qc/taskList/index.vue
+17
-0
No files found.
pages/processDesign/productTree/index.vue
View file @
24792d89
<
template
id=
"producttree"
>
<div>
<div
class=
"contentRight"
:style=
"
{height:divHeihgt}">
<div
class=
"clear"
>
<Row><Col
span=
"8"
>
<Input
search
enter-button
placeholder=
"产品名称"
v-model=
"productName"
@
on-search=
"search"
style=
"width:290px;"
/></Col><Col
span=
"16"
>
<div
style=
"float:right"
class=
"paddingbtn"
>
<Button
type=
"primary"
@
click=
"add"
>
新增产品
</Button>
<Button
type=
"primary"
@
click=
"addclass"
>
层级类型
</Button>
<!--
<Button
type=
"primary"
@
click=
"del"
>
阶段
</Button>
-->
<div
class=
"contentRight"
:style=
"
{height:divHeihgt}">
<div
class=
"clear"
>
<Row>
<Col
span=
"8"
>
<Input
search
enter-button
placeholder=
"产品名称"
v-model=
"productName"
@
on-search=
"search"
style=
"width:290px;"
/>
</Col>
<Col
span=
"16"
>
<div
style=
"float:right"
class=
"paddingbtn"
>
<Button
type=
"primary"
@
click=
"add"
>
新增产品
</Button>
<Button
type=
"primary"
@
click=
"addclass"
>
层级类型
</Button>
<!--
<Button
type=
"primary"
@
click=
"del"
>
阶段
</Button>
-->
</div>
</Col>
</Row>
</div>
<div
class
>
<tree-grid
:items=
"data"
:columns=
"columns"
@
on-row-click=
"rowClick"
></tree-grid>
</div>
</Col></Row>
</div>
<div
class=
""
>
<tree-grid
:items=
"data"
:columns=
"columns"
@
on-row-click=
"rowClick"
></tree-grid>
</div>
</div>
<Modal
v-model=
"modal0"
title=
"添加/编辑产品"
:width=
"800"
:mask-closable=
"false"
:loading=
"myloading"
ok-text=
"保存"
cancel-text=
"取消"
@
on-ok=
"ok0('ProcuctformValidate')"
@
on-cancel=
'cancel0'
>
<Modal
v-model=
"modal0"
title=
"添加/编辑产品"
:width=
"800"
:mask-closable=
"false"
:loading=
"myloading"
ok-text=
"保存"
cancel-text=
"取消"
@
on-ok=
"ok0('ProcuctformValidate')"
@
on-cancel=
"cancel0"
>
<add-product
ref=
"addproduct"
></add-product>
<!--
<div
slot=
"footer"
style=
"text-align:center"
>
<Button
type=
"primary"
@
click=
"ok0('ProcuctformValidate')"
>
保存
</Button>
...
...
@@ -24,22 +45,30 @@
style=
"border-color: rgb(204, 204, 204);background-color:white;color:black"
@
click=
"cancel0"
>
取消
</Button>
</div>
-->
</div>
-->
</Modal>
<Modal
v-model=
"modal1"
title=
"层级类型"
:width=
"800"
:mask-closable=
"false"
>
<div
@
click=
"cancelClick"
>
<div
class=
"clear"
>
<Button
type=
"primary"
@
click=
"addchild"
style=
"float:right"
>
新增
</Button>
<Button
type=
"primary"
@
click=
"addchild"
style=
"float:right"
>
新增
</Button>
</div>
<div
class=
"martop10"
>
<!--
<tb
:tbPro=
"tbPro"
></tb>
-->
<tree-grid
:items=
"leveldata"
:columns=
"levelcolumns"
@
on-row-click=
"levelrowClick"
></tree-grid>
</div>
</div>
</Modal>
<Modal
v-model=
"modal2"
title=
"新增层级类型"
:width=
"440"
:mask-closable=
"false"
:loading=
"myloading"
ok-text=
"保存"
cancel-text=
"取消"
@
on-ok=
"ok('formValidate')"
@
on-cancel=
'cancel'
>
<Modal
v-model=
"modal2"
title=
"新增层级类型"
:width=
"440"
:mask-closable=
"false"
:loading=
"myloading"
ok-text=
"保存"
cancel-text=
"取消"
@
on-ok=
"ok('formValidate')"
@
on-cancel=
"cancel"
>
<add
ref=
"addclass"
></add>
<!--
<div
slot=
"footer"
style=
"text-align:center"
>
<Button
type=
"primary"
@
click=
"ok('formValidate')"
>
保存
</Button>
...
...
@@ -48,47 +77,49 @@
style=
"border-color: rgb(204, 204, 204);background-color:white;color:black"
@
click=
"cancel"
>
取消
</Button>
</div>
-->
</div>
-->
</Modal>
<myconfirm
ref=
"mysel0"
v-on:confirmok=
"myselok"
v-on:confirmcancel=
"myselcancel"
></myconfirm>
<myconfirm
ref=
"mysel"
v-on:confirmok=
"ok3"
v-on:confirmcancel=
"cancel3"
></myconfirm>
<myconfirm
ref=
"mysel1"
v-on:confirmok=
"copyok"
v-on:confirmcancel=
"copycancel"
>
<div
slot=
"confimcon"
><p>
确认要复制此节点及其子节点吗?
</p></div>
<div
slot=
"confimcon"
>
<p>
确认要复制此节点及其子节点吗?
</p>
</div>
</myconfirm>
</div>
</
template
>
<
script
>
import
treeGrid
from
'@/components/treeGrid'
import
tb
from
'../../basicData/roleManagent/components/tb'
import
add
from
'./addclass'
import
addProduct
from
'./addproduct'
import
myconfirm
from
'./components/myconfirm'
import
service
from
'@/plugins/request'
import
treeGrid
from
"@/components/treeGrid"
;
import
tb
from
"../../basicData/roleManagent/components/tb"
;
import
add
from
"./addclass"
;
import
addProduct
from
"./addproduct"
;
import
myconfirm
from
"./components/myconfirm"
;
import
service
from
"@/plugins/request"
;
export
default
{
components
:
{
treeGrid
,
tb
,
add
,
addProduct
,
myconfirm
},
components
:
{
treeGrid
,
tb
,
add
,
addProduct
,
myconfirm
},
data
()
{
return
{
myloading
:
true
,
productName
:
''
,
model1
:
''
,
divHeihgt
:
""
,
modal0
:
false
,
isedit0
:
false
,
modal1
:
false
,
modal2
:
false
,
modal3
:
false
,
isedit
:
false
,
formValidate0
:{},
formValidate1
:{},
pid
:
0
,
lid
:
0
,
delName
:
''
,
cilckListRowData
:{},
productClassType
:
-
1
,
upProductId
:
-
1
,
clickindex
:
-
1
,
clickindexLevel
:
-
1
,
clickindexLevelData
:{},
myloading
:
true
,
productName
:
""
,
model1
:
""
,
divHeihgt
:
""
,
modal0
:
false
,
isedit0
:
false
,
modal1
:
false
,
modal2
:
false
,
modal3
:
false
,
isedit
:
false
,
formValidate0
:
{},
formValidate1
:
{},
pid
:
0
,
lid
:
0
,
delName
:
""
,
cilckListRowData
:
{},
productClassType
:
-
1
,
upProductId
:
-
1
,
clickindex
:
-
1
,
clickindexLevel
:
-
1
,
clickindexLevelData
:
{},
//产品树列
columns
:
[
// {
...
...
@@ -100,72 +131,74 @@ export default {
// hidden: true
// },
{
title
:
'产品分类/名称'
,
key
:
'name'
title
:
"产品分类/名称"
,
key
:
"name"
},
{
title
:
'层级类型'
,
key
:
'upName'
{
title
:
"层级类型"
,
key
:
"upName"
},
{
title
:
'产品图号'
,
key
:
'drawingNo'
title
:
"产品图号"
,
key
:
"drawingNo"
},
{
title
:
'物料编号'
,
key
:
'mmcode'
title
:
"物料编号"
,
key
:
"mmcode"
},
{
title
:
'主承制单位'
,
key
:
'madeCompanyName'
title
:
"主承制单位"
,
key
:
"madeCompanyName"
},
{
title
:
'操作'
,
type
:
'action'
,
width
:
150
,
title
:
"操作"
,
type
:
"action"
,
width
:
150
,
actions
:
[
{
oprate
:
'edit'
,
text
:
'编辑'
,
class
:
'edit'
,
oprate
:
"edit"
,
text
:
"编辑"
,
class
:
"edit"
},
{
oprate
:
'delete'
,
text
:
'删除'
,
class
:
'remove'
,
oprate
:
"delete"
,
text
:
"删除"
,
class
:
"remove"
}
]
,
]
}
],
data
:
[],
//层级类型列
leveldata
:[],
levelcolumns
:[
leveldata
:
[],
levelcolumns
:
[
{
title
:
'类型名称'
,
key
:
'name'
title
:
"类型名称"
,
key
:
"name"
},
{
title
:
'上级类型名称'
,
key
:
'upName'
{
title
:
"上级类型名称"
,
key
:
"upName"
},
{
title
:
'操作'
,
type
:
'action'
,
title
:
"操作"
,
type
:
"action"
,
width
:
150
,
actions
:
[{
oprate
:
'detail'
,
text
:
'编辑'
,
class
:
'edit'
,
},
{
oprate
:
'delete'
,
text
:
'删除'
,
class
:
'remove'
,
}],
actions
:
[
{
oprate
:
"detail"
,
text
:
"编辑"
,
class
:
"edit"
},
{
oprate
:
"delete"
,
text
:
"删除"
,
class
:
"remove"
}
]
}
]
,
]
// tbPro:{
// isBorder: true,
// stripe: true,
...
...
@@ -216,343 +249,371 @@ export default {
// ],
// data: []
// }
}
}
;
},
methods
:
{
search
(){
var
name
=
this
.
productName
this
.
loadProduct
(
name
)
search
()
{
var
name
=
this
.
productName
;
this
.
loadProduct
(
name
)
;
},
//新增产品
add
()
{
this
.
isedit0
=
false
;
this
.
$refs
.
addproduct
.
selectdata
=
[]
this
.
$refs
.
addproduct
.
list
=
[]
this
.
$refs
.
addproduct
.
$refs
[
'ProcuctformValidate'
].
resetFields
();
this
.
isedit0
=
false
;
this
.
$refs
.
addproduct
.
selectdata
=
[];
this
.
$refs
.
addproduct
.
list
=
[];
this
.
$refs
.
addproduct
.
$refs
[
"ProcuctformValidate"
].
resetFields
();
//如果是选中一行新增,判断是不是最下面的层级或者是产品
let
bl
=
false
;
this
.
upProductId
=-
1
;
this
.
productClassType
=-
1
;
let
data
=
this
.
cilckListRowData
;
console
.
log
(
data
)
if
(
data
.
id
)
{
this
.
$refs
.
addproduct
.
formValidate
.
classType
=
data
.
id
this
.
productClassType
=
data
.
id
;
this
.
$refs
.
addproduct
.
list
.
push
({
label
:
data
.
name
,
value
:
data
.
id
})
if
(
data
.
isProduct
>
0
){
bl
=
true
this
.
upProductId
=
data
.
id
//this.$refs.addproduct.formValidate.classType=-1
this
.
productClassType
=-
1
;
}
else
{
if
(
data
.
children
==
null
)
{
bl
=
true
this
.
upProductId
=
0
}
else
{
bl
=
this
.
checkProduct
(
data
.
children
)
if
(
bl
){
this
.
upProductId
=
0
}
let
bl
=
false
;
this
.
upProductId
=
-
1
;
this
.
productClassType
=
-
1
;
let
data
=
this
.
cilckListRowData
;
console
.
log
(
data
);
if
(
data
.
id
)
{
this
.
$refs
.
addproduct
.
formValidate
.
classType
=
data
.
id
;
this
.
productClassType
=
data
.
id
;
this
.
$refs
.
addproduct
.
list
.
push
({
label
:
data
.
name
,
value
:
data
.
id
});
if
(
data
.
isProduct
>
0
)
{
bl
=
true
;
this
.
upProductId
=
data
.
id
;
//this.$refs.addproduct.formValidate.classType=-1
this
.
productClassType
=
-
1
;
}
else
{
if
(
data
.
children
==
null
)
{
bl
=
true
;
this
.
upProductId
=
0
;
}
else
{
bl
=
this
.
checkProduct
(
data
.
children
);
if
(
bl
)
{
this
.
upProductId
=
0
;
}
}
if
(
!
bl
){
this
.
$Message
.
error
(
'请选择最下面的层级或产品'
)
return
;
}
}
if
(
!
bl
)
{
this
.
$Message
.
error
(
"请选择最下面的层级或产品"
);
return
;
}
}
this
.
modal0
=
true
;
this
.
$refs
.
addproduct
.
formValidate
.
disabled
=
false
this
.
modal0
=
true
;
this
.
$refs
.
addproduct
.
formValidate
.
disabled
=
false
;
delete
this
.
$refs
.
addproduct
.
formValidate
.
id
;
//新增产品时的层级树
var
that
=
this
;
var
url
=
`
${
designUrl
}
/productlevel/getallselecttreenew`
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
$refs
.
addproduct
.
data1
=
(
response
.
result
)
})
var
that
=
this
;
var
url
=
`
${
designUrl
}
/productlevel/getallselecttreenew`
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
$refs
.
addproduct
.
data1
=
response
.
result
;
});
},
rowClick
(
data
,
event
,
index
,
txt
){
this
.
cilckListRowData
=
data
;
console
.
log
(
data
)
if
(
txt
==
"编辑"
){
if
(
data
.
isProduct
>
0
){
this
.
isedit0
=
true
;
this
.
modal0
=
true
;
let
{
name
,
drawingNo
,
remark
,
mmcode
,
madeCompany
,
classType
}
=
data
rowClick
(
data
,
event
,
index
,
txt
)
{
this
.
cilckListRowData
=
data
;
console
.
log
(
data
);
if
(
txt
==
"编辑"
)
{
if
(
data
.
isProduct
>
0
)
{
this
.
isedit0
=
true
;
this
.
modal0
=
true
;
let
{
name
,
drawingNo
,
remark
,
mmcode
,
madeCompany
,
classType
}
=
data
;
//let classType=data.levelName
this
.
$refs
.
addproduct
.
list
=
[]
this
.
$refs
.
addproduct
.
list
.
push
({
label
:
data
.
upName
,
value
:
classType
})
this
.
$refs
.
addproduct
.
componaylist
=
[]
this
.
$refs
.
addproduct
.
componaylist
.
push
({
label
:
data
.
madeCompanyName
,
value
:
madeCompany
})
this
.
$refs
.
addproduct
.
formValidate
=
{
classType
:
classType
,
name
:
name
,
drawingNo
:
drawingNo
,
supportsum
:
1
,
madeCompany
:
madeCompany
,
remark
:
remark
,
mmcode
:
mmcode
,
disabled
:
true
,
id
:
data
.
id
}
}
else
{
this
.
isedit
=
true
this
.
modal2
=
true
;
let
{
name
,
upId
,
upName
}
=
data
this
.
$refs
.
addclass
.
list
=
[]
this
.
$refs
.
addclass
.
list
.
push
({
label
:
upName
,
value
:
upId
})
this
.
$refs
.
addclass
.
formValidate
=
{
name
:
name
,
upid
:
upId
,
upname
:
upName
,
id
:
data
.
id
,
disabled
:
true
}
this
.
$refs
.
addproduct
.
list
=
[];
this
.
$refs
.
addproduct
.
list
.
push
({
label
:
data
.
upName
,
value
:
classType
});
this
.
$refs
.
addproduct
.
componaylist
=
[];
this
.
$refs
.
addproduct
.
componaylist
.
push
({
label
:
data
.
madeCompanyName
,
value
:
madeCompany
});
this
.
$refs
.
addproduct
.
formValidate
=
{
classType
:
classType
,
name
:
name
,
drawingNo
:
drawingNo
,
supportsum
:
1
,
madeCompany
:
madeCompany
,
remark
:
remark
,
mmcode
:
mmcode
,
disabled
:
true
,
id
:
data
.
id
};
}
else
{
this
.
isedit
=
true
;
this
.
modal2
=
true
;
let
{
name
,
upId
,
upName
}
=
data
;
this
.
$refs
.
addclass
.
list
=
[];
this
.
$refs
.
addclass
.
list
.
push
({
label
:
upName
,
value
:
upId
});
this
.
$refs
.
addclass
.
formValidate
=
{
name
:
name
,
upid
:
upId
,
upname
:
upName
,
id
:
data
.
id
,
disabled
:
true
};
}
}
if
(
txt
==
"删除"
)
{
if
(
data
.
isProduct
>
0
)
{
if
(
txt
==
"删除"
)
{
if
(
data
.
isProduct
>
0
)
{
//this.$Message.error('暂时不能删除产品');
// return
// return
this
.
modal3
=
true
;
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
this
.
pid
=
data
.
id
this
.
delName
=
"产品"
}
else
{
var
i
=
data
.
children
.
length
;
this
.
lid
=
data
.
id
this
.
delName
=
"层级"
if
(
i
>
0
){
this
.
$Message
.
error
(
'层级下有子节点,请先删除子节点!'
)
return
;
this
.
modal3
=
true
;
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
;
this
.
pid
=
data
.
id
;
this
.
delName
=
"产品"
;
}
else
{
var
i
=
data
.
children
.
length
;
this
.
lid
=
data
.
id
;
this
.
delName
=
"层级"
;
if
(
i
>
0
)
{
this
.
$Message
.
error
(
"层级下有子节点,请先删除子节点!"
);
return
;
}
this
.
modal3
=
true
;
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
this
.
modal3
=
true
;
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
;
}
}
if
(
txt
==
"复制"
)
{
this
.
$refs
.
mysel1
.
confirmmodal
=
true
if
(
txt
==
"复制"
)
{
this
.
$refs
.
mysel1
.
confirmmodal
=
true
;
}
},
del
()
{},
//产品列表
loadProduct
(
seoName
){
var
url
=
`
${
designUrl
}
/productlevel/getproducttreenew`
service
.
get
(
`
${
url
}
`
,
{
seoName
:
seoName
}).
then
(
response
=>
{
this
.
data
=
response
.
result
})
loadProduct
(
seoName
)
{
var
url
=
`
${
designUrl
}
/productlevel/getproducttreenew`
;
service
.
get
(
`
${
url
}
`
,
{
seoName
:
seoName
}).
then
(
response
=>
{
this
.
data
=
response
.
result
;
})
;
},
//保存产品
checkProduct
(
data
){
var
j
=
0
;
var
bl
=
false
;
data
.
forEach
((
item
,
i
)
=>
{
if
(
item
.
isProduct
==
1
)
{
j
++
checkProduct
(
data
)
{
var
j
=
0
;
var
bl
=
false
;
data
.
forEach
((
item
,
i
)
=>
{
if
(
item
.
isProduct
==
1
)
{
j
++
;
}
})
if
(
data
.
length
==
j
)
{
bl
=
true
})
;
if
(
data
.
length
==
j
)
{
bl
=
true
;
}
return
bl
return
bl
;
},
ok0
(
name
){
this
.
$refs
.
addproduct
.
$refs
[
name
].
validate
(
(
valid
)
=>
{
ok0
(
name
)
{
this
.
$refs
.
addproduct
.
$refs
[
name
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
isedit0
)
{
}
else
{
// console.log(1)
var
bl
=
false
var
bl1
=
false
var
selectId
=
-
1
;
var
sel
=
this
.
$refs
.
addproduct
.
selectdata
console
.
log
(
sel
)
if
(
sel
.
length
>
0
)
{
bl1
=
true
var
bl
=
false
;
var
bl1
=
false
;
var
selectId
=
-
1
;
var
sel
=
this
.
$refs
.
addproduct
.
selectdata
;
console
.
log
(
sel
)
;
if
(
sel
.
length
>
0
)
{
bl1
=
true
;
//是产品
if
(
sel
[
0
].
isProduct
>
0
)
{
bl
=
true
selectId
=
sel
[
0
].
productId
this
.
$refs
.
addproduct
.
formValidate
.
classType
=-
1
}
else
{
if
(
sel
[
0
].
children
==
null
)
{
bl
=
true
selectId
=
0
}
else
{
bl
=
this
.
checkProduct
(
sel
[
0
].
children
)
if
(
bl
){
selectId
=
0
}
if
(
sel
[
0
].
isProduct
>
0
)
{
bl
=
true
;
selectId
=
sel
[
0
].
productId
;
this
.
$refs
.
addproduct
.
formValidate
.
classType
=
-
1
;
}
else
{
if
(
sel
[
0
].
children
==
null
)
{
bl
=
true
;
selectId
=
0
;
}
else
{
bl
=
this
.
checkProduct
(
sel
[
0
].
children
);
if
(
bl
)
{
selectId
=
0
;
}
}
}
if
(
!
bl
)
{
this
.
$Message
.
error
(
'请选择最下面的层级或产品'
)
return
;
if
(
!
bl
)
{
this
.
$Message
.
error
(
"请选择最下面的层级或产品"
);
return
;
}
}
}
this
.
formValidate0
=
this
.
$refs
.
addproduct
.
formValidate
if
(
!
this
.
isedit0
){
if
(
bl1
){
this
.
formValidate0
.
upId
=
selectId
}
else
{
this
.
formValidate0
.
upId
=
this
.
upProductId
console
.
log
(
this
.
formValidate0
.
upId
)
console
.
log
(
this
.
formValidate0
)
this
.
formValidate0
.
classType
=
this
.
productClassType
this
.
formValidate0
=
this
.
$refs
.
addproduct
.
formValidate
;
if
(
!
this
.
isedit0
)
{
if
(
bl1
)
{
this
.
formValidate0
.
upId
=
selectId
;
}
else
{
this
.
formValidate0
.
upId
=
this
.
upProductId
;
console
.
log
(
this
.
formValidate0
.
upId
);
console
.
log
(
this
.
formValidate0
);
this
.
formValidate0
.
classType
=
this
.
productClassType
;
}
}
var
url
=
`
${
designUrl
}
/productinfo/createorupdate`
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
ProductInfo
:
this
.
formValidate0
})).
then
(
response
=>
{
if
(
response
.
success
){
this
.
$Message
.
success
(
'保存成功'
)
this
.
loadProduct
()
//this.loadlevel()
this
.
modal0
=
false
}
}).
catch
(
error
=>
{
this
.
$Message
.
error
(
'保存失败'
)
})
var
url
=
`
${
designUrl
}
/productinfo/createorupdate`
;
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
ProductInfo
:
this
.
formValidate0
}))
.
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
loadProduct
();
//this.loadlevel()
this
.
modal0
=
false
;
}
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"保存失败"
);
});
}
else
{
setTimeout
(()
=>
{
this
.
myloading
=
false
this
.
myloading
=
false
;
this
.
$nextTick
(()
=>
{
this
.
myloading
=
true
})
},
500
)
this
.
$Message
.
error
(
'请输入必填项'
)
this
.
myloading
=
true
;
})
;
},
500
)
;
this
.
$Message
.
error
(
"请输入必填项"
);
}
})
})
;
},
cancel0
(){
this
.
modal0
=
false
;
cancel0
()
{
this
.
modal0
=
false
;
},
// 删除产品/层级
ok3
(
bl
){
var
url
=
""
var
that
=
this
ok3
(
bl
)
{
var
url
=
""
;
var
that
=
this
;
if
(
this
.
delName
==
"产品"
)
{
url
=
`
${
designUrl
}
/productinfo/delete?id=
${
this
.
pid
}
`
if
(
this
.
delName
==
"产品"
)
{
url
=
`
${
designUrl
}
/productinfo/delete?id=
${
this
.
pid
}
`
;
}
if
(
this
.
delName
==
"层级"
){
url
=
`
${
designUrl
}
/productlevel/delete?id=
${
this
.
lid
}
`
}
service
.
delete
(
`
${
url
}
`
).
then
(
response
=>
{
if
(
response
.
result
.
status
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
loadProduct
()
this
.
loadlevel
()
}
else
{
this
.
$Message
.
error
(
response
.
result
.
message
)
}
}).
catch
((
error
)
=>
{
this
.
$Message
.
error
()
if
(
this
.
delName
==
"层级"
)
{
url
=
`
${
designUrl
}
/productlevel/delete?id=
${
this
.
lid
}
`
;
}
service
.
delete
(
`
${
url
}
`
)
.
then
(
response
=>
{
if
(
response
.
result
.
status
)
{
this
.
$Message
.
success
(
"删除成功"
);
this
.
loadProduct
();
this
.
loadlevel
();
}
else
{
this
.
$Message
.
error
(
response
.
result
.
message
);
}
})
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
=
bl
;
.
catch
(
error
=>
{
this
.
$Message
.
error
();
});
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
=
bl
;
},
cancel3
(
bl
){
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
=
bl
;
cancel3
(
bl
)
{
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
=
bl
;
},
copyok
(
bl
){
this
.
$refs
.
mysel1
.
confirmmodal
=
bl
copyok
(
bl
)
{
this
.
$refs
.
mysel1
.
confirmmodal
=
bl
;
},
copycancel
(
bl
){
this
.
$refs
.
mysel1
.
confirmmodal
=
bl
copycancel
(
bl
)
{
this
.
$refs
.
mysel1
.
confirmmodal
=
bl
;
},
//层级列表
loadlevel
(){
var
url
=
`
${
designUrl
}
/productlevel/gettree`
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
leveldata
=
response
.
result
})
loadlevel
()
{
var
url
=
`
${
designUrl
}
/productlevel/gettree`
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
leveldata
=
response
.
result
;
})
;
},
cancelClick
(){
this
.
clickindexLevelData
=
{}
this
.
clickindexLevel
=-
1
this
.
$refs
.
addclass
.
formValidate
.
upid
=
0
this
.
$refs
.
addclass
.
list
=
[]
this
.
$refs
.
addclass
.
list
.
push
({
label
:
'根节点'
,
value
:
0
})
this
.
$refs
.
addclass
.
data
=
[]
cancelClick
()
{
this
.
clickindexLevelData
=
{};
this
.
clickindexLevel
=
-
1
;
this
.
$refs
.
addclass
.
formValidate
.
upid
=
0
;
this
.
$refs
.
addclass
.
list
=
[];
this
.
$refs
.
addclass
.
list
.
push
({
label
:
"根节点"
,
value
:
0
});
this
.
$refs
.
addclass
.
data
=
[];
},
levelrowClick
(
data
,
event
,
index
,
txt
){
this
.
clickindexLevel
=
data
.
id
this
.
clickindexLevelData
=
data
levelrowClick
(
data
,
event
,
index
,
txt
)
{
this
.
clickindexLevel
=
data
.
id
;
this
.
clickindexLevelData
=
data
;
event
.
stopPropagation
();
if
(
txt
==
"编辑"
){
this
.
isedit
=
true
this
.
modal2
=
true
;
let
{
name
,
upId
,
upName
}
=
data
this
.
$refs
.
addclass
.
list
=
[]
this
.
$refs
.
addclass
.
list
.
push
({
label
:
upName
,
value
:
upId
})
this
.
$refs
.
addclass
.
formValidate
=
{
name
:
name
,
upid
:
upId
,
upname
:
upName
,
id
:
data
.
id
,
disabled
:
true
}
if
(
txt
==
"编辑"
)
{
this
.
isedit
=
true
;
this
.
modal2
=
true
;
let
{
name
,
upId
,
upName
}
=
data
;
this
.
$refs
.
addclass
.
list
=
[];
this
.
$refs
.
addclass
.
list
.
push
({
label
:
upName
,
value
:
upId
});
this
.
$refs
.
addclass
.
formValidate
=
{
name
:
name
,
upid
:
upId
,
upname
:
upName
,
id
:
data
.
id
,
disabled
:
true
};
}
if
(
txt
==
"删除"
){
this
.
lid
=
data
.
id
this
.
delName
=
"层级"
var
i
=
data
.
children
.
length
;
if
(
i
>
0
){
this
.
$Message
.
error
(
'层级下有子节点,请先删除子节点!'
)
return
;
if
(
txt
==
"删除"
)
{
this
.
lid
=
data
.
id
;
this
.
delName
=
"层级"
;
var
i
=
data
.
children
.
length
;
if
(
i
>
0
)
{
this
.
$Message
.
error
(
"层级下有子节点,请先删除子节点!"
);
return
;
}
this
.
modal3
=
true
;
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
this
.
modal3
=
true
;
this
.
$refs
.
mysel
.
confirmmodal
=
this
.
modal3
;
}
},
//层级列表
addclass
()
{
this
.
loadlevel
()
this
.
isEdit
=
false
this
.
modal1
=
true
;
this
.
clickindexLevel
=-
1
this
.
clickindexLevelData
=
{}
this
.
loadlevel
()
;
this
.
isEdit
=
false
;
this
.
modal1
=
true
;
this
.
clickindexLevel
=
-
1
;
this
.
clickindexLevelData
=
{};
},
//新增层级
addchild
(
event
){
this
.
modal2
=
true
;
addchild
(
event
)
{
this
.
modal2
=
true
;
//阻止冒泡
event
.
stopPropagation
();
delete
this
.
$refs
.
addclass
.
formValidate
.
id
;
this
.
$refs
.
addclass
.
formValidate
.
disabled
=
false
this
.
$refs
.
addclass
.
list
=
[]
this
.
$refs
.
addclass
.
data
=
[]
if
(
this
.
clickindexLevel
>
0
){
this
.
$refs
.
addclass
.
formValidate
.
upid
=
this
.
clickindexLevel
let
{
name
}
=
this
.
clickindexLevelData
this
.
$refs
.
addclass
.
list
.
push
({
label
:
`
${
name
}
`
,
value
:
this
.
clickindexLevel
})
var
url
=
`
${
designUrl
}
/productlevel/getselecttree`
service
.
get
(
`
${
url
}
`
,
{
id
:
this
.
clickindexLevel
}).
then
(
response
=>
{
this
.
$refs
.
addclass
.
data
=
response
.
result
})
}
else
{
this
.
$refs
.
addclass
.
formValidate
.
upid
=
0
this
.
$refs
.
addclass
.
list
.
push
({
label
:
'根节点'
,
value
:
0
})
this
.
$refs
.
addclass
.
data
=
[]
this
.
$refs
.
addclass
.
formValidate
.
disabled
=
false
;
this
.
$refs
.
addclass
.
list
=
[];
this
.
$refs
.
addclass
.
data
=
[];
if
(
this
.
clickindexLevel
>
0
)
{
this
.
$refs
.
addclass
.
formValidate
.
upid
=
this
.
clickindexLevel
;
let
{
name
}
=
this
.
clickindexLevelData
;
this
.
$refs
.
addclass
.
list
.
push
({
label
:
`
${
name
}
`
,
value
:
this
.
clickindexLevel
});
var
url
=
`
${
designUrl
}
/productlevel/getselecttree`
;
service
.
get
(
`
${
url
}
`
,
{
id
:
this
.
clickindexLevel
}).
then
(
response
=>
{
this
.
$refs
.
addclass
.
data
=
response
.
result
;
});
}
else
{
this
.
$refs
.
addclass
.
formValidate
.
upid
=
0
;
this
.
$refs
.
addclass
.
list
.
push
({
label
:
"根节点"
,
value
:
0
});
this
.
$refs
.
addclass
.
data
=
[];
}
this
.
$refs
.
addclass
.
formValidate
.
name
=
""
this
.
$refs
.
addclass
.
formValidate
.
name
=
""
;
//this.$refs.addclass.$refs['formValidate'].resetFields();
},
edit1
(
data
){
this
.
isEdit
=
true
this
.
modal2
=
true
this
.
$refs
.
addclass
.
$refs
[
'formValidate'
].
resetFields
();
let
{
prename
,
name
,
isProduct
}
=
data
.
row
;
this
.
$refs
.
addclass
.
list
=
[];
this
.
$refs
.
addclass
.
list
.
push
({
label
:
prename
,
value
:
prename
})
this
.
$refs
.
addclass
.
formValidate
=
{
name
:
name
,
prename
:
prename
,
isproduct
:
isProduct
}
edit1
(
data
)
{
this
.
isEdit
=
true
;
this
.
modal2
=
true
;
this
.
$refs
.
addclass
.
$refs
[
"formValidate"
].
resetFields
();
let
{
prename
,
name
,
isProduct
}
=
data
.
row
;
this
.
$refs
.
addclass
.
list
=
[];
this
.
$refs
.
addclass
.
list
.
push
({
label
:
prename
,
value
:
prename
});
this
.
$refs
.
addclass
.
formValidate
=
{
name
:
name
,
prename
:
prename
,
isproduct
:
isProduct
};
},
del1
(){
this
.
$refs
.
mysel0
.
confirmmodal
=
true
;
del1
()
{
this
.
$refs
.
mysel0
.
confirmmodal
=
true
;
// this.$Modal.confirm({
// title: '提示',
// okText: '确定',
...
...
@@ -564,63 +625,67 @@ export default {
// }
// })
},
myselok
(
bl
){
this
.
$refs
.
mysel0
.
confirmmodal
=
bl
;
myselok
(
bl
)
{
this
.
$refs
.
mysel0
.
confirmmodal
=
bl
;
},
myselcancel
(
bl
){
this
.
$refs
.
mysel0
.
confirmmodal
=
bl
;
myselcancel
(
bl
)
{
this
.
$refs
.
mysel0
.
confirmmodal
=
bl
;
},
ok
(
name
){
var
url
=
`
${
designUrl
}
/productlevel/createorupdate`
this
.
$refs
.
addclass
.
$refs
[
name
].
validate
(
(
valid
)
=>
{
ok
(
name
)
{
var
url
=
`
${
designUrl
}
/productlevel/createorupdate`
;
this
.
$refs
.
addclass
.
$refs
[
name
].
validate
(
valid
=>
{
if
(
valid
)
{
//this.$Message.success('Success!');
if
(
this
.
isedit
)
{
}
else
{
}
this
.
formValidate1
=
this
.
$refs
.
addclass
.
formValidate
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
ProductLevel
:
this
.
formValidate1
})).
then
(
response
=>
{
if
(
response
.
result
.
status
){
this
.
$Message
.
success
(
'保存成功'
)
this
.
loadlevel
()
this
.
loadProduct
()
this
.
modal2
=
false
}
else
{
this
.
$Message
.
error
(
response
.
result
.
message
)
}
}).
catch
(
error
=>
{
this
.
$Message
.
error
(
'保存失败'
)
})
this
.
formValidate1
=
this
.
$refs
.
addclass
.
formValidate
;
service
.
post
(
`
${
url
}
`
,
JSON
.
stringify
({
ProductLevel
:
this
.
formValidate1
})
)
.
then
(
response
=>
{
if
(
response
.
result
.
status
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
loadlevel
();
this
.
loadProduct
();
this
.
modal2
=
false
;
}
else
{
this
.
$Message
.
error
(
response
.
result
.
message
);
}
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"保存失败"
);
});
//this.modal2 = false
}
else
{
setTimeout
(()
=>
{
this
.
myloading
=
false
this
.
myloading
=
false
;
this
.
$nextTick
(()
=>
{
this
.
myloading
=
true
})
},
500
)
this
.
$Message
.
error
(
'请输入必填项'
)
this
.
myloading
=
true
;
})
;
},
500
)
;
this
.
$Message
.
error
(
"请输入必填项"
);
}
})
})
;
},
cancel
(){
this
.
modal2
=
false
cancel
()
{
this
.
modal2
=
false
;
}
},
created
(){
this
.
loadProduct
()
this
.
divHeihgt
=
window
.
innerHeight
-
130
+
"px"
;
},
mounted
()
{
window
.
onresize
=
()
=>
{
return
(()
=>
{
this
.
divHeihgt
=
window
.
innerHeight
-
130
+
"px"
;
})()
}
created
()
{
this
.
loadProduct
();
this
.
divHeihgt
=
window
.
innerHeight
-
130
+
"px"
;
},
}
mounted
()
{
window
.
onresize
=
()
=>
{
return
(()
=>
{
this
.
divHeihgt
=
window
.
innerHeight
-
130
+
"px"
;
})();
};
}
};
</
script
>
<
style
scoped
>
</
style
>
pages/qc/taskList/index.vue
View file @
24792d89
...
...
@@ -319,6 +319,23 @@ export default {
},
// 搜索
tableSearch
()
{
console
.
warn
(
"查询数据"
)
let
val
=
this
.
searchIterms
;
console
.
log
(
val
)
let
parmes
=
{
"status"
:
0
,
"simpleSearch"
:
val
,
"skipCount"
:
0
,
"maxResultCount"
:
10
}
this
.
searchlaode
(
parmes
)
},
searchlaode
(
parmes
){
let
url
=
`
${
PlanUrl
}
/ordercheck/waitexecuteorderlist`
;
service
.
post
(
`
${
url
}
`
,
parmes
).
then
(
res
=>
{
this
.
mDatas
=
res
.
result
.
items
this
.
search
.
total
=
res
.
result
.
totalCount
});
},
searchModel
(){
this
.
showModel
=
true
;
...
...
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