Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
maintain_service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
刘帅
maintain_service
Commits
9b4e8403
Commit
9b4e8403
authored
Sep 12, 2025
by
张昊飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保修单详情修改
parent
2c32294b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
3 deletions
+59
-3
ErpRepairFormProjectDispatchServiceImpl.java
...service/impl/ErpRepairFormProjectDispatchServiceImpl.java
+2
-1
index.vue
...ui/src/views/business/repairFormProjectDispatch/index.vue
+57
-2
No files found.
maintain-business/src/main/java/com/maintain/business/service/impl/ErpRepairFormProjectDispatchServiceImpl.java
View file @
9b4e8403
...
@@ -146,7 +146,7 @@ public class ErpRepairFormProjectDispatchServiceImpl implements IErpRepairFormPr
...
@@ -146,7 +146,7 @@ public class ErpRepairFormProjectDispatchServiceImpl implements IErpRepairFormPr
projectDispatch
.
setActualManHour
(
hour
);
projectDispatch
.
setActualManHour
(
hour
);
// projectDispatch.setDeductManHour(hour);
// projectDispatch.setDeductManHour(hour);
// 汇总实际总工时
// 汇总实际总工时
formProject
.
setActualTime
(
formProject
.
getActualTime
().
add
(
hour
)
);
formProject
.
setActualTime
(
hour
);
return
projectDispatch
;
return
projectDispatch
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
formProject
.
setIsDispatch
(
IsEnableStatus
.
YES
.
getCode
());
formProject
.
setIsDispatch
(
IsEnableStatus
.
YES
.
getCode
());
...
@@ -160,6 +160,7 @@ public class ErpRepairFormProjectDispatchServiceImpl implements IErpRepairFormPr
...
@@ -160,6 +160,7 @@ public class ErpRepairFormProjectDispatchServiceImpl implements IErpRepairFormPr
@Override
@Override
public
Boolean
updateByBo
(
ErpRepairFormProjectDispatchBo
bo
)
{
public
Boolean
updateByBo
(
ErpRepairFormProjectDispatchBo
bo
)
{
ErpRepairFormProjectDispatch
projectDispatch
=
baseMapper
.
selectById
(
bo
.
getId
());
ErpRepairFormProjectDispatch
projectDispatch
=
baseMapper
.
selectById
(
bo
.
getId
());
projectDispatch
.
setDispatchManHour
(
bo
.
getDispatchManHour
());
projectDispatch
.
setActualManHour
(
bo
.
getDispatchManHour
().
subtract
(
bo
.
getDeductManHour
()));
projectDispatch
.
setActualManHour
(
bo
.
getDispatchManHour
().
subtract
(
bo
.
getDeductManHour
()));
projectDispatch
.
setDeductManHour
(
bo
.
getDeductManHour
());
projectDispatch
.
setDeductManHour
(
bo
.
getDeductManHour
());
return
baseMapper
.
updateById
(
projectDispatch
)
>
0
;
return
baseMapper
.
updateById
(
projectDispatch
)
>
0
;
...
...
maintain-ui/src/views/business/repairFormProjectDispatch/index.vue
View file @
9b4e8403
...
@@ -20,7 +20,20 @@
...
@@ -20,7 +20,20 @@
<el-table-column
label=
"人员名称"
align=
"center"
prop=
"maintainUserName"
/>
<el-table-column
label=
"人员名称"
align=
"center"
prop=
"maintainUserName"
/>
<el-table-column
label=
"岗位名称"
align=
"center"
prop=
"postName"
/>
<el-table-column
label=
"岗位名称"
align=
"center"
prop=
"postName"
/>
<!--
<el-table-column
label=
"在岗状态"
align=
"center"
prop=
"state"
/>
-->
<!--
<el-table-column
label=
"在岗状态"
align=
"center"
prop=
"state"
/>
-->
<el-table-column
label=
"分配工时"
align=
"center"
prop=
"dispatchManHour"
/>
<el-table-column
label=
"分配工时"
align=
"center"
prop=
"dispatchManHour"
>
<template
slot-scope=
"scope"
>
<el-input-number
v-model=
"scope.row.dispatchManHour"
@
change=
"handleDispatchManHourChange(scope.row)"
controls-position=
"right"
size=
"mini"
:class=
"
{ 'input-error': !isDispatchValid(scope.row) }"
:min="0"
:max="Number(scope.row.standardManHour)"
:precision="1"
style="width: 100%" />
</
template
>
</el-table-column>
<el-table-column
label=
"扣罚工时"
align=
"center"
prop=
"deductManHour"
>
<el-table-column
label=
"扣罚工时"
align=
"center"
prop=
"deductManHour"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input-number
v-model=
"scope.row.deductManHour"
@
change=
"submitForm(scope.row)"
controls-position=
"right"
size=
"mini"
:min=
"0"
:max=
"Number(scope.row.dispatchManHour)"
:precision=
"1"
style=
"width: 100%"
/>
<el-input-number
v-model=
"scope.row.deductManHour"
@
change=
"submitForm(scope.row)"
controls-position=
"right"
size=
"mini"
:min=
"0"
:max=
"Number(scope.row.dispatchManHour)"
:precision=
"1"
style=
"width: 100%"
/>
...
@@ -28,7 +41,7 @@
...
@@ -28,7 +41,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"实际工时"
align=
"center"
prop=
"actualManHour"
>
<el-table-column
label=
"实际工时"
align=
"center"
prop=
"actualManHour"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
actualManHour
=
Number
(
scope
.
row
.
dispatchManHour
)
-
Number
(
scope
.
row
.
deductManHour
).
toFixed
(
1
)
}}
{{
(
Number
(
scope
.
row
.
dispatchManHour
)
-
Number
(
scope
.
row
.
deductManHour
)).
toFixed
(
1
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
@@ -185,6 +198,16 @@ export default {
...
@@ -185,6 +198,16 @@ export default {
}
}
};
};
},
},
computed
:
{
// 检查总分配工时是否超过标准工时
isTotalExceedStandard
()
{
if
(
!
this
.
data
.
standardManHour
)
return
false
;
const
totalDispatchManHour
=
this
.
repairFormProjectDispatchList
.
reduce
((
total
,
item
)
=>
{
return
total
+
(
Number
(
item
.
dispatchManHour
)
||
0
);
},
0
);
return
totalDispatchManHour
!==
Number
(
this
.
data
.
standardManHour
);
}
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
},
},
...
@@ -262,6 +285,32 @@ export default {
...
@@ -262,6 +285,32 @@ export default {
this
.
title
=
"
修改报修单-报修项目-派工
"
;
this
.
title
=
"
修改报修单-报修项目-派工
"
;
});
});
},
},
// 检查分配工时是否有效
isDispatchValid
(
row
)
{
if
(
!
this
.
data
.
standardManHour
)
return
true
;
const
totalDispatchManHour
=
this
.
repairFormProjectDispatchList
.
reduce
((
total
,
item
)
=>
{
return
total
+
(
Number
(
item
.
dispatchManHour
)
||
0
);
},
0
);
return
totalDispatchManHour
===
Number
(
this
.
data
.
standardManHour
);
},
/** 分配工时变化处理 */
handleDispatchManHourChange
(
row
)
{
// 检查总分配工时是否等于标准工时
const
totalDispatchManHour
=
this
.
repairFormProjectDispatchList
.
reduce
((
total
,
item
)
=>
{
return
total
+
(
Number
(
item
.
dispatchManHour
)
||
0
);
},
0
);
// 如果总分配工时不等于标准工时,显示提示
if
(
this
.
data
.
standardManHour
&&
totalDispatchManHour
!==
Number
(
this
.
data
.
standardManHour
))
{
this
.
$message
.
warning
(
`总分配工时(
${
totalDispatchManHour
}
)不等于项目标准工时(
${
this
.
data
.
standardManHour
}
)`
);
return
false
;
}
// 更新实际工时
row
.
actualManHour
=
(
Number
(
row
.
dispatchManHour
)
-
Number
(
row
.
deductManHour
)).
toFixed
(
1
);
// 提交更新
this
.
submitForm
(
row
);
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
(
row
)
{
submitForm
(
row
)
{
this
.
buttonLoading
=
true
;
this
.
buttonLoading
=
true
;
...
@@ -312,3 +361,9 @@ export default {
...
@@ -312,3 +361,9 @@ export default {
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
.input-error
::v-deep
.el-input__inner
{
border-color
:
#f56c6c
!important
;
}
</
style
>
\ No newline at end of file
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