form.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. {extend name='admin@main'}
  2. {block name="content"}
  3. {include file='store@goods/form_style'}
  4. <form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
  5. <div class="layui-card-body think-box-shadow padding-left-40">
  6. <div class="layui-form-item layui-row layui-col-space15">
  7. <label class="layui-col-xs3 relative">
  8. <span class="color-green">类型</span>
  9. <div class="block">
  10. {foreach ['买','卖'] as $k=>$pro}
  11. <label class="think-radio">
  12. {if isset($vo['type']) && $vo['type'] eq $k}
  13. <input checked type="radio" name="type" value="{$k}" lay-ignore> {$pro}
  14. {else}
  15. <input type="radio" name="type" value="{$k}" lay-ignore> {$pro}
  16. {/if}
  17. </label>
  18. {/foreach}
  19. </div>
  20. </label>
  21. </div>
  22. <div class="layui-form-item layui-row layui-col-space15">
  23. <label class="layui-col-xs3 relative">
  24. <span class="color-green">车型</span>
  25. <select class="layui-select" required name="chexing" lay-search>
  26. {foreach $chexing_ids as $cate}
  27. {if isset($vo.chexing) and $vo.chexing eq $cate.id}
  28. <option selected value="{$cate.id}">{$cate.id} - {$cate.name|default=''}</option>
  29. {else}
  30. <option value="{$cate.id}">{$cate.id} - {$cate.name|default=''}</option>
  31. {/if}
  32. {/foreach}
  33. </select>
  34. </label>
  35. <label class="layui-col-xs3 relative">
  36. <span class="color-green">品牌</span>
  37. <select class="layui-select" required name="pinpai" lay-search>
  38. {foreach $pinpai as $cate}
  39. {if isset($vo.pinpai) and $vo.pinpai eq $cate.id}
  40. <option selected value="{$cate.id}">{$cate.id} - {$cate.name|default=''}</option>
  41. {else}
  42. <option value="{$cate.id}">{$cate.id} - {$cate.name|default=''}</option>
  43. {/if}
  44. {/foreach}
  45. </select>
  46. </label>
  47. <label class="layui-col-xs3 relative">
  48. <span class="color-green">车辆编号</span>
  49. <input name="cheliangbiaohao" required class="layui-input" placeholder="请输入车辆编号" value="{$vo.cheliangbiaohao|default=''}">
  50. </label>
  51. </div>
  52. <div class="layui-form-item">
  53. <span class="color-green label-required-prev">轮播图</span>
  54. <table class="layui-table">
  55. <thead>
  56. <tr>
  57. <th class="text-left">展示图片</th>
  58. </tr>
  59. <tr>
  60. <td width="auto" class="text-left"><input name="image" type="hidden" value="{$vo.image|default=''}"></td>
  61. </tr>
  62. </thead>
  63. </table>
  64. <script>$('[name="image"]').uploadMultipleImage()</script>
  65. </div>
  66. <div class="layui-form-item layui-row layui-col-space15">
  67. <label class="layui-col-xs3 relative">
  68. <span class="color-green">车龄</span>
  69. <div style="display: flex">
  70. <input name="cheling" required class="layui-input" style="width: 80%" placeholder="请输入车龄" value="{$vo.cheling|default=''}">
  71. <p style="margin-top: 6px;">个月</p>
  72. </div>
  73. </label>
  74. <label class="layui-col-xs3 relative">
  75. <span class="color-green">车辆性质</span>
  76. <input name="cheliangxingzhi" required class="layui-input" placeholder="请输入车辆性质 如营运,非营运" value="{$vo.cheliangxingzhi|default=''}">
  77. </label>
  78. <label class="layui-col-xs3 relative">
  79. <span class="color-green">车辆类型</span>
  80. <input name="cheliangleixing" required class="layui-input" placeholder="请输入车辆类型 如油车" value="{$vo.cheliangleixing|default=''}">
  81. </label>
  82. </div>
  83. <div class="layui-form-item layui-row layui-col-space15">
  84. <label class="layui-col-xs3 relative">
  85. <span class="color-green">里程</span>
  86. <div style="display: flex">
  87. <input name="licheng" required class="layui-input" style="width: 80%" placeholder="请输入里程" value="{$vo.licheng|default=''}">
  88. <p style="margin-top: 6px;">万公里</p>
  89. </div>
  90. </label>
  91. <label class="layui-col-xs3 relative">
  92. <span class="color-green">箱体宽度</span>
  93. <div style="display: flex">
  94. <input name="xiangtikuandu" required class="layui-input" style="width: 80%" placeholder="请输入箱体宽度" value="{$vo.xiangtikuandu|default=''}">
  95. <p style="margin-top: 6px;">米</p>
  96. </div>
  97. </label>
  98. </div>
  99. <div class="layui-form-item layui-row layui-col-space15">
  100. <label class="layui-col-xs3 relative">
  101. <span class="color-green">是否有通行证</span>
  102. <div class="block">
  103. {foreach ['是','否'] as $k=>$pro}
  104. <label class="think-radio">
  105. {if isset($vo['tongxingzheng']) && $vo['tongxingzheng'] eq $k}
  106. <input checked type="radio" name="tongxingzheng" value="{$k}" lay-ignore> {$pro}
  107. {else}
  108. <input type="radio" name="tongxingzheng" value="{$k}" lay-ignore> {$pro}
  109. {/if}
  110. </label>
  111. {/foreach}
  112. </div>
  113. </label>
  114. <label class="layui-col-xs3 relative">
  115. <span class="color-green">是否有尾板</span>
  116. <div class="block">
  117. {foreach ['是','否'] as $k=>$pro}
  118. <label class="think-radio">
  119. {if isset($vo['weiban']) && $vo['weiban'] eq $k}
  120. <input checked type="radio" name="weiban" value="{$k}" lay-ignore> {$pro}
  121. {else}
  122. <input type="radio" name="weiban" value="{$k}" lay-ignore> {$pro}
  123. {/if}
  124. </label>
  125. {/foreach}
  126. </div>
  127. </label>
  128. </div>
  129. <div class="layui-form-item layui-row layui-col-space15">
  130. <label class="layui-col-xs3 relative">
  131. <span class="color-green">车池经理</span>
  132. <input name="chechijingli" required class="layui-input" placeholder="请输入车池经理" value="{$vo.chechijingli|default=''}">
  133. </label>
  134. <label class="layui-col-xs3 relative">
  135. <span class="color-green">首次登记日期</span>
  136. <input name="shoucidengjiriqi" required class="layui-input" placeholder="请输入首次登记日期" value="{$vo.shoucidengjiriqi|default=''}" id="test1">
  137. </label>
  138. </div>
  139. <div class="layui-form-item layui-row layui-col-space15">
  140. <label class="layui-col-xs9 relative">
  141. <div class="layui-col-xs4"><select class="layui-select block full-width" lay-ignore name="form_province"></select></div>
  142. <div class="layui-col-xs4"><select class="layui-select block full-width" lay-ignore name="form_city"></select></div>
  143. <div class="layui-col-xs4"><select class="layui-select block full-width" lay-ignore name="form_area"></select></div>
  144. </label>
  145. </div>
  146. <div class="layui-form-item layui-row layui-col-space15">
  147. <label class="layui-col-xs3 relative">
  148. <span class="color-green">发动机型号</span>
  149. <input name="fadongjixinghao" required class="layui-input" placeholder="请输入发动机型号" value="{$vo.fadongjixinghao|default=''}">
  150. </label>
  151. <label class="layui-col-xs3 relative">
  152. <span class="color-green"> 马力</span>
  153. <div style="display: flex">
  154. <input name="mali" required class="layui-input" style="width: 80%" placeholder="请输入马力" value="{$vo.mali|default=''}">
  155. <p style="margin-top: 6px;"> 匹</p>
  156. </div>
  157. </label>
  158. </div>
  159. <div class="layui-form-item layui-row layui-col-space15">
  160. <label class="layui-col-xs3 relative">
  161. <span class="color-green">商业保险额</span>
  162. <div style="display: flex">
  163. <input name="shangyebaoxiane" required class="layui-input" style="width: 80%" placeholder="请输入商业保险额" value="{$vo.shangyebaoxiane|default=''}">
  164. <p style="margin-top: 6px;">万元</p>
  165. </div>
  166. </label>
  167. </div>
  168. <div class="layui-form-item layui-row layui-col-space15">
  169. <label class="layui-col-xs3 relative">
  170. <span class="color-green">租赁价格</span>
  171. <div style="display: flex">
  172. <input name="jiage" required class="layui-input" style="width: 80%" placeholder="请输入租赁价格" value="{$vo.jiage|default=''}">
  173. <p style="margin-top: 6px;">元/月</p>
  174. </div>
  175. </label>
  176. </div>
  177. <div class="layui-form-item text-center">
  178. {notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
  179. <button class="layui-btn layui-btn-danger" ng-click="hsitoryBack()" type="button">取消编辑</button>
  180. <button class="layui-btn" type="submit">保存商品</button>
  181. </div>
  182. </div>
  183. </form>
  184. {/block}
  185. {block name='script'}
  186. <script>
  187. require(['pcasunzips'], function () {
  188. new PCAS("form_province", "form_city", "form_area", '{$vo.express_province|default=""}', '{$vo.express_city|default=""}', '{$vo.express_area|default=""}');
  189. laydate.render({
  190. elem: '#test1'
  191. });
  192. window.form.render();
  193. });
  194. </script>
  195. ]
  196. {/block}