<template>
  <div class="container normal-panel normal-margin">
    <p class="normal-title normal-margin">线索表头</p>
    <el-form label-position="left" label-width="90px" :model="mainData" size="small" inline>
      <el-form-item label="单号">
        <el-input v-model="mainData.uploadbillnum" readonly></el-input>
      </el-form-item>
      <el-form-item label="状态">
        <el-input v-model="mainData.status" readonly></el-input>
      </el-form-item>
      <el-form-item label="导入人">
        <el-input v-model="mainData.createby" readonly></el-input>
      </el-form-item>
      <el-form-item label="最近修改人">
        <el-input v-model="mainData.changeby" readonly></el-input>
      </el-form-item>
      <el-form-item label="审核人">
        <el-input v-model="mainData.checkby" readonly></el-input>
      </el-form-item>
      <el-form-item label="备注">
        <el-input v-model="mainData.notes" placeholder="修改备注"></el-input>
      </el-form-item>
      <el-form-item label="线索类型">
        <el-input v-model="mainData.cluetype" readonly></el-input>
      </el-form-item>
      <el-form-item label="导入时间">
        <el-input v-model="mainData.createdate" readonly></el-input>
      </el-form-item>
      <el-form-item label="修改时间">
        <el-input v-model="mainData.changedate" readonly></el-input>
      </el-form-item>
      <el-form-item label="审核时间">
        <el-input v-model="mainData.checkdate" readonly></el-input>
      </el-form-item>
      <el-form-item label="线索数">
        <el-input v-model="mainData.xiansuocount" readonly></el-input>
      </el-form-item>
      <el-form-item label="是否已分配">
        <el-input v-model="mainData.isdistribution" readonly></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data () {
    return {
      mainData:{}
    }
  },
  methods:{
    async queryOrderclueuploadbillMain () {
      const res = await this.$api.requested({
        "classname":"webmanage.saletool.orderclue.orderclue",
        "method": "queryOrderclueuploadbillMain",
        "content": {
          "sat_orderclueuploadbillid": this.$route.query.id
        }
      })
      this.mainData = res.data
      this.$emit('onHeadData',res.data)
    },
    async updateOrderclueuploadbill () {
      const res = await this.$api.requested({
        "classname":"webmanage.saletool.orderclue.orderclue",
        "method": "updateOrderclueuploadbill",
        "content": {
            "sat_orderclueuploadbillid":this.$route.query.id,
            "notes":this.mainData.notes
        }
      })
      this.tool.showMessage(res)
    }
  },
  mounted () {
    this.queryOrderclueuploadbillMain()
  },
  watch:{
    $route () {
      this.queryOrderclueuploadbillMain()
    }
  }
}

</script>
<style>
</style>