|
|
@@ -1,6 +1,6 @@ |
|
|
|
import React, { useState, useEffect } from 'react'; |
|
|
|
import { InputNumber, Modal, Form, Input, Button, Select } from 'antd'; |
|
|
|
import { GetBatchingAsync,GetProductListByBom } from '../services'; |
|
|
|
import { GetBatchingAsync, GetProductListByBom } from '../services'; |
|
|
|
|
|
|
|
const CreateForm = (props) => { |
|
|
|
const { Option, OptGroup } = Select; |
|
|
@@ -9,18 +9,18 @@ const CreateForm = (props) => { |
|
|
|
//初始化数据 |
|
|
|
useEffect(() => { |
|
|
|
const initBatching = () => { |
|
|
|
|
|
|
|
if(props.isbom){ |
|
|
|
GetProductListByBom({ DeviceId: props.DeviceId,BomIds:props.bomIds }).then((data) => { |
|
|
|
setBatchingList(data.data); |
|
|
|
}); |
|
|
|
|
|
|
|
}else { |
|
|
|
GetBatchingAsync({ DeviceId: props.DeviceId }).then((data) => { |
|
|
|
setBatchingList(data.data); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (props.isbom) { |
|
|
|
GetProductListByBom({ DeviceId: props.DeviceId, BomIds: props.bomIds }).then((data) => { |
|
|
|
setBatchingList(data.data); |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
GetBatchingAsync({ DeviceId: props.DeviceId }).then((data) => { |
|
|
|
setBatchingList(data.data); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
initBatching(); |
|
|
|
}, []); |
|
|
@@ -70,7 +70,19 @@ const CreateForm = (props) => { |
|
|
|
rules={[{ required: true }]} |
|
|
|
defaultValue="0" |
|
|
|
> |
|
|
|
<Input placeholder="输入库存位置编码" /> |
|
|
|
<Select placeholder="请选择库存位置" > |
|
|
|
{ |
|
|
|
(() => { |
|
|
|
const selectArray = []; |
|
|
|
for (let index = 1; index <= 14; index++) { |
|
|
|
selectArray.push(<Select.Option index={index} value={index} key={index}> |
|
|
|
{index} |
|
|
|
</Select.Option>); |
|
|
|
} |
|
|
|
return selectArray; |
|
|
|
})() |
|
|
|
} |
|
|
|
</Select> |
|
|
|
</Form.Item> |
|
|
|
<Form.Item |
|
|
|
name="batching_Count" |
|
|
|