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
8ff52689
Commit
8ff52689
authored
Aug 22, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
外协对接
parent
e5974890
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
115 deletions
+23
-115
http.api.js
common/http.api.js
+9
-0
index.vue
pages/mes/prodReport/index.vue
+14
-115
No files found.
common/http.api.js
View file @
8ff52689
...
...
@@ -65,6 +65,9 @@ const install = (Vue, vm) => {
//获取当前工作中心的生产任务
getTaskList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/pro/protask/getTaskList'
,
params
),
//外协列表
getAssistProcesslist
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/md/assistprocess/getAssistProcesslist'
,
params
),
//根据任务ID获取任务详情
getTaskInfo
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/pro/protask/'
+
params
.
taskId
),
...
...
@@ -80,6 +83,12 @@ const install = (Vue, vm) => {
//生产报工
feedback
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/mobile/pro/protask/feedback'
,
params
),
//外协报工
assistFeedback
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/mobile/pro/protask/assistFeedback'
,
params
),
//外协报工详情
feedbackinfo
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/md/assistprocess/feedbackinfo'
,
params
),
// 获取修改报工列表
feedbacklist
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/pro/feedback/list'
,
params
),
...
...
pages/mes/prodReport/index.vue
View file @
8ff52689
...
...
@@ -34,43 +34,6 @@
@
toggleAllSelection=
"toggleAllSelection"
:border=
"true"
:data=
"tableData"
></zb-table>
</view>
<view
class=
"prod-body-left-num"
>
可选订单数:
{{
tableData
.
length
}}
</view>
<!--
<view
class=
"prod-body-left-bom"
>
-->
<!--
<view
class=
"prod-body-left-bom-type"
>
-->
<!--
<u-subsection
:list=
"typeList"
:current=
"currentType"
type=
"primary"
font-size=
"28"
--
>
<!-- @change="typeChange">
</u-subsection>
-->
<!--
</view>
-->
<!--
<view
class=
"prod-body-left-bom-table"
>
-->
<!--
<u-form>
-->
<!--
<u-row
gutter=
"16"
>
-->
<!--
<u-col
span=
"3"
>
-->
<!--
<u-form-item
label=
"任务单号"
label-width=
"150"
>
-->
<!--
{{
curTaskInfo
.
taskCode
}}
-->
<!--
</u-form-item>
-->
<!--
</u-col>
-->
<!--
<u-col
span=
"4"
>
-->
<!--
<u-form-item
label=
"物料条码"
label-width=
"150"
>
-->
<!--
<SearchInput
v-model=
"materialRecordInfo.materialBatchNumber"
placeholder=
"请输入物料条码"
--
>
<!-- hassearchbtn="true"-->
<!-- @inputchange="(val)=>
{materialRecordInfo.materialBatchNumber=val}"/>-->
<!--
</u-form-item>
-->
<!--
</u-col>
-->
<!--
<u-col
span=
"2"
>
-->
<!--
<u-form-item
label=
"数量"
>
-->
<!--
<uni-number-box
:min=
"0"
v-model=
"materialRecordInfo.quantity"
></uni-number-box>
-->
<!--
</u-form-item>
-->
<!--
</u-col>
-->
<!--
<u-col
span=
"1"
>
-->
<!--
<u-button
type=
"primary"
size=
"mini"
@
click=
"commonClick('MaterialUsageRecord')"
>
添加
</u-button>
-->
<!--
</u-col>
-->
<!--
<u-col
span=
"1"
>
-->
<!--
</u-col>
-->
<!--
<u-col
span=
"5"
>
-->
<!--
</u-col>
-->
<!--
</u-row>
-->
<!--
</u-form>
-->
<!--
<zb-table
:columns=
"issusLineColumn"
:stripe=
"true"
:fit=
"true"
:border=
"true"
:data=
"issusLineList"
></zb-table>
-->
<!--
</view>
-->
<!--
</view>
-->
</view>
<scroll-view
class=
"prod-body-right"
scroll-y
>
<view
style=
"text-align: center; line-height: 80rpx; font-size: 28rpx; font-weight: 600"
>
...
...
@@ -1248,19 +1211,11 @@ export default {
name
:
'BOM外扣减'
}
],
materialRecordInfo
:
{
taskCode
:
''
,
materialBatchNumber
:
''
,
quantity
:
0
,
operatorTime
:
''
,
depletionMethod
:
1
},
curTaskInfo
:
{
pickingReason
:
null
,
returnReason
:
null
,
},
buttonShow
:
null
,
currentType
:
0
,
bomFeeData
:
[],
bomFeeColumn
:
[
{
...
...
@@ -1418,7 +1373,6 @@ export default {
reasonList
:
[],
reasonReturnList
:
[],
workorderList
:
[],
materialUsageRecordList
:
[],
materialusagerecordLoading
:
false
,
issusLineList
:
[],
issusLineColumn
:
[
...
...
@@ -1612,7 +1566,7 @@ export default {
name
:
'workorderCode'
,
label
:
'工单号'
,
align
:
'center'
,
width
:
85
width
:
120
},
{
name
:
'scheduleStartDateStr'
,
...
...
@@ -1648,25 +1602,13 @@ export default {
name
:
'assistProcessCode'
,
label
:
'采购单号'
,
align
:
'center'
,
width
:
1
0
0
width
:
1
2
0
},
{
name
:
'processName'
,
label
:
'工序'
,
align
:
'center'
,
width
:
80
},
{
name
:
'quantityQualify'
,
label
:
'合格数量'
,
align
:
'center'
,
width
:
70
},
{
name
:
'quantityUnqualify'
,
label
:
'不合格数量'
,
align
:
'center'
,
width
:
80
}
]
}
else
{
...
...
@@ -1968,7 +1910,7 @@ export default {
}
},
commonClick
(
oper
)
{
if
([
'Refresh'
,
'
MaterialUsageRecord'
,
'
editProd'
].
indexOf
(
oper
)
===
-
1
&&
this
.
tableSelectData
.
length
===
0
)
{
if
([
'Refresh'
,
'editProd'
].
indexOf
(
oper
)
===
-
1
&&
this
.
tableSelectData
.
length
===
0
)
{
this
.
$u
.
toast
(
'请选择工作任务!'
);
return
;
}
...
...
@@ -2038,9 +1980,6 @@ export default {
case
'editProd'
:
this
.
doEditProd
();
break
;
case
'MaterialUsageRecord'
:
this
.
addMaterialUsageRecord
();
break
;
case
'KnifeTemp'
:
this
.
knifeTempShow
();
break
;
...
...
@@ -2189,7 +2128,6 @@ export default {
rowClick
(
row
,
index
)
{
this
.
$refs
.
zbtable
.
toggleRowSelection
(
row
);
this
.
curTaskInfo
=
row
;
this
.
getMaterialUsageRecordList
();
},
getCode
(
row
)
{
this
.
usePersonData
=
row
;
...
...
@@ -2471,13 +2409,12 @@ export default {
}
return
{
...
item
,
scheduleStartDateStr
:
item
.
scheduleStartDate
.
substring
(
2
,
16
)
,
scheduleEndDateStr
:
item
.
scheduleEndDate
.
substring
(
2
,
16
)
scheduleStartDateStr
:
item
.
scheduleStartDate
?
item
.
scheduleStartDate
.
substring
(
2
,
16
):
''
,
scheduleEndDateStr
:
item
.
scheduleEndDate
?
item
.
scheduleEndDate
.
substring
(
2
,
16
)
:
''
};
});
if
(
this
.
tableData
.
length
>
0
)
{
this
.
curTaskInfo
=
this
.
tableData
[
0
];
this
.
getMaterialUsageRecordList
();
if
(
currentIndex
>
-
1
)
{
this
.
$nextTick
(()
=>
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
)
...
...
@@ -2515,56 +2452,12 @@ export default {
}).
catch
(
e
=>
{
console
.
log
(
'eee'
,
e
)
})
},
typeChange
(
index
)
{
this
.
currentType
=
index
;
this
.
getMaterialUsageRecordList
();
},
// px转rpx
pxToRpx
(
px
)
{
const
screenWidth
=
uni
.
getSystemInfoSync
().
screenWidth
return
(
750
*
Number
.
parseInt
(
px
))
/
screenWidth
},
getMaterialUsageRecordList
()
{
this
.
materialusagerecordLoading
=
true
;
this
.
$u
.
api
.
materialusagerecordList
({
workstationId
:
this
.
vuex_workstation
?.
workstationId
,
depletionMethod
:
this
.
currentType
+
1
,
taskId
:
this
.
curTaskInfo
.
taskId
})
.
then
((
res
)
=>
{
this
.
materialusagerecordLoading
=
false
;
if
(
res
.
code
===
200
)
{
this
.
materialUsageRecordList
=
res
.
rows
;
}
});
},
addMaterialUsageRecord
()
{
if
(
this
.
materialRecordInfo
.
materialBatchNumber
!==
this
.
curTaskInfo
.
itemCode
&&
this
.
currentType
===
0
)
{
this
.
$u
.
toast
(
'物料不在生产目录中!'
);
return
;
}
if
(
this
.
materialRecordInfo
.
quantity
===
0
)
{
this
.
$u
.
toast
(
'请输入物料数量!'
);
return
;
}
this
.
materialRecordInfo
.
operatorTime
=
new
Date
();
this
.
materialRecordInfo
.
operatorId
=
this
.
vuex_user
.
userId
;
this
.
materialRecordInfo
.
operatorName
=
this
.
vuex_user
.
userName
;
this
.
materialRecordInfo
.
taskId
=
this
.
curTaskInfo
.
taskId
;
this
.
materialRecordInfo
.
depletionMethod
=
this
.
currentType
+
1
;
this
.
materialRecordInfo
.
workstationId
=
this
.
vuex_workstation
.
workstationId
;
this
.
$u
.
api
.
addMaterialusagerecord
(
this
.
materialRecordInfo
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
materialRecordInfo
.
quantity
=
0
;
this
.
materialRecordInfo
.
materialBatchNumber
=
''
;
this
.
$u
.
toast
(
'上报成功'
);
this
.
getMaterialUsageRecordList
();
}
});
},
shiftTask
(
tid
)
{
this
.
$u
.
api
.
getTaskInfo
({
...
...
@@ -2660,17 +2553,23 @@ export default {
this
.
feedbackForms
=
[];
this
.
feedbackUnQuantityFu
=
0
;
this
.
feedbackQuantityFu
=
0
;
this
.
$u
.
api
.
assistFeedback
({
this
.
$u
.
api
.
feedbackinfo
({
assistProcessCode
:
taskInfo
.
assistProcessCode
,
assistProcessItemCode
:
taskInfo
.
assistProcessItemCode
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
// row.quantityQualify = res.data.workorderQualify
const
feedback
=
res
.
data
feedback
[
'unquantityFeedback'
]
=
res
.
data
.
quantity
-
res
.
data
.
quantityFeedback
const
feedback
=
res
.
rows
[
0
]
feedback
[
'unquantityFeedback'
]
=
feedback
.
quantity
-
feedback
.
quantityFeedback
feedback
[
'quantityUnqualify'
]
=
0
feedback
[
'quantityQualify'
]
=
0
feedback
[
'printContents'
]
=
feedback
.
workorderCode
feedback
[
'userName'
]
=
this
.
vuex_user
.
userName
feedback
[
'nickName'
]
=
this
.
vuex_user
.
nickName
feedback
[
'feedbackChannel'
]
=
'PAD'
feedback
[
'feedbackTime'
]
=
this
.
parseTime
(
new
Date
())
this
.
feedbackForms
.
push
(
feedback
)
this
.
proVisible
=
true
;
}
})
},
...
...
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