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
2b7a2554
Commit
2b7a2554
authored
May 09, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech
parent
f07e0df8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
451 additions
and
411 deletions
+451
-411
index.vue
pages/processManage/Process/index.vue
+396
-408
index.vue
pages/technology/index.vue
+55
-3
No files found.
pages/processManage/Process/index.vue
View file @
2b7a2554
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<Input
<Input
search
search
enter-button
enter-button
class=
"
mr10 fl"
class=
"mr10 fl"
style=
"width:240px"
style=
"width:240px"
v-model=
"searchIterms"
v-model=
"searchIterms"
placeholder=
"请输入编号、名称"
placeholder=
"请输入编号、名称"
...
@@ -88,7 +88,6 @@
...
@@ -88,7 +88,6 @@
<Button
type=
"primary"
size=
"large"
@
click=
"modalOk"
>
克隆
</Button>
<Button
type=
"primary"
size=
"large"
@
click=
"modalOk"
>
克隆
</Button>
<Button
type=
"primary"
size=
"large"
@
click=
"nextStep"
>
查看详情
</Button>
<Button
type=
"primary"
size=
"large"
@
click=
"nextStep"
>
查看详情
</Button>
</
template
>
</
template
>
</div>
</div>
<div
v-else
slot=
"footer"
v-model=
"greateArtmodel"
>
<div
v-else
slot=
"footer"
v-model=
"greateArtmodel"
>
<Button
type=
"text"
size=
"large"
@
click=
"saveCancelModel"
>
取消
</Button>
<Button
type=
"text"
size=
"large"
@
click=
"saveCancelModel"
>
取消
</Button>
...
@@ -173,7 +172,6 @@
...
@@ -173,7 +172,6 @@
<Row>
<Row>
<Col
span=
"12"
>
<Col
span=
"12"
>
<FormItem
label=
"工艺类型"
style=
"width:100%"
>
<FormItem
label=
"工艺类型"
style=
"width:100%"
>
<dictionary
<dictionary
code=
"Process.Routing.routingType"
code=
"Process.Routing.routingType"
v-model=
"SearchForm.routingType"
v-model=
"SearchForm.routingType"
...
@@ -193,22 +191,20 @@
...
@@ -193,22 +191,20 @@
<!-- 工艺更改表弹框 -->
<!-- 工艺更改表弹框 -->
<changelist
ref=
"changelist"
></changelist>
<changelist
ref=
"changelist"
></changelist>
<!-- 工艺规程预览 -->
<!-- 工艺规程预览 -->
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
CustomTable
from
'@/components/customTable/customTable.vue'
import
CustomTable
from
"@/components/customTable/customTable.vue"
;
import
processMain
from
'./processMain.vue'
import
processMain
from
"./processMain.vue"
;
import
processNew
from
'./processNew.vue'
import
processNew
from
"./processNew.vue"
;
import
routingchangeorder
from
'../../processDesign/Process/routingchangeorder.vue'
import
routingchangeorder
from
"../../processDesign/Process/routingchangeorder.vue"
;
import
changelist
from
'../../processDesign/Process/changelist.vue'
import
changelist
from
"../../processDesign/Process/changelist.vue"
;
import
processview
from
'./processview.vue'
import
processview
from
"./processview.vue"
;
import
sendAudit
from
'./sendAudit.vue'
import
sendAudit
from
"./sendAudit.vue"
;
import
service
from
'@/plugins/request'
import
service
from
"@/plugins/request"
;
import
QS
from
'querystring'
import
QS
from
"querystring"
;
export
default
{
export
default
{
components
:
{
components
:
{
CustomTable
,
CustomTable
,
...
@@ -219,69 +215,68 @@ export default {
...
@@ -219,69 +215,68 @@ export default {
changelist
,
changelist
,
processview
,
processview
,
sendAudit
sendAudit
},
},
data
()
{
data
()
{
return
{
return
{
doUpload
:
'/api/up/file'
,
doUpload
:
"/api/up/file"
,
tableHeight
:
''
,
tableHeight
:
""
,
myloading
:
true
,
myloading
:
true
,
gymodaltitle
:
'创建工艺'
,
gymodaltitle
:
"创建工艺"
,
processviewModal
:
false
,
processviewModal
:
false
,
isview
:
false
,
isview
:
false
,
issendAudit
:
false
,
issendAudit
:
false
,
myechartModal
:
false
,
myechartModal
:
false
,
createtype
:
1
,
createtype
:
1
,
show3
:
false
,
show3
:
false
,
seleId
:
''
,
seleId
:
""
,
flag
:
0
,
flag
:
0
,
headerid
:
0
,
headerid
:
0
,
headeroldid
:
0
,
headeroldid
:
0
,
headerInfo
:
[],
headerInfo
:
[],
pppss
:
{
pppss
:
{
srid
:
''
srid
:
""
},
},
column1
:
[
column1
:
[
{
{
type
:
'index'
,
type
:
"index"
,
title
:
'序号'
,
title
:
"序号"
,
width
:
'65'
,
width
:
"65"
,
align
:
'center'
align
:
"center"
},
},
{
{
title
:
this
.
l
(
"productName"
),
title
:
this
.
l
(
"productName"
),
key
:
'productName'
,
key
:
"productName"
,
align
:
'center'
align
:
"center"
},
},
{
{
title
:
this
.
l
(
"name"
),
title
:
this
.
l
(
"name"
),
key
:
'name'
,
key
:
"name"
,
align
:
'center'
align
:
"center"
},
},
{
{
title
:
this
.
l
(
"code"
),
title
:
this
.
l
(
"code"
),
key
:
'code'
,
key
:
"code"
,
align
:
'center'
,
align
:
"center"
,
width
:
'200'
width
:
"200"
},
},
{
{
title
:
this
.
l
(
"author"
),
title
:
this
.
l
(
"author"
),
key
:
'authorName'
,
key
:
"authorName"
,
align
:
'center'
,
align
:
"center"
,
width
:
'110'
width
:
"110"
},
},
{
{
title
:
this
.
l
(
"approvalStatus"
),
title
:
this
.
l
(
"approvalStatus"
),
key
:
'approvalStatus'
,
key
:
"approvalStatus"
,
align
:
'center'
,
align
:
"center"
,
width
:
'90'
,
width
:
"90"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
let
statusColor
=
let
statusColor
=
params
.
row
.
approvalStatusDesc
==
'受控中'
?
'#26A699'
:
'#FFCC00'
params
.
row
.
approvalStatusDesc
==
"受控中"
?
"#26A699"
:
"#FFCC00"
;
return
h
(
'div'
,
[
return
h
(
"div"
,
[
h
(
h
(
'b'
,
"b"
,
{
{
style
:
{
style
:
{
color
:
statusColor
color
:
statusColor
...
@@ -292,72 +287,72 @@ export default {
...
@@ -292,72 +287,72 @@ export default {
},
},
params
.
row
.
approvalStatusDesc
params
.
row
.
approvalStatusDesc
)
)
])
])
;
}
}
},
},
{
{
title
:
this
.
l
(
"version"
),
title
:
this
.
l
(
"version"
),
key
:
'version'
,
key
:
"version"
,
align
:
'center'
align
:
"center"
},
},
{
{
title
:
this
.
l
(
"routingType"
),
title
:
this
.
l
(
"routingType"
),
key
:
'routingTypeDesc'
,
key
:
"routingTypeDesc"
,
align
:
'center'
align
:
"center"
},
},
{
{
title
:
'操作'
,
title
:
"操作"
,
key
:
'id'
,
key
:
"id"
,
align
:
'center'
,
align
:
"center"
,
width
:
'200'
,
width
:
"200"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
h
(
'op'
,
"op"
,
{
{
attrs
:
{
attrs
:
{
oprate
:
'detail'
oprate
:
"detail"
},
},
on
:
{
on
:
{
click
:
()
=>
{
click
:
()
=>
{
// e.stopPropagation()
// e.stopPropagation()
this
.
Headerview
(
params
)
this
.
Headerview
(
params
)
;
}
}
}
}
},
},
'预览'
"预览"
),
),
h
(
h
(
'op'
,
"op"
,
{
{
attrs
:
{
attrs
:
{
oprate
:
'detail'
oprate
:
"detail"
},
},
on
:
{
on
:
{
click
:
()
=>
{
click
:
()
=>
{
// e.stopPropagation()
// e.stopPropagation()
this
.
viewFun
(
params
)
this
.
viewFun
(
params
)
;
}
}
}
}
},
},
'查看'
"查看"
),
),
h
(
h
(
'op'
,
"op"
,
{
{
attrs
:
{
attrs
:
{
oprate
:
'detail'
oprate
:
"detail"
},
},
on
:
{
on
:
{
click
:
()
=>
{
click
:
()
=>
{
this
.
Main
(
params
)
this
.
Main
(
params
)
;
}
}
}
}
},
},
'工艺更改单'
"工艺更改单"
)
)
])
])
;
}
}
}
}
],
],
...
@@ -371,9 +366,9 @@ export default {
...
@@ -371,9 +366,9 @@ export default {
Data_inventory03
:
[],
Data_inventory03
:
[],
createShow
:
false
,
createShow
:
false
,
treeInputSearch
:
''
,
treeInputSearch
:
""
,
ocolumn
:
[],
ocolumn
:
[],
treeHeight
:
''
,
treeHeight
:
""
,
modal1
:
false
,
modal1
:
false
,
modalShow
:
false
,
modalShow
:
false
,
documentShow
:
false
,
documentShow
:
false
,
...
@@ -381,7 +376,7 @@ export default {
...
@@ -381,7 +376,7 @@ export default {
pdfviewerVis
:
false
,
pdfviewerVis
:
false
,
modelSpecialty
:
false
,
modelSpecialty
:
false
,
selectFault
:
'greateArt'
,
selectFault
:
"greateArt"
,
greateArtmodel
:
true
,
greateArtmodel
:
true
,
showBtn
:
true
,
showBtn
:
true
,
inventorymodel
:
false
,
inventorymodel
:
false
,
...
@@ -393,65 +388,65 @@ export default {
...
@@ -393,65 +388,65 @@ export default {
pageindex
:
1
,
pageindex
:
1
,
pagesize
:
10
,
pagesize
:
10
,
datatotal
:
0
,
datatotal
:
0
,
pdffileUrl
:
''
,
pdffileUrl
:
""
,
searchIterms
:
''
,
searchIterms
:
""
,
showModel
:
false
,
showModel
:
false
,
approvalStatusdata
:
[],
approvalStatusdata
:
[],
SearchForm
:
{
SearchForm
:
{
version
:
null
,
version
:
null
,
approvalStatus
:
null
,
approvalStatus
:
null
,
code
:
''
,
code
:
""
,
name
:
''
,
name
:
""
,
routingType
:
null
routingType
:
null
},
},
dataListRetrun
:
[]
//送审提交数据
dataListRetrun
:
[]
//送审提交数据
}
}
;
},
},
created
()
{
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
140
this
.
treeHeight
=
window
.
innerHeight
-
140
;
this
.
tableHeight
=
window
.
innerHeight
-
230
this
.
tableHeight
=
window
.
innerHeight
-
230
;
this
.
loaddata
()
this
.
loaddata
()
;
this
.
getapprovalStatusdata
()
this
.
getapprovalStatusdata
()
;
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
mounted
()
{
mounted
()
{
this
.
initTree
()
this
.
initTree
()
;
window
.
onresize
=
()
=>
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
///浏览器窗口大小变化
return
(()
=>
{
return
(()
=>
{
this
.
treeHeight
=
window
.
innerHeight
-
140
this
.
treeHeight
=
window
.
innerHeight
-
140
;
this
.
tableHeight
=
window
.
innerHeight
-
230
this
.
tableHeight
=
window
.
innerHeight
-
230
;
})()
})()
;
}
}
;
},
},
computed
:
{
computed
:
{
searchList
()
{
searchList
()
{
let
nodeList
=
this
.
treeData
let
nodeList
=
this
.
treeData
;
var
text
=
this
.
treeInputSearch
var
text
=
this
.
treeInputSearch
;
var
newNodeList
=
[]
var
newNodeList
=
[]
;
function
searchTree
(
nodeLists
,
value
)
{
function
searchTree
(
nodeLists
,
value
)
{
for
(
let
i
=
0
;
i
<
nodeLists
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
nodeLists
.
length
;
i
++
)
{
if
(
nodeLists
[
i
].
title
.
indexOf
(
value
)
!=
-
1
)
{
if
(
nodeLists
[
i
].
title
.
indexOf
(
value
)
!=
-
1
)
{
newNodeList
.
push
(
nodeLists
[
i
])
newNodeList
.
push
(
nodeLists
[
i
])
;
}
else
if
(
nodeLists
[
i
].
children
.
length
>
0
)
{
}
else
if
(
nodeLists
[
i
].
children
.
length
>
0
)
{
searchTree
(
nodeLists
[
i
].
children
,
value
)
searchTree
(
nodeLists
[
i
].
children
,
value
)
;
}
}
}
}
}
}
if
(
text
!=
''
)
{
if
(
text
!=
""
)
{
searchTree
(
nodeList
,
text
)
searchTree
(
nodeList
,
text
)
;
}
else
{
}
else
{
return
nodeList
return
nodeList
;
}
}
return
newNodeList
return
newNodeList
;
}
}
},
},
methods
:
{
methods
:
{
l
(
key
)
{
l
(
key
)
{
key
=
"routing_header"
+
"."
+
key
;
key
=
"routing_header"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
},
},
loaddata
()
{
loaddata
()
{
let
model
=
{
let
model
=
{
...
@@ -464,115 +459,115 @@ export default {
...
@@ -464,115 +459,115 @@ export default {
code
:
this
.
SearchForm
.
code
,
code
:
this
.
SearchForm
.
code
,
name
:
this
.
SearchForm
.
name
,
name
:
this
.
SearchForm
.
name
,
routingType
:
this
.
SearchForm
.
routingType
routingType
:
this
.
SearchForm
.
routingType
}
}
;
var
url
=
`
${
designUrl
}
/routingheader/getpaged?`
+
QS
.
stringify
(
model
)
var
url
=
`
${
designUrl
}
/routingheader/getpaged?`
+
QS
.
stringify
(
model
)
;
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
datatotal
=
response
.
result
.
totalCount
this
.
datatotal
=
response
.
result
.
totalCount
;
this
.
data1
=
response
.
result
.
items
this
.
data1
=
response
.
result
.
items
;
})
})
;
},
},
getapprovalStatusdata
()
{
getapprovalStatusdata
()
{
var
url
=
`
${
designUrl
}
/routingheader/getspprovalstatus`
var
url
=
`
${
designUrl
}
/routingheader/getspprovalstatus`
;
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
let
arry
=
[]
let
arry
=
[]
;
response
.
result
.
forEach
(
(
data
)
=>
{
response
.
result
.
forEach
(
data
=>
{
var
that
=
this
var
that
=
this
;
let
arryObj
=
{}
let
arryObj
=
{}
;
arryObj
[
'label'
]
=
data
.
name
arryObj
[
"label"
]
=
data
.
name
;
arryObj
[
'value'
]
=
data
.
code
arryObj
[
"value"
]
=
data
.
code
;
arry
.
push
(
arryObj
)
arry
.
push
(
arryObj
)
;
})
})
;
this
.
approvalStatusdata
=
arry
this
.
approvalStatusdata
=
arry
;
})
})
;
},
},
gjSearch
()
{
gjSearch
()
{
this
.
pageindex
=
1
this
.
pageindex
=
1
;
this
.
searchIterms
=
''
this
.
searchIterms
=
""
;
this
.
loaddata
()
this
.
loaddata
()
;
},
},
easySearch
()
{
easySearch
()
{
this
.
pageindex
=
1
this
.
pageindex
=
1
;
this
.
SearchForm
=
{
this
.
SearchForm
=
{
version
:
null
,
version
:
null
,
approvalStatus
:
null
,
approvalStatus
:
null
,
code
:
''
,
code
:
""
,
name
:
''
,
name
:
""
,
routingType
:
null
routingType
:
null
}
}
;
this
.
loaddata
()
this
.
loaddata
()
;
},
},
//高级搜索
//高级搜索
searchModel
()
{
searchModel
()
{
this
.
showModel
=
true
this
.
showModel
=
true
;
},
},
searchclose
()
{
searchclose
()
{
this
.
showModel
=
false
this
.
showModel
=
false
;
},
},
onPageChanged
(
page_index
)
{
onPageChanged
(
page_index
)
{
this
.
pageindex
=
page_index
this
.
pageindex
=
page_index
;
this
.
loaddata
()
this
.
loaddata
()
;
},
},
onPagesizeChanged
(
page_size
)
{
onPagesizeChanged
(
page_size
)
{
this
.
pagesize
=
page_size
this
.
pagesize
=
page_size
;
this
.
loaddata
()
this
.
loaddata
()
;
},
},
initTree
()
{
initTree
()
{
var
sumData
=
[]
var
sumData
=
[]
;
this
.
$http
.
order
.
getallselecttree
().
then
(
(
res
)
=>
{
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
])
sumData
=
sumData
.
concat
(
res
.
result
[
i
])
;
}
}
this
.
treeData
=
sumData
this
.
treeData
=
sumData
;
}
else
{
}
else
{
this
.
$Message
.
error
(
'加载产品树失败!'
)
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
}
})
})
;
},
},
selectTreeNode
(
value
)
{
selectTreeNode
(
value
)
{
if
(
value
!=
null
&&
value
.
length
>
0
)
{
if
(
value
!=
null
&&
value
.
length
>
0
)
{
this
.
ProductSelected
=
value
this
.
ProductSelected
=
value
;
}
}
if
(
value
.
length
>
0
)
{
if
(
value
.
length
>
0
)
{
this
.
ids
=
[]
this
.
ids
=
[]
;
this
.
getAllIds
(
value
)
this
.
getAllIds
(
value
)
;
if
(
this
.
ids
.
length
>
0
)
{
if
(
this
.
ids
.
length
>
0
)
{
this
.
productid
=
this
.
ids
.
join
(
','
)
this
.
productid
=
this
.
ids
.
join
(
","
);
}
else
{
}
else
{
this
.
productid
=
'-1'
this
.
productid
=
"-1"
;
}
}
this
.
pageindex
=
1
this
.
pageindex
=
1
;
this
.
loaddata
()
this
.
loaddata
()
;
}
}
},
},
getAllIds
(
trees
)
{
getAllIds
(
trees
)
{
trees
.
forEach
((
data
,
index
)
=>
{
trees
.
forEach
((
data
,
index
)
=>
{
var
that
=
this
var
that
=
this
;
if
(
data
.
isProduct
)
{
if
(
data
.
isProduct
)
{
this
.
ids
.
push
(
data
.
productId
)
this
.
ids
.
push
(
data
.
productId
)
;
}
}
if
(
data
.
children
.
length
>
0
)
{
if
(
data
.
children
.
length
>
0
)
{
this
.
getAllIds
(
data
.
children
)
this
.
getAllIds
(
data
.
children
)
;
}
}
})
})
;
},
},
selectedrow
(
currentRow
,
oldCurrentRow
)
{
selectedrow
(
currentRow
,
oldCurrentRow
)
{
this
.
headerSelected
=
currentRow
this
.
headerSelected
=
currentRow
;
if
(
currentRow
.
approvalStatus
==
4
||
currentRow
.
approvalStatus
==
0
)
{
if
(
currentRow
.
approvalStatus
==
4
||
currentRow
.
approvalStatus
==
0
)
{
this
.
isshowedit
=
true
this
.
isshowedit
=
true
;
this
.
isshowdel
=
true
this
.
isshowdel
=
true
;
}
else
{
}
else
{
this
.
isshowedit
=
false
this
.
isshowedit
=
false
;
this
.
isshowdel
=
false
this
.
isshowdel
=
false
;
}
}
},
},
...
@@ -582,401 +577,394 @@ export default {
...
@@ -582,401 +577,394 @@ export default {
this
.
ProductSelected
==
null
||
this
.
ProductSelected
==
null
||
this
.
ProductSelected
[
0
].
isProduct
!=
1
this
.
ProductSelected
[
0
].
isProduct
!=
1
)
{
)
{
this
.
$Message
.
error
(
'请选择产品!'
)
this
.
$Message
.
error
(
"请选择产品!"
);
return
return
;
}
}
this
.
createtype
=
1
this
.
createtype
=
1
;
this
.
gymodaltitle
=
'创建工艺规程'
this
.
gymodaltitle
=
"创建工艺规程"
;
this
.
modal1
=
true
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
clearModal
()
this
.
clearModal
()
;
this
.
addpdefm
.
formValidate
.
id
=
0
this
.
addpdefm
.
formValidate
.
id
=
0
;
this
.
addpdefm
.
formValidate
.
productids
=
this
.
ProductSelected
[
0
].
id
this
.
addpdefm
.
formValidate
.
productids
=
this
.
ProductSelected
[
0
].
id
;
this
.
addpdefm
.
formValidate
.
routingType
=
1
this
.
addpdefm
.
formValidate
.
routingType
=
1
;
this
.
addpdefm
.
selectpdefmid
=
0
this
.
addpdefm
.
selectpdefmid
=
0
;
this
.
headeroldid
=
0
this
.
headeroldid
=
0
;
this
.
addpdefm
.
createtype
=
'1'
this
.
addpdefm
.
createtype
=
"1"
;
let
that
=
this
let
that
=
this
;
var
url
=
`
${
systemUrl
}
/cache/generate_serialcode_x?Code=GY`
var
url
=
`
${
systemUrl
}
/cache/generate_serialcode_x?Code=GY`
;
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
addpdefm
.
formValidate
.
code
=
response
.
result
[
0
]
that
.
addpdefm
.
formValidate
.
code
=
response
.
result
[
0
]
;
that
.
addpdefm
.
gycode
=
response
.
result
[
0
]
that
.
addpdefm
.
gycode
=
response
.
result
[
0
]
;
})
//编号
})
;
//编号
var
url
=
var
url
=
`
${
designUrl
}
/productinfo/getbyid?id=`
+
this
.
ProductSelected
[
0
].
id
`
${
designUrl
}
/productinfo/getbyid?id=`
+
this
.
ProductSelected
[
0
].
id
;
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
addpdefm
.
ProductName
=
response
.
result
.
name
this
.
addpdefm
.
ProductName
=
response
.
result
.
name
;
this
.
addpdefm
.
ProductCode
=
response
.
result
.
drawingNo
this
.
addpdefm
.
ProductCode
=
response
.
result
.
drawingNo
;
})
//产品名称
})
;
//产品名称
this
.
addpdefm
.
Loadfile
(
0
)
this
.
addpdefm
.
Loadfile
(
0
)
;
this
.
addpdefm
.
setshow
()
this
.
addpdefm
.
setshow
()
;
},
},
saveCancelModel
()
{
saveCancelModel
()
{
this
.
modal1
=
false
this
.
modal1
=
false
;
},
},
clearModal
()
{
clearModal
()
{
this
.
addpdefm
.
id
=
0
this
.
addpdefm
.
id
=
0
;
this
.
addpdefm
.
formValidate
.
name
=
''
this
.
addpdefm
.
formValidate
.
name
=
""
;
this
.
addpdefm
.
formValidate
.
version
=
'1'
this
.
addpdefm
.
formValidate
.
version
=
"1"
;
this
.
addpdefm
.
formValidate
.
versioncode
=
1
this
.
addpdefm
.
formValidate
.
versioncode
=
1
;
this
.
addpdefm
.
formValidate
.
task_type_str
=
'1'
this
.
addpdefm
.
formValidate
.
task_type_str
=
"1"
;
this
.
addpdefm
.
formValidate
.
print_data_name
=
''
this
.
addpdefm
.
formValidate
.
print_data_name
=
""
;
this
.
addpdefm
.
formValidate
.
print_data_version
=
'1'
this
.
addpdefm
.
formValidate
.
print_data_version
=
"1"
;
this
.
addpdefm
.
formValidate
.
print_data_versioncode
=
1
this
.
addpdefm
.
formValidate
.
print_data_versioncode
=
1
;
this
.
addpdefm
.
formValidate
.
production_batch
=
''
this
.
addpdefm
.
formValidate
.
production_batch
=
""
;
this
.
addpdefm
.
formValidate
.
remark
=
''
this
.
addpdefm
.
formValidate
.
remark
=
""
;
this
.
addpdefm
.
Mianids
=
''
this
.
addpdefm
.
Mianids
=
""
;
this
.
addpdefm
.
MianCode
=
''
this
.
addpdefm
.
MianCode
=
""
;
this
.
addpdefm
.
MianVer
=
''
this
.
addpdefm
.
MianVer
=
""
;
this
.
addpdefm
.
ProductCode
=
''
this
.
addpdefm
.
ProductCode
=
""
;
this
.
addpdefm
.
formValidate
.
change_order_code
=
''
this
.
addpdefm
.
formValidate
.
change_order_code
=
""
;
this
.
addpdefm
.
formValidate
.
change_order_date
=
''
this
.
addpdefm
.
formValidate
.
change_order_date
=
""
;
this
.
addpdefm
.
formValidate
.
change_method
=
''
this
.
addpdefm
.
formValidate
.
change_method
=
""
;
this
.
addpdefm
.
formValidate
.
change_order_id
=
0
this
.
addpdefm
.
formValidate
.
change_order_id
=
0
;
},
},
modalOk
()
{
modalOk
()
{
if
(
this
.
createtype
==
2
&&
this
.
headerid
==
0
)
{
if
(
this
.
createtype
==
2
&&
this
.
headerid
==
0
)
{
this
.
$Message
.
error
(
'请选择要克隆的工艺规程'
)
this
.
$Message
.
error
(
"请选择要克隆的工艺规程"
);
return
return
;
}
else
{
}
else
{
this
.
saveHeader
(
false
)
this
.
saveHeader
(
false
)
;
}
}
},
},
//保存增加修改
//保存增加修改
saveHeader
(
next
)
{
saveHeader
(
next
)
{
var
a
=
this
.
addpdefm
var
a
=
this
.
addpdefm
;
var
filelist
=
a
.
getfile
()
var
filelist
=
a
.
getfile
()
;
let
isvalidate
=
false
let
isvalidate
=
false
;
a
.
$refs
[
'formValidate'
].
validate
((
valid
)
=>
{
a
.
$refs
[
"formValidate"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
isvalidate
=
valid
isvalidate
=
valid
;
}
else
{
}
else
{
}
}
})
})
;
if
(
!
isvalidate
)
{
if
(
!
isvalidate
)
{
return
return
;
}
}
var
ar
=
this
.
data1
.
find
(
(
val
)
=>
{
var
ar
=
this
.
data1
.
find
(
val
=>
{
return
val
.
code
==
a
.
formValidate
.
code
return
val
.
code
==
a
.
formValidate
.
code
;
})
})
;
if
(
ar
&&
a
.
formValidate
.
id
==
0
)
{
if
(
ar
&&
a
.
formValidate
.
id
==
0
)
{
this
.
$Message
.
error
(
'文件编号已存在'
)
this
.
$Message
.
error
(
"文件编号已存在"
);
return
return
;
}
}
if
(
a
.
formValidate
.
code
!=
null
)
{
if
(
a
.
formValidate
.
code
!=
null
)
{
var
url
=
`
${
designUrl
}
/routingheader/createorupdate`
var
url
=
`
${
designUrl
}
/routingheader/createorupdate`
;
service
service
.
post
(
.
post
(
`
${
url
}
`
,
{
`
${
url
}
`
,
{
routingHeaderEntity
:
a
.
formValidate
,
routingHeaderEntity
:
a
.
formValidate
,
FileList
:
filelist
FileList
:
filelist
}
})
)
.
then
(
response
=>
{
.
then
((
response
)
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
if
(
!
next
)
{
if
(
!
next
)
{
if
(
this
.
headeroldid
==
0
)
{
if
(
this
.
headeroldid
==
0
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
}
}
}
}
if
(
a
.
formValidate
.
id
==
0
)
{
if
(
a
.
formValidate
.
id
==
0
)
{
this
.
pageindex
=
0
this
.
pageindex
=
0
;
this
.
loaddata
()
this
.
loaddata
()
;
}
else
{
}
else
{
this
.
loaddata
()
this
.
loaddata
()
;
}
}
this
.
headeroldid
=
a
.
selectpdefmid
this
.
headeroldid
=
a
.
selectpdefmid
;
this
.
headerInfo
=
a
.
formValidate
this
.
headerInfo
=
a
.
formValidate
;
let
versioncode
=
this
.
headerInfo
.
versioncode
let
versioncode
=
this
.
headerInfo
.
versioncode
;
let
task_type
=
this
.
headerInfo
.
task_type
let
task_type
=
this
.
headerInfo
.
task_type
;
let
development_mode
=
this
.
headerInfo
.
development_mode
let
development_mode
=
this
.
headerInfo
.
development_mode
;
let
print_data_versioncode
=
this
.
headerInfo
let
print_data_versioncode
=
this
.
headerInfo
.
print_data_versioncode
.
print_data_versioncode
;
a
.
formValidate
=
response
.
result
a
.
formValidate
=
response
.
result
;
a
.
formValidate
.
versioncode
=
versioncode
a
.
formValidate
.
versioncode
=
versioncode
;
a
.
formValidate
.
task_type
=
task_type
a
.
formValidate
.
task_type
=
task_type
;
a
.
formValidate
.
development_mode
=
development_mode
a
.
formValidate
.
development_mode
=
development_mode
;
a
.
formValidate
.
print_data_versioncode
=
print_data_versioncode
a
.
formValidate
.
print_data_versioncode
=
print_data_versioncode
;
this
.
headerInfo
.
id
=
response
.
result
.
id
this
.
headerInfo
.
id
=
response
.
result
.
id
;
a
.
updateEid
(
response
.
result
.
id
)
a
.
updateEid
(
response
.
result
.
id
)
;
this
.
modal1
=
false
this
.
modal1
=
false
;
this
.
headerid
=
response
.
result
.
id
this
.
headerid
=
response
.
result
.
id
;
if
(
this
.
headeroldid
!=
0
)
{
if
(
this
.
headeroldid
!=
0
)
{
var
url
=
var
url
=
`
${
designUrl
}
/routingdetail/copybyheader?headerID=`
+
`
${
designUrl
}
/routingdetail/copybyheader?headerID=`
+
this
.
headeroldid
+
this
.
headeroldid
+
'&headerNewID='
+
"&headerNewID="
+
this
.
headerid
this
.
headerid
;
service
.
post
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
post
(
`
${
url
}
`
).
then
(
response
=>
{
if
(
next
)
{
if
(
next
)
{
this
.
headeroldid
=
0
this
.
headeroldid
=
0
;
this
.
modalShow
=
true
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
isview
=
false
this
.
$refs
.
processNew
.
isview
=
false
;
this
.
$refs
.
processNew
.
loaddata
()
this
.
$refs
.
processNew
.
loaddata
()
;
}
else
{
}
else
{
this
.
$Message
.
success
(
'克隆成功'
)
this
.
$Message
.
success
(
"克隆成功"
);
this
.
headeroldid
=
0
this
.
headeroldid
=
0
;
a
.
selectpdefmid
=
0
a
.
selectpdefmid
=
0
;
this
.
editProcess
(
this
.
headerid
)
this
.
editProcess
(
this
.
headerid
)
;
}
}
})
})
;
}
else
{
}
else
{
if
(
next
)
{
if
(
next
)
{
this
.
modalShow
=
true
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
isview
=
false
this
.
$refs
.
processNew
.
isview
=
false
;
this
.
$refs
.
processNew
.
loaddata
()
this
.
$refs
.
processNew
.
loaddata
()
;
}
else
{
}
else
{
if
(
this
.
issendAudit
)
{
if
(
this
.
issendAudit
)
{
this
.
saveDocument
()
this
.
saveDocument
()
;
}
}
}
}
}
}
}
}
})
})
.
catch
(
(
error
)
=>
{
.
catch
(
error
=>
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
})
})
;
}
else
{
}
else
{
this
.
$Message
.
error
(
'请输入工艺文件编号'
)
this
.
$Message
.
error
(
"请输入工艺文件编号"
);
}
}
},
},
editFun
()
{
editFun
()
{
this
.
gymodaltitle
=
'编辑工艺规程'
this
.
gymodaltitle
=
"编辑工艺规程"
;
if
(
this
.
headerSelected
==
null
)
{
if
(
this
.
headerSelected
==
null
)
{
this
.
$Message
.
error
(
'请选择要修改的工艺规程'
)
this
.
$Message
.
error
(
"请选择要修改的工艺规程"
);
return
return
;
}
}
let
that
=
this
let
that
=
this
;
this
.
modal1
=
true
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
selectpdefmid
=
0
this
.
addpdefm
.
selectpdefmid
=
0
;
this
.
isview
=
false
this
.
isview
=
false
;
this
.
createtype
=
1
this
.
createtype
=
1
;
this
.
headeroldid
=
0
this
.
headeroldid
=
0
;
var
url
=
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
this
.
headerSelected
.
id
`
${
designUrl
}
/routingheader/getbyid?id=`
+
this
.
headerSelected
.
id
;
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
addpdefm
.
formValidate
=
response
.
result
that
.
addpdefm
.
formValidate
=
response
.
result
;
that
.
addpdefm
.
isview
=
this
.
isview
that
.
addpdefm
.
isview
=
this
.
isview
;
that
.
addpdefm
.
ProductName
=
response
.
result
.
productName
that
.
addpdefm
.
ProductName
=
response
.
result
.
productName
;
that
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
that
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
;
this
.
headerInfo
=
response
.
result
this
.
headerInfo
=
response
.
result
;
this
.
headerid
=
response
.
result
.
id
this
.
headerid
=
response
.
result
.
id
;
that
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
that
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
;
that
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
that
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
;
that
.
addpdefm
.
setshow
()
that
.
addpdefm
.
setshow
()
;
})
})
;
},
},
editProcess
(
id
)
{
editProcess
(
id
)
{
let
that
=
this
let
that
=
this
;
this
.
modal1
=
true
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
selectpdefmid
=
0
this
.
addpdefm
.
selectpdefmid
=
0
;
this
.
isview
=
false
this
.
isview
=
false
;
this
.
createtype
=
1
this
.
createtype
=
1
;
this
.
headeroldid
=
0
this
.
headeroldid
=
0
;
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
id
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
id
;
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
addpdefm
.
formValidate
=
response
.
result
that
.
addpdefm
.
formValidate
=
response
.
result
;
that
.
addpdefm
.
isview
=
this
.
isview
that
.
addpdefm
.
isview
=
this
.
isview
;
that
.
addpdefm
.
ProductName
=
response
.
result
.
productName
that
.
addpdefm
.
ProductName
=
response
.
result
.
productName
;
that
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
that
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
;
this
.
headerInfo
=
response
.
result
this
.
headerInfo
=
response
.
result
;
this
.
headerid
=
response
.
result
.
id
this
.
headerid
=
response
.
result
.
id
;
that
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
that
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
;
that
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
that
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
;
that
.
addpdefm
.
setshow
()
that
.
addpdefm
.
setshow
()
;
})
})
;
},
},
viewFun
(
params
)
{
viewFun
(
params
)
{
this
.
gymodaltitle
=
'查看工艺规程'
this
.
gymodaltitle
=
"查看工艺规程"
;
this
.
isview
=
true
this
.
isview
=
true
;
let
that
=
this
let
that
=
this
;
this
.
modal1
=
true
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
selectpdefmid
=
0
this
.
addpdefm
.
selectpdefmid
=
0
;
this
.
headeroldid
=
0
this
.
headeroldid
=
0
;
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
params
.
row
.
id
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
params
.
row
.
id
;
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
addpdefm
.
formValidate
=
response
.
result
that
.
addpdefm
.
formValidate
=
response
.
result
;
that
.
addpdefm
.
isview
=
this
.
isview
that
.
addpdefm
.
isview
=
this
.
isview
;
that
.
addpdefm
.
ProductName
=
response
.
result
.
productName
that
.
addpdefm
.
ProductName
=
response
.
result
.
productName
;
that
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
that
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
;
this
.
headerInfo
=
response
.
result
this
.
headerInfo
=
response
.
result
;
this
.
headerid
=
response
.
result
.
id
this
.
headerid
=
response
.
result
.
id
;
that
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
that
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
;
that
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
that
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
;
that
.
addpdefm
.
setshow
()
that
.
addpdefm
.
setshow
()
;
})
})
;
},
},
deleteFun
()
{
deleteFun
()
{
if
(
this
.
headerSelected
==
null
)
{
if
(
this
.
headerSelected
==
null
)
{
this
.
$Message
.
error
(
'请选择要删除的工艺规程'
)
this
.
$Message
.
error
(
"请选择要删除的工艺规程"
);
return
return
;
}
}
this
.
$Modal
.
confirm
({
this
.
$Modal
.
confirm
({
title
:
'提示'
,
title
:
"提示"
,
content
:
'确定要删除当前行?'
,
content
:
"确定要删除当前行?"
,
onOk
:
()
=>
{
onOk
:
()
=>
{
var
url
=
var
url
=
`
${
designUrl
}
/routingheader/delete?id=`
+
this
.
headerSelected
.
id
`
${
designUrl
}
/routingheader/delete?id=`
+
this
.
headerSelected
.
id
;
service
service
.
delete
(
`
${
url
}
`
)
.
delete
(
`
${
url
}
`
)
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
$Message
.
success
(
"删除成功"
);
this
.
loaddata
()
this
.
loaddata
()
;
}
}
})
})
.
catch
(
(
error
)
=>
{
.
catch
(
error
=>
{
this
.
$Message
.
error
(
'删除失败'
)
this
.
$Message
.
error
(
"删除失败"
);
})
})
;
},
},
onCancel
:
()
=>
{}
onCancel
:
()
=>
{}
})
})
;
},
},
sendAuditFun
()
{
sendAuditFun
()
{
if
(
this
.
headerSelected
==
null
)
{
if
(
this
.
headerSelected
==
null
)
{
this
.
$Message
.
error
(
'请选择要送审的工艺规程'
)
this
.
$Message
.
error
(
"请选择要送审的工艺规程"
);
return
return
;
}
}
this
.
documentShow
=
true
this
.
documentShow
=
true
;
this
.
$refs
.
sendAudit
.
intData
(
this
.
headerSelected
)
this
.
$refs
.
sendAudit
.
intData
(
this
.
headerSelected
)
;
},
},
saveDocument
()
{
saveDocument
()
{
this
.
documentShow
=
true
this
.
documentShow
=
true
;
this
.
$refs
.
sendAudit
.
intData
(
this
.
headerInfo
)
this
.
$refs
.
sendAudit
.
intData
(
this
.
headerInfo
)
;
},
},
//送审
//送审
passDocument
()
{
passDocument
()
{
this
.
dataListRetrun
=
[]
this
.
dataListRetrun
=
[]
;
this
.
dataListRetrun
=
this
.
$refs
.
sendAudit
.
returnDataList
()
this
.
dataListRetrun
=
this
.
$refs
.
sendAudit
.
returnDataList
()
;
this
.
$http
.
order
.
batchstart
(
this
.
dataListRetrun
).
then
(
(
res
)
=>
{
this
.
$http
.
order
.
batchstart
(
this
.
dataListRetrun
).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
'工艺规程送审成功!'
)
this
.
$Message
.
success
(
"工艺规程送审成功!"
);
this
.
loaddata
()
this
.
loaddata
()
;
//this.easySearch('')
//this.easySearch('')
}
else
{
}
else
{
this
.
$Message
.
error
(
'工艺规程送审失败!'
)
this
.
$Message
.
error
(
"工艺规程送审失败!"
);
}
}
})
})
;
this
.
documentShow
=
false
this
.
documentShow
=
false
;
},
},
cancel
()
{},
cancel
()
{},
nextStepandSave
()
{
nextStepandSave
()
{
this
.
saveHeader
(
true
)
this
.
saveHeader
(
true
)
;
},
},
nextStep
()
{
nextStep
()
{
this
.
modalShow
=
true
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
isview
=
true
this
.
$refs
.
processNew
.
isview
=
true
;
this
.
$refs
.
processNew
.
loaddata
()
this
.
$refs
.
processNew
.
loaddata
()
;
},
},
laststep
()
{
laststep
()
{
this
.
modalShow
=
false
this
.
modalShow
=
false
;
this
.
modal1
=
true
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
formValidate
=
this
.
headerInfo
this
.
addpdefm
.
formValidate
=
this
.
headerInfo
;
that
.
addpdefm
.
isview
=
this
.
isview
that
.
addpdefm
.
isview
=
this
.
isview
;
that
.
addpdefm
.
ProductName
=
this
.
headerInfo
.
productName
that
.
addpdefm
.
ProductName
=
this
.
headerInfo
.
productName
;
that
.
addpdefm
.
ProductCode
=
this
.
headerInfo
.
productCode
that
.
addpdefm
.
ProductCode
=
this
.
headerInfo
.
productCode
;
that
.
addpdefm
.
MianVer
=
this
.
headerInfo
.
mianVer
that
.
addpdefm
.
MianVer
=
this
.
headerInfo
.
mianVer
;
that
.
addpdefm
.
MianCode
=
this
.
headerInfo
.
mianCode
that
.
addpdefm
.
MianCode
=
this
.
headerInfo
.
mianCode
;
this
.
addpdefm
.
setshow
()
this
.
addpdefm
.
setshow
()
;
},
},
saveCancel1
()
{
saveCancel1
()
{
this
.
modalShow
=
false
this
.
modalShow
=
false
;
},
},
Headerview
(
params
)
{
Headerview
(
params
)
{
//预览
//预览
this
.
processviewModal
=
true
this
.
processviewModal
=
true
;
this
.
$refs
.
processview
.
loaddata
(
params
.
row
.
id
)
this
.
$refs
.
processview
.
loaddata
(
params
.
row
.
id
)
;
},
},
saveProcessView
()
{
saveProcessView
()
{
this
.
processviewModal
=
true
this
.
processviewModal
=
true
;
this
.
$refs
.
processview
.
loaddata
(
this
.
headerid
)
this
.
$refs
.
processview
.
loaddata
(
this
.
headerid
)
;
},
},
//工艺更改
//工艺更改
TechnologyChange
()
{
TechnologyChange
()
{
if
(
this
.
headerSelected
==
null
)
{
if
(
this
.
headerSelected
==
null
)
{
this
.
$Message
.
error
(
'请选择工艺!'
)
this
.
$Message
.
error
(
"请选择工艺!"
);
return
return
;
}
}
this
.
$refs
.
routingchangeorder
.
flag
=
0
this
.
$refs
.
routingchangeorder
.
flag
=
0
;
this
.
$refs
.
routingchangeorder
.
routing_header_Id
=
this
.
headerSelected
.
id
this
.
$refs
.
routingchangeorder
.
routing_header_Id
=
this
.
headerSelected
.
id
;
var
userId
=
this
.
$store
.
state
.
userInfo
.
userId
var
userId
=
this
.
$store
.
state
.
userInfo
.
userId
;
let
parma
=
{
let
parma
=
{
Id
:
userId
Id
:
userId
}
}
;
this
.
$refs
.
routingchangeorder
.
changeorder_code
=
''
this
.
$refs
.
routingchangeorder
.
changeorder_code
=
""
;
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
(
(
res
)
=>
{
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
result
)
{
this
.
$refs
.
routingchangeorder
.
formValidate
=
{
this
.
$refs
.
routingchangeorder
.
formValidate
=
{
technical_name
:
this
.
headerSelected
.
name
,
technical_name
:
this
.
headerSelected
.
name
,
technical_code
:
this
.
headerSelected
.
code
,
technical_code
:
this
.
headerSelected
.
code
,
department_name
:
res
.
result
.
departmentTitle
,
department_name
:
res
.
result
.
departmentTitle
,
propose_user_name
:
res
.
result
.
userName
propose_user_name
:
res
.
result
.
userName
};
}
}
}
});
})
var
url1
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=JSWJGGD`
;
var
url1
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=JSWJGGD`
service
.
get
(
`
${
url1
}
`
).
then
(
response
=>
{
service
.
get
(
`
${
url1
}
`
).
then
((
response
)
=>
{
this
.
$refs
.
routingchangeorder
.
changeorder_code
=
response
.
result
;
this
.
$refs
.
routingchangeorder
.
changeorder_code
=
response
.
result
});
})
this
.
$refs
.
routingchangeorder
.
modelChange
=
true
;
this
.
$refs
.
routingchangeorder
.
modelChange
=
true
},
},
Main
(
data
)
{
Main
(
data
)
{
// this.eid1 = ''
// this.eid1 = ''
this
.
seleId
=
data
.
row
.
id
this
.
seleId
=
data
.
row
.
id
;
this
.
$refs
.
changelist
.
seleId
=
data
.
row
.
id
this
.
$refs
.
changelist
.
seleId
=
data
.
row
.
id
;
let
url
=
`
${
designUrl
}
/routingheaderchangeorder/getpaged`
let
url
=
`
${
designUrl
}
/routingheaderchangeorder/getpaged`
;
service
service
.
get
(
`
${
url
}
`
,
{
routing_header_id
:
this
.
seleId
}).
then
(
res
=>
{
.
get
(
`
${
url
}
`
,
{
routing_header_id
:
this
.
seleId
})
.
then
((
res
)
=>
{
//console.log(res)
//console.log(res)
this
.
$refs
.
changelist
.
data2
=
res
.
result
.
items
this
.
$refs
.
changelist
.
data2
=
res
.
result
.
items
;
this
.
$refs
.
changelist
.
myloading
=
false
this
.
$refs
.
changelist
.
myloading
=
false
;
if
(
this
.
$refs
.
changelist
.
data2
.
length
==
0
)
{
if
(
this
.
$refs
.
changelist
.
data2
.
length
==
0
)
{
this
.
$Message
.
error
(
'该工艺规程没有更改单!'
)
this
.
$Message
.
error
(
"该工艺规程没有更改单!"
);
this
.
$refs
.
changelist
.
show3
=
false
this
.
$refs
.
changelist
.
show3
=
false
;
return
return
;
}
}
this
.
$refs
.
changelist
.
show3
=
true
this
.
$refs
.
changelist
.
show3
=
true
;
})
});
}
}
}
}
}
}
;
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.order-quotation {
.order-quotation {
...
...
pages/technology/index.vue
View file @
2b7a2554
...
@@ -80,6 +80,10 @@
...
@@ -80,6 +80,10 @@
<Button
type=
"primary"
@
click=
"passDocument"
>
工艺规程送审
</Button>
<Button
type=
"primary"
@
click=
"passDocument"
>
工艺规程送审
</Button>
</div>
</div>
</Modal>
</Modal>
<!-- 工艺更改弹框 -->
<routingchangeorder
ref=
"routingchangeorder"
></routingchangeorder>
<!-- 工艺更改表弹框 -->
<changelist
ref=
"changelist"
></changelist>
<div
class=
"fullWindow flex fd"
v-if=
"viewModal"
>
<div
class=
"fullWindow flex fd"
v-if=
"viewModal"
>
<div
class=
"top flex"
>
<div
class=
"top flex"
>
<div
v-width=
"200"
>
<div
v-width=
"200"
>
...
@@ -112,11 +116,14 @@
...
@@ -112,11 +116,14 @@
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
service
from
'@/plugins/request'
import
Search
from
"./search"
;
import
Search
from
"./search"
;
import
ProductTree
from
"@/components/page/productTree.vue"
;
import
ProductTree
from
"@/components/page/productTree.vue"
;
import
sendAudit
from
"./sendAudit.vue"
;
import
sendAudit
from
"./sendAudit.vue"
;
import
routingchangeorder
from
'../processDesign/Process/routingchangeorder.vue'
import
changelist
from
'../processDesign/Process/changelist.vue'
export
default
{
export
default
{
components
:
{
ProductTree
,
Search
,
sendAudit
},
components
:
{
ProductTree
,
Search
,
sendAudit
,
routingchangeorder
,
changelist
},
head
:
{
head
:
{
title
:
"工艺规程"
,
title
:
"工艺规程"
,
author
:
"henq"
,
author
:
"henq"
,
...
@@ -290,9 +297,9 @@ export default {
...
@@ -290,9 +297,9 @@ export default {
"op"
,
"op"
,
{
{
attrs
:
{
oprate
:
"detail"
},
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
sendAuditFun
(
params
.
row
)
}
// on: { click: () => this.TechnologyChange
(params.row) }
},
},
params
.
row
.
approvalStatus
==
4
?
"新增更改单"
:
"查看
更改单"
"新增
更改单"
),
),
h
(
h
(
"op"
,
"op"
,
...
@@ -450,6 +457,51 @@ export default {
...
@@ -450,6 +457,51 @@ export default {
}
}
});
});
this
.
documentShow
=
false
;
this
.
documentShow
=
false
;
},
//工艺更改
TechnologyChange
(
row
)
{
this
.
$refs
.
routingchangeorder
.
flag
=
0
this
.
$refs
.
routingchangeorder
.
routing_header_Id
=
row
.
id
var
userId
=
this
.
$store
.
state
.
userInfo
.
userId
let
parma
=
{
Id
:
userId
}
this
.
$refs
.
routingchangeorder
.
changeorder_code
=
''
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
((
res
)
=>
{
if
(
res
.
result
)
{
this
.
$refs
.
routingchangeorder
.
formValidate
=
{
technical_name
:
row
.
name
,
technical_code
:
row
.
code
,
department_name
:
res
.
result
.
departmentTitle
,
propose_user_name
:
res
.
result
.
userName
}
}
})
var
url1
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=JSWJGGD`
service
.
get
(
`
${
url1
}
`
).
then
((
response
)
=>
{
this
.
$refs
.
routingchangeorder
.
changeorder_code
=
response
.
result
})
this
.
$refs
.
routingchangeorder
.
modelChange
=
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
})
}
}
}
}
};
};
...
...
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