step3.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. {extend name="default/base/base_joinin" /}
  2. {block name="joinin_main"}
  3. <div class="breadcrumb"><span class="iconfont">&#xe6ff;</span><span><a href="">{$Think.lang.homepage}</a></span> <span class="arrow">></span> <span>{$Think.lang.merchant_entry_application}</span> </div>
  4. <div class="main">
  5. <div class="sidebar">
  6. <div class="title">
  7. <h3>{$Think.lang.merchant_entry_application}</h3>
  8. </div>
  9. <div class="content">
  10. <dl>
  11. <dt class="{if $sub_step=='step0'}current{/if}"> <i class="right"></i>{$Think.lang.enter_agreement}</dt>
  12. </dl>
  13. <dl show_id="0">
  14. <dt onclick="show_list('0');" style="cursor: pointer;"> <i class="down"></i>{$Think.lang.submit_application}</dt>
  15. <dd>
  16. <ul>
  17. <li class="{if $sub_step == 'step1'}current{/if}"><i></i>{$Think.lang.store_qualification_information}</li>
  18. <li class="{if $sub_step == 'step2'}current{/if}"><i></i>{$Think.lang.financial_qualification_information}</li>
  19. <li class="{if $sub_step == 'step3'}current{/if}"><i></i>{$Think.lang.store_operation_information}</li>
  20. </ul>
  21. </dd>
  22. </dl>
  23. <dl>
  24. <dt class="{if $sub_step == 'pay'}current{/if}"> <i class="right"></i>{$Think.lang.contract_signing_payment}</dt>
  25. </dl>
  26. <dl>
  27. <dt> <i class="right"></i>{$Think.lang.store_opening}</dt>
  28. </dl>
  29. </div>
  30. <div class="title">
  31. <h3>{$Think.lang.platform_contact}</h3>
  32. </div>
  33. <div class="content">
  34. <ul>
  35. <li>{$Think.lang.phone}:{$Think.config.ds_config.site_phone}</li>
  36. <li>{$Think.lang.email}:{$Think.config.ds_config.site_email}</li>
  37. </ul>
  38. </div>
  39. </div>
  40. <div class="right-layout">
  41. <div class="joinin-step">
  42. <ul>
  43. <li class="step1 {if $sub_step >= 'step0'}current{/if} {if $sub_step == 'pay'}current{/if}"><span>{$Think.lang.enter_agreement}</span></li>
  44. <li class="{if $sub_step >= 'step1'}current{/if} {if $sub_step == 'pay'}current{/if}"><span>{$Think.lang.store_qualification_information}</span></li>
  45. <li class="{if $sub_step >= 'step2'}current{/if} {if $sub_step == 'pay'}current{/if}"><span>{$Think.lang.financial_qualification_information}</span></li>
  46. <li class="{if $sub_step >= 'step3'}current{/if} {if $sub_step == 'pay'}current{/if}"><span>{$Think.lang.store_operation_information}</span></li>
  47. <li class="{if $sub_step >= 'step4'}current{/if} {if $sub_step == 'pay'}current{/if}"><span>{$Think.lang.contract_signing_payment}</span></li>
  48. <li class="step6"><span>{$Think.lang.store_opening}</span></li>
  49. </ul>
  50. </div>
  51. <div class="joinin-concrete">
  52. <!-- 店铺信息 -->
  53. <div id="apply_store_info" class="apply-store-info">
  54. <div class="alert">
  55. <h4>{$Think.lang.matters_needing_attention}:</h4>
  56. {$Think.lang.merchant_information1}</div>
  57. <form id="form_store_info" action="{:url('Sellerjoininc2c/step4')}" method="post" >
  58. <table border="0" cellpadding="0" cellspacing="0" class="all">
  59. <thead>
  60. <tr>
  61. <th colspan="20">{$Think.lang.store_operation_information}</th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. <tr>
  66. <th class="w150"><i>*</i>{$Think.lang.store_name}:</th>
  67. <td><input name="store_name" type="text" class="w200"/>
  68. <span></span>
  69. <p class="emphasis">{$Think.lang.merchant_information3}</p></td>
  70. </tr>
  71. <tr>
  72. <th><i>*</i>{$Think.lang.store_level}:</th>
  73. <td><select name="storegrade_id" id="storegrade_id">
  74. <option value="">{$Think.lang.ds_please_choose}</option>
  75. {notempty name="grade_list"}
  76. {foreach name="grade_list" item="v" key="k" }
  77. {php}$goods_limit = empty($v['storegrade_goods_limit'])?lang('no_limit'):$v['storegrade_goods_limit'];{/php}
  78. {php}$explain = lang('commodity_number').':'.$goods_limit.lang('fee_standard').' :'.$v['storegrade_price'];{/php}
  79. <option value="{$v.storegrade_id}" data-explain="{$explain}">{$v.storegrade_name}</option>
  80. {/foreach}
  81. {/notempty}
  82. </select>
  83. <input id="storegrade_name" name="storegrade_name" type="hidden" />
  84. <span></span>
  85. <div id="grade_explain" class="grade_explain"></div></td>
  86. </tr>
  87. <tr>
  88. <th><i>*</i>{$Think.lang.store_opening_hours}:</th>
  89. <td><select name="joinin_year" id="joinin_year">
  90. <option value="1">1 {$Think.lang.year}</option>
  91. <option value="2">2 {$Think.lang.year}</option>
  92. </select></td>
  93. </tr>
  94. <tr>
  95. <th><i>*</i>{$Think.lang.store_classification}:</th>
  96. <td><select name="storeclass_id" id="storeclass_id">
  97. <option value="">{$Think.lang.ds_please_choose}</option>
  98. {notempty name="store_class"}
  99. {foreach name="store_class" item="v" key="k" }
  100. <option value="{$v.storeclass_id}">{$v.storeclass_name} ({$Think.lang.margin}:{$v.storeclass_bail} {$Think.lang.ds_yuan})</option>
  101. {/foreach}
  102. {/notempty}
  103. </select>
  104. <span></span>
  105. <p class="emphasis">{$Think.lang.merchant_information4}</p></td>
  106. </tr>
  107. <tr>
  108. <th><i>*</i>{$Think.lang.business_category}:</th>
  109. <td><a href="###" id="btn_select_category" class="btn">+{$Think.lang.select_add_class}</a>
  110. <div id="gcategory" style="display:none;">
  111. <select id="gcategory_class1">
  112. <option value="0">{$Think.lang.ds_please_choose}</option>
  113. {notempty name="gc_list"}
  114. {foreach name="gc_list" item="gc" }
  115. <option value="{$gc.gc_id}" data-explain="{$gc.commis_rate}">{$gc.gc_name}</option>
  116. {/foreach}
  117. {/notempty}
  118. </select>
  119. <input id="btn_add_category" type="button" value="{$Think.lang.ds_common_button_confirm}" />
  120. <input id="btn_cancel_category" type="button" value="{$Think.lang.ds_cancel}" />
  121. </div>
  122. <input id="store_class" name="store_class" type="hidden" />
  123. <span></span>
  124. <p class="emphasis" id="gc_classtip"></p>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td colspan="2"><table border="0" cellpadding="0" cellspacing="0" id="table_category" class="type">
  129. <thead>
  130. <tr>
  131. <th class="w120 tc">{$Think.lang.one_level_class}</th>
  132. <th class="w120 tc">{$Think.lang.two_level_class}</th>
  133. <th class="tc">{$Think.lang.three_level_class}</th>
  134. <th class="w50 tc">{$Think.lang.ds_handle}</th>
  135. </tr>
  136. </thead>
  137. </table></td>
  138. </tr>
  139. </tbody>
  140. <tfoot>
  141. <tr>
  142. <td colspan="20">&nbsp;</td>
  143. </tr>
  144. </tfoot>
  145. </table>
  146. </form>
  147. <div class="bottom"><a id="btn_apply_store_next" href="javascript:;" class="btn">{$Think.lang.submit_application}</a>
  148. </div>
  149. </div>
  150. <script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
  151. <script type="text/javascript">
  152. $(document).ready(function(){
  153. gcategoryInit("gcategory");
  154. $('#form_store_info').validate({
  155. errorPlacement: function(error, element){
  156. element.nextAll('span').first().after(error);
  157. },
  158. rules : {
  159. store_name: {
  160. required: true,
  161. maxlength: 50,
  162. remote : "{:url('Sellerjoinin/checkname')}"
  163. },
  164. storegrade_id: {
  165. required: true
  166. },
  167. storeclass_id: {
  168. required: true
  169. },
  170. store_class: {
  171. required: true,
  172. min: 1
  173. }
  174. },
  175. messages : {
  176. store_name: {
  177. required: '{$Think.lang.fill_store_name}',
  178. maxlength: jQuery.validator.format("{$Think.lang.most_words}"),
  179. remote : '{$Think.lang.store_name_already_exists}'
  180. },
  181. storegrade_id: {
  182. required: '{$Think.lang.select_store_level}'
  183. },
  184. storeclass_id: {
  185. required: '{$Think.lang.select_store_category}'
  186. },
  187. store_class: {
  188. required: '{$Think.lang.select_business_category}',
  189. min: '{$Think.lang.select_business_category}'
  190. }
  191. }
  192. });
  193. $('#btn_select_category').on('click', function() {
  194. $('#gcategory').show();
  195. $('#btn_select_category').hide();
  196. $('#gcategory_class1').val(0).nextAll("select").remove();
  197. });
  198. $('#btn_add_category').on('click', function() {
  199. var tr_category = '<tr class="store-class-item">';
  200. var category_id = '';
  201. var category_name = '';
  202. var class_count = 0;
  203. var validation = true;
  204. var i = 1;
  205. $('#gcategory').find('select').each(function() {
  206. if(parseInt($(this).val(), 10) > 0) {
  207. var name = $(this).find('option:selected').text();
  208. tr_category += '<td>';
  209. tr_category += name;
  210. if ($('#gcategory > select').size() == i) {
  211. //最后一级显示分佣比例
  212. tr_category += ' ({$Think.lang.commission_ratio}:' + $(this).find('option:selected').attr('data-explain') + '%)';
  213. }
  214. tr_category += '</td>';
  215. category_id += $(this).val() + ',';
  216. category_name += name + ',';
  217. class_count++;
  218. } else {
  219. validation = false;
  220. $('#gc_classtip').html('{$Think.lang.select_final_classification}');
  221. }
  222. i++;
  223. });
  224. if(validation) {
  225. for(; class_count < 3; class_count++) {
  226. tr_category += '<td></td>';
  227. }
  228. tr_category += '<td><a dstype="btn_drop_category" href="javascript:;">{$Think.lang.ds_delete}</a></td>';
  229. tr_category += '<input name="store_class_ids[]" type="hidden" value="' + category_id + '" />';
  230. tr_category += '<input name="store_class_names[]" type="hidden" value="' + category_name + '" />';
  231. tr_category += '</tr>';
  232. $('#table_category').append(tr_category);
  233. $('#gcategory').hide();
  234. $('#btn_select_category').show();
  235. select_store_class_count();
  236. } else {
  237. layer.msg('{$Think.lang.select_classification}');
  238. }
  239. });
  240. $('#table_category').on('click', '[dstype="btn_drop_category"]', function() {
  241. $(this).parent('td').parent('tr').remove();
  242. select_store_class_count();
  243. });
  244. // 统计已经选择的经营类目
  245. function select_store_class_count() {
  246. var store_class_count = $('#table_category').find('.store-class-item').length;
  247. $('#store_class').val(store_class_count);
  248. }
  249. $('#btn_cancel_category').on('click', function() {
  250. $('#gcategory').hide();
  251. $('#btn_select_category').show();
  252. });
  253. $('#storegrade_id').on('change', function() {
  254. if($(this).val() > 0) {
  255. $('#grade_explain').text($(this).find('option:selected').attr('data-explain'));
  256. $('#storegrade_name').val($(this).find('option:selected').text());
  257. } else {
  258. $('#storegrade_name').val('');
  259. }
  260. });
  261. $('#storeclass_id').on('change', function() {
  262. if($(this).val() > 0) {
  263. $('#storeclass_name').val($(this).find('option:selected').text());
  264. } else {
  265. $('#storeclass_name').val('');
  266. }
  267. });
  268. $('#btn_apply_store_next').on('click', function() {
  269. $('#form_store_info').submit();
  270. });
  271. });
  272. </script>
  273. </div>
  274. </div>
  275. </div>
  276. {/block}