Преглед на файлове

Merge branch 'dev' of http://10.2.1.24:10244/bpa/BPA.KitChen.Web into dev

tags/小炒逻辑变更前
yangwenhua преди 2 години
родител
ревизия
8ceb478672
променени са 1 файла, в които са добавени 26 реда и са изтрити 14 реда
  1. +26
    -14
      src/pages/device/deviceRecipeStock/components/CreateForm.jsx

+ 26
- 14
src/pages/device/deviceRecipeStock/components/CreateForm.jsx Целия файл

@@ -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"


Зареждане…
Отказ
Запис