step1.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. {extend name="default/base/base_joinin" /}
  2. {block name="joinin_main"}
  3. <!--{if $Think.config.ds_config.mapak_type eq '1'}-->
  4. <script type="text/javascript">
  5. window._AMapSecurityConfig = {
  6. securityJsCode:"{$Think.config.ds_config.gaode_jscode}",
  7. }
  8. </script>
  9. <script type="text/javascript" src="//webapi.amap.com/maps?v=2.0&key={$Think.config.ds_config.gaode_ak}"></script>
  10. <!--{else}-->
  11. <script type="text/javascript" src="{$Think.HTTP_TYPE}api.map.baidu.com/api?v=2.0&ak={$Think.config.ds_config.baidu_ak}"></script>
  12. <!--{/if}-->
  13. <script>
  14. var local;
  15. var map;
  16. var lst_name='';
  17. function change_map(){
  18. if($("#area_ select:eq(0)").length>0 && $("#area_ select:eq(0) option:selected").val()!=''){
  19. var name=$("#area_ select:eq(0) option:selected").text();
  20. }
  21. if($("#area_ select:eq(1)").length>0 && $("#area_ select:eq(1) option:selected").val()!=''){
  22. var name=$("#area_ select:eq(1) option:selected").text();
  23. }
  24. if($("#area_ select:eq(2)").length>0 && $("#area_ select:eq(2) option:selected").val()!=''){
  25. var name=$("#area_ select:eq(2) option:selected").text();
  26. }
  27. if(name!='' && lst_name!=name){
  28. lst_name=name;
  29. map.setCurrentCity(name);
  30. map.centerAndZoom(name,16);
  31. map.clearOverlays();
  32. local.search(name);
  33. }
  34. }
  35. $(function(){
  36. if ({$Think.config.ds_config.mapak_type} == '1'){
  37. map = new AMap.Map("allmap", {
  38. resizeEnable: true,
  39. zoom:15
  40. });
  41. //获取用户所在城市信息
  42. AMap.plugin("AMap.CitySearch", function () {
  43. var citySearch = new AMap.CitySearch();
  44. citySearch.getLocalCity(function (status, result) {
  45. if (status === "complete" && result.info === "OK") {
  46. // 查询成功,result即为当前所在城市信息
  47. AMap.plugin("AMap.Geocoder", function () {
  48. var geocoder = new AMap.Geocoder({
  49. // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
  50. city: result.adcode,
  51. });
  52. geocoder.getLocation(result.city, function(status1, result1) {
  53. var location = result1.geocodes[0].location;
  54. var addComp = result1.geocodes[0].addressComponent;
  55. var province = addComp.province;//获取省份
  56. var city = addComp.city;//获取城市
  57. var district = '';//区
  58. var lng = location.lng;
  59. var lat = location.lat;
  60. document.getElementById("longitude").value = lng;
  61. document.getElementById("latitude").value = lat;
  62. //初始化定位
  63. var marker = new AMap.Marker({
  64. position: new AMap.LngLat(lng, lat),
  65. icon: '//api.map.baidu.com/images/marker_red_sprite.png',
  66. zoom: 15
  67. });
  68. map.add(marker);
  69. map.panTo([lng, lat]);
  70. //搜索定位
  71. AMap.plugin(['AMap.PlaceSearch','AMap.AutoComplete'], function(){
  72. var auto = new AMap.AutoComplete({input:"company_address_detail"});
  73. var placeSearch = new AMap.PlaceSearch({
  74. map: map
  75. }); //构造地点查询类
  76. auto.on("select", select);//注册监听,当选中某条记录时会触发
  77. function select(e) {
  78. placeSearch.setCity(e.poi.adcode);
  79. placeSearch.search(e.poi.name); //关键字查询查询
  80. }
  81. });
  82. //点击定位
  83. map.on('click', function(e) {
  84. document.getElementById("longitude").value = e.lnglat.getLng();
  85. document.getElementById("latitude").value = e.lnglat.getLat();
  86. if(marker){
  87. map.remove(marker);
  88. }
  89. marker = new AMap.Marker({
  90. position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()),
  91. icon: '//api.map.baidu.com/images/marker_red_sprite.png',
  92. anchor: 'bottom-center',
  93. zoom: 15
  94. });
  95. map.add(marker);
  96. });
  97. });
  98. });
  99. }
  100. });
  101. });
  102. }else{
  103. map = new BMap.Map("allmap");
  104. var geolocation = new BMap.Geolocation();
  105. geolocation.getCurrentPosition(function (r) {
  106. if (this.getStatus() == BMAP_STATUS_SUCCESS) {
  107. var lng = r.point.lng;
  108. var lat = r.point.lat;
  109. var point = new BMap.Point(lng, lat);
  110. map.centerAndZoom(point, 16);
  111. map.addControl(new BMap.NavigationControl());
  112. map.enableScrollWheelZoom();
  113. var marker = new BMap.Marker(point); // 创建标注
  114. map.addOverlay(marker); // 将标注添加到地图中
  115. marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
  116. document.getElementById("longitude").value = lng;
  117. document.getElementById("latitude").value = lat;
  118. } else {
  119. layer.msg('failed' + this.getStatus());
  120. }
  121. }, {enableHighAccuracy: true})
  122. var options = {
  123. onSearchComplete: function(results){
  124. // 判断状态是否正确
  125. if (local.getStatus() == BMAP_STATUS_SUCCESS){
  126. if(results.getCurrentNumPois()>0){
  127. map.clearOverlays(); //清除标注 或者可以把market 放入数组
  128. var point = new BMap.Point(results.getPoi(0).point.lng , results.getPoi(0).point.lat);
  129. var marker = new BMap.Marker(point);
  130. map.centerAndZoom(point, 16);
  131. map.addOverlay(marker);
  132. marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
  133. document.getElementById("longitude").value = results.getPoi(0).point.lng;
  134. document.getElementById("latitude").value = results.getPoi(0).point.lat;
  135. }
  136. }
  137. }
  138. };
  139. local = new BMap.LocalSearch(map, options);
  140. map.addEventListener("click", function(e){
  141. // alert(e.point.lng + ", " + e.point.lat);
  142. map.clearOverlays(); //清除标注 或者可以把market 放入数组
  143. var point = new BMap.Point(e.point.lng , e.point.lat);
  144. var marker = new BMap.Marker(point);
  145. map.addOverlay(marker);
  146. marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
  147. document.getElementById("longitude").value = e.point.lng;
  148. document.getElementById("latitude").value = e.point.lat;
  149. });
  150. }
  151. })
  152. </script>
  153. <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>
  154. <div class="main">
  155. <div class="sidebar">
  156. <div class="title">
  157. <h3>{$Think.lang.merchant_entry_application}</h3>
  158. </div>
  159. <div class="content">
  160. {notempty name="help_list"}
  161. {foreach name="help_list" item="val" key="key" }
  162. <dl show_id="{$val.helptype_id}">
  163. <dt onclick="show_list('{$val.helptype_id}');" style="cursor: pointer;"> <i class="right"></i>{$val.helptype_name}</dt>
  164. <dd style="display:none;">
  165. <ul>
  166. {notempty name="$val.help_list"}
  167. {foreach name="$val.help_list" item="v" key="k" }
  168. <li> <i></i>
  169. {notempty name="$v.help_url"}
  170. <a href="{:url('Showhelp/index',['t_id'=>$v.helptype_id,'help_id'=>$v.help_id])}" target="_blank">{$v.help_title}</a>
  171. {else /}
  172. <a href="{$v.help_url}" target="_blank">{$v.help_title}</a>
  173. {/notempty}
  174. </li>
  175. {/foreach}
  176. {/notempty}
  177. </ul>
  178. </dd>
  179. </dl>
  180. {/foreach}
  181. {/notempty}
  182. <dl>
  183. <dt class="{if $sub_step=='step0'}current{/if}"> <i class="right"></i>{$Think.lang.enter_agreement}</dt>
  184. </dl>
  185. <dl show_id="0">
  186. <dt onclick="show_list('0');" style="cursor: pointer;"> <i class="down"></i>{$Think.lang.submit_application}</dt>
  187. <dd>
  188. <ul>
  189. <li class="{if $step=='1'}current{/if}"><i></i>{$Think.lang.company_qualification_information}</li>
  190. <li class="{if $step=='2'}current{/if}"><i></i>{$Think.lang.financial_qualification_information}</li>
  191. <li class="{if $step=='3'}current{/if}"><i></i>{$Think.lang.store_operation_information}</li>
  192. </ul>
  193. </dd>
  194. </dl>
  195. <dl>
  196. <dt class="{if $step=='4'}current{/if}"> <i class="right"></i>{$Think.lang.contract_signing_payment}</dt>
  197. </dl>
  198. <dl>
  199. <dt> <i class="right"></i>{$Think.lang.store_opening}</dt>
  200. </dl>
  201. </div>
  202. <div class="title">
  203. <h3>{$Think.lang.platform_contact}</h3>
  204. </div>
  205. <div class="content">
  206. <ul>
  207. {notempty name="phone_array"}
  208. {foreach name="phone_array" item="val" key="key" }
  209. {$Think.lang.phone}{$val}
  210. {/foreach}
  211. {/notempty}
  212. <li>{$Think.lang.email}:{$Think.config.ds_config.site_email}</li>
  213. </ul>
  214. </div>
  215. </div>
  216. <div class="right-layout">
  217. <div class="joinin-step">
  218. <ul>
  219. <li class="step1 {if $step >= 0}current{/if}"><span>{$Think.lang.enter_agreement}</span></li>
  220. <li class="{if $step >= 1}current{/if}"><span>{$Think.lang.company_qualification_information}</span></li>
  221. <li class="{if $step >= 2}current{/if}"><span>{$Think.lang.financial_qualification_information}</span></li>
  222. <li class="{if $step >= 3}current{/if}"><span>{$Think.lang.store_operation_information}</span></li>
  223. <li class="{if $step >= 4}current{/if}"><span>{$Think.lang.contract_signing_payment}</span></li>
  224. <li class="step6"><span>{$Think.lang.store_opening}</span></li>
  225. </ul>
  226. </div>
  227. <div class="joinin-concrete">
  228. <!--区别部分 BEGIN-->
  229. <!-- 公司信息 简化 -->
  230. <div id="apply_company_info" class="apply-company-info">
  231. <div class="alert">
  232. <h4>{$Think.lang.matters_needing_attention}:</h4>
  233. {$Think.lang.upload_information1}</div>
  234. <form id="form_company_info" action="{:url('Sellerjoinin/step2')}" method="post" enctype="multipart/form-data" >
  235. <table border="0" cellpadding="0" cellspacing="0" class="all">
  236. <thead>
  237. <tr>
  238. <th colspan="2">{$Think.lang.company_contact_information}</th>
  239. </tr>
  240. </thead>
  241. <tbody>
  242. <tr>
  243. <th><i>*</i>{$Think.lang.company_name}:</th>
  244. <td><input name="company_name" type="text" class="w200"/>
  245. <span></span></td>
  246. </tr>
  247. <tr>
  248. <th><i>*</i>{$Think.lang.company_location}:</th>
  249. <td id="area_" {if $Think.config.ds_config.mapak_type eq '2'}onclick="change_map()"{/if}>
  250. <input id="company_address" name="company_address" style="width:0;height:26px;border:0;padding:0" type="text" value=""/>
  251. <input type="hidden" value="" name="province_id" id="_area_1">
  252. <input type="hidden" value="" name="city_id" id="_area_2">
  253. <input type="hidden" value="" name="district_id" id="_area_3">
  254. <span></span></td>
  255. </tr>
  256. <tr>
  257. <th><i>*</i>{$Think.lang.company_address}:</th>
  258. <td><input name="company_address_detail" type="text" class="w200" id="company_address_detail" {if $Think.config.ds_config.mapak_type eq '2'}onkeyup="local.search($(this).val());"{/if}>
  259. <div>
  260. <input name="longitude" id="longitude" type="hidden" />
  261. <input name="latitude" id="latitude" type="hidden" />
  262. <div id="allmap" style="width:530px;height: 350px;margin-top: 20px"></div>
  263. </div><span></span></td>
  264. </tr>
  265. <tr>
  266. <th><i>*</i>{$Think.lang.registered_capital}:</th>
  267. <td><input name="company_registered_capital" type="text" class="w50">
  268. &nbsp;{$Think.lang.thousand_yuan}<span></span></td>
  269. </tr>
  270. <tr>
  271. <th><i>*</i>{$Think.lang.contact_name}:</th>
  272. <td><input name="contacts_name" type="text" class="w100" />
  273. <span></span></td>
  274. </tr>
  275. <tr>
  276. <th><i>*</i>{$Think.lang.contact_number}:</th>
  277. <td><input name="contacts_phone" type="text" class="w100" />
  278. <span></span></td>
  279. </tr>
  280. <tr>
  281. <th><i>*</i>{$Think.lang.email_address}:</th>
  282. <td><input name="contacts_email" type="text" class="w200" />
  283. <span></span></td>
  284. </tr>
  285. </tbody>
  286. <tfoot>
  287. <tr>
  288. <td colspan="20">&nbsp;</td>
  289. </tr>
  290. </tfoot>
  291. </table>
  292. <table border="0" cellpadding="0" cellspacing="0" class="all">
  293. <thead>
  294. <tr>
  295. <th colspan="20">{$Think.lang.business_license_information}</th>
  296. </tr>
  297. </thead>
  298. <tbody>
  299. <tr>
  300. <th><i>*</i>{$Think.lang.business_license_number}:</th>
  301. <td><input name="business_licence_number" type="text" class="w200" />
  302. <span></span></td>
  303. </tr>
  304. <tr>
  305. <th><i>*</i>{$Think.lang.place_business_license}:</th>
  306. <td><input id="business_licence_address" name="business_licence_address" style="width:0;height:26px;border:0;padding:0" type="text" />
  307. <span></span></td>
  308. </tr>
  309. <tr>
  310. <th><i>*</i>{$Think.lang.validity_business_license}:</th>
  311. <td><input id="business_licence_start" name="business_licence_start" type="text" class="w90" />
  312. <span></span>-
  313. <input id="business_licence_end" name="business_licence_end" type="text" class="w90" />
  314. <span class="block">{$Think.lang.select_end_date_help}</span></td>
  315. </tr>
  316. <tr>
  317. <th>{$Think.lang.legal_scope_business}:</th>
  318. <td><textarea name="business_sphere" rows="3" class="w200"></textarea>
  319. <span></span></td>
  320. </tr>
  321. <tr>
  322. <th><i>*</i>{$Think.lang.business_license}{$Think.lang.electronic_version}:</th>
  323. <td><input name="business_licence_number_electronic" type="file" class="w200" />
  324. <span class="block">{$Think.lang.upload_information2}</span></td>
  325. </tr>
  326. </tbody>
  327. <tfoot>
  328. <tr>
  329. <td colspan="20">&nbsp;</td>
  330. </tr>
  331. </tfoot>
  332. </table>
  333. </form>
  334. <div class="bottom"><a id="btn_apply_company_next" href="javascript:;" class="btn">{$Think.lang.upload_information3}</a></div>
  335. </div>
  336. <script type="text/javascript">
  337. $(document).ready(function(){
  338. $('#company_address').ds_region();
  339. $('#business_licence_address').ds_region();
  340. $('#business_licence_start').datepicker({dateFormat: "yy-mm-dd"});
  341. $('#business_licence_end').datepicker({dateFormat: "yy-mm-dd"});
  342. $('#btn_apply_agreement_next').on('click', function() {
  343. if($('#input_apply_agreement').prop('checked')) {
  344. $('#apply_agreement').hide();
  345. $('#apply_company_info').show();
  346. } else {
  347. layer.msg('{$Think.lang.read_agree_agreement}');
  348. }
  349. });
  350. $('#form_company_info').validate({
  351. errorPlacement: function(error, element){
  352. element.nextAll('span').first().after(error);
  353. },
  354. rules : {
  355. company_name: {
  356. required: true,
  357. maxlength: 50
  358. },
  359. company_address: {
  360. required: true,
  361. maxlength: 50
  362. },
  363. company_address_detail: {
  364. required: true,
  365. maxlength: 50
  366. },
  367. company_registered_capital: {
  368. required: true,
  369. digits: true
  370. },
  371. contacts_name: {
  372. required: true,
  373. maxlength: 20
  374. },
  375. contacts_phone: {
  376. required: true,
  377. maxlength: 11,
  378. minlength: 11,
  379. },
  380. contacts_email: {
  381. required: true,
  382. email: true
  383. },
  384. business_licence_number: {
  385. required: true,
  386. maxlength: 20
  387. },
  388. business_licence_address: {
  389. required: true,
  390. maxlength: 50
  391. },
  392. business_licence_start: {
  393. required: true
  394. },
  395. },
  396. messages : {
  397. company_name: {
  398. required: '{$Think.lang.enter_company_name}',
  399. maxlength: jQuery.validator.format("{$Think.lang.most_words}")
  400. },
  401. company_address: {
  402. required: '{$Think.lang.select_area_address}',
  403. maxlength: jQuery.validator.format("{$Think.lang.most_words}")
  404. },
  405. company_address_detail: {
  406. required: '{$Think.lang.enter_company_details}',
  407. maxlength: jQuery.validator.format("{$Think.lang.most_words}")
  408. },
  409. company_registered_capital: {
  410. required: '{$Think.lang.enter_registered_capital}',
  411. digits: '{$Think.lang.must_numeric}'
  412. },
  413. contacts_name: {
  414. required: '{$Think.lang.enter_contact_name}',
  415. maxlength: jQuery.validator.format("{$Think.lang.most_words}")
  416. },
  417. contacts_phone: {
  418. required: '{$Think.lang.enter_contact_phone}',
  419. maxlength: "{$Think.lang.fill_your_phone_number_correctly}",
  420. minlength: "{$Think.lang.fill_your_phone_number_correctly}",
  421. },
  422. contacts_email: {
  423. required: '{$Think.lang.enter_common_email_address}',
  424. email: '{$Think.lang.fill_correct_email_address}'
  425. },
  426. business_licence_number: {
  427. required: '{$Think.lang.enter_business_license_number}',
  428. maxlength: jQuery.validator.format("{$Think.lang.most_words}")
  429. },
  430. business_licence_address: {
  431. required: '{$Think.lang.select_location_business_license}',
  432. maxlength: jQuery.validator.format("{$Think.lang.most_words}")
  433. },
  434. business_licence_start: {
  435. required: '{$Think.lang.select_effective_date}'
  436. },
  437. }
  438. });
  439. $('#btn_apply_company_next').on('click', function() {
  440. if($('#form_company_info').valid()) {
  441. $('#company_address').next().attr('name','province_id');
  442. $('#form_company_info').submit();
  443. }
  444. });
  445. });
  446. </script>
  447. <!--区别部分 END-->
  448. </div>
  449. </div>
  450. </div>
  451. {/block}