Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
486e6386
提交
486e6386
authored
9月 18, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:采购订单列表备注
上级
29a08cc2
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
155 行增加
和
15 行删除
+155
-15
orderManageType.ts
src/api/interface/orderManageType.ts
+29
-0
orderManage.ts
src/api/modules/orderManage.ts
+7
-0
index.tsx
...ocurementOrder/orderList/components/remarkModal/index.tsx
+60
-0
index.tsx
src/pages/orderManage/procurementOrder/orderList/index.tsx
+47
-3
index.tsx
...e/productOrder/orderList/components/remarkModal/index.tsx
+1
-1
router.tsx
src/router/router.tsx
+11
-11
没有找到文件。
src/api/interface/orderManageType.ts
浏览文件 @
486e6386
...
...
@@ -1601,3 +1601,32 @@ export type uavPoSendType = InterFunction<
},
any
>
;
// 采购订单-平台备注
export
type
uavPoRemarkType
=
InterFunction
<
{
/**
* content
*/
content
:
string
;
/**
* id
*/
id
:
number
;
},
any
>
;
// 采购订单-商家备注
export
type
uavPoSellerRemarkType
=
InterFunction
<
{
/**
* content
*/
content
:
string
;
/**
* id
*/
id
:
number
;
},
any
>
;
src/api/modules/orderManage.ts
浏览文件 @
486e6386
...
...
@@ -33,6 +33,8 @@ import {
serviceOrderStatusType
,
serviceOrderType
,
uavPoCheckPayType
,
uavPoRemarkType
,
uavPoSellerRemarkType
,
uavPoSendType
,
uploadPOrderType
,
walletAmountType
,
...
...
@@ -151,4 +153,9 @@ export class OrderManageAPI {
static
uavPoCheckPay
:
uavPoCheckPayType
=
(
data
)
=>
axios
.
post
(
'/oms/uav-po/checkPay'
,
data
);
// 采购订单-发货
static
uavPoSend
:
uavPoSendType
=
(
data
)
=>
axios
.
post
(
'/oms/uav-po/send'
,
data
);
// 采购订单-平台备注
static
setUavPoRemark
:
uavPoRemarkType
=
(
params
)
=>
axios
.
get
(
'/oms/uav-po/userRemark'
,
{
params
});
static
setUavPoSellerRemark
:
uavPoSellerRemarkType
=
(
params
)
=>
axios
.
get
(
'/oms/uav-po/sellerRemark'
,
{
params
});
}
src/pages/orderManage/procurementOrder/orderList/components/remarkModal/index.tsx
0 → 100644
浏览文件 @
486e6386
import
{
Form
,
Input
,
Modal
,
ModalProps
}
from
'antd'
;
import
{
FC
,
useEffect
}
from
'react'
;
import
{
useSelector
}
from
'react-redux'
;
import
{
listPurchaseOrderType
}
from
'~/api/interface/orderManageType'
;
import
{
InterListType
}
from
'~/api/interface'
;
import
{
OrderManageAPI
}
from
'~/api'
;
// 采购订单列表返回类型
type
procurementOrderType
=
InterListType
<
listPurchaseOrderType
>
[
0
];
interface
selfProps
{
onOk
:
()
=>
void
;
onCancel
:
()
=>
void
;
currentOrderItem
:
procurementOrderType
|
undefined
;
}
const
RemarkModal
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onCancel
,
onOk
,
currentOrderItem
})
=>
{
const
[
form
]
=
Form
.
useForm
<
{
remark
:
string
}
>
();
const
{
userInfo
}
=
useSelector
((
state
:
any
)
=>
state
.
UserInfo
);
const
handleCancel
=
()
=>
{
onCancel
();
};
const
handleOk
=
()
=>
{
form
.
validateFields
().
then
((
value
)
=>
{
if
(
currentOrderItem
)
{
OrderManageAPI
[
userInfo
.
companyInfoVO
.
companyType
===
0
?
'setUavPoRemark'
:
'setUavPoSellerRemark'
]({
id
:
currentOrderItem
?.
id
,
content
:
value
.
remark
,
}).
then
(()
=>
{
onOk
();
form
.
resetFields
();
});
}
});
};
useEffect
(()
=>
{
if
(
currentOrderItem
&&
open
)
{
form
.
setFieldValue
(
'remark'
,
userInfo
.
companyInfoVO
.
companyType
===
0
?
currentOrderItem
.
userRemark
||
undefined
:
currentOrderItem
.
sellerRemark
||
undefined
,
);
}
},
[
currentOrderItem
,
open
]);
return
(
<
Modal
open=
{
open
}
onCancel=
{
handleCancel
}
onOk=
{
handleOk
}
title=
'备注'
>
<
Form
form=
{
form
}
>
<
Form
.
Item
name=
'remark'
>
<
Input
.
TextArea
placeholder=
'请输入备注'
maxLength=
{
70
}
showCount
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
RemarkModal
;
src/pages/orderManage/procurementOrder/orderList/index.tsx
浏览文件 @
486e6386
import
SearchBox
from
'~/components/search-box'
;
import
{
Button
,
Image
,
Table
}
from
'antd'
;
import
{
Button
,
Image
,
Table
,
Tooltip
}
from
'antd'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
FddInterfaceAPI
,
OrderManageAPI
}
from
'~/api'
;
import
{
ColumnsType
}
from
'antd/es/table/InternalTable'
;
...
...
@@ -17,7 +17,9 @@ import { decode } from 'js-base64';
import
UploadPayment
from
'~/pages/orderManage/procurementOrder/orderList/components/uploadPayment'
;
import
ApprovalOrder
from
'~/components/order/productOrder/approvalOrder'
;
import
ShipmentsOrder
from
'~/components/order/productOrder/shipmentsOrder'
;
import
RemarkModal
from
'./components/remarkModal'
;
import
{
useSelector
}
from
'react-redux'
;
import
{
CommentOutlined
}
from
'@ant-design/icons'
;
// 采购订单列表返回类型
type
procurementOrderListType
=
InterListType
<
listPurchaseOrderType
>
;
...
...
@@ -137,7 +139,7 @@ const ProcurementOrderList = () => {
),
},
{
title
:
'供应商信息'
,
title
:
()
=>
(
userInfo
.
companyInfoVO
.
companyType
===
0
?
'供应商信息'
:
'采购商信息'
)
,
align
:
'center'
,
render
:
(
_text
:
any
,
record
)
=>
(
<
TableItem
...
...
@@ -145,6 +147,15 @@ const ProcurementOrderList = () => {
<
div
>
<
div
>
{
record
.
companyName
}
</
div
>
<
div
>
{
record
.
thirdPhoneNum
}
</
div
>
{
getCurrenRemark
(
record
)
?
(
<
div
>
<
Tooltip
placement=
'top'
title=
{
getCurrenRemark
(
record
)
}
>
<
Button
icon=
{
<
CommentOutlined
/>
}
></
Button
>
</
Tooltip
>
</
div
>
)
:
(
''
)
}
</
div
>
}
/>
...
...
@@ -167,7 +178,17 @@ const ProcurementOrderList = () => {
{
title
:
'备注'
,
align
:
'center'
,
render
:
()
=>
<
TableItem
tr=
{
<
Button
type=
'link'
>
--
</
Button
>
}
/>,
render
:
(
_text
:
any
,
record
)
=>
(
<
TableItem
tr=
{
<
Button
type=
'link'
onClick=
{
()
=>
remarkModalShowClick
(
record
)
}
>
{
userInfo
.
companyInfoVO
.
companyType
===
0
?
record
.
userRemark
||
'--'
:
record
.
sellerRemark
||
'--'
}
</
Button
>
}
/>
),
},
{
title
:
'操作'
,
...
...
@@ -225,6 +246,7 @@ const ProcurementOrderList = () => {
const
[
uploadPaymentShow
,
setUploadPaymentShow
]
=
useState
<
boolean
>
(
false
);
const
[
approvalOrderShow
,
setApprovalOrderShow
]
=
useState
<
boolean
>
(
false
);
const
[
shipmentsOrderShow
,
setShipmentsOrderShow
]
=
useState
<
boolean
>
(
false
);
const
[
remarkModalShow
,
setRemarkModalShow
]
=
useState
<
boolean
>
(
false
);
// 合同地址
const
[
contractUrl
,
setContractUrl
]
=
useState
<
string
>
(
''
);
...
...
@@ -368,6 +390,21 @@ const ProcurementOrderList = () => {
setShipmentsOrderShow
(
false
);
getListPurchaseOrder
(
query
);
};
// 备注
const
remarkModalShowClick
=
(
record
:
procurementOrderListType
[
0
])
=>
{
setCurrentOrderItem
({
...
record
});
setRemarkModalShow
(
true
);
};
const
remarkModalOk
=
()
=>
{
setRemarkModalShow
(
false
);
getListPurchaseOrder
(
query
);
};
const
remarkModalCancel
=
()
=>
{
setRemarkModalShow
(
false
);
};
const
getCurrenRemark
=
(
record
:
procurementOrderListType
[
0
])
=>
{
return
userInfo
.
companyInfoVO
.
companyType
===
0
?
record
.
sellerRemark
:
record
.
userRemark
;
};
useEffect
(()
=>
{
getOrderStatusList
();
...
...
@@ -462,6 +499,13 @@ const ProcurementOrderList = () => {
currentOrderItem=
{
currentOrderItem
}
type=
{
0
}
/>
{
/*备注*/
}
<
RemarkModal
open=
{
remarkModalShow
}
onOk=
{
remarkModalOk
}
onCancel=
{
remarkModalCancel
}
currentOrderItem=
{
currentOrderItem
}
/>
</
div
>
);
};
...
...
src/pages/orderManage/productOrder/orderList/components/remarkModal/index.tsx
浏览文件 @
486e6386
...
...
@@ -39,7 +39,7 @@ const RemarkModal: FC<ModalProps & selfProps> = ({ open, onCancel, onOk, mallOrd
return
(
<
Modal
open=
{
open
}
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
title=
'备注'
>
<
Form
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
20
}
}
form=
{
form
}
>
<
Form
.
Item
label=
'备注'
name=
'content'
>
<
Form
.
Item
name=
'content'
>
<
Input
.
TextArea
placeholder=
'请输入备注'
maxLength=
{
70
}
showCount
rows=
{
4
}
/>
</
Form
.
Item
>
</
Form
>
...
...
src/router/router.tsx
浏览文件 @
486e6386
...
...
@@ -228,17 +228,17 @@ export const whiteRouterList: Array<RouteObject & RouteObjectType> = [
// 路由数组
export
const
routerList
:
Array
<
RouteObjectType
>
=
[
{
path
:
'/dataDashboards'
,
element
:
withLoadingComponent
(<
DataBoardView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
icon
:
<
BarChartOutlined
/>,
title
:
'数据看板'
,
id
:
300
,
develop
:
true
,
},
},
//
{
//
path: '/dataDashboards',
//
element: withLoadingComponent(<DataBoardView />),
//
errorElement: <ErrorPage />,
//
meta: {
//
icon: <BarChartOutlined />,
//
title: '数据看板',
//
id: 300,
//
develop: true,
//
},
//
},
{
path
:
'/customManage'
,
element
:
<
LayoutView
/>,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论