<template>
  <div>
    <el-form ref="cDocForm" :model="cDocObj" label-width="100px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="出单方式">
            <el-select v-model="cDocObj.method" placeholder="请选择出单方式">
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="电放时间">
            <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.dischargeTime"></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="寄送时间">
            <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.deliveryTime"></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="快递单号">
            <el-input v-model="cDocObj.courierNumber" placeholder="请输入快递单号"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="电放凭证附件">
        <el-upload action="" :file-list="cDocObj.fileList">
          <el-button size="small" type="primary">选择文件</el-button>
        </el-upload>
      </el-form-item>

      <el-form-item label="agent list">
        <el-radio-group v-model="cDocObj.agent">
          <el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item>
        <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.agenTime"></el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-upload action="" :file-list="cDocObj.agentFileList">
          <el-button size="small" type="primary">选择文件</el-button>
        </el-upload>
      </el-form-item>

      <el-form-item label="soncap">
        <el-radio-group v-model="cDocObj.soncap">
          <el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item>
        <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.soncapTime"></el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-upload action="" :file-list="cDocObj.soncapFileList">
          <el-button size="small" type="primary">选择文件</el-button>
        </el-upload>
      </el-form-item>

    </el-form>
    <el-row class="operate-button">
      <el-button type="primary" @click="onSubmit">保存</el-button>
      <el-button type="success" @click="onSubmit">提交</el-button>
      <el-button @click="cancel">关闭</el-button>
    </el-row>
  </div>
</template>

<script>
/**
 * 清关文件
 */
export default {
  name: "clrDocument",
  data() {
    return {
      // 清关文件对象
      cDocObj: {
        fileList: [],
      },
      // 出单方式
      method: [
        {
          value: "1",
          label: "正本",
        },
        {
          value: "2",
          label: "电放",
        },
      ],
      // 选项
      status: [
        {
          value: "1",
          label: "无需",
        },
        {
          value: "2",
          label: "已做",
        },
      ],
    };
  },
  methods: {
    /** 提交 */
    onSubmit() {
      this.$refs["cDocForm"].validate((valid) => {
        if (valid) {
          alert("submit!");
        }
      });
    },
    /** 取消 */
    cancel() {
      this.$emit("closeDialog");
    },
  },
};
</script>

<style lang="scss" scoped>
</style>
