<template>
  <ele-modal
    custom-class="ele-dialog-form long-dialog-form"
    :centered="true"
    :visible.sync="outboundDetailsDialogFlag"
    :title="title"
    append-to-body
    :close-on-click-modal="false"
    width="70%"
    :before-close="cancel">

   <innerdetails ref="outboundDetailsDialogRef" @handleSave="handleSave"></innerdetails>
    <div slot="footer">
      <el-button type="primary" @click="handleSave">保存</el-button>
      <el-button type="info" @click="cancel">关闭</el-button>
    </div>

  </ele-modal>

</template>

<script>

import innerdetails from "@/BIZComponents/innerdetails.vue";

export default {
  props: {
    outboundDetailsDialogFlag: {
      type: Boolean,
      default: false
    }
  },
  components:{
    innerdetails
  },
  data() {
    return {
      title: '信息',
      
    };
  },
  watch: {},
  computed: {
   
  },

  created() {
   
  },
  methods: {
    async init(row = {},list=[]) {
      console.log(row,'row')
        this.$nextTick(()=>{
          this.$refs.outboundDetailsDialogRef._getInfo(row.entrustedReceiveCode,row.type,list)
        })
    },
   
  
    handleSave() {
      const list = this.$refs.outboundDetailsDialogRef.getValue()||[]
      if (list.lenght==0) return this.$message.warning('请选择退货明细')

      this.$emit('saveDate',list)
      this.cancel()
    },
    cancel() {
      this.$emit('update:outboundDetailsDialogFlag', false)
    },
  

  }
};
</script>

<style lang="scss" scoped>
.stepsStatus {
  width: 40%;
  margin: 0 auto;
}

.p20 {
  padding: 20px;
}

.flex {
  display: flex;
}

.title {
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;

  span {
    font-size: 16px;
  }

  .col {
    padding-left: 40px;
    font-size: 14px;
    color: #aaaaaa;
  }
}

.degree {
  margin-right: 10px;
  padding: 0px 15px;
  color: #fff;
  font-size: 13px;
  line-height: 23px;
  border-radius: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  span {
    width: 5px;
    height: 5px;
    border-radius: 100%;
    margin-right: 6px;
    background-color: #fff;
  }
}

.red {
  background-color: rgb(163, 0, 20);
}

.blue {
  background-color: #1989fa;
}

.createdInfo {
  justify-content: space-around;
  margin-top: 10px;
  font-size: 14px;

  .col {
    color: #6e6e6e;
    padding-right: 10px;
  }
}

.mt40 {
  margin-top: 40px;
}

.custSteps {
  margin-top: 20px;
  margin-left: 70px;

  .box {
    width: 158px;
    border: 1px solid #ccc;
    padding: 10px;
    flex-direction: row;
    flex-wrap: wrap;
    // justify-content: space-between;
    font-size: 12px;
    color: #9e9e9e;

    .x {
      width: 20px;
      height: 15px;
      margin-right: 5px;
    }

    .q {
      background-color: #d0e4d5;
    }

    .b {
      background-color: #1989fa;
    }

    .g {
      background-color: #157a2c;
    }

    .r {
      background-color: #a30014;
    }

    .a {
      align-items: center;
      margin-bottom: 10px;
    }

    .mr10 {
      margin-right: 10px;
    }

    .mb0 {
      margin-bottom: 0;
    }
  }

  .stepsInfo {
    // flex: 1;
    width: 483px;
  }
}

.mt20 {
  margin-top: 20px;
}

.content-detail {
  overflow: hidden;
}

.executor {
  font-size: 14px;

  .col {
    color: #6e6e6e;
    padding-right: 10px;
  }
}

.result {
  justify-content: space-around;
}

.mr20 {
  margin-right: 20px;
}

.details {
  font-size: 14px;
  margin-bottom: 10px;
}

.customSteps {
  margin-top: 40px;
  font-size: 14px;
  margin-left: 80px;

  .time {
    font-size: 12px;
    color: #6e6e6e;
    margin-right: 20px;
    position: relative;

    &::after {
      content: '';
      width: 1px;
      height: 100%;
      background-color: #157a2c;
      position: absolute;
      right: -26px;
    }
  }

  .flex:last-child {
    .time {
      &::after {
        display: none;
      }
    }
  }

  .round {
    margin-right: 20px;
    width: 10px;
    height: 10px;
    border-radius: 100%;
    background-color: #157a2c;
    position: relative;

    span {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 4px;
      height: 4px;
      background-color: #fff;
      border-radius: 100%;
      transform: translate(-2px, -2px);
    }
  }

  .text {
    .info {
      margin-top: 10px;
      width: 955px;
      background-color: #f0f3f3;
      overflow: hidden;
      padding: 10px;
      margin-bottom: 10px;
    }
  }
}
</style>
