Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
Project
Project
Details
Activity
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
ximai
mes-pad
Commits
d5b050cf
Commit
d5b050cf
authored
Mar 26, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:加上作业分派功能
parent
750077fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
208 additions
and
32 deletions
+208
-32
http.api.js
common/http.api.js
+7
-3
workunitList.vue
pages/mes/prodReport/components/workunitList.vue
+101
-0
index.vue
pages/mes/prodReport/index.vue
+100
-29
No files found.
common/http.api.js
View file @
d5b050cf
...
...
@@ -35,6 +35,9 @@ const install = (Vue, vm) => {
config
.
adminPath
+
'/mobile/pro/process/getProcessList'
,
params
),
//获取工作单元列表
getMesWorkunitList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/md/workunit/list'
,
params
),
getWorkstationList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/md/workstation/getWorkstationList'
,
...
...
@@ -212,9 +215,8 @@ const install = (Vue, vm) => {
),
getWproworkOrderProcessItem
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/pro/materialRequest/selectworkorder'
,
params
config
.
adminPath
+
'/pro/materialRequest/selectworkorder'
,
params
),
//退料申请
...
...
@@ -287,6 +289,8 @@ const install = (Vue, vm) => {
vm
.
$u
.
post
(
'/account/saveRegByValidCode'
,
params
),
getPrintTemplateList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/ureportM/list'
,
params
),
putProtaskSplit
:
(
params
=
{})
=>
vm
.
$u
.
putJson
(
config
.
adminPath
+
'/mes/pro/protask/split'
,
params
),
// APP公共服务
upgradeCheck
:
()
=>
vm
.
$u
.
post
(
'/app/upgrade/check'
,
{
...
...
pages/mes/prodReport/components/workunitList.vue
0 → 100644
View file @
d5b050cf
<
template
>
<view
class=
"dmodel-table"
>
<view
class=
"search"
>
<u-form
:model=
"tableParams"
labelAlign=
"right"
class=
"tableForm"
>
<u-form-item
label=
"工作单元编码"
label-width=
"100px"
name=
"workunitCode"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.workunitCode"
placeholder=
"请输入工作单元编码"
/>
</u-form-item>
<u-form-item
label=
"工作单元名称"
label-width=
"100px"
name=
"workunitName"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.workunitName"
placeholder=
"请输入工作单元名称"
/>
</u-form-item>
<u-form-item
label=
"工作站"
label-width=
"60px"
name=
"workstationName"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.workstationName"
placeholder=
"请输入工作站"
/>
</u-form-item>
<u-form-item>
<u-button
class=
"btn"
@
click=
"getList"
type=
"primary"
size=
"medium"
>
搜索
</u-button>
</u-form-item>
</u-form>
</view>
<zb-table
ref=
"zbTable"
rowKey=
"workunitCode"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleRowSelection=
"toggleRowSelection"
>
</zb-table>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
},
data
()
{
return
{
tableParams
:
{
workunitCode
:
null
,
workunitName
:
null
,
workstationName
:
null
},
tableData
:
[],
tableSelectData
:
[],
tableColumn
:
[{
type
:
'radio'
,
width
:
40
},
{
name
:
'workstationName'
,
label
:
'工作站名称'
,
width
:
160
,
},
{
name
:
'workunitCode'
,
label
:
'工作单元编码'
,
width
:
200
,
},
{
name
:
'workunitName'
,
label
:
'工作单元名称'
,
width
:
160
,
},
],
}
},
// computed: {
// tableData() {
// return this.data || []
// }
// },
mounted
()
{
this
.
getList
()
// this.data.workstationName
},
methods
:
{
async
getList
()
{
const
res
=
await
this
.
$u
.
api
.
getMesWorkunitList
(
this
.
tableParams
)
console
.
log
(
res
,
'res'
)
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
}
},
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
},
}
}
</
script
>
<
style
scoped
>
.dmodel-table
{
height
:
500
rpx
;
margin-top
:
20
rpx
;
padding
:
0
20
rpx
;
}
.tableForm
{
display
:
flex
;
margin-bottom
:
20
rpx
;
}
.btn
{
margin-left
:
10px
;
}
</
style
>
pages/mes/prodReport/index.vue
View file @
d5b050cf
...
...
@@ -99,6 +99,7 @@
<u-button
type=
"primary"
@
click=
"commonClick('RecoilMaterial')"
>
反冲料登记
</u-button>
<u-button
type=
"primary"
@
click=
"commonClick('MaterialRequest')"
>
领料申请
</u-button>
<u-button
type=
"primary"
@
click=
"commonClick('MaterialReturn')"
>
退料申请
</u-button>
<u-button
type=
"primary"
@
click=
"commonClick('jobAssignment')"
>
作业分派
</u-button>
<u-button
type=
"success"
@
click=
"commonClick('StockIn')"
>
完工入库申请
</u-button>
<u-button
type=
"primary"
@
click=
"commonClick('ViewPpicture')"
>
查看图片
</u-button>
</scroll-view>
...
...
@@ -250,7 +251,9 @@
v-model="printTemplateVisible"
width="1300rpx"
>
<print-template
ref=
"printTemplateRef"
:data=
"printTemplateData"
/>
<view
class=
"feedback-card"
>
<print-template
ref=
"printTemplateRef"
:data=
"printTemplateData"
/>
</view>
</u-modal>
<u-modal
...
...
@@ -285,8 +288,10 @@
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="userTempVisible"
width="1300rpx"
>
<userPersonnel
ref=
"userPersonnelRef"
v-if=
"userTempVisible"
:data=
"usePersonData"
/>
>
<view
class=
"feedback-card"
>
<userPersonnel
ref=
"userPersonnelRef"
v-if=
"userTempVisible"
:data=
"usePersonData"
/>
</view>
</u-modal>
<u-modal
title=
"暂停原因"
...
...
@@ -664,6 +669,44 @@
</scroll-view>
</view>
</u-modal>
<u-modal
title=
"作业分派"
@
confirm=
"handleSubmitJobAssignment"
show-cancel-button
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="jobAssignmentVisible"
width="1200rpx"
>
<view
class=
"feedback-card"
>
<u-form
:mode=
"jobAssignmentForm"
label-width=
"100px"
>
<u-form-item
label=
"排产数量"
>
<u-number-box
v-model=
"jobAssignmentForm.quantity"
:long-press=
"false"
:positive-integer=
"false"
:size=
"50"
:input-width=
"190"
></u-number-box>
</u-form-item>
<u-form-item
label=
"工作单元"
>
<u-input
disabled
v-model=
"jobAssignmentForm.workunitName"
placeholder=
"选择工作单元"
></u-input>
<u-button
@
tap=
"workunitVisible = true"
type=
"success"
size=
"mini"
>
选择工作单元
</u-button>
</u-form-item>
</u-form>
</view>
</u-modal>
<u-modal
title=
"选择工作单元"
@
confirm=
"handleSubmitWorkunit"
show-cancel-button
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="workunitVisible"
width="1800rpx"
>
<view
class=
"feedback-card"
v-if=
"workunitVisible"
>
<workunitList
ref=
"workunitRef"
/>
</view>
</u-modal>
</view>
</
template
>
...
...
@@ -672,6 +715,7 @@ import SearchInput from '@/components/ScanInput/index.vue';
import
dModelList
from
'./components/dModelList.vue'
;
import
userPersonnel
from
'./components/userPersonnel.vue'
;
import
printTemplate
from
'./components/printTemplate.vue'
;
import
workunitList
from
'./components/workunitList.vue'
;
import
UButton
from
'../../../uview-ui/components/u-button/u-button.vue'
;
import
{
handleError
}
from
"vue"
;
export
default
{
...
...
@@ -681,10 +725,17 @@ export default {
dModelList
,
userPersonnel
,
printTemplate
,
UButton
UButton
,
workunitList
},
data
()
{
return
{
workunitVisible
:
false
,
jobAssignmentVisible
:
false
,
jobAssignmentForm
:
{
quantity
:
1
,
workunitName
:
null
},
listTabPro
:
[
{
name
:
'指令列表'
...
...
@@ -1147,11 +1198,6 @@ export default {
}
else
{
this
.
$u
.
api
.
changeCheckMachineTool
({
taskWorkunitId
:
item
.
taskWorkunitId
}).
then
((
res
)
=>
{
// console.log(res, '刀模板')
if
(
res
.
code
===
500
)
{
this
.
$u
.
toast
(
res
.
msg
)
}
})
this
.
changeStatus
(
item
.
taskId
,
item
.
taskWorkunitId
,
'BEGINNING'
,
item
.
workunitId
,
false
);
}
...
...
@@ -1198,6 +1244,9 @@ export default {
case
'MaterialReturn'
:
this
.
materialReturnShow
();
break
;
case
'jobAssignment'
:
// 作业分派
this
.
handleJobAssignment
();
break
;
case
'StockIn'
:
this
.
stockInShow
();
break
;
...
...
@@ -1206,6 +1255,28 @@ export default {
break
;
}
},
handleJobAssignment
()
{
this
.
jobAssignmentForm
=
{
quantity
:
1
,
workunitName
:
null
}
this
.
jobAssignmentVisible
=
true
},
handleSubmitWorkunit
()
{
this
.
jobAssignmentForm
.
workunitId
=
this
.
$refs
.
workunitRef
.
tableSelectData
[
0
].
workunitId
this
.
jobAssignmentForm
.
workunitName
=
this
.
$refs
.
workunitRef
.
tableSelectData
[
0
].
workunitName
},
handleSubmitJobAssignment
()
{
let
datas
=
Object
.
assign
({},
this
.
tableSelectData
[
0
])
datas
.
taskWorkunit
=
this
.
jobAssignmentForm
this
.
$u
.
api
.
putProtaskSplit
(
datas
).
then
((
res
)
=>
{
// console.log(res, 'res333')
if
(
res
.
code
===
200
)
{
this
.
jobAssignmentVisible
=
false
this
.
getTaskList
()
}
});
},
async
knifeTempShow
()
{
if
(
this
.
tableSelectData
.
length
>
1
)
{
return
;
...
...
@@ -1361,23 +1432,23 @@ export default {
});
});
},
stopCause
()
{
// 查询原因
this
.
$u
.
api
.
abnormal
.
detail
({
pageNum
:
1
,
pageSize
:
10
,
abnormalType
:
'WORK'
})
.
then
((
res
)
=>
{
this
.
causeList
=
res
.
rows
.
map
((
item
)
=>
{
return
{
value
:
item
.
abnormalReason
,
text
:
item
.
abnormalReason
};
});
});
},
stopCause
()
{
// 查询原因
this
.
$u
.
api
.
abnormal
.
detail
({
pageNum
:
1
,
pageSize
:
10
,
abnormalType
:
'WORK'
})
.
then
((
res
)
=>
{
this
.
causeList
=
res
.
rows
.
map
((
item
)
=>
{
return
{
value
:
item
.
abnormalReason
,
text
:
item
.
abnormalReason
};
});
});
},
getWorkorderWithSizeAndDirective
(
item
,
index
)
{
this
.
$u
.
api
.
getWorkorderWithSizeAndDirective
({
...
...
@@ -1524,7 +1595,7 @@ export default {
}
});
},
changeStatus
(
taskId
,
taskWorkunitId
,
status
,
workunitId
,
showToast
)
{
changeStatus
(
taskId
,
taskWorkunitId
,
status
,
workunitId
,
showToast
)
{
// this.form.status = status;
this
.
$u
.
api
.
changeStatus
({
...
...
@@ -1536,8 +1607,8 @@ export default {
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
const
showToast
=
showToast
===
false
?
false
:
true
if
(
showToast
)
{
let
showToastData
=
showToast
===
false
?
false
:
true
if
(
showToast
Data
)
{
this
.
$u
.
toast
(
'变更成功'
);
}
this
.
getTaskList
();
...
...
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