提交 d1f90f95 作者: 翁进城

Merge branch 'master' into develop

......@@ -66,3 +66,12 @@ export type directoryListType = InterFunction<
type: number;
}[]
>;
//目录列表-产品指定
export type directoryProductType = InterFunction<
any,
{
id: number;
directoryName: string;
type: number;
}[]
>;
......@@ -14,6 +14,7 @@ import {
ProductSpecListType,
productSpecPriceType,
} from '~/api/interface/produceManageType';
import { directoryProductType } from '~/api/interface/categoryManage';
export class ProduceManageAPI {
// 产品管理-分页列表
......@@ -70,4 +71,8 @@ export class ProduceManageAPI {
static getCooperationListTag: cooperationTagType = () => {
return axios.get('/userapp/cooperation/listTag');
};
// 产品-目录
static getProductDirectoryList: directoryProductType = () => {
return axios.get('/pms/product/spec/productDirectoryList');
};
}
......@@ -64,7 +64,7 @@ export const Uploader: React.FC<PropsType> = (props) => {
return isType;
}
if (!isSize) {
message.error('文件最大2M,请压缩后上传!').then();
message.error(`文件最大${props.fileSize}M,请压缩后上传!`).then();
return isSize;
}
},
......
......@@ -129,7 +129,7 @@ const Category: FC = (props: any) => {
render: (text: string, record: categoryEntity, index: number) => {
return (
<div className='table-option-wrap'>
{record.children?.length > 0 ? (
{record.level == 1 ? (
<>
{btnAddChildCgy ? (
<Button
......@@ -418,7 +418,7 @@ const Category: FC = (props: any) => {
};
// 新增子分类
const sureAddChildrenCgy = (record: categoryEntity) => {
let pid: string | number = -1;
let pid: string | number;
categoryList.map((item: categoryEntity) => {
if (item.children && item.children.length != 0) {
const bol: boolean = item.children.some(
......
import { useEffect, useState } from 'react';
import SearchBox from '~/components/search-box';
import { Button, Table } from 'antd';
import { Button, message, Modal, Table } from 'antd';
import { ColumnsType } from 'antd/es/table';
import { ChangeModal } from '~/pages/customManage/customList/comp/changeModal';
import { InterListType, InterReqType } from '~/api/interface';
import { listAppUserType } from '~/api/interface/customManageType';
import { CustomManageAPI } from '~/api';
import { CustomManageAPI, SystemManageAPI } from '~/api';
// 表格数据类型
type TableType = InterListType<listAppUserType>;
......@@ -24,6 +24,7 @@ const portTypeList = [
];
function CustomListView() {
const { confirm } = Modal;
// 等级标签列表
const [cooperationTagIdList, setCooperationTagIdList] = useState<
{ value: number; label: string }[]
......@@ -80,6 +81,23 @@ function CustomListView() {
// console.log(res.result);
}
};
// 删除用户
const handleDelete = (value: TableType[0]) => {
confirm({
title: '提示',
content: '是否删除该账号?',
onOk: async () => {
const res = await SystemManageAPI.removeBAccount({ userAccountId: value.id });
if (res && res.code === '200') {
message.success('删除成功');
paginationChange(
tableData.length === 1 ? pagination.current - 1 : pagination.current,
pagination.pageSize,
);
}
},
});
};
// componentDidMount
useEffect(() => {
query = {};
......@@ -188,7 +206,7 @@ function CustomListView() {
>
变更
</Button>
<Button type={'link'} danger>
<Button type={'link'} danger onClick={() => handleDelete(record)}>
删除
</Button>
</>
......
......@@ -155,6 +155,7 @@ const AddEditModal: React.FC<propType> = (props) => {
listType={'picture-card'}
fileUpload
fileLength={1}
fileSize={10}
onChange={(e) => form.setFieldValue('surfaceUrl', e[0].url)}
defaultFileList={data?.surfaceUrl ? [{ url: data?.surfaceUrl }] : []}
>
......@@ -169,7 +170,7 @@ const AddEditModal: React.FC<propType> = (props) => {
<Form.Item
label='课程上传'
name='videoUrl'
rules={[{ required: true, message: '请上传质检视频' }]}
rules={[{ required: false, message: '请上传质检视频' }]}
style={{ marginBottom: '-40px' }}
>
<Uploader
......@@ -177,7 +178,7 @@ const AddEditModal: React.FC<propType> = (props) => {
fileUpload
fileLength={1}
fileType={['video/mp4', 'video/avi', 'video/wmv', 'video/rmvb']}
fileSize={10}
fileSize={1024}
onChange={(e) => form.setFieldValue('videoUrl', e[0].url)}
defaultFileList={data?.videoUrl ? [{ url: data?.videoUrl }] : []}
>
......
......@@ -189,7 +189,7 @@ function ProduceManage() {
};
// 目录列表
const getDirectoryList = () => {
CategoryManageAPI.getDirectoryListClone({ type: 4 }).then(({ result }) => {
ProduceManageAPI.getProductDirectoryList().then(({ result }) => {
setDecList(result || []);
});
};
......
......@@ -89,7 +89,7 @@ const GoodsAddOrEditOrDetail = () => {
};
//根据目录获取分类列表
const getCategoryList = (directoryId: number) => {
CategoryManageAPI.getCategoryList({ directoryId, type: 4, pageSize: 9999, pageNo: 1 }).then(
CategoryManageAPI.getCategoryList({ directoryId, type: 2, pageSize: 9999, pageNo: 1 }).then(
({ result }) => {
setCategoryList(result.list || []);
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论