Commit 4035f0b8 authored by 武广's avatar 武广

fix: 修改拉取jd图片按钮禁用问题和选规格自动生成数据

parent f698043e
import React, { useState } from 'react';
import React from 'react';
import { Select, Form, InputNumber, Input, Button, Popover } from 'antd';
import commonStyle from '../common.less';
......@@ -108,7 +108,12 @@ export const CreateFormInput = props => {
return (
<>
{record.skuLink && (
<Button type="primary" size="small" onClick={() => onClickEvent('cloneImg', record)}>
<Button
type="primary"
size="small"
disabled={props.disabled}
onClick={() => onClickEvent('cloneImg', record)}
>
拉图片
</Button>
)}
......
......@@ -58,7 +58,7 @@ const SpecificationTemplate = (props, _) => {
const handleChange = (val, option) => {
const optionSpecName = option ? option.specName : null;
form.setFieldsValue({ [selectName]: optionSpecName });
// onChange();
onChange();
};
const inputOnblurEvent = event => {
......@@ -113,8 +113,9 @@ const SpecificationTemplate = (props, _) => {
{fields.map((field, index) => (
<Form.Item key={field.key} noStyle shouldUpdate={(prevValues, curValues) => false}>
{() => (
<Space key={field.key} align="baseline">
<Space key={`space_${field.key}`} align="baseline">
<Form.Item
key={`item_${field.key}`}
style={{ marginLeft: 10 }}
name={[field.name, specName]}
rules={[
......@@ -142,6 +143,7 @@ const SpecificationTemplate = (props, _) => {
</Form.Item>
{!(specDataList[index] && specDataList[index].id) && (
<MinusCircleOutlined
key={`minus_${field.key}`}
onClick={() => bundlePlusRemoveSpecEvent(remove, field.name)}
/>
)}
......@@ -150,7 +152,7 @@ const SpecificationTemplate = (props, _) => {
</Form.Item>
))}
{fields.length < 3 && (!customer.isEdit || customer.isCard) && (
<Form.Item noStyle>
<Form.Item noStyle key="btnpush">
<Button
style={{ marginLeft: 10, marginBottom: 24 }}
type="dashed"
......
......@@ -260,6 +260,7 @@ export const StaticColumns = customer => [
inputType: 'option',
roleProps: {
isJDGoods: customer.isJDGoods,
disabled: customer.isEdit && !customer.isCard,
min: 0,
},
roleRules: { required: false },
......
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