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
4d15583d
Commit
4d15583d
authored
Jul 17, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
process
parent
7266e7cd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
343 additions
and
73 deletions
+343
-73
process.vue
components/orderOperator/process.vue
+62
-58
sendView.vue
pages/mesPlan/sendView.vue
+223
-0
add.vue
pages/technology/add.vue
+30
-11
add.vue
pages/technology/details/routinghcorder/add.vue
+25
-4
api.js
pages/workflow/process/api.js
+3
-0
No files found.
components/orderOperator/process.vue
View file @
4d15583d
...
...
@@ -4,25 +4,29 @@
<Divider
/>
<Timeline>
<div>
<TimelineItem
v-for=
"(item, index) in dataImmut"
:key=
"index"
>
<TimelineItem
v-for=
"(item, index) in dataImmut"
:key=
"index"
>
<Badge
:count=
"index + 1"
slot=
"dot"
:type=
"index==cur?'primary':'normal'"
></Badge>
<p
class=
"time"
>
{{
item
.
name
}}
(
<state
code=
"workflow.form.audit.type"
:value=
"item.operation"
/>
)
<Icon
v-if=
"item.isFixed"
type=
"ios-lock"
/>
<p
class=
"time"
>
{{
item
.
name
}}
(
<state
code=
"workflow.form.audit.type"
:value=
"item.operation"
/>
)
<Icon
v-if=
"item.isFixed"
type=
"ios-lock"
/>
</p>
<p
class=
"content"
v-if=
"index==0"
>
发起人:
<User
:value=
"currentUserId"
/>
发起人:
<User
:value=
"currentUserId"
/>
</p>
<p
class=
"content"
v-else
>
<span>
审批人:
</span>
<CheckboxGroup
v-model=
"item.userIds"
@
on-change=
"userIds"
>
<Checkbox
v-for=
"(item1, index1) in item.defaultUsers.immutable"
:key=
"index1"
:label=
"item1"
:disabled=
"item.isFixed"
>
<User
:value=
"item1"
style=
"margin-right:5px;"
/>
</Checkbox>
<Checkbox
v-for=
"(item1, index1) in item.defaultUsers.immutable"
:key=
"index1"
:label=
"item1"
:disabled=
"item.isFixed"
>
<User
:value=
"item1"
style=
"margin-right:5px;"
/>
</Checkbox>
</CheckboxGroup>
</p>
<!--
<p
class=
"content"
v-else
>
...
...
@@ -31,7 +35,7 @@
:value=
"item1"
style=
"margin-right:5px;"
/>
</p>
-->
</p>
-->
</TimelineItem>
</div>
</Timeline>
...
...
@@ -39,81 +43,81 @@
</
template
>
<
script
>
export
default
{
name
:
'process'
,
name
:
"process"
,
components
:
{},
data
()
{
return
{
currentUserId
:
0
,
processTitle
:
'审批流程'
,
processTitle
:
"审批流程"
,
dataImmut
:
[],
dataMut
:
[],
cur
:
0
,
cur
:
0
,
immutData
:
[],
ids
:[],
schemaId
:
''
}
ids
:
[],
schemaId
:
""
}
;
},
props
:
{
schemaIdVal
:
{
type
:
String
,
default
:
''
default
:
""
}
},
created
()
{
this
.
currentUserId
=
this
.
$store
.
state
.
userInfo
.
userId
this
.
load
(
this
.
schemaIdVal
)
this
.
currentUserId
=
this
.
$store
.
state
.
userInfo
.
userId
;
this
.
load
(
this
.
schemaIdVal
)
;
},
methods
:
{
load
(
v
)
{
this
.
dataImmut
=
[]
this
.
dataMut
=
[]
let
url
=
`
${
workflowUrl
}
/schema/intend`
this
.
dataImmut
=
[]
;
this
.
dataMut
=
[]
;
let
url
=
`
${
workflowUrl
}
/schema/intend`
;
this
.
$api
.
get
(
url
,
{
schemaId
:
v
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
// console.warn("VVVV",r)
r
.
result
.
nodes
.
map
((
u
,
i
)
=>
{
if
(
i
>
0
)
{
let
ids
=
u
.
defaultUsers
.
immutable
.
concat
(
u
.
defaultUsers
.
mutable
)
u
.
defaultUsers
.
immutable
=
ids
;
u
.
userIds
=
this
.
$u
.
clone
(
ids
);
}
else
{
u
.
userIds
=
[
this
.
currentUserId
]
}
})
this
.
dataImmut
=
r
.
result
.
nodes
this
.
processTitle
=
r
.
result
.
name
// if (this.dataImmut.length >= 1) {
// this.immutData = this.dataImmut[1].defaultUsers.immutable
// }
this
.
userIds
();
}
})
// this.$api.get(url, { schemaId: v }).then(r
=> {
//
if (r.success) {
//
// console.warn("VVVV",r)
// r.result.nodes.map((u, i) =>
{
// if (i > 0)
{
// let ids = u.defaultUsers.immutable.concat(u.defaultUsers.mutable);
// u.defaultUsers.immutable =
ids;
// u.userIds =
this.$u.clone(ids);
// } else
{
// u.userIds = [this.currentUserId];
//
}
// });
// this.dataImmut = r.result.nodes;
// this.processTitle = r.result.name;
//
// if (this.dataImmut.length >= 1) {
//
// this.immutData = this.dataImmut[1].defaultUsers.immutable
//
// }
//
this.userIds();
//
}
// });
},
userIds
(){
var
ids
=
[];
this
.
dataImmut
.
map
((
u
,
i
)
=>
{
ids
.
push
({
id
:
u
.
id
,
userIds
:
u
.
userIds
})
})
this
.
immutData
=
ids
;
userIds
()
{
var
ids
=
[];
this
.
dataImmut
.
map
((
u
,
i
)
=>
{
ids
.
push
({
id
:
u
.
id
,
userIds
:
u
.
userIds
});
})
;
this
.
immutData
=
ids
;
// console.warn(ids);
},
l
(
key
)
{
key
=
'orderInfo'
+
'.'
+
key
return
this
.
$t
(
key
)
key
=
"orderInfo"
+
"."
+
key
;
return
this
.
$t
(
key
)
;
}
},
computed
:
{},
watch
:
{
schemaIdVal
(
v
)
{
if
(
v
)
{
this
.
load
(
v
)
this
.
load
(
v
)
;
}
}
}
}
}
;
</
script
>
<
style
scoped
></
style
>
pages/mesPlan/sendView.vue
0 → 100644
View file @
4d15583d
<
template
>
<div
style=
"width:100%;margin:0 auto"
>
<Detail
ref=
"detailRow"
:row=
"row1"
v-show=
"dataList.length==1"
></Detail>
<Table
border
:columns=
"columns1"
:data=
"dataList"
class=
"tableCommon"
v-show=
"dataList.length>1"
:height=
"tbHeight"
></Table>
<div
style=
"width100%;margin:40px auto"
>
<Form
:model=
"orderForm"
:label-width=
"110"
class=
"margin-top-20 margin-bottom-50"
:rules=
"ruleValidate"
ref=
"formValidate"
>
<Row>
<Col
span=
"6"
>
<FormItem
label=
"生产车间"
style=
"width:100%"
prop=
"ProductingPreparationPeople"
>
<WorkShopSelect
ref=
"userSelected"
v-model=
"orderForm.ProductingPreparationPeople"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"完成时间"
style=
"width:100%"
prop=
"ProductingPreparationFinishDate"
>
<DatePicker
v-model=
"orderForm.ProductingPreparationFinishDate"
type=
"date"
placeholder=
"请选择日期"
@
on-change=
"getTimeProductPFD"
></DatePicker>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"订单报价人员"
style=
"width:100%"
prop=
"QuotationPeople"
>
<UserSelect
ref=
"userSelected"
v-model=
"orderForm.QuotationPeople"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"完成时间"
style=
"width:100%"
prop=
"QuotationFinishDate"
>
<DatePicker
v-model=
"orderForm.QuotationFinishDate"
type=
"date"
placeholder=
"请选择日期"
@
on-change=
"getTimeQuotationFD"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
</div>
</div>
</
template
>
<
script
>
import
Detail
from
"./detail"
;
var
myDate
=
new
Date
();
export
default
{
name
:
"send"
,
components
:
{
Detail
},
data
()
{
return
{
divHeight
:
"400px"
,
roleTitle
:
"工艺员"
,
orderForm
:
{
ProductingPreparationPeople
:
null
,
//生产准备
ProductingPreparationFinishDate
:
""
,
//生产准备完成时间
QuotationPeople
:
null
,
//订单报价人员
QuotationFinishDate
:
""
//订单报价完成时间
},
columns1
:
[
{
title
:
this
.
l
(
"mesCode"
),
key
:
"mesCode"
,
width
:
180
,
tooltip
:
true
},
{
title
:
this
.
l
(
"productName"
),
key
:
"productName"
,
tooltip
:
true
},
{
key
:
"drawnNumber"
,
title
:
this
.
l
(
"drawnNumber"
),
align
:
"center"
,
width
:
140
},
{
title
:
this
.
l
(
"projectNumber"
),
key
:
"projectNumber"
,
width
:
140
},
{
title
:
this
.
l
(
"batchNumber"
),
key
:
"batchNumber"
,
width
:
120
,
tooltip
:
true
},
{
title
:
this
.
l
(
"quantity"
),
key
:
"quantity"
,
align
:
"right"
,
width
:
70
}
],
dataList
:
[],
row1
:
{},
dataListRetrun
:
[],
//确定后返回数据
ruleValidate
:
{
ProductingPreparationPeople
:
[
{
required
:
true
,
message
:
"请选择人员"
,
trigger
:
"change"
,
type
:
"number"
}
],
ProductingPreparationFinishDate
:
[
{
required
:
true
,
message
:
"请选择时间"
,
trigger
:
"change"
}
],
QuotationPeople
:
[
{
required
:
true
,
message
:
"请选择人员"
,
trigger
:
"change"
,
type
:
"number"
}
],
QuotationFinishDate
:
[
{
required
:
true
,
message
:
"请选择时间"
,
trigger
:
"change"
}
]
},
rowList
:
[],
row1
:
{},
tbHeight
:
0
};
},
props
:
{
row
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
}
},
methods
:
{
returnData
()
{
let
objStr
=
{};
objStr
.
ProductingPreparationPeople
=
this
.
orderForm
.
ProductingPreparationPeople
;
objStr
.
ProductingPreparationFinishDate
=
this
.
orderForm
.
ProductingPreparationFinishDate
;
objStr
.
QuotationPeople
=
this
.
orderForm
.
QuotationPeople
;
objStr
.
QuotationFinishDate
=
this
.
orderForm
.
QuotationFinishDate
;
//返回审批数据
return
objStr
;
},
getTimeProductPFD
(
value
)
{
this
.
orderForm
.
ProductingPreparationFinishDate
=
this
.
getFormatDateEnd
(
value
);
},
getTimeQuotationFD
(
value
)
{
this
.
orderForm
.
QuotationFinishDate
=
this
.
getFormatDateEnd
(
value
);
},
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
l
(
key
)
{
let
vkey
=
"mes_plan"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
},
created
()
{
//var theight = window.innerHeight - 400 + "px";
// this.divHeight = theight;
},
mounted
()
{
// window.onresize = () => {
// ///浏览器窗口大小变化
// return (() => {
// window.screenHeight = window.innerHeight;
// this.divHeight = window.screenHeight - 400 + "px";
// })();
// };
},
watch
:
{
row
(
v
)
{
if
(
v
!=
[])
{
this
.
dataList
=
this
.
$u
.
clone
(
this
.
row
);
this
.
row1
=
this
.
dataList
[
0
];
this
.
tbHeight
=
0
;
if
(
this
.
dataList
.
length
>
3
)
{
this
.
tbHeight
=
200
;
}
}
}
}
};
</
script
>
\ No newline at end of file
pages/technology/add.vue
View file @
4d15583d
...
...
@@ -155,6 +155,7 @@
</
template
>
<
script
>
import
Api
from
"./api"
;
import
ApiWorkflow
from
"../workflow/process/api"
;
import
iQuill
from
"@/components/quill"
;
export
default
{
name
:
"Add"
,
...
...
@@ -172,7 +173,7 @@ export default {
code
:
""
,
productId
:
null
,
productName
:
""
,
productBomId
:
null
,
productBomId
:
null
,
version
:
""
,
author
:
null
,
departmentId
:
null
,
...
...
@@ -182,7 +183,7 @@ export default {
upDetailId
:
null
,
routingType
:
null
,
status
:
0
,
approvalStatus
:
0
,
approvalStatus
:
4
,
remark
:
""
,
approvalStatusRemark
:
""
,
auditUserId1
:
""
,
...
...
@@ -243,19 +244,37 @@ export default {
}
else
{
this
.
entity
.
fileId
=
""
;
}
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
ApiWorkflow
.
getbyid
({
id
:
"2085025d-9c38-4834-846a-8f9d2f4c8553"
})
.
then
(
res
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
entity
.
approvalStatus
=
4
;
}
else
{
this
.
entity
.
approvalStatus
=
1
;
}
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"
保存
失败"
);
this
.
$Message
.
error
(
"
操作
失败"
);
console
.
warn
(
err
);
});
}
...
...
pages/technology/details/routinghcorder/add.vue
View file @
4d15583d
...
...
@@ -127,11 +127,12 @@
</Col>
</Row>
</Form>
<changeSendReview
ref=
"changeSendReview"
@
on-ok=
"ok"
></changeSendReview>
<changeSendReview
ref=
"changeSendReview"
@
on-ok=
"ok"
></changeSendReview>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
ApiWorkflow
from
"../../../workflow/process/api"
;
import
iQuill
from
"@/components/quill"
;
import
changeSendReview
from
"./changeSendReview.vue"
;
export
default
{
...
...
@@ -197,6 +198,27 @@ export default {
.
cathc
(
err
=>
{
this
.
$Message
.
error
(
"数据连接错误"
);
});
ApiWorkflow
.
getbyid
({
id
:
"d0cdafe3-2341-4499-a4f5-278ef0f30740"
})
.
then
(
res1
=>
{
alret
(
JSON
.
stringify
(
res1
))
if
(
res1
.
success
)
{
let
wfStatus
=
res1
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
submitShow
=
true
;
// this.entity.approvalStatus = 4;
}
else
{
// this.entity.approvalStatus = 1;
this
.
submitShow
=
false
;
}
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"操作失败"
);
console
.
warn
(
err
);
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
@@ -291,9 +313,8 @@ export default {
this
.
entity
.
departmentId
=
v
;
this
.
entity
.
departmentName
=
items
.
name
;
},
ok
()
{
this
.
$emit
(
"on-ok"
)
ok
()
{
this
.
$emit
(
"on-ok"
);
},
l
(
key
)
{
key
=
"routing_header_changeorder"
+
"."
+
key
;
...
...
pages/workflow/process/api.js
View file @
4d15583d
...
...
@@ -33,4 +33,7 @@ export default {
updateNode
(
params
)
{
//流程设计编辑保存
return
Api
.
post
(
`
${
workflowUrl
}
/node/update`
,
params
);
},
getbyid
(
params
)
{
//根据shemaId获取详细详细
return
Api
.
get
(
`
${
workflowUrl
}
/schema/getbyid`
,
params
);
//流程
},
}
\ No newline at end of file
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