info.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <h1>
  5. {$breadcrumb2}
  6. <small>
  7. <i class="icon-double-angle-right"></i>
  8. {$crumbs}
  9. </small>
  10. </h1>
  11. </div>
  12. <ul class="nav nav-tabs">
  13. <li class="active"><a href="#tab-member" data-toggle="tab">后台用户资料</a></li>
  14. </ul>
  15. <form class="form-horizontal" id="validation-form" method="post" action='{$action}'>
  16. <div class="tab-content">
  17. <notempty name="Think.get.id">
  18. <input name="s_id" type="hidden" value="{$Think.get.id}" />
  19. </notempty>
  20. <div class="tab-pane active" id="tab-member">
  21. <table class="table table-binfoed">
  22. <tr>
  23. <td>ID</td>
  24. <td>{$data.s_id}</td>
  25. </tr>
  26. <tr>
  27. <td>LOGO</td>
  28. <td>
  29. <div class="col-sm-10" id="thumb">
  30. <a href="#" data-toggle="image" class="img-thumbnail">
  31. <img osctype="image" <if condition="$data['s_logo']">
  32. src="__ROOT__/{$data.thumb_logo}"
  33. <else />
  34. src="__ROOT__/Common/image/no_image_100x100.jpg"
  35. </if> />
  36. </a>
  37. <input osctype="image_input" type="hidden" name="s_logo" value="" id="input-s_logo" />
  38. </div>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td>用户名</td>
  43. <td>{$data.s_uname}</td>
  44. </tr>
  45. <tr>
  46. <td>密码</td>
  47. <td><input id="pwd" name="s_passwd" type="text" style="width:400px;" value="" /></td>
  48. </tr>
  49. <tr>
  50. <td>店铺名称</td>
  51. <td><input name="s_true_name" type="text" style="width:400px;" value="{$data.s_true_name|default=''}" />
  52. <span class="help-inline ">
  53. <span class="middle red">建议8个汉字以内</span>
  54. </span>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td>联系电话</td>
  59. <td><input name="s_telephone" type="text" style="width:400px;" value="{$data.s_telephone|default=''}" /></td>
  60. </tr>
  61. <tr>
  62. <td>客服电话</td>
  63. <td>
  64. <input name="s_mobile" type="text" style="width:400px;" value="{$data.s_mobile|default=''}" />
  65. </td>
  66. </tr>
  67. <tr>
  68. <td>客服qq</td>
  69. <td>
  70. <input name="s_qq" type="text" style="width:400px;" value="{$data.s_qq|default=''}" />
  71. <span class="help-inline ">
  72. <span class="middle">请使用该QQ登录一次<a href="http://shang.qq.com" target="_blank">shang.qq.com</a></span>
  73. </span>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>微信客服</td>
  78. <td>
  79. <input name="s_weixin" type="text" style="width:400px;" value="{$data.s_weixin|default=''}" />
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>支付宝</td>
  84. <td>
  85. <input name="s_alipay" type="text" style="width:400px;" value="<?php echo trim($data['s_alipay']); ?>" />
  86. </td>
  87. </tr>
  88. <tr>
  89. <td><span class="red">*</span>银行卡名称</td>
  90. <td>
  91. <input name="s_cardname" type="text" style="width:400px;" value="{$data.s_cardname|default=''}" />
  92. <span class="help-inline ">
  93. <span class="middle red">必填</span>
  94. </span>
  95. </td>
  96. </tr>
  97. <tr>
  98. <td><span class="red">*</span>银行卡账号</td>
  99. <td>
  100. <input name="s_cardnumber" type="text" style="width:400px;" value="{$data.s_cardnumber|default=''}" />
  101. <span class="help-inline ">
  102. <span class="middle red">必填</span>
  103. </span>
  104. </td>
  105. </tr>
  106. <tr>
  107. <td><span class="red">*</span>收款名称</td>
  108. <td>
  109. <input name="s_cardrealname" type="text" style="width:400px;" value="{$data.s_cardrealname|default=''}" />
  110. <span class="help-inline ">
  111. <span class="middle red">必填</span>
  112. </span>
  113. </td>
  114. </tr>
  115. <tr>
  116. <td>创建时间</td>
  117. <td>{$data.s_create_time|toDate='Y/m/d H:i:s'}</td>
  118. </tr>
  119. <tr>
  120. <td>状态</td>
  121. <td>
  122. <label class="radio-inline">
  123. <input type="radio" checked="checked" value="1" name="s_status">启用</label>
  124. <label class="radio-inline">
  125. <input type="radio" value="0" name="s_status">停用</label>
  126. </td>
  127. </tr>
  128. </table>
  129. <div class="form-group">
  130. <div style="margin-left:20px;">
  131. <input name="send" type="submit" value="提交" class="btn btn-primary" />
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </form>
  137. </block>
  138. <block name="javascript">
  139. <script src="__PUBLIC__/fileupload/jquery.ui.widget.js"></script>
  140. <script src="__PUBLIC__/fileupload/jquery.fileupload.js"></script>
  141. <script>
  142. $(function(){
  143. $(document).delegate('a[data-toggle=\'image\']', 'click', function(e) {
  144. e.preventDefault();
  145. var index=$(this).attr('num');
  146. var element = this;
  147. if(index==undefined){
  148. $(element).popover({
  149. html: true,
  150. placement: 'right',
  151. trigger: 'manual',
  152. content: function() {
  153. return '<button type="button" id="thumb-image" class="btn btn-primary"><i class="icon-edit"></i></button> <button type="button" id="button-clear" class="btn btn-danger"><i class="icon-trash"></i></button>';
  154. }
  155. });
  156. }else{
  157. $(element).popover({
  158. html: true,
  159. placement: 'right',
  160. trigger: 'manual',
  161. content: function() {
  162. return '<button type="button" n="'+index+'" class="btn btn-primary button-image"><i class="icon-edit"></i></button> <button type="button" id="button-clear" class="btn btn-danger"><i class="icon-trash"></i></button>';
  163. }
  164. });
  165. }
  166. $(element).popover('toggle');
  167. $('#thumb-image').on('click', function() {
  168. $('#modal-image').remove();
  169. $('#form-upload').remove();
  170. $('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input osctype="btn_upload_image" type="file" name="file" /></form>');
  171. $('#form-upload input[name=\'file\']').trigger('click');
  172. $(element).popover('hide');
  173. $('[osctype="btn_upload_image"]').fileupload({
  174. dataType: 'json',
  175. url: "{:U('Image/upload_image',array('dir'=>'seller'))}",
  176. add: function(e, data) {
  177. $parent = $('#thumb');
  178. $input = $parent.find('[osctype="image_input"]');
  179. $img = $parent.find('[osctype="image"]');
  180. data.formData = {old_blog_images:$input.val()};
  181. $img.attr('src', "__IMG__/loading.gif");
  182. data.submit();
  183. },
  184. done: function (e,data) {
  185. var image=data.result;
  186. $parent = $('#thumb');
  187. $input = $parent.find('[osctype="image_input"]');
  188. $img = $parent.find('[osctype="image"]');
  189. if(image) {
  190. // $img.prev('i').hide();
  191. $img.attr('src', '__ROOT__'+image.image_thumb);
  192. $img.show();
  193. $input.val(image.image);
  194. } else {
  195. alert('上传失败');
  196. }
  197. }
  198. });
  199. });
  200. $('#button-clear').on('click', function() {
  201. $(element).find('img').attr('src', $(element).find('img').attr('data-placeholder'));
  202. $(element).parent().find('input').attr('value', '');
  203. $(element).popover('hide');
  204. });
  205. });
  206. })
  207. </script>
  208. <script>
  209. $(function(){
  210. <present name="Think.get.id">
  211. Oscshop.setValue("a_status", {$data.a_status|default=1});
  212. </present>
  213. });
  214. </script>
  215. </block>