location_model.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <div class="clearfix user-browser">
  2. <div class="form-horizontal">
  3. <table class="table tb" style="min-width:568px;">
  4. <thead>
  5. <tr>
  6. <th style="width: 35px;" class="text-center">选择</th>
  7. <th style="width: 100px;">门店名称</th>
  8. <th style="width: 100px;">分店名称</th>
  9. <th style="width: 100px;">地址</th>
  10. </tr>
  11. </thead>
  12. <tbody class="location-list">
  13. {if !empty($location)}
  14. {loop $location $row}
  15. <tr id="loca-{$row['id']}">
  16. <td class="text-center"><input type="checkbox" id="chk_loca_{$row['id']}" name="locationids[]" data-id="{$row['id']}" value="{$row['location_id']}"></td>
  17. <td><label for="chk_loca_{$row['id']}" style="font-weight:normal;" class="name">{$row['business_name']}</label></td>
  18. <td><label style="font-weight:normal;" class="name">{$row['branch_name']}</label></td>
  19. <td><label class="label label-info address">{$row['address']}</label></td>
  20. </tr>
  21. {/loop}
  22. {else}
  23. <tr>
  24. <td align="center" colspan="3">没有有效的门店。你可以 <a href="{php echo url('wechat/manage/location_post');}" target="_blank">添加门店</a> 或 <a href="{php echo url('wechat/manage/export');}" target="_blank">更新门店</a></td>
  25. </tr>
  26. {/if}
  27. </tbody>
  28. </table>
  29. </div>
  30. </div>
  31. <script>
  32. var selected = $('#form4 input[name="location-select"]').val();
  33. if(selected) {
  34. selected = selected.split('-');
  35. for(var j=0;j<selected.length;j++) {
  36. $('.location-list :checkbox[value='+selected[j]+']').prop('checked', true);
  37. }
  38. }
  39. </script>