// 物资库存项维护
import React from 'react';
import { Card, Row, Col, Form, DatePicker, Select, Button, Modal, Table, Switch, message, Pagination, Input  } from 'antd';
import ColumnAuthoritysModel from 'pages/columnAuthority/ColumnAuthoritysModel';
import { $http } from 'containers/config/https';
import CommonPagination from 'components/pagination/index';
import './style/index.less';
import Moment from 'moment';
import store from 'store';

const { Option } = Select;
const FormItem = Form.Item;
const formItemLayout = {    // label 和input宽度
    labelCol: { span:8 },
    wrapperCol: { span: 16 },
};
const formItemCheckbox  = {
    labelCol: {span: 14},
    wrapperCol: {span: 10}
};
const formItemItem  = {
    labelCol: {span: 11},
    wrapperCol: {span: 13}
};
const InventoryItemMaintenance = Form.create()(
    class extends React.Component {
        constructor() {
            super();
            this.state = {
                userInfo: {}, //表单数据详情
                SelectData: {}, //下拉数据
                WaListData: [], //物资库存项列表数据
                pageSize: 10,
                page: 1,
                total:0,
                rowKey: '', //行选中id
                ChineseEnglishSize:{},
                columns:[],
                columnsWidth:'',
                language:JSON.parse(window.sessionStorage.userData),
                saveAs: true, //另存
                visible: false, //最大库存弹窗
                prefixText: '', //最大代码
            }
            // 库存单的数据表头
            this.columns = [

                {
                    key: 1,
                    title: '代码',
                    dataIndex: 'stockCode',
                    align: "center",
                    width: '10%'
                },
                {
                    key: 2,
                    title: '名称',
                    dataIndex: 'stockDesc',
                    align: "center",
                    width: '10%'
                },
                {
                    key: 3,
                    title: '规格',
                    dataIndex: 'stockSpec',
                    align: "center",
                    width: '10%'
                },
                {
                    key: 4,
                    title: '入库单位',
                    dataIndex: 'purUnitDesc',
                    align: "center",
                    width: '10%'
                },
                {
                    key: 5,
                    title: '售价(入库单位)',
                    dataIndex: 'outSpAmt',
                    align: "center",
                    width: '10%'
                },
                {
                    key: 6,
                    title: '基本单位',
                    dataIndex: 'baseUnitDesc',
                    align: "center",
                    width: '10%'
                },
                {
                    key: 7,
                    title: '库存分类',
                    dataIndex: 'stkSubCatDesc',
                    align: "center",
                    width: '10%',
                },
                {
                    key: 8,
                    title: '创建日期',
                    dataIndex: 'qty',
                    align: "center",
                    width: '10%'
                },
                {
                    key: 9,
                    title: '更新日期',
                    dataIndex: 'outQty',
                    align: "center",
                    width: '10%'
                },

                {
                    key: 10,
                    title: '不可用',
                    dataIndex: 'inSpAmt',
                    align: "center",
                    width: '10%'
                }
            ]
        }

        componentDidMount() {
            // 初始化数据
            this.getTacitlyApproveData();
            this.getDetailTableColumns();
            let leftList = document.querySelectorAll('.InventoryItem  .ant-table-body');
            if(leftList.length>0){
                leftList[0].style.height = store.getState().tableHeight.y  + 'px';
            }
        }

         // 获取明系列表头数据
	    getDetailTableColumns = () => {
            let {language} = this.state;
            let data = {
                params: [{
                    reactCode: ['MaterialInventoryItemMaintenan'],
                    compontName: 'MaterialInventoryItemMaintenan',
                    type: 'C',
                }]
            }
            $http.post('urlS', this, {
                code: '01040073',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        let arr = res.result.C&&res.result.C.length > 0 ? JSON.parse(JSON.stringify(res.result.C)).map((item, index) => {
                            return  {
                                ...item,
                                key: index + 1,
								title: <div onDoubleClick={() => {this.columnRef.onOpenModel();}}>{language.language== 'EN' ? item.enDescripts : item.title}</div>,
                            }
                        }) : '';
                        let filterArr = arr.filter(function(item){ return item.display === 'Y'});
                        this.setState({columns:filterArr, columnsWidth: res.totalWidth,ChineseEnglishSize:language.language=='EN' ? res.result.language.EN : res.result.language.CN})
                    }
                }
            });
        };

        componentWillUnmount() {
            // 组件销毁前将静止让setState修改state的状态，防止内存泄漏
            this.setState = (state,callback)=>{ return; }
        }

        //清空表格内容
        resetFields = () => {
            this.props.form.resetFields();
            this.setState({userInfo: {}, rowKey: '',saveAs: true, prefixText: ''});
        };
        handleReset=()=> {
            this.resetFields();
            this.setState({WaListData: [],total: 0});
        }

        // 获取界面默认值
        getTacitlyApproveData() {
            let data = {
                params: []
            };
            // 获取下拉数据
            $http.post('urlS', this, {
                code: "02060001",
                data: data,
                success: function (res) {
                    if (+res.errorCode == 0) {
                        this.setState({SelectData: res})
                    }
                }
            })
        }
        searchInformation=()=>{
            this.setState({page: 1},()=>{
                this.getDeadStockList()
            })
        };
        // 获取物资列表数据
        getDeadStockList=()=>{
            let {ChineseEnglishSize} = this.state;
            this.setState({loading: true, prefixText: ''});
            let code = this.props.form.getFieldValue('code');
            let desc = this.props.form.getFieldValue('desc');
            let stockAlias = this.props.form.getFieldValue('stockAlias');
            let stkSubCatID = this.props.form.getFieldValue('stkSubCatIDTitle');
            let stkCatID = this.props.form.getFieldValue('stkCatID');
            let data = {
                params: [{
                    code: code ? code : '',	//代码
                    desc: desc? desc: '',	//描述
                    stockAlias: stockAlias ? stockAlias : '', //别名
                    stkSubCatID: stkSubCatID? stkSubCatID : '', //库存子类
                    stkCatID: stkCatID ? stkCatID : '' //库存大类
                }],
                pagination: [
                    {
                        pageSize:this.state.pageSize,
                        currentPage:this.state.page,
                        sort:"ID",
                        dir:"asc",
                    }
                ],
            };
            $http.post('urlS', this, {
                code: "02060003",
                data: data,
                success: function (res) {
                    if(res.errorCode==0 && res.result.rows.length > 0){
                        for(let i = 0; i < res.result.rows.length; i++){
                            res.result.rows[i].key = i;
                        }
                        this.setState({ WaListData: res.result.rows, total: res.result.total, loading: false});
                    }else {
                        this.setState({ WaListData: []});
                        message.error(ChineseEnglishSize.MaterialInventoryItemMaintenannoData ? ChineseEnglishSize.MaterialInventoryItemMaintenannoData.descripts:"没数据");
                        // this.props.form.resetFields();
                    }
                }
            });
        };

        //保存
        saveData=()=>{
            this.setState({saveAs: true});
            this.props.form.validateFields((error, value)=> {
                let obj = JSON.parse(JSON.stringify(value));
                if(error == null){
                    let data = {
                        params: [
                            {
                                stock: {
                                    "stockID": this.state.saveAs ? this.state.userInfo.stockID ? this.state.userInfo.stockID : undefined : undefined,	//物资id(修改需要的id)
                                    "stockCode": obj.stockCode ? obj.stockCode : undefined,	//物资代码
                                    "stockDesc": obj.stockDesc ? obj.stockDesc : undefined,	//物资描述
                                    "stockSpec": obj.stockSpec ? obj.stockSpec : undefined,	//规格
                                    "barCode": obj.barCode ? obj.barCode : undefined,	//条形码
                                    "baseUnitID": obj.baseUnitID ? obj.baseUnitID : undefined,	//基本单位id
                                    "purUnitID":  obj.purUnitID ? obj.purUnitID : undefined,	//入库单位id
                                    "stkSubCatID":  obj.stkSubCatID ? obj.stkSubCatID : undefined,		//库存子类id
                                    "importTypeID":  obj.importTypeID ? obj.importTypeID : undefined,	//进口类型id
                                    "quaLevID": obj.quaLevID ? obj.quaLevID : undefined,	//质量层次ID
                                    "qualityNo":  obj.qualityNo ? obj.qualityNo : undefined,	//质标编号
                                    "priceTypeID":  obj.priceTypeID ? obj.priceTypeID : undefined,	//定价类型ID
                                    "maxSp":  obj.maxSp ? obj.maxSp : undefined,	//最高售价
                                    "priceFileNo":  obj.priceFileNo ? obj.priceFileNo : undefined,	//物价文件号
                                    "baseFac":  obj.baseFac ? obj.baseFac : undefined,	//转换系数
                                    "billFac":  obj.billFac ? obj.billFac : undefined,	//转换系数 计价

                                    "minTemp": obj.minTemp ? obj.minTemp : undefined,
                                    "maxTemp": obj.maxTemp ? obj.maxTemp : undefined,
                                    "minHumidity": obj.minHumidity ? obj.minHumidity : undefined,
                                    "maxHumidity": obj.maxHumidity ? obj.maxHumidity : undefined,
                                    "commonTemp": obj.commonTemp ? obj.commonTemp : undefined,
                                    "dry": obj.dry ? obj.dry : undefined,
                                    "airtight": obj.airtight ? obj.airtight : undefined,
                                    "dark": obj.dark ? obj.dark : undefined,
                                    "radiation": obj.radiation ? obj.radiation : undefined,
                                    "seal": obj.seal ? obj.seal : undefined,
                                    "gloomyCool": obj.gloomyCool ? obj.gloomyCool : undefined,
                                    "meltPack": obj.meltPack ? obj.meltPack : undefined,
                                    "coldST": obj.coldST ? obj.coldST : undefined,
                                    "freeze": obj.freeze ? obj.freeze : undefined,
                                    "dampProof": obj.dampProof ? obj.dampProof : undefined
                                }
                            }
                        ]
                    };
                    $http.post('urlS', this, {
                        code: "02060002",
                        data: data,
                        success: function (res) {
                            if(res.errorCode == 0) {
                                message.success(res.errorMessage);
                                this.resetFields();
                                this.getDeadStockList();
                            }
                        }
                    });
                }
            })
        }

        // 另存一天数据
        saveAsData=()=>{
            this.setState({saveAs: false},()=>{
                this.saveData();
            })
        }

        //获取最大代码
        saveMaxInventory=()=>{
            let stkSubCatIDPopup = this.props.form.getFieldValue('stkSubCatIDPopup');
            let prefix = this.props.form.getFieldValue('prefix');
            if(!prefix){
                message.error('请输入前缀');
                return
            }
            let data = {
                params: [{
                    preCode: prefix ? prefix : '',//前缀
                    stkSubCatID: stkSubCatIDPopup ? stkSubCatIDPopup : '', //库存子类
                }]
            };
            $http.post('urlS', this, {
                code: "02060181",
                data: data,
                success: function (res) {
                    if(res.errorCode==0){
                        this.setState({ prefixText: res.result});
                        message.success(res.errorMessage)
                        this.handleCancel();
                    }else {
                        this.setState({ prefixText: []});
                        message.error(res.errorMessage);
                    }
                }
            });
        }
        // 设置行属性
        onClickRow = (record) => {
            return {
                // 单击行选中
                onClick: (e) => {
                    e.stopPropagation();
                    // this.resetFields();
                    this.setState({prefixText: ''})
                    if (this.state.rowKey === '') {
                        // 保存行数据以及ID
                        this.setState({rowKey: record.stockID});
                        this.materialInfoData(record.stockID);
                    } else {
                        if (this.state.rowKey !== record.stockID) {
                            this.setState({rowKey: record.stockID});
                            this.materialInfoData(record.stockID);
                        } else {
                            this.setState({rowKey: '', userInfo: {}, saveAs: true});
                            this.resetFields();
                            // this.childDesc.resetFields();
                        }
                    }
                }
            }
        };

        // 表格行的类名
        setRowClassName = (record) => {
            return record.stockID === this.state.rowKey ? 'clickRowStyle' : '';
        };

        materialInfoData=(id)=>{

            let data = {
                params: [
                    {
                        stockID: id
                    }
                ]
            };
            $http.post('urlS', this, {
                code: "02060004",
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        console.log('res',res);
                        this.setState({userInfo: res.result})
                    }
                }
            })

        };
        // 页码改变的回调，参数是改变后的页码及每页条数 库存单
        onChange = (page, pageSize) => {
            this.setState({page: page, pageSize: this.state.pageSize}, () => {
                // 重新调用查询方法
                this.getDeadStockList();
            });
        };

        onShowSizeChange = (current, size) => {
            this.setState({page: current, pageSize: size}, () => {
                // 重新调用查询方法
                this.onChange(current,size);
            })
        };

        // 显示分页总条数
        showTotal(total) {
            return `共 ${total} 条`;
        }
        //组件权限编辑器
        onColumnRef = (ref) => {
            this.columnRef = ref;
        };
        // 关闭弹窗
        handleCancel = (e) => {
            this.setState({
                visible: false,
            });
        };
        onKeyCheck=(v)=>{
            if(v.keyCode === 13){
                this.searchInformation();
            }
        }
        render() {
            const { getFieldDecorator } = this.props.form;
            const {SelectData, userInfo,ChineseEnglishSize,columns, columnsWidth} = this.state;
            // 入库单位
            let purUnitIDOption = SelectData&&SelectData.unit&&SelectData.unit.map((item, index) => {
                return (<Option key={index} value={item.id} title={item.descripts} seatchprop={item.descripts + '^' + item.descriptsSPCode}>{item.descripts}</Option>)
            })
            // 基本单位
            let baseUnitIDOption = SelectData&&SelectData.unit&&SelectData.unit.map((item, index) => {
                return (<Option key={index} value={item.id} title={item.descripts} seatchprop={item.descripts + '^' + item.descriptsSPCode}>{item.descripts}</Option>)
            })
            // 库存分类
            let stkSubCatIDOption = SelectData&&SelectData.stkSubCat&&SelectData.stkSubCat.map((item, index) => {
                return (<Option key={index} value={item.id} title={item.descripts} seatchprop={item.descripts + '^' + item.descriptsSPCode}>{item.descripts}</Option>)
            })
            // 质量层次
            let quaLevIDOption = SelectData&&SelectData.qualityLevel&&SelectData.qualityLevel.map((item, index) => {
                return (<Option key={index} value={item.id} title={item.descripts} seatchprop={item.descripts + '^' + item.descriptsSPCode}>{item.descripts}</Option>)
            })
            // 定价类型
            let priceTypeIDOption = SelectData&&SelectData.priceType&&SelectData.priceType.map((item, index) => {
                return (<Option key={index} value={item.id} title={item.descripts} seatchprop={item.descripts + '^' + item.descriptsSPCode}>{item.descripts}</Option>)
            })
            // 进口类型
            let criticalOption = SelectData&&SelectData.importType&&SelectData.importType.map((item, index) => {
                return (<Option key={index} value={item.id} title={item.descripts} seatchprop={item.descripts + '^' + item.descriptsSPCode}>{item.descripts}</Option>)
            })
            return (
                <div className="InventoryItemMaintenance">
                    <Col span={12}>
                        <Row>
                            <Card
                                size="small"
                                title={<div className="card-title-left-icon"><div></div>{ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialList ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialList.descripts:'物资库存项列表'}</div>}
                            >
                                <Col span={20}>
                                    <Row >
                                        <Col span={8}>
                                            <FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialCode ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialCode.descripts:'物资编码'}>
                                                {getFieldDecorator('code',{
                                                    initialValue: undefined,
                                                    rules:[{ required : false, message: '物资编码不能为空'}]
                                                })(
                                                    <Input onKeyDown={this.onKeyCheck} />
                                                ) }
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialName ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialName.descripts:'物资名称'}>
                                                {getFieldDecorator('desc',{
                                                    initialValue: undefined,
                                                    rules:[{ required : false, message: '物资名称不能为空'}]
                                                })(
                                                    <Input  onKeyDown={this.onKeyCheck}  />
                                                ) }
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialAlia ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialAlia.descripts:'物资别名'}>
                                                {getFieldDecorator('stockAlias',{
                                                    initialValue: undefined,
                                                    rules:[{ required : false, message: '物资别名不能为空'}]
                                                })(
                                                    <Input  onKeyDown={this.onKeyCheck}  />
                                                ) }
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row >
                                        <Col span={8}>
                                            <FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanStkCat ? ChineseEnglishSize.MaterialInventoryItemMaintenanStkCat.descripts:'库存大类'}>
                                                {getFieldDecorator('stkCatID',{
                                                    initialValue: undefined,
                                                    rules:[{ required : false, message: '库存大类不能为空'}]
                                                })(
                                                    <Select allowClear style={{width: '100%'}}>
                                                    {this.state.SelectData.stkCat && this.state.SelectData.stkCat.map(item => {
                                                        return <Option value={item.id} key={item.id} title={item.descripts} seatchprop={item.descripts}>{item.descripts}</Option>
                                                    })}
                                                    </Select>
                                                ) }
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID ? ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID.descripts:'库存子类'}>
                                                {getFieldDecorator('stkSubCatIDTitle',{
                                                    initialValue:undefined,
                                                    rules:[{ required : false, message: '库存子类不能为空'}]
                                                })(
                                                    <Select allowClear style={{width: '100%'}}>
                                                        {this.state.SelectData.stkSubCat && this.state.SelectData.stkSubCat.map(item => {
                                                            return <Option value={item.id} key={item.id} title={item.descripts} seatchprop={item.descripts}>{item.descripts}</Option>
                                                        })}
                                                    </Select>
                                                ) }
                                            </FormItem>
                                        </Col>
                                        {/*<Col span={8}>*/}
                                            {/*<FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanstatisticalMethods ? ChineseEnglishSize.MaterialInventoryItemMaintenanstatisticalMethods.descripts:'统计方式'}>*/}
                                                {/*{getFieldDecorator('stkSubCatID4',{*/}
                                                    {/*initialValue: undefined,*/}
                                                    {/*rules:[{ required : false, message: '统计方式不能为空'}]*/}
                                                {/*})(*/}
                                                    {/*<Select allowClear style={{width: '100%'}}>*/}
                                                        {/*{this.state.SelectData.stkSubCat && this.state.SelectData.stkSubCat.map(item => {*/}
                                                            {/*return <Option value={item.id} key={item.id} title={item.descripts} seatchprop={item.descripts}>{item.descripts}</Option>*/}
                                                        {/*})}*/}
                                                    {/*</Select>*/}
                                                {/*) }*/}
                                            {/*</FormItem>*/}
                                        {/*</Col>*/}
                                    </Row>
                                    {/*<Row>*/}
                                        {/*<Col span={8}>*/}
                                            {/*<FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenandateOfFiling ? ChineseEnglishSize.MaterialInventoryItemMaintenandateOfFiling.descripts:'建档日期'}>*/}
                                                {/*{getFieldDecorator('stkSubCatID45',{*/}
                                                    {/*initialValue: undefined,*/}
                                                    {/*rules:[{ required : false, message: '建档日期不能为空'}]*/}
                                                {/*})(*/}
                                                    {/*<Select allowClear style={{width: '100%'}}>*/}
                                                        {/*{this.state.SelectData.stkSubCat && this.state.SelectData.stkSubCat.map(item => {*/}
                                                            {/*return <Option value={item.id} key={item.id} title={item.descripts} seatchprop={item.descripts}>{item.descripts}</Option>*/}
                                                        {/*})}*/}
                                                    {/*</Select>*/}
                                                {/*) }*/}
                                            {/*</FormItem>*/}
                                        {/*</Col>*/}
                                        {/*<Col span={8}>*/}
                                            {/*<FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanupdatedDate ? ChineseEnglishSize.MaterialInventoryItemMaintenanupdatedDate.descripts:'更新日期'}>*/}
                                                {/*{getFieldDecorator('stkSubCatID5',{*/}
                                                    {/*initialValue: undefined,*/}
                                                    {/*rules:[{ required : false, message: '更新日期不能为空'}]*/}
                                                {/*})(*/}
                                                    {/*<Select allowClear style={{width: '100%'}}>*/}
                                                        {/*{this.state.SelectData.stkSubCat && this.state.SelectData.stkSubCat.map(item => {*/}
                                                            {/*return <Option value={item.id} key={item.id} title={item.descripts} seatchprop={item.descripts}>{item.descripts}</Option>*/}
                                                        {/*})}*/}
                                                    {/*</Select>*/}
                                                {/*) }*/}
                                            {/*</FormItem>*/}
                                        {/*</Col>*/}
                                    {/*</Row>*/}
                                </Col>
                                <Col style={{textAlign: 'center'}} span={4}>
                                    <Row>
                                        <Button onClick={this.searchInformation}>{ChineseEnglishSize.MaterialInventoryItemMaintenansearch ? ChineseEnglishSize.MaterialInventoryItemMaintenansearch.descripts:'查询'}</Button>
                                    </Row>
                                    <Row style={{marginTop: '20px'}}>
                                        <Button type="primary" onClick={this.handleReset}>{ChineseEnglishSize.MaterialInventoryItemMaintenanclean ? ChineseEnglishSize.MaterialInventoryItemMaintenanclean.descripts:'清屏'}</Button>
                                    </Row>
                                </Col>

                            </Card>
                        </Row>
                        <Row>
                            <Col>
                                <Card
                                    size="small"
                                    title={<div className="card-title-left-icon"><div></div>{ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialListDetail ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaterialListDetail.descripts:'物资库存项列表明细'}</div>}
                                >
                                    <div>
                                        <Table
                                            columns={columns.length>0?columns:this.columns}
                                            dataSource={this.state.WaListData}
                                            pagination={false}
                                            bordered
                                            scroll={{x: columnsWidth? columnsWidth : 1000, y: store.getState().tableHeight.y -70 }}
                                            rowKey={record => record.key}
                                            onRow={this.onClickRow}
                                            rowClassName={this.setRowClassName}
                                            className="InventoryItem"
                                        />
                                        <CommonPagination size='small' current={this.state.page} total={this.state.total} search= 'search'
                                                          onShowSizeChange={this.onShowSizeChange.bind(this)} complete={true} dataSource={this.state.WaListData}
                                                          loading={this.state.loading} onChange={this.onChange.bind(this)} />
                                    </div>
                                </Card>
                            </Col>
                        </Row>
                    </Col>
                    <Col span={12}>
                        <Col style={{height: store.getState().tableHeight.y +180 + 'px', overflow: 'auto'}}>
                            <Form>
                                <Card
                                    type="inner"
                                    title={<div className="card-title-left-icon"><div></div>{ChineseEnglishSize.MaterialInventoryItemMaintenanstockID ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockID.descripts:'库存项'}</div>}
                                    size="small"
                                >
                                    <Row>
                                        <Col span={8} className='maxInventory'>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanstockCode ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockCode.descripts:'库存项代码：'} {...formItemItem}>
                                                {getFieldDecorator('stockCode', {
                                                    initialValue: this.state.prefixText ? this.state.prefixText : userInfo.stockCode ? userInfo.stockCode : undefined,
                                                     rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanstockCode ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockCode.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanstockCode ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockCode.message:'请输入库存项代码'}]  
                                                })(
                                                  <Input style={{width: '100%'}} />
                                                )}
                                            </FormItem>
                                            <a className='max' onClick={()=>{if(this.state.rowKey){this.setState({visible: true})}}}>{ChineseEnglishSize.MaterialInventoryItemMaintenanmaxCode ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaxCode.descripts:'最大码：'}</a>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanstockDesc ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockDesc.descripts:'库存项描述：'} {...formItemItem}>
                                                {getFieldDecorator('stockDesc', {
                                                    initialValue:  userInfo.stockDesc ? userInfo.stockDesc : undefined,
                                                    rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanstockDesc ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockDesc.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanstockDesc ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockDesc.message:'请输入库存项描述'}] 
                                                })(
                                                    <Input style={{width: '100%'}} />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanstockSpec ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockSpec.descripts:'包装规格：'} {...formItemItem}>
                                                {getFieldDecorator('stockSpec', {
                                                    initialValue:  userInfo.stockSpec ? userInfo.stockSpec: undefined,
                                                    rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanstockSpec ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockSpec.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanstockSpec ? ChineseEnglishSize.MaterialInventoryItemMaintenanstockSpec.message:'请输入包装规格'}] 
                                                })(
                                                    <Input style={{width: '100%'}} />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanpurUnitID ? ChineseEnglishSize.MaterialInventoryItemMaintenanpurUnitID.descripts:'入库单位：'} {...formItemItem}>
                                                {getFieldDecorator('purUnitID', {
                                                    initialValue: userInfo.purUnitID ? userInfo.purUnitID : undefined,
                                                    rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanpurUnitID ? ChineseEnglishSize.MaterialInventoryItemMaintenanpurUnitID.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanpurUnitID ? ChineseEnglishSize.MaterialInventoryItemMaintenanpurUnitID.message:'请选择入库单位'}]  
                                                })(
                                                    <Select style={{width: '100%'}} showSearch optionFilterProp="seatchprop" allowClear>
                                                        {purUnitIDOption}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanbaseFac ? ChineseEnglishSize.MaterialInventoryItemMaintenanbaseFac.descripts:'转换系数：'} {...formItemItem}>
                                                {getFieldDecorator('baseFac', {
                                                    initialValue:  userInfo.baseFac ? userInfo.baseFac : undefined,
                                                    rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanbaseFac ? ChineseEnglishSize.MaterialInventoryItemMaintenanbaseFac.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanbaseFac ? ChineseEnglishSize.MaterialInventoryItemMaintenanbaseFac.message:'请输入转换系数'}]  
                                                })(
                                                    <Input style={{width: '100%'}} />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanbaseUnitID ? ChineseEnglishSize.MaterialInventoryItemMaintenanbaseUnitID.descripts:'基本单位：'} {...formItemItem}>
                                                {getFieldDecorator('baseUnitID', {
                                                    initialValue: userInfo.baseUnitID ? userInfo.baseUnitID : undefined,
                                                    rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanbaseUnitID ? ChineseEnglishSize.MaterialInventoryItemMaintenanbaseUnitID.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanbaseUnitID ? ChineseEnglishSize.MaterialInventoryItemMaintenanbaseUnitID.message:'请选择基本单位'}] 
                                                })(
                                                    <Select style={{width: '100%'}} showSearch optionFilterProp="seatchprop" allowClear>
                                                        {baseUnitIDOption}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanimportTypeID ? ChineseEnglishSize.MaterialInventoryItemMaintenanimportTypeID.descripts:'进口类型：'} {...formItemItem}>
                                                {getFieldDecorator('importTypeID', {
                                                    initialValue:  userInfo.importTypeID ? userInfo.importTypeID : undefined,
                                                })(
                                                    <Select style={{width: '100%'}} showSearch optionFilterProp="seatchprop" allowClear>
                                                        {criticalOption}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        {/*<Col span={8}>*/}
                                            {/*<FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanbillFac ? ChineseEnglishSize.MaterialInventoryItemMaintenanbillFac.descripts:'转换系数(计价)：'} {...formItemItem}>*/}
                                                {/*{getFieldDecorator('billFac', {*/}
                                                    {/*initialValue:  userInfo.billFac ? userInfo.billFac : undefined,*/}
                                                    {/*rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanbillFac ? ChineseEnglishSize.MaterialInventoryItemMaintenanbillFac.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanbillFac ? ChineseEnglishSize.MaterialInventoryItemMaintenanbillFac.message:'请输入转换系数(计价)'}]  */}
                                                {/*})(*/}
                                                    {/*<Input style={{width: '100%'}} type="number" className="input-number" />*/}
                                                {/*)}*/}
                                            {/*</FormItem>*/}
                                        {/*</Col>*/}
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanpriceFileNo ? ChineseEnglishSize.MaterialInventoryItemMaintenanpriceFileNo.descripts:'物价文件号：'} {...formItemItem}>
                                                {getFieldDecorator('priceFileNo', {
                                                    initialValue:  userInfo.priceFileNo ? userInfo.priceFileNo: undefined,
                                                })(
                                                    <Input style={{width: '100%'}} />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanbarCode ? ChineseEnglishSize.MaterialInventoryItemMaintenanbarCode.descripts:'条码：'} {...formItemItem}>
                                                {getFieldDecorator('barCode', {
                                                    initialValue:  userInfo.barCode ? userInfo.barCode : undefined,
                                                })(
                                                    <Input style={{width: '100%'}} />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID ? ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID.descripts:'库存分类：'} {...formItemItem}>
                                                {getFieldDecorator('stkSubCatID', {
                                                    initialValue: userInfo.stkSubCatID ? userInfo.stkSubCatID : undefined,
                                                    rules:[{ required : ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID ? ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID.required =='Y'? true:false: false, message: ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID ? ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID.message:'请选择库存分类'}] 
                                                })(
                                                    <Select style={{width: '100%'}} showSearch optionFilterProp="seatchprop" allowClear>
                                                        {stkSubCatIDOption}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanquaLevID ? ChineseEnglishSize.MaterialInventoryItemMaintenanquaLevID.descripts:'质量层次：'} {...formItemItem}>
                                                {getFieldDecorator('quaLevID', {
                                                    initialValue: userInfo.quaLevID ? userInfo.quaLevID : undefined,
                                                })(
                                                    <Select style={{width: '100%'}} showSearch optionFilterProp="seatchprop" allowClear>
                                                        {quaLevIDOption}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanqualityNo ? ChineseEnglishSize.MaterialInventoryItemMaintenanqualityNo.descripts:'质标编号：'} {...formItemItem}>
                                                {getFieldDecorator('qualityNo', {
                                                    initialValue:  userInfo.qualityNo ? userInfo.qualityNo : undefined,
                                                })(
                                                    <Input style={{width: '100%'}} />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanpriceTypeID ? ChineseEnglishSize.MaterialInventoryItemMaintenanpriceTypeID.descripts:'定价类型：'} {...formItemItem}>
                                                {getFieldDecorator('priceTypeID', {
                                                    initialValue:  userInfo.priceTypeID ? userInfo.priceTypeID : undefined,
                                                })(
                                                    <Select style={{width: '100%'}} showSearch optionFilterProp="seatchprop" allowClear>
                                                        {priceTypeIDOption}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanmaxSp ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaxSp.descripts:'最高售价：'} {...formItemItem}>
                                                {getFieldDecorator('maxSp', {
                                                    initialValue: userInfo.maxSp ? userInfo.maxSp : undefined,
                                                })(
                                                    <Input style={{width: '100%'}} type="number" className="input-number" />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Card>
                                <Card
                                    type="inner"
                                    title={<div className="card-title-left-icon"><div></div>{ChineseEnglishSize.MaterialInventoryItemMaintenanstorageCondition ? ChineseEnglishSize.MaterialInventoryItemMaintenanstorageCondition.descripts:'存储条件'}</div>}
                                    size="small"
                                >
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanminTemp ? ChineseEnglishSize.MaterialInventoryItemMaintenanminTemp.descripts:'最低温度(°C):'} {...formItemItem}>
                                                {getFieldDecorator('minTemp', {
                                                    initialValue:  userInfo.minTemp ? userInfo.minTemp : undefined,
                                                })(
                                                    <Input style={{width: '100%'}} type="number" className="input-number" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenancommonTemp ? ChineseEnglishSize.MaterialInventoryItemMaintenancommonTemp.descripts:'常温：'} {...formItemCheckbox}>
                                                {getFieldDecorator('commonTemp', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.commonTemp === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanradiation ? ChineseEnglishSize.MaterialInventoryItemMaintenanradiation.descripts:'防辐射：'} {...formItemCheckbox}>
                                                {getFieldDecorator('radiation', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.radiation === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenancoldST ? ChineseEnglishSize.MaterialInventoryItemMaintenancoldST.descripts:'冷藏：'} {...formItemCheckbox}>
                                                {getFieldDecorator('coldST', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.coldST === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanmaxTemp ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaxTemp.descripts:'最高温度(°C):'} {...formItemItem}>
                                                {getFieldDecorator('maxTemp', {
                                                    initialValue: userInfo.maxTemp ? userInfo.maxTemp : undefined,
                                                })(
                                                    <Input style={{width: '100%'}} type="number" className="input-number" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenandry ? ChineseEnglishSize.MaterialInventoryItemMaintenandry.descripts:'干燥：'} {...formItemCheckbox}>
                                                {getFieldDecorator('dry', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.dry === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanseal ? ChineseEnglishSize.MaterialInventoryItemMaintenanseal.descripts:'熔封：'} {...formItemCheckbox}>
                                                {getFieldDecorator('seal', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.seal === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanfreeze ? ChineseEnglishSize.MaterialInventoryItemMaintenanfreeze.descripts:'冷冻：'} {...formItemCheckbox}>
                                                {getFieldDecorator('freeze', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.freeze === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanminHumidity ? ChineseEnglishSize.MaterialInventoryItemMaintenanminHumidity.descripts:'最低湿度：'} {...formItemItem}>
                                                {getFieldDecorator('minHumidity', {
                                                    initialValue: userInfo.minHumidity ? userInfo.minHumidity : undefined,
                                                })(
                                                    <Input style={{width: '100%'}} type="number" className="input-number" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanairtight ? ChineseEnglishSize.MaterialInventoryItemMaintenanairtight.descripts:'封闭：'} {...formItemCheckbox}>
                                                {getFieldDecorator('airtight', {
                                                    valuePropName: 'checked',
                                                    initialValue: userInfo.airtight === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenangloomyCool ? ChineseEnglishSize.MaterialInventoryItemMaintenangloomyCool.descripts:'凉暗：'} {...formItemCheckbox}>
                                                {getFieldDecorator('gloomyCool', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.gloomyCool === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenandampProof ? ChineseEnglishSize.MaterialInventoryItemMaintenandampProof.descripts:'防潮：'} {...formItemCheckbox}>
                                                {getFieldDecorator('dampProof', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.dampProof === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={8}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanmaxHumidity ? ChineseEnglishSize.MaterialInventoryItemMaintenanmaxHumidity.descripts:'最高湿度：'} {...formItemItem}>
                                                {getFieldDecorator('maxHumidity', {
                                                    initialValue: userInfo.maxHumidity ? userInfo.maxHumidity : undefined,
                                                })(
                                                    <Input style={{width: '100%'}} type="number" className="input-number" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenandark ? ChineseEnglishSize.MaterialInventoryItemMaintenandark.descripts:'遮光：'} {...formItemCheckbox}>
                                                {getFieldDecorator('dark', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.dark === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={5}>
                                            <FormItem label={ChineseEnglishSize.MaterialInventoryItemMaintenanmeltPack ? ChineseEnglishSize.MaterialInventoryItemMaintenanmeltPack.descripts:'密封：'} {...formItemCheckbox}>
                                                {getFieldDecorator('meltPack', {
                                                    valuePropName: 'checked',
                                                    initialValue:  userInfo.meltPack === 'Y' ? true : false,
                                                })(
                                                    this.state.language.language == "EN" ?   <Switch checkedChildren="yes" unCheckedChildren="no" />:  <Switch checkedChildren="是" unCheckedChildren="否" />
                                                )}
                                            </FormItem>
                                        </Col>
                                    </Row>
                                </Card>
                            </Form>
                        </Col>
                        <Col>
                            <Row style={{marginTop: '10px',textAlign: 'right'}} >
                                <Button style={{marginRight: '30px'}} onClick={this.saveData}>{ChineseEnglishSize.MaterialInventoryItemMaintenansave ? ChineseEnglishSize.MaterialInventoryItemMaintenansave.descripts:'保存'}</Button>
                                <Button style={{marginRight: '30px'}} disabled={this.state.rowKey ? false : true} onClick={this.saveAsData}>{ChineseEnglishSize.MaterialInventoryItemMaintenansaveAs ? ChineseEnglishSize.MaterialInventoryItemMaintenansaveAs.descripts:'另存'}</Button>
                                <Button type="primary" onClick={this.resetFields}>{ChineseEnglishSize.MaterialInventoryItemMaintenanitemStDate ? ChineseEnglishSize.MaterialInventoryItemMaintenanitemStDate.descripts:'重置'}</Button>
                            </Row>
                        </Col>
                    </Col>
                    <ColumnAuthoritysModel
                        clientWidth='800px'
                        compontName='MaterialInventoryItemMaintenan'
                        configType="C"
                        onRef={this.onColumnRef}
                        reloadData={this.getDetailTableColumns}

                    />
                    <Modal
                        title={ChineseEnglishSize.MaterialInventoryItemMaintenangetMaxCode ? ChineseEnglishSize.MaterialInventoryItemMaintenangetMaxCode.descripts:'获取最大代码'}
                        visible={this.state.visible}
                        onCancel={this.handleCancel}
                        width={400}
                        footer={null}
                    >
                        <div>
                            <Row style={{marginBottom: '24px'}}>
                                <Row>
                                    <Col span={21}>
                                        <FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanprefix ? ChineseEnglishSize.MaterialInventoryItemMaintenanprefix.descripts:'前缀'}>
                                            {getFieldDecorator('prefix',{
                                                initialValue: this.state.userInfo.locID ? this.state.userInfo.locID : undefined,
                                            })(
                                                <Input />
                                            ) }
                                        </FormItem>
                                    </Col>
                                </Row>
                                <Row>
                                    <Col span={21}>
                                        <FormItem {...formItemLayout} label={ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID ? ChineseEnglishSize.MaterialInventoryItemMaintenanstkSubCatID.descripts:'库存子类'}>
                                            {getFieldDecorator('stkSubCatIDPopup',{
                                                initialValue:undefined,
                                                rules:[{ required : false, message: '库存子类不能为空'}]
                                            })(
                                                <Select allowClear style={{width: '100%'}}>
                                                    {this.state.SelectData.stkSubCat && this.state.SelectData.stkSubCat.map(item => {
                                                        return <Option value={item.id} key={item.id} title={item.descripts} seatchprop={item.descripts}>{item.descripts}</Option>
                                                    })}
                                                </Select>
                                            ) }
                                        </FormItem>
                                    </Col>
                                </Row>
                            </Row>
                            <Row style={{textAlign: 'center'}}>
                                <Button onClick={this.saveMaxInventory} style={{background: 'rgba(255,255,255,1)'}}>{ChineseEnglishSize.MaterialInventoryItemMaintenandetermine ? ChineseEnglishSize.MaterialInventoryItemMaintenandetermine.descripts:'确认'}</Button>
                            </Row>
                        </div>
                    </Modal>
                </div>
            )
        }
    }
);
export default InventoryItemMaintenance;