前端:商品编辑,部分逻辑,解决 sku 编辑的 bug 。

This commit is contained in:
YunaiV
2019-05-02 23:48:20 +08:00
parent 942d2c0634
commit 582837fee0
7 changed files with 113 additions and 45 deletions

View File

@@ -119,7 +119,7 @@ class ProductSpuAddOrUpdate extends Component {
}
// debugger;
this.props.form.validateFields((err, values) => {
debugger;
// debugger;
if (!err) {
if (modalType === 'add') {
dispatch({
@@ -228,14 +228,10 @@ class ProductSpuAddOrUpdate extends Component {
)}
</FormItem>
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="商品规格">
{form.getFieldDecorator('visible', {
initialValue: 1, // TODO 修改
})(
<div>
{attrTreeHTML}
<Button onClick={this.handleAddAttr}>添加规格项目</Button>
</div>
)}
<div>
{attrTreeHTML}
<Button onClick={this.handleAddAttr}>添加规格项目</Button>
</div>
</FormItem>
{
attrTree.length > 0 ? <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="规格明细">

View File

@@ -7,7 +7,7 @@
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<title>商城管理平台</title>
<title>一个商城管理平台</title>
<link rel="icon" href="/favicon.png" type="image/x-icon" />
</head>
<body>