edit.php 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. use backend\assets\AppAsset;
  3. AppAsset::addScript($this, Yii::$app->request->baseUrl . "/js/pusha/discount.js");
  4. $get = Yii::$app->request->get();
  5. ?>
  6. <style>
  7. .layui_box {
  8. width: 80%;
  9. margin: 0 auto;
  10. margin-top: 25px;
  11. }
  12. .layui-code, .layui-upload-list {
  13. margin-top: 0;
  14. }
  15. hr {
  16. width: 100%;
  17. margin: 0 auto;
  18. }
  19. .mt {
  20. text-align: center;
  21. margin-top: 15px;
  22. }
  23. .The_house {
  24. background: #FBFBFB;
  25. color: #333;
  26. }
  27. .The_house:hover {
  28. border: 1px solid #a9a9a9;
  29. color: #333;
  30. }
  31. .xm_xcxqTc_button {
  32. margin-top: -20px;
  33. }
  34. </style>
  35. <form class="layui-form layui-form-pane">
  36. <div class="layui_box">
  37. <div class="layui-form-item">
  38. <label class="layui-form-label ">所属楼盘:</label>
  39. <div class="layui-input-inline" style="width:44.8%">
  40. <input type="text" id="house_name" name="house_name" disabled placeholder="请选择所属楼盘" autocomplete="off"
  41. <?php echo !empty($get['house_name']) ? 'value=' . $get['house_name'] : ''; ?> class="layui-input">
  42. </div>
  43. <div class="layui-inline"><a class="layui-btn layui-btn-primary The_house" href="javascript:;">选择所属楼盘</a>
  44. </div>
  45. </div>
  46. <?php if ((!empty($get['type']) && $get['type'] == 1) || (!empty($row) && $row['type'] == 1)) { ?>
  47. <div class="layui-form-item">
  48. <label class="layui-form-label">链接:</label>
  49. <div class="layui-input-inline" style="width:64%">
  50. <input type="text" name="url" <?php echo !empty($row) ? 'value=' . $row['url'] : ''; ?>
  51. placeholder="请输入跳转链接" autocomplete="off" class="layui-input">
  52. </div>
  53. </div>
  54. <div class="layui-form-item">
  55. <label class="layui-form-label">标题:</label>
  56. <div class="layui-input-inline" style="width:64%">
  57. <input type="text" name="title" <?php echo !empty($row) ? 'value=' . $row['title'] : ''; ?>
  58. placeholder="请输入标题内容" class="layui-input">
  59. </div>
  60. </div>
  61. <div class="layui-form-item">
  62. <label class="layui-form-label">优惠:</label>
  63. <div class="layui-input-inline" style="width:64%">
  64. <input type="text" name="subject" <?php echo !empty($row) ? 'value=' . $row['subject'] : ''; ?>
  65. placeholder="请输入优惠信息" autocomplete="off" class="layui-input">
  66. </div>
  67. </div>
  68. <?php } ?>
  69. <div class="layui-form-item mt">
  70. <?php if (!empty($get['type'])) { ?>
  71. <input type="hidden" name="type" value="<?php echo $get['type'] ?>">
  72. <?php } ?>
  73. <?php if (!empty($row)) { ?>
  74. <input type="hidden" name="id" value="<?php echo $row['id'] ?>">
  75. <input type="hidden" name="hid" value="<?php echo $row['hid'] ?>" id="hiddenBox">
  76. <?php } ?>
  77. <button class="layui-btn" lay-submit="" lay-filter="edit-row">提交</button>
  78. </div>
  79. </div>
  80. </form>