提交 a8b6164f 作者: 龚洪江

功能:推荐商品字段添加

上级 99d66a80
......@@ -140,6 +140,7 @@ type goodsItemType = {
url: string;
}[];
shelfStatus: number;
recommend: number;
tradeName: string;
priceStock: {
channelPrice: number;
......
......@@ -8,6 +8,7 @@ import { categoryListRespType } from '~/api/interface/categoryManage';
import { CategoryManageAPI } from '~/api';
import deletePng from '~/assets/image/delete.png';
import './index.scss';
import { useSelector } from 'react-redux';
//分类返回类型
type categoryType = InterDataType<categoryListRespType>['list'];
......@@ -44,6 +45,7 @@ export type baseInfoType = {
};
const BaseInfo = forwardRef<any, selfProps>((_props, ref) => {
const { userInfo } = useSelector((state: any) => state.UserInfo);
const [baseInfoForm] = Form.useForm<baseInfoType>();
const [labelShow, setLabelShow] = useState<boolean>(false);
//分类列表
......@@ -139,7 +141,7 @@ const BaseInfo = forwardRef<any, selfProps>((_props, ref) => {
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
form={baseInfoForm}
initialValues={{ labelShow: 0, shelfStatus: 1, priceShow: 1 }}
initialValues={{ labelShow: 0, shelfStatus: 1, priceShow: 1, recommend: 0 }}
>
<Form.Item
label='商品名称'
......@@ -224,6 +226,16 @@ const BaseInfo = forwardRef<any, selfProps>((_props, ref) => {
<Select.Option value={0}>下架</Select.Option>
</Select>
</Form.Item>
{userInfo.roleInfo.superAdmin ? (
<Form.Item label='商品推荐' name='recommend'>
<Radio.Group>
<Radio value={1}></Radio>
<Radio value={0}></Radio>
</Radio.Group>
</Form.Item>
) : (
''
)}
<Form.Item label='显示价格' name='priceShow'>
<Radio.Group>
<Radio value={1}>显示</Radio>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论