|   | 
|   | 
|   | 
|   | 
|   | 
| <!doctype html> | 
| <html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> | 
| <head> | 
| <meta charset="utf-8"> | 
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 
|   | 
| <meta | 
|     content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" | 
|     name="viewport" /> | 
| <title th:text="${session.userInfo.shopName }"></title> | 
|   | 
| <!-- Set render engine for 360 browser --> | 
| <meta name="renderer" content="webkit"> | 
|   | 
| <!-- No Baidu Siteapp--> | 
| <meta http-equiv="Cache-Control" content="no-siteapp" /> | 
|   | 
|   | 
| <!-- Add to homescreen for Chrome on Android --> | 
| <meta name="mobile-web-app-capable" content="yes"> | 
|   | 
|   | 
| <!-- Add to homescreen for Safari on iOS --> | 
| <meta name="apple-mobile-web-app-capable" content="yes"> | 
| <meta name="apple-mobile-web-app-status-bar-style" content="black"> | 
| <meta name="apple-mobile-web-app-title" content="Amaze UI" /> | 
|   | 
|   | 
|   | 
| <script type="text/javascript" | 
|     th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> | 
| <script type="text/javascript" | 
|     th:src="@{/js/systools/DDMBase.js}"></script> | 
| <link rel="stylesheet" | 
|     th:href="@{/plugin/amazingUI/css/amazeui.min.css}"> | 
| <link rel="stylesheet" | 
|     th:href="@{/plugin/amazingUI/css/app.css}"> | 
| <link rel="stylesheet" type="text/css" | 
|     th:href="@{/css/dingOrderList.css}"> | 
| <style type="text/css"> | 
| .box-2{ | 
| width: 50px; | 
|     text-align: center; | 
|     position: fixed; | 
|     bottom: 30px; | 
|     right: 5px; | 
|     z-index: 999999; | 
|     background: #fff; | 
|   | 
| } | 
| .dot{ | 
|     width: 14px; | 
|     height: 14px; | 
|     border-radius: 7px; | 
|     background: red; | 
|     display: inline-block; | 
|     font-size: 5px; | 
|     color: #fff; | 
|     line-height: 15px; | 
|     position: relative; | 
|     top: 15px; | 
|     left: 15px;} | 
| </style> | 
| </head> | 
| <script th:if="${session.CURRENT_CUSTOMER eq null}"> | 
|   | 
|     MTools.redirect(basePath + "/admin/redirect/hive/mobile/order-search"); | 
|   | 
| </script> | 
|   | 
|   | 
| <body > | 
|     <!-- 商品列表页面 --> | 
|     <div class="wrap"> | 
|         <!-- 头部开始 --> | 
|         <header data-am-widget="header" class="am-header color-w back-m1 back-m1 am-header-fixed"> | 
|             <div class="am-header-left am-header-nav"> | 
|                 <a th:href="@{/admin/redirect/hive/mobile/order?foot=4}" class=""> <i | 
|                     class="am-header-icon am-icon-chevron-left"></i> | 
|                 </a> | 
|             </div> | 
|   | 
|             <h1 class="am-header-title"> | 
|                 <a href="#title-link" class=""> 商品列表 </a> | 
|             </h1> | 
|   | 
|             <!-- <div class="am-header-right am-header-nav"> | 
|                 <a class=""> <i class="am-header-icon am-icon-bars"></i> | 
|                 </a> | 
|             </div> --> | 
|         </header> | 
|         <!-- 头部结束 --> | 
|            | 
|         <!-- 订单内容 --> | 
|         <div class="main main1"> | 
|             <form class="am-form am-form-horizontal"  id="dataform" onsubmit="javascripr:return false;"> | 
|                 <div | 
|                     class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title"> | 
|                     <div id="orderSelect" class="am-u-sm-4"> | 
|                         <select name=type id="order-select"> | 
|                             <option value="家居产品">商品</option> | 
|                             <option value="项目">项目</option> | 
|                             <option value="套餐">套餐</option> | 
|                             <option value="充值卡">充值卡</option> | 
|                             <option value="综合卡">综合卡</option> | 
|                         </select> | 
|                     </div> | 
|                     <div class="am-u-sm-5 search"> | 
|                     <!-- 记录当前页 --> | 
|                         <input autocomplete="off"   type="hidden" name="offset" id="_offset"  value="0" /> | 
|                         <input autocomplete="off"   type="hidden" id="limit" name="limit"   value="10" /> | 
|                         <input autocomplete="off"   type="text" class="searchIn" placeholder="产品名称" name="keyword" /> | 
|                     </div> | 
|                     <div class="am-u-sm-3 btn"> | 
|                         <button class="am-btn am-btn-default am-radius searchBtn" onclick="Pagination.serchDate()">搜索</button> | 
|                     </div> | 
|                 </div> | 
|             <div  id="main" style="display: none">     | 
|                 <!-- 商品表格 --> | 
|                 <div data-am-widget="list_news" | 
|                     class="am-list-news am-list-news-default"> | 
|                     <!--列表标题--> | 
|                     <div class="am-list-news-hd am-cf am-g"> | 
|                         <!--带更多链接--> | 
|                         <div class="am-u-sm-5 "> | 
|                             <h2 class="am-list-news-more am-fr">商品名</h2> | 
|                         </div> | 
|                         <div class="am-u-sm-4 " id="isgoods"> | 
|                             <h2 class="am-list-news-more am-fr">价格</h2> | 
|   | 
|                         </div> | 
|                         <div class="am-u-sm-3 "> | 
|                             <h2 class="am-list-news-more am-fr">操作 </h2> | 
|                         </div> | 
|                     </div> | 
|                     <div class="am-list-news-bd" > | 
|                         <ul class="am-list" id="showdataBox">                             | 
|                         </ul> | 
|                     </div> | 
|                     <div id="pagingBox" align="center" style="margin-top: 10px"> | 
|                     </div> | 
|                 </div> | 
|                 <!-- 商品展示结束 --> | 
|                 <!-- 测试 --> | 
|             </div> | 
|             </form>             | 
|         </div> | 
|         <!-- 订单内容结束 --> | 
|   | 
|     </div> | 
|     <div class="box box-2"> | 
|     <span class="dot" id="dot"  th:if="${session.SHOPPING_CAR ne null}" th:text="${#lists.size(session.SHOPPING_CAR)}"></span> | 
|         <span class="dot" id="dot"  th:if="${session.SHOPPING_CAR eq null}"  >0</span> | 
|   | 
|     <a th:href="@{/admin/redirect/hive/mobile/order-car}"> | 
|         <img width="50px" th:src= "@{/images/dingImg/gwc.png}"><br> | 
|     </a></div> | 
|                  | 
|     <script    th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script> | 
|     <script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script> | 
|     <script> | 
|     var $dot=$("#dot"); | 
|      | 
|     function addCar(_id,_type,_assembleId){ | 
|         var param={ | 
|         isFree:'否', | 
|         type:_type, | 
|         goodsId:_id, | 
|         count:1, | 
|         assembleId:_assembleId | 
|         } | 
|          | 
|         $.AjaxProxy({p:param}).invoke( basePath+"/admin/shoppingCar/addItemToCar",function(){ | 
|             msg='成功加入购物车'; | 
|             layer.open({ | 
|                 shade:false, | 
|                 content :msg, | 
|                 className : 'showBox', | 
|                 time : 1, | 
|             }); | 
|             var count=$dot.html(); | 
|             if(!count){ | 
|                 count=0 | 
|             } | 
|             count=parseInt(count)+1; | 
|             $dot.html(count); | 
|              | 
|         }); | 
|     } | 
|     //获取详情 | 
|     var getOrderDetialPath=["order-msg","order-msg2","order-msg3","order-msg4","order-msg5"]; | 
|      | 
|      | 
|     /** | 
|     加载数据 | 
|     **/ | 
|     $(function(){ | 
|         var pageSize=$("#limit").val(); | 
|         var flag = $.query.get("flag"); | 
|         if(flag){ | 
|             $("#order-select").val(flag); | 
|         } | 
|         Pagination.init({ | 
|             url: basePath+"/admin/shoppinggoods/showGoodsList", | 
|             pageSize : pageSize, | 
|             builderDate:function(loj){ | 
|                 var initType=$("#order-select").val(); | 
|                 if(loj.getRowCount()>0){ | 
|                     $("#main").show();                                     | 
|                     //构建数据 | 
|                     var html=""; | 
|                     var name; | 
|                     var price; | 
|                     var priceFlag='¥'; | 
|                     var pageType=0; | 
|                     var car='<i style="font-size:12px;    line-height: 25px; width:25px; height:25px;" class="am-icon-btn am-success am-icon-cart-plus  am-success am-icon-sm "  ></i> '; | 
|                     if(initType=='家居产品'){ | 
|                         pageType=1; | 
|                     } | 
|                     else if(initType=='项目'){ | 
|                         pageType=2; | 
|                     } | 
|                     else if(initType=='套餐'){ | 
|                         pageType=3; | 
|                     }else if(initType=='充值卡'){ | 
|                         pageType=4; | 
|                     }else if(initType=='综合卡'){ | 
|                         pageType=5; | 
|                     } | 
|                     for(var i=0 ; i<loj.getRowCount(); i++ ){ | 
|                         html +='<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">' | 
|                             +'<div class="am-u-sm-5 ">'; | 
|                             console.log(initType); | 
|                             if(initType=='家居产品'){ | 
|                                 html +='<h3 onclick="addCar('+loj.getString(i,'id')+',\''+initType+'\','+''+')"  class="am-list-item-hd">'+car+loj.getString(i,"name")+'</h3>' | 
|                             } | 
|                             else if(initType=='项目'){ | 
|                                 //var assembleId=loj.getString(i,"assembleProj")[0].id; | 
|                                 //console.log(assembleId); | 
|                                 html +='<h3 onclick="addCar('+loj.getString(i,'id')+',\''+initType+'\','+''+')" class="am-list-item-hd">'+car+loj.getString(i,"name")+'</h3>'; | 
|                              } | 
|                             else{    html +='<h3 onclick="addCar('+loj.getString(i,'id')+',\''+initType+'\')" class="am-list-item-hd">'+car+loj.getString(i,"name")+'</h3>'; | 
|                             } | 
|                             var sealPice=loj.getString(i,"sealPice"); | 
|                             if(!sealPice){sealPice=0} | 
|                              | 
|                             html+='</div>' | 
|                             +'<div class="am-u-sm-4 ">' | 
|                             +'    <h3 class="am-list-item-hd color-r">'+priceFlag+sealPice+'</h3>' | 
|                             +'</div>' | 
|                             +'<div class="am-u-sm-3 ">' | 
|                             +'<a href="'+getOrderDetialPath[pageType-1]+'?ding_order_id='+loj.getString(i,"id")+'">详情</a>' | 
|                             +'</div>' | 
|                             +'</li>'; | 
|                     } | 
|                     return html; | 
|                 }else{ | 
|                     $("#main").hide(); | 
|                     $("#pagingBox").hide(); | 
|   | 
|                 }             | 
|             } | 
|         }).serchDate(); | 
|     }) | 
|          | 
|         //fn2 下拉列表,添加change事件 | 
|         $("#order-select").change(function(){ | 
|             $("#_offset").val(0) | 
|             Pagination.serchDate(); | 
|         }); | 
|      | 
|   | 
|     </script> | 
|     <!-- index js --> | 
| </body> | 
| </html> |