<template>
  <div>
    <div class="fuheMadia">
      <div>
        <el-row type="flex" justify="space-around">
          <el-col :span="3" :offset="2">项目名称:</el-col>
          <el-col :span="6">{{addList.projectName}}</el-col>
          <el-col :span="3">项目地址:</el-col>
          <el-col :span="6">{{addList.projectAddress}}</el-col>
        </el-row>
        <el-row type="flex" justify="space-around">
          <el-col :span="3" :offset="2">合同编号:</el-col>
          <el-col :span="6">{{addList.code}}</el-col>
          <el-col :span="3">合同来源:</el-col>
          <el-col :span="6">{{addList.source}}</el-col>
        </el-row>
        <el-row type="flex" justify="space-around">
          <el-col :span="3" :offset="2">合同类型:</el-col>
          <el-col
            :span="6"
          >{{addList.type==="1"?"半包":addList.type==="2"?"大包":addList.type==="3"?"清包":addList.type==="4"?"全包":"大修"}}</el-col>
          <el-col :span="3">台量:</el-col>
          <el-col :span="6">{{addList.liftNum}}</el-col>
        </el-row>
        <el-row type="flex" justify="space-around">
          <el-col :span="3" :offset="2">签约时间:</el-col>
          <el-col :span="6">{{addList.givenDate}}</el-col>
          <el-col :span="3">签约人:</el-col>
          <el-col :span="6">{{addList.givenUser}}</el-col>
        </el-row>
        <el-row type="flex" justify="space-around">
          <el-col :span="3" :offset="2">开始时间:</el-col>
          <el-col :span="6">{{addList.starDate}}</el-col>
          <el-col :span="3">结束时间:</el-col>
          <el-col :span="6">{{addList.endDate}}</el-col>
        </el-row>
        <el-row type="flex" justify="space-around">
          <el-col :span="3" :offset="2">金额:</el-col>
          <el-col :span="6">{{addList.moneys}}</el-col>
          <el-col :span="3"></el-col>
          <el-col :span="6"></el-col>
        </el-row>
        <el-row type="flex" justify="space-around">
          <el-col :span="3" :offset="2">备注:</el-col>
          <el-col :span="6">{{addList.remarks}}</el-col>
          <el-col :span="3">查看附件:</el-col>
          <el-col :span="6">
            <a :href="addList.accessoryUrl" target="_blank" v-show="addList.accessoryUrl">点击查看</a>
          </el-col>
        </el-row>
      </div>
      <div>
        <div v-if="addList.type!=='5'">
          <el-row type="flex" justify="start" class="addTableHeader headerColor">
            <el-col :span="8" class="TXc">期数</el-col>
            <el-col :span="8" class="TXc">应收金额</el-col>
            <el-col :span="8" class="TXc">应收日期</el-col>
          </el-row>
          <div v-if="addList.paymentList<1" class="ftitle">暂无数据</div>
          <div v-if="addList.paymentList">
            <el-row
              v-for="(item,i) in addList.paymentList"
              :key="i"
              type="flex"
              justify="start"
              class="MoneyInput"
            >
              <el-col :span="8" class="TXc">{{item.periods}}期</el-col>
              <el-col :span="8" class="TXc">{{item.planMoney}}</el-col>
              <el-col :span="8" class="TXc">{{item.planDate}}</el-col>
            </el-row>
          </div>
        </div>
        <div v-else>
          <el-row type="flex" justify="start" class="addTableHeader headerColor">
            <el-col :span="6" class="TXc">项目名称</el-col>
            <el-col :span="6" class="TXc">项目描述</el-col>
            <el-col :span="6" class="TXc">应收金额</el-col>
            <el-col :span="6" class="TXc">应收日期</el-col>
          </el-row>
          <div v-if="addList.paymentList<1" class="ftitle">暂无数据</div>
          <div v-if="addList.paymentList">
            <el-row
              v-for="(item,i) in addList.paymentList"
              :key="i"
              type="flex"
              justify="start"
              class="MoneyInput"
            >
              <el-col :span="8" class="TXc">{{item.costName}}</el-col>
              <el-col :span="8" class="TXc">{{item.costDesc}}</el-col>
              <el-col :span="8" class="TXc">{{item.planMoney}}</el-col>
              <el-col :span="8" class="TXc">{{item.planDate}}</el-col>
            </el-row>
          </div>
        </div>
        <div></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      addList: {}
    };
  },
  created() {},
  mounted() {},
  methods: {
    isJudge(a) {
      this.addList = a;
      console.log(a);
    },
    fuheClose() {
      this.addList = {};
    },
    fuheQueding(){
        var url="business/contract/check";
        var param={
            id:this.addList.ID
        };
        this.axios.post(url,param).then(res=>{
            if(res.statusCode==="1"){
                this.$parent.$parent.fuheClose();
                this.$parent.$parent.getContractList2();
            }else{
                this.$message.error(rse.message);
            }
        })
    }
  }
};
</script>