Commit 5f31f16c authored by beisir's avatar beisir

feat: 商品库列表库存不可修改&批量上传不可修改

parent e90c9293
......@@ -3,7 +3,7 @@ import React, { Component } from 'react';
import { connect } from 'dva';
import styles from '../style.less';
import { stateList } from '../staticdata';
import { uploadFile } from '../service';
// import { uploadFile } from '../service';
const FormItem = Form.Item;
const { Option } = Select;
......@@ -43,31 +43,31 @@ class goodsManage extends Component {
const iptNumWidth = { width: 118 };
const that = this;
const uploadProps = {
name: 'file',
async customRequest(info) {
const result = await uploadFile(info.file);
if (result && result.businessCode === '0000') {
that.handleSearch();
notification.success({
message: '操作成功',
});
} else {
notification.warning({
message: result.msg,
description: (
<div>
{result.data?.length &&
result.data.map(item => <p>{item.skuNo + item.errSkuMessage}</p>)}
</div>
),
duration: 6,
});
}
},
accept: '.xlsx',
showUploadList: false,
};
// const uploadProps = {
// name: 'file',
// async customRequest(info) {
// const result = await uploadFile(info.file);
// if (result && result.businessCode === '0000') {
// that.handleSearch();
// notification.success({
// message: '操作成功',
// });
// } else {
// notification.warning({
// message: result.msg,
// description: (
// <div>
// {result.data?.length &&
// result.data.map(item => <p>{item.skuNo + item.errSkuMessage}</p>)}
// </div>
// ),
// duration: 6,
// });
// }
// },
// accept: '.xlsx',
// showUploadList: false,
// };
const filterOption = (input, op) => op.props.children.includes(input);
return (
......@@ -144,7 +144,7 @@ class goodsManage extends Component {
<Button type="primary" className={styles.button} onClick={this.addSpu}>
新增商品
</Button>
<Button
{/* <Button
className={styles.button}
type="primary"
icon="download"
......@@ -159,7 +159,7 @@ class goodsManage extends Component {
<Button type="primary" className={styles.button}>
批量库存修改
</Button>
</Upload>
</Upload> */}
</FormItem>
</Form>
);
......
......@@ -106,12 +106,13 @@ export function column() {
align: 'center',
sorter: (a, b) => a.stock - b.stock,
render: (_, row) => {
const stockView =
row.state !== 4 ? (
<a onClick={() => this.openModal(row, 'productStock')}>{row.productStock}</a>
) : (
<span>{row.productStock}</span>
);
// const stockView =
// row.state !== 4 ? (
// <a onClick={() => this.openModal(row, 'productStock')}>{row.productStock}</a>
// ) : (
// <span>{row.productStock}</span>
// );
const stockView = row.productStock;
return (
<>
<p>当前库存:{stockView}</p>
......
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