edit.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <?php
  2. use backend\assets\AppAsset;
  3. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/plug-in/ueditor/1.4.3/ueditor.config.js");
  4. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/plug-in/ueditor/1.4.3/ueditor.all.min.js");
  5. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/plug-in/ueditor/1.4.3/lang/zh-cn/zh-cn.js");
  6. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/grouppurchase.js");
  7. ?>
  8. <style>
  9. .layui_box {width:60%;margin:0 auto;margin-top:25px;}
  10. .layui-code, .layui-upload-list {margin-top:0;}
  11. hr {width:100%;margin:0 auto;}
  12. .mt {text-align:center;margin-top:15px;}
  13. .The_house {background:#FBFBFB;color:#333;}
  14. .The_house:hover {border:1px solid #a9a9a9;color:#333;}
  15. .xm_qytc_box{width:920px;margin:auto;margin-top:20px;}
  16. .xm_xcxqTc_img{margin:0;}
  17. .xm_xcxqTc_button{position:absolute;bottom:0;left:0;}
  18. .xm_pr{position:relative;}
  19. .ml{margin-left:18px}
  20. /*.layui-form-pane .layui-form-checkbox{position:absolute;bottom:0;left:100px;}*/
  21. .layui-upload-img{display: inline-block;height:120px;width: 120px;border: 1px solid #999;margin-right: 10px;position: absolute;position: relative;
  22. overflow: hidden;}
  23. .layui-upload-img img{display: block;height: 100%;width: 100%;}
  24. .close-icon{position: absolute;right:5px;top: 1px;color: #000;cursor: pointer;}
  25. </style>
  26. <form class="layui-form layui-form-pane" id="signupForm">
  27. <div class="layui_box">
  28. <div class="layui-form-item">
  29. <label class="layui-form-label">所属区域:</label>
  30. <div class="layui-input-block" style="width:32%">
  31. <select name="city" lay-filter="aihao">
  32. <option value="">请选择</option>
  33. <?php foreach ($city as $val) { ?>
  34. <option value="<?php echo $val['id']?>" <?php if($val['id'] == $group['city']) echo 'selected' ?>><?php echo $val['city_name'] ?></option>
  35. <?php }?>
  36. </select>
  37. </div>
  38. </div>
  39. <div class="layui-form-item">
  40. <label class="layui-form-label ">所属楼盘:</label>
  41. <div class="layui-input-inline">
  42. <input type="text" id="house_name" name="house_name" value="<?php echo $post['house_name'] ?>" lay-verify="required" disabled placeholder="请输入分类名称" autocomplete="off" class="layui-input">
  43. </div>
  44. <div class="layui-inline"><a class="layui-btn layui-btn-primary The_house" href="javascript:;">选择所属楼盘</a></div>
  45. </div>
  46. <div class="layui-form-item">
  47. <label class="layui-form-label">标题:</label>
  48. <div class="layui-input-inline" style="width:32%">
  49. <input type="text" name="title" value="<?php echo $group['title'] ?>" placeholder="请输入标题" autocomplete="off" class="layui-input">
  50. </div>
  51. </div>
  52. <div class="layui-form-item">
  53. <label class="layui-form-label">关键词:</label>
  54. <div class="layui-input-inline" style="width:32%">
  55. <input type="text" name="keyword" value="<?php echo $group['keyword'] ?>" placeholder="请输入关键词" autocomplete="off" class="layui-input">
  56. </div>
  57. </div>
  58. <div class="layui-form-item">
  59. <label class="layui-form-label">描述:</label>
  60. <!-- <div class="layui-input-inline" style="width:32%">
  61. <input type="text" name="description" value="" placeholder="请输入描述" autocomplete="off" class="layui-input">
  62. </div> -->
  63. <textarea cols="43" rows="5" name="description" placeholder="请输入描述">
  64. <?php echo $group['description'] ?>
  65. </textarea>
  66. </div>
  67. <div class="layui-form-item">
  68. <label class="layui-form-label">项目地址:</label>
  69. <div class="layui-input-inline" style="width:32%">
  70. <input type="text" name="address" value="<?php echo $group['address'] ?>" placeholder="请输入项目地址" autocomplete="off" class="layui-input">
  71. </div>
  72. </div>
  73. <div class="layui-form-item">
  74. <label class="layui-form-label">团购类型:</label>
  75. <div class="layui-input-inline" style="width:32%">
  76. <input type="text" name="type" placeholder="请输入团购类型" value="<?php echo $group['type'] ?>" autocomplete="off" class="layui-input">
  77. </div>
  78. </div>
  79. <div class="layui-form-item xm_pr">
  80. <div class="layui-inline">
  81. <label class="layui-form-label">PC封面图:</label>
  82. <!-- <div class="layui-input-inline" style="width:270px;">
  83. <input type="text" name="thumbnail" value="" autocomplete="off" class="layui-input">
  84. </div> -->
  85. <div class="layui-inline">
  86. <div class="layui-upload">
  87. <div class="layui-upload-list lay_p_relative"> <!--低级添加 lay_p_relative-->
  88. <img class="layui-upload-img layui_magnify" name="img_pc" src="<?php echo $group['img_pc'] ?>" id="breviary_img" style="width:100px;height:80px;margin-left:10px;">
  89. <p id="demoText"></p>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <button type="button" class="layui-btn layui-btn-primary xm_xcxqTc_button" id="img_pc">选择图片</button>
  95. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="like[write]" title="水印">-->
  96. </div>
  97. <div class="layui-form-item xm_pr">
  98. <div class="layui-inline">
  99. <label class="layui-form-label">手机端封面图:</label>
  100. <!-- <div class="layui-input-inline" style="width:270px;">
  101. <input type="text" name="thumbnail" value="" autocomplete="off" class="layui-input">
  102. </div> -->
  103. <div class="layui-inline">
  104. <div class="layui-upload">
  105. <div class="layui-upload-list lay_p_relative"> <!--低级添加 lay_p_relative-->
  106. <img class="layui-upload-img layui_magnify" name="img_mobile" src="<?php echo $group['img_mobile'] ?>" id="img_mobile_src" style="width:100px;height:80px;margin-left:10px;">
  107. <p id="demoText"></p>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <button type="button" class="layui-btn layui-btn-primary xm_xcxqTc_button" id="img_mobile">选择图片</button>
  113. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="like[write]" title="水印">-->
  114. </div>
  115. <div class="layui-form-item xm_pr">
  116. <div class="layui-upload">
  117. <button type="button" class="layui-btn" id="upload_edit">多图片上传</button>
  118. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="thumb_size" value="2" title="大图"> -->
  119. <input type="checkbox" class="xm_xcxqTc_button" name="thumb_watermark" value="1" checked title="水印">
  120. <span style="color:red;font-size:12px;margin-left:5px;">(水印默认选中,不添加水印去掉勾选!)</span>
  121. <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
  122. 预览图:
  123. <div class="layui-upload-list" id="demo2">
  124. <?php if(isset($group['many_img'])): foreach ($group['many_img'] as $key=>$val):?>
  125. <div class="layui-upload-img">
  126. <div class="delete-list" id="delimg"><i class="layui-icon fa-trash-o" >&#xe640;</i></div>
  127. <img imgname="<?=$val?>" src="<?php echo Yii::$app->params['httpImg']['host'].Yii::$app->params['httpImg']['group'].$val ?>" >
  128. </div>
  129. <?php endforeach; endif;?>
  130. </div>
  131. </blockquote>
  132. </div>
  133. </div>
  134. <div class="layui-form-item">
  135. <label class="layui-form-label">优惠说明:</label>
  136. <div class="layui-input-inline" style="width:32%">
  137. <input type="text" name="odiscount" value="<?php echo $group['odiscount'] ?>" placeholder="请输入优惠说明" autocomplete="off" class="layui-input">
  138. </div>
  139. </div>
  140. <div class="layui-form-item">
  141. <label class="layui-form-label">咨询电话:</label>
  142. <div class="layui-input-inline" style="width:32%">
  143. <input type="text" name="tel" placeholder="请输入咨询电话" value="<?php echo $group['tel'] ?>" autocomplete="off" class="layui-input">
  144. </div>
  145. </div>
  146. <div class="layui-form-item">
  147. <label class="layui-form-label">市场价格:</label>
  148. <div class="layui-input-inline" style="width:32%">
  149. <input type="text" name="market_pricce" placeholder="请输入市场价格" value="<?php echo $group['market_pricce'] ?>" autocomplete="off" class="layui-input">
  150. </div>
  151. </div>
  152. <div class="layui-form-item">
  153. <label class="layui-form-label">团购价格:</label>
  154. <div class="layui-input-inline" style="width:32%">
  155. <input type="text" name="group_price" placeholder="请输入团购价格" value="<?php echo $group['group_price'] ?>" autocomplete="off" class="layui-input">
  156. </div>
  157. </div>
  158. <div class="layui-form-item">
  159. <label class="layui-form-label">开始时间:</label>
  160. <div class="layui-input-inline" style="width:32%">
  161. <input type="text" name="start_date" placeholder="请输入开始时间" value="<?php echo $group['start_date'] ?>" id="s_date" autocomplete="off" class="layui-input">
  162. </div>
  163. </div>
  164. <div class="layui-form-item">
  165. <label class="layui-form-label">结束时间:</label>
  166. <div class="layui-input-inline" style="width:32%">
  167. <input type="text" name="end_date" placeholder="请输入结束时间" value="<?php echo $group['end_date'] ?>" id="e_date" autocomplete="off" class="layui-input">
  168. </div>
  169. </div>
  170. <div class="layui-form-item">
  171. <label class="layui-form-label">点击数:</label>
  172. <div class="layui-input-inline" style="width:32%">
  173. <input type="text" name="clicks" placeholder="请输入点击数" value="<?php echo $group['clicks'] ?>" autocomplete="off" class="layui-input">
  174. </div>
  175. </div>
  176. <div class="layui-form-item">
  177. <label class="layui-form-label">报名人数:</label>
  178. <div class="layui-input-inline" style="width:32%">
  179. <input type="text" name="sign_num" placeholder="请输入点击数" value="<?php echo $group['sign_num'] ?>" autocomplete="off" class="layui-input">
  180. </div>
  181. </div>
  182. <div class="layui-form-item">
  183. <label class="layui-form-label">显示/隐藏</label>
  184. <div class="layui-input-block">
  185. <input type="radio" name="is_view" value="1" <?php if($group['is_view']==1) echo 'checked' ?> title="显示">
  186. <input type="radio" name="is_view" value="2" <?php if($group['is_view']==2) echo 'checked' ?> title="隐藏" >
  187. </div>
  188. </div>
  189. <div class="layui-form-item">
  190. <label class="layui-form-label">排序:</label>
  191. <div class="layui-input-inline" style="width:32%">
  192. <input type="text" name="sort" placeholder="排序" value="<?php echo $group['sort'] ?>" autocomplete="off" class="layui-input">
  193. </div>
  194. </div>
  195. <div class="layui-form-item">
  196. <label class="layui-form-label">简介:</label>
  197. <textarea name="content" id="editor" cols="30" rows="10" style="width:100%;height:400px;float:left;"><?php echo $group['content'] ?></textarea>
  198. </div>
  199. <div class="layui-form-item mt">
  200. <input type="hidden" name="id" value="<?php echo $group['id'] ?>">
  201. <input type="hidden" id="hiddenBox" name="hid" value="<?php echo $group['hid'] ?>" />
  202. <button class="layui-btn" lay-submit="" lay-filter="edit_group_submit">提交</button>
  203. </div>
  204. </div>
  205. </form>