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
03194a8a
Commit
03194a8a
authored
Nov 04, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workHour
parent
c3af3724
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
652 additions
and
463 deletions
+652
-463
api.js
pages/produce/api.js
+3
-1
orderlistWorkHour.vue
pages/produce/execute/components/orderlistWorkHour.vue
+112
-0
index.vue
pages/produce/execute/index.vue
+2
-2
indexWorkHour.vue
pages/produce/execute/indexWorkHour.vue
+142
-0
index.vue
pages/produce/workHour/index.vue
+393
-460
No files found.
pages/produce/api.js
View file @
03194a8a
...
...
@@ -7,7 +7,9 @@ export default {
getCardList
(
params
)
{
return
Api
.
post
(
`
${
PlanUrl
}
/orderexecutenew/list`
,
params
);
},
getList
(
params
)
{
return
Api
.
post
(
`
${
PlanUrl
}
/orderexecutenew/CompletedList`
,
params
);
},
//过程质量填报表
getentryqcrecordlist_new
(
params
)
{
return
Api
.
get
(
`
${
PlanUrl
}
orderexecutequalityrecord/getentryqcrecordlist_new`
,
params
);
...
...
pages/produce/execute/components/orderlistWorkHour.vue
0 → 100644
View file @
03194a8a
<
template
>
<div
class=
"order_list"
>
<div
class=
"card_box"
>
<Card
class=
"card_order"
v-for=
"(item,index) in listTasks"
:style=
"order==item.id?'box-shadow: 0px 0px 15px #333;':''"
@
click
.
native=
"goPage(item)"
:key=
"index"
:class=
"item.status==12 ? 'card_border1' : (item.status==14 ? 'card_border2': (item.status==5 ?'card_border3':
(item.status==7?'card_border4':(item.status==-1?'card_border5':''))))"
>
<!-- :class="item.status=='未开工'? 'card_border1' : (item.status=='执行中' ? 'card_border2': (item.status=='暂停中' ?'card_border3':
(item.status=='交检中'?'card_border4':(item.status=='交接中'?'card_border5':''))))"-->
<p
slot=
"title"
>
{{
item
.
mesCode
}}
<state
code=
"taskList.status"
ref=
"state"
class=
"fr"
:value=
"item.status"
type=
"text"
></state>
<!--
<span
>
{{
item
.
status
}}
</span>
-->
</p>
<p
class=
"order_tit"
>
{{
item
.
productName
}}
</p>
<p>
<Icon
type=
"ios-pricetags"
/>
{{
item
.
taskName
}}
</p>
<p>
{{
item
.
beginTime
}}
~
{{
item
.
endTime
}}
</p>
</Card>
<p>
共
{{
listTasks
.
length
}}
个工单
</p>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"../../api"
;
export
default
{
name
:
"orderlistWorkHour"
,
data
()
{
return
{
gnFlag
:
0
,
listTasks
:
[],
dataLength
:
0
};
},
props
:
{
order
:
{
type
:
[
String
,
Number
]
},
asc
:
{
type
:
Boolean
,
default
:
true
},
statu
:
{
type
:
Number
,
default
:
-
9
},
refresh
:
{
type
:
Boolean
,
default
:
true
}
},
created
()
{
this
.
loadTree
();
},
methods
:
{
loadTree
()
{
let
parmse
=
{
status
:
0
,
isAsc
:
this
.
asc
};
if
(
this
.
statu
!=
-
9
)
{
parmse
.
subWorkHourStatus
=
this
.
statu
}
Api
.
getList
(
parmse
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
listTasks
=
res
.
result
;
this
.
dataLength
=
res
.
result
.
length
;
}
});
},
gnFunto
(
number
,
type
)
{
this
.
gnFlag
=
number
;
},
goPage
(
item
)
{
this
.
$router
.
push
({
path
:
"/produce/execute/indexWorkHour"
,
query
:
{
id
:
item
.
id
,
orderId
:
item
.
orderId
,
executeId
:
item
.
executeId
,
headid
:
item
.
routingHeaderId
,
routid
:
item
.
routingDetailId
,
//工序ID
quantity
:
item
.
quantity
,
//派工数量
dispatchStatus
:
item
.
status
,
mesCode
:
item
.
mesCode
,
productName
:
item
.
productName
,
drawnNumber
:
item
.
drawnNumber
,
subWorkHourStatus
:
item
.
subWorkHourStatus
}
});
}
},
watch
:
{
order
(
v
)
{
//alert(v)
},
asc
(
v
)
{
this
.
asc
=
v
;
this
.
loadTree
();
},
statu
(
v
)
{
this
.
statu
=
v
;
this
.
loadTree
();
},
refresh
(
v
)
{
this
.
refresh
=
v
;
this
.
loadTree
();
}
}
};
</
script
>
pages/produce/execute/index.vue
View file @
03194a8a
...
...
@@ -126,7 +126,7 @@ export default {
this
.
$Message
.
info
(
"尊敬的用户,您没有该权限!"
);
}
//产品装配
if
(
number
==
3
)
{
if
(
this
.
$route
.
query
.
dispatchStatus
!=
0
)
{
if
(
this
.
$route
.
query
.
dispatchStatus
!=
0
)
{
return
this
.
$Message
.
info
(
"此订单未完成!不能进行工时分配。"
);
}
this
.
detail
=
()
=>
import
(
"./taskTime/index"
);
...
...
pages/produce/execute/indexWorkHour.vue
0 → 100644
View file @
03194a8a
<
style
lang=
"less"
>
@import "./execute.less";
</
style
>
<
template
>
<div
class=
"execute_box"
>
<component
:is=
"detail"
:gdid=
"gdId"
:row=
"row"
/>
<a
class=
"gd_list"
@
click=
"changeFresh"
>
工单列表
</a>
<!-- 工单列表 -->
<Drawer
placement=
"left"
class=
"gd_box"
:closable=
"false"
:inner=
"true"
:transfer=
"false"
v-model=
"orderlistMode"
>
<div
slot=
"header"
>
<div
class=
"header"
>
<a
class=
"gd_tt"
@
click=
"goToOrder"
>
<Icon
type=
"ios-undo-outline"
/>
工时提交列表
</a>
<Dictionary
code=
"orderList.workHourStatus"
class=
"select_star fr"
v-model=
"odermodel"
@
on-change=
"searchOrder"
></Dictionary>
</div>
<div
class=
"select_t"
style=
"height:40px"
>
<Button
@
click=
"changeAsc"
class=
"fr"
shape=
"circle"
icon=
"md-calendar"
>
{{
ascTitle
}}
</Button>
</div>
</div>
<!-- 列表卡片主内容 -->
<orderlist
ref=
"orderlistref"
:asc=
"asc"
:statu=
"statu"
:refresh=
"refresh"
:order=
"inputId"
/>
</Drawer>
</div>
</
template
>
<
script
>
import
functional
from
"./components/functional"
;
import
orderlist
from
"./components/orderlistWorkHour"
;
export
default
{
name
:
'indexWorkHour'
,
components
:
{
functional
,
orderlist
},
data
()
{
return
{
orderTitle
:
"进度汇报"
,
orderindex
:
0
,
listLength
:
0
,
//工单数量
starmodal
:
true
,
orderlistMode
:
false
,
functionalMode
:
false
,
gdId
:
0
,
detail
:
null
,
row
:
{},
odermodel
:
-
9
,
orderId
:
this
.
$route
.
query
.
id
,
condition
:
[],
inputId
:
null
,
asc
:
false
,
ascTitle
:
"时间正序排序"
,
statu
:
0
,
refresh
:
true
};
},
created
()
{
let
row
=
{};
row
.
id
=
this
.
$route
.
query
.
id
;
row
.
orderId
=
this
.
$route
.
query
.
orderId
;
row
.
executeId
=
this
.
$route
.
query
.
executeId
;
row
.
headid
=
this
.
$route
.
query
.
headid
;
row
.
routingdetailId
=
this
.
$route
.
query
.
routid
;
row
.
mesCode
=
this
.
$route
.
query
.
mesCode
;
row
.
productName
=
this
.
$route
.
query
.
productName
;
row
.
drawnNumber
=
this
.
$route
.
query
.
drawnNumber
;
row
.
count
=
this
.
$route
.
query
.
quantity
;
row
.
subWorkHourStatus
=
this
.
$route
.
query
.
subWorkHourStatus
;
this
.
row
=
row
;
this
.
inputId
=
this
.
$route
.
query
.
id
;
this
.
detail
=
()
=>
import
(
"./taskTime/index"
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{},
comments
:
{},
methods
:
{
// 返回工单列表
goToOrder
()
{
this
.
$router
.
push
(
"/produce/workHour"
);
},
searchOrder
(
value
)
{
if
(
value
==
null
||
typeof
value
==
"undefined"
)
{
value
=
-
9
;
}
this
.
statu
=
value
;
// this.$refs.orderlistref.loadTree(value);
},
changeTitle
(
number
,
type
)
{
this
.
orderTitle
=
type
;
this
.
orderindex
=
number
;
let
row
=
{
id
:
this
.
$route
.
query
.
id
,
orderId
:
this
.
$route
.
query
.
orderId
,
executeId
:
this
.
$route
.
query
.
executeId
,
headid
:
this
.
$route
.
query
.
headid
,
routingdetailId
:
this
.
$route
.
query
.
routid
,
mesCode
:
this
.
$route
.
query
.
mesCode
,
productName
:
this
.
$route
.
query
.
productName
,
drawnNumber
:
this
.
$route
.
query
.
drawnNumber
,
count
:
this
.
$route
.
query
.
quantity
,
subWorkHourStatus
:
this
.
$route
.
query
.
subWorkHourStatus
,
};
this
.
row
=
row
;
this
.
inputId
=
this
.
$route
.
query
.
id
;
if
(
number
==
3
)
{
if
(
this
.
$route
.
query
.
dispatchStatus
!=
0
)
{
return
this
.
$Message
.
info
(
"此订单未完成!不能进行工时分配。"
);
}
this
.
detail
=
()
=>
import
(
"./taskTime/index"
);
}
//工时分配
},
//按时间排序按钮
changeAsc
()
{
this
.
asc
=
!
this
.
asc
;
if
(
this
.
asc
)
{
this
.
ascTitle
=
"时间正序排序"
;
}
else
{
this
.
ascTitle
=
"时间倒序排序"
;
}
},
//刷新orderlist列表
changeFresh
()
{
this
.
refresh
=
!
this
.
refresh
;
this
.
orderlistMode
=
true
;
}
},
watch
:
{
"$route.query.id"
(
v
)
{
this
.
row
.
id
=
v
;
this
.
inputId
=
v
;
this
.
detail
=
()
=>
import
(
"./taskTime/index"
);
}
}
};
</
script
>
pages/produce/workHour/index.vue
View file @
03194a8a
<
template
>
<div
class=
"aps-r"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:batch=
"false"
:type=
"typeInfo"
:span=
"6"
:lazy=
"true"
:conditions=
"easySearch"
:action=
"action"
:gutter=
"40"
>
<div
class=
"aps-r"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:batch=
"false"
:type=
"typeInfo"
:span=
"6"
:lazy=
"true"
:conditions=
"easySearch"
:action=
"action"
:gutter=
"40"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem>
<RadioGroup
v-model=
"easySearch.SubmitState.value"
@
on-change=
"submitStateChange"
>
<Radio
label=
"0"
>
全部
</Radio>
<Radio
label=
"1"
>
未提交
</Radio>
<Radio
label=
"2"
>
已提交
</Radio>
</RadioGroup>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入订单编号/产品名称/图号"
v-model=
"easySearch.keys.value"
v-width=
"260"
clearable
/>
</FormItem>
<!--
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入订单编号/产品名称/图号"
v-model=
"easySearch.keys.value"
v-width=
"260"
clearable
/>
</FormItem>
-->
<!--
<FormItem>
<
Dictionary
code=
"taskList.status"
placeholder=
"请选择工单状态"
:multiple=
"true"
v-model=
"easySearch.DispatchStatus.value"
></D
ictionary>
<
dictionary
style=
"width:240px"
placeholder=
'请选择工时提交状态'
code=
"orderList.workHourStatus"
v-model=
"easySearch.SubmitState.value"
></d
ictionary>
</FormItem>
-->
<!--
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
--
>
</FormItem
>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
</
template
>
<
template
slot=
"card"
slot-scope=
"{ row }"
>
<div
class=
"body"
@
click=
"
<div
class=
"body"
@
click=
"
toExecute(
row.id,
row.orderId,
...
...
@@ -68,10 +32,10 @@
row.status,
row.mesCode,
row.productName,
row.drawnNumber
row.drawnNumber,
row.subWorkHourStatus
)
"
>
"
>
<Row
class=
"title-i"
>
<Col
:span=
"10"
class=
"order-code"
>
<Ellipsis
:text=
"row.productName"
:lines=
"1"
tooltip
transfer
/>
...
...
@@ -83,13 +47,7 @@
<div
class=
"statuBg"
:style=
"tdStyle(row.subWorkHourStatus)"
></div>
<div
class=
"boxTitle"
>
<div
class=
"text"
>
<state
code=
"workHour.status"
ref=
"state"
:value=
"row.subWorkHourStatus"
type=
"text"
:color=
"false"
></state>
<state
code=
"orderList.workHourStatus"
ref=
"state"
:value=
"row.subWorkHourStatus"
type=
"text"
:color=
"false"
></state>
</div>
</div>
</Col>
...
...
@@ -99,12 +57,7 @@
<Col
span=
"8"
>
<div
class=
"img-i"
>
<img
:src=
"downUrl + row.productUrl"
v-if=
"row.productUrl"
/>
<img
src=
"@/assets/imgicon/chan_Pin.png"
v-else
width=
"100%"
height=
"100%"
/>
<img
src=
"@/assets/imgicon/chan_Pin.png"
v-else
width=
"100%"
height=
"100%"
/>
</div>
<!--
<img
:src=
"getUrl(row.productUrl)"
...
...
@@ -118,27 +71,22 @@
<Col
span=
"16"
class=
"row"
>
<p>
{{
l
(
"beginTime"
)
}}
:
{{
row
.
beginTime
}}
</p>
<p>
<span
v-if=
"getStatus(row.status)"
>
{{
l
(
"planEndTime"
)
}}
:
</span
>
<span
v-if=
"getStatus(row.status)"
>
{{
l
(
"planEndTime"
)
}}
:
</span>
<span
v-else
>
{{
l
(
"endTime"
)
}}
:
</span>
{{
row
.
endTime
}}
</p>
<p
v-if=
"getStatus(row.status) && getTimes(row.endTime) > 0"
>
剩余时间:
<OutputTime
:value=
"getTimes(row.endTime)"
style=
"display: inline"
></OutputTime>
<OutputTime
:value=
"getTimes(row.endTime)"
style=
"display: inline"
></OutputTime>
</p>
<Row>
<Col
span=
"12"
>
<p>
{{
l
(
"quantity"
)
}}
:
{{
row
.
quantity
}}
</p></Col
>
<Col
span=
"12"
><p>
工序号:
{{
row
.
taskSeq
}}
</p></Col
>
<p>
{{
l
(
"quantity"
)
}}
:
{{
row
.
quantity
}}
</p>
</Col
>
<Col
span=
"12"
>
<p>
工序号:
{{
row
.
taskSeq
}}
</p>
</Col
>
</Row>
<p>
工序名称:
{{
row
.
taskName
}}
</p>
</Col>
...
...
@@ -146,43 +94,25 @@
<Row
class=
"rowBottom"
>
<Col
span=
"14"
>
{{
l
(
"drawnNumber"
)
}}
:
{{
row
.
drawnNumber
}}
</Col>
<Col
span=
"10"
class=
"tr"
>
<Icon
type=
"md-alert"
size=
"18"
color=
"#FFA000"
v-if=
"
<Icon
type=
"md-alert"
size=
"18"
color=
"#FFA000"
v-if=
"
getStatus(row.status) &&
getTimes(row.endTime)
<
86400
&&
getTimes
(
row
.
endTime
)
>
0
"
/>
<span
style=
"color: #ffa000"
v-if=
"
" />
<span
style=
"color: #ffa000"
v-if=
"
getStatus(row.status) &&
getTimes(row.endTime)
<
86400
&&
getTimes
(
row
.
endTime
)
>
0
"
>预警
</span
>
<Icon
type=
"md-timer"
size=
"18"
color=
"#FE7777"
v-if=
"getStatus(row.status) && compareTime(row.endTime)"
/>
<span
style=
"color: #fe7777"
v-if=
"getStatus(row.status) && compareTime(row.endTime)"
>
超期
</span
>
">预警
</span>
<Icon
type=
"md-timer"
size=
"18"
color=
"#FE7777"
v-if=
"getStatus(row.status) && compareTime(row.endTime)"
/>
<span
style=
"color: #fe7777"
v-if=
"getStatus(row.status) && compareTime(row.endTime)"
>
超期
</span>
</Col>
</Row>
</div>
</div>
</
template
>
</DataGrid>
</div>
</div>
</template>
<
script
>
...
...
@@ -211,8 +141,7 @@ export default {
},
},
downUrl
:
fileUrlDown
,
columns
:
[
{
columns
:
[{
title
:
this
.
l
(
"Id"
),
key
:
"id"
,
width
:
80
,
...
...
@@ -272,14 +201,12 @@ export default {
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
"div"
,
{
class
:
"action"
,
},
[
h
(
"op"
,
{
"op"
,
{
attrs
:
{
oprate
:
"edit"
,
},
...
...
@@ -295,7 +222,8 @@ export default {
params
.
row
.
status
,
params
.
row
.
mesCode
,
params
.
row
.
productName
,
params
.
row
.
drawnNumber
params
.
row
.
drawnNumber
,
params
.
row
.
subWorkHourStatus
),
},
},
...
...
@@ -316,7 +244,10 @@ export default {
let
oldStr
=
localStorage
.
getItem
(
"admin"
);
let
userlist
=
this
.
$store
.
getters
.
getUser
(
2
);
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
...
...
@@ -339,11 +270,12 @@ export default {
status
,
mesCode
,
productName
,
drawnNumber
drawnNumber
,
subWorkHourStatus
)
{
//跳转到对应操作页面 获取id:this.$route.query.id
this
.
$router
.
push
({
path
:
"/produce/execute
"
,
path
:
"/produce/execute/indexWorkHour
"
,
query
:
{
id
:
id
,
//工单ID
orderId
:
orderId
,
//订单id
...
...
@@ -355,12 +287,13 @@ export default {
mesCode
:
mesCode
,
productName
:
productName
,
drawnNumber
:
drawnNumber
,
subWorkHourStatus
:
subWorkHourStatus
//工时提交状态
},
});
},
tdStyle
(
val
)
{
//动态根据状态值加载状态值对应的颜色
let
temDic
=
this
.
$store
.
getters
.
dictionaryByKey
(
"workHour.s
tatus"
);
let
temDic
=
this
.
$store
.
getters
.
dictionaryByKey
(
"orderList.workHourS
tatus"
);
let
temColor
=
"#666"
;
temDic
.
forEach
((
data
)
=>
{
if
(
Number
(
data
.
code
)
==
val
)
{
...
...
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