// 库存项信息
import React from 'react';
import {Card, Row, Col, Form, DatePicker, Select, Checkbox, Switch, Input } from 'antd';
import { $http } from 'containers/config/https';
import { Util } from 'tools/index';
import Moment from 'moment';

const { Option } = Select;
const FormItem = Form.Item;
const formItemCheckbox  = {
    labelCol: {span: 14},
    wrapperCol: {span: 10}
};
const formItemItem  = {
    labelCol: {span: 11},
    wrapperCol: {span: 13}
};
class InventoryItemInformationClass extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            language: JSON.parse(window.sessionStorage.userData),
            userInfo: {},
            ChineseEnglishSize: {},
            SelectData: {},
        }
    }

    componentDidMount() {
        this.props.onRef(this);
    }

    render() {
        const { getFieldDecorator } = this.props.form;
        const userInfo = this.props.userInfo;
        const ChineseEnglishSize = this.props.ChineseEnglishSize;
        return (
            <Card
                type="inner"
                title={<div className="card-title-left-icon"><div></div>{ChineseEnglishSize.HosMaterialInfoMaintenanceInventoryItem ? ChineseEnglishSize.HosMaterialInfoMaintenanceInventoryItem.descripts:'库存项'}</div>}
                size="small"
            >
                <Row>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancestockCode ? ChineseEnglishSize.HosMaterialInfoMaintenancestockCode.descripts:'库存项代码：'} {...formItemItem}>
                            {getFieldDecorator('stockCode', {
                                initialValue:  userInfo.stockCode ? userInfo.stockCode : undefined,

                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenanceItemDescription ? ChineseEnglishSize.HosMaterialInfoMaintenanceItemDescription.descripts:'库存项描述：'} {...formItemItem}>
                            {getFieldDecorator('stockDesc', {
                                initialValue:  userInfo.stockDesc ? userInfo.stockDesc : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancestockSpec ? ChineseEnglishSize.HosMaterialInfoMaintenancestockSpec.descripts:'包装规格：'} {...formItemItem}>
                            {getFieldDecorator('stockSpec', {
                                initialValue:  userInfo.stockSpec ? userInfo.stockSpec: undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                </Row>
                <Row>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancepurUnitDesc ? ChineseEnglishSize.HosMaterialInfoMaintenancepurUnitDesc.descripts:'入库单位：'} {...formItemItem}>
                            {getFieldDecorator('purUnitID', {
                                initialValue: userInfo.purUnitDesc ? userInfo.purUnitDesc : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancefactor ? ChineseEnglishSize.HosMaterialInfoMaintenancefactor.descripts:'转换系数：'} {...formItemItem}>
                            {getFieldDecorator('baseFac', {
                                initialValue:  userInfo.baseFac ? userInfo.baseFac : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancebaseUnitDesc ? ChineseEnglishSize.HosMaterialInfoMaintenancebaseUnitDesc.descripts:'基本单位：'} {...formItemItem}>
                            {getFieldDecorator('baseUnitID', {
                                initialValue: userInfo.baseUnitDesc ? userInfo.baseUnitDesc : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                </Row>
                <Row>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenanceimpTypeDesc ? ChineseEnglishSize.HosMaterialInfoMaintenanceimpTypeDesc.descripts:'进口类型：'} {...formItemItem}>
                            {getFieldDecorator('importTypeID', {
                                initialValue:  userInfo.impTypeDesc ? userInfo.impTypeDesc : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancebillFac ? ChineseEnglishSize.HosMaterialInfoMaintenancebillFac.descripts:'转换系数(计价):'} {...formItemItem}>
                            {getFieldDecorator('billFac', {
                                initialValue:  userInfo.billFac ? userInfo.billFac : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancebarCode ? ChineseEnglishSize.HosMaterialInfoMaintenancebarCode.descripts:'条码：'} {...formItemItem}>
                            {getFieldDecorator('barCode', {
                                initialValue:  userInfo.barCode ? userInfo.barCode : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                </Row>
                <Row>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancestkType ? ChineseEnglishSize.HosMaterialInfoMaintenancestkType.descripts:'库存分类：'} {...formItemItem}>
                            {getFieldDecorator('stkSubCatID', {
                                initialValue: userInfo.stkSubCatDesc ? userInfo.stkSubCatDesc : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancequaLevelDesc ? ChineseEnglishSize.HosMaterialInfoMaintenancequaLevelDesc.descripts:'质量层次：'} {...formItemItem}>
                            {getFieldDecorator('quaLevID', {
                                initialValue: userInfo.quaLevelDesc ? userInfo.quaLevelDesc : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancequalityNo ? ChineseEnglishSize.HosMaterialInfoMaintenancequalityNo.descripts:'质标编号'} {...formItemItem}>
                            {getFieldDecorator('qualityNo', {
                                initialValue:  userInfo.qualityNo ? userInfo.qualityNo : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                </Row>
                <Row>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancepriceTypeDesc ? ChineseEnglishSize.HosMaterialInfoMaintenancepriceTypeDesc.descripts:'定价类型：'} {...formItemItem}>
                            {getFieldDecorator('priceTypeID', {
                                initialValue:  userInfo.priceTypeDesc ? userInfo.priceTypeDesc : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancemaxSprice ? ChineseEnglishSize.HosMaterialInfoMaintenancemaxSprice.descripts:'最高售价：'} {...formItemItem}>
                            {getFieldDecorator('maxSp', {
                                initialValue: userInfo.maxSprice ? userInfo.maxSprice : undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                    <Col span={8}>
                        <FormItem label={ChineseEnglishSize.HosMaterialInfoMaintenancepriceFileNo ? ChineseEnglishSize.HosMaterialInfoMaintenancepriceFileNo.descripts:'物价文件号：'} {...formItemItem}>
                            {getFieldDecorator('priceFileNo', {
                                initialValue:  userInfo.priceFileNo ? userInfo.priceFileNo: undefined,
                            })(
                                <Input style={{width: '100%'}} disabled />
                            )}
                        </FormItem>
                    </Col>
                </Row>
            </Card>
        )
    }
};
let InventoryItemInformation = Form.create()(InventoryItemInformationClass);
export default InventoryItemInformation;