瀏覽代碼

客户修改

wangxiaoming 5 年之前
父節點
當前提交
521c51cf2f

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

@@ -69,10 +69,12 @@
             temp.*,
             trsc.company_name companyName,
             trsi.store_name  storeName,
-            pt.proc_type_name procTypeName,
             od.batch_create_time  batchCreateTime,
             ao.admin_name  salesAdminName,
-            pt.proc_type_id procTypeId
+            pt.proc_type_name procTypeName,
+            pt.proc_type_id procTypeId,
+        cr.proc_method_id,
+        pm.proc_method_name
         FROM
         (
             SELECT
@@ -1463,8 +1465,8 @@
           si.store_name,
           sc.company_name,
           sa.admin_name AS  salesAdminName,
-          tx.proc_type_name procTypeName,
-          tx.proc_type_id procTypeId,
+          pt.proc_type_name procTypeName,
+          pt.proc_type_id procTypeId,
           ddc.deal_channel_name AS dealChannelName,
           dd.dealer_name AS dealerName,
           SUM(oi.item_cost_total) AS cost_total,
@@ -1477,42 +1479,41 @@
         LEFT JOIN  tb_rst_sales_company sc ON  tb_rst_sales_order_info.sales_company_id = sc.company_id
         LEFT JOIN tb_rst_sales_order_item oi ON tb_rst_sales_order_info.sales_id = oi.item_order_id
         LEFT JOIN tb_rst_cm_relation cr ON tb_rst_sales_order_info.sales_customer_id = cr.customer_id
-        LEFT JOIN (
-            SELECT pm.*,
-            pt.proc_type_name
-            FROM tb_rst_cm_proc_method pm
-            LEFT JOIN tb_rst_cm_proc_type pt ON pt.proc_type_id = pm.proc_type_id
-        ) tx ON tx.proc_method_id = cr.proc_method_id
+        LEFT JOIN tb_rst_cm_proc_method pm ON pm.proc_method_id = cr.proc_method_id
+        LEFT JOIN tb_rst_cm_proc_type pt ON pt.proc_type_id = pm.proc_type_id
         LEFT JOIN tb_rst_sys_admin sa ON tb_rst_sales_order_info.sales_admin_id = sa.admin_id
         LEFT JOIN tb_rst_dm_claim_order dco on oi.item_id=dco.item_id
         <where>
-            <if test="isCustmerAddOrder !=null and isCustmerAddOrder == 2">
-                AND sales_batch_id != 'KS00000000000001'
-            </if>
-            <if test="salesIsDownload !=null and salesIsDownload !=''">
-                AND sales_is_download = #{salesIsDownload}
-            </if>
             <if test="salesShippingStatus !=null">
                 AND sales_shipping_status = #{salesShippingStatus}
             </if>
             <if test="salesStatus !=null">
                 AND sales_status = #{salesStatus}
             </if>
+            <if test="salesBatchId !=null and salesBatchId !=''">
+                AND sales_batch_id = #{salesBatchId}
+            </if>
+            <if test="isCustmerAddOrder !=null and isCustmerAddOrder == 2">
+                AND sales_batch_id != 'KS00000000000001'
+            </if>
+            <if test="salesIsDownload !=null and salesIsDownload !=''">
+                AND sales_is_download = #{salesIsDownload}
+            </if>
             <if test="salesOrderStatus !=null">
                 AND sales_order_status = #{salesOrderStatus}
             </if>
             <if test="salesDeliver !=null">
                 AND sales_deliver = #{salesDeliver}
             </if>
+            <if test="salesCompanyId !=null and salesCompanyId !=''">
+                AND sales_company_id = #{salesCompanyId}
+            </if>
             <if test="salesStoreId !=null and salesStoreId !=''">
                 AND sales_store_id = #{salesStoreId}
             </if>
             <if test="salesPostFirm !=null and salesPostFirm !=''">
                 AND sales_post_firm = #{salesPostFirm}
             </if>
-            <if test="salesCompanyId !=null and salesCompanyId !=''">
-                AND sales_company_id = #{salesCompanyId}
-            </if>
             <if test="salesId !=null">
                 AND sales_id = #{salesId}
             </if>
@@ -1531,9 +1532,6 @@
             <if test="salesAddressName !=null and salesAddressName !=''">
                 AND sales_address_name like CONCAT('%',#{salesAddressName},'%')
             </if>
-            <if test="salesBatchId !=null and salesBatchId !=''">
-                AND sales_batch_id = #{salesBatchId}
-            </if>
             <if test="salesAddressInfo !=null and salesAddressInfo !=''">
                 AND sales_address_info like CONCAT('%',#{salesAddressInfo},'%')
             </if>

+ 0 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/dm/DmDealerServiceImpl.java

@@ -364,7 +364,6 @@ public class DmDealerServiceImpl  implements DmDealerService {
     public PagedResult<DmDealer> listDmDealerStatistic(PageRequest<DmDealer> pageRequest) {
         PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
         List<DmDealer> dmDealerList = dmDealerMapper.listDmDealerStatistic(pageRequest.getData());
-        LoggerFactory.getLogger(this.getClass()).info("tttttttttt");
         return PageUtil.getPage(dmDealerList);
     }
 

+ 10 - 9
watero-rst-web/src/main/java/com/iamberry/rst/controllers/dm/FinanciaReceController.java

@@ -20,6 +20,7 @@ import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.wechat.tools.ResponseJson;
 import net.sf.json.JSONArray;
+import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -164,12 +165,12 @@ public class FinanciaReceController {
     }
 
     /**
-     * to修改客户页面
+     * to修改回款页面
      * @return
      * @author
      * @date
      */
-    @RequiresPermissions("dm:dealer:update")
+    @RequiresPermissions("dm:FinancialReceipt:update")
     @RequestMapping("/to_update_finan_rece")
     public ModelAndView toUpdateDealer(HttpServletRequest request,Integer frId) {
         ModelAndView mv = new ModelAndView("dm/financialReceipt/update_fr");
@@ -186,12 +187,12 @@ public class FinanciaReceController {
     }
 
     /**
-     * 修改客户信息
+     * 修改回款信息
      * @param request
      * @return
      */
     @ResponseBody
-    @RequiresPermissions("dm:supplier:update")
+    @RequiresPermissions("dm:FinancialReceipt:update")
     @RequestMapping("/finan_rece_update")
     public ResponseJson dealereUpdate(HttpServletRequest request,FinancialReceipt financialReceipt) {
         ResponseJson rj = ResponseJson.getSUCCESS();
@@ -266,7 +267,7 @@ public class FinanciaReceController {
      * @return
      */
     @ResponseBody
-    @RequiresPermissions("dm:financialReceipt:recognize")
+    @RequiresPermissions(value={"dm:financialReceipt:recognize","dm:FinancialReceipt:update"},logical= Logical.OR)
     @RequestMapping("/claim_delaer")
     public ResponseJson claimDelaer(HttpServletRequest request,Integer frId,Integer dealerId,Integer type) {
         ResponseJson rj = ResponseJson.getSUCCESS();
@@ -305,7 +306,7 @@ public class FinanciaReceController {
     }
 
     /**
-     * to修改客户页面
+     * to修改订单
      * @return
      * @author
      * @date
@@ -322,6 +323,9 @@ public class FinanciaReceController {
         claimOrder.setFrId(frId);
         List<ClaimOrder> claimOrderList = claimOrderService.getClaimOrderList(claimOrder);
         mv.addObject("claimOrderList",claimOrderList);
+
+        Admin admin = AdminUtils.getLoginAdmin();
+        mv.addObject("admin",admin);
         return mv;
     }
 
@@ -560,10 +564,7 @@ public class FinanciaReceController {
         // 封装请求数据
         PageRequest<DmDealer> pageRequest = new PageRequest<>(dmDealer, pageNO, pageSize, totalNum == 0);
         // 查询订单列表
-        long x = System.currentTimeMillis();
         PagedResult<DmDealer> result = dmDealerService.listDmDealerStatistic(pageRequest);
-        long y = System.currentTimeMillis();
-        System.out.println("long tima : " +  (y-x));
         if (totalNum != 0) {
             result.setTotal(totalNum);
         }

File diff suppressed because it is too large
+ 26 - 14
watero-rst-web/src/main/webapp/WEB-INF/views/dm/dealer/dm_order_statistics.ftl


+ 13 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/fr_list.ftl

@@ -131,29 +131,37 @@
                                 </#if>
                             </#if>
 
-                                <#if financialReceipt.frClaimStatus == 2>
+                                <#if financialReceipt.frClaimStatus == 2 && (admin.adminDept == 2 || admin.adminDept == 1)>
                                        <a style="text-decoration:none" href="javascript:void(0);" title="认款" onclick="claimDelaer(${financialReceipt.frId!''},1)">
                                             <font color=#06c>认款</font>
                                        </a>
                                 </#if>
-                                <#if financialReceipt.frClaimStatus == 1>
+                                <#if financialReceipt.frClaimStatus == 1 && (admin.adminDept == 2 || admin.adminDept == 1)>
                                        <a style="text-decoration:none" href="javascript:void(0);" title="取消绑定。" onclick="cancelClaimDelaer(${financialReceipt.frId!''},2)">
                                             <font color=#06c>取消认款</font>
                                        </a>
                                 </#if>
 
-                                <#if financialReceipt.frClaimStatus == 1>
+                                <#if financialReceipt.frClaimStatus == 1 && (admin.adminDept == 2 || admin.adminDept == 1)>
                                        <a style="text-decoration:none" href="javascript:void(0);" title="认领订单" onclick="toOrderDesc(${financialReceipt.frId!''})">
                                             <font color=#06c>认领订单</font>
                                        </a>
                                 </#if>
-                                <#if financialReceipt.frClaimStatus == 3>
+                                <#if financialReceipt.frClaimStatus == 3 && (admin.adminDept == 2 || admin.adminDept == 1)>
                                     <a style="text-decoration:none" href="javascript:void(0);" title="认领订单" onclick="toOrderDesc(${financialReceipt.frId!''})">
                                         <font color=#06c>认领订单</font>
                                     </a>
                                 </#if>
 
-                               <#if financialReceipt.frClaimStatus == 2 && admin.adminDept == 1>
+
+                                <#if financialReceipt.frClaimStatus == 3 && admin.adminDept == 5>
+                                    <a style="text-decoration:none" href="javascript:void(0);" title="查看订单" onclick="toOrderDesc(${financialReceipt.frId!''})">
+                                        <font color=#06c>查看订单</font>
+                                    </a>
+                                </#if>
+
+
+                                <#if financialReceipt.frClaimStatus == 2 && admin.adminDept == 1>
                                    <a style="text-decoration:none;" href="javascript:void(0);" title="删除" onclick="deleteFr(${financialReceipt.frId!''})">
                                        <font color=#06c>删除</font>
                                    </a>

+ 32 - 10
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/order_desc.ftl

@@ -102,11 +102,13 @@
                 </div>
             </div>
 
-            <div class="row cl" id="" style="">
-                <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
-                    <button type="button" class="btn btn-primary" onclick="selectOrder(1)">添加正常订单</button>
+            <#if (admin.adminDept == 2 || admin.adminDept == 1)>
+                <div class="row cl" id="" style="">
+                    <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
+                        <button type="button" class="btn btn-primary" onclick="selectOrder(1)">添加正常订单</button>
+                    </div>
                 </div>
-            </div>
+            </#if>
 
             <div class="row cl" id="" style="">
                 <div class="formControls col-12 col-sm-12" >
@@ -162,11 +164,20 @@
                 </div>
             </div>
 
-            <div class="row cl" id="" style="">
-                <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
-                    <button type="button" class="btn btn-primary" onclick="selectOrder(2)">添加退货订单</button>
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">退货信息</div>
+                </label>
+                <div class="formControls col-9">
                 </div>
             </div>
+            <#if (admin.adminDept == 2 || admin.adminDept == 1)>
+                <div class="row cl" id="" style="">
+                    <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
+                        <button type="button" class="btn btn-primary" onclick="selectOrder(2)">添加退货订单</button>
+                    </div>
+                </div>
+            </#if>
             <div class="row cl" id="" style="">
                 <div class="formControls col-12 col-sm-12" >
                     <table class="table table-border table-bordered table-bg table-hover table-sort">
@@ -222,11 +233,20 @@
                 </div>
             </div>
 
-            <div class="row cl" id="" style="">
-                <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
-                    <button type="button" class="btn btn-primary" onclick="selectOrderReturnPost()">添加退货邮费</button>
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">退货邮费</div>
+                </label>
+                <div class="formControls col-9">
                 </div>
             </div>
+            <#if (admin.adminDept == 2 || admin.adminDept == 1)>
+                <div class="row cl" id="" style="">
+                    <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
+                        <button type="button" class="btn btn-primary" onclick="selectOrderReturnPost()">添加退货邮费</button>
+                    </div>
+                </div>
+            </#if>
             <div class="row cl" id="" style="">
                 <div class="formControls col-12 col-sm-12" >
                     <table class="table table-border table-bordered table-bg table-hover table-sort">
@@ -300,11 +320,13 @@
                 </p>
             </div>
 
+        <#if (admin.adminDept == 2 || admin.adminDept == 1)>
             <div class="row cl">
                 <div class="col-2 col-sm-2">
                     <button class="btn btn-block btn-primary size-XL" type="submit">提交</button>
                 </div>
             </div>
+        </#if>
 
         </form>
     </div>

+ 53 - 24
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/select_order_list.ftl

@@ -9,6 +9,8 @@
     <link rel="Bookmark" href="/favicon.ico" >
     <link rel="Shortcut Icon" href="/favicon.ico" />
 <#include "/base/add_base.ftl">
+
+
     <title>订单列表</title>
     <style>
         .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
@@ -63,16 +65,20 @@
             <form action="" method="post">
                 <div class="row cl" style="margin-left: 0px;margin-bottom: 10px;">
 
-                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 280px;line-height: 29px;" >
-                        <select class="chosenDealerId select" name="dealerId" id="dealerId">
-                             <option value="">选择客户</option>
-                            <#if dmDealerList?? &&  (dmDealerList?size > 0) >
-                                <#list dmDealerList as dmDealer>
-                                    <option value ="${dmDealer.dealerId!""}">${dmDealer.dealerName!""}</option>
-                                </#list>
-                            </#if>
-                        </select>
-                    </div>
+                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 220px;" >
+                        <div id="store-select-1"  style="width: 100%;float: left;">
+                            <label>
+                                <select class="chosenDealerId" name="dealerId" id="dealerId" >
+                                    <option value="">选择客户</option>
+                                    <#if dmDealerList?? &&  (dmDealerList?size > 0) >
+                                        <#list dmDealerList as dmDealer>
+                                            <option value ="${dmDealer.dealerId!""}">${dmDealer.dealerName!""}</option>
+                                        </#list>
+                                    </#if>
+                                </select>
+                            </label>
+                        </div>
+                     </div>
 
                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;"> <span class="select-box">
                         <select name="storeId" class="select" id="storeId">
@@ -101,16 +107,21 @@
                         </span>
                      </div>
 
-                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 180px;line-height: 29px;" >
-                        <select class="chosenColorId select" name="colorId" id="colorId"  style="width: 1000px;">
-                            <option value="">产品名称(颜色)</option>
-                            <#if productColorList?? &&  (productColorList?size > 0) >
-                                <#list productColorList as productColor>
-                                    <option value="${productColor.colorId}">${productColor.productName}(${productColor.colorName})</option>
-                                </#list>
-                            </#if>
-                        </select>
-                    </div>
+                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 220px;" >
+                         <div  style="width: 100%;float: left;">
+                             <label>
+                                 <select class="chosenColorId "name="colorId" id="colorId"  >
+                                     <option value="">产品名称(颜色)</option>
+                                     <#if productColorList?? &&  (productColorList?size > 0) >
+                                         <#list productColorList as productColor>
+                                             <option value="${productColor.colorId}">${productColor.productName}(${productColor.colorName})</option>
+                                         </#list>
+                                     </#if>
+                                 </select>
+                             </label>
+                         </div>
+                     </div>
+
                 </div>
 
 
@@ -344,15 +355,32 @@
         });
     }
 
-   $('.chosenDealerId').chosen({
+//   $('.chosenDealerId').chosen({
+//        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+//        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+//        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+//        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+//        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+//        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+//        placeholder_text_single: '选择产品', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+//        width: '250px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+//        max_shown_results: 1000, //下拉框最大显示选项数量
+//        display_disabled_options: false,
+//        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+//        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+//        group_search: false, //选项组是否可搜。此处搜索不可搜
+//        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+//    });
+
+    $('.chosenDealerId').chosen({
         no_results_text: "没有找到结果!",//搜索无结果时显示的提示
         search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
         allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
         disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
         disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
         inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
-        placeholder_text_single: '选择产品', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
-        width: '250px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        width: '210px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
         max_shown_results: 1000, //下拉框最大显示选项数量
         display_disabled_options: false,
         single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
@@ -360,6 +388,7 @@
         group_search: false, //选项组是否可搜。此处搜索不可搜
         include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
     });
+
     $('.chosenColorId').chosen({
         no_results_text: "没有找到结果!",//搜索无结果时显示的提示
         search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
@@ -368,7 +397,7 @@
         disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
         inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
         placeholder_text_single: '选择产品', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
-        width: '350px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        width: '210px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
         max_shown_results: 1000, //下拉框最大显示选项数量
         display_disabled_options: false,
         single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除

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

@@ -751,7 +751,7 @@
         disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
         inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
         placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
-        width: '520px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        width: '100px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
         max_shown_results: 1000, //下拉框最大显示选项数量
         display_disabled_options: false,
         single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除