Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
37165d17
提交
37165d17
authored
6月 21, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
功能:需求手机对接
上级
7076c110
f5dcb140
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
398 行增加
和
14 行删除
+398
-14
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
commonType.ts
src/api/interface/commonType.ts
+23
-0
orderManageType.ts
src/api/interface/orderManageType.ts
+13
-13
common.ts
src/api/modules/common.ts
+20
-0
index.tsx
...s/resourceManage/tenderManage/comp/addEditModal/index.tsx
+129
-0
index.tsx
src/pages/resourceManage/tenderManage/index.tsx
+202
-0
router.tsx
src/router/router.tsx
+10
-0
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
37165d17
...
@@ -14,4 +14,4 @@ patches:
...
@@ -14,4 +14,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
935be86bbe476507558bd73ff705448a97a78f3d
newTag
:
633654fa8adfc84bbb387a72d7fd5c5e07c0127e
src/api/interface/commonType.ts
浏览文件 @
37165d17
...
@@ -139,3 +139,26 @@ export type batchRemoveBannerInfo = InterFunction<any, NonNullable<unknown>>;
...
@@ -139,3 +139,26 @@ export type batchRemoveBannerInfo = InterFunction<any, NonNullable<unknown>>;
export
type
removeBannerInfo
=
InterFunction
<
{
id
:
number
},
NonNullable
<
unknown
>>
;
export
type
removeBannerInfo
=
InterFunction
<
{
id
:
number
},
NonNullable
<
unknown
>>
;
// V1.0.1-banner-排序交换
// V1.0.1-banner-排序交换
export
type
exchangeBannerInfo
=
InterFunction
<
Array
<
any
>
,
NonNullable
<
unknown
>>
;
export
type
exchangeBannerInfo
=
InterFunction
<
Array
<
any
>
,
NonNullable
<
unknown
>>
;
// 查询招标快讯列表-分页
export
type
releaseTenderNews
=
InterListFunction
<
{
endTime
?:
string
;
startTime
?:
string
;
tenderName
?:
string
;
using
?:
number
;
},
{
createTime
:
Date
;
id
:
number
;
port
:
number
;
tenderName
:
string
;
using
:
number
;
}
>
;
// 新增招标快讯
export
type
releaseTenderNewsAdd
=
InterFunction
<
any
,
any
>
;
// 修改招标快讯
export
type
releaseTenderNewsUpdate
=
InterFunction
<
any
,
any
>
;
// 删除招标快讯
export
type
releaseTenderNewsDelete
=
InterFunction
<
{
id
:
number
},
any
>
;
src/api/interface/orderManageType.ts
浏览文件 @
37165d17
...
@@ -305,19 +305,19 @@ export type orderDetailType = InterFunction<
...
@@ -305,19 +305,19 @@ export type orderDetailType = InterFunction<
// 后台管理——发货-订单/ 卖家发货
// 后台管理——发货-订单/ 卖家发货
export
type
sendOrderWareType
=
InterFunction
<
export
type
sendOrderWareType
=
InterFunction
<
{
{
authPwd
:
string
;
authPwd
?
:
string
;
imgs
:
Array
<
string
>
;
imgs
?
:
Array
<
string
>
;
orderInfoId
:
number
;
orderInfoId
?
:
number
;
orderRefundId
:
number
;
orderRefundId
?
:
number
;
remark
:
string
;
remark
?
:
string
;
renAddress
:
string
;
renAddress
?
:
string
;
renName
:
string
;
renName
?
:
string
;
renPhone
:
string
;
renPhone
?
:
string
;
sendAddress
:
string
;
sendAddress
?
:
string
;
sendExCode
:
string
;
sendExCode
?
:
string
;
sendExNo
:
string
;
sendExNo
?
:
string
;
vcuSatus
:
number
;
vcuSatus
?
:
number
;
videoUrl
:
string
;
videoUrl
?
:
string
;
},
},
NonNullable
<
unknown
>
NonNullable
<
unknown
>
>
;
>
;
...
...
src/api/modules/common.ts
浏览文件 @
37165d17
...
@@ -7,6 +7,10 @@ import {
...
@@ -7,6 +7,10 @@ import {
insertModuleInfo
,
insertModuleInfo
,
listBannerInfoPage
,
listBannerInfoPage
,
listModuleInfoPage
,
listModuleInfoPage
,
releaseTenderNews
,
releaseTenderNewsAdd
,
releaseTenderNewsDelete
,
releaseTenderNewsUpdate
,
removeBannerInfo
,
removeBannerInfo
,
removeModuleInfo
,
removeModuleInfo
,
updateBannerInfo
,
updateBannerInfo
,
...
@@ -70,4 +74,20 @@ export class CommonAPI {
...
@@ -70,4 +74,20 @@ export class CommonAPI {
// V1.0.1-banner-排序交换
// V1.0.1-banner-排序交换
static
exchangeBannerInfo
:
exchangeBannerInfo
=
(
params
)
=>
static
exchangeBannerInfo
:
exchangeBannerInfo
=
(
params
)
=>
axios
.
post
(
'/release/module/exchangeBannerInfo'
,
params
);
axios
.
post
(
'/release/module/exchangeBannerInfo'
,
params
);
// 查询招标快讯列表-分页
static
releaseTenderNews
:
releaseTenderNews
=
(
params
)
=>
axios
.
get
(
'/release/tender/news'
,
{
params
});
// 新增招标快讯
static
releaseTenderNewsAdd
:
releaseTenderNewsAdd
=
(
params
)
=>
axios
.
post
(
'/release/tender/news'
,
params
);
// 修改招标快讯
static
releaseTenderNewsUpdate
:
releaseTenderNewsUpdate
=
(
params
)
=>
axios
.
put
(
'/release/tender/news'
,
params
);
// 删除招标快讯
static
releaseTenderNewsDelete
:
releaseTenderNewsDelete
=
(
params
)
=>
axios
.
delete
(
`/release/tender/news/
${
params
?.
id
}
`);
}
}
src/pages/resourceManage/tenderManage/comp/addEditModal/index.tsx
0 → 100644
浏览文件 @
37165d17
import
React
,
{
useEffect
}
from
'react'
;
import
{
Button
,
Form
,
Input
,
message
,
Modal
,
Select
}
from
'antd'
;
import
{
InterListType
,
InterReqType
}
from
'~/api/interface'
;
import
{
insertBannerInfo
,
releaseTenderNews
}
from
'~/api/interface/commonType'
;
import
{
CommonAPI
}
from
'~/api'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
// 列表的类型
type
TableType
=
InterListType
<
releaseTenderNews
>
;
// 请求的表单类型
type
ReqType
=
InterReqType
<
insertBannerInfo
>
;
// 传参类型
interface
propType
{
title
:
string
;
open
:
boolean
;
closed
:
any
;
data
?:
TableType
[
0
];
}
const
AddEditModal
:
React
.
FC
<
propType
>
=
(
props
)
=>
{
AddEditModal
.
defaultProps
=
{
data
:
undefined
,
};
// 参数
const
{
title
,
open
,
closed
,
data
}
=
props
;
// 表单钩子
const
[
form
]
=
Form
.
useForm
<
ReqType
>
();
// 关闭弹窗
const
handleCancel
=
()
=>
{
form
.
resetFields
();
closed
();
};
// 确认事件
const
handleOk
=
()
=>
{
form
.
validateFields
()
.
then
(
async
(
values
)
=>
{
await
handleSubmit
(
values
as
ReqType
&
{
file
:
any
[]
});
})
.
catch
((
err
)
=>
{
message
.
warning
({
content
:
err
.
errorFields
[
0
].
errors
[
0
],
})
.
then
();
});
};
// 提交事件
const
handleSubmit
=
async
(
values
:
ReqType
&
{
file
:
any
[]
})
=>
{
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
values
?.
file
?.
at
(
-
1
));
const
blob
=
new
Blob
([
JSON
.
stringify
({
...
values
,
id
:
data
?.
id
?
data
?.
id
:
null
})],
{
type
:
'application/json'
,
});
formData
.
append
(
'tenderNewsVO'
,
blob
);
const
res
=
await
CommonAPI
[
data
?.
id
?
'releaseTenderNewsUpdate'
:
'releaseTenderNewsAdd'
](
formData
,
);
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'操作成功'
);
handleCancel
();
}
};
// componentDidMount
useEffect
(()
=>
{
if
(
!
open
)
return
;
if
(
!
data
)
return
;
form
.
setFieldsValue
(
data
);
// console.log('data --->', data);
},
[
open
]);
return
(
<
Modal
open=
{
open
}
title=
{
title
}
onCancel=
{
handleCancel
}
onOk=
{
handleOk
}
destroyOnClose
>
<
Form
name=
'Form'
form=
{
form
}
labelAlign=
'right'
labelCol=
{
{
span
:
5
}
}
wrapperCol=
{
{
span
:
10
}
}
>
<
Form
.
Item
label=
'招标快讯名称'
name=
'tenderName'
rules=
{
[{
required
:
true
,
message
:
'请输入名称'
}]
}
>
<
Input
placeholder=
{
'请输入名称'
}
maxLength=
{
20
}
allowClear
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'状态'
name=
'using'
rules=
{
[{
required
:
true
,
message
:
'请选择状态'
}]
}
initialValue=
{
1
}
>
<
Select
placeholder=
{
'请选择状态'
}
options=
{
[
{
label
:
'上架'
,
value
:
1
},
{
label
:
'下架'
,
value
:
0
},
]
}
allowClear
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'上传内容'
name=
'file'
rules=
{
[{
required
:
!
data
?.
id
,
message
:
'请上传内容'
}]
}
>
<
Uploader
listType=
{
'text'
}
fileUpload=
{
false
}
fileType=
{
[
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
,
'application/vnd.ms-excel'
,
]
}
onChange=
{
(
e
)
=>
{
form
.
setFieldValue
(
'file'
,
e
);
}
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
type=
{
'primary'
}
>
上传
</
Button
>
</
Uploader
>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AddEditModal
;
src/pages/resourceManage/tenderManage/index.tsx
0 → 100644
浏览文件 @
37165d17
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
SearchBox
from
'~/components/search-box'
;
import
{
Button
,
message
,
Modal
,
Table
}
from
'antd'
;
import
{
PlusOutlined
,
DownloadOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
CommonAPI
}
from
'~/api'
;
import
{
InterListType
,
InterReqListType
}
from
'~/api/interface'
;
import
{
releaseTenderNews
}
from
'~/api/interface/commonType'
;
import
AddEditModal
from
'./comp/addEditModal'
;
// 列表类型
type
TableType
=
InterListType
<
releaseTenderNews
>
;
// 请求的参数
type
ReqType
=
InterReqListType
<
releaseTenderNews
>
;
// 搜索表单的数据
let
query
:
ReqType
=
{};
const
TenderManageView
=
()
=>
{
const
{
confirm
}
=
Modal
;
// 新增弹窗
const
[
addModalVisible
,
setAddModalVisible
]
=
useState
<
boolean
>
(
false
);
// 需要编辑的数据
const
[
editData
,
setEditData
]
=
useState
<
TableType
[
0
]
>
();
// 表格数据
const
[
tableData
,
setTableData
]
=
useState
<
TableType
>
([]);
// 表格分页配置
const
[
pagination
,
setPagination
]
=
useState
({
total
:
0
,
pageSize
:
10
,
current
:
1
,
totalPage
:
0
,
});
// 加载列表
const
getTableList
=
async
(
value
=
{})
=>
{
// 只需要修改这个地方的接口即可
const
res
=
await
CommonAPI
.
releaseTenderNews
({
pageNo
:
pagination
.
current
,
pageSize
:
pagination
.
pageSize
,
...
value
,
...
query
,
});
if
(
res
&&
res
.
code
===
'200'
)
{
const
{
list
,
pageNo
,
totalCount
,
pageSize
,
totalPage
}
=
res
.
result
;
// 解构
setPagination
({
total
:
totalCount
,
current
:
pageNo
,
pageSize
,
totalPage
,
});
setTableData
(
list
);
}
};
// 翻页
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
getTableList
({
pageNo
,
pageSize
}).
then
();
};
// 表单提交
const
onFinish
=
(
data
:
ReqType
)
=>
{
pagination
.
current
=
1
;
query
=
data
;
getTableList
(
data
).
then
();
};
// 删除数据
const
handleDelete
=
(
record
:
TableType
[
0
])
=>
{
confirm
({
title
:
'提示'
,
content
:
'是否删除该记录?'
,
onOk
:
async
()
=>
{
const
res
=
await
CommonAPI
.
releaseTenderNewsDelete
({
id
:
record
.
id
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'删除成功'
);
paginationChange
(
tableData
.
length
===
1
?
pagination
.
current
-
1
:
pagination
.
current
,
pagination
.
pageSize
,
);
}
},
});
};
// componentDidMount
useEffect
(()
=>
{
query
=
{};
getTableList
().
then
();
},
[]);
// 表格结构
const
columns
:
ColumnsType
<
TableType
[
0
]
>
=
[
{
title
:
'招标快讯名称'
,
dataIndex
:
'tenderName'
,
align
:
'center'
,
width
:
'200px'
,
ellipsis
:
true
,
},
{
title
:
'发布时间'
,
dataIndex
:
'createTime'
,
align
:
'center'
,
width
:
'130px'
,
},
{
title
:
'状态'
,
dataIndex
:
'using'
,
align
:
'center'
,
render
:
(
text
)
=>
(
text
===
1
?
'上架'
:
'下架'
),
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
align
:
'center'
,
width
:
'200px'
,
fixed
:
'right'
,
render
:
(
_text
,
record
)
=>
(
<>
<
Button
type=
{
'link'
}
>
详情
</
Button
>
<
Button
type=
{
'link'
}
onClick=
{
()
=>
{
setEditData
(
JSON
.
parse
(
JSON
.
stringify
(
record
)));
setAddModalVisible
(
true
);
}
}
>
编辑
</
Button
>
<
Button
type=
{
'link'
}
>
用户反馈
</
Button
>
<
Button
type=
{
'link'
}
danger
onClick=
{
()
=>
handleDelete
(
record
)
}
>
删除
</
Button
>
</>
),
},
];
return
(
<>
<
SearchBox
search=
{
[
{
name
:
'keywords'
,
label
:
'名称'
,
type
:
'input'
,
placeholder
:
'请输入招标快讯名称'
},
{
name
:
'rangeTime'
,
label
:
'发布时间'
,
type
:
'rangePicker'
,
placeholder
:
'请选择开始时间和结束时间'
,
},
]
}
searchData=
{
onFinish
}
child=
{
<>
<
Button
type=
{
'primary'
}
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
setAddModalVisible
(
true
);
}
}
>
新增
</
Button
>
</>
}
otherChild=
{
<>
<
Button
type=
{
'primary'
}
icon=
{
<
DownloadOutlined
/>
}
onClick=
{
()
=>
{
console
.
log
(
'新增'
);
}
}
>
下载模板
</
Button
>
</>
}
/>
<
Table
size=
'small'
dataSource=
{
tableData
}
columns=
{
columns
}
rowKey=
'id'
// scroll={{ x: 1500 }}
bordered
pagination=
{
{
total
:
pagination
.
total
,
pageSize
:
pagination
.
pageSize
,
current
:
pagination
.
current
,
showSizeChanger
:
true
,
showQuickJumper
:
true
,
onChange
:
(
page
:
number
,
pageSize
:
number
)
=>
paginationChange
(
page
,
pageSize
),
showTotal
:
(
total
,
range
)
=>
`当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`
,
}
}
/>
<
AddEditModal
open=
{
addModalVisible
}
title=
{
editData
?.
id
?
'编辑'
:
'新增'
}
data=
{
editData
}
closed=
{
()
=>
{
setAddModalVisible
(
false
);
setEditData
(
undefined
);
paginationChange
(
pagination
.
current
,
pagination
.
pageSize
);
}
}
/>
</>
);
};
export
default
TenderManageView
;
src/router/router.tsx
浏览文件 @
37165d17
...
@@ -98,6 +98,7 @@ const DirectoryManage = React.lazy(() => import('~/pages/categoryManage/director
...
@@ -98,6 +98,7 @@ const DirectoryManage = React.lazy(() => import('~/pages/categoryManage/director
// 系统管理
// 系统管理
import
AccountManageView
from
'~/pages/systemManage/accountManage'
;
import
AccountManageView
from
'~/pages/systemManage/accountManage'
;
import
TenderManageView
from
'~/pages/resourceManage/tenderManage'
;
// const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
// const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
// const IndustryDetailView = React.lazy(
// const IndustryDetailView = React.lazy(
...
@@ -261,6 +262,15 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -261,6 +262,15 @@ export const routerList: Array<RouteObjectType> = [
icon
:
<
SketchOutlined
/>,
icon
:
<
SketchOutlined
/>,
},
},
},
},
{
path
:
'/resourceManage/tenderManage'
,
element
:
withLoadingComponent
(<
TenderManageView
/>),
meta
:
{
id
:
30200
,
title
:
'招标快讯'
,
icon
:
<
CoffeeOutlined
/>,
},
},
],
],
},
},
{
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论