<template>
<div>
    <el-button :disabled="data.status !== '提交'" type="primary" size="mini" @click="onShow(drawer = true)">回复交期</el-button>
    <el-drawer
    :visible.sync="drawer"
    direction="rtl"
    append-to-body
    size="80%"
    :show-close="false"
    :withHeader="false">
    <div class="drawer__panel">
      <tool-list ref="prolist" :data="data" :type="'confirmdate'"></tool-list>
    </div>
    <div class="fixed__btn__panel">
      <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
      <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">保存修改</el-button>
    </div>
  </el-drawer>
  </div>
</template>

<script>
import previewImage from '@/components/previewImage/index.vue'
import toolList from '../detail/tabs/toolList.vue'
export default {
  props:['data'],
  components:{
    previewImage,
    toolList,
  },
  data () {
    return {
      drawer:false
    }
  },
  methods:{
    onShow () {

    },
    async onSubmit () {
      const res = await this.$api.requested({
        "id": 20230114152602,
        "content": {
          "sa_orderid": this.$route.query.id
        }
      })
      this.tool.showMessage(res,()=>{
        this.drawer = false
        this.$emit('onSuccess')
      })
    }
  }
}

</script>
<style>
</style>