Commit 78ae2cb0 authored by 武广's avatar 武广

fix: 去掉生成商品按钮 添加拉取公共图片

parent ff8bf25d
...@@ -174,8 +174,8 @@ const EditFormTable = forwardRef((props, ref) => { ...@@ -174,8 +174,8 @@ const EditFormTable = forwardRef((props, ref) => {
<Form form={form} scrollToFirstError component={false}> <Form form={form} scrollToFirstError component={false}>
<EditableContext.Provider value={form}> <EditableContext.Provider value={form}>
<Table <Table
scroll={{ y: 300, x: 1000 }} scroll={{ y: 320, x: 1000 }}
height={300} height={320}
pagination={false} pagination={false}
size="small" size="small"
bordered bordered
......
...@@ -77,7 +77,6 @@ const SpecificationTemplate = (props, _) => { ...@@ -77,7 +77,6 @@ const SpecificationTemplate = (props, _) => {
return; return;
} }
addCallback(); addCallback();
onChange();
}; };
const bundlePlusRemoveSpecEvent = (removeCallback, fieldName) => { const bundlePlusRemoveSpecEvent = (removeCallback, fieldName) => {
...@@ -353,10 +352,12 @@ const FormPriceOrStock = forwardRef((props, ref) => { ...@@ -353,10 +352,12 @@ const FormPriceOrStock = forwardRef((props, ref) => {
); );
onSpecChange(firstSpecValueList); onSpecChange(firstSpecValueList);
} }
onFinish();
}; };
const seconOnChangeEvent = async () => { const seconOnChangeEvent = async () => {
await onSpecificationEvent(); await onSpecificationEvent();
onFinish();
}; };
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
...@@ -405,16 +406,18 @@ const FormPriceOrStock = forwardRef((props, ref) => { ...@@ -405,16 +406,18 @@ const FormPriceOrStock = forwardRef((props, ref) => {
specList={specList} specList={specList}
specDataList={specInitValue.secondSpecValue} specDataList={specInitValue.secondSpecValue}
/> />
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: 20 }}> {/* <div style={{ display: 'flex', justifyContent: 'center', marginBottom: 20 }}>
<Button type="primary" onClick={onFinish}> <Button type="primary" onClick={onFinish}>
生成商品信息 生成商品信息
</Button> </Button>
</div> */}
<div>
<CreateBatchFormItems
batchChange={batchChange}
specInitValue={specInitValue}
defaultColumns={defaultColumns}
/>
</div> </div>
<CreateBatchFormItems
batchChange={batchChange}
specInitValue={specInitValue}
defaultColumns={defaultColumns}
/>
</Form> </Form>
<EditFormTable <EditFormTable
ref={editRef} ref={editRef}
......
...@@ -100,6 +100,14 @@ const FormRuleVPictures = forwardRef((props, ref) => { ...@@ -100,6 +100,14 @@ const FormRuleVPictures = forwardRef((props, ref) => {
}); });
}; };
// 拉取公共图片
const onPullCommonImg = key => {
const cimg = form.getFieldValue('commonImageList');
const obj = { ...imageList };
obj[key] = cimg;
setImageList(obj);
};
const onDetailSuccessImageList = imgList => { const onDetailSuccessImageList = imgList => {
setDetailImageList(imgList); setDetailImageList(imgList);
form.setFieldsValue({ form.setFieldsValue({
...@@ -190,7 +198,11 @@ const FormRuleVPictures = forwardRef((props, ref) => { ...@@ -190,7 +198,11 @@ const FormRuleVPictures = forwardRef((props, ref) => {
setPictureList={list => onPictureSuccessEvent(list, key)} setPictureList={list => onPictureSuccessEvent(list, key)}
/> />
</Form.Item> </Form.Item>
<Button className={commonStyle.pullImage} type="primary"> <Button
className={commonStyle.pullImage}
onClick={() => onPullCommonImg(key)}
type="primary"
>
拉取公共图 拉取公共图
</Button> </Button>
</div> </div>
......
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