<template>
  <div>
    <h4>订单信息</h4>
    <el-divider />
    <div class="diy-table-1">
      <el-row>
        <el-col :span="8" class="item">
          <div class="label">销售退货单</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">订单日期</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">销售订单</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">经销商编号</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="16" class="item">
          <div class="label">经销商名称</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">销售政策编码</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="16" class="item">
          <div class="label">销售政策</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
      </el-row>
      <!-- 政策订单 -->
      <el-row v-if="moduleType === 1">
        <el-col :span="8" class="item">
          <div class="label">销售政策编码</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="16" class="item">
          <div class="label">销售政策</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="24" class="item">
          <div class="label">格力回复</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
      </el-row>
      <!-- 零售订单 -->
      <el-row v-if="moduleType === 2">
        <el-col :span="8" class="item">
          <div class="label">产品大类</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="16" class="item">
          <div class="label">销售订单类型</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
      </el-row>
      <!-- 商用工程订单 -->
      <el-row v-if="moduleType === 3">
        <el-col :span="8" class="item">
          <div class="label">工程信息编码</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">工程项目名称</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">工程信息单类型</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">厂工程编码</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">使用单位</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label" />
          <div class="value" />
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">联系人</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">固定电话</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">移动电话</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">不扣押金</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">文件编码</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="8" class="item">
          <div class="label">业务员</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="24" class="item">
          <div class="label">格力回复</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="24" class="item">
          <div class="label">格力内部备注</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24" class="item">
          <div class="label">备注</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">制单人</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">制单日期</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">审核人</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">审核日期</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">最后更新人</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">最后更新日期</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">关闭人</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="6" class="item">
          <div class="label">关闭日期</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
        <el-col :span="24" class="item">
          <div class="label">审核说明</div>
          <div class="value">{{ detailData.id }}</div>
        </el-col>
      </el-row>
    </div>
    <h4>货品信息</h4>
    <el-divider />
    <zj-table
      :table-attributes="tableAttributes"
      :is-drop="true"
      :columns="columns"
      :table-data="policyData"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      moduleType: 1,
      detailData: {},
      policyData: [],
      tableAttributes: {
        border: true,
        headerCellClassName: 'headerRowColor',
        size: 'mini',
        'summary-method': this.$getSummaries,
        'show-summary': true
      }
    }
  },
  computed: {
    columns() {
      return [
        {
          columnAttributes: {
            label: '序号',
            prop: '',
            type: 'index'
          }
        },
        {
          columnAttributes: {
            label: '销售类型',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '存货编码',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '物料代码',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '产品名称',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '规格型号',
            prop: 'materialName',
            width: 300
          }
        },
        {
          columnAttributes: {
            label: '单位',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '单价',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '工程信息数量',
            prop: 'materialName',
            width: 120

          }
        },
        {
          columnAttributes: {
            label: '已订数量',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '本次订货数量',
            prop: 'materialName',
            width: 120
          }
        },
        {
          columnAttributes: {
            label: '订单金额',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '返利类型',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '使用返利金额',
            prop: 'materialName',
            width: 120
          }
        },
        {
          columnAttributes: {
            label: '格力折扣',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '现金钱包',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '实付金额',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '直调',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '直调数量',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '原订单数量',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '备注',
            prop: 'materialName'
          }
        },
        {
          columnAttributes: {
            label: '税率',
            prop: 'materialName'
          }
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped></style>
