Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
ae793c0d
提交
ae793c0d
authored
7月 05, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:服务关联单位,产品修改
上级
fb31c48d
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
108 行增加
和
110 行删除
+108
-110
mallManageType.ts
src/api/interface/mallManageType.ts
+4
-0
produceManageType.ts
src/api/interface/produceManageType.ts
+4
-3
index.tsx
...ponents/goods/commonAddOrEdit/addOrEditSkuModal/index.tsx
+37
-40
index.tsx
...ges/mallManage/mallGoods/goodsAddOrEditOrDetail/index.tsx
+1
-3
index.tsx
src/pages/mallManage/produceManage/produceDetail/index.tsx
+3
-2
index.tsx
...ge/produceList/components/addOrEditProduceModal/index.tsx
+10
-47
index.tsx
src/pages/mallManage/produceManage/produceList/index.tsx
+12
-13
index.tsx
src/pages/mallManage/serviceManage/serviceDetail/index.tsx
+1
-0
index.tsx
...ge/serviceList/components/addOrEditServiceModal/index.tsx
+35
-1
index.tsx
src/pages/mallManage/serviceManage/serviceList/index.tsx
+1
-1
没有找到文件。
src/api/interface/mallManageType.ts
浏览文件 @
ae793c0d
...
@@ -108,6 +108,7 @@ export type addServiceType = InterFunction<
...
@@ -108,6 +108,7 @@ export type addServiceType = InterFunction<
serviceName
:
string
;
serviceName
:
string
;
shareCard
?:
string
;
shareCard
?:
string
;
video
?:
string
;
video
?:
string
;
companyId
:
number
;
},
},
any
any
>
;
>
;
...
@@ -123,6 +124,7 @@ export type editServiceType = InterFunction<
...
@@ -123,6 +124,7 @@ export type editServiceType = InterFunction<
shareCard
?:
string
;
shareCard
?:
string
;
video
?:
string
;
video
?:
string
;
id
:
number
;
id
:
number
;
companyId
:
number
;
},
},
any
any
>
;
>
;
...
@@ -141,6 +143,7 @@ export type serviceType = InterItemFunction<
...
@@ -141,6 +143,7 @@ export type serviceType = InterItemFunction<
applicationId
:
number
;
applicationId
:
number
;
industryId
:
number
;
industryId
:
number
;
id
:
number
;
id
:
number
;
companyId
:
number
;
}[]
}[]
>
;
>
;
//服务-上下架-批量
//服务-上下架-批量
...
@@ -165,5 +168,6 @@ export type serviceDetailType = InterFunction<
...
@@ -165,5 +168,6 @@ export type serviceDetailType = InterFunction<
applicationId
:
number
;
applicationId
:
number
;
industryId
:
number
;
industryId
:
number
;
id
:
number
;
id
:
number
;
companyName
:
string
;
}
}
>
;
>
;
src/api/interface/produceManageType.ts
浏览文件 @
ae793c0d
...
@@ -10,7 +10,7 @@ export type MakeListType = InterItemFunction<
...
@@ -10,7 +10,7 @@ export type MakeListType = InterItemFunction<
>
;
>
;
//产品-列表
//产品-列表
export
type
productListType
=
InterItemFunction
<
export
type
productListType
=
InterItemFunction
<
{
categoryId
?:
number
;
directoryId
?:
number
;
productName
?:
string
},
{
type
?:
number
;
productName
?:
string
},
{
{
id
:
number
;
id
:
number
;
productName
:
string
;
productName
:
string
;
...
@@ -21,6 +21,7 @@ export type productListType = InterItemFunction<
...
@@ -21,6 +21,7 @@ export type productListType = InterItemFunction<
categoryName
:
string
;
categoryName
:
string
;
directoryId
:
number
;
directoryId
:
number
;
directoryName
:
string
;
directoryName
:
string
;
type
:
number
;
productSpecList
:
{
productSpecList
:
{
id
:
number
;
id
:
number
;
partNo
:
string
;
partNo
:
string
;
...
@@ -34,8 +35,7 @@ export type productListType = InterItemFunction<
...
@@ -34,8 +35,7 @@ export type productListType = InterItemFunction<
//产品-新增
//产品-新增
export
type
addProductType
=
InterFunction
<
export
type
addProductType
=
InterFunction
<
{
{
categoryId
:
number
;
type
:
number
;
directoryId
:
number
;
model
:
string
;
model
:
string
;
productBrandId
:
number
;
productBrandId
:
number
;
productName
:
string
;
productName
:
string
;
...
@@ -77,6 +77,7 @@ export type productDetailType = InterFunction<
...
@@ -77,6 +77,7 @@ export type productDetailType = InterFunction<
versionDesc
:
string
;
versionDesc
:
string
;
productSkuId
:
number
;
productSkuId
:
number
;
}[];
}[];
type
:
number
;
}
}
>
;
>
;
//产品-规格-列表
//产品-规格-列表
...
...
src/components/goods/commonAddOrEdit/addOrEditSkuModal/index.tsx
浏览文件 @
ae793c0d
...
@@ -313,47 +313,44 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
...
@@ -313,47 +313,44 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
};
};
// 点击确定,触发表单验证
// 点击确定,触发表单验证
const
submitSku
=
()
=>
{
const
submitSku
=
()
=>
{
skuForm
skuForm
.
validateFields
().
then
(
async
(
values
)
=>
{
.
validateFields
()
if
(
!
isCustomProd
)
{
.
then
(
async
(
values
)
=>
{
let
productObj
:
productType
[
0
]
|
undefined
=
undefined
;
if
(
!
isCustomProd
)
{
switch
(
currentDesc
)
{
let
productObj
:
productType
[
0
]
|
undefined
=
undefined
;
case
2
:
switch
(
currentDesc
)
{
// const schemeObj = schemeList.find((i) => i.id === values.skuId);
case
2
:
// values.skuName = schemeObj?.solutionName;
// const schemeObj = schemeList.find((i) => i.id === values.skuId);
break
;
// values.skuName = schemeObj?.solutionName;
default
:
break
;
productObj
=
productList
.
find
((
i
)
=>
i
.
id
===
values
.
skuId
);
default
:
values
.
skuName
=
productObj
?.
productName
;
productObj
=
productList
.
find
((
i
)
=>
i
.
id
===
values
.
skuId
);
values
.
skuName
=
productObj
?.
productName
;
}
values
.
specIds
=
values
.
specIds
.
reduce
((
pre
:
any
,
cur
:
number
|
string
)
=>
{
const
sourceObj
=
productSpecList
.
find
((
i
)
=>
i
.
id
===
cur
);
const
specObj
:
any
=
curtRowData
?.
specIds
&&
curtRowData
?.
specIds
.
find
((
i
:
any
)
=>
i
.
mallSpecId
===
cur
);
pre
.
push
({
mallSpecId
:
cur
,
specName
:
sourceObj
?.
specName
,
partNo
:
sourceObj
?.
partNo
,
id
:
specObj
?
specObj
.
id
:
undefined
,
});
return
pre
;
},
[]);
handleOk
({
...
values
,
id
:
curtRowData
?.
id
||
Math
.
random
()
});
}
else
{
const
res
:
any
=
await
Promise
.
all
([
validateCustomForm
()]);
handleOk
({
...
values
,
customizeInfo
:
res
[
0
],
id
:
curtRowData
?.
id
||
Math
.
random
(),
skuId
:
curtRowData
?.
skuId
,
skuName
:
values
.
productName
,
delProductSpecId
:
selfIds
,
});
}
}
// onCancel();
values
.
specIds
=
values
.
specIds
.
reduce
((
pre
:
any
,
cur
:
number
|
string
)
=>
{
})
const
sourceObj
=
productSpecList
.
find
((
i
)
=>
i
.
id
===
cur
);
.
catch
(()
=>
{});
const
specObj
:
any
=
curtRowData
?.
specIds
&&
curtRowData
?.
specIds
.
find
((
i
:
any
)
=>
i
.
mallSpecId
===
cur
);
pre
.
push
({
mallSpecId
:
cur
,
specName
:
sourceObj
?.
specName
,
partNo
:
sourceObj
?.
partNo
,
id
:
specObj
?
specObj
.
id
:
undefined
,
});
return
pre
;
},
[]);
handleOk
({
...
values
,
id
:
curtRowData
?.
id
||
Math
.
random
()
});
}
else
{
const
res
:
any
=
await
Promise
.
all
([
validateCustomForm
()]);
handleOk
({
...
values
,
customizeInfo
:
res
[
0
],
id
:
curtRowData
?.
id
||
Math
.
random
(),
skuId
:
curtRowData
?.
skuId
,
skuName
:
values
.
productName
,
delProductSpecId
:
selfIds
,
});
}
// onCancel();
});
// 验证自定义表单
// 验证自定义表单
const
validateCustomForm
:
any
=
()
=>
{
const
validateCustomForm
:
any
=
()
=>
{
...
...
src/pages/mallManage/mallGoods/goodsAddOrEditOrDetail/index.tsx
浏览文件 @
ae793c0d
...
@@ -205,9 +205,7 @@ const GoodsAddOrEditOrDetail = () => {
...
@@ -205,9 +205,7 @@ const GoodsAddOrEditOrDetail = () => {
});
});
cusPre
=
[
cusPre
=
[
...
cusPre
,
...
cusPre
,
bol
bol
?
filterObjAttr
(
cusCur
,
[
'fileList'
])
:
filterObjAttr
(
cusCur
,
[
'id'
,
'fileList'
]),
?
filterObjAttr
({
...
cusCur
,
id
:
cusCur
.
productSpec
},
[
'fileList'
])
:
filterObjAttr
(
cusCur
,
[
'id'
,
'fileList'
]),
];
];
return
cusPre
;
return
cusPre
;
},
[]);
},
[]);
...
...
src/pages/mallManage/produceManage/produceDetail/index.tsx
浏览文件 @
ae793c0d
...
@@ -193,8 +193,9 @@ function ProduceDetail() {
...
@@ -193,8 +193,9 @@ function ProduceDetail() {
}
}
>
>
<
Descriptions
.
Item
label=
'产品名称'
>
{
detailData
?.
productName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'产品名称'
>
{
detailData
?.
productName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'产品目录'
>
{
detailData
?.
directoryName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'归属商品'
>
<
Descriptions
.
Item
label=
'产品类型'
>
{
detailData
?.
categoryName
}
</
Descriptions
.
Item
>
{
detailData
?.
type
===
1
?
'租赁商品'
:
detailData
?.
type
===
0
?
'商城商品'
:
''
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'型号'
>
{
detailData
?.
model
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'型号'
>
{
detailData
?.
model
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'产品品牌'
>
{
detailData
?.
productBrand
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'产品品牌'
>
{
detailData
?.
productBrand
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
...
...
src/pages/mallManage/produceManage/produceList/components/addOrEditProduceModal/index.tsx
浏览文件 @
ae793c0d
...
@@ -13,7 +13,7 @@ type addMakeParameterType = InterReqType<addProductType>;
...
@@ -13,7 +13,7 @@ type addMakeParameterType = InterReqType<addProductType>;
interface
PropsType
{
interface
PropsType
{
closed
:
()
=>
void
;
closed
:
()
=>
void
;
data
:
(
addMakeParameterType
&
{
id
:
number
;
categoriesId
:
number
})
|
undefined
;
data
:
(
addMakeParameterType
&
{
id
:
number
})
|
undefined
;
makeList
:
makeListType
;
makeList
:
makeListType
;
onOk
:
()
=>
void
;
onOk
:
()
=>
void
;
}
}
...
@@ -25,8 +25,6 @@ const AddOrEditProduceModal: FC<ModalProps & PropsType> = ({
...
@@ -25,8 +25,6 @@ const AddOrEditProduceModal: FC<ModalProps & PropsType> = ({
makeList
,
makeList
,
onOk
,
onOk
,
})
=>
{
})
=>
{
// 产品类型下拉列表
// const [productTypeSelectList, setProductTypeSelectList] = useState<categoryType>([]);
// 表格事件
// 表格事件
const
[
form
]
=
Form
.
useForm
<
addMakeParameterType
>
();
const
[
form
]
=
Form
.
useForm
<
addMakeParameterType
>
();
// 关闭弹窗
// 关闭弹窗
...
@@ -54,14 +52,6 @@ const AddOrEditProduceModal: FC<ModalProps & PropsType> = ({
...
@@ -54,14 +52,6 @@ const AddOrEditProduceModal: FC<ModalProps & PropsType> = ({
message
.
warning
(
err
.
errorFields
[
0
].
errors
[
0
]).
then
();
message
.
warning
(
err
.
errorFields
[
0
].
errors
[
0
]).
then
();
});
});
};
};
//根据目录获取分类
// const getCategoryListByDirectory = (directoryId: number) => {
// CategoryManageAPI.getCategoryList({ pageNo: 1, pageSize: 99999, directoryId, type: 4 }).then(
// ({ result }) => {
// setProductTypeSelectList(result.list || []);
// },
// );
// };
// componentsDidMounted
// componentsDidMounted
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
data
)
{
if
(
data
)
{
...
@@ -94,43 +84,16 @@ const AddOrEditProduceModal: FC<ModalProps & PropsType> = ({
...
@@ -94,43 +84,16 @@ const AddOrEditProduceModal: FC<ModalProps & PropsType> = ({
>
>
<
Input
placeholder=
'请输入产品名称'
allowClear
maxLength=
{
30
}
/>
<
Input
placeholder=
'请输入产品名称'
allowClear
maxLength=
{
30
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
'归属商品'
>
<
Form
.
Item
<
Select
.
Option
value=
{
1
}
>
商城商品
</
Select
.
Option
>
label=
'归属商品'
<
Select
.
Option
value=
{
2
}
>
租赁商品
</
Select
.
Option
>
name=
'type'
rules=
{
[{
required
:
true
,
message
:
'请选择归属商品'
}]
}
>
<
Select
placeholder=
'请选择归属商品'
>
<
Select
.
Option
value=
{
0
}
>
商城商品
</
Select
.
Option
>
<
Select
.
Option
value=
{
1
}
>
租赁商品
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
{
/*<Form.Item*/
}
{
/* label='产品目录'*/
}
{
/* name='directoryId'*/
}
{
/* rules={[{ required: true, message: '请选择产品目录' }]}*/
}
{
/*>*/
}
{
/* <Select placeholder='请选择产品目录' onChange={decSelectChange}>*/
}
{
/* {decList.map((v: any, index: number) => (*/
}
{
/* <Select.Option value={v.id} key={index}>*/
}
{
/* {v.directoryName}*/
}
{
/* </Select.Option>*/
}
{
/* ))}*/
}
{
/* </Select>*/
}
{
/*</Form.Item>*/
}
{
/*<Form.Item*/
}
{
/* name='categoryId'*/
}
{
/* label='产品类型'*/
}
{
/* rules={[{ required: true, message: '请选择产品类型' }]}*/
}
{
/*>*/
}
{
/* <Select*/
}
{
/* placeholder='请选择产品类型'*/
}
{
/* allowClear*/
}
{
/* showSearch*/
}
{
/* filterOption={(input, option) =>*/
}
{
/* (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())*/
}
{
/* }*/
}
{
/* >*/
}
{
/* {productTypeSelectList.map((i, j) => (*/
}
{
/* <Option value={i.id} key={j}>*/
}
{
/* {i.classifyName}*/
}
{
/* </Option>*/
}
{
/* ))}*/
}
{
/* </Select>*/
}
{
/*</Form.Item>*/
}
<
Form
.
Item
<
Form
.
Item
name=
'model'
name=
'model'
label=
'产品型号'
label=
'产品型号'
...
...
src/pages/mallManage/produceManage/produceList/index.tsx
浏览文件 @
ae793c0d
...
@@ -37,9 +37,7 @@ function ProduceManage() {
...
@@ -37,9 +37,7 @@ function ProduceManage() {
// 新增弹窗是否显示
// 新增弹窗是否显示
const
[
visibleAddEdit
,
setVisibleAddEdit
]
=
useState
(
false
);
const
[
visibleAddEdit
,
setVisibleAddEdit
]
=
useState
(
false
);
// 新增弹窗内容
// 新增弹窗内容
const
[
addEditData
,
setAddEditData
]
=
useState
<
const
[
addEditData
,
setAddEditData
]
=
useState
<
addMakeParameterType
&
{
id
:
number
}
>
();
addMakeParameterType
&
{
id
:
number
;
categoriesId
:
number
}
>
();
// 品牌列表
// 品牌列表
const
[
makeList
,
setMakeList
]
=
useState
<
makeListType
>
([]);
const
[
makeList
,
setMakeList
]
=
useState
<
makeListType
>
([]);
// 表格结构
// 表格结构
...
@@ -52,10 +50,10 @@ function ProduceManage() {
...
@@ -52,10 +50,10 @@ function ProduceManage() {
},
},
{
{
title
:
'归属产品'
,
title
:
'归属产品'
,
dataIndex
:
'
directoryNam
e'
,
dataIndex
:
'
typ
e'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
text
:
number
)
=>
(
text
===
1
?
'租赁商品'
:
text
===
0
?
'商城商品'
:
''
),
},
},
{
title
:
'产品类型'
,
dataIndex
:
'categoryName'
,
align
:
'center'
},
{
title
:
'型号'
,
dataIndex
:
'model'
,
align
:
'center'
},
{
title
:
'型号'
,
dataIndex
:
'model'
,
align
:
'center'
},
{
title
:
'产品品牌'
,
dataIndex
:
'productBrand'
,
align
:
'center'
},
{
title
:
'产品品牌'
,
dataIndex
:
'productBrand'
,
align
:
'center'
},
{
{
...
@@ -87,7 +85,7 @@ function ProduceManage() {
...
@@ -87,7 +85,7 @@ function ProduceManage() {
totalCount
:
0
,
totalCount
:
0
,
});
});
//筛选参数
//筛选参数
const
[
searchColumnsData
,
setSearchColumnsData
]
=
useState
<
searchColumns
[]
>
([
const
[
searchColumnsData
]
=
useState
<
searchColumns
[]
>
([
{
{
label
:
'产品名称'
,
label
:
'产品名称'
,
placeholder
:
'请输入产品名称'
,
placeholder
:
'请输入产品名称'
,
...
@@ -95,11 +93,14 @@ function ProduceManage() {
...
@@ -95,11 +93,14 @@ function ProduceManage() {
name
:
'productName'
,
name
:
'productName'
,
},
},
{
{
label
:
'
产品类型
'
,
label
:
'
归属产品
'
,
placeholder
:
'请
输入产品名称
'
,
placeholder
:
'请
选择归属产品
'
,
type
:
'select'
,
type
:
'select'
,
name
:
'categoryId'
,
name
:
'type'
,
options
:
[],
options
:
[
{
name
:
'商城商品'
,
id
:
0
},
{
name
:
'租赁商品'
,
id
:
1
},
],
},
},
]);
]);
...
@@ -122,12 +123,10 @@ function ProduceManage() {
...
@@ -122,12 +123,10 @@ function ProduceManage() {
setVisibleAddEdit
(
true
);
setVisibleAddEdit
(
true
);
setAddEditData
({
setAddEditData
({
id
:
record
.
id
,
id
:
record
.
id
,
categoryId
:
record
.
categoriesId
,
directoryId
:
record
.
directoryId
,
model
:
record
.
model
,
model
:
record
.
model
,
productBrandId
:
record
.
productBrandId
,
productBrandId
:
record
.
productBrandId
,
productName
:
record
.
productName
,
productName
:
record
.
productName
,
categoriesId
:
record
.
categoriesId
,
type
:
record
.
type
,
});
});
};
};
// 关闭弹窗
// 关闭弹窗
...
...
src/pages/mallManage/serviceManage/serviceDetail/index.tsx
浏览文件 @
ae793c0d
...
@@ -41,6 +41,7 @@ const ServiceDetail = () => {
...
@@ -41,6 +41,7 @@ const ServiceDetail = () => {
<
Form
.
Item
label=
'展示状态'
>
<
Form
.
Item
label=
'展示状态'
>
{
serviceDetail
?.
displayState
===
0
?
'上架'
:
'下架'
}
{
serviceDetail
?.
displayState
===
0
?
'上架'
:
'下架'
}
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
'所属单位'
>
{
serviceDetail
?.
companyName
}
</
Form
.
Item
>
<
Form
.
Item
label=
'封面图'
>
<
Form
.
Item
label=
'封面图'
>
<
Image
src=
{
serviceDetail
?.
coverPlan
}
width=
{
100
}
height=
{
100
}
/>
<
Image
src=
{
serviceDetail
?.
coverPlan
}
width=
{
100
}
height=
{
100
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/mallManage/serviceManage/serviceList/components/addOrEditServiceModal/index.tsx
浏览文件 @
ae793c0d
...
@@ -6,12 +6,15 @@ import { Uploader } from '~/components/uploader';
...
@@ -6,12 +6,15 @@ import { Uploader } from '~/components/uploader';
import
{
InterDataType
,
InterReqType
}
from
'~/api/interface'
;
import
{
InterDataType
,
InterReqType
}
from
'~/api/interface'
;
import
{
categoryListType
}
from
'~/api/interface/categoryManage'
;
import
{
categoryListType
}
from
'~/api/interface/categoryManage'
;
import
{
addServiceType
,
serviceType
}
from
'~/api/interface/mallManageType'
;
import
{
addServiceType
,
serviceType
}
from
'~/api/interface/mallManageType'
;
import
{
MallManageAPI
}
from
'~/api'
;
import
{
MallManageAPI
,
SystemManageAPI
}
from
'~/api'
;
import
{
listCompanyPage
}
from
'~/api/interface/systemManageType'
;
//分类返回类型
//分类返回类型
type
categoryType
=
InterDataType
<
categoryListType
>
[
'list'
];
type
categoryType
=
InterDataType
<
categoryListType
>
[
'list'
];
//服务返回类型
//服务返回类型
type
serviceListType
=
InterDataType
<
serviceType
>
[
'list'
];
type
serviceListType
=
InterDataType
<
serviceType
>
[
'list'
];
//单位返回类型
type
companyType
=
InterDataType
<
listCompanyPage
>
[
'list'
];
interface
selfProps
{
interface
selfProps
{
industryCategoryList
:
categoryType
;
industryCategoryList
:
categoryType
;
...
@@ -60,6 +63,8 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
...
@@ -60,6 +63,8 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
url
:
string
;
url
:
string
;
}[]
}[]
>
([]);
>
([]);
//单位列表
const
[
companyList
,
setCompanyList
]
=
useState
<
companyType
>
([]);
//封面图上传成功
//封面图上传成功
const
coverPlanUploadSuccess
=
(
const
coverPlanUploadSuccess
=
(
...
@@ -121,6 +126,15 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
...
@@ -121,6 +126,15 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
form
.
resetFields
();
form
.
resetFields
();
handleCancel
();
handleCancel
();
};
};
//获取单位列表
const
getCompanyList
=
()
=>
{
SystemManageAPI
.
listCompanyPage
({
pageNo
:
1
,
pageSize
:
99999
}).
then
(({
result
})
=>
{
setCompanyList
(
result
.
list
);
});
};
useEffect
(()
=>
{
getCompanyList
();
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
currentServiceData
)
{
if
(
currentServiceData
)
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
...
@@ -131,6 +145,7 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
...
@@ -131,6 +145,7 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
shareCard
:
currentServiceData
.
shareCard
||
undefined
,
shareCard
:
currentServiceData
.
shareCard
||
undefined
,
video
:
currentServiceData
.
video
||
undefined
,
video
:
currentServiceData
.
video
||
undefined
,
displayState
:
currentServiceData
.
displayState
,
displayState
:
currentServiceData
.
displayState
,
companyId
:
currentServiceData
.
companyId
,
});
});
setCoverPlanFileList
([
setCoverPlanFileList
([
{
{
...
@@ -209,6 +224,25 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
...
@@ -209,6 +224,25 @@ const AddOrEditServiceModal: FC<ModalProps & selfProps> = ({
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
'所属单位'
name=
'companyId'
rules=
{
[{
required
:
true
,
message
:
'请选择所属单位'
}]
}
>
<
Select
placeholder=
'请选择所属单位'
filterOption=
{
(
input
,
option
)
=>
(
option
!
.
children
as
unknown
as
string
).
toLowerCase
().
includes
(
input
.
toLowerCase
())
}
showSearch
>
{
companyList
.
map
((
v
)
=>
(
<
Select
.
Option
value=
{
v
.
id
}
key=
{
v
.
id
}
>
{
v
.
companyName
}
</
Select
.
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
'封面图'
label=
'封面图'
name=
'coverPlan'
name=
'coverPlan'
rules=
{
[{
required
:
true
,
message
:
'请上传封面图'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请上传封面图'
}]
}
...
...
src/pages/mallManage/serviceManage/serviceList/index.tsx
浏览文件 @
ae793c0d
...
@@ -73,7 +73,7 @@ const ServiceList: FC<any> = () => {
...
@@ -73,7 +73,7 @@ const ServiceList: FC<any> = () => {
render
:
(
_text
:
any
,
_record
:
any
,
index
:
number
)
=>
render
:
(
_text
:
any
,
_record
:
any
,
index
:
number
)
=>
(
pagination
.
pageNo
-
1
)
*
pagination
.
pageSize
+
index
+
1
,
(
pagination
.
pageNo
-
1
)
*
pagination
.
pageSize
+
index
+
1
,
},
},
{
title
:
'服务名称'
,
align
:
'center'
,
dataIndex
:
'serviceName'
},
{
title
:
'服务名称'
,
align
:
'center'
,
dataIndex
:
'serviceName'
,
width
:
'20%'
},
{
title
:
'应用'
,
align
:
'center'
,
dataIndex
:
'applicationName'
},
{
title
:
'应用'
,
align
:
'center'
,
dataIndex
:
'applicationName'
},
{
title
:
'对应行业'
,
align
:
'center'
,
dataIndex
:
'industryName'
},
{
title
:
'对应行业'
,
align
:
'center'
,
dataIndex
:
'industryName'
},
{
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论