<template>
  <div class="app-container">
    <div>
      <!--标题按钮部分开始-->
      <div class="tab-header webtop">
        <!--标题-->
        <div>{{ viewTitle }}</div>
        <!--start 添加修改按钮-->
        <div>
          <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
        </div>
      </div>
      <!--标题按钮部分结束-->
      <!--Start 新增修改部分-->
      <div class="listconadd">
        <el-form ref="form_obj" class="formadd">
          <el-table :key="tableKey" :data="list" :index="index" border style="width: 100%">
            <el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center"/>
            <el-table-column label="品牌" align="center" width="200">
              <template slot-scope="scope">
                <span>{{ scope.row.brandName }}</span>
              </template>
            </el-table-column>
            <el-table-column label="回款方式" align="center" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.collectionTypeValue }}</span>
              </template>
            </el-table-column>
            <el-table-column label="厂家收款账号" align="center" width="150">
              <template slot-scope="scope">
                <span>{{ scope.row.manufaBankAccount }}</span>
              </template>
            </el-table-column>
            <el-table-column label="回款金额" align="center" width="150">
              <template slot-scope="scope">
                <span>{{ scope.row.collectionMoney }}</span>
              </template>
            </el-table-column>
            <el-table-column label="运费" align="center" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.freight }}</span>
              </template>
            </el-table-column>
            <el-table-column label="回款日期" align="center" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.collectionDate }}</span>
              </template>
            </el-table-column>
            <el-table-column label="计算标准" align="center" width="200">
              <template slot-scope="scope">
                <span>{{ scope.row.calculationStandard }}</span>
              </template>
            </el-table-column>
            <el-table-column label="预提返利" align="center" width="150">
              <template slot-scope="scope">
                <span>{{ scope.row.estimateRebate }}</span>
              </template>
            </el-table-column>
            <el-table-column label="预提日期" align="center" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.withholdingDate }}</span>
              </template>
            </el-table-column>
            <el-table-column label="上传金额" align="center" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.uploadMoney }}</span>
              </template>
            </el-table-column>
            <el-table-column label="上传日期" align="center" width="150">
              <template slot-scope="scope">
                <span>{{ scope.row.uploadDate }}</span>
              </template>
            </el-table-column>
            <el-table-column label="调整金额" align="center" width="150">
              <template slot-scope="scope">
                <span>{{ scope.row.adjustmentMoney }}</span>
              </template>
            </el-table-column>
          </el-table>
        </el-form>
      </div>
    </div>
    <!--End 添加修改部分-->
  </div>
</template>

<script>
import req from '@/api/manufacturerrebates/collectionrebatecheck'

export default {
  name: 'heduishenpiInfo',
  data() {
    return {
      viewTitle: '',
      index: 0,
      tableKey: 0,
      viewState: 1,
      sids: [],
      // 表单数据
      list: [],
      rules: {},
      submitdisabled: false
    }
  },
  methods: {
    showInfo(row) {
      this.$nextTick(() => {
        this.$refs['form_obj'].clearValidate()
      })
      this.viewTitle = '回款返利核对审核申请明细'
      console.log('编辑回显', row)
      req.collectionRebateWithDetails(row.collectionRebateSids).then((resp) => {
        this.list = resp.data
      }).catch((e) => {
        this.list = []
      })
    },
    // 返回（===既判断）
    handleReturn() {
      // 表单数据
      this.list = []
      this.$refs['form_obj'].resetFields()
      this.$emit('doback')
    }
  }
}
</script>
<style scoped>
</style>

