提交 00594b92 作者: 龚洪江

修复:飞手培训问题

上级 843987a0
...@@ -88,12 +88,14 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({ ...@@ -88,12 +88,14 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
align: 'center', align: 'center',
dataIndex: 'specName', dataIndex: 'specName',
editable: true, editable: true,
rules: [{ required: true, message: '请输入选项名称' }],
}, },
{ {
title: '料号', title: '料号',
align: 'center', align: 'center',
dataIndex: 'partNo', dataIndex: 'partNo',
editable: true, editable: true,
rules: [{ required: true, message: '请输入料号' }],
}, },
{ {
title: '操作', title: '操作',
...@@ -143,6 +145,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({ ...@@ -143,6 +145,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
dataIndex: col.dataIndex, dataIndex: col.dataIndex,
title: col.title, title: col.title,
editing: true, editing: true,
rules: col.rules,
}), }),
}; };
}); });
......
...@@ -17,7 +17,7 @@ interface selfProps { ...@@ -17,7 +17,7 @@ interface selfProps {
//上传机构请求类型 //上传机构请求类型
type insertOrgParametersType = Omit<InterReqType<insertOrgType>, 'trainingProgramsVOS'>; type insertOrgParametersType = Omit<InterReqType<insertOrgType>, 'trainingProgramsVOS'>;
const BaseInfo: FC<selfProps> = forwardRef((props, ref) => { const BaseInfo: FC<selfProps> = forwardRef((_props, ref) => {
const [baseInfoForm] = Form.useForm<insertOrgParametersType>(); const [baseInfoForm] = Form.useForm<insertOrgParametersType>();
//地图地点选择 //地图地点选择
const [selectMapShow, setSelectMapShow] = useState<boolean>(false); const [selectMapShow, setSelectMapShow] = useState<boolean>(false);
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 20px; line-height: 20px;
&:before{
content: '*';
color: red;
}
} }
&-rich{ &-rich{
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 20px; line-height: 20px;
&:before{
content: '*';
color: red;
}
} }
&-table{ &-table{
......
...@@ -32,7 +32,7 @@ interface selfProps { ...@@ -32,7 +32,7 @@ interface selfProps {
ref: any; ref: any;
} }
const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
const [skuForm] = Form.useForm<any>(); const [skuForm] = Form.useForm<any>();
//机型下拉列表 //机型下拉列表
const [modelsList, setModelsList] = useState<modelsListType>([]); const [modelsList, setModelsList] = useState<modelsListType>([]);
...@@ -74,7 +74,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -74,7 +74,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
width: '10%', width: '10%',
inputType: 'uploader', inputType: 'uploader',
editable: true, editable: true,
rules: [{ required: 'true', message: '请上传培训主图' }], rules: [{ required: true, message: '请上传培训主图' }],
}, },
{ {
title: '培训机型', title: '培训机型',
...@@ -84,7 +84,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -84,7 +84,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
inputType: 'select', inputType: 'select',
width: '15%', width: '15%',
selectOption: modelsList, selectOption: modelsList,
rules: [{ required: 'true', message: '请选择培训机型' }], rules: [{ required: true, message: '请选择培训机型' }],
}, },
{ {
title: '培训等级', title: '培训等级',
...@@ -94,7 +94,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -94,7 +94,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
inputType: 'select', inputType: 'select',
width: '15%', width: '15%',
selectOption: gradeList, selectOption: gradeList,
rules: [{ required: 'true', message: '请选择培训等级' }], rules: [{ required: true, message: '请选择培训等级' }],
}, },
{ {
title: '培训类型', title: '培训类型',
...@@ -104,7 +104,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -104,7 +104,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
inputType: 'select', inputType: 'select',
width: '15%', width: '15%',
selectOption: typeList, selectOption: typeList,
rules: [{ required: 'true', message: '请选择培训类型' }], rules: [{ required: true, message: '请选择培训类型' }],
}, },
{ {
title: '培训价格', title: '培训价格',
...@@ -112,7 +112,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -112,7 +112,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
editable: true, editable: true,
dataIndex: 'price', dataIndex: 'price',
width: '12%', width: '12%',
rules: [{ required: 'true', validator: priceValidator }], rules: [{ required: true, validator: priceValidator }],
}, },
{ {
title: '操作', title: '操作',
......
...@@ -22,7 +22,7 @@ export const authRouterList = async () => { ...@@ -22,7 +22,7 @@ export const authRouterList = async () => {
const getRouteList = (data: RouteObjectType[]) => { const getRouteList = (data: RouteObjectType[]) => {
return data.reduce((pre: RouteObjectType[], cur) => { return data.reduce((pre: RouteObjectType[], cur) => {
const Obj: RouteObjectType = { ...cur }; const Obj: RouteObjectType = { ...cur };
if (ids.includes(Obj.meta.id) || Obj.meta.hidden || Obj.path?.includes('pilotTraining')) { if (ids.includes(Obj.meta.id) || Obj.meta.hidden) {
if (Obj.children) { if (Obj.children) {
Obj.children = [...getRouteList(Obj.children)]; Obj.children = [...getRouteList(Obj.children)];
} }
......
...@@ -901,7 +901,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -901,7 +901,7 @@ export const routerList: Array<RouteObjectType> = [
element: <LayoutView />, element: <LayoutView />,
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 1500, id: 1600,
icon: <BankOutlined />, icon: <BankOutlined />,
title: '飞手培训', title: '飞手培训',
}, },
...@@ -911,7 +911,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -911,7 +911,7 @@ export const routerList: Array<RouteObjectType> = [
element: withLoadingComponent(<InstitutionsListView />), element: withLoadingComponent(<InstitutionsListView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 1510, id: 1610,
title: '执照考试', title: '执照考试',
icon: <VerifiedOutlined />, icon: <VerifiedOutlined />,
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论