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

feat: 更新多规格

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