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
91adb124
Commit
91adb124
authored
Jul 17, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mesplan
parent
c104f68f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
210 additions
and
367 deletions
+210
-367
process.vue
components/orderOperator/process.vue
+40
-22
add.vue
pages/mesPlan/add.vue
+17
-2
edit.vue
pages/mesPlan/edit.vue
+16
-2
index.vue
pages/mesPlan/index.vue
+124
-256
sendView.vue
pages/mesPlan/sendView.vue
+13
-85
No files found.
components/orderOperator/process.vue
View file @
91adb124
...
...
@@ -71,28 +71,46 @@ export default {
load
(
v
)
{
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();
// }
// });
//判断流程是否启用
let
params
=
{
id
:
v
};
this
.
$api
.
get
(
`
${
workflowUrl
}
/schema/getbyid`
,
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
//启用
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
();
}
});
}
// else {
// this.$Message.error("流程未启用");
// }
}
else
{
this
.
$Message
.
error
(
"操作失败"
);
}
});
},
userIds
()
{
var
ids
=
[];
...
...
pages/mesPlan/add.vue
View file @
91adb124
...
...
@@ -171,10 +171,25 @@ export default {
}
]
},
disabled
:
false
disabled
:
false
,
wfstatu
:
1
};
},
mounted
()
{
let
params
=
{
id
:
"123327da-42b3-41f6-b785-cf933f137a95"
};
this
.
$api
.
get
(
`
${
workflowUrl
}
/schema/getbyid`
,
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
wfstatu
=
1
;
}
else
{
this
.
wfstatu
=
3
;
}
}
});
this
.
loadTree
();
},
methods
:
{
...
...
@@ -182,7 +197,7 @@ export default {
this
.
$refs
.
formValidate
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
this
.
orderSearchForm
.
status
=
1
;
this
.
orderSearchForm
.
status
=
this
.
wfstatu
;
Api
.
mesplancreate
(
this
.
orderSearchForm
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
...
...
pages/mesPlan/edit.vue
View file @
91adb124
...
...
@@ -147,7 +147,8 @@ export default {
},
placeholdeinfo
:
""
,
list
:
[],
data1
:
[]
data1
:
[],
wfstatu
:
1
};
},
props
:
{
...
...
@@ -159,6 +160,19 @@ export default {
}
},
mounted
()
{
let
params
=
{
id
:
"123327da-42b3-41f6-b785-cf933f137a95"
};
this
.
$api
.
get
(
`
${
workflowUrl
}
/schema/getbyid`
,
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
wfstatu
=
1
;
}
else
{
this
.
wfstatu
=
3
;
}
}
});
this
.
loadTree
();
},
methods
:
{
...
...
@@ -172,7 +186,7 @@ export default {
this
.
$refs
.
formValidate
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
this
.
orderSearchForm
.
status
=
1
;
this
.
orderSearchForm
.
status
=
this
.
wfstatu
;
Api
.
mesorderupdate
(
this
.
orderSearchForm
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
...
...
pages/mesPlan/index.vue
View file @
91adb124
This diff is collapsed.
Click to expand it.
pages/mesPlan/sendView.vue
View file @
91adb124
<
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>
<Table
border
:columns=
"columns1"
:data=
"dataList"
class=
"tableCommon"
: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>
<Row>
<Process
ref=
"userProcess"
schemaIdVal=
"123327da-42b3-41f6-b785-cf933f137a95"
/>
</Row>
</div>
</div>
</
template
>
<
script
>
import
Detail
from
"./detail"
;
import
Process
from
"@/components/orderOperator/process"
;
var
myDate
=
new
Date
();
export
default
{
name
:
"send"
,
components
:
{
Detail
Detail
,
Process
},
data
()
{
return
{
...
...
@@ -146,7 +103,7 @@ export default {
},
rowList
:
[],
row1
:
{},
tbHeight
:
0
tbHeight
:
0
,
};
},
props
:
{
...
...
@@ -167,46 +124,17 @@ export default {
//返回审批数据
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
;
getUsers
()
{
let
ues
=
this
.
$refs
.
userProcess
;
return
ues
.
immutData
;
},
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";
// })();
// };
},
created
()
{},
mounted
()
{},
watch
:
{
row
(
v
)
{
if
(
v
!=
[])
{
...
...
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