step1.html 17 KB

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