Commit 4c9e71f2 authored by 阿鑫's avatar 阿鑫 :bicyclist:
Browse files

Merge branch 'hotfix/v1.0.0.2' into 'master'

sku简洁版(去掉成本价和sku检索码)

See merge request !2
1 merge request!2sku简洁版(去掉成本价和sku检索码)
Showing with 30 additions and 4 deletions
+30 -4
node_modules/
es/
lib/
.docz
{
"name": "@yjtec/sku",
"version": "0.0.5",
"version": "0.0.6",
"description": "js sku",
"main": "lib/index.js",
"files": [
......
......@@ -131,6 +131,26 @@ class GoodsSpec extends Component{
key:'sku',
render:(v,r) => <Input value={v} onChange={(e)=>this.handleSkuChange(e,r)} name="sku" />,
...this.getMulEditProps('sku')
}];
simpleColumns = [{
title:formatMessage({id:'goods.spec.spec'}),
dataIndex:'spec',
key:'spec',
width:100
},{
title:formatMessage({id:'goods.price.label'}),
dataIndex:'price',
key:'price',
width:120,
render:(v,r) => <Input value={v} onChange={(e)=>this.handleSkuChange(e,r)} name="price" />,
...this.getMulEditProps('price')
},{
title:formatMessage({id:'goods.price_origin.label'}),
dataIndex:'price_origin',
width:120,
key:'price_origin',
render:(v,r) => <Input value={v} onChange={(e)=>this.handleSkuChange(e,r)} name="price_origin" />,
...this.getMulEditProps('price_origin')
}]
handleAddSpec = () =>{
const {specs} = this.state;
......@@ -261,13 +281,18 @@ class GoodsSpec extends Component{
specs,
sku
} = this.state;
const {
type
} = this.props;
return(
<div>
<Button onClick={this.handleAddSpec} type="circle" icon="plus" />
{this.renderSpec()}
{sku.length > 0 && <Table pagination={false} rowKey={'spec'} dataSource={sku} columns={this.columns} />}
{sku.length > 0 && <Table
pagination={false}
rowKey={'spec'}
dataSource={sku}
columns={type == "simple" ? this.simpleColumns : this.columns} />}
</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