<template>
  <a-drawer
      :title="title"
      :width="800"
      placement="right"
      :closable="false"
      @close="close"
      :visible="visible"
  >

    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
      
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="modid">
          <a-input-number v-decorator="[ 'modid', validatorRules.modid ]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="moid">
          <a-input-number v-decorator="[ 'moid', validatorRules.moid ]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sortseq">
          <a-input-number v-decorator="[ 'sortseq', validatorRules.sortseq ]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="moclass">
          <a-input placeholder="请输入moclass" v-decorator="['moclass', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="motypeid">
          <a-input-number v-decorator="[ 'motypeid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="qty">
          <a-input placeholder="请输入qty" v-decorator="['qty', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="mrpqty">
          <a-input placeholder="请输入mrpqty" v-decorator="['mrpqty', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="auxunitcode">
          <a-input placeholder="请输入auxunitcode" v-decorator="['auxunitcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="auxqty">
          <a-input placeholder="请输入auxqty" v-decorator="['auxqty', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="changerate">
          <a-input placeholder="请输入changerate" v-decorator="['changerate', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="molotcode">
          <a-input placeholder="请输入molotcode" v-decorator="['molotcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="whcode">
          <a-input placeholder="请输入whcode" v-decorator="['whcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="mdeptcode">
          <a-input placeholder="请输入mdeptcode" v-decorator="['mdeptcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sotype">
          <a-input placeholder="请输入sotype" v-decorator="['sotype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sodid">
          <a-input placeholder="请输入sodid" v-decorator="['sodid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="socode">
          <a-input placeholder="请输入socode" v-decorator="['socode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="soseq">
          <a-input-number v-decorator="[ 'soseq', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="declaredqty">
          <a-input placeholder="请输入declaredqty" v-decorator="['declaredqty', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="qualifiedinqty">
          <a-input placeholder="请输入qualifiedinqty" v-decorator="['qualifiedinqty', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="status">
          <a-input placeholder="请输入status" v-decorator="['status', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="orgstatus">
          <a-input placeholder="请输入orgstatus" v-decorator="['orgstatus', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="bomid">
          <a-input-number v-decorator="[ 'bomid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="routingid">
          <a-input-number v-decorator="[ 'routingid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="custbomid">
          <a-input-number v-decorator="[ 'custbomid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="demandid">
          <a-input-number v-decorator="[ 'demandid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="plancode">
          <a-input placeholder="请输入plancode" v-decorator="['plancode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="partid">
          <a-input-number v-decorator="[ 'partid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="invcode">
          <a-input placeholder="请输入invcode" v-decorator="['invcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free1">
          <a-input placeholder="请输入free1" v-decorator="['free1', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free2">
          <a-input placeholder="请输入free2" v-decorator="['free2', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free3">
          <a-input placeholder="请输入free3" v-decorator="['free3', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free4">
          <a-input placeholder="请输入free4" v-decorator="['free4', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free5">
          <a-input placeholder="请输入free5" v-decorator="['free5', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free6">
          <a-input placeholder="请输入free6" v-decorator="['free6', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free7">
          <a-input placeholder="请输入free7" v-decorator="['free7', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free8">
          <a-input placeholder="请输入free8" v-decorator="['free8', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free9">
          <a-input placeholder="请输入free9" v-decorator="['free9', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="free10">
          <a-input placeholder="请输入free10" v-decorator="['free10', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sfcflag">
          <a-input placeholder="请输入sfcflag" v-decorator="['sfcflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="crpflag">
          <a-input placeholder="请输入crpflag" v-decorator="['crpflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="qcflag">
          <a-input placeholder="请输入qcflag" v-decorator="['qcflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="relsdate">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'relsdate', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="relsuser">
          <a-input placeholder="请输入relsuser" v-decorator="['relsuser', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="closedate">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'closedate', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="orgclsdate">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'orgclsdate', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="ufts">
          <a-input placeholder="请输入ufts" v-decorator="['ufts', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define22">
          <a-input placeholder="请输入define22" v-decorator="['define22', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define23">
          <a-input placeholder="请输入define23" v-decorator="['define23', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define24">
          <a-input placeholder="请输入define24" v-decorator="['define24', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define25">
          <a-input placeholder="请输入define25" v-decorator="['define25', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define26">
          <a-input placeholder="请输入define26" v-decorator="['define26', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define27">
          <a-input placeholder="请输入define27" v-decorator="['define27', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define28">
          <a-input placeholder="请输入define28" v-decorator="['define28', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define29">
          <a-input placeholder="请输入define29" v-decorator="['define29', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define30">
          <a-input placeholder="请输入define30" v-decorator="['define30', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define31">
          <a-input placeholder="请输入define31" v-decorator="['define31', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define32">
          <a-input placeholder="请输入define32" v-decorator="['define32', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define33">
          <a-input placeholder="请输入define33" v-decorator="['define33', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define34">
          <a-input-number v-decorator="[ 'define34', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define35">
          <a-input-number v-decorator="[ 'define35', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define36">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'define36', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="define37">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'define37', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="leadtime">
          <a-input-number v-decorator="[ 'leadtime', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="opscheduletype">
          <a-input placeholder="请输入opscheduletype" v-decorator="['opscheduletype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="ordflag">
          <a-input placeholder="请输入ordflag" v-decorator="['ordflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="wiptype">
          <a-input placeholder="请输入wiptype" v-decorator="['wiptype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="supplywhcode">
          <a-input placeholder="请输入supplywhcode" v-decorator="['supplywhcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="reasoncode">
          <a-input placeholder="请输入reasoncode" v-decorator="['reasoncode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="iswfcontrolled">
          <a-input placeholder="请输入iswfcontrolled" v-decorator="['iswfcontrolled', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="iverifystate">
          <a-input-number v-decorator="[ 'iverifystate', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="ireturncount">
          <a-input-number v-decorator="[ 'ireturncount', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="remark">
          <a-input placeholder="请输入remark" v-decorator="['remark', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcemocode">
          <a-input placeholder="请输入sourcemocode" v-decorator="['sourcemocode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcemoseq">
          <a-input-number v-decorator="[ 'sourcemoseq', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcemoid">
          <a-input-number v-decorator="[ 'sourcemoid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcemodid">
          <a-input-number v-decorator="[ 'sourcemodid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourceqccode">
          <a-input placeholder="请输入sourceqccode" v-decorator="['sourceqccode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourceqcid">
          <a-input-number v-decorator="[ 'sourceqcid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourceqcdid">
          <a-input-number v-decorator="[ 'sourceqcdid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="costitemcode">
          <a-input placeholder="请输入costitemcode" v-decorator="['costitemcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="costitemname">
          <a-input placeholder="请输入costitemname" v-decorator="['costitemname', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="relstime">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'relstime', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="closeuser">
          <a-input placeholder="请输入closeuser" v-decorator="['closeuser', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="closetime">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'closetime', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="orgclstime">
          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'orgclstime', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="auditstatus">
          <a-input placeholder="请输入auditstatus" v-decorator="['auditstatus', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="pallocateid">
          <a-input-number v-decorator="[ 'pallocateid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="demandcode">
          <a-input placeholder="请输入demandcode" v-decorator="['demandcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="collectiveflag">
          <a-input placeholder="请输入collectiveflag" v-decorator="['collectiveflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="ordertype">
          <a-input placeholder="请输入ordertype" v-decorator="['ordertype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="orderdid">
          <a-input-number v-decorator="[ 'orderdid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="ordercode">
          <a-input placeholder="请输入ordercode" v-decorator="['ordercode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="orderseq">
          <a-input-number v-decorator="[ 'orderseq', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="manualcode">
          <a-input placeholder="请输入manualcode" v-decorator="['manualcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="reformflag">
          <a-input placeholder="请输入reformflag" v-decorator="['reformflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourceqcvouchtype">
          <a-input placeholder="请输入sourceqcvouchtype" v-decorator="['sourceqcvouchtype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="orgqty">
          <a-input placeholder="请输入orgqty" v-decorator="['orgqty', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="fmflag">
          <a-input placeholder="请输入fmflag" v-decorator="['fmflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="minsn">
          <a-input placeholder="请输入minsn" v-decorator="['minsn', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="maxsn">
          <a-input placeholder="请输入maxsn" v-decorator="['maxsn', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcesvccode">
          <a-input placeholder="请输入sourcesvccode" v-decorator="['sourcesvccode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcesvcid">
          <a-input placeholder="请输入sourcesvcid" v-decorator="['sourcesvcid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcesvcdid">
          <a-input placeholder="请输入sourcesvcdid" v-decorator="['sourcesvcdid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="bomtype">
          <a-input placeholder="请输入bomtype" v-decorator="['bomtype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="routingtype">
          <a-input placeholder="请输入routingtype" v-decorator="['routingtype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="busflowid">
          <a-input-number v-decorator="[ 'busflowid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="runcardflag">
          <a-input placeholder="请输入runcardflag" v-decorator="['runcardflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="requisitionflag">
          <a-input placeholder="请输入requisitionflag" v-decorator="['requisitionflag', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="allovtid">
          <a-input-number v-decorator="[ 'allovtid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="relsallovtid">
          <a-input-number v-decorator="[ 'relsallovtid', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="iprintcount">
          <a-input-number v-decorator="[ 'iprintcount', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="cbsysbarcode">
          <a-input placeholder="请输入cbsysbarcode" v-decorator="['cbsysbarcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="ccurrentauditor">
          <a-input placeholder="请输入ccurrentauditor" v-decorator="['ccurrentauditor', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="custcode">
          <a-input placeholder="请输入custcode" v-decorator="['custcode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="lplancode">
          <a-input placeholder="请输入lplancode" v-decorator="['lplancode', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="sourcesvcvouchtype">
          <a-input placeholder="请输入sourcesvcvouchtype" v-decorator="['sourcesvcvouchtype', {}]" />
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="factorycode">
          <a-input placeholder="请输入factorycode" v-decorator="['factorycode', {}]" />
        </a-form-item>
		
      </a-form>
    </a-spin>
    <a-button type="primary" @click="handleOk">确定</a-button>
    <a-button type="primary" @click="handleCancel">取消</a-button>
  </a-drawer>
</template>

<script>
  import { httpAction } from '@/api/manage'
  import pick from 'lodash.pick'
  import moment from "moment"

  export default {
    name: "FbsMomOrderdetailModal",
    data () {
      return {
        title:"操作",
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },

        confirmLoading: false,
        form: this.$form.createForm(this),
        validatorRules:{
        modid:{rules: [{ required: true, message: '请输入modid!' }]},
        moid:{rules: [{ required: true, message: '请输入moid!' }]},
        sortseq:{rules: [{ required: true, message: '请输入sortseq!' }]},
        },
        url: {
          add: "/fbsMomOrder/fbsMomOrderdetail/add",
          edit: "/fbsMomOrder/fbsMomOrderdetail/edit",
        },
      }
    },
    created () {
    },
    methods: {
      add () {
        this.edit({});
      },
      edit (record) {
        this.form.resetFields();
        this.model = Object.assign({}, record);
        this.visible = true;
        this.$nextTick(() => {
          this.form.setFieldsValue(pick(this.model,'modid','moid','sortseq','moclass','motypeid','qty','mrpqty','auxunitcode','auxqty','changerate','molotcode','whcode','mdeptcode','sotype','sodid','socode','soseq','declaredqty','qualifiedinqty','status','orgstatus','bomid','routingid','custbomid','demandid','plancode','partid','invcode','free1','free2','free3','free4','free5','free6','free7','free8','free9','free10','sfcflag','crpflag','qcflag','relsuser','ufts','define22','define23','define24','define25','define26','define27','define28','define29','define30','define31','define32','define33','define34','define35','leadtime','opscheduletype','ordflag','wiptype','supplywhcode','reasoncode','iswfcontrolled','iverifystate','ireturncount','remark','sourcemocode','sourcemoseq','sourcemoid','sourcemodid','sourceqccode','sourceqcid','sourceqcdid','costitemcode','costitemname','closeuser','auditstatus','pallocateid','demandcode','collectiveflag','ordertype','orderdid','ordercode','orderseq','manualcode','reformflag','sourceqcvouchtype','orgqty','fmflag','minsn','maxsn','sourcesvccode','sourcesvcid','sourcesvcdid','bomtype','routingtype','busflowid','runcardflag','requisitionflag','allovtid','relsallovtid','iprintcount','cbsysbarcode','ccurrentauditor','custcode','lplancode','sourcesvcvouchtype','factorycode'))
		  //时间格式化
          this.form.setFieldsValue({relsdate:this.model.relsdate?moment(this.model.relsdate):null})
          this.form.setFieldsValue({closedate:this.model.closedate?moment(this.model.closedate):null})
          this.form.setFieldsValue({orgclsdate:this.model.orgclsdate?moment(this.model.orgclsdate):null})
          this.form.setFieldsValue({define36:this.model.define36?moment(this.model.define36):null})
          this.form.setFieldsValue({define37:this.model.define37?moment(this.model.define37):null})
          this.form.setFieldsValue({relstime:this.model.relstime?moment(this.model.relstime):null})
          this.form.setFieldsValue({closetime:this.model.closetime?moment(this.model.closetime):null})
          this.form.setFieldsValue({orgclstime:this.model.orgclstime?moment(this.model.orgclstime):null})
        });

      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
        const that = this;
        // 触发表单验证
        this.form.validateFields((err, values) => {
          if (!err) {
            that.confirmLoading = true;
            let httpurl = '';
            let method = '';
            if(!this.model.id){
              httpurl+=this.url.add;
              method = 'post';
            }else{
              httpurl+=this.url.edit;
               method = 'put';
            }
            let formData = Object.assign(this.model, values);
            //时间格式化
            formData.relsdate = formData.relsdate?formData.relsdate.format('YYYY-MM-DD HH:mm:ss'):null;
            formData.closedate = formData.closedate?formData.closedate.format('YYYY-MM-DD HH:mm:ss'):null;
            formData.orgclsdate = formData.orgclsdate?formData.orgclsdate.format('YYYY-MM-DD HH:mm:ss'):null;
            formData.define36 = formData.define36?formData.define36.format('YYYY-MM-DD HH:mm:ss'):null;
            formData.define37 = formData.define37?formData.define37.format('YYYY-MM-DD HH:mm:ss'):null;
            formData.relstime = formData.relstime?formData.relstime.format('YYYY-MM-DD HH:mm:ss'):null;
            formData.closetime = formData.closetime?formData.closetime.format('YYYY-MM-DD HH:mm:ss'):null;
            formData.orgclstime = formData.orgclstime?formData.orgclstime.format('YYYY-MM-DD HH:mm:ss'):null;
            
            console.log(formData)
            httpAction(httpurl,formData,method).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                that.$emit('ok');
              }else{
                that.$message.warning(res.message);
              }
            }).finally(() => {
              that.confirmLoading = false;
              that.close();
            })



          }
        })
      },
      handleCancel () {
        this.close()
      },


    }
  }
</script>

<style lang="less" scoped>
/** Button按钮间距 */
  .ant-btn {
    margin-left: 30px;
    margin-bottom: 30px;
    float: right;
  }
</style>