|
@@ -29,7 +29,10 @@
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
-<table style="margin: 0 auto;margin-top: 40px;width: 90%" >
|
|
|
+<table style="margin: 0 auto;width: 90%" >
|
|
|
+ <thead>
|
|
|
+ <tr><td style="border: 0;height: 40px"></td></tr>
|
|
|
+ </thead>
|
|
|
<tbody>
|
|
|
<tr >
|
|
|
<th colspan="6" style="text-align: center;"><h2>客户健康档案登记卡</h2></th>
|
|
@@ -38,21 +41,35 @@
|
|
|
<tr>
|
|
|
<th colspan="6"><h3><?= $question['content_title']?></h3></th>
|
|
|
</tr>
|
|
|
- <?php foreach($questions as $question){?>
|
|
|
+ <?php if ($question['content_sort'] > 0) {?>
|
|
|
<?php foreach($question['list'] as $key => $questionList){?>
|
|
|
- <?php if ($key % 3 == 0){?>
|
|
|
+ <?php if ((count($questionList['fields']) > 1)){?>
|
|
|
<tr>
|
|
|
- <?php }?>
|
|
|
- <?php if ((count($questionList['fields']) > 1)){?>
|
|
|
- <td><?= $questionList['fields']['question']?></td><td><strong>小红<?= count($question['list'])+1 ?></strong> </td>
|
|
|
-<!-- <td>性别</td><td><strong>女</strong></td>-->
|
|
|
-<!-- <td>年龄</td><td><strong>40岁</strong></td>-->
|
|
|
- <?php } else { ?>
|
|
|
- <td><?= ?></td><td><strong>小红<?= count($question['list'])+1 ?></strong> </td>
|
|
|
- <?php } ?>
|
|
|
- <?php if ((count($question['list'])+1) % 3 == 2){?>
|
|
|
+ <td rowspan="<?= count($questionList['fields'])?>"><?= $questionList['question'] ?></td>
|
|
|
+ <td><?= $questionList['fields'][0]['field_name']?></td><td colspan="4"><strong><?= $questionList['fields'][0]['field_value']?></strong> </td>
|
|
|
</tr>
|
|
|
- <?php } ?>
|
|
|
+ <?php foreach($questionList['fields'] as $fieldKey => $fieldList){?>
|
|
|
+ <?php if ($fieldKey > 0){?>
|
|
|
+ <tr>
|
|
|
+ <td><?= $fieldList['field_name']?></td><td colspan="4"><strong><?= $fieldList['field_value']?></strong> </td>
|
|
|
+ </tr>
|
|
|
+ <?php } ?>
|
|
|
+ <?php } ?>
|
|
|
+ <?php } else {?>
|
|
|
+ <?php if ($key % 3 == 0){?>
|
|
|
+ <tr>
|
|
|
+ <?php }?>
|
|
|
+ <?php foreach($questionList['fields'] as $fieldList){?>
|
|
|
+ <?php if ($fieldList['form_type'] == 'TEXTAREA'){?>
|
|
|
+ <td><?= $fieldList['field_name']?></td><td colspan="5"><strong><?= $fieldList['field_value']?></strong> </td>
|
|
|
+ <?php } else { ?>
|
|
|
+ <td><?= $fieldList['field_name']?></td><td><strong><?= $fieldList['field_value']?></strong> </td>
|
|
|
+ <?php } ?>
|
|
|
+ <?php } ?>
|
|
|
+ <?php if ($key % 3 == 2 || count($question['list']) == $key + 1){?>
|
|
|
+ </tr>
|
|
|
+ <?php } ?>
|
|
|
+ <?php }?>
|
|
|
<?php }?>
|
|
|
<?php }?>
|
|
|
<?php }?>
|