Commit 6db69753 authored by 陈万宝's avatar 陈万宝

feat: 更新多规格

parent ae61a64f
......@@ -62,7 +62,7 @@ class goodsManage extends Component {
auditRow: {}, // 查看审核信息使用
isVisibleDraft: false, // 显示隐藏草稿箱
isEditDraft: false, // 是否编辑草稿
productType: 1, // 商品类型
productType: 5, // 商品类型
takeAway: {}, // 弹窗外卖商品参数
searchValue: {}, // 搜索条件
refresh: '', // 外卖刷新
......@@ -78,7 +78,7 @@ class goodsManage extends Component {
componentDidMount() {
this.props.goodsManage.tableData = {};
this.categoryList();
this.categoryList(this.state.productType);
this.categoryListByType(this.state.productType);
this.getVirtualCategory();
this.specList();
......
......@@ -12,7 +12,7 @@ import { ServiceContext } from '../context';
import { debounce } from '@/utils/utils';
import AddMenusModal from './AddMenusModal';
import UploadImage from './UploadImage';
import { apiShopIds, apiQueryShopList } from '../service';
import { apiShopIds, apiQueryShopList, getByProductType } from '../service';
const CreateSelectOption = optionList =>
optionList.map(brandItem => (
......@@ -34,6 +34,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
brandList,
afterAddressList,
specListData,
shopGetByProductType,
} = props;
const [form] = Form.useForm();
const [noreBrandList, setNoreBrandList] = useState([]);
......@@ -66,6 +67,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
return null;
}
};
// 自定义加入菜单
const showModal = () => {
childAddMenusModalRef.current.setOpen(true);
......@@ -136,9 +138,9 @@ const FormInformationBasic = forwardRef((props, ref) => {
}, [brandList]);
useEffect(() => {
console.log('商品类目', newCategoryList[customer.productType]);
if (!editData) return;
if (editData.productType === 5 && editData.name) {
shopGetByProductType(5);
queryShopList({ shopId: editData.productRefShopId });
setIsEditTakeaway(true);
}
......@@ -156,7 +158,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
name: '',
categoryId: [],
description: '',
productRefShopId: [15],
productRefShopId: [],
storageRackIds: [],
}}
scrollToFirstError
......
......@@ -86,7 +86,7 @@ const ServiceGoods = options => {
const resetForm = () => clearCurrent(checkFormList).forEach(({ current }) => current.reset());
const onValuesChange = e => {
console.log('e======', e, !isEdit, visibleCacheEdit);
// console.log('e======', e, !isEdit, visibleCacheEdit);
if (!isEdit) {
if (visibleCacheEdit) {
setVisibleCacheEdit(false);
......@@ -513,6 +513,7 @@ const ServiceGoods = options => {
ref={basicRef}
editData={editData.infoMation}
newCategoryList={newCategoryList}
shopGetByProductType={shopGetByProductType}
categoryList={categoryList}
virtualCategoryList={virtualCategoryList}
brandList={brandList}
......
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