inc_ViewCar.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. <?php
  2. $able_modify = false;
  3. ?>
  4. <style>
  5. .option_popup{
  6. width:100%;
  7. max-width:1200px;
  8. margin:0 auto;
  9. }
  10. .option_popup > h2{
  11. font-weight: 700;
  12. font-size: 18px;
  13. line-height: 100%;
  14. letter-spacing: -0.02em;
  15. color: #222222;
  16. }
  17. .option_popup > h2 .astc--text{
  18. font-weight: 700;
  19. font-size: 18px;
  20. letter-spacing: -0.02em;
  21. color: #1E75FF;
  22. }
  23. .option_popup > h2 .astc--text.ty2{
  24. color: #909EB5;
  25. }
  26. .option_popup .options--list{
  27. width:100%;
  28. border-top:1px solid #888;
  29. margin-top:20px;
  30. padding-top:40px;
  31. }
  32. .option_popup .options--list > h2{
  33. font-weight: 500;
  34. font-size: 14px;
  35. line-height: 100%;
  36. letter-spacing: -0.02em;
  37. color: #111111;
  38. }
  39. .option_popup .options--list > ul{
  40. display: flex;
  41. align-items: center;
  42. margin-top:30px;
  43. margin-bottom:50px;
  44. }
  45. .option_popup .options--list > ul >li{
  46. width:calc(100% / 4);
  47. }
  48. input[type="checkbox"] + label{
  49. font-weight: 350;
  50. font-size: 14px;
  51. line-height: 100%;
  52. color: #333333;
  53. display: flex;
  54. align-items:center;
  55. cursor: pointer;
  56. }
  57. input[type="checkbox"] + label:before{
  58. content:'';
  59. display: block;
  60. width:16px;
  61. height:16px;
  62. background:url(/design/staff/assets/img/check_off.svg) no-repeat center;
  63. margin-right:12px;
  64. }
  65. input[type="checkbox"]:checked + label:before{
  66. background:url(/design/staff/assets/img/check_on.svg) no-repeat center;
  67. }
  68. .option_popup .pic--add--wrap{
  69. display: flex;
  70. align-items: center;
  71. justify-content:space-between;
  72. width:100%;
  73. border-top:1px solid #888;
  74. margin-top:20px;
  75. padding-top:40px;
  76. }
  77. .option_popup .pic--add--wrap.bd-0{
  78. border:0px;
  79. padding-top:0px;
  80. }
  81. .option_popup .pic--add--wrap .add--box{
  82. width: 224px;
  83. height: 224px;
  84. display: flex;
  85. align-items: center;
  86. justify-content:center;
  87. flex-direction: column;
  88. background: #FFFFFF;
  89. border: 1px solid #EEEEEE;
  90. box-shadow: 0px 5px 5px rgba(239, 240, 241, 0.5);
  91. border-radius: 20px;
  92. }
  93. .option_popup .pic--add--wrap .add--box .thumb{
  94. width: 80px;
  95. height: 80px;
  96. border-radius: 80px;
  97. background: #F7F7F9;
  98. position: relative;
  99. }
  100. .option_popup .pic--add--wrap.view--type .add--box .thumb{
  101. width:200px;
  102. height:140px;
  103. border-radius:0px;
  104. margin:0 auto;
  105. overflow:hidden;
  106. background: transparent!important;
  107. }
  108. .option_popup .pic--add--wrap.view--type .add--box .thumb img{
  109. position: absolute;
  110. top:50%;
  111. left:50%;
  112. transform: translate(-50%, -50%);
  113. max-height:140px;
  114. max-width:200px;
  115. object-fit: cover;
  116. }
  117. .option_popup .pic--add--wrap.view--type .add--box.car--dashboard{
  118. position: relative;
  119. }
  120. .option_popup .pic--add--wrap.view--type .add--box.car--dashboard .thumb{
  121. height:204px;
  122. width:204px;
  123. position:absolute;
  124. top:50%;
  125. left:50%;
  126. transform: translate(-50%, -50%);
  127. }
  128. .option_popup .pic--add--wrap.view--type .add--box.car--dashboard .thumb img{
  129. width:100%;
  130. height:100%;
  131. max-width:204px;
  132. max-height:204px;
  133. }
  134. .option_popup .pic--add--wrap.view--type .add--box.car--dashboard .desc{
  135. z-index: 2;
  136. position: absolute;
  137. bottom:20px;
  138. }
  139. .option_popup .pic--add--wrap .add--box .thumb .add--btn{
  140. width: 26px;
  141. height: 26px;
  142. border-radius:26px;
  143. border: 1px solid #EDEFF1;
  144. box-shadow: 0px 2px 2px #DDE1E8;
  145. background:#fff url(../img/add_ic.svg) no-repeat center;
  146. position: absolute;
  147. top:0px;
  148. right:0px;
  149. cursor: pointer;
  150. }
  151. .option_popup .pic--add--wrap .add--box .thumb.car--01{ background:#f7f7f9 url(/design/staff/assets/img/car_pic01.svg) no-repeat center;}
  152. .option_popup .pic--add--wrap .add--box .thumb.car--02{ background:#f7f7f9 url(/design/staff/assets/img/car_pic02.svg) no-repeat center;}
  153. .option_popup .pic--add--wrap .add--box .thumb.car--03{ background:#f7f7f9 url(/design/staff/assets/img/car_pic03.svg) no-repeat center;}
  154. .option_popup .pic--add--wrap .add--box .thumb.car--04{ background:#f7f7f9 url(/design/staff/assets/img/car_pic04.svg) no-repeat center;}
  155. .option_popup .pic--add--wrap .add--box .thumb.car--05{ background:#f7f7f9 url(/design/staff/assets/img/car_pic05.svg) no-repeat center;}
  156. .option_popup .pic--add--wrap .add--box .desc{
  157. font-weight: 350;
  158. font-size: 15px;
  159. line-height: 100%;
  160. text-align: center;
  161. letter-spacing: -0.02em;
  162. color: #000000;
  163. margin-top:10px;
  164. }
  165. .option_popup .pic--add--wrap.view--type .add--box .desc{
  166. background: #F3F5F8;
  167. border-radius: 50px;
  168. height:35px;
  169. display:inline-flex;
  170. align-items: center;
  171. padding:0 20px;
  172. font-weight: 350;
  173. font-size: 13px;
  174. text-align: center;
  175. letter-spacing: -0.02em;
  176. color: #000000;
  177. }
  178. .option_popup .pic--add--wrap .addition--box .thumb{
  179. background:#f7f7f9 url(../img/pic_ic.svg) no-repeat center;
  180. }
  181. .option_popup .pic--add--wrap .addition--box .add--btn{
  182. font-weight: 500;
  183. font-size: 12px;
  184. text-align: center;
  185. letter-spacing: -0.03em;
  186. color: #1E75FF;
  187. width: 100px;
  188. height: 34px;
  189. display: flex;
  190. align-items: center;
  191. justify-content: center;
  192. border: 1px solid rgba(30, 117, 255, 0.3);
  193. border-radius: 50px;
  194. cursor: pointer;
  195. }
  196. </style>
  197. <div class="area_title">
  198. <h3><em>▶</em> 소유주 정보</h3>
  199. </div>
  200. <div class="tbl_wrap">
  201. <table class="tbl_list2">
  202. <colgroup>
  203. <col width="12%">
  204. <col width="*">
  205. </colgroup>
  206. <tr>
  207. <th>소유주명</th>
  208. <td><?=$nm_name?></td>
  209. </tr>
  210. <tr>
  211. <th>차량번호</th>
  212. <td><?=$nm_number?></td>
  213. </tr>
  214. <tr>
  215. <th>판매자 연락처</th>
  216. <td><?=$nm_hp_sale?></td>
  217. </tr>
  218. </table>
  219. </div>
  220. <div class="area_title">
  221. <h3><em>▶</em> 차량 정보</h3>
  222. </div>
  223. <div class="tbl_wrap">
  224. <table class="tbl_list2">
  225. <colgroup>
  226. <col width="12%">
  227. <col width="38%">
  228. <col width="12%">
  229. <col width="38%">
  230. </colgroup>
  231. <tr>
  232. <th>제조사</th>
  233. <td><?=$nm_brand?></td>
  234. <th>모델</th>
  235. <td><?=$nm_model?></td>
  236. </tr>
  237. <tr>
  238. <th>연식(최초등록일)</th>
  239. <td><?=$nm_regdate_yyyy."년 ".$nm_regdate_mm."월"?></td>
  240. <th>형식연도</th>
  241. <td><?=$nm_year?>년</td>
  242. </tr>
  243. <tr>
  244. <th>배기량</th>
  245. <td><?=$nm_cc?>cc</td>
  246. <th>연료</th>
  247. <td><?=$ds_oil?></td>
  248. </tr>
  249. <tr>
  250. <th>색상</th>
  251. <td><?=$nm_color?></td>
  252. <th>주행거리</th>
  253. <?php
  254. if($able_modify) {
  255. ?>
  256. <td>
  257. <input type='text' class="inp_txt" style="width:60px;" id='modify_nm_mileage' name='modify_nm_mileage' value='<?=$nm_mileage?>' /> km
  258. <!-- <a href="#" class="rnd_btn ty2 blue" onclick="changeNmMileage('<?=$cd_car?>', '<?=$cd_sale?>');return false;">수정</a> -->
  259. </td>
  260. <?php
  261. }else {
  262. ?>
  263. <td><?=$nm_mileage?>km</td>
  264. <?php
  265. }
  266. ?>
  267. </tr>
  268. <tr>
  269. <th>사고유무</th>
  270. <td>
  271. <?php
  272. if($able_modify) {
  273. ?>
  274. <span class="select2" style="margin-right:5px;width:35%;">
  275. <select name="modify_ds_accident" id="modify_ds_accident" style='font: inherit;'></select>
  276. </span>
  277. <input name='nm_cont_accident' type='text' class="inp_txt" id='modify_nm_cont_accident' value='<?=$nm_cont_accident?>' style="width:570px" />
  278. <?php
  279. }else{
  280. ?>
  281. <?=$nm_accident?>&nbsp;<?=$nm_cont_accident?>
  282. <?php
  283. }
  284. ?>
  285. </td>
  286. <th>판매지역</th>
  287. <td>
  288. <?php
  289. if($able_modify) {
  290. ?>
  291. <span class="select2" style="margin-right:5px;width:35%;">
  292. <select name="modify_ds_area" id="modify_ds_area" style='font: inherit;'></select>
  293. </span>
  294. <?php
  295. }
  296. else {
  297. ?>
  298. <?=$nm_area?>
  299. <?php
  300. }
  301. ?>
  302. </td>
  303. </tr>
  304. <tr>
  305. <th>사업자 유,무 </th>
  306. <td>
  307. <?php
  308. if($able_modify) {
  309. ?>
  310. <span class="select2" style="margin-right:5px;width:35%;">
  311. <select name="modify_ds_accident" id="modify_ds_accident" style='font: inherit;'></select>
  312. </span>
  313. <input name='nm_cont_accident' type='text' class="inp_txt" id='modify_nm_cont_accident' value='<?=$nm_cont_accident?>' style="width:570px" />
  314. <?php
  315. }else{
  316. ?>
  317. <?=$nm_accident?>&nbsp;<?=$nm_cont_accident?>
  318. <?php
  319. }
  320. ?>
  321. </td>
  322. <th>추가옵션 및 특이사항</th>
  323. <td>
  324. <?php
  325. if($able_modify) {
  326. ?>
  327. <span class="select2" style="margin-right:5px;width:35%;">
  328. <select name="nm_cont_pac" id="modify_ds_area" style='font: inherit;'></select>
  329. </span>
  330. <?php
  331. }
  332. else {
  333. ?>
  334. <?=$nm_cont_pac?>
  335. <?php
  336. }
  337. ?>
  338. </td>
  339. </tr>
  340. <tr>
  341. <th>희망 AAP SA </th>
  342. <td>
  343. <?php
  344. if($able_modify) {
  345. ?>
  346. <span class="select2" style="margin-right:5px;width:35%;">
  347. <select name="modify_ds_accident" id="modify_ds_accident" style='font: inherit;'></select>
  348. </span>
  349. <input name='nm_cont_accident' type='text' class="inp_txt" id='modify_nm_cont_accident' value='<?=$nm_cont_accident?>' style="width:570px" />
  350. <?php
  351. }else{
  352. ?>
  353. <?=$aap_nm_name?> <button type="button" class="rnd_btn ty2 ty_s2 gray" style="margin-left:5px;" id="btn_aap_select">선택하기</button>
  354. <?php
  355. }
  356. ?>
  357. </td>
  358. <th>판매시기</th>
  359. <td>
  360. <?php
  361. if($able_modify) {
  362. ?>
  363. <span class="select2" style="margin-right:5px;width:35%;">
  364. <select name="nm_cont_pac" id="modify_ds_area" style='font: inherit;'></select>
  365. </span>
  366. <?php
  367. }
  368. else {
  369. ?>
  370. <?=$ds_sale_period?>
  371. <?php
  372. }
  373. ?>
  374. </td>
  375. </tr>
  376. <tr>
  377. <th>옵션정보</th>
  378. <td>
  379. <?php
  380. if(!empty($nm_cont_detail)) {
  381. $options = explode(",", $nm_cont_detail);
  382. if(!empty($options[0])) {
  383. $option_col=mysql_fetch_array(mysql_query("select getCode('car_master','ds_car_option_detail','$options[0]') as nm_name "));
  384. }
  385. }
  386. ?>
  387. <?=$option_col['nm_name']?> <button class="rnd_btn ty2 ty_s2 gray" style="margin-left:5px;" onclick="openLayer('option');">자세히보기</button>
  388. </td>
  389. <th>반려사유</th>
  390. <td><?=$nm_cont_return?></td>
  391. </tr>
  392. <tr>
  393. <th>관리자 코멘트</th>
  394. <td colspan="3">
  395. <?
  396. if($able_modify) {
  397. ?>
  398. <textarea name="modify_nm_guide" id="modify_nm_guide"><?=$nm_guide?></textarea>
  399. <?}
  400. else {
  401. ?>
  402. <?=$nm_guide?>
  403. <?
  404. }
  405. ?>
  406. </td>
  407. </tr>
  408. </table>
  409. <!-- layer popup3 -->
  410. <div class="layer_popup photo_popup">
  411. <img src="/img/sell/ic_car_photo1.png" id="photoBig" style="width:500px;">
  412. <div class="close" onclick="closeLayer('photo');">레이어팝업 닫기</div>
  413. </div>
  414. <!-- // layer popup3 -->
  415. <!-- layer popup4 -->
  416. <div class="layer_popup option_popup">
  417. <h2>옵션정보</h2>
  418. <div class="options--list">
  419. <? include_once("../../common/inc/inc_car_option.php")?>
  420. </div>
  421. <div class="close" onclick="closeLayer('option');"></div>
  422. </div>
  423. <!-- // layer popup4 -->
  424. </div>
  425. <?php
  426. $car_history_sql = "SELECT * FROM car_history_master WHERE cd_car_history = '$cd_car_history' AND ds_delind = 'N' AND ds_type = 'user' LIMIT 1 ";
  427. $car_history_res = mysql_query($car_history_sql);
  428. $car_history_col = mysql_fetch_array($car_history_res);
  429. ?>
  430. <div class="area_title">
  431. <h3><em>▶</em> 사고정보 이력</h3>
  432. <span class="select ty2" style='width:120px;'>
  433. <button type="button" class="rnd_btn ty3 blue" style="width:120px; height:29px;" id="btn_accident_view">사고정보 이력보기</button>
  434. </span>
  435. </div>
  436. <div class="tbl_wrap">
  437. <table class="tbl_list2">
  438. <colgroup>
  439. <col width="12%">
  440. <col width="*">
  441. </colgroup>
  442. <tr>
  443. <th>차량번호 변경</th>
  444. <td><?=number_format($car_history_col['r201'])?> 회</td>
  445. </tr>
  446. <tr>
  447. <th>소유주 변경</th>
  448. <td><?=number_format($car_history_col['r204'])?> 회</td>
  449. </tr>
  450. <tr>
  451. <th>자동차 보험 특수사고</th>
  452. <td>전손 : <?=number_format($car_history_col['405'])?>회 / 침수전(분)손 : <?=number_format($car_history_col['407'])?>회 / 도난 <?=number_format($car_history_col['r409'])?>회</td>
  453. </tr>
  454. <tr>
  455. <th>보험사고 (내차피해)</th>
  456. <td><?=number_format($car_history_col['r401'])?> 회 (<?=number_format($car_history_col['r402'])?> 원)</td>
  457. </tr>
  458. <tr>
  459. <th>보험사고 (타차가해)</th>
  460. <td><?=number_format($car_history_col['r403'])?> 회 (<?=number_format($car_history_col['r404'])?> 원)</td>
  461. </tr>
  462. </table>
  463. </div>
  464. <div class="area_title">
  465. <h3><em>▶</em> 차량 사진(필수사진)</h3>
  466. </div>
  467. <div class="tbl_wrap">
  468. <ul class="photo_list">
  469. <li>
  470. <?=getCarBasicThumbImage($cd_car, $nm_file_front, '차량전면', true, 'car_basic')?>
  471. <span>차량전면</span>
  472. </li>
  473. <li>
  474. <?=getCarBasicThumbImage($cd_car, $nm_file_back, '차량후면', true, 'car_basic')?>
  475. <span>차량후면</span>
  476. </li>
  477. <li>
  478. <?=getCarBasicThumbImage($cd_car, $nm_file_side1, '운전석 측면', true, 'car_basic')?>
  479. <span>운전석 측면</span>
  480. </li>
  481. <li>
  482. <?=getCarBasicThumbImage($cd_car, $nm_file_side2, '조수석 측면', true, 'car_basic')?>
  483. <span>조수석 측면</span>
  484. </li>
  485. <li>
  486. <?=getCarBasicThumbImage($cd_car, $nm_file_dashboard, '계기판', true, 'car_basic')?>
  487. <span>계기판</span>
  488. </li>
  489. </ul>
  490. </div>
  491. <div class="area_title">
  492. <h3><em>▶</em> 차량 사진(추가사진)</h3>
  493. </div>
  494. <div class="tbl_wrap">
  495. <ul class="photo_list">
  496. <?php
  497. if(!empty($cd_car)) {
  498. $sql = "SELECT *
  499. FROM car_file
  500. WHERE cd_car = '$cd_car'
  501. AND ds_delind='N'
  502. ORDER BY no_sort ASC, cd_car ASC ";
  503. // echo $sql;
  504. $r = mysqli_query($connect, $sql);
  505. $i=1;
  506. while($imgs = mysqli_fetch_assoc($r)) {
  507. // $car_additional_img = UPLOAD_PATH_CAR.$imgs['cd_car']."_detail/".$imgs['nm_file'];
  508. ?>
  509. <li>
  510. <?=getCarAddtionalImage($cd_car, $imgs['nm_file'], '추가사진'.$i, true, 'car_additional')?>
  511. </li>
  512. <?php
  513. $i++;
  514. }
  515. }
  516. ?>
  517. </ul>
  518. <!-- <ul class="photo_list">
  519. <?
  520. if(!empty($col['cd_car'])){
  521. $r = mysql_query("SELECT * FROM car_file WHERE cd_car = '$cd_car' and ds_type='' and ds_delind='N' Order by no_sort asc , cd_car ASC ");
  522. $i=1;
  523. while($imgs = mysql_fetch_array($r)) {
  524. ?>
  525. <li><img src="<?=UPLOAD_PATH_CAR?><?=$imgs['cd_car']?>_detail/<?=$imgs['nm_file']?>" onclick="viewPhoto('<?=UPLOAD_PATH_CAR?><?=$imgs[cd_car]?>_detail/<?=$imgs['nm_file']?>')"></li>
  526. <?
  527. }
  528. }else{
  529. ?>
  530. <?
  531. }
  532. ?>
  533. </ul> -->
  534. </div>
  535. <div class="btn_right" style='padding-bottom:20px;'>
  536. <a href="#" class="rnd_btn ty1 blue" onclick="changeCarInfo('<?=$cd_car?>', '<?=$cd_sale?>');return false;">차량 정보 수정</a>
  537. </div>
  538. <script laguage="javascript" type="text/javascript">
  539. function viewPhoto(arg1){
  540. $("#photoBig").attr("src", arg1);
  541. openLayer('photo'); return false;
  542. }
  543. function changeNmMileage(arg_cd_car, arg_cd_sale){
  544. $.post("proc.php", { mode:"changeMileage", cd_car: arg_cd_car, cd_sale: arg_cd_sale, nm_mileage: nm_mileage_val },function(data) {
  545. if(data=="Y"){
  546. alert("정상적으로 처리되었습니다.");
  547. return;
  548. }else if(data=="W") {
  549. alert("입찰대기, 입찰중 매물만 주행거리 수정이 가능합니다. ");
  550. return;
  551. }else if(data=="F") {
  552. alert("지정되지않은 요청입니다");
  553. return;
  554. }else{
  555. alert("정상적으로 처리되지 않았습니다.");
  556. return;
  557. }
  558. });
  559. }
  560. function changeCarInfo(arg_cd_car, arg_cd_sale) {
  561. var fieldlist = [["modify_cd_grade","등급"],["modify_ds_area","판매지역"],["modify_ds_accident","사고유무"],["modify_nm_mileage","주행거리"]] ;
  562. //,["modify_nm_guide","담당자코멘트"]
  563. if (!fnCheckForm(fieldlist)){
  564. return false;
  565. }
  566. var c = confirm("처리하시겠습니까?");
  567. if(c){
  568. var cd_grade = $("#modify_cd_grade").val();
  569. var ds_area = $("#modify_ds_area").val();
  570. var ds_accident = $("#modify_ds_accident").val();
  571. var nm_mileage_val = $("#modify_nm_mileage").val();
  572. var nm_guide_val = $("#modify_nm_guide").val();
  573. var nm_cont_accident = $("#modify_nm_cont_accident").val();
  574. $.post("proc.php", { mode:"changeCarInfo", cd_car: arg_cd_car, cd_sale: arg_cd_sale, cd_grade: cd_grade, ds_area: ds_area, ds_accident: ds_accident, nm_mileage: nm_mileage_val, nm_guide: nm_guide_val, nm_cont_accident : nm_cont_accident },function(data) {
  575. if(data=="Y"){
  576. alert("정상적으로 처리되었습니다.");
  577. return;
  578. }else if(data=="W") {
  579. alert("입찰대기, 입찰중 매물만 주행거리 수정이 가능합니다. ");
  580. return;
  581. }else if(data=="F") {
  582. alert("지정되지않은 요청입니다");
  583. return;
  584. }else{
  585. alert("정상적으로 처리되지 않았습니다.");
  586. return;
  587. }
  588. });
  589. }else{
  590. return false;
  591. }
  592. }
  593. $(function() {
  594. setCodeSelectJqTransForm("listGradeByModelSub","modify_cd_grade","car_grade","cd_grade",'<?=$cd_grade?>','선택하세요','<?=$cd_model_sub?>');
  595. setCodeSelectJqTransForm("listcode","modify_ds_accident", "car_master","ds_accident","<?=$ds_accident?>","선택하세요","");
  596. setCodeSelectJqTransForm("listcode","modify_ds_area", "member_master","ds_area","<?=$ds_area_sale?>","선택하세요","");
  597. //차량이력정보 보기 팝업
  598. $("#btn_accident_view").on("click", function() {
  599. viewPopup('history');
  600. });
  601. });
  602. </script>