Commit 23a0c2af authored by 靳野's avatar 靳野

Merge branch 'feature-sku' into feature-sku-2

parents 783cd97c 7ee33fc9
...@@ -65,7 +65,7 @@ export function column(specArr = []) { ...@@ -65,7 +65,7 @@ export function column(specArr = []) {
initialValue={row.stock || 0} initialValue={row.stock || 0}
rules={[{ required: true, message: '请输入库存!' }, { validator: isIntegerNotMust }]} rules={[{ required: true, message: '请输入库存!' }, { validator: isIntegerNotMust }]}
> >
<InputNumber min={1} max={999999} /> <InputNumber min={0} max={999999} />
</Form.Item> </Form.Item>
</div> </div>
), ),
......
...@@ -344,7 +344,7 @@ class goodsManage extends Component { ...@@ -344,7 +344,7 @@ class goodsManage extends Component {
serviceVisbleChange = async row => { serviceVisbleChange = async row => {
const { state, spuId, productType, skuId } = row; const { state, spuId, productType, skuId } = row;
this.setState({ createloading: true }); this.setState({ createloading: true });
const { data, msg } = await spuDetail({ skuId }); // spuId const { data, msg } = await spuDetail({ skuId, id: spuId }, state); // spuId
if (data) { if (data) {
const SourceData = ProcessEditData(data, row); const SourceData = ProcessEditData(data, row);
console.log('index.js=============>', SourceData); console.log('index.js=============>', SourceData);
......
...@@ -59,8 +59,12 @@ export async function apiGetAttribute(categoryId) { ...@@ -59,8 +59,12 @@ export async function apiGetAttribute(categoryId) {
return data; return data;
} }
// 编辑--获取详情 // 编辑--获取详情
export async function spuDetail(params) { export async function spuDetail(params, state) {
return request.post('/api/merchants/products/sku-detail', { let url = '/api/merchants/products/sku-detail';
if (state === 4) {
url = '/api/merchants/products/detail';
}
return request.post(url, {
prefix: goodsApi, prefix: goodsApi,
params, params,
headers, headers,
......
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