Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0d76505f
authored
Jun 05, 2026
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.8.2-zxw' into 'SAAS+V5.8.2'
施工单技师修改 See merge request
!684
2 parents
d1ce44b7
8fb6298a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
5 deletions
src/views/orderManage/constructionOrder/detail.vue
src/views/orderManage/constructionOrder/listMap.js
src/views/orderManage/constructionOrder/detail.vue
View file @
0d76505
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
技师占比
技师占比
</div>
</div>
<div
class=
"value"
>
<div
class=
"value"
>
<span>
{{
detailForm
.
staffList
[
0
]
?
detailForm
.
staffList
[
0
].
name
:
'-'
}}
</span>
<span>
{{
detailForm
.
technicianShareText
||
'-'
}}
</span>
</div>
</div>
</div>
</div>
</section>
</section>
...
@@ -150,7 +150,9 @@
...
@@ -150,7 +150,9 @@
prop=
"remark"
/>
prop=
"remark"
/>
<el-table-column
align=
"center"
label=
"操作"
>
<el-table-column
align=
"center"
label=
"操作"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.subItemPictures.length"
@
click=
"handlePreviewImage(scope.row)"
>
<el-button
v-if=
"scope.row.subItemPictures.length"
type=
"text"
@
click=
"handlePreviewImage(scope.row)"
>
查看施工图
查看施工图
</el-button>
</el-button>
<span
v-else
>
<span
v-else
>
...
@@ -231,6 +233,7 @@ function emptyForm() {
...
@@ -231,6 +233,7 @@ function emptyForm() {
staffList
:
[],
staffList
:
[],
mainTechnicianList
:
[],
mainTechnicianList
:
[],
subTechnicianList
:
[],
subTechnicianList
:
[],
technicianShareText
:
"-"
,
serviceItems
:
[],
serviceItems
:
[],
subOrders
:
[],
subOrders
:
[],
dispatchTime
:
""
,
dispatchTime
:
""
,
...
@@ -430,7 +433,7 @@ export default {
...
@@ -430,7 +433,7 @@ export default {
EARLIEST_OUTBOUND
:
"outboundTime"
,
EARLIEST_OUTBOUND
:
"outboundTime"
,
EARLIEST_START
:
"startConstructionTime"
,
EARLIEST_START
:
"startConstructionTime"
,
LATEST_END
:
"endConstructionTime"
,
LATEST_END
:
"endConstructionTime"
,
LATEST_COMPLETE
:
"completeTime"
LATEST_COMPLETE
:
"completeTime"
,
};
};
const
next
=
emptyTimelineFields
();
const
next
=
emptyTimelineFields
();
list
.
forEach
((
it
)
=>
{
list
.
forEach
((
it
)
=>
{
...
@@ -454,7 +457,8 @@ export default {
...
@@ -454,7 +457,8 @@ export default {
});
});
},
},
handlePreviewImage
(
item
)
{
handlePreviewImage
(
item
)
{
if
(
!
item
.
subItemPictures
?.
length
)
return
if
(
!
item
.
subItemPictures
?.
length
)
return
;
this
.
imgViewerVisible
=
true
;
this
.
imgViewerVisible
=
true
;
this
.
imageFileArr
=
item
.
subItemPictures
||
[];
this
.
imageFileArr
=
item
.
subItemPictures
||
[];
},
},
...
...
src/views/orderManage/constructionOrder/listMap.js
View file @
0d76505
...
@@ -16,6 +16,92 @@ function toIntOrNull(v) {
...
@@ -16,6 +16,92 @@ function toIntOrNull(v) {
return
Number
.
isNaN
(
n
)
?
null
:
n
;
return
Number
.
isNaN
(
n
)
?
null
:
n
;
}
}
function
toNumberOrNull
(
v
)
{
if
(
v
==
null
||
v
===
""
)
return
null
;
const
n
=
Number
(
v
);
return
Number
.
isNaN
(
n
)
?
null
:
n
;
}
function
formatPercentNumber
(
n
)
{
const
rounded
=
Math
.
round
(
n
*
100
)
/
100
;
if
(
!
Number
.
isFinite
(
rounded
))
return
""
;
return
String
(
rounded
);
}
function
shareRateToPercentString
(
shareRate
)
{
const
n
=
toNumberOrNull
(
shareRate
);
if
(
n
==
null
)
return
""
;
const
percent
=
n
<=
1
?
n
*
100
:
n
;
return
`
${
formatPercentNumber
(
percent
)}
%`
;
}
function
shareRateToPercentNumber
(
shareRate
)
{
const
n
=
toNumberOrNull
(
shareRate
);
if
(
n
==
null
)
return
null
;
const
percent
=
n
<=
1
?
n
*
100
:
n
;
return
Number
.
isFinite
(
percent
)
?
percent
:
null
;
}
function
getTechnicianShareValue
(
t
)
{
if
(
!
t
)
return
null
;
if
(
t
.
shareRate
!=
null
&&
t
.
shareRate
!==
""
)
return
t
.
shareRate
;
if
(
t
.
shareRatio
!=
null
&&
t
.
shareRatio
!==
""
)
return
t
.
shareRatio
;
return
null
;
}
function
buildTechnicianShareText
(
mainList
,
subList
)
{
const
all
=
[]
.
concat
(
Array
.
isArray
(
mainList
)
?
mainList
:
[])
.
concat
(
Array
.
isArray
(
subList
)
?
subList
:
[])
.
filter
(
Boolean
);
const
mains
=
all
.
filter
(
t
=>
Number
(
t
.
technicianType
)
===
0
);
const
subs
=
all
.
filter
(
t
=>
Number
(
t
.
technicianType
)
===
1
);
if
(
!
mains
.
length
&&
!
subs
.
length
)
return
"-"
;
const
subWithRate
=
subs
.
filter
((
t
)
=>
{
const
v
=
getTechnicianShareValue
(
t
);
return
v
!=
null
&&
v
!==
""
;
});
const
mainCandidate
=
mains
.
find
((
t
)
=>
{
const
v
=
getTechnicianShareValue
(
t
);
return
v
!=
null
&&
v
!==
""
;
})
||
mains
[
0
]
||
null
;
const
mainPercentStr
=
shareRateToPercentString
(
getTechnicianShareValue
(
mainCandidate
));
if
(
!
subWithRate
.
length
)
{
const
p
=
mainPercentStr
||
"100%"
;
return
`主技师
${
p
}
(默认比例)`
;
}
let
mainPartPercent
=
mainPercentStr
;
if
(
!
mainPartPercent
)
{
const
sum
=
subWithRate
.
reduce
((
acc
,
t
)
=>
{
const
pn
=
shareRateToPercentNumber
(
getTechnicianShareValue
(
t
));
return
acc
+
(
pn
!=
null
?
pn
:
0
);
},
0
);
const
remain
=
Math
.
max
(
0
,
100
-
sum
);
mainPartPercent
=
`
${
formatPercentNumber
(
remain
)}
%`
;
}
const
parts
=
[
`主技师
${
mainPartPercent
}
`
];
subWithRate
.
forEach
((
t
,
idx
)
=>
{
const
name
=
`副手技师
${
t
.
technicianName
}
`
;
const
p
=
shareRateToPercentString
(
getTechnicianShareValue
(
t
));
if
(
!
p
)
return
;
parts
.
push
(
`
${
name
}
${
p
}
`
);
});
return
parts
.
length
?
parts
.
join
(
" / "
)
:
"-"
;
}
function
formatListDateTime
(
v
)
{
function
formatListDateTime
(
v
)
{
if
(
v
==
null
||
v
===
""
)
if
(
v
==
null
||
v
===
""
)
return
"-"
;
return
"-"
;
...
@@ -224,6 +310,7 @@ export function mapApiRowToDetailForm(row) {
...
@@ -224,6 +310,7 @@ export function mapApiRowToDetailForm(row) {
name
:
t
.
technicianName
,
name
:
t
.
technicianName
,
role
:
t
.
technicianType
===
0
?
"main"
:
"sub"
,
role
:
t
.
technicianType
===
0
?
"main"
:
"sub"
,
roleLabel
:
t
.
technicianType
===
0
?
"主技师"
:
"技师"
,
roleLabel
:
t
.
technicianType
===
0
?
"主技师"
:
"技师"
,
shareRate
:
t
.
shareRate
!=
null
?
t
.
shareRate
:
t
.
shareRatio
,
}));
}));
const
subTech
=
(
row
.
subTechnicianList
||
[])
const
subTech
=
(
row
.
subTechnicianList
||
[])
.
filter
(
t
=>
t
)
.
filter
(
t
=>
t
)
...
@@ -231,6 +318,7 @@ export function mapApiRowToDetailForm(row) {
...
@@ -231,6 +318,7 @@ export function mapApiRowToDetailForm(row) {
name
:
t
.
technicianName
,
name
:
t
.
technicianName
,
role
:
"sub"
,
role
:
"sub"
,
roleLabel
:
"副手技师"
,
roleLabel
:
"副手技师"
,
shareRate
:
t
.
shareRate
!=
null
?
t
.
shareRate
:
t
.
shareRatio
,
}));
}));
const
staffList
=
[...
mainTech
,
...
subTech
];
const
staffList
=
[...
mainTech
,
...
subTech
];
const
serviceItems
=
[]
const
serviceItems
=
[]
...
@@ -269,7 +357,7 @@ export function mapApiRowToDetailForm(row) {
...
@@ -269,7 +357,7 @@ export function mapApiRowToDetailForm(row) {
reworkFlag
:
s
.
subItemStatus
==
3
?
"是"
:
"否"
,
reworkFlag
:
s
.
subItemStatus
==
3
?
"是"
:
"否"
,
reworkConstructionCode
:
s
.
reworkConstructionCode
||
"-"
,
reworkConstructionCode
:
s
.
reworkConstructionCode
||
"-"
,
refundQuantity
:
formatMaterialsUsedDisplay
(
s
.
refundQuantity
),
refundQuantity
:
formatMaterialsUsedDisplay
(
s
.
refundQuantity
),
remark
:
s
.
subItemStatus
==
3
?
(
s
.
remark
||
'-'
)
:
"-"
,
remark
:
s
.
subItemStatus
==
3
?
(
s
.
remark
||
"-"
)
:
"-"
,
subItemPictures
:
(
s
.
subItemPictures
||
[])
subItemPictures
:
(
s
.
subItemPictures
||
[])
.
map
((
p
)
=>
{
.
map
((
p
)
=>
{
if
(
typeof
p
===
"string"
)
if
(
typeof
p
===
"string"
)
...
@@ -290,6 +378,9 @@ export function mapApiRowToDetailForm(row) {
...
@@ -290,6 +378,9 @@ export function mapApiRowToDetailForm(row) {
staffList
:
staffList
.
length
staffList
:
staffList
.
length
?
staffList
?
staffList
:
[{
name
:
"-"
,
role
:
""
,
roleLabel
:
"-"
}],
:
[{
name
:
"-"
,
role
:
""
,
roleLabel
:
"-"
}],
mainTechnicianList
:
row
.
mainTechnicianList
||
[],
subTechnicianList
:
row
.
subTechnicianList
||
[],
technicianShareText
:
buildTechnicianShareText
(
row
.
mainTechnicianList
,
row
.
subTechnicianList
),
serviceItems
:
serviceItems
.
length
?
serviceItems
:
[{
name
:
"-"
,
qty
:
"-"
}],
serviceItems
:
serviceItems
.
length
?
serviceItems
:
[{
name
:
"-"
,
qty
:
"-"
}],
subOrders
:
subOrders
.
length
subOrders
:
subOrders
.
length
?
subOrders
?
subOrders
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment