// 库存项维护
import React from 'react';
import StockItemAlias from './StockItemAlias';
import StockDispUom from './StockDispUom';
import { Modal, Form, Input, Row ,Col ,message ,Select ,Tabs ,Icon ,Checkbox ,DatePicker } from 'antd';
import { $http } from '../../../containers/config/https';
import '../druginfo/Maintenance.css'
import moment from 'moment'
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
const Option = Select.Option;
const TabPane = Tabs.TabPane;
const FormItem = Form.Item;
let timeout;

class StockItemSave extends React.Component {
    constructor(props) {
        super(props)
        this.state = { 
            index:1,
            visible: false,
            baseUomData:[],
            purchUomData:[],
            packUomData:[],
            stkSubCatData:[],
            medItemData:[],
            chargeData:[],
            importTypeData:[],
            qualityLevelData:[],
            priceTypeData:[],
            approvalPrefixData:[],
            pubBidListData:[],
            pubBidVendorData:[],
            pubBidManfData:[],
            pubBidLevelData:[],
            refRetReasonData:[],
            stopReasonData:[],
            TCData:[],
            PCData:[],
            ICData:[],
            OCData:[],
            ECData:[],
            ACData:[],
            MCData:[],
            chargeData:[],
        };
    }
    componentDidMount() {
        this.props.onRef(this);
        this.loadInfo(); //获取下拉框信息
    }

    // 调用子组件的连接事件
    onRefAlias = (ref) => {
        this.childAlias = ref
    }

    // 调用子组件的连接事件
    onRefDispUom = (ref) => {
        this.childDispUom = ref
    }

    //获取下拉框信息
    loadInfo(){
        var params = [{}]
        $http.post('urlS', this, {
            code: "02020025",
            data: params,
            success: function (res) {
                //console.log(res)
                if (res.errorCode === '0') {
                    var j=0
                    for(j = 0; j < res.uom.length; j++) {
                        this.state.baseUomData.push(<Option value={res.uom[j].id} title={res.uom[j].descripts} key={j}>{res.uom[j].descripts}</Option>)
                        this.state.purchUomData.push(<Option value={res.uom[j].id} title={res.uom[j].descripts} key={j}>{res.uom[j].descripts}</Option>)
                        this.state.packUomData.push(<Option value={res.uom[j].id} title={res.uom[j].descripts} key={j}>{res.uom[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.stkSubCat.length; j++) {
                        this.state.stkSubCatData.push(<Option value={res.stkSubCat[j].id} title={res.stkSubCat[j].descripts} key={j}>{res.stkSubCat[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.importType.length; j++) {
                        this.state.importTypeData.push(<Option value={res.importType[j].id} title={res.importType[j].descripts} key={j}>{res.importType[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.qualityLevel.length; j++) {
                        this.state.qualityLevelData.push(<Option value={res.qualityLevel[j].id} title={res.qualityLevel[j].descripts} key={j}>{res.qualityLevel[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.priceType.length; j++) {
                        this.state.priceTypeData.push(<Option value={res.priceType[j].id} title={res.priceType[j].descripts} key={j}>{res.priceType[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.approvalPrefix.length; j++) {
                        this.state.approvalPrefixData.push(<Option value={res.approvalPrefix[j].id} title={res.approvalPrefix[j].descripts} key={j}>{res.approvalPrefix[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.pubBidList.length; j++) {
                        this.state.pubBidListData.push(<Option value={res.pubBidList[j].id} title={res.pubBidList[j].descripts} key={j}>{res.pubBidList[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.pubBidVendor.length; j++) {
                        this.state.pubBidVendorData.push(<Option value={res.pubBidVendor[j].id} title={res.pubBidVendor[j].descripts} key={j}>{res.pubBidVendor[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.pubBidManf.length; j++) {
                        this.state.pubBidManfData.push(<Option value={res.pubBidManf[j].id} title={res.pubBidManf[j].descripts} key={j}>{res.pubBidManf[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.pubBidLevel.length; j++) {
                        this.state.pubBidLevelData.push(<Option value={res.pubBidLevel[j].id} title={res.pubBidLevel[j].descripts} key={j}>{res.pubBidLevel[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.refRetReason.length; j++) {
                        this.state.refRetReasonData.push(<Option value={res.refRetReason[j].id} title={res.refRetReason[j].descripts} key={j}>{res.refRetReason[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.stopReason.length; j++) {
                        this.state.stopReasonData.push(<Option value={res.stopReason[j].id} title={res.stopReason[j].descripts} key={j}>{res.stopReason[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.TC.length; j++) {
                        this.state.TCData.push(<Option value={res.TC[j].id} title={res.TC[j].descripts} key={j}>{res.TC[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.PC.length; j++) {
                        this.state.PCData.push(<Option value={res.PC[j].id} title={res.PC[j].descripts} key={j}>{res.PC[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.IC.length; j++) {
                        this.state.ICData.push(<Option value={res.IC[j].id} title={res.IC[j].descripts} key={j}>{res.IC[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.OC.length; j++) {
                        this.state.OCData.push(<Option value={res.OC[j].id} title={res.OC[j].descripts} key={j}>{res.OC[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.EC.length; j++) {
                        this.state.ECData.push(<Option value={res.EC[j].id} title={res.EC[j].descripts} key={j}>{res.EC[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.AC.length; j++) {
                        this.state.ACData.push(<Option value={res.AC[j].id} title={res.AC[j].descripts} key={j}>{res.AC[j].descripts}</Option>)
                    }
                    for(j = 0; j < res.MC.length; j++) {
                        this.state.MCData.push(<Option value={res.MC[j].id} title={res.MC[j].descripts} key={j}>{res.MC[j].descripts}</Option>)
                    }
                }else{
                    
                }
            }
        });
    }

    // 显示弹出层
    showModal = () => {
        this.setState({
            visible: true,
        });
    }

    // 重置表单
    resetFields(){
        // console.log("触发了")
        this.props.form.resetFields(); //清空所有
        this.setState({
            stockID:'',
            stockCode:'',
            stockDesc:'',
            stockSpec:'',
            barCode:'',
            baseUnitID:'',
            purUnitID:'',
            baseFac:'',
            stkSubCatID:'',
            medDesc:'',
            medID:'',
            importTypeID:'',
            quaLevID:'',
            qualityNo:'',
            priceTypeID:'',
            maxSp:'',
            priceFileNo:'',
            drugUseInfo:'',
            packUnitID:'',
            packFac:'',
            packPicPath:'',
            appPreFixID:'',
            approvalNo:'',
            PBLID:'',
            PBRp:'',
            PBVendorID:'',
            PBManfID:'',
            PBLevID:'',
            standCode:'',
            inMedBasis:'',
            purPlanCode:'',
            refRetReaID:'',
            startDate:moment(new Date()).utcOffset(480).format('YYYY-MM-DD'),
            stopDate:null,
            stopReaID:'',
            rp:'',
            sp:'',
            isHospFlag:false,
            chargeItem:'',
            itemID:'',
            itemCode:'',
            itemDesc:'',
            itemTCID:'',
            itemPCID:'',
            itemICID:'',
            itemOCID:'',
            itemECID:'',
            itemACID:'',
            itemMCID:'',
            itemStDate:moment(new Date()).utcOffset(480).format('YYYY-MM-DD'),
            itemEndDate:null,
            minTemp:'',
            maxTemp:'',
            minHumidity:'',
            maxHumidity:'',
            commonTemp:false,
            dry:false,
            airtight:false,
            dark:false,
            radiation:false,
            seal:false,
            gloomyCool:false,
            meltPack:false,
            coldST:false,
            freeze:false,  
            dampProof:false,
            billFac:'',
        })
    }

    // 取消
    handleCancel = () => {
        this.resetFields();
        this.setState({
            visible: false,
            index:1,
        });
    }

    // 切换页签
    onChangeTabs = (key) => {
        this.setState({ 
            index:key,
        },()=>{

        });
        if(Number(key)===3){
            //setTimeout(() => {this.handleDoseQuery()},100)  //延时调用子组件方法
        }

        if(Number(key)===4){
            setTimeout(() => {this.handleAliasQuery()},100)  //延时调用子组件方法
        }

        if(Number(key)===5){
            setTimeout(() => {this.handleDispUomQuery()},100)  //延时调用子组件方法
        }
    }

    //延时调用子组件方法
    handleAliasQuery = () => {
        if(this.props.flag==="modifyStockItem"){
            this.childAlias.setState({
                stockID:this.state.stockID,
            },()=>{
                this.childAlias.handleQuery();
            })
        }else{
            this.childAlias.setState({
                stockID:'',
                data:[],
            })
            this.childAlias.Clear();
        }
    }

    //延时调用子组件方法
    handleDispUomQuery = () => {
        if(this.props.flag==="modifyStockItem"){
            this.childDispUom.setState({
                stockID:this.state.stockID,
            },()=>{
                this.childDispUom.handleQuery();
            })
        }else{
            this.childDispUom.setState({
                stockID:'',
                data:[],
            })
            this.childDispUom.Clear();
        }
    }

    //处理多个input的公共方法
    onChangeInput(name, e){
        this.setState({
            [name]: e.target.value
        })
    }

    //处理多个checkbox的公共方法
    onChangeCheckbox(name, e){
        this.setState({
            [name]: e.target.checked
        })
    }

    ///处理多个select下拉的公共方法
    selectOnChange=(name,value,option)=>{
        if(value){
            this.setState({
                [name]:value,
            })
        }else{
            this.setState({
                [name]:'',
            })
        }
    }

    //获取下拉框信息
    loadChargeInfo(value){
        let data = {}
        data = {
            params: [{
                chargeDr: value,
            }],
        }
        $http.post('urlS', this, {
            code: "02020071",
            data: data,
            success: function (res) {
                if (+res.errorCode === 0 ) {
                    if(res.result.length>0){
                        this.setState({
                            itemCode:res.result[0].chargeCode,
                            itemDesc:res.result[0].chargeDesc,
                            itemTCID:res.result[0].TCDr,
                            itemPCID:res.result[0].PCDr,
                            itemICID:res.result[0].ICDr,
                            itemOCID:res.result[0].OCDr,
                            itemECID:res.result[0].ECDr,
                            itemACID:res.result[0].ACDr,
                            itemMCID:res.result[0].MCDr,
                            itemStDate:res.result[0].chargeStDate!==""?moment(res.result[0].chargeStDate).utcOffset(480).format('YYYY-MM-DD'):null,
                            itemEndDate:res.result[0].chargeEndDate!==""?moment(res.result[0].chargeEndDate).utcOffset(480).format('YYYY-MM-DD'):null,
                        })
                    }
                }
            }
        })
    }

    ///收费项下拉
    selectOnCharge=(name,value,option)=>{
        if(value){
            this.setState({
                [name]:value,
            })
            this.loadChargeInfo(value);
        }else{
            this.setState({
                [name]:'',
            })
        }
    }

    // 时间
    dateOnChange = (name,date, dateString)=> {
        this.setState({
            [name]: dateString,
        })
    }

    // 确定
    handleCreate = () => {
        if (this.state.medID!="")  {
            if (Number(this.state.billFac)>0) {} else {
                message.warning('计价单位转换系数不能为空!!');
                return;
            }
        }
        if ((this.state.minTemp!="")&&(this.state.maxTemp!="")&&(Number(this.state.maxTemp)<Number(this.state.minTemp))){
            message.warning('最高温度不能低于最低温度!!');
            return;
        }
        if ((this.state.minHumidity!="")&&(this.state.maxHumidity!="")&&(Number(this.state.maxHumidity)<Number(this.state.minHumidity))){
            message.warning('最高湿度不能低于最湿温度!!');
            return;
        }
        let data = {}
        let { flag } = this.props;
        if ((flag === 'addStockItem')||(flag === 'saveAsStockItem')) {
            data={
                params: [{
                    stockID:'',
                    stockCode:this.state.stockCode,
                    stockDesc:this.state.stockDesc,
                    stockSpec:this.state.stockSpec,
                    barCode:this.state.barCode,
                    baseUnitID:this.state.baseUnitID,
                    purUnitID:this.state.purUnitID,
                    stkSubCatID:this.state.stkSubCatID,
                    medID:this.state.medID,
                    importTypeID:this.state.importTypeID,
                    quaLevID:this.state.quaLevID,
                    qualityNo:this.state.qualityNo,
                    priceTypeID:this.state.priceTypeID,
                    maxSp:this.state.maxSp,
                    priceFileNo:this.state.priceFileNo,
                    drugUseInfo:this.state.drugUseInfo,
                    packUnitID:this.state.packUnitID,
                    packFac:this.state.packFac,
                    packPicPath:this.state.packPicPath,
                    appPreFixID:this.state.appPreFixID,
                    approvalNo:this.state.approvalNo,
                    PBLID:this.state.PBLID,
                    PBRp:this.state.PBRp,
                    PBVendorID:this.state.PBVendorID,
                    PBManfID:this.state.PBManfID,
                    PBLevID:this.state.PBLevID,
                    standCode:this.state.standCode,
                    inMedBasis:this.state.inMedBasis,
                    purPlanCode:this.state.purPlanCode,
                    refRetReaID:this.state.refRetReaID,
                    startDate:this.state.startDate?this.state.startDate:moment(new Date()).utcOffset(480).format('YYYY-MM-DD'),
                    stopDate:this.state.stopDate?this.state.stopDate:'',
                    stopReaID:this.state.stopReaID,
                    rp:this.state.rp,
                    sp:this.state.sp,
                    isHospFlag:this.state.isHospFlag?'Y':'N',
                    baseFac:this.state.baseFac,
                    billFac:this.state.billFac,
                    //收费项
                    itemID:this.state.itemID,
                    itemCode:this.state.itemCode,
                    itemDesc:this.state.itemDesc,
                    itemTCID:this.state.itemTCID,
                    itemPCID:this.state.itemPCID,
                    itemICID:this.state.itemICID,
                    itemOCID:this.state.itemOCID,
                    itemECID:this.state.itemECID,
                    itemACID:this.state.itemACID,
                    itemMCID:this.state.itemMCID,
                    itemStDate:this.state.itemStDate?this.state.itemStDate:moment(new Date()).utcOffset(480).format('YYYY-MM-DD'),
                    itemEndDate:this.state.itemEndDate?this.state.itemEndDate:'',
                    //存储条件
                    minTemp:this.state.minTemp,
                    maxTemp:this.state.maxTemp,
                    minHumidity:this.state.minHumidity,
                    maxHumidity:this.state.maxHumidity,
                    commonTemp:this.state.commonTemp?'Y':'N',
                    dry:this.state.dry?'Y':'N',
                    airtight:this.state.airtight?'Y':'N',
                    dark:this.state.dark?'Y':'N',
                    radiation:this.state.radiation?'Y':'N',
                    seal:this.state.seal?'Y':'N',
                    gloomyCool:this.state.gloomyCool?'Y':'N',
                    meltPack:this.state.meltPack?'Y':'N',
                    coldST:this.state.coldST?'Y':'N',
                    freeze:this.state.freeze?'Y':'N',   
                    dampProof:this.state.dampProof?'Y':'N',
                }]
            }
            this.handleSave(data);
            // console.log(data)
        }
        if (flag === 'modifyStockItem') {
            data={
                params: [{
                    stockID:this.state.stockID,
                    stockCode:this.state.stockCode,
                    stockDesc:this.state.stockDesc,
                    stockSpec:this.state.stockSpec,
                    barCode:this.state.barCode,
                    baseUnitID:this.state.baseUnitID,
                    purUnitID:this.state.purUnitID,
                    stkSubCatID:this.state.stkSubCatID,
                    medID:this.state.medID,
                    importTypeID:this.state.importTypeID,
                    quaLevID:this.state.quaLevID,
                    qualityNo:this.state.qualityNo,
                    priceTypeID:this.state.priceTypeID,
                    maxSp:this.state.maxSp,
                    priceFileNo:this.state.priceFileNo,
                    drugUseInfo:this.state.drugUseInfo,
                    packUnitID:this.state.packUnitID,
                    packFac:this.state.packFac,
                    packPicPath:this.state.packPicPath,
                    appPreFixID:this.state.appPreFixID,
                    approvalNo:this.state.approvalNo,
                    PBLID:this.state.PBLID,
                    PBRp:this.state.PBRp,
                    PBVendorID:this.state.PBVendorID,
                    PBManfID:this.state.PBManfID,
                    PBLevID:this.state.PBLevID,
                    standCode:this.state.standCode,
                    inMedBasis:this.state.inMedBasis,
                    purPlanCode:this.state.purPlanCode,
                    refRetReaID:this.state.refRetReaID,
                    startDate:this.state.startDate?this.state.startDate:moment(new Date()).utcOffset(480).format('YYYY-MM-DD'),
                    stopDate:this.state.stopDate?this.state.stopDate:'',
                    stopReaID:this.state.stopReaID,
                    rp:this.state.rp,
                    sp:this.state.sp,
                    isHospFlag:this.state.isHospFlag?'Y':'N',
                    baseFac:this.state.baseFac,
                    billFac:this.state.billFac,
                    //收费项
                    itemID:this.state.itemID,
                    itemCode:this.state.itemCode,
                    itemDesc:this.state.itemDesc,
                    itemTCID:this.state.itemTCID,
                    itemPCID:this.state.itemPCID,
                    itemICID:this.state.itemICID,
                    itemOCID:this.state.itemOCID,
                    itemECID:this.state.itemECID,
                    itemACID:this.state.itemACID,
                    itemMCID:this.state.itemMCID,
                    itemStDate:this.state.itemStDate?this.state.itemStDate:moment(new Date()).utcOffset(480).format('YYYY-MM-DD'),
                    itemEndDate:this.state.itemEndDate?this.state.itemEndDate:'',
                    //存储条件
                    minTemp:this.state.minTemp,
                    maxTemp:this.state.maxTemp,
                    minHumidity:this.state.minHumidity,
                    maxHumidity:this.state.maxHumidity,
                    commonTemp:this.state.commonTemp?'Y':'N',
                    dry:this.state.dry?'Y':'N',
                    airtight:this.state.airtight?'Y':'N',
                    dark:this.state.dark?'Y':'N',
                    radiation:this.state.radiation?'Y':'N',
                    seal:this.state.seal?'Y':'N',
                    gloomyCool:this.state.gloomyCool?'Y':'N',
                    meltPack:this.state.meltPack?'Y':'N',
                    coldST:this.state.coldST?'Y':'N',
                    freeze:this.state.freeze?'Y':'N',   
                    dampProof:this.state.dampProof?'Y':'N',
                }]
            }
            // console.log(data)
            this.handleSave(data);
        }
    }

    // 保存数据
    handleSave = (data) => {
        //console.log(data)
        $http.post('url', this, {
            code: '02020026',
            data: data,
            success: function (res) {   
                //console.log(res)
                if (+res.errorCode === 0 ) {
                    message.success('保存成功');
                    // 新增或编辑成功重置form表单
                    this.resetFields();
                    // 关闭弹框
                    this.handleCancel();
                    // 刷新列表数据
                    this.props.handelThis.handleAllQuery();
                } else {
                    
                }
            }
        })
    }
    
    fetchCharge (value, callback) {
        value=value.replace( /^\s+/, "" ).replace( /\s+$/, "" );
        if (value===""){
            let data=[];
            callback(data);
            return;
        }
        if (timeout) {
            clearTimeout(timeout);
            timeout = null;
        }
        function fakeCharge() {
            let data = {
                params: [{
                    Code: '',
                    Descripts: '',
                    FindType: '',
                    TypeID: '',
                    alias: value,
                    include:"",
                    hospID:'',
                    include:"combo",
                }],
                pagination:[{
                    pageSize: 0,
                    currentPage: 0,
                    sortColumn: "Code",
                    sortOrder: "asc"
                }]
            }
            $http.post('urlS', this, {
                code: "05100010",
                data: data,
                success: function (res) {
                    if (res.errorCode === '0') {
                        let data=[];
                        var j=0
                        for(j = 0; j < res.result.Data.length; j++) {
                            data.push({
                                value: res.result.Data[j].ID,
                                text: res.result.Data[j].itemDesc,
                            });
                        }
                        callback(data);
                    }
                }
            });
        }
        timeout = setTimeout(fakeCharge, 300);
    }

    //收费项
    handleChargeSearch = (value) => {
        this.fetchCharge(value, chargeData => this.setState({ chargeData }));
    }

    fetchMed (value, callback) {
        value=value.replace( /^\s+/, "" ).replace( /\s+$/, "" );
        if (value===""){
            let data=[];
            callback(data);
            return;
        }
        if (timeout) {
            clearTimeout(timeout);
            timeout = null;
        }
        function fakeMed() {
            let data = {}
            data = {
                params: [{
                    alias: value,
                }],
            }
            $http.post('urlS', this, {
                code: "02020070",
                data: data,
                success: function (res) {
                    let data=[];
                    if (res.errorCode === '0') {
                        var j;
                        for(j = 0; j < res.result.length; j++) {
                            data.push({
                                value: res.result[j].id,
                                text: res.result[j].descripts,
                            });
                        }
                        callback(data);
                    }
                }
            })
        }
        timeout = setTimeout(fakeMed, 300);
    }

    //医嘱项
    handleMedSearch = (value) => {
        this.fetchMed(value, medItemData => this.setState({ medItemData }));
    }

    render() {
        const { getFieldDecorator } = this.props.form;
        let formItemLayout = {
            labelCol: { span: 9 },
            wrapperCol: { span: 15 }
        };
        let formItemCheckBoxLayout = {
            labelCol: { span: 9 },
            wrapperCol: { span: 15 }
        };
        const options = this.state.chargeData.map(d => <Option title={d.text} key={d.value}>{d.text}</Option>);
        const optionsMed = this.state.medItemData.map(d => <Option title={d.text} key={d.value}>{d.text}</Option>);
        
        return (
            <Modal
                visible={this.state.visible}
                title={this.props.title}
                okText="保存"
                onCancel={this.handleCancel}
                onOk={this.handleCreate}
                width="1000px"
                maskClosable={false}
                centered={true}
            >
                <div style={{height:'450px'}}>
                    <Tabs 
                        defaultActiveKey="1"
                        activeKey={String(this.state.index)} 
                        onChange={this.onChangeTabs}
                    >
                        <TabPane tab={<span><Icon type="chrome" />基本信息</span>} key="1" >
                            <div style={{paddingTop:'40px'}}>
                                <Form>
                                    <Col span={8}>
                                        <Row>
                                            <FormItem {...formItemLayout} label='库存项代码'>
                                                {getFieldDecorator('stockCode', {
                                                    initialValue:this.state.stockCode,
                                                    rules: [{ required: true, message: '库存项代码是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"stockCode")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='入库单位'>
                                                {getFieldDecorator('purUnitID', {
                                                    initialValue:this.state.purUnitID,
                                                    rules: [{ required: true, message: '基本单位是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch 
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"purUnitID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.purchUomData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='医嘱项'>
                                                {getFieldDecorator('medDesc', {
                                                    initialValue:this.state.medDesc,
                                                    rules: [{ required: false, message: '医嘱项是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch
                                                            setFieldsValue={this.state.medDesc}
                                                            style={this.props.style}
                                                            defaultActiveFirstOption={false}
                                                            showArrow={false}
                                                            filterOption={false}
                                                            onSearch={this.handleMedSearch}
                                                            onChange={this.selectOnChange.bind(this,"medID")}
                                                            notFoundContent={null}
                                                        >
                                                        {optionsMed}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}> 
                                            <FormItem {...formItemLayout} label='库存分类'>
                                                {getFieldDecorator('stkSubCatID', {
                                                    initialValue:this.state.stkSubCatID,
                                                    rules: [{ required: true, message: '库存分类是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch 
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"stkSubCatID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.stkSubCatData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='定价类型'>
                                                {getFieldDecorator('priceTypeID', {
                                                    initialValue:this.state.priceTypeID,
                                                    rules: [{ required: false, message: '定价类型是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch 
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"priceTypeID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.priceTypeData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='进口类型'>
                                                {getFieldDecorator('importTypeID', {
                                                    initialValue:this.state.importTypeID,
                                                    rules: [{ required: false, message: '进口类型是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch 
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"importTypeID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.importTypeData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                    </Col>
                                    <Col span={8}>
                                        <Row>
                                            <FormItem {...formItemLayout} label='库存项描述'>
                                                {getFieldDecorator('stockDesc', {
                                                    initialValue:this.state.stockDesc,
                                                    rules: [{ required: true, message: '库存项描述是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"stockDesc")}
                                                            title={this.state.stockDesc}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='转换系数'>
                                                {getFieldDecorator('baseFac', {
                                                    initialValue:this.state.baseFac,
                                                    rules: [{ required: true, message: '转换系数是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"baseFac")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='转换系数(计价)'>
                                                {getFieldDecorator('BillFac', {
                                                    initialValue:this.state.billFac,
                                                    rules: [{ required: true, message: '转换系数是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"billFac")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='质量层次'>
                                                {getFieldDecorator('quaLevID', {
                                                    initialValue:this.state.quaLevID,
                                                    rules: [{ required: false, message: '质量层次是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch 
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"quaLevID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.qualityLevelData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='最高售价'>
                                                {getFieldDecorator('maxSp', {
                                                    initialValue:this.state.maxSp,
                                                    rules: [{ required: false, message: '最高售价是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"maxSp")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='用药说明'>
                                                {getFieldDecorator('drugUseInfo', {
                                                    initialValue:this.state.drugUseInfo,
                                                    rules: [{ required: false, message: '用药说明是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"drugUseInfo")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                    </Col>
                                    <Col span={8}>
                                        <Row>
                                            <FormItem {...formItemLayout} label='包装规格'>
                                                {getFieldDecorator('stockSpec', {
                                                    initialValue:this.state.stockSpec,
                                                    rules: [{ required: true, message: '包装规格是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"stockSpec")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='基本单位'>
                                                {getFieldDecorator('baseUnitID', {
                                                    initialValue:this.state.baseUnitID,
                                                    rules: [{ required: true, message: '基本单位是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            disabled={this.state.intrFlag}
                                                            allowClear={true}
                                                            showSearch 
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"baseUnitID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.baseUomData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='条码'>
                                                {getFieldDecorator('barCode', {
                                                    initialValue:this.state.barCode,
                                                    rules: [{ required: false, message: '条码是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"barCode")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='质标编号'>
                                                {getFieldDecorator('qualityNo', {
                                                    initialValue:this.state.qualityNo,
                                                    rules: [{ required: false, message: '质标编号是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"qualityNo")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{paddingTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='物价文件号'>
                                                {getFieldDecorator('priceFileNo', {
                                                    initialValue:this.state.priceFileNo,
                                                    rules: [{ required: false, message: '物价文件号是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"priceFileNo")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                    </Col>
                                </Form>
                            </div>
                        </TabPane>
                        <TabPane tab={<span><Icon type="chrome" />收费项</span>} key="2">
                            <div style={{paddingTop:'60px'}}>
                                <Form>
                                    <Col span={8}>
                                        <Row>
                                            <FormItem {...formItemLayout} label='关联收费项'>
                                                {getFieldDecorator('ChargeItem', {
                                                    initialValue:this.state.chargeItem,
                                                    rules: [{ required: false, message: '收费项是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch
                                                            style={this.props.style}
                                                            defaultActiveFirstOption={false}
                                                            showArrow={false}
                                                            filterOption={false}
                                                            onSearch={this.handleChargeSearch}
                                                            onChange={this.selectOnCharge.bind(this,"itemID")}
                                                            notFoundContent={null}
                                                        >
                                                        {options}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='收费项代码'>
                                                {getFieldDecorator('itemCode', {
                                                    initialValue:this.state.itemCode,
                                                    rules: [{ required: true, message: '收费项代码是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"itemCode")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='收费项描述'>
                                                {getFieldDecorator('itemDesc', {
                                                    initialValue:this.state.itemDesc,
                                                    rules: [{ required: true, message: '收费项描述是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"itemDesc")}
                                                            title={this.state.itemDesc}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='收费分类'>
                                                {getFieldDecorator('itemTCID', {
                                                    initialValue:this.state.itemTCID,
                                                    rules: [{ required: true, message: '收费分类是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch  
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"itemTCID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.TCData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row> 
                                    </Col>
                                    <Col span={8}>
                                        <Row>
                                            <FormItem {...formItemLayout} label='物价分类'>
                                                {getFieldDecorator('itemPCID', {
                                                    initialValue:this.state.itemPCID,
                                                    rules: [{ required: true, message: '物价分类是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch  
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"itemPCID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.PCData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>  
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='住院收据费用'>
                                                {getFieldDecorator('itemICID', {
                                                    initialValue:this.state.itemICID,
                                                    rules: [{ required: true, message: '住院收据费用是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch  
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"itemICID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.ICData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>    
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='门诊收据费用'>
                                                {getFieldDecorator('itemOCID', {
                                                    initialValue:this.state.itemOCID,
                                                    rules: [{ required: true, message: '门诊收据费用是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch  
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"itemOCID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.OCData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='生效日期'>
                                                {getFieldDecorator('itemStDate', {
                                                    initialValue:this.state.itemStDate?moment(this.state.itemStDate, 'YYYY-MM-DD'):moment(new Date(), 'YYYY-MM-DD'),
                                                    rules: [{ required: true, message: '生效日期是必填项,请选择！' }]
                                                    })(
                                                        <DatePicker
                                                            onChange={this.dateOnChange.bind(this,"itemStDate")}
                                                            format="YYYY-MM-DD" 
                                                            style={{width:'100%'}}
                                                        >
                                                        </DatePicker>
                                                    )}
                                            </FormItem>
                                        </Row>
                                         
                                    </Col>
                                    <Col span={8}>   
                                        <Row>
                                            <FormItem {...formItemLayout} label='核算项目分类'>
                                                {getFieldDecorator('itemECID', {
                                                    initialValue:this.state.itemECID,
                                                    rules: [{ required: true, message: '核算项目分类是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch  
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"itemECID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.ECData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>   
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='会计科目'>
                                                {getFieldDecorator('itemACID', {
                                                    initialValue:this.state.itemACID,
                                                    rules: [{ required: true, message: '会计科目是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch  
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"itemACID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.ACData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>   
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='病案分类'>
                                                {getFieldDecorator('itemMCID', {
                                                    initialValue:this.state.itemMCID,
                                                    rules: [{ required: true, message: '病案分类是必填项,请选择！' }]
                                                    })(
                                                        <Select
                                                            allowClear={true}
                                                            showSearch  
                                                            optionFilterProp="children" 
                                                            onChange={this.selectOnChange.bind(this,"itemMCID")}
                                                            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                        >
                                                        {this.state.MCData}
                                                        </Select>
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'20px'}}>
                                            <FormItem {...formItemLayout} label='失效日期'>
                                                {getFieldDecorator('itemEndDate', {
                                                    initialValue:this.state.itemEndDate && this.state.itemEndDate!==''?moment(this.state.itemEndDate, 'YYYY-MM-DD'):null,
                                                    rules: [{ required: false, message: '失效日期是必填项,请选择！' }]
                                                    })(
                                                        <DatePicker
                                                            onChange={this.dateOnChange.bind(this,"itemEndDate")}
                                                            format="YYYY-MM-DD" 
                                                            style={{width:'100%'}}
                                                        >
                                                        </DatePicker>
                                                    )}
                                            </FormItem>
                                        </Row>  
                                    </Col>
                                </Form>
                            </div>
                        </TabPane>
                        <TabPane tab={<span><Icon type="chrome" />存储条件</span>} key="3">
                            <div style={{paddingTop:'60px'}}>
                                <Form>
                                    <Col span={2}>
                                    </Col>
                                    <Col span={6}>
                                        <Row>
                                            <FormItem {...formItemLayout} label='最低温度(°C)'>
                                                {getFieldDecorator('MinTemp', {
                                                    initialValue:this.state.minTemp,
                                                    rules: [{ required: false, message: '最低温度是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"minTemp")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='最高温度(°C)'>
                                                {getFieldDecorator('MaxTemp', {
                                                    initialValue:this.state.maxTemp,
                                                    rules: [{ required: false, message: '最高温度是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"maxTemp")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='最低湿度'>
                                                {getFieldDecorator('MinHumidity', {
                                                    initialValue:this.state.minHumidity,
                                                    rules: [{ required: false, message: '最低湿度是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"minHumidity")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemLayout} label='最高湿度'>
                                                {getFieldDecorator('MaxHumidity', {
                                                    initialValue:this.state.maxHumidity,
                                                    rules: [{ required: false, message: '最高湿度是必填项,请选择！' }]
                                                    })(
                                                        <Input 
                                                            onChange={this.onChangeInput.bind(this,"maxHumidity")}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                    </Col>
                                    <Col span={2}></Col>
                                    <Col span={4}>
                                        <Row>
                                            <FormItem {...formItemCheckBoxLayout} label='常温'>
                                                {getFieldDecorator('CommonTemp', {
                                                    initialValue:this.state.commonTemp,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"commonTemp")}
                                                            checked={this.state.commonTemp}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>  
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='干燥'>
                                                {getFieldDecorator('Dry', {
                                                    initialValue:this.state.dry,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"dry")}
                                                            checked={this.state.dry}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='密闭'>
                                                {getFieldDecorator('Airtight', {
                                                    initialValue:this.state.airtight,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"airtight")}
                                                            checked={this.state.airtight}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='遮光'>
                                                {getFieldDecorator('Dark', {
                                                    initialValue:this.state.dark,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"dark")}
                                                            checked={this.state.dark}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>      
                                    </Col>
                                    <Col span={4}>
                                        <Row>
                                            <FormItem {...formItemCheckBoxLayout} label='防辐射'>
                                                {getFieldDecorator('Radiation', {
                                                    initialValue:this.state.radiation,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"radiation")}
                                                            checked={this.state.radiation}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row>
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='熔封'>
                                                {getFieldDecorator('Seal', {
                                                    initialValue:this.state.seal,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"seal")}
                                                            checked={this.state.seal}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='凉暗'>
                                                {getFieldDecorator('GloomyCool', {
                                                    initialValue:this.state.gloomyCool,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"gloomyCool")}
                                                            checked={this.state.gloomyCool}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='密封'>
                                                {getFieldDecorator('MeltPack', {
                                                    initialValue:this.state.meltPack,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"meltPack")}
                                                            checked={this.state.meltPack}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                    </Col>
                                    <Col span={4}>
                                        <Row>
                                            <FormItem {...formItemCheckBoxLayout} label='冷藏'>
                                                {getFieldDecorator('ColdST', {
                                                    initialValue:this.state.coldST,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"coldST")}
                                                            checked={this.state.coldST}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='冷冻'>
                                                {getFieldDecorator('Freeze', {
                                                    initialValue:this.state.freeze,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"freeze")}
                                                            checked={this.state.freeze}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                        <Row style={{marginTop:'15px'}}>
                                            <FormItem {...formItemCheckBoxLayout} label='防潮'>
                                                {getFieldDecorator('DampProof', {
                                                    initialValue:this.state.dampProof,
                                                    rules: []
                                                    })(
                                                        <Checkbox 
                                                            onChange={this.onChangeCheckbox.bind(this,"dampProof")}
                                                            checked={this.state.dampProof}
                                                        />
                                                    )}
                                            </FormItem>
                                        </Row> 
                                    </Col>
                                </Form>
                            </div>
                        </TabPane>
                        <TabPane tab={<span><Icon type="chrome" />库存项别名</span>} key="4">
                            <StockItemAlias 
                                onRef={this.onRefAlias} 
                                handelThis={this}>
                            </StockItemAlias>
                        </TabPane>
                        <TabPane tab={<span><Icon type="chrome" />发药单位维护</span>} key="5">
                            <StockDispUom 
                                onRef={this.onRefDispUom} 
                                handelThis={this}>
                            </StockDispUom>
                        </TabPane>
                    </Tabs>
                </div>
            </Modal>
        )
    }
}
export default Form.create()(StockItemSave);