Commit 19bfcc69 authored by guang.wu's avatar guang.wu

fix: 去掉没用代码

parent a3a98aa6
...@@ -69,7 +69,7 @@ const UpdatePriceStock = options => { ...@@ -69,7 +69,7 @@ const UpdatePriceStock = options => {
onCancel={options.onCancel} onCancel={options.onCancel}
onOk={onSubmit} onOk={onSubmit}
confirmLoading={loading} confirmLoading={loading}
width={1000} width={800}
className={styles.priceStockTable} className={styles.priceStockTable}
destroyOnClose destroyOnClose
> >
......
...@@ -29,7 +29,6 @@ class supplyPriceUpdate extends Component { ...@@ -29,7 +29,6 @@ class supplyPriceUpdate extends Component {
pageSize: 20, pageSize: 20,
previewVisible: false, previewVisible: false,
createloading: false, createloading: false,
selectedRowKeys: [],
productType: 1, // 商品类型 productType: 1, // 商品类型
searchValue: {}, // 搜索条件 searchValue: {}, // 搜索条件
refresh: '', // 外卖刷新 refresh: '', // 外卖刷新
...@@ -55,7 +54,6 @@ class supplyPriceUpdate extends Component { ...@@ -55,7 +54,6 @@ class supplyPriceUpdate extends Component {
const searchValue = this.searchForm.getFieldsValue() || {}; const searchValue = this.searchForm.getFieldsValue() || {};
this.setState({ searchValue }); this.setState({ searchValue });
if (searchValue.productType !== 5) { if (searchValue.productType !== 5) {
this.onSelectChange([]);
const currentPage = this.state.pageNo; const currentPage = this.state.pageNo;
this.setState( this.setState(
{ {
...@@ -113,7 +111,6 @@ class supplyPriceUpdate extends Component { ...@@ -113,7 +111,6 @@ class supplyPriceUpdate extends Component {
this.setState({ this.setState({
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 20,
selectedRowKeys: [],
}); });
this.handleSearch(); this.handleSearch();
}; };
...@@ -121,9 +118,6 @@ class supplyPriceUpdate extends Component { ...@@ -121,9 +118,6 @@ class supplyPriceUpdate extends Component {
onLoad = error => { onLoad = error => {
if (!error) { if (!error) {
notification.success({ message: '操作成功' }); notification.success({ message: '操作成功' });
this.setState({
selectedRowKeys: [],
});
this.handleSearch(); this.handleSearch();
} }
}; };
...@@ -151,12 +145,6 @@ class supplyPriceUpdate extends Component { ...@@ -151,12 +145,6 @@ class supplyPriceUpdate extends Component {
} }
}; };
onSelectChange = selectedRowKeys => {
this.setState({
selectedRowKeys,
});
};
// 显示更新供货价弹窗 // 显示更新供货价弹窗
serviceVisbleChange = async row => { serviceVisbleChange = async row => {
try { try {
...@@ -179,11 +167,7 @@ class supplyPriceUpdate extends Component { ...@@ -179,11 +167,7 @@ class supplyPriceUpdate extends Component {
SupplyPrice: { tableData = {} }, SupplyPrice: { tableData = {} },
permissions, permissions,
} = this.props; } = this.props;
const rowSelection = { const { pageNo, pageSize } = this.state;
selectedRowKeys: this.state.selectedRowKeys,
onChange: this.onSelectChange,
};
const { pageNo, pageSize, selectedRowKeys } = this.state;
this.canEditable = permissions[GOOD_MANAGE.EDITABLE]; this.canEditable = permissions[GOOD_MANAGE.EDITABLE];
return ( return (
...@@ -200,7 +184,6 @@ class supplyPriceUpdate extends Component { ...@@ -200,7 +184,6 @@ class supplyPriceUpdate extends Component {
treeData={this.state.categoryTree} treeData={this.state.categoryTree}
shopList={this.shopList} shopList={this.shopList}
checkStock={this.checkEnableUpdateStock} checkStock={this.checkEnableUpdateStock}
selectNum={selectedRowKeys.length}
changeProductType={this.changeProductType} changeProductType={this.changeProductType}
setArea={(isALL, type) => this.setArea(isALL, type)} setArea={(isALL, type) => this.setArea(isALL, type)}
/> />
...@@ -223,7 +206,6 @@ class supplyPriceUpdate extends Component { ...@@ -223,7 +206,6 @@ class supplyPriceUpdate extends Component {
pagination={false} pagination={false}
className={styles.tabletop} className={styles.tabletop}
scroll={{ x: '100%', y: 500 }} scroll={{ x: '100%', y: 500 }}
rowSelection={rowSelection}
/> />
</Spin> </Spin>
<br /> <br />
......
...@@ -44,15 +44,9 @@ export function column(specArr = []) { ...@@ -44,15 +44,9 @@ export function column(specArr = []) {
</div> </div>
), ),
}, },
{
title: '重量(kg)',
width: 135,
align: 'center',
dataIndex: 'weight',
},
{ {
title: '库存', title: '库存',
width: 120, width: 80,
dataIndex: 'productStock', dataIndex: 'productStock',
align: 'center', align: 'center',
render: (_, row, index) => ( render: (_, row, index) => (
...@@ -69,18 +63,6 @@ export function column(specArr = []) { ...@@ -69,18 +63,6 @@ export function column(specArr = []) {
</div> </div>
), ),
}, },
{
title: '库存预警',
width: 120,
dataIndex: 'productStockWarning',
align: 'center',
},
{
title: '商品自编码',
dataIndex: 'thirdSkuNo',
width: 200,
align: 'center',
},
]; ];
} }
...@@ -105,6 +87,22 @@ export function columnManage() { ...@@ -105,6 +87,22 @@ export function columnManage() {
sorter: (a, b) => a.marketPrice - b.marketPrice, sorter: (a, b) => a.marketPrice - b.marketPrice,
render: (_, row) => <div>{(row.marketPrice || 0).toFixed(2)}</div>, render: (_, row) => <div>{(row.marketPrice || 0).toFixed(2)}</div>,
}, },
{
title: '供货价',
dataIndex: 'supplyPrice',
width: 160,
align: 'center',
sorter: (a, b) => a.supplyPrice - b.supplyPrice,
render: (_, row) => (
<div>{(row.supplyPrice && (row.marketPrice || 0).toFixed(2)) || '-'}</div>
),
},
{
title: '库存',
dataIndex: 'stock',
width: 160,
align: 'center',
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
......
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