edit.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <style>
  2. /* 运费规则--区域弹窗*/
  3. /* 地域选择样式*/
  4. .regional-choice {
  5. display: none; }
  6. .layui-layer {
  7. z-index: 2000; }
  8. .layui-layer-content .regional-choice {
  9. display: block !important; }
  10. .checkbtn a {
  11. font-size: 1.4rem;
  12. color: #333;
  13. text-decoration: none;
  14. cursor: pointer; }
  15. .fr {
  16. float: right; }
  17. .clearfloat {
  18. zoom: 1; }
  19. .clearfloat:after {
  20. display: block;
  21. clear: both;
  22. content: "";
  23. visibility: hidden;
  24. height: 0; }
  25. .place-div label {
  26. font-weight: 400;
  27. font-size: 1.4rem; }
  28. .place-div input[type=checkbox] {
  29. margin-right: .3rem; }
  30. .place-div > div {
  31. width: 100%;
  32. padding: 10px 30px; }
  33. .place-div .checkbtn {
  34. background-color: #fbfbfb;
  35. text-align: right; }
  36. .place-div .checkbtn img {
  37. height: 10px;
  38. margin-left: 3px; }
  39. .place-div .checkbtn .ri {
  40. border-right: none; }
  41. .place-div .checkbtn a {
  42. height: 30px;
  43. line-height: 30px;
  44. display: inline-block;
  45. width: 60px;
  46. text-align: center; }
  47. .place-div .smallplace .ratio {
  48. color: red; }
  49. .place-div .smallplace label {
  50. padding-right: 10px;
  51. text-align: left;
  52. width: auto;
  53. float: left;
  54. cursor: pointer; }
  55. .place-div .smallplace .citys {
  56. width: auto;
  57. background-color: #fff;
  58. position: absolute;
  59. top: 35px;
  60. border: 1px solid #ccc;
  61. z-index: 100;
  62. visibility: hidden; }
  63. .place-div .smallplace .citys > i.jt {
  64. width: 0;
  65. height: 0;
  66. border-left: 8px solid transparent;
  67. border-right: 8px solid transparent;
  68. border-bottom: 10px solid #ccc;
  69. position: absolute;
  70. top: -10px;
  71. left: 20px; }
  72. .place-div .smallplace .citys > i.jt i {
  73. width: 0;
  74. height: 0;
  75. border-left: 8px solid transparent;
  76. border-right: 8px solid transparent;
  77. border-bottom: 10px solid #fff;
  78. position: absolute;
  79. top: 2px;
  80. left: -8px; }
  81. .place-div .smallplace .citys .row-div {
  82. min-width: 250px;
  83. padding: 10px;
  84. box-sizing: border-box; }
  85. .place-div .smallplace .citys .row-div label span {
  86. max-width: 175px;
  87. white-space: nowrap;
  88. vertical-align: middle;
  89. font-size: 1.4rem; }
  90. .place-div .smallplace .place-tooltips:hover .citys {
  91. visibility: visible; }
  92. .place-div .smallplace p {
  93. float: left;
  94. width: auto;
  95. margin: 2px 0; }
  96. .place-div .smallplace > div {
  97. float: left;
  98. width: 170px;
  99. margin: 0;
  100. padding-bottom: 10px;
  101. padding-top: 5px;
  102. position: relative; }
  103. .show-place-div {
  104. margin-left: 85px;
  105. font-size: 15px; }
  106. .show-place-div .smallplace label {
  107. min-width: 105px;
  108. width: auto; }
  109. .show-place-div .smallplace input {
  110. margin-left: 0; }
  111. .show-place-div .smallplace .citys .row-div p {
  112. margin: 5px 0 10px 0; }
  113. table input{
  114. width: 80px!important;
  115. }
  116. </style>
  117. <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  118. <div class="form-group">
  119. <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  120. <div class="col-xs-12 col-sm-8">
  121. <input id="c-title" class="form-control" name="row[name]" type="text" data-rule="required" value="{$row.name}" >
  122. </div>
  123. </div>
  124. <div class="form-group">
  125. <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Min buy')}:</label>
  126. <div class="col-xs-12 col-sm-8">
  127. <input id="c-min" class="form-control" name="row[min]" type="number" data-rule="required" value="{$row.min}" min="1" >
  128. </div>
  129. </div>
  130. <div class="form-group">
  131. <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
  132. <div class="col-xs-12 col-sm-8">
  133. {:build_radios('row[type]', ['quantity'=>__('Quantity'), 'weight'=>__('Weight')],$row['type'])}
  134. </div>
  135. </div>
  136. <div class="form-group">
  137. <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Delivery area')}</label>
  138. <div class="col-xs-12 col-sm-8">
  139. <table class="table table-hover regional-table">
  140. <thead>
  141. <tr>
  142. <th>{:__('Can delivery area')}</th>
  143. <th>{:__('First')}</th>
  144. <th>{:__('First fee')}</th>
  145. <th>{:__('Additional')}</th>
  146. <th>{:__('Additional fee')}</th>
  147. </tr>
  148. </thead>
  149. <tbody>
  150. {foreach name='$row["rule"]' item='vo'}
  151. <tr>
  152. <td class="text-left">
  153. <p class="selected-content am-margin-bottom-xs">
  154. {$vo['area_content']}
  155. </p>
  156. <p>
  157. <a class="edit" href="javascript:;">编辑</a>
  158. <a class="delete" href="javascript:;">删除</a>
  159. </p>
  160. <input type="hidden" name="row[area][]" value="{$vo['area']}">
  161. </td>
  162. <td>
  163. <input type="number" name="row[first][]" min="1" value="{$vo['first']}" required>
  164. </td>
  165. <td>
  166. <input type="number" name="row[first_fee][]" min="0" value="{$vo['first_fee']}" required>
  167. </td>
  168. <td>
  169. <input type="number" name="row[additional][]" min="1" value="{$vo['additional']}">
  170. </td>
  171. <td>
  172. <input type="number" name="row[additional_fee][]" min="0" value="{$vo['additional_fee']}">
  173. </td>
  174. </tr>
  175. {/foreach}
  176. <tr>
  177. <td colspan="5">
  178. <a class="add-region am-btn am-btn-default am-btn-xs" href="javascript:;">
  179. <i class="iconfont icon-dingwei"></i>
  180. 点击添加可配送区域和运费
  181. </a>
  182. </td>
  183. </tr>
  184. </tbody>
  185. </table>
  186. </div>
  187. </div>
  188. <div class="form-group">
  189. <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
  190. <div class="col-xs-12 col-sm-8">
  191. <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}">
  192. </div>
  193. </div>
  194. <div class="form-group layer-footer">
  195. <label class="control-label col-xs-12 col-sm-2"></label>
  196. <div class="col-xs-12 col-sm-8">
  197. <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  198. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  199. </div>
  200. </div>
  201. </form>
  202. <div class="regional-choice"></div>
  203. <script>
  204. // 初始化区域选择界面
  205. datas = JSON.parse('{$areaData}');
  206. </script>