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
6994cfe3
Commit
6994cfe3
authored
Jun 12, 2020
by
kangzhenfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工时分配ok
parent
35a08557
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
24 deletions
+91
-24
api.js
pages/produce/execute/api.js
+13
-1
add.vue
pages/produce/execute/taskTime/add.vue
+29
-12
index.vue
pages/produce/execute/taskTime/index.vue
+49
-11
No files found.
pages/produce/execute/api.js
View file @
6994cfe3
...
...
@@ -46,8 +46,20 @@ export default {
getentryusers
(
params
)
{
return
Api
.
get
(
`
${
PlanUrl
}
/orderexecutenew/entryusers`
,
params
);
},
//工时分配--总工时待分配
//工时分配--工时列表
getentrylist
(
params
)
{
return
Api
.
post
(
`
${
technologyUrl
}
workhours/list`
,
params
);
},
//工时分配--总工时待分配workhours/
getallhours
(
params
)
{
return
Api
.
post
(
`
${
technologyUrl
}
workhours/allhours`
,
params
);
},
//工时分配--新增保存
subcreatehours
(
params
)
{
return
Api
.
post
(
`
${
technologyUrl
}
workhours/createmore`
,
params
);
},
//工时分配--删除一条
deletehours
(
params
)
{
return
Api
.
delete
(
`
${
technologyUrl
}
workhours/delete?id=`
+
params
);
},
}
\ No newline at end of file
pages/produce/execute/taskTime/add.vue
View file @
6994cfe3
...
...
@@ -66,7 +66,7 @@
<Col
span=
"24"
>
<FormItem
label=
"分配工时"
prop=
"setTime"
>
<!--
<InputNumber
:max=
"30"
:min=
"0"
v-model=
"value1"
></InputNumber>
天
-->
<InputNumber
:max=
"maxHour"
:min=
"1"
v-model=
"entity.workHour"
@
on-change=
"testChange"
></InputNumber>
工时
<InputNumber
:max=
"maxHour"
:min=
"1"
v-model=
"entity.workHour"
@
on-change=
"testChange"
></InputNumber>
工时
<!--
<InputNumber
:max=
"59"
:min=
"1"
v-model=
"value1"
></InputNumber>
分钟
-->
</FormItem>
</Col>
...
...
@@ -104,27 +104,27 @@ export default {
userName
:
"张珊珊1"
,
cardNo
:
"08965481"
,
id
:
1
},
{
},{
checked
:
false
,
userName
:
"张珊珊2"
,
cardNo
:
"08965482"
,
id
:
2
},
{
checked
:
false
,
userName
:
"张珊珊3"
,
cardNo
:
"08965483"
,
id
:
3
}
]
};
},
created
(){},
methods
:
{
handleSubmit
()
{
this
.
listMan
.
map
(
item
=>
{
if
(
item
.
checked
){
this
.
entity
.
cardNo
=
item
.
cardNo
}
})
console
.
log
(
this
.
entity
);
this
.
$emit
(
"on-ok"
,
this
.
entity
);
this
.
showSelect
=
true
// this.entity={}
},
//单选框
radioChange
(
val
)
{
...
...
@@ -132,6 +132,12 @@ export default {
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
entity
=
{
cardNo
:
""
,
oldUserse
:
null
,
userse
:
null
,
workHour
:
1
,
}
},
checkItem
(
i
)
{
if
(
this
.
userflag
){
...
...
@@ -153,10 +159,12 @@ export default {
});
oolist
.
map
(
u
=>
{
if
(
u
.
checked
)
{
this
.
entity
.
oldUserse
=
u
.
userName
;
this
.
entity
.
userName
=
u
.
userName
;
this
.
entity
.
userId
=
u
.
id
this
.
showSelect
=
false
}
else
{
this
.
entity
.
oldUserse
=
''
;
this
.
entity
.
userName
=
''
;
this
.
entity
.
userId
=
''
}
});
if
(
oolist
.
length
==
0
){
...
...
@@ -166,14 +174,23 @@ export default {
// 选择新增人员
changeUser
(
data
){
console
.
log
(
data
)
let
alloterInfo
=
this
.
$refs
.
userSelected
.
getSelectItems
();
if
(
data
&&
data
!=
undefined
){
this
.
userflag
=
true
}
if
(
data
==
undefined
){
this
.
userflag
=
false
}
let
alloterInfo
=
this
.
$refs
.
userSelected
.
getSelectItems
();
// if (!userInfo || userInfo.length == 0) {
// this.$Message.error("请选择人员!");
// return;
// }
console
.
log
(
alloterInfo
)
if
(
alloterInfo
.
length
>
0
){
this
.
entity
.
cardNo
=
alloterInfo
[
0
].
cardNo
this
.
entity
.
userName
=
alloterInfo
[
0
].
userName
this
.
entity
.
userId
=
alloterInfo
[
0
].
id
}
},
testChange
()
{
// 该方法在input内容改变是就会触发进行检测
...
...
pages/produce/execute/taskTime/index.vue
View file @
6994cfe3
...
...
@@ -23,8 +23,8 @@
<div
class=
"gs_card_box"
>
<Card
class=
"gs_card"
v-for=
"(item,index) in cardMan"
:key=
"index"
>
<p
slot=
"title"
class=
"gs_title"
>
{{
item
.
user
Nam
e
}}
<
span
class=
"fr"
>
{{
item
.
cardNo
}}
</span
>
{{
item
.
user
Titl
e
}}
<
!--
<span
class=
"fr"
>
{{
item
.
cardNo
}}
</span>
--
>
</p>
<!--
<p
class=
"gs_p"
>
所属车间:车间A
{{
i
}}
</p>
<p
class=
"gs_p"
>
所属班组:班组B
{{
i
}}
</p>
-->
...
...
@@ -41,7 +41,7 @@
<!--
<a
class=
"gs_edit"
@
click=
"editItem"
>
<Icon
type=
"md-create"
/>
编辑
</a>
-->
<a
class=
"gs_del"
@
click=
"delItem"
>
<a
class=
"gs_del"
@
click=
"delItem
(item.id)
"
>
<Icon
type=
"ios-trash-outline"
/>
删除
</a>
</p>
...
...
@@ -112,8 +112,30 @@ export default {
console
.
log
(
"获取失败。"
)
}
})
let
parm
=
{
conditions
:
[
{
fieldName
:
"dispatchId"
,
fieldValue
:
this
.
$route
.
query
.
id
,
conditionalType
:
"Equal"
}
],
}
Api
.
getentrylist
(
parm
).
then
(
rest
=>
{
if
(
rest
.
success
){
this
.
cardMan
=
rest
.
result
}
else
{
console
.
log
(
"获取失败。"
)
}
})
},
addItem
(){
// let aa=this.$refs.addview.$refs.userSelected.getSelectItems()
// console.log("1",aa)
if
(
this
.
allHours
==
0
){
this
.
$Message
.
info
(
"无工时分配..."
)
return
}
this
.
addmodal
=
true
let
id
=
this
.
$route
.
query
.
id
Api
.
getentryusers
({
Id
:
id
}).
then
(
res
=>
{
...
...
@@ -127,12 +149,19 @@ export default {
editItem
(){
this
.
$Message
.
success
(
"编辑工时..."
)
},
delItem
(){
delItem
(
itmid
){
this
.
$Modal
.
confirm
({
title
:
this
.
title
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
onOk
:
()
=>
{
this
.
$Message
.
success
(
"删除工时..."
)
Api
.
deletehours
(
itmid
).
then
(
res
=>
{
if
(
res
.
success
){
this
.
laodHorse
()
this
.
$Message
.
success
(
"工时已删除"
)
}
else
{
this
.
$Message
.
error
(
"删除失败..."
)
}
})
}
});
},
...
...
@@ -140,12 +169,21 @@ export default {
this
.
addmodal
=
false
},
addInfo
(
formdata
){
console
.
log
(
formdata
)
this
.
cardMan
.
push
(
formdata
)
// this.cardMan.userName = formdata.userse||formdata.oldUserse
// this.cardMan.cardNo = formdata.cardNo
// this.cardMan.workHour = formdata.workHour
console
.
log
(
this
.
cardMan
)
let
parme
=
{
users
:
[
{
userTitle
:
formdata
.
userName
,
userId
:
formdata
.
userId
}
],
workHour
:
formdata
.
workHour
,
dispatchId
:
this
.
$route
.
query
.
id
,
routingDetailId
:
this
.
$route
.
query
.
routid
,
count
:
this
.
$route
.
query
.
quantity
}
Api
.
subcreatehours
(
parme
).
then
(
res
=>
{
if
(
res
.
success
){
this
.
laodHorse
()
}
})
this
.
addmodal
=
false
}
},
...
...
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