Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
c845a956
提交
c845a956
authored
11月 13, 2023
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:飞手任务详情数据回显
上级
8e6fa9e2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
265 行增加
和
52 行删除
+265
-52
orderManageType.ts
src/api/interface/orderManageType.ts
+129
-24
orderManage.ts
src/api/modules/orderManage.ts
+5
-0
index.tsx
src/pages/orderManage/demandOrder/orderDetail/index.tsx
+131
-28
没有找到文件。
src/api/interface/orderManageType.ts
浏览文件 @
c845a956
...
...
@@ -679,30 +679,81 @@ export type serviceOrderFormListType = InterItemFunction<
export
type
serviceOrderFormDetailsType
=
InterFunction
<
{
requirementsInfoId
:
number
},
{
cashAmount
:
number
;
createTime
:
string
;
id
:
number
;
latitude
:
number
;
longitude
:
number
;
orderAmount
:
number
;
orderEarnings
:
number
;
orderEarningsDTO
:
null
;
preemptCashAmount
:
number
;
preemptSalaryAmount
:
number
;
preemptWeChat
:
number
;
publisherNumber
:
string
;
requireDescription
:
string
;
salaryAmount
:
number
;
serviceId
:
number
;
serviceName
:
string
;
taskAddress
:
string
;
taskEndTime
:
string
;
taskStartTime
:
string
;
updateOrderAmount
:
number
;
weChat
:
number
;
orderStatus
:
string
;
duty
:
number
;
decisionContent
:
string
;
serviceArriveSceneDTO
:
{
id
:
number
;
longitude
:
number
;
latitude
:
number
;
sceneAddress
:
string
;
sceneUrl
:
string
;
userAccountId
:
number
;
requirementsInfoId
:
number
;
createTime
:
string
;
updateTime
:
string
;
serviceFlowId
:
null
;
flowDictionaryDTO
:
{
id
:
number
;
waiting
:
string
;
orderStatus
:
string
;
userPort
:
string
;
doing
:
string
;
flyerPort
:
string
;
};
};
serviceFulfilATaskDTO
:
{
id
:
number
;
taskDescribe
:
null
;
taskUrl
:
string
;
requirementsInfoId
:
number
;
userAccountId
:
number
;
createTime
:
string
;
updateTime
:
string
;
serviceFlowId
:
null
;
flowDictionaryDTO
:
{
id
:
number
;
waiting
:
string
;
orderStatus
:
string
;
userPort
:
string
;
doing
:
string
;
flyerPort
:
string
;
};
};
serviceEvaluateDTO
:
null
;
amountUpdate
:
null
;
serviceOrderFormDetailsDTO
:
{
id
:
number
;
createTime
:
string
;
serviceId
:
number
;
serviceName
:
string
;
publisherNumber
:
string
;
orderAmount
:
number
;
taskStartTime
:
string
;
taskEndTime
:
string
;
longitude
:
null
;
latitude
:
null
;
taskAddress
:
string
;
cashAmount
:
number
;
salaryAmount
:
number
;
weChat
:
number
;
preemptCashAmount
:
number
;
preemptSalaryAmount
:
number
;
preemptWeChat
:
number
;
updateOrderAmount
:
number
;
orderEarnings
:
number
;
orderEarningsDTO
:
{
orderLevelAmount
:
number
;
orderLevel
:
string
;
orderAmount
:
number
;
liquidatedDamages
:
number
;
requirementsInfoId
:
number
;
createTime
:
string
;
updateTime
:
string
;
};
requireDescription
:
string
;
updateTime
:
string
;
orderStatus
:
string
;
decisionContent
:
null
;
duty
:
null
;
};
}
>
;
// 需求订单-进度条
...
...
@@ -2086,3 +2137,57 @@ export type rentPfConfirmOrderWareType = InterFunction<
},
any
>
;
// 小程序-详情——需求发布
export
type
requirementsDetailPublishType
=
InterFunction
<
{
id
:
number
},
{
cityCode
:
number
;
districtCode
:
number
;
doing
:
string
;
flyerPort
:
string
;
id
:
number
;
insurance
:
string
;
latitude
:
number
;
longitude
:
number
;
orderAmount
:
number
;
orderLevel
:
number
;
orderLevelEnum
:
string
;
orderNumber
:
string
;
orderStatus
:
string
;
paramMoney
:
number
;
preemptTotalAmount
:
number
;
provinceCode
:
number
;
publish
:
number
;
publishAccountId
:
number
;
publishName
:
string
;
publishPhone
:
string
;
publisherNumber
:
string
;
reason
:
string
;
requireDescription
:
string
;
requireUrl
:
string
;
requirementTypeId
:
number
;
requirementTypeName
:
string
;
requirementsInfoId
:
number
;
serviceId
:
number
;
serviceName
:
string
;
solved
:
boolean
;
taskAddress
:
string
;
taskEndTime
:
string
;
taskStartTime
:
string
;
taskTitle
:
string
;
totalAmount
:
number
;
updateOrderAmount
:
number
;
url
:
string
;
userAccountId
:
number
;
userPort
:
string
;
waiting
:
string
;
afterModificationUrl
:
string
;
afterModificationReason
:
string
;
preemptPhone
:
string
;
pilotCertificationUserId
:
number
;
pilotCertificationId
:
number
;
requireNum
:
number
;
repertory
:
number
;
fatherRequireId
:
number
;
}
>
;
src/api/modules/orderManage.ts
浏览文件 @
c845a956
...
...
@@ -43,6 +43,7 @@ import {
rentOrderSendType
,
rentOrderDetailType
,
rentPfConfirmOrderWareType
,
requirementsDetailPublishType
,
}
from
'~/api/interface/orderManageType'
;
export
class
OrderManageAPI
{
...
...
@@ -176,4 +177,8 @@ export class OrderManageAPI {
// 租赁订单-平台确认归还
static
rentPfConfirmOrderWare
:
rentPfConfirmOrderWareType
=
(
data
)
=>
axios
.
post
(
'/oms/lease/order/pfConfirmOrderWare'
,
data
);
// 小程序-详情——需求发布
static
requirementsDetailPublish
:
requirementsDetailPublishType
=
(
params
)
=>
axios
.
get
(
'/release/requirements/detailPublish'
,
{
params
});
}
src/pages/orderManage/demandOrder/orderDetail/index.tsx
浏览文件 @
c845a956
import
{
Button
,
Descriptions
,
Form
,
message
,
Modal
,
Radio
,
Steps
}
from
'antd'
;
import
{
Button
,
Descriptions
,
Form
,
Image
,
message
,
Modal
,
Radio
,
Steps
}
from
'antd'
;
import
{
useNavigate
}
from
'react-router-dom'
;
import
RichText
from
'~/components/richText'
;
import
{
useSearchParams
}
from
'react-router-dom'
;
import
{
OrderManageAPI
}
from
'~/api'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
Key
,
useEffect
,
useState
}
from
'react'
;
import
{
InterDataType
}
from
'~/api/interface'
;
import
{
serviceOrderFormDetailsType
}
from
'~/api/interface/orderManageType'
;
import
'./index.scss'
;
...
...
@@ -86,12 +86,16 @@ const DemandOrderDetail = () => {
(
a
,
b
)
=>
Number
(
a
.
orderStatus
)
-
Number
(
b
.
orderStatus
),
);
if
(
demandDetail
)
{
const
flowDictionaryFilterResult
=
[
'700'
].
includes
(
demandDetail
.
orderStatus
)
?
flowDictionarySortResult
.
filter
((
v
)
=>
v
.
orderStatus
===
demandDetail
.
orderStatus
)
:
[
'550'
].
includes
(
demandDetail
.
orderStatus
)
const
flowDictionaryFilterResult
=
[
'700'
].
includes
(
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
,
)
?
flowDictionarySortResult
.
filter
(
(
v
)
=>
v
.
orderStatus
===
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
,
)
:
[
'550'
].
includes
(
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
)
?
flowDictionarySortResult
.
filter
((
v
)
=>
!
[
'700'
,
'500'
].
includes
(
v
.
orderStatus
))
:
flowDictionarySortResult
.
filter
((
v
)
=>
!
[
'700'
,
'550'
].
includes
(
v
.
orderStatus
));
cons
t
stepList
=
flowDictionaryFilterResult
le
t
stepList
=
flowDictionaryFilterResult
.
map
((
v
)
=>
{
return
{
...
v
,
...
...
@@ -100,15 +104,26 @@ const DemandOrderDetail = () => {
})
.
map
((
v
)
=>
{
return
{
title
:
demandDetail
?.
orderStatus
>
v
.
orderStatus
?
v
.
doing
:
v
.
waiting
,
title
:
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
>
v
.
orderStatus
?
v
.
doing
:
v
.
waiting
,
orderStatus
:
v
.
orderStatus
,
description
:
v
.
key
?
flowDictionaryAndTimeRes
.
result
[
v
.
key
]?.
createTime
||
''
:
''
,
};
});
// 如果状态大于200,即相当于需求方同意接单,则不显示拒绝的状态
if
(
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
!==
'170'
)
{
stepList
=
stepList
.
filter
((
i
)
=>
!
[
'170'
].
includes
(
i
.
orderStatus
));
}
setSteps
(
stepList
.
map
((
v
)
=>
({
title
:
v
.
title
,
description
:
v
.
description
})));
setCurrentStep
(
stepList
.
findIndex
((
v
)
=>
v
.
orderStatus
===
demandDetail
.
orderStatus
));
setCurrentStep
(
stepList
.
findIndex
(
(
v
)
=>
v
.
orderStatus
===
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
,
),
);
}
},
);
...
...
@@ -126,7 +141,7 @@ const DemandOrderDetail = () => {
...
values
,
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
message
.
success
(
'判定成功'
);
message
.
success
(
'判定成功'
)
.
then
()
;
getServiceOrderFormDetails
(
Number
(
searchParams
.
get
(
'id'
)));
}
});
...
...
@@ -140,6 +155,19 @@ const DemandOrderDetail = () => {
navigate
(
-
1
);
};
// 转化图片字段
const
transformImg
=
(
img
?:
string
)
=>
{
try
{
if
(
img
)
{
return
JSON
.
parse
(
img
);
}
else
{
return
[];
}
}
catch
(
err
)
{
return
[];
}
};
useEffect
(()
=>
{
getServiceOrderFormDetails
(
Number
(
searchParams
.
get
(
'id'
)));
},
[]);
...
...
@@ -165,40 +193,102 @@ const DemandOrderDetail = () => {
</
Descriptions
.
Item
>
</
Descriptions
>
<
Descriptions
title=
'订单信息'
bordered
style=
{
{
marginTop
:
'10px'
}
}
>
<
Descriptions
.
Item
label=
'发单时间'
>
{
demandDetail
?.
createTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'订单类型'
>
{
demandDetail
?.
serviceName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'订单编号'
>
{
demandDetail
?.
publisherNumber
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'发单时间'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
createTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'订单类型'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
serviceName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'订单编号'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
publisherNumber
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'订单金额'
>
{
demandDetail
?.
orderAmount
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderAmount
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'任务时间'
>
{
demandDetail
?.
taskStartTime
}
~
{
demandDetail
?.
taskEndTime
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
taskStartTime
}
~
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
taskEndTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'任务地址'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
taskAddress
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'任务地址'
>
{
demandDetail
?.
taskAddress
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'平台收益'
>
{
demandDetail
?.
orderEarnings
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderEarnings
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
</
Descriptions
>
{
demandDetail
?.
serviceArriveSceneDTO
&&
(
<>
<
Descriptions
title=
'飞手抵达任务地点'
bordered
style=
{
{
marginTop
:
'10px'
}
}
contentStyle=
{
{
width
:
300
}
}
>
<
Descriptions
.
Item
label=
'飞手位置'
>
{
demandDetail
?.
serviceArriveSceneDTO
?.
sceneAddress
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'飞手凭证'
>
{
transformImg
(
demandDetail
?.
serviceArriveSceneDTO
?.
sceneUrl
)?.
map
(
(
v
:
string
,
i
:
Key
)
=>
(
<
Image
key=
{
i
}
src=
{
v
}
alt=
'飞手凭证'
style=
{
{
width
:
'35px'
,
height
:
'35px'
}
}
/>
),
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'完成时间'
>
{
demandDetail
?.
serviceArriveSceneDTO
?.
updateTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</>
)
}
{
demandDetail
?.
serviceArriveSceneDTO
&&
(
<>
<
Descriptions
title=
'飞手完成任务'
bordered
style=
{
{
marginTop
:
'10px'
}
}
contentStyle=
{
{
width
:
300
}
}
>
<
Descriptions
.
Item
label=
'任务描述'
>
{
demandDetail
?.
serviceFulfilATaskDTO
?.
taskDescribe
?
demandDetail
?.
serviceFulfilATaskDTO
?.
taskDescribe
:
'无'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'飞手凭证'
>
{
transformImg
(
demandDetail
?.
serviceFulfilATaskDTO
?.
taskUrl
)?.
map
(
(
v
:
string
,
i
:
Key
)
=>
(
<
Image
key=
{
i
}
src=
{
v
}
alt=
'飞手凭证'
style=
{
{
width
:
'35px'
,
height
:
'35px'
}
}
/>
),
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'抵达时间'
>
{
demandDetail
?.
serviceArriveSceneDTO
?.
updateTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</>
)
}
<
Descriptions
title=
'发单方'
bordered
style=
{
{
marginTop
:
'10px'
}
}
>
<
Descriptions
.
Item
label=
'冻结云享金'
>
{
demandDetail
?.
cashAmount
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
cashAmount
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'冻结余额'
>
{
demandDetail
?.
salaryAmount
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
s
erviceOrderFormDetailsDTO
?.
s
alaryAmount
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'冻结微信支付'
>
{
demandDetail
?.
weChat
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
weChat
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
</
Descriptions
>
<
Descriptions
title=
'接单方'
bordered
style=
{
{
marginTop
:
'10px'
}
}
>
<
Descriptions
.
Item
label=
'冻结云享金'
>
{
demandDetail
?.
preemptCashAmount
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
preemptCashAmount
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'冻结余额'
>
{
demandDetail
?.
preemptSalaryAmount
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
preemptSalaryAmount
.
toFixed
(
2
)
.
toLocaleString
()
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'冻结微信支付'
>
{
demandDetail
?.
preemptWeChat
.
toFixed
(
2
).
toLocaleString
()
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
preemptWeChat
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
</
Descriptions
>
<
Descriptions
...
...
@@ -206,7 +296,7 @@ const DemandOrderDetail = () => {
style=
{
{
marginTop
:
'10px'
}
}
column=
{
1
}
extra=
{
demandDetail
?.
orderStatus
===
'700'
?
(
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'700'
?
(
''
)
:
(
<
Button
danger
type=
'primary'
onClick=
{
submitDispute
}
>
...
...
@@ -227,19 +317,32 @@ const DemandOrderDetail = () => {
<
Descriptions
.
Item
>
<
Form
form=
{
controversyForm
}
initialValues=
{
{
duty
:
demandDetail
?.
orderStatus
===
'700'
?
demandDetail
?.
duty
:
1
}
}
initialValues=
{
{
duty
:
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'700'
?
demandDetail
?.
serviceOrderFormDetailsDTO
?.
duty
:
1
,
}
}
>
<
Form
.
Item
label=
'争议结果'
name=
'duty'
>
{
demandDetail
?.
orderStatus
===
'700'
?
(
<
span
>
{
dutyOptionList
.
find
((
v
)
=>
v
.
value
===
demandDetail
.
duty
)?.
label
}
</
span
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'700'
?
(
<
span
>
{
dutyOptionList
.
find
(
(
v
)
=>
v
.
value
===
demandDetail
?.
serviceOrderFormDetailsDTO
?.
duty
,
)?.
label
}
</
span
>
)
:
(
<
Radio
.
Group
options=
{
dutyOptionList
}
></
Radio
.
Group
>
)
}
</
Form
.
Item
>
<
Form
.
Item
label=
'争议描述'
name=
'decisionContent'
>
{
demandDetail
?.
orderStatus
===
'700'
?
(
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'700'
?
(
<
div
dangerouslySetInnerHTML=
{
{
__html
:
demandDetail
.
decisionContent
||
''
}
}
dangerouslySetInnerHTML=
{
{
__html
:
demandDetail
?.
serviceOrderFormDetailsDTO
?.
decisionContent
||
''
,
}
}
className=
'detail-rich-text'
></
div
>
)
:
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论