Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
517aef73
提交
517aef73
authored
11月 29, 2023
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化:任务订单结算
上级
b4299b9c
流水线
#7300
已通过 于阶段
in 1 分 8 秒
变更
2
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
42 行增加
和
37 行删除
+42
-37
index.tsx
...Manage/demandOrder/orderDetail/comp/orderSettle/index.tsx
+29
-32
index.tsx
src/pages/orderManage/demandOrder/orderDetail/index.tsx
+13
-5
没有找到文件。
src/pages/orderManage/demandOrder/orderDetail/comp/orderSettle/index.tsx
浏览文件 @
517aef73
...
...
@@ -16,7 +16,10 @@ type DetailType = InterDataType<serviceOrderFormDetailsType>;
// 列表类型
type
ListType
=
InterDataType
<
getOrderAmountDetailsType
>
;
const
OrderSettleView
:
React
.
FC
<
{
detail
:
DetailType
}
>
=
({
detail
})
=>
{
const
OrderSettleView
:
React
.
FC
<
{
detail
:
DetailType
;
onRefresh
:
()
=>
void
}
>
=
({
detail
,
onRefresh
,
})
=>
{
// 表格列表
const
[
tableData
,
setTableData
]
=
useState
<
ListType
>
([]);
// 新增弹窗是否开启
...
...
@@ -30,19 +33,7 @@ const OrderSettleView: React.FC<{ detail: DetailType }> = ({ detail }) => {
});
if
(
res
&&
res
.
code
===
'200'
)
{
const
list
=
res
.
result
||
[];
// const list = new Array(1).fill(undefined).map((_i, j) => ({
// id: j + 1,
// workDate: dayjs().add(j, 'day').format('YYYY-MM-DD'),
// dailyWage: 11,
// highTemperatureSubsidy: 22,
// realWages: 33,
// rentalSubsidy: 44,
// requirementsInfoId: 55,
// settleAccountsProportion: 66,
// subsidyFestival: 77,
// trafficSubsidy: 88,
// }));
console
.
log
(
'获取列表数据 --->'
,
getTableTotal
(
list
));
// console.log('获取列表数据 --->', getTableTotal(list));
setTableData
(
getTableTotal
(
list
));
}
};
...
...
@@ -121,6 +112,7 @@ const OrderSettleView: React.FC<{ detail: DetailType }> = ({ detail }) => {
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'操作成功'
);
await
getTableData
();
onRefresh
();
}
};
// 组件挂载
...
...
@@ -144,7 +136,8 @@ const OrderSettleView: React.FC<{ detail: DetailType }> = ({ detail }) => {
dataIndex
:
'action'
,
align
:
'center'
,
render
:
(
_value
,
record
,
index
)
=>
index
!==
tableData
.
length
-
1
&&
(
index
!==
tableData
.
length
-
1
&&
detail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'400'
&&
(
<>
<
Button
type=
'link'
...
...
@@ -166,24 +159,28 @@ const OrderSettleView: React.FC<{ detail: DetailType }> = ({ detail }) => {
<>
<
div
className=
'order-settle'
>
<
div
className=
'settle-title'
>
订单结算
</
div
>
<
Button
size=
'middle'
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
style=
{
{
marginBottom
:
'10px'
}
}
onClick=
{
()
=>
setAddEditVisible
(
true
)
}
>
添加
</
Button
>
<
Table
size=
'small'
rowKey=
'id'
bordered
columns=
{
columns
}
dataSource=
{
tableData
}
/>
<
div
className=
'settle-action'
>
<
Button
size=
'middle'
type=
'primary'
onClick=
{
handleSubmit
}
>
确认修改
</
Button
>
<
Button
size=
'middle'
onClick=
{
getTableData
}
>
重置
{
detail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'400'
&&
(
<
Button
size=
'middle'
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
style=
{
{
marginBottom
:
'10px'
}
}
onClick=
{
()
=>
setAddEditVisible
(
true
)
}
>
添加
</
Button
>
</
div
>
)
}
<
Table
size=
'small'
rowKey=
'id'
bordered
columns=
{
columns
}
dataSource=
{
tableData
}
/>
{
detail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'400'
&&
(
<
div
className=
'settle-action'
>
<
Button
size=
'middle'
type=
'primary'
onClick=
{
handleSubmit
}
>
确认修改
</
Button
>
<
Button
size=
'middle'
onClick=
{
getTableData
}
>
重置
</
Button
>
</
div
>
)
}
</
div
>
<
OrderSettleModal
open=
{
addEditVisible
}
...
...
src/pages/orderManage/demandOrder/orderDetail/index.tsx
浏览文件 @
517aef73
...
...
@@ -168,6 +168,10 @@ const DemandOrderDetail = () => {
return
[];
}
};
// 刷新详情信息
const
handleRefresh
=
()
=>
{
getServiceOrderFormDetails
(
Number
(
searchParams
.
get
(
'id'
)));
};
useEffect
(()
=>
{
getServiceOrderFormDetails
(
Number
(
searchParams
.
get
(
'id'
)));
...
...
@@ -203,8 +207,8 @@ const DemandOrderDetail = () => {
<
Descriptions
.
Item
label=
'订单编号'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
publisherNumber
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'订单
金额
'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderAmount
.
toFixed
(
2
).
toLocaleString
()
}
<
Descriptions
.
Item
label=
'订单
描述
'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
requireDescription
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'任务时间'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
taskStartTime
}
~
...
...
@@ -213,6 +217,9 @@ const DemandOrderDetail = () => {
<
Descriptions
.
Item
label=
'任务地址'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
taskAddress
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'订单金额'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderAmount
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'平台收益'
>
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderEarnings
.
toFixed
(
2
).
toLocaleString
()
}
</
Descriptions
.
Item
>
...
...
@@ -293,9 +300,10 @@ const DemandOrderDetail = () => {
</
Descriptions
.
Item
>
</
Descriptions
>
{
/*订单结算*/
}
{
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
===
'400'
&&
(
<
OrderSettleView
detail=
{
demandDetail
}
/>
)
}
{
demandDetail
&&
Number
(
demandDetail
?.
serviceOrderFormDetailsDTO
?.
orderStatus
||
0
)
>=
400
&&
(
<
OrderSettleView
detail=
{
demandDetail
}
onRefresh=
{
()
=>
handleRefresh
()
}
/>
)
}
<
Descriptions
title=
'订单争议处理记录'
style=
{
{
marginTop
:
'10px'
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论