<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>活动报备单</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        font-family: STSong-Light;
      }
      .a4-container {
        width: 21cm;
        height: 29.7cm;
        margin: 0 auto;
      }
      table {
        color: #333;
        border-color: #ddd;
        margin: 0 auto;
        width: 100%;
        -pdf-keep-in-frame-mode: shrink;
      }
      table td {
        padding: 5px 3px;
      }
      table input {
        border: 0;
      }
      .topright {
        text-align: right;
      }
      img {
        max-width: 4cm;
      }
      .table-img {
        text-align: center;
      }
    </style>
  </head>
  <body>
    <div class="a4-container">
      <div
        style="
          font-size: 24px;
          text-align: center;
          line-height: 50px;
          margin-bottom: 20px;
        "
      >
        活动报备单
      </div>
      <div class="topright">
        费用归属单位：<span>{{ info.budget_agent_name }}</span>
      </div>
      <table cellpadding="0" cellspacing="0" class="auto-style1" border="1">
        <tr>
          <td rowspan="3" style="width: 4rem">活动信息</td>
          <td>是否通过审核</td>
          <td>
			{% if info.status == 1 %}
				是
			{% endif%}
		  </td>
          <td>活动主题</td>
          <td>{{ info.name }}</td>
          <td>活动日期</td>
          <td>{{ info.tm_start }} 到 {{ info.tm_end }}</td>
        </tr>
        <tr>
          <td>费用预算</td>
          <td>{{ info.budget }}</td>
          <td>活动执行地址</td>
          <td colspan="3">{{ info.address }}</td>
        </tr>
        <tr>
          <td>活动摘要</td>
          <td colspan="3">{{ info.digest }}</td>
          <td>备注</td>
          <td>{{ info.remark|default:"" }}</td>
        </tr>
        <tr>
          <td rowspan="2">申请信息</td>
          <td>申请人</td>
          <td>{{ info.username }}</td>
          <td>申请人部门</td>
          <td>{{ info.department|default:"" }}</td>
          <td>申请时间</td>
          <td>{{ info.tm }}</td>
        </tr>
        <tr>
          <td>审核人</td>
          <td>{{ info.permiter|default:"" }}</td>
          <td>审核时间</td>
          <td colspan="3">{{ info.permit_tm|default:"" }}</td>
        </tr>

        <tr>
          <td rowspan="1">用酒信息</td>
          <td colspan="6">
            <table cellpadding="0" cellspacing="0" border="1">
              <tr>
                <td>序号</td>
                <td>产品名称</td>
                <td>数量</td>
              </tr>
            {% for product in products %}
              <tr>
                <td>{{ forloop.counter }}</td>
                <td>{{ product.name }}</td>
                <td>{{ product.qty_x }}箱 {{product.qty_p}}瓶</td>
              </tr>
            {% endfor %}
            </table>
          </td>
        </tr>

        <tr>
          <td rowspan="1">照片信息</td>
          <td colspan="6">
            <div
              style="display: grid;grid-template-columns: repeat(3, 33.33%);              "
            >
            {% for photo in photos %}
              <img src="{{photo.url}}"/>
            {% endfor %}
            </div>
          </td>
        </tr>

        <tr>
          <td colspan="7">
            备注：<br />
            <div style="text-align: right; line-height: 30px">
              签名：<input style="width: 80px" type="text" /><br />
              <input style="width: 60px" type="text" />年<input
                style="width: 60px"
                type="text"
              />月<input style="width: 60px" type="text" />日
            </div>
          </td>
        </tr>
      </table>
    </div>
  </body>
</html>
