Sfoglia il codice sorgente

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

wangxiaoming 6 anni fa
parent
commit
634ba8ced0

+ 3 - 1
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintQuestionInfoService.java

@@ -2,6 +2,8 @@ package com.iamberry.rst.faces.cm;
 
 import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
 import com.iamberry.rst.core.cm.ComplaintSmallClassInfo;
+import com.iamberry.rst.core.cm.SalesOrder;
+import com.iamberry.rst.core.page.PagedResult;
 
 import java.util.List;
 
@@ -36,5 +38,5 @@ public interface ComplaintQuestionInfoService {
      * 查询所有客诉类型
      * @return
      */
-    List<ComplaintQuestionInfo> listComplaintQuestionInfo(ComplaintQuestionInfo complaintQuestionInfo);
+    PagedResult<ComplaintQuestionInfo> listComplaintQuestionInfo(int pageNO, int pageSize, ComplaintQuestionInfo complaintQuestionInfo, boolean isTotalNum);
 }

+ 8 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintQuestionInfoServiceImpl.java

@@ -1,12 +1,16 @@
 package com.iamberry.rst.service.cm;
 
 
+import com.github.pagehelper.PageHelper;
+import com.iamberry.rst.core.approval.ApprovalApplyPick;
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
 import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
+import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.cm.ComplaintDetectInfoService;
 import com.iamberry.rst.faces.cm.ComplaintQuestionInfoService;
 import com.iamberry.rst.service.cm.mapper.ComplaintDetectInfoMapper;
 import com.iamberry.rst.service.cm.mapper.ComplaintQuestionInfoMapper;
+import com.iamberry.rst.util.PageUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -39,8 +43,10 @@ public class ComplaintQuestionInfoServiceImpl implements ComplaintQuestionInfoSe
     }
 
     @Override
-    public List<ComplaintQuestionInfo> listComplaintQuestionInfo(ComplaintQuestionInfo complaintQuestionInfo) {
-        return complaintDetectInfoMapper.listComplaintQuestionInfo(complaintQuestionInfo);
+    public PagedResult<ComplaintQuestionInfo> listComplaintQuestionInfo(int pageNO, int pageSize,ComplaintQuestionInfo complaintQuestionInfo, boolean isTotalNum) {
+        PageHelper.startPage(pageNO, pageSize, isTotalNum);
+        List<ComplaintQuestionInfo> list = complaintDetectInfoMapper.listComplaintQuestionInfo(complaintQuestionInfo);
+        return PageUtil.getPage(list);
     }
 
 

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintQuestionInfoMapper.xml

@@ -76,7 +76,7 @@
       AND question_state = 1
     </where>
     ORDER BY question_create_time DESC
-    limit 0,20
+
   </select>
 
   <insert id="insert" parameterType="ComplaintQuestionInfo"  useGeneratedKeys="true" keyProperty="questionId">

+ 3 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml

@@ -1310,7 +1310,9 @@
         SELECT
             DATE_FORMAT(oi.sales_create_time,'%Y-%m-%d')
         FROM tb_rst_sales_order_info oi
-        WHERE oi.sales_status = 1
+        WHERE oi.sales_status = 1.
+        .
+        
         AND (oi.sales_shipping_status  = 11 OR oi.sales_deliver = 1)
         AND DATE_FORMAT(oi.sales_create_time,'%Y-%m-%d') &lt; DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 day),'%Y-%m-%d')
         AND  oi.sales_batch_id != 'KS00000000000001'

+ 16 - 8
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/ComplaintQuestionInfoController.java

@@ -1,8 +1,10 @@
 package com.iamberry.rst.controllers.cm;
 
+import com.iamberry.rst.core.approval.ApprovalApplyPick;
 import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
 import com.iamberry.rst.core.cm.ComplaintSmallClassInfo;
 import com.iamberry.rst.core.cm.ComplaintTypeInfo;
+import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.cm.ComplaintQuestionInfoService;
 import com.iamberry.rst.faces.cm.ComplaintSmallClassInfoService;
 import com.iamberry.rst.faces.cm.ComplaintTypeInfoService;
@@ -11,6 +13,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -92,15 +95,20 @@ public class ComplaintQuestionInfoController {
      */
     @ResponseBody
     @RequestMapping(value = "/list_complaintQuestion")
-    public ResponseJson listComplaintQuestion(HttpServletRequest request,ComplaintQuestionInfo complaintQuestionInfo) {
-        List<ComplaintQuestionInfo> complaintQuestionInfoList = complaintQuestionInfoService.listComplaintQuestionInfo(complaintQuestionInfo);
-        if (complaintQuestionInfoList == null || complaintQuestionInfoList.size() < 1) {
-            return new ResponseJson(500, "查询失败", 500);
-        } else {
-            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
-            rj.addResponseKeyValue("complaintQuestionInfoList", complaintQuestionInfoList);
-            return rj;
+    public ResponseJson listComplaintQuestion(HttpServletRequest request,
+                                              @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+                                              @RequestParam(value = "pageNo", defaultValue = "1", required = false) Integer pageNo,
+                                              @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum,
+                                              ComplaintQuestionInfo complaintQuestionInfo) {
+        PagedResult<ComplaintQuestionInfo> pagedResult = complaintQuestionInfoService.listComplaintQuestionInfo(pageNo, pageSize, complaintQuestionInfo, totalNum == 0);
+        if (totalNum != 0) {
+            pagedResult.setTotal(totalNum);
         }
+        ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+        rj.addResponseKeyValue("complaintQuestionInfoList", pagedResult.getDataList());
+        rj.addResponseKeyValue("pagedResult", pagedResult);
+        return rj;
+
     }
 
     /**

+ 1 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java

@@ -613,6 +613,7 @@ public class AdminOrderController {
         List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
         mv.addObject("listStoreInfo",listStoreInfo);
         mv.addObject("heads", ExcelUtil.readExcelHead(request.getServletContext().getRealPath(file)));
+        mv.addObject("logisticsInfoList",logisticsInfoService.getLogisticsInfoList(new LogisticsInfo()));
         mv.addObject("productUrl", file);
         mv.addObject("orderBatchs", orderBatchService.getOrderBatchListTwenty());
         return mv;

+ 2 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/MallOrderController.java

@@ -131,14 +131,14 @@ public class MallOrderController {
                  List<ProductColor> listColor = productService.listproductAndColor(productColor);
                  SalesOrderItem salesOrderItem = new SalesOrderItem();
                  salesOrderItem.setItemNum(Integer.valueOf(orderItem.get("goods_number").toString()));
-                 salesOrderItem.setItemProductName(orderItem.get("goods_name").toString());
+                 /*salesOrderItem.setItemProductName(orderItem.get("goods_name").toString());*/
                  if (listColor.size() > 0) {
                     productColor = listColor.get(0);
                     Product product = productService.getProductById(listColor.get(0).getColorId());
                     salesOrderItem.setItemColorId(productColor.getColorId());
                     salesOrderItem.setItemProductId(product.getProductId());
                     salesOrderItem.setItemProductType(product.getProductType());
-                    /*salesOrderItem.setItemProductName(product.getProductName());*/
+                    salesOrderItem.setItemProductName(product.getProductName());
                     salesOrderItem.setItemProductPic(productColor.getColorPicture());
                     salesOrderItem.setItemProductColor(productColor.getColorName());
                     salesOrderItem.setItemColorBar(productColor.getColorBar());

+ 2 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -293,6 +293,8 @@
                             <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
                             <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
                         </ul>
+                        <a href="javascript:void(0)" style="" onclick="initComplaintQuestionInfo('pr')">上一页</a>
+                        <a href="javascript:void(0)" style="margin-left: 200px;" onclick="initComplaintQuestionInfo('ne')">下一页</a>
                     </div>
                 </div>
 

+ 2 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl

@@ -275,6 +275,8 @@
                             <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
                             <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
                         </ul>
+                        <a href="javascript:void(0)" style="" onclick="initComplaintQuestionInfo('pr')">上一页</a>
+                        <a href="javascript:void(0)" style="margin-left: 200px;" onclick="initComplaintQuestionInfo('ne')">下一页</a>
                     </div>
                 </div>
 

+ 8 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order_new.ftl

@@ -156,14 +156,16 @@
                 <td width="55">物流方式</td>
                 <td style="text-align: left;">
                     <div class="formControls col-10 col-sm-10 skin-minimal customerSourceType_text_all"  style="width: 100%;">
-                        <div class="radio-box">
-                            <input type="radio" id="post-type-1" name="product-post-type" value="EMS" checked >
-                            <label for="post-type-1" style="height: 30px; line-height: 30px;">EMS</label>
-                        </div>
-                        <div class="radio-box">
+                        <#list logisticsInfoList as logisticsInfo>
+                            <div class="radio-box">
+                                <input type="radio" id="post-type-${logisticsInfo_index}" name="product-post-type" value="${logisticsInfo.logisticsRstCode}" <#if logisticsInfo.logisticsRstCode == 'STO'>checked</#if> >
+                                <label for="post-type-${logisticsInfo_index}" style="height: 30px; line-height: 30px;">${logisticsInfo.logisticsName}</label>
+                            </div>
+                        </#list>
+                       <#-- <div class="radio-box">
                             <input type="radio" id="post-type-2" name="product-post-type" value="STO" >
                             <label for="post-type-2" style="height: 30px; line-height: 30px;">申通</label>
-                        </div>
+                        </div>-->
                     </div>
                 </td>
             </tr>

+ 2 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl

@@ -277,11 +277,9 @@
         radioClass: 'iradio-blue',
         increaseArea: '20%'
     });
+    var ulc = initAddress($(".address_info"));
+    var sc = initSalesChannel($(".sales_channel"));
 
-   $(function (){
-        var ulc = initAddress($(".address_info"));
-        var sc = initSalesChannel($(".sales_channel"));
-   })
 
 </script>
 

+ 34 - 4
watero-rst-web/src/main/webapp/common/js/customer/customer.js

@@ -754,7 +754,10 @@ function initComplaintSmallClassInfo(complaintId,smallId){
     }
 }
 
-
+var pageNo = 0;//当前页数
+var pages = 1;//总页数
+/*var previousPage = 0;//上一页
+var nextPage = 0;//下一页*/
 /**
  * 搜索QA 显示
  * type  p:问题qa;  m:邮寄qa
@@ -766,14 +769,37 @@ function initComplaintQuestionInfo(type){
     var customerCounselType;
     var questionId;
     if(type == "p"){
+        pageNo = 0;//当前页数
+        pages = 1;//总页数
         complaintId = $("[name='complaintId']").val();
         smallClassId = $("[name='smallClassId']").val();
         questionName = $("[name='questionIdMsg']").val();
         customerCounselType = $("[name='customerCounselType']:checked").val();
     }else if(type == "m"){
+        pageNo = 0;//当前页数
+        pages = 1;//总页数
         questionId = complaint_questionId;
+    }else if(type == "pr"){
+        if(pageNo - 1 < 1){
+            layer.alert("已经到第一页了");
+            return;
+        }
+        complaintId = $("[name='complaintId']").val();
+        smallClassId = $("[name='smallClassId']").val();
+        questionName = $("[name='questionIdMsg']").val();
+        customerCounselType = $("[name='customerCounselType']:checked").val();
+        pageNo = pageNo - 1;
+    }else if(type == "ne"){
+        if(pageNo + 1 > pages){
+            layer.alert("已经是最后一页了");
+            return;
+        }
+        complaintId = $("[name='complaintId']").val();
+        smallClassId = $("[name='smallClassId']").val();
+        questionName = $("[name='questionIdMsg']").val();
+        customerCounselType = $("[name='customerCounselType']:checked").val();
+        pageNo = pageNo + 1;
     }
-
     $.ajax({
         type: "POST",
         data: {
@@ -781,12 +807,13 @@ function initComplaintQuestionInfo(type){
             smallClassId : smallClassId,
             questionName : questionName,
             /*complaintType : customerCounselType,*/
-            questionId : questionId
+            questionId : questionId,
+            pageNo : pageNo
         },
         url: url_path + "/admin/complaintQuestion/list_complaintQuestion",
         async: false,
         success: function(data){
-            if(type == "p"){
+            if(type == "p" || type == "pr" || type == "ne"){
                 var html = "";
                 if (data.returnCode == 200) {
                     for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
@@ -805,6 +832,9 @@ function initComplaintQuestionInfo(type){
                 }else{
                     html = '<span style="font-size: 12px; margin-top: 10px; display: block;">未搜索到QA信息,请更换关键字或者直接录入到系统!</span>';
                 }
+                pages = data.returnMsg.pagedResult.pages;
+                pageNo = data.returnMsg.pagedResult.pageNo;
+                $("#question").find("li").remove();
                 $("#question").html(html);
                 $(".dalog-ask").show();
             }else if(type == "m"){

+ 4 - 3
watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

@@ -115,14 +115,15 @@ function setSelectCustomer(customerId){
                 var customer = data.returnMsg.customer;
                 $("#salesCustomerIdHtml").html("已经选择客诉记录:"+customer.customerId);
                 $("#salesCustomerId").val(customer.customerId);
-                // sc.setCompanyId(customer.companyId);
-                // sc.setStoreId(customer.storeId);
+                /*sc.setCompanyId(customer.companyId);
+                sc.setStoreId(customer.storeId);*/
                 /*设置用户姓名、电话*/
                 $("#salesAddressName").val(customer.customerName);
                 $("#salesAddressTel").val(customer.customerTel);
                 /* 售后订单的支付时间、支付方式默认 */
                 $("#salesPayTime").val(customer.salesTime);
-
+                sc.setUlcById(0,1,11);
+                ulc.setUlcByName(0,"省","市","区");
             }else{
             }
             $("#salesCustomer").show();