step3.html 14 KB

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