• 动态的表格数据


    动态的获取标题内容,

    <thead>
            <tr>
                <th style=" auto;min- 101px;">商品名称(单位)</th>
                <volist name="result['user_list']" id="vo">
                <th style=" auto;min- 100px;">{$vo['name']}
                    <notempty name="vo['remark']">
                        ({$vo['remark']})
                    </notempty>
                </th>
                </volist>
            </tr>
    </thead>
    

    以产品为基调,动态的获取标题栏对应的底部内容,

    // 分门别类处理
    foreach ($product_list as $pk=>&$pv) {
        $pv['title'] = $pv['title'] . '(' . $pv['unit'] . ')';
        foreach ($user_list as $uk => $uv) {
            if ($user_product_count[$uv['id'] . '_' . $pv['id']]) {
                $pv[$uv['id']] = $user_product_count[$uv['id'] . '_' . $pv['id']];
            } else {
                $pv[$uv['id']] = 0;
            }
        }
    }
    

    处理数据展示,

    <tbody id="tbody">
            <volist name="result['product_list']" id="vo">
                <tr data-id="{$vo.id}">
                    <td>{$vo.title}</td>
                    <volist name="result['user_list']" id="uvo">
                        <td>
                            <notempty name="vo[$uvo['id']]">
                                <span style="font-weight: bold;font-size: 16px;">{$vo[$uvo['id']]}</span>
                                <else />
                                {$vo[$uvo['id']]}
                            </notempty>
    
                        </td>
                    </volist>
                </tr>
            </volist>
    </tbody>
    
  • 相关阅读:
    2013-2014 NBA 东西部决赛 + 总决赛合集
    小萌库
    小萌库一周电影大合集
    小萌库
    小萌库- 新海诚那些唯美感人的动漫
    小萌库 一周漫画精彩回顾
    小萌库
    Week10-数据库
    Week9-RabbitMQ、Redis、Mysql
    Week8-python(线程、进程、协程)
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/10797333.html
Copyright © 2020-2023  润新知