<template>
  <div class="content-main">
    <el-row style="margin:5px auto;">
      <div style="font-weight:700;font-size:20px;text-align:center;margin-bottom:10px;color:#4588db;">各合同横向得分记录</div>
    </el-row>
    <el-row>
      <el-table :data="tableData" stripe v-loading="listLoading" border fit style="width:100%">
        <el-table-column type="index" label="序号" align="center" width="77"></el-table-column>
        <el-table-column prop="hth" label="合同号" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column prop="cjdwmc" label="成交单位" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column prop="mfcckmc" label="卖方承储库" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column prop="chmc" label="仓号" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column prop="scnf" label="生产年份" align="center"></el-table-column>
        <el-table-column prop="sgdjmc" label="收购等级" align="center"></el-table-column>
        <el-table-column prop="zcjsl" label="总成交数量" align="center"></el-table-column>
        <el-table-column prop="lsxzmc" label="粮食性质" align="center"></el-table-column>
        <el-table-column prop="lspzmc" label="粮食品种" align="center"></el-table-column>
        <el-table-column prop="qpjg" label="起拍价格" align="center"></el-table-column>
        <el-table-column prop="cjdj" label="成交单价" align="center"></el-table-column>
        <el-table-column prop="cjje" label="成交金额" align="center"></el-table-column>
        <el-table-column prop="cjrq" label="成交日期" align="center"></el-table-column>
        <el-table-column prop="ckjzrq" label="出库截止日期" align="center"></el-table-column>
        <el-table-column prop="ztmc" label="状态" align="center"></el-table-column>
        <el-table-column prop="hxdf" label="横向得分" align="center"></el-table-column>
      </el-table>
    </el-row>
  <el-row style="text-align:center;">  <el-button
      @click="returnList"
      type="primary"
      size="small"
      class="iconfont iconfanhui"
      style="margin-top:20px;"
    >返回</el-button></el-row>
  </div>
</template>
<script>
import { selectTurnoverDataDetail } from "@/api/transaction/creditAssess/creditquery/index";
import {dateFormat} from '@/utils'
export default {
  data() {
    return {
      tableData: [],
      listLoading: false
    };
  },
  created() {
    this.getDetail();
  },
  methods: {
    returnList() {
      this.$router.push({
        path: "/transaction/creditAssess/creditQuery/index"
      });
    },
    getDetail() {
      selectTurnoverDataDetail({ cjdwbm: this.$route.query.cjdwbm })
        .then(res => {
          this.listLoading = false;
          if (res.infoCode === 200) {
            let list = res.data
            list.forEach(d=>{
              if(d.cjrq)  d.cjrq = dateFormat(d.cjrq)
              if(d.ckjzrq)  d.ckjzrq = dateFormat(d.ckjzrq)
            })
            this.tableData = [...list]
          }
        })
        .catch(err => {
          this.listLoading = false;
        });
    }
  }
};
</script>
<style lang="sass" scoped>

</style>