Commit 16e5208e authored by 陈万宝's avatar 陈万宝

feat: add 商品信息

parent 5b5381e5
...@@ -229,5 +229,23 @@ ...@@ -229,5 +229,23 @@
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
}
.deal {
:global {
.ant-form-item-control-input-content {
display: flex;
align-items: center;
}
.ant-form-item {
margin-bottom: 0;
}
}
}
.nameWidth {
width: 300px;
}
.colRow {
display: flex;
flex: none;
max-width:none;
} }
\ No newline at end of file
import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle } from 'react'; import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle } from 'react';
import { Button, Modal } from 'antd'; import { Button, Modal, Form, Switch, Input } from 'antd';
import styles from '../common.less';
import { apiCreateShop } from '../service'
const AddMenusModal = (props, ref) => { const AddMenusModal = (props, ref) => {
const [confirmLoading, setConfirmLoading] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false);
const [modalText, setModalText] = useState('Content of the modal');
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [formProject] = Form.useForm();
const [menusSwitch, setMenusSwitch] = useState(0) // 分组开启状态
// const { // const {
// open, // queryShopList,
// setOpen,
// } = props; // } = props;
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
// changeVal 就是暴露给父组件的方法 // changeVal 就是暴露给父组件的方法
setOpen: newVal => { setOpen: newVal => {
setOpen(newVal) setOpen(newVal);
}, },
})); }));
const handleOk = () => { const handleOk = () => {
setModalText('The modal will be closed after two seconds'); formProject
.validateFields()
.then(async values => {
console.log('valuse', values, menusSwitch);
const params = {
name: values?.name,
necessary: menusSwitch,
}
const data = await apiCreateShop(params);
if (data.code === '0000') {
formProject.resetFields(); // 表单清除历史
setConfirmLoading(true); setConfirmLoading(true);
setTimeout(() => { setTimeout(() => {
setOpen(false); setOpen(false);
setConfirmLoading(false); setConfirmLoading(false);
}, 2000); }, 2000);
}
})
.catch(info => {
// queryShopList()
console.log('保存异常', info);
});
}; };
const handleCancel = () => { const handleCancel = () => {
console.log('Clicked cancel button'); console.log('Clicked cancel button');
setOpen(false); setOpen(false);
}; };
useEffect(() => { const onChange = () => {
if (menusSwitch === 0) {
setMenusSwitch(1)
return false
}
setMenusSwitch(0)
return false
}
useEffect(() => {
console.log('open', open); console.log('open', open);
}, [open]) }, [open]);
return ( return (
<> <>
{open && <Modal {open && (
title="Title" <Modal
title="添加分组"
visible={open} visible={open}
onOk={handleOk} onOk={handleOk}
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
initialValues={{
menusSwitch: 0,
}}
onCancel={handleCancel} onCancel={handleCancel}
> >
<p>{modalText}</p> <Form form={formProject}>
</Modal>} <Form.Item label="分组名称" name="name" rules={[{ required: true }]}>
<Input />
</Form.Item>
<Form.Item label="下单必选分组" name="necessary" valuePropName={menusSwitch}>
<Switch defaultChecked={menusSwitch} checkedChildren="开启" unCheckedChildren="关闭" onChange={onChange} />
<div className={styles.textStyle}>选中后,顾客下单需至少选择1个 “下单必须分组” 商品</div>
<div className={styles.textStyle}>每店仅可设置1个必点分组</div>
</Form.Item>
</Form>
</Modal>
)}
</> </>
); );
}; };
export default forwardRef(AddMenusModal); export default forwardRef(AddMenusModal);
import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle } from 'react'; import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle } from 'react';
import { Button, Modal } from 'antd'; import { Button, Modal, Form, Checkbox, Row, Col, time, DatePicker } from 'antd';
import { map } from 'lodash';
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
import { ENUM_WEEK } from '../config';
import styles from '../common.less';
const { RangePicker } = DatePicker;
const AddSellTimeModal = (props, ref) => { const AddSellTimeModal = (props, ref) => {
const [confirmLoading, setConfirmLoading] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false);
const [modalText, setModalText] = useState('Content of the modal'); const [modalText, setModalText] = useState('Content of the modal');
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
// const { // const {
// open, // open,
// setOpen, // setOpen,
...@@ -15,9 +18,9 @@ const AddSellTimeModal = (props, ref) => { ...@@ -15,9 +18,9 @@ const AddSellTimeModal = (props, ref) => {
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
// changeVal 就是暴露给父组件的方法 // changeVal 就是暴露给父组件的方法
setOpen: newVal => { setOpen: newVal => {
setOpen(newVal) setOpen(newVal);
}, },
})); }));
const handleOk = () => { const handleOk = () => {
setModalText('The modal will be closed after two seconds'); setModalText('The modal will be closed after two seconds');
setConfirmLoading(true); setConfirmLoading(true);
...@@ -31,23 +34,107 @@ const AddSellTimeModal = (props, ref) => { ...@@ -31,23 +34,107 @@ const AddSellTimeModal = (props, ref) => {
console.log('Clicked cancel button'); console.log('Clicked cancel button');
setOpen(false); setOpen(false);
}; };
useEffect(() => { useEffect(() => {
console.log('open', open); console.log('open', open);
}, [open]) }, [open]);
const onChange = () => {};
return ( return (
<> <>
{open && <Modal {open && (
title="Title" <Modal
title="售卖时段"
visible={open} visible={open}
onOk={handleOk} onOk={handleOk}
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
onCancel={handleCancel} onCancel={handleCancel}
width={1050}
>
<Form
name="validate_other"
// {...formItemLayout}
// onFinish={onFinish}
initialValues={{
'input-number': 3,
'checkbox-group': ['A', 'B'],
rate: 3.5,
}}
>
<Form.Item name="chec" label="售卖时期(可多选)">
<Checkbox.Group>
<Row>
<Col className={styles.colRow} span={8}>
{ENUM_WEEK.map((item, index) => (
<Checkbox value={item.value}>{item.label}</Checkbox>
))}
</Col>
</Row>
</Checkbox.Group>
</Form.Item>
<Form.Item name="rate" label="售卖时段">
<Form.List
name="names"
rules={[
{
validator: async (_, names) => {
if (!names || names.length < 2) {
return Promise.reject(new Error('At least 2 passengers'));
}
},
},
]}
> >
<p>{modalText}</p> {(fields, { add, remove }, { errors }) => (
</Modal>} <>
{fields.map((field, index) => (
<Form.Item
// {...(index === 0 ? formItemLayout : formItemLayoutWithOutLabel)}
required={false}
key={field.key}
className={styles.deal}
>
<Form.Item
className={styles.deal}
{...field}
validateTrigger={['onChange', 'onBlur']}
rules={[
{
required: true,
whitespace: true,
message: "Please input passenger's name or delete this field.",
},
]}
>
<RangePicker picker="time" onChange={onChange} />
</Form.Item>
{fields.length > 1 ? (
<MinusCircleOutlined
className="dynamic-delete-button"
onClick={() => remove(field.name)}
/>
) : null}
</Form.Item>
))}
<Form.Item>
<Button
type="dashed"
onClick={() => add()}
style={{ width: '60%' }}
icon={<PlusOutlined />}
>
新增时段
</Button>
</Form.Item>
</>
)}
</Form.List>
</Form.Item>
</Form>
</Modal>
)}
</> </>
); );
}; };
export default forwardRef(AddSellTimeModal); export default forwardRef(AddSellTimeModal);
...@@ -35,12 +35,14 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -35,12 +35,14 @@ const FormInformationBasic = forwardRef((props, ref) => {
shopList, shopList,
afterAddressList, afterAddressList,
specListData, specListData,
queryShopList,
} = props; } = props;
const [form] = Form.useForm(); const [form] = Form.useForm();
const [noreBrandList, setNoreBrandList] = useState([]); const [noreBrandList, setNoreBrandList] = useState([]);
const customer = useContext(ServiceContext); const customer = useContext(ServiceContext);
const childAddMenusModalRef = useRef(null); const childAddMenusModalRef = useRef(null);
const [cardImageList, setCardImageList] = useState([]); const [takeawayImageList, setTakeawayImageList] = useState([]);
const onCheck = async () => { const onCheck = async () => {
try { try {
...@@ -90,10 +92,10 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -90,10 +92,10 @@ const FormInformationBasic = forwardRef((props, ref) => {
</div> </div>
</div> </div>
); );
const onCardSuccessImageList = imgList => { const onTakeawayImageList = imgList => {
setCardImageList(imgList); setTakeawayImageList(imgList);
form.setFieldsValue({ form.setFieldsValue({
cardImageList: imgList, commonImageList: imgList,
}); });
}; };
const getFormValues = debounce(() => { const getFormValues = debounce(() => {
...@@ -118,6 +120,8 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -118,6 +120,8 @@ const FormInformationBasic = forwardRef((props, ref) => {
useEffect(() => { useEffect(() => {
console.log('!customer.isTakeawayService', customer); console.log('!customer.isTakeawayService', customer);
console.log('newCategoryList[customer.productType]', newCategoryList[customer.productType]);
console.log('newCategoryList[customer.productType]', shopList);
}, [customer.productType]); }, [customer.productType]);
return ( return (
<Form <Form
...@@ -159,16 +163,15 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -159,16 +163,15 @@ const FormInformationBasic = forwardRef((props, ref) => {
showSearch={{ filter: filterCategoryOptions }} showSearch={{ filter: filterCategoryOptions }}
fieldNames={{ label: 'name', value: 'id', children: 'children' }} fieldNames={{ label: 'name', value: 'id', children: 'children' }}
onChange={props.onCategoryChange} onChange={props.onCategoryChange}
options={newCategoryList[customer.productType]} options={shopList}
dropdownRender={dropdownRender} // dropdownRender={dropdownRender}
/> />
</Form.Item> </Form.Item>
)} )}
{/* 新增菜单分组弹框 */} {/* 新增菜单分组弹框 */}
<AddMenusModal ref={childAddMenusModalRef} /> {/* <AddMenusModal ref={childAddMenusModalRef} queryShopList={queryShopList} /> */}
<Form.Item <Form.Item
name="categoryId" name="storageRackIds"
label="商品类目" label="商品类目"
rules={[{ type: 'array', required: true, message: '请输入商品类目!' }]} rules={[{ type: 'array', required: true, message: '请输入商品类目!' }]}
> >
...@@ -184,7 +187,7 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -184,7 +187,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
{/* 外卖-商品图片 */} {/* 外卖-商品图片 */}
{customer.isTakeawayService && ( {customer.isTakeawayService && (
<Form.Item <Form.Item
name="cardImageList" name="commonImageList"
label="商品图片" label="商品图片"
extra="支持.jpg/png格式图片,建议单张比例1:1,大小200kb左右,最多可以上传5张" extra="支持.jpg/png格式图片,建议单张比例1:1,大小200kb左右,最多可以上传5张"
rules={[ rules={[
...@@ -196,11 +199,11 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -196,11 +199,11 @@ const FormInformationBasic = forwardRef((props, ref) => {
]} ]}
> >
<UploadImage <UploadImage
name="cardImageList" name="takeawayImageList"
limit={5} limit={5}
disabled={customer.isDisabled} disabled={customer.isDisabled}
pictures={cardImageList} pictures={takeawayImageList}
setPictureList={list => onCardSuccessImageList(list)} setPictureList={list => onTakeawayImageList(list)}
/> />
</Form.Item> </Form.Item>
)} )}
......
...@@ -20,7 +20,6 @@ import { ...@@ -20,7 +20,6 @@ import {
Cascader, Cascader,
Divider, Divider,
} from 'antd'; } from 'antd';
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
import { Title } from './CommonTemplate'; import { Title } from './CommonTemplate';
import { formItemLayout, ENUM_REPERTORY, ENUM_SET_REPERTORY } from '../config'; import { formItemLayout, ENUM_REPERTORY, ENUM_SET_REPERTORY } from '../config';
import { ServiceContext } from '../context'; import { ServiceContext } from '../context';
...@@ -48,7 +47,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -48,7 +47,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [initValue, setInitValue] = useState(createInitValues()); const [initValue, setInitValue] = useState(createInitValues());
const customer = useContext(ServiceContext); const customer = useContext(ServiceContext);
const [cardImageList, setCardImageList] = useState([]); const [detailImageList, setDetailImageList] = useState([]);
const [newCategoryList, setNewCategoryList] = useState({}); const [newCategoryList, setNewCategoryList] = useState({});
const addSellTimeRef = useRef(null); const addSellTimeRef = useRef(null);
const AddRepertoryRef = useRef(null); const AddRepertoryRef = useRef(null);
...@@ -74,6 +73,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -74,6 +73,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
const getFormValues = debounce(() => { const getFormValues = debounce(() => {
const values = form.getFieldsValue(); const values = form.getFieldsValue();
console.log('values========', values);
props.onValuesChange({ settlementItem: values }); props.onValuesChange({ settlementItem: values });
}, 400); }, 400);
...@@ -100,9 +101,9 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -100,9 +101,9 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
// 上传图片 // 上传图片
const onCardSuccessImageList = imgList => { const onCardSuccessImageList = imgList => {
setCardImageList(imgList); setDetailImageList(imgList);
form.setFieldsValue({ form.setFieldsValue({
cardImageList: imgList, detailImageList: imgList,
}); });
}; };
const radioChangeEvent = key => { const radioChangeEvent = key => {
...@@ -139,6 +140,10 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -139,6 +140,10 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
const showAddRepertoryModal = () => { const showAddRepertoryModal = () => {
AddRepertoryRef.current.setOpenRepertory(true); AddRepertoryRef.current.setOpenRepertory(true);
}; };
// 显示加入库存弹框
const showMultiRepertoryModal = () => {
AddMultiSpecRef.current.setMultiRepertory(true);
};
const onFinish = values => { const onFinish = values => {
console.log('Received values of form:', values); console.log('Received values of form:', values);
}; };
...@@ -147,7 +152,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -147,7 +152,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
<Form <Form
{...formItemLayout} {...formItemLayout}
form={form} form={form}
name="register" name="takeaway"
initialValues={initValue} initialValues={initValue}
scrollToFirstError scrollToFirstError
onValuesChange={getFormValues} onValuesChange={getFormValues}
...@@ -162,22 +167,15 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -162,22 +167,15 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
/> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="cardImageList" name="detailImageList"
label="商品图片" label="商品图片"
extra="支持.jpg/png格式图片,建议单张切片宽750像素,大小200kb左右,您可以拖拽图片调整顺序,最多上传5张。" extra="支持.jpg/png格式图片,建议单张切片宽750像素,大小200kb左右,您可以拖拽图片调整顺序,最多上传5张。"
// rules={[
// {
// required: true,
// type: 'array',
// message: '请上传商品图片!',
// },
// ]}
> >
<UploadImage <UploadImage
name="cardImageList" name="detailImageList"
limit={5} limit={5}
disabled={customer.isDisabled} disabled={customer.isDisabled}
pictures={cardImageList} pictures={detailImageList}
setPictureList={list => onCardSuccessImageList(list)} setPictureList={list => onCardSuccessImageList(list)}
/> />
</Form.Item> </Form.Item>
...@@ -323,11 +321,11 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -323,11 +321,11 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
type="primary" type="primary"
size="small" size="small"
onClick={() => { onClick={() => {
showAddRepertoryModal(true); showMultiRepertoryModal(true);
}} }}
shape="round" shape="round"
> >
添加规格 添加规格
</Button> </Button>
<Form.Item <Form.Item
name="receptionVolume" name="receptionVolume"
...@@ -335,108 +333,24 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -335,108 +333,24 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
className={styles.multiSpecification} className={styles.multiSpecification}
> >
<Button size="small" style={{ marginBottom: '10px' }} shape="round"> <Button size="small" style={{ marginBottom: '10px' }} shape="round">
一键设置库存 统一设置置库存
</Button> </Button>
<Form.Item label="多规格1"> <Form.Item label="多规格1">
<div <div
className={styles.specRepertory} className={styles.specRepertory}
onClick={() => { onClick={() => {
showAddRepertoryModal(true); showAddRepertoryModal(true);
}} }}
> >
1/3 去设置
</div> </div>
</Form.Item> </Form.Item>
</Form.Item> </Form.Item>
</Form.Item> </Form.Item>
{/* 33333 */} {/* 33333 */}
<Form.Item>
<div>份量(如大小/小份、微辣/特辣)</div>
<Form.List name="users">
{(fields, { add, remove }) => (
<>
{fields.map(({ key, name, ...restField }) => (
<Space
key={key}
style={{
display: 'flex',
marginBottom: 8,
}}
align="baseline"
>
<Form.Item
{...restField}
name={[name, 'first']}
rules={[
{
required: true,
message: 'Missing first name',
},
]}
>
<Input placeholder="名称" />
</Form.Item>
<Form.Item
{...restField}
name={[name, 'last']}
rules={[
{
required: true,
message: 'Missing last name',
},
]}
>
<Input placeholder="约 份量(数字)" />
</Form.Item>
<Form.Item
{...restField}
name={[name, 'last']}
rules={[
{
required: true,
message: 'Missing last name',
},
]}
>
<Input placeholder="约 份量(数字)" />
</Form.Item>
<Form.Item
{...restField}
name={[name, 'last']}
rules={[
{
required: true,
message: 'Missing last name',
},
]}
>
<Input placeholder="销售价(元)" />
</Form.Item>
<Form.Item
{...restField}
name={[name, 'last']}
rules={[
{
required: true,
message: 'Missing last name',
},
]}
>
<Input placeholder="活动价(元)" />
</Form.Item>
<MinusCircleOutlined onClick={() => remove(name)} />
</Space>
))}
<Form.Item>
<Button type="dashed" onClick={() => add()} block icon={<PlusOutlined />}>
Add field
</Button>
</Form.Item>
</>
)}
</Form.List>
</Form.Item>
</Form> </Form>
{/* 加入库存 */} {/* 加入库存 */}
<AddRepertoryModal ref={AddRepertoryRef} /> <AddRepertoryModal ref={AddRepertoryRef} />
......
...@@ -331,3 +331,12 @@ export const ENUM_SET_REPERTORY = [ ...@@ -331,3 +331,12 @@ export const ENUM_SET_REPERTORY = [
{ label: '清零', value: '清零' }, { label: '清零', value: '清零' },
{ label: '最大', value: '最大' }, { label: '最大', value: '最大' },
] ]
export const ENUM_WEEK = [
{ value: 1, label: '周一' },
{ value: 2, label: '周二' },
{ value: 3, label: '周三' },
{ value: 1, label: '周四' },
{ value: 1, label: '周五' },
{ value: 1, label: '周六' },
{ value: 1, label: '周日' },
]
...@@ -22,6 +22,7 @@ import { ...@@ -22,6 +22,7 @@ import {
getByProductType, getByProductType,
apiCreateDraft, apiCreateDraft,
apiEditDraft, apiEditDraft,
apiQueryShopList,
} from './service'; } from './service';
import { isUrl, filterSendData, clearCurrent, onAutoSaveValue, localAutoSaveKey } from './utils'; import { isUrl, filterSendData, clearCurrent, onAutoSaveValue, localAutoSaveKey } from './utils';
import { ServiceContext } from './context'; import { ServiceContext } from './context';
...@@ -61,6 +62,11 @@ const ServiceGoods = options => { ...@@ -61,6 +62,11 @@ const ServiceGoods = options => {
const [specList, setSpecList] = useState([]); // 规格列表 const [specList, setSpecList] = useState([]); // 规格列表
const [editData, setEditData] = useState({}); // 编辑保存数据 const [editData, setEditData] = useState({}); // 编辑保存数据
const [newCategoryList, setNewCategoryList] = useState({}); const [newCategoryList, setNewCategoryList] = useState({});
const [shopList, setShopList] = useState([
{ id: 1, name: '分组1' },
{ id: 2, name: '分组2' },
]);
const [visibleCacheEdit, setVisibleCacheEdit] = useState(false); // 显示有缓存未保存提示 const [visibleCacheEdit, setVisibleCacheEdit] = useState(false); // 显示有缓存未保存提示
const [checkFormList] = useState([ const [checkFormList] = useState([
basicRef, basicRef,
...@@ -150,7 +156,13 @@ const ServiceGoods = options => { ...@@ -150,7 +156,13 @@ const ServiceGoods = options => {
setSpecList(result.data || []); setSpecList(result.data || []);
} }
}; };
// 查询分组列表
const queryShopList = async () => {
if (!shopList.length) {
const result = await apiQueryShopList()
setShopList(result.data || []);
}
}
const getAfterSalesAddrsPage = async () => { const getAfterSalesAddrsPage = async () => {
if (!afterAddressList.length) { if (!afterAddressList.length) {
const result = await afterSalesAddrsPage(); const result = await afterSalesAddrsPage();
...@@ -212,7 +224,7 @@ const ServiceGoods = options => { ...@@ -212,7 +224,7 @@ const ServiceGoods = options => {
sendData.productDraftId = SourceData.id; sendData.productDraftId = SourceData.id;
} }
console.log('sendData :>> ', sendData); console.log('sendData :>> ', sendData);
sendMerchantProductHttpRequest(sendData); // sendMerchantProductHttpRequest(sendData);
} }
}; };
...@@ -459,6 +471,7 @@ const ServiceGoods = options => { ...@@ -459,6 +471,7 @@ const ServiceGoods = options => {
ref={basicRef} ref={basicRef}
editData={editData.infoMation} editData={editData.infoMation}
newCategoryList={newCategoryList} newCategoryList={newCategoryList}
shopList={shopList}
categoryList={categoryList} categoryList={categoryList}
virtualCategoryList={virtualCategoryList} virtualCategoryList={virtualCategoryList}
brandList={brandList} brandList={brandList}
...@@ -466,6 +479,7 @@ const ServiceGoods = options => { ...@@ -466,6 +479,7 @@ const ServiceGoods = options => {
specListData={specListData} specListData={specListData}
onCategoryChange={onCategoryChange} onCategoryChange={onCategoryChange}
onValuesChange={onValuesChange} onValuesChange={onValuesChange}
// queryShopList={queryShopList}
/> />
{[1, 2].includes(productType) && [ {[1, 2].includes(productType) && [
......
...@@ -117,3 +117,16 @@ export const apiEditDraft = data => ...@@ -117,3 +117,16 @@ export const apiEditDraft = data =>
prefix: goodsApi, prefix: goodsApi,
data, data,
}); });
// 查询分组列表
export const apiQueryShopList = data =>
request.post('/api/merchants/products/storageRack/listByShopIdAndStorageRackIds', {
prefix: goodsApi,
data,
});
// 新建分组
export const apiCreateShop = data =>
request.post('/api/merchants/products/storageRack/create', {
prefix: goodsApi,
data,
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment