<template>
  <div>
    <div>
      <h4>政策延期</h4>
      <el-divider />
      <el-row :gutter="20">
        <el-col :span="2">延期方式</el-col>
        <el-col :span="3">  <el-radio v-model="value" :label="1">按政策延期</el-radio>
        </el-col>
      </el-row>
    </div>
    <div>
      <h4>政策</h4>
      <el-divider />
      <zj-table
        :table-attributes="tableAttributes"
        :is-drop="true"
        :columns="columns"
        :table-data="policyData"
      />
    </div>
    <div style="margin: 20px 0;">
      <el-button type="primary" size="mini" @click="">提交</el-button>
      <el-button type="primary" size="mini" @click="">审核</el-button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: 1,
      policyData: [],
      tableAttributes: {}
    }
  },
  computed: {
    columns() {
      return [
        {
          columnAttributes: {
            label: '销售政策编码',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '销售政策名称',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '销售政策类型',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '生效日期',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '失效日期',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '延期日期',
            prop: 'materialName'
          },
          render: (h, { column, row, index }) => {
            return <el-date-picker
              value={row.date}
              onInput={e => { row.date = e }}
              type='datetime'
              default-time='00:00:00'
              value-format='yyyy-MM-dd HH:mm:ss'
              placeholder='选择日期'>
            </el-date-picker>
          }
        },
        {
          columnAttributes: {
            label: '操作',
            prop: ''
          },
          render: (h, { column, row, index }) => {
            return (
              <div>
                <el-button
                  type='text'
                  size='default'
                  onClick={() => {

                  }}
                >
                      删除
                </el-button>
              </div>
            )
          }
        }
      ]
    }
  }
}
</script>

  <style lang="scss" scoped>

  </style>

