Commit c59c2895 authored by beisir's avatar beisir

fix: 生成商品信息

parent 63a12f9b
...@@ -44,18 +44,6 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -44,18 +44,6 @@ const FormInformationBasic = forwardRef((props, ref) => {
useEffect(() => { useEffect(() => {
if (customer.isEdit) { if (customer.isEdit) {
if (!editData) return; if (!editData) return;
// const initValues = {
// brandId: editData.brandId,
// supplierId: editData.supplierId,
// character: editData.character,
// name: editData.name,
// categoryId: [editData.firstCategoryId, editData.secondCategoryId, editData.thirdCategoryId],
// description: null,
// };
// if (customer.isCard) {
// const { serviceItem } = editData.skuList[0];
// initValues.description = (serviceItem || {}).description || null;
// }
form.setFieldsValue(editData); form.setFieldsValue(editData);
} }
}, [customer.isEdit, editData]); }, [customer.isEdit, editData]);
...@@ -79,7 +67,7 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -79,7 +67,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
}} }}
scrollToFirstError scrollToFirstError
> >
<Form.Item {/* <Form.Item
label="供应商名称" label="供应商名称"
name="supplierId" name="supplierId"
rules={[{ required: true, message: '请选择供应商名称' }]} rules={[{ required: true, message: '请选择供应商名称' }]}
...@@ -87,7 +75,7 @@ const FormInformationBasic = forwardRef((props, ref) => { ...@@ -87,7 +75,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
<Select showSearch placeholder="请选择供应商名称" filterOption={fileterBrandOptions}> <Select showSearch placeholder="请选择供应商名称" filterOption={fileterBrandOptions}>
{CreateSelectOption(shopList)} {CreateSelectOption(shopList)}
</Select> </Select>
</Form.Item> </Form.Item> */}
<Form.Item <Form.Item
name="categoryId" name="categoryId"
label="商品类目" label="商品类目"
......
...@@ -230,7 +230,15 @@ const FormPriceOrStock = forwardRef((props, ref) => { ...@@ -230,7 +230,15 @@ const FormPriceOrStock = forwardRef((props, ref) => {
try { try {
const values = await form.validateFields(); const values = await form.validateFields();
const { tableList: items } = await editRef.current.onCheck(); const { tableList: items } = await editRef.current.onCheck();
return items ? { ...values, items, temp: 'infoSpecData' } : null; console.log('================>items', items);
if (items) {
return { ...values, items, temp: 'infoSpecData' };
}
notification.open({
message: '提示',
description: '请生成商品信息!',
});
return null;
} catch (errorInfo) { } catch (errorInfo) {
return null; return null;
} }
......
...@@ -16,35 +16,18 @@ const WeekCheckBox = () => ...@@ -16,35 +16,18 @@ const WeekCheckBox = () =>
)); ));
const rangeConfig = { const rangeConfig = {
rules: [{ type: 'array', required: true, message: 'Please select time!' }], rules: [{ type: 'array', required: true, message: '请选择时间!' }],
}; };
const FormRuleSetting = forwardRef((props, ref) => { const FormRuleSetting = forwardRef((props, ref) => {
const { editData } = props; const { editData, supplierIdList } = props;
const [form] = Form.useForm(); const [form] = Form.useForm();
const customer = useContext(ServiceContext); const customer = useContext(ServiceContext);
useEffect(() => { useEffect(() => {
if (customer.isEdit) { if (customer.isEdit) {
if (!editData) return; if (!editData) return;
form.setFieldsValue(editData); form.setFieldsValue(editData);
// setImageList(editData.commonImageList);
// setCommonImageList(editData.commonImageList);
// setDetailImageList(editData.detailImageList);
// const { serviceItem } = editData.skuList[0];
// form.setFieldsValue({
// useTime: [resetTime(serviceItem.useStartTime), resetTime(serviceItem.useEndTime)],
// purchaseTime: [
// resetTime(serviceItem.purchaseStartTime),
// resetTime(serviceItem.purchaseEndTime),
// ], // 购买开始时间
// shopIds: serviceItem.shopIds || [], // 适用门店列表
// unavailableDate: serviceItem.unavailableDate, // 不可用日期
// useTimeDescription: serviceItem.useTimeDescription, // 使用时间
// useMethod: serviceItem.useMethod, // 使用方法
// ruleDescription: serviceItem.ruleDescription, // 规则说明
// applyScope: serviceItem.applyScope, // 适用范围
// tips: serviceItem.tips, // 温馨提示
// });
} }
}, [customer.isEdit, editData]); }, [customer.isEdit, editData]);
...@@ -69,17 +52,12 @@ const FormRuleSetting = forwardRef((props, ref) => { ...@@ -69,17 +52,12 @@ const FormRuleSetting = forwardRef((props, ref) => {
onCheck, onCheck,
reset: form.resetFields, reset: form.resetFields,
})); }));
const onFinish = values => {
console.log('Received values of form: ', values);
};
return ( return (
<> <>
<Form <Form
{...formItemLayout} {...formItemLayout}
form={form} form={form}
name="register" name="register"
onFinish={onFinish}
initialValues={{ initialValues={{
useTime: [], // 使用开始时间 useTime: [], // 使用开始时间
// useEndTime: '', // 使用结束时间 // useEndTime: '', // 使用结束时间
...@@ -107,9 +85,11 @@ const FormRuleSetting = forwardRef((props, ref) => { ...@@ -107,9 +85,11 @@ const FormRuleSetting = forwardRef((props, ref) => {
rules={[{ required: true, message: '请选择适用门店!', type: 'array' }]} rules={[{ required: true, message: '请选择适用门店!', type: 'array' }]}
> >
<Select mode="multiple" placeholder="请选择适用门店"> <Select mode="multiple" placeholder="请选择适用门店">
<Option value={1}>Male</Option> {(supplierIdList || []).map(item => (
<Option value={2}>Female</Option> <Option value={item.id} key={item.id}>
<Option value={3}>Other</Option> {item.name}
</Option>
))}
</Select> </Select>
</Form.Item> </Form.Item>
...@@ -134,14 +114,14 @@ const FormRuleSetting = forwardRef((props, ref) => { ...@@ -134,14 +114,14 @@ const FormRuleSetting = forwardRef((props, ref) => {
<Form.Item <Form.Item
name="useMethod" name="useMethod"
label="使用方法" label="使用方法"
rules={[{ required: false, message: '请输使用方法,200字以内!' }]} rules={[{ required: true, message: '请输使用方法,200字以内!' }]}
> >
<Input.TextArea showCount maxLength={200} placeholder="请输使用方法,200字以内!" /> <Input.TextArea showCount maxLength={200} placeholder="请输使用方法,200字以内!" />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="ruleDescription" name="ruleDescription"
label="规则说明" label="规则说明"
rules={[{ required: false, message: '请输规则说明,200字以内!' }]} rules={[{ required: true, message: '请输规则说明,200字以内!' }]}
> >
<Input.TextArea showCount maxLength={200} placeholder="请输规则说明,200字以内!" /> <Input.TextArea showCount maxLength={200} placeholder="请输规则说明,200字以内!" />
</Form.Item> </Form.Item>
......
...@@ -89,7 +89,7 @@ const FormRuleVPictures = forwardRef((props, ref) => { ...@@ -89,7 +89,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
}); });
}; };
const { imgConfig } = TaskList[customer.productType - 1]; const [{ imgConfig }] = TaskList.filter(item => item.type === customer.productType);
return ( return (
<> <>
......
...@@ -40,19 +40,6 @@ const FormSettlementOthers = forwardRef((props, ref) => { ...@@ -40,19 +40,6 @@ const FormSettlementOthers = forwardRef((props, ref) => {
if (!editData) return; if (!editData) return;
form.setFieldsValue(editData); form.setFieldsValue(editData);
setInitValue({ ...editData }); setInitValue({ ...editData });
// const { serviceItem } = editData.skuList[0];
// const data = {
// settlementMethod: 1,
// limitPurchase: Boolean(serviceItem.limitPurchase), // 是否限购1:限购/0:不限购
// limitPurchaseType: serviceItem.limitPurchaseType, // 限购类型,如果限购必填1:长期限购/2:周期限购
// limitPurchaseCycle: serviceItem.limitPurchaseCycle, // 限购周期1:每天/7:7天/30:30天
// limitPurchaseQuantity: serviceItem.limitPurchaseQuantity, // 限购数量
// packageContent: serviceItem.packageContent,
// appointment: serviceItem.appointment, // 预约
// receptionVolume: serviceItem.receptionVolume, // 接待数量
// };
// form.setFieldsValue(data);
// setInitValue({ ...data });
} }
}, [customer.isEdit, editData]); }, [customer.isEdit, editData]);
...@@ -64,10 +51,6 @@ const FormSettlementOthers = forwardRef((props, ref) => { ...@@ -64,10 +51,6 @@ const FormSettlementOthers = forwardRef((props, ref) => {
}, },
})); }));
const onFinish = values => {
console.log('Received values of form: ', values);
};
const radioChangeEvent = key => { const radioChangeEvent = key => {
const value = form.getFieldValue(key); const value = form.getFieldValue(key);
setInitValue({ setInitValue({
...@@ -135,11 +118,14 @@ const FormSettlementOthers = forwardRef((props, ref) => { ...@@ -135,11 +118,14 @@ const FormSettlementOthers = forwardRef((props, ref) => {
{...formItemLayout} {...formItemLayout}
form={form} form={form}
name="register" name="register"
onFinish={onFinish}
initialValues={initValue} initialValues={initValue}
scrollToFirstError scrollToFirstError
> >
<Form.Item name="appointment" label="预约"> <Form.Item
name="appointment"
label="预约"
rules={[{ required: true, message: '请选择是否预约!' }]}
>
<Radio.Group> <Radio.Group>
<Radio value={1}></Radio> <Radio value={1}></Radio>
<Radio value={0}></Radio> <Radio value={0}></Radio>
......
...@@ -55,6 +55,26 @@ export const TaskList = [ ...@@ -55,6 +55,26 @@ export const TaskList = [
name: '电子卡卷', name: '电子卡卷',
type: 3, type: 3,
desc: '无需物流', desc: '无需物流',
hide: true,
imgConfig: {
imageList: {
rule: true,
limit: 1,
},
commonImageList: {
rule: true,
limit: 11,
},
detailImageList: {
rule: true,
limit: 30,
},
},
},
{
name: '服务类商品',
type: 4,
desc: '无需物流',
imgConfig: { imgConfig: {
imageList: { imageList: {
rule: true, rule: true,
...@@ -112,7 +132,7 @@ export const StaticColumns = customer => [ ...@@ -112,7 +132,7 @@ export const StaticColumns = customer => [
title: '供货价', title: '供货价',
dataIndex: 'supplyPrice', dataIndex: 'supplyPrice',
editable: true, editable: true,
batchRole: [1, 2, 3], batchRole: [1, 2, 3, 4],
roleProps: { roleProps: {
precision: 2, precision: 2,
min: 0, min: 0,
...@@ -124,14 +144,14 @@ export const StaticColumns = customer => [ ...@@ -124,14 +144,14 @@ export const StaticColumns = customer => [
title: '佣金费率', title: '佣金费率',
dataIndex: 'commissionRate', dataIndex: 'commissionRate',
editable: true, editable: true,
role: [3], role: [4],
roleRules: { required: true }, roleRules: { required: true },
}, },
{ {
title: '市场价', title: '市场价',
dataIndex: 'marketPrice', dataIndex: 'marketPrice',
editable: true, editable: true,
batchRole: [1, 2, 3], batchRole: [1, 2, 3, 4],
roleProps: { roleProps: {
precision: 2, precision: 2,
min: 0, min: 0,
...@@ -139,6 +159,14 @@ export const StaticColumns = customer => [ ...@@ -139,6 +159,14 @@ export const StaticColumns = customer => [
roleRules: { required: true }, roleRules: { required: true },
disabled: customer.isService, disabled: customer.isService,
}, },
{
title: '销售价',
dataIndex: 'salePrice',
editable: true,
batchRole: [4],
role: [4],
roleRules: { required: true },
},
{ {
title: '重量(kg)', title: '重量(kg)',
dataIndex: 'weight', dataIndex: 'weight',
...@@ -148,30 +176,16 @@ export const StaticColumns = customer => [ ...@@ -148,30 +176,16 @@ export const StaticColumns = customer => [
precision: 3, precision: 3,
max: 999999.999, max: 999999.999,
}, },
role: [1, 2],
roleRules: { required: true }, roleRules: { required: true },
disabled: customer.isService, disabled: customer.isService,
}, },
{
title: '销售价',
dataIndex: 'salePrice',
editable: true,
role: [],
roleRules: { required: true },
},
{ {
title: '库存', title: '库存',
dataIndex: 'productStock', dataIndex: 'productStock',
editable: true, editable: true,
role: [3], role: [4],
roleRules: { required: true }, batchRole: [1, 2, 4],
// disabled: customer.isService,
},
{
title: '库存',
dataIndex: 'productStock',
editable: true,
role: [1, 2],
batchRole: [1, 2],
batchProps: { batchProps: {
precision: 0, precision: 0,
step: 1, step: 1,
...@@ -183,14 +197,32 @@ export const StaticColumns = customer => [ ...@@ -183,14 +197,32 @@ export const StaticColumns = customer => [
min: 0, min: 0,
}, },
roleRules: { required: true }, roleRules: { required: true },
disabled: customer.isService,
}, },
// {
// title: '库存',
// dataIndex: 'productStock',
// editable: true,
// role: [1, 2],
// batchRole: [1, 2],
// batchProps: {
// precision: 0,
// step: 1,
// // eslint-disable-next-line radix
// formatter: val => parseInt(val, '10') || '',
// },
// roleProps: {
// precision: 2,
// min: 0,
// },
// roleRules: { required: true },
// disabled: customer.isService,
// },
{ {
title: '库存预警阈值', title: '库存预警阈值',
dataIndex: 'productStockWarning', dataIndex: 'productStockWarning',
editable: true, editable: true,
batchRole: [1], batchRole: [1],
role: [1], role: [1, 4],
roleRules: { required: true }, roleRules: { required: true },
disabled: customer.isService, disabled: customer.isService,
}, },
......
import React, { useState, useRef, useEffect, useCallback } from 'react'; import React, { useState, useRef, useEffect, useCallback } from 'react';
import { Spin, Button, Modal, notification } from 'antd'; import { Spin, Button, Modal, message, notification } from 'antd';
import { ConsoleSqlOutlined } from '@ant-design/icons'; import { ConsoleSqlOutlined } from '@ant-design/icons';
import { Title, WrapperContainer } from './components/CommonTemplate'; import { Title, WrapperContainer } from './components/CommonTemplate';
import { TaskTypeSelect } from './components/TaskTypeSelect'; import { TaskTypeSelect } from './components/TaskTypeSelect';
...@@ -18,6 +18,7 @@ import { ...@@ -18,6 +18,7 @@ import {
merchantProductAdd, merchantProductAdd,
// getSupplierList, // getSupplierList,
supplierListQuery, supplierListQuery,
shopGetBySupplierId,
} from './service'; } from './service';
import { isUrl, filterSendData } from './utils'; import { isUrl, filterSendData } from './utils';
import { ServiceContext } from './context'; import { ServiceContext } from './context';
...@@ -38,12 +39,13 @@ const ServiceGoods = options => { ...@@ -38,12 +39,13 @@ const ServiceGoods = options => {
const [pageId, setPageId] = useState(null); const [pageId, setPageId] = useState(null);
const [isEdit, setIsEdit] = useState(false); // 是否是编辑状态 const [isEdit, setIsEdit] = useState(false); // 是否是编辑状态
const [productType, setProductType] = useState(3); // 商品状态 const [productType, setProductType] = useState(4); // 商品状态
const [pageLoading, setPageLoading] = useState(false); // 页面加载状态 const [pageLoading, setPageLoading] = useState(false); // 页面加载状态
// const [categoryList, setCategoryList] = useState([]); // 获取三级类目 // const [categoryList, setCategoryList] = useState([]); // 获取三级类目
const [afterAddressList, setAfterAddressList] = useState([]); const [afterAddressList, setAfterAddressList] = useState([]);
const [supplierIdList, setSupplierIdList] = useState([]);
const [shopList, setShopList] = useState([]); // const [shopList, setShopList] = useState([]);
const [brandList, setBrandList] = useState([]); // 获取商品牌 const [brandList, setBrandList] = useState([]); // 获取商品牌
const [specList, setSpecList] = useState([]); // 规格列表 const [specList, setSpecList] = useState([]); // 规格列表
const [editData, setEditData] = useState({}); // 编辑保存数据 const [editData, setEditData] = useState({}); // 编辑保存数据
...@@ -54,7 +56,7 @@ const ServiceGoods = options => { ...@@ -54,7 +56,7 @@ const ServiceGoods = options => {
const changeCheckList = proType => { const changeCheckList = proType => {
const newBaseCheckList = const newBaseCheckList =
proType === 3 ? [...baseCheckList, settingRef, settleOtrRef] : baseCheckList; proType === 4 ? [...baseCheckList, settingRef, settleOtrRef] : baseCheckList;
setCheckFormList(newBaseCheckList); setCheckFormList(newBaseCheckList);
}; };
...@@ -75,6 +77,16 @@ const ServiceGoods = options => { ...@@ -75,6 +77,16 @@ const ServiceGoods = options => {
}, 1000); }, 1000);
}; };
const handleCancel = () => {
setPageId(null);
setIsEdit(false);
setProductType(4); // 默认写死服务类商品
setEditData({});
setSpecKeyList([]);
resetForm();
options.onChange(false);
};
// 编辑回显详情数据 // 编辑回显详情数据
const getProductDetailResponse = async id => { const getProductDetailResponse = async id => {
try { try {
...@@ -89,10 +101,10 @@ const ServiceGoods = options => { ...@@ -89,10 +101,10 @@ const ServiceGoods = options => {
}; };
// 获取三级类目分类数据 // 获取三级类目分类数据
const getMerchantCategory = async () => { // const getMerchantCategory = async () => {
const result = await merchantCategoryGetAll(); // const result = await merchantCategoryGetAll();
// setCategoryList(result.data || []); // // setCategoryList(result.data || []);
}; // };
// 获取商品牌数据 // 获取商品牌数据
const getMerchantBrandList = async () => { const getMerchantBrandList = async () => {
if (!brandList.length) { if (!brandList.length) {
...@@ -115,17 +127,29 @@ const ServiceGoods = options => { ...@@ -115,17 +127,29 @@ const ServiceGoods = options => {
} }
}; };
const getSupplierListResponse = async () => { // const getSupplierListResponse = async () => {
if (!shopList.length) { // if (!shopList.length) {
const result = await supplierListQuery(); // const result = await supplierListQuery();
console.log('=================>result', result); // console.log('=================>result', result);
setShopList(result.data); // setShopList(result.data);
} // }
}; // };
const sendMerchantProductAdd = async sendData => { const sendMerchantProductAdd = async sendData => {
setPageLoading(true);
const addResponse = await merchantProductAdd(sendData); const addResponse = await merchantProductAdd(sendData);
console.log(addResponse); if (addResponse.data) {
message.success('添加成功!');
handleCancel();
}
setPageLoading(false);
};
const shopGetBySupplierIdResponse = async () => {
if (!supplierIdList.length) {
const result = await shopGetBySupplierId();
setSupplierIdList(result.data);
}
}; };
const submitEvent = async () => { const submitEvent = async () => {
...@@ -139,12 +163,7 @@ const ServiceGoods = options => { ...@@ -139,12 +163,7 @@ const ServiceGoods = options => {
}, {}); }, {});
const sendData = filterSendData(productType, params); const sendData = filterSendData(productType, params);
console.log('==============>生成发送数据,===>', sendData);
sendMerchantProductAdd(sendData); sendMerchantProductAdd(sendData);
// sendAsyncPost({ ...sendData, type: productType });
console.log();
} }
}; };
...@@ -172,7 +191,8 @@ const ServiceGoods = options => { ...@@ -172,7 +191,8 @@ const ServiceGoods = options => {
return; return;
} }
setPageLoading(true); setPageLoading(true);
await getSupplierListResponse(); await shopGetBySupplierIdResponse();
// await getSupplierListResponse();
await getMerchantBrandList(); await getMerchantBrandList();
await getAfterSalesAddrsPage(); await getAfterSalesAddrsPage();
await getMerchantSpecList(); await getMerchantSpecList();
...@@ -185,32 +205,9 @@ const ServiceGoods = options => { ...@@ -185,32 +205,9 @@ const ServiceGoods = options => {
setIsEdit(true); setIsEdit(true);
} }
setPageLoading(false); setPageLoading(false);
// setPageLoading(true);
// await getMerchantCategory();
// await getMerchantBrandList();
// await getMerchantSpecList();
// if (options.id) {
// setIsEdit(true);
// await getProductDetailResponse(options.id);
// changeCheckList(productType);
// }
// setPageLoading(false);
})(); })();
}, [SourceData]); }, [SourceData]);
const handleOk = () => {};
const handleCancel = () => {
setPageId(null);
setIsEdit(false);
setProductType(3);
setEditData({});
setSpecKeyList([]);
resetForm();
options.onChange(false);
};
const onSpecCommonImgEvent = useCallback( const onSpecCommonImgEvent = useCallback(
keys => { keys => {
setSpecKeyList(keys); setSpecKeyList(keys);
...@@ -244,14 +241,25 @@ const ServiceGoods = options => { ...@@ -244,14 +241,25 @@ const ServiceGoods = options => {
pageId, pageId,
isEdit, isEdit,
productType, productType,
isCard: productType === 3, isCard: productType === 4,
isService: SourceData.state && SourceData.state !== 4, isService: SourceData.state && SourceData.state !== 4,
isJDGoods: isEdit && SourceData.pageProductType && +SourceData.pageProductType !== 1, isJDGoods: isEdit && SourceData.pageProductType && +SourceData.pageProductType !== 1,
onEventBus, onEventBus,
}; };
return ( return (
<Modal visible={options.visible} onOk={handleOk} onCancel={handleCancel} width={1366}> <Modal
visible={options.visible}
width={1366}
footer={[
<Button key="submit" type="primary" loading={pageLoading} onClick={submitEvent}>
提交
</Button>,
<Button key="back" onClick={handleCancel}>
返回
</Button>,
]}
>
<Spin tip="正在加载..." spinning={pageLoading} delay={100}> <Spin tip="正在加载..." spinning={pageLoading} delay={100}>
<WrapperContainer> <WrapperContainer>
<ServiceContext.Provider value={providerValue}> <ServiceContext.Provider value={providerValue}>
...@@ -262,7 +270,6 @@ const ServiceGoods = options => { ...@@ -262,7 +270,6 @@ const ServiceGoods = options => {
<FormInformationBasic <FormInformationBasic
ref={basicRef} ref={basicRef}
editData={editData.infoMation} editData={editData.infoMation}
shopList={shopList}
categoryList={categoryList} categoryList={categoryList}
brandList={brandList} brandList={brandList}
afterAddressList={afterAddressList} afterAddressList={afterAddressList}
...@@ -279,8 +286,12 @@ const ServiceGoods = options => { ...@@ -279,8 +286,12 @@ const ServiceGoods = options => {
/> />
<Title title="规则设置" /> <Title title="规则设置" />
{productType === 3 && ( {productType === 4 && (
<FormRuleSetting ref={settingRef} editData={editData.serviceItem} /> <FormRuleSetting
ref={settingRef}
editData={editData.serviceItem}
supplierIdList={supplierIdList}
/>
)} )}
<FormRuleVPictures <FormRuleVPictures
...@@ -288,12 +299,9 @@ const ServiceGoods = options => { ...@@ -288,12 +299,9 @@ const ServiceGoods = options => {
specKeyItem={specKeyList} specKeyItem={specKeyList}
editData={editData.infoImageData} editData={editData.infoImageData}
/> />
{productType === 3 && ( {productType === 4 && (
<FormSettlementOthers ref={settleOtrRef} editData={editData.settlementItem} /> <FormSettlementOthers ref={settleOtrRef} editData={editData.settlementItem} />
)} )}
<Button type="primary" onClick={submitEvent}>
Register
</Button>
</ServiceContext.Provider> </ServiceContext.Provider>
</WrapperContainer> </WrapperContainer>
</Spin> </Spin>
......
...@@ -78,3 +78,11 @@ export const supplierListQuery = () => ...@@ -78,3 +78,11 @@ export const supplierListQuery = () =>
prefix: config.kdspApi, prefix: config.kdspApi,
headers, headers,
}); });
// supplierId: 供应商id(优先使用token中的supplierId,这里可以传任意值,建议传0)
// state: 状态:-1-全部,1-启用,0-禁用
export const shopGetBySupplierId = (state = 1, supplierId = 0) =>
request.get(`/shop/getBySupplierId/${supplierId}/${state}`, {
prefix: goodsApi,
headers,
});
...@@ -141,7 +141,7 @@ const filterItems = (type, props) => { ...@@ -141,7 +141,7 @@ const filterItems = (type, props) => {
item.imageList = imgList.length ? imgList : commonImageList; item.imageList = imgList.length ? imgList : commonImageList;
item.firstSpecId = infoSpecData.firstSpecId; item.firstSpecId = infoSpecData.firstSpecId;
item.secondSpecId = infoSpecData.secondSpecId || null; item.secondSpecId = infoSpecData.secondSpecId || null;
if (type === 3) { if (type === 4) {
item.serviceItem = { item.serviceItem = {
...serviceItem, ...serviceItem,
...settlementItem, ...settlementItem,
......
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