<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{height:'calc(100vh - 100px)',overflow:'auto'}"
    @close="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
      <a-row :gutter="32">
        <!-- <a-col :span="24" >
          <a-form-model-item label="清单分类" prop="type">
            <a-select
              placeholder="清单分类"
              v-model="form.type"
              :getPopupContainer="
                triggerNode => {
                  return triggerNode.parentNode || document.body
                }
              "
              style="width: 100%"
              allow-clear>
              <a-select-option v-for="(d, index) in typeOptions" :key="index" :value="Number(d.dictValue)">{{ d.dictLabel }}</a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col> -->
        <a-col :span="24">
          <a-form-model-item label="关键词" prop="keywords">
            <a-input v-model="form.keywords" placeholder="请输入关键词"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="24" >
          <a-form-model-item label="特货代码" prop="specialCode">
            <a-select placeholder="特货代码" v-model="form.specialCode" style="width: 100%" allow-clear>
              <a-select-option v-for="(d, index) in thdmOptions" :key="index" :value="d.dictValue">{{ d.dictLabel }}</a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col>
        <!-- <a-col :span="24" >
          <a-form-model-item label="状态" prop="status">
            <a-radio-group v-model="form.status" button-style="solid">
              <a-radio-button
                v-for="(dict, index) in statusOptions"
                :key="index"
                :value="dict.dictValue"
              >
                {{ dict.dictLabel }}
              </a-radio-button>
            </a-radio-group>
          </a-form-model-item>
        </a-col> -->
        <a-col :span="24">
          <a-form-model-item label="备注" prop="remark">
            <a-textarea v-model="form.remark" placeholder="请输入备注" :rows="4"/>
          </a-form-model-item>
        </a-col>
      </a-row>
      </a-spin>
       <div class="bottom-control">
              <a-space>
              <a-button @click="cancel">
                  取消
              </a-button>
              <a-button type="primary" @click="submitForm">
                  保存
              </a-button>
              </a-space>
       </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import CargoDetailEditForm from './CargoDetailForm'
export default {
  ...CargoDetailEditForm
}
</script>
