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
ebc06c43
Commit
ebc06c43
authored
Jun 11, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
6bcd208b
afce80ad
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
240 additions
and
168 deletions
+240
-168
userSelect.vue
components/page/userSelect.vue
+16
-7
api.js
pages/produce/execute/api.js
+4
-1
orderlist.vue
pages/produce/execute/components/orderlist.vue
+1
-0
add.vue
pages/produce/execute/taskTime/add.vue
+167
-148
index.vue
pages/produce/execute/taskTime/index.vue
+46
-9
orderlist.vue
pages/produce/orderlist.vue
+4
-2
config.js
static/config.js
+2
-1
No files found.
components/page/userSelect.vue
View file @
ebc06c43
...
...
@@ -228,6 +228,14 @@ export default {
}
}
else
{
//复选时返回
if
(
this
.
datas
&&
this
.
datas
.
length
>
0
)
{
this
.
value
.
forEach
(
v
=>
{
var
item3
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
v
);
if
(
item3
&&
item3
[
0
])
{
items
.
push
(
item3
[
0
]);
}
});
}
else
{
this
.
value
.
forEach
(
v
=>
{
var
item
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
v
);
if
(
item
&&
item
[
0
])
{
...
...
@@ -236,6 +244,7 @@ export default {
});
}
}
}
return
items
;
},
...
...
pages/produce/execute/api.js
View file @
ebc06c43
...
...
@@ -46,5 +46,8 @@ export default {
getentryusers
(
params
)
{
return
Api
.
get
(
`
${
PlanUrl
}
/orderexecutenew/entryusers`
,
params
);
},
//工时分配--总工时待分配
getallhours
(
params
)
{
return
Api
.
post
(
`
${
technologyUrl
}
workhours/allhours`
,
params
);
},
}
\ No newline at end of file
pages/produce/execute/components/orderlist.vue
View file @
ebc06c43
...
...
@@ -81,6 +81,7 @@ export default {
executeId
:
item
.
executeId
,
headid
:
item
.
routingHeaderId
,
routid
:
item
.
routingDetailId
,
//工序ID
quantity
:
item
.
quantity
,
//派工数量
dispatchStatus
:
item
.
status
}
});
...
...
pages/produce/execute/taskTime/add.vue
View file @
ebc06c43
...
...
@@ -23,36 +23,50 @@
<FormItem
label=
""
>
<Input
search
enter-button
placeholder=
"请输入编号"
/>
</FormItem>
</Col>
-->
</Col>
-->
<Col
span=
"24"
class=
"mb20"
>
<FormItem
label=
"既定人员"
>
<FormItem
label=
"既定人员"
>
<div
class=
"gd_userB"
>
<a
class=
"user_item"
@
click=
"checkItem(index)"
v-for=
"(item,index) in listMan"
:key=
"index"
>
<div
:class=
"
{user_bg:item.checked}" >
<a
class=
"user_item"
v-model=
"entity.oldUserse"
@
click=
"checkItem(index)"
v-for=
"(item,index) in listMan"
:key=
"index"
>
<div
:class=
"
{user_bg:item.checked}">
<Icon
type=
"md-contact"
/>
<div
class=
"gd_user"
>
<span
class=
"user_name"
>
{{
item
.
userName
}}
</span
>
<span
class=
"user_number"
>
{{
item
.
userCode
}}
</span
>
<p
class=
"user_name"
>
{{
item
.
userName
}}
</p
>
<p
class=
"user_number"
>
{{
item
.
cardNo
}}
</p
>
</div>
</div>
<!--
<RadioGroup
class=
"man_body"
>
v-model="item.checked"
<Radio
border
:label=
"entity.oldUserse"
class=
"checkUser"
>
<span
class=
"svg_name"
:title=
"item.userName"
>
{{
item
.
userName
}}
</span>
</Radio
>
</RadioGroup
>
-->
<!--
<radioButton
v-model=
"entity.oldUserse"
@
on-change=
"radioChange"
>
<RadioGroup
class=
"man_body"
>
<Radio
border
:label=
"entity.oldUserse"
class=
"checkUser"
>
<span
class=
"svg_name"
:title=
"item.userName"
>
{{
item
.
userName
}}
</span>
</Radio
>
</RadioGroup
>
</radioButton>
-->
</a>
</div>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
label=
"添加人员"
style=
"width:90%"
>
<UserSelect
ref=
"userSelected"
v-model=
"entity.userse"
:multiple=
"true"
/>
<!-- :roleTitle="roleTitle" -->
<Col
span=
"24"
v-show=
"showSelect"
>
<FormItem
label=
"添加人员"
style=
"width:90%"
>
<UserSelect
ref=
"userSelected"
v-model=
"entity.userse"
@
on-change=
"changeUser"
/>
<!-- :roleTitle="roleTitle" :datas="userlist" :multiple="true" -->
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
label=
"分配工时"
prop=
"setTime"
>
<!--
<InputNumber
:max=
"30"
:min=
"0"
v-model=
"value1"
></InputNumber>
天
-->
<InputNumber
:max=
"100"
:min=
"1"
v-model=
"value1"
></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>
...
...
@@ -61,119 +75,124 @@
<Row>
<Col
span=
"24"
style=
"text-align:right;height:60px;line-height:60px"
>
<Button
@
click=
"handleClose"
class=
"mr20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
保存
</Button>
</Col>
</Row>
</div>
</
template
>
<
script
>
export
default
{
data
(){
return
{
value1
:
1
,
data
()
{
return
{
entity
:
{
oldUserse
:
""
,
userse
:
null
,
workHour
:
1
},
// userlist:[],
userflag
:
false
,
showSelect
:
true
,
rules
:
{
outSideTime
:
[
{
required
:
true
,
message
:
"必填"
,
type
:
"number"
,
trigger
:
"change"
}
]
},
// roleTitle: "操作工"
,
cityList
:
[
maxHour
:
10
,
listMan
:
[
{
value
:
'车间A1'
,
label
:
'车间A1'
},{
value
:
'车间A2'
,
label
:
'车间A2'
},{
value
:
'车间A3'
,
label
:
'车间A3'
},{
value
:
'车间A4'
,
label
:
'车间A4'
},{
value
:
'车间A5'
,
label
:
'车间A5'
checked
:
false
,
userName
:
"张珊珊1"
,
cardNo
:
"08965481"
,
id
:
1
},
],
listMan
:[
{
checked
:
false
,
userName
:
'张珊珊1'
,
userCode
:
'08965481'
,
id
:
1
},{
checked
:
false
,
userName
:
'张珊珊2'
,
userCode
:
'08965482'
,
checked
:
false
,
userName
:
"张珊珊2"
,
cardNo
:
"08965482"
,
id
:
2
},{
checked
:
false
,
userName
:
'张珊珊3'
,
userCode
:
'08965483'
,
id
:
3
},{
checked
:
false
,
userName
:
'张珊珊3'
,
userCode
:
'08965483'
,
id
:
3
},{
checked
:
false
,
userName
:
'张珊珊3'
,
userCode
:
'08965483'
,
id
:
3
},{
checked
:
false
,
userName
:
'张珊珊3'
,
userCode
:
'08965483'
,
id
:
3
},{
checked
:
false
,
userName
:
'张珊珊3'
,
userCode
:
'08965483'
,
id
:
3
},{
checked
:
false
,
userName
:
'张珊珊3'
,
userCode
:
'08965483'
,
id
:
3
},{
checked
:
false
,
userName
:
'张珊珊3'
,
userCode
:
'08965483'
,
},
{
checked
:
false
,
userName
:
"张珊珊3"
,
cardNo
:
"08965483"
,
id
:
3
}
],
}
]
};
},
created
(){},
methods
:
{
handleSubmit
(){
handleSubmit
()
{
console
.
log
(
this
.
entity
);
this
.
$emit
(
"on-ok"
,
this
.
entity
);
},
handleClose
(){
//单选框
radioChange
(
val
)
{
alert
(
"选择项的值:"
+
val
);
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
checkItem
(
i
){
this
.
listMan
[
i
].
checked
=
!
this
.
listMan
[
i
].
checked
;
checkItem
(
i
)
{
if
(
this
.
userflag
){
this
.
$Message
.
error
(
"只能选择一人"
);
return
}
let
oldlist
=
this
.
listMan
oldlist
[
i
].
checked
=
!
oldlist
[
i
].
checked
;
let
oolist
=
[];
oldlist
.
map
(
u
=>
{
if
(
u
.
checked
)
{
oolist
.
push
(
u
);
this
.
showSelect
=
false
if
(
1
<
oolist
.
length
)
{
this
.
$Message
.
error
(
"只能选择一人"
);
this
.
listMan
[
i
].
checked
=
false
;
}
}
});
oolist
.
map
(
u
=>
{
if
(
u
.
checked
)
{
this
.
entity
.
oldUserse
=
u
.
userName
;
this
.
showSelect
=
false
}
else
{
this
.
entity
.
oldUserse
=
''
;
}
});
if
(
oolist
.
length
==
0
){
this
.
showSelect
=
true
}
},
// 选择新增人员
changeUser
(
data
){
console
.
log
(
data
)
if
(
data
&&
data
!=
undefined
){
this
.
userflag
=
true
}
if
(
data
==
undefined
){
this
.
userflag
=
false
}
let
alloterInfo
=
this
.
$refs
.
userSelected
.
getSelectItems
();
console
.
log
(
alloterInfo
)
},
testChange
()
{
// 该方法在input内容改变是就会触发进行检测
this
.
numberChange
(
this
.
myNumber
)
// 调用函数
testChange
()
{
// 该方法在input内容改变是就会触发进行检测
this
.
numberChange
(
this
.
entity
.
workHour
);
// 调用函数
},
// 封装控制小数点位数的函数
numberChange
(
VauleNumber
)
{
// VauleNumber你想要控制位数的数字
let
newNumber
=
null
numberChange
(
VauleNumber
)
{
// VauleNumber你想要控制位数的数字
let
newNumber
=
null
;
if
(
VauleNumber
>=
0
)
{
let
reg
=
/.*
\.
.*/
let
reg
=
/.*
\.
.*/
;
if
(
reg
.
test
(
VauleNumber
))
{
newNumber
=
parseFloat
(
VauleNumber
.
toFixed
(
1
))
newNumber
=
parseFloat
(
VauleNumber
.
toFixed
(
1
));
}
else
{
newNumber
=
VauleNumber
newNumber
=
VauleNumber
;
}
}
return
newNumber
return
newNumber
;
}
},
}
}
}
;
</
script
>
\ No newline at end of file
pages/produce/execute/taskTime/index.vue
View file @
ebc06c43
...
...
@@ -7,7 +7,7 @@
<!--
<Icon
type=
"ios-time"
/>
-->
<div
class=
"gs_bo01"
>
<span
class=
"shi"
>
总工时
</span>
<span
class=
"number"
>
250
</span>
<span
class=
"number"
>
{{
allHours
}}
</span>
</div>
</div>
<Divider
type=
"vertical"
class=
"line_slit"
/>
...
...
@@ -16,20 +16,20 @@
<img
src=
"@/assets/imgicon/execute/time02.png"
alt=
""
/>
<div
class=
"gs_bo01"
>
<span
class=
"shi"
>
待分配
</span>
<span
class=
"number"
>
200
</span>
<span
class=
"number"
>
{{
waitHours
}}
</span>
</div>
</div>
</div>
<div
class=
"gs_card_box"
>
<Card
class=
"gs_card"
v-for=
"
i of 8"
:key=
"i
"
>
<Card
class=
"gs_card"
v-for=
"
(item,index) in cardMan"
:key=
"index
"
>
<p
slot=
"title"
class=
"gs_title"
>
张三
<span
class=
"fr"
>
02816335
{{
i
}}
</span>
{{
item
.
userName
}}
<span
class=
"fr"
>
{{
item
.
cardNo
}}
</span>
</p>
<!--
<p
class=
"gs_p"
>
所属车间:车间A
{{
i
}}
</p>
<p
class=
"gs_p"
>
所属班组:班组B
{{
i
}}
</p>
-->
<p
class=
"gs_time"
>
<span
class=
"b_size"
>
100
</span>
工时
<span
class=
"b_size"
>
{{
item
.
workHour
}}
</span>
工时
</p>
<!--
<p
class=
"gs_p"
>
<span
class=
"b_size"
>
100
</span>
分
...
...
@@ -70,10 +70,20 @@ export default {
msg
:
'确认要删除吗?'
,
title
:
'删除确认'
,
addmodal
:
false
,
allHours
:
240
,
waitHours
:
200
,
cardMan
:[
// {
// userName:"张三",
// cardNo:123123,
// workHour:50,
// }
]
}
},
created
()
{
// this.treeHeight = window.innerHeight - 120;
this
.
laodHorse
()
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
...
...
@@ -87,11 +97,32 @@ export default {
};
},
methods
:
{
laodHorse
(){
let
parme
=
{
dispatchId
:
this
.
$route
.
query
.
id
,
routingDetailId
:
this
.
$route
.
query
.
routid
,
count
:
this
.
$route
.
query
.
quantity
}
Api
.
getallhours
(
parme
).
then
(
res
=>
{
if
(
res
.
result
){
this
.
allHours
=
res
.
result
.
allHours
this
.
waitHours
=
res
.
result
.
waitHours
this
.
$refs
.
addview
.
maxHour
=
this
.
waitHours
}
else
{
console
.
log
(
"获取失败。"
)
}
})
},
addItem
(){
this
.
addmodal
=
true
let
id
=
this
.
$route
.
query
.
id
console
.
log
(
id
)
// Api.getentryusers().then()
Api
.
getentryusers
({
Id
:
id
}).
then
(
res
=>
{
let
result
=
res
.
result
result
.
map
(
u
=>
{
u
.
checked
=
false
})
this
.
$refs
.
addview
.
listMan
=
result
})
},
editItem
(){
this
.
$Message
.
success
(
"编辑工时..."
)
...
...
@@ -108,7 +139,13 @@ export default {
cancel
(){
this
.
addmodal
=
false
},
addInfo
(){
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
)
this
.
addmodal
=
false
}
},
...
...
pages/produce/orderlist.vue
View file @
ebc06c43
...
...
@@ -29,7 +29,7 @@
<
template
slot=
"card"
slot-scope=
"{row}"
>
<div
class=
"body"
@
click=
"toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.status)"
@
click=
"toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.
quantity,row.
status)"
>
<Row
class=
"title-i"
>
<Col
:span=
"10"
class=
"order-code"
>
{{
row
.
productName
}}
</Col>
...
...
@@ -186,6 +186,7 @@ export default {
params
.
row
.
executeId
,
params
.
row
.
routingHeaderId
,
params
.
row
.
routingDetailId
,
params
.
row
.
quantity
,
params
.
row
.
status
)
}
...
...
@@ -216,7 +217,7 @@ export default {
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
toExecute
(
id
,
orderId
,
executeId
,
headid
,
routingDetailId
,
status
)
{
toExecute
(
id
,
orderId
,
executeId
,
headid
,
routingDetailId
,
quantity
,
status
)
{
//跳转到对应操作页面 获取id:this.$route.query.id
this
.
$router
.
push
({
path
:
"/produce/execute"
,
...
...
@@ -226,6 +227,7 @@ export default {
executeId
:
executeId
,
//订单执行表id
headid
:
headid
,
//工艺规程id
routid
:
routingDetailId
,
//工序ID
quantity
:
quantity
,
//派工数量
dispatchStatus
:
status
}
});
...
...
static/config.js
View file @
ebc06c43
...
...
@@ -21,7 +21,8 @@ window.resourceUrl = `http://${address}:10000/resource`; // 制造资源地址
window
.
workflowUrl
=
`http://
${
address
}
:10000/workflow`
;
// 工作流地址
window
.
certificateUrl
=
`http://
${
address
}
:10000/qms`
;
//质量
window
.
crmUrl
=
`http://
${
address
}
:10000/crm`
;
//crm客户、合同、项目管理
window
.
apsUrl
=
`http://
${
address
}
:10000/aps`
;
//aps排产
// window.apsUrl = `http://${address}:10000/aps`;//aps排产
window
.
apsUrl
=
`http://
${
systemApi
.
aps
}
:10111/api/services/app`
;
//aps排产
window
.
technologyUrl
=
`http://
${
address
}
:10000/technology/`
;
//新工艺规程接口
window
.
iconImg
=
`/imgicon/`
;
...
...
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