Commit 8e89a87c authored by guang.wu's avatar guang.wu

feat: 列表添加供货价和库存展示

parent 19bfcc69
...@@ -8,7 +8,7 @@ import { apiProductBiddingUpdate } from '../../service'; ...@@ -8,7 +8,7 @@ import { apiProductBiddingUpdate } from '../../service';
* 更新供货价 * 更新供货价
* * */ * * */
const UpdatePriceStock = options => { const UpdatePriceStock = options => {
const { visible, skuData, productId } = options; const { visible, skuData, productId, spuName } = options;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [specArr, setSpecArr] = useState([]); // 规格列 const [specArr, setSpecArr] = useState([]); // 规格列
const [form] = Form.useForm(); const [form] = Form.useForm();
...@@ -73,6 +73,7 @@ const UpdatePriceStock = options => { ...@@ -73,6 +73,7 @@ const UpdatePriceStock = options => {
className={styles.priceStockTable} className={styles.priceStockTable}
destroyOnClose destroyOnClose
> >
<div className={styles.modalTitle}>{spuName}</div>
<Form form={form} scrollToFirstError component={false}> <Form form={form} scrollToFirstError component={false}>
<EditableContext.Provider value={form}> <EditableContext.Provider value={form}>
<Table <Table
......
...@@ -35,6 +35,7 @@ class supplyPriceUpdate extends Component { ...@@ -35,6 +35,7 @@ class supplyPriceUpdate extends Component {
visibleUpdatePrice: false, // 修改价格弹窗 visibleUpdatePrice: false, // 修改价格弹窗
skuPriceStockList: [], // 修改价格弹窗数据 skuPriceStockList: [], // 修改价格弹窗数据
spuId: '', spuId: '',
spuName: '',
}; };
currentLog = null; currentLog = null;
...@@ -250,6 +251,7 @@ class supplyPriceUpdate extends Component { ...@@ -250,6 +251,7 @@ class supplyPriceUpdate extends Component {
}} }}
skuData={this.state.skuPriceStockList} skuData={this.state.skuPriceStockList}
productId={this.state.spuId} productId={this.state.spuId}
spuName={this.state.spuName}
refresh={this.handleSearch} refresh={this.handleSearch}
/> />
)} )}
......
...@@ -102,6 +102,7 @@ export function columnManage() { ...@@ -102,6 +102,7 @@ export function columnManage() {
dataIndex: 'stock', dataIndex: 'stock',
width: 160, width: 160,
align: 'center', align: 'center',
render: (_, row) => <div>{row.stock || '-'}</div>,
}, },
{ {
title: '操作', title: '操作',
......
.priceStockTable { .priceStockTable {
:global(.ant-modal-body) {
padding: 0 15px !important;
}
:global(.ant-table-cell) { :global(.ant-table-cell) {
padding: 5px 0 0 0 !important; padding: 5px 0 0 0 !important;
line-height: 32px !important; line-height: 32px !important;
vertical-align: top !important; vertical-align: top !important;
} }
} }
.modalTitle {
height: 40px;
line-height: 40px;
}
.hidden { .hidden {
width: 0; width: 0;
height: 0; height: 0;
......
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