Bladeren bron

审批系统修改

liujiankang 6 jaren geleden
bovenliggende
commit
9a6f4e3830
18 gewijzigde bestanden met toevoegingen van 288 en 86 verwijderingen
  1. 64 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/AdminApprovalAuthority.java
  2. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalApplyPickItem.java
  3. 4 3
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalInventoryRecords.java
  4. 19 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProduction.java
  5. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProductionItem.java
  6. 9 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerStatisticalInfo.java
  7. 14 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/approval/ApprovalOrderService.java
  8. 1 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/approval/ApplyPickServiceImpl.java
  9. 19 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/approval/ApprovalOrderServiceImpl.java
  10. 14 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/ApprovalOrderMapper.java
  11. 43 9
      watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/approvalOrderMapper.xml
  12. 3 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  13. 41 7
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/approval/ApprovalController.java
  14. 2 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  15. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/utils/ExcelUtil.java
  16. 1 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  17. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl
  18. 32 61
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

+ 64 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/AdminApprovalAuthority.java

@@ -0,0 +1,64 @@
+package com.iamberry.rst.core.approval;
+
+import java.io.Serializable;
+
+/**
+ * Created by Administrator on 2018/12/4.
+ */
+public class AdminApprovalAuthority implements Serializable{
+    private static final long serialVersionUID = -2284379645448758797L;
+    private Integer authorityId;
+    private Integer adminId;
+    private Integer isSales;
+    private Integer isPmc;
+    private Integer isManagement;
+    private Integer isWarehouse;
+
+    public Integer getAuthorityId() {
+        return authorityId;
+    }
+
+    public void setAuthorityId(Integer authorityId) {
+        this.authorityId = authorityId;
+    }
+
+    public Integer getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(Integer adminId) {
+        this.adminId = adminId;
+    }
+
+    public Integer getIsSales() {
+        return isSales;
+    }
+
+    public void setIsSales(Integer isSales) {
+        this.isSales = isSales;
+    }
+
+    public Integer getIsPmc() {
+        return isPmc;
+    }
+
+    public void setIsPmc(Integer isPmc) {
+        this.isPmc = isPmc;
+    }
+
+    public Integer getIsManagement() {
+        return isManagement;
+    }
+
+    public void setIsManagement(Integer isManagement) {
+        this.isManagement = isManagement;
+    }
+
+    public Integer getIsWarehouse() {
+        return isWarehouse;
+    }
+
+    public void setIsWarehouse(Integer isWarehouse) {
+        this.isWarehouse = isWarehouse;
+    }
+}

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalApplyPickItem.java

@@ -43,6 +43,8 @@ public class ApprovalApplyPickItem implements Serializable{
     /* 生产项id */
     private Integer itemId;
 
+    private String itemExternalModel ;//外部型号
+
     public Integer getApplyItemId(){
         return applyItemId;
     }
@@ -146,4 +148,12 @@ public class ApprovalApplyPickItem implements Serializable{
     public void setItemId(Integer itemId) {
         this.itemId = itemId;
     }
+
+    public String getItemExternalModel() {
+        return itemExternalModel;
+    }
+
+    public void setItemExternalModel(String itemExternalModel) {
+        this.itemExternalModel = itemExternalModel;
+    }
 }

+ 4 - 3
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalInventoryRecords.java

@@ -1,6 +1,7 @@
 package com.iamberry.rst.core.approval;
 
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * Created by Administrator on 2018/9/29.
@@ -18,7 +19,7 @@ public class ApprovalInventoryRecords implements Serializable {
     private Integer actualStorage;//实际入库数量
     private Integer lackNumber;//入库后缺少数量
     private Integer operatingAdminId;//操作人
-    private Integer operatingTime;//
+    private Date operatingTime;//
 
     private String brandName;//品牌名称
     private String productModel;//产品型号
@@ -105,11 +106,11 @@ public class ApprovalInventoryRecords implements Serializable {
         this.operatingAdminId = operatingAdminId;
     }
 
-    public Integer getOperatingTime() {
+    public Date getOperatingTime() {
         return operatingTime;
     }
 
-    public void setOperatingTime(Integer operatingTime) {
+    public void setOperatingTime(Date operatingTime) {
         this.operatingTime = operatingTime;
     }
 

+ 19 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProduction.java

@@ -35,6 +35,9 @@ public class ApprovalProduction implements Serializable {
     private String contractName;
     private List<ApprovalProductionItem> listProductionItem;//产品项
 
+    private String contactAddress;//客户地址
+    private Date inspectionTime;//验货日期
+
     public Integer getProductionId() {
         return productionId;
     }
@@ -186,4 +189,20 @@ public class ApprovalProduction implements Serializable {
     public void setContractName(String contractName) {
         this.contractName = contractName;
     }
+
+    public String getContactAddress() {
+        return contactAddress;
+    }
+
+    public void setContactAddress(String contactAddress) {
+        this.contactAddress = contactAddress;
+    }
+
+    public Date getInspectionTime() {
+        return inspectionTime;
+    }
+
+    public void setInspectionTime(Date inspectionTime) {
+        this.inspectionTime = inspectionTime;
+    }
 }

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProductionItem.java

@@ -25,6 +25,8 @@ public class ApprovalProductionItem implements Serializable{
     private Date itemCreateTime;
     private Date itemUpdateTime;
 
+    private String itemExternalModel;//外部型号
+
     public Integer getItemId() {
         return itemId;
     }
@@ -144,4 +146,12 @@ public class ApprovalProductionItem implements Serializable{
     public void setItemLackNumber(Integer itemLackNumber) {
         this.itemLackNumber = itemLackNumber;
     }
+
+    public String getItemExternalModel() {
+        return itemExternalModel;
+    }
+
+    public void setItemExternalModel(String itemExternalModel) {
+        this.itemExternalModel = itemExternalModel;
+    }
 }

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerStatisticalInfo.java

@@ -39,6 +39,7 @@ public class CustomerStatisticalInfo implements Serializable {
     private String relationSendLogisticsNo;//寄出单号
     private String customerOutDamaged;//是否开箱损
     private String customerSecondaryCustomer;//是否二次客诉
+    private String adminName;//根据客服姓名
 
     public Integer getCustomerId() {
         return customerId;
@@ -247,4 +248,12 @@ public class CustomerStatisticalInfo implements Serializable {
     public void setCustomerSecondaryCustomer(String customerSecondaryCustomer) {
         this.customerSecondaryCustomer = customerSecondaryCustomer;
     }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
 }

+ 14 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/approval/ApprovalOrderService.java

@@ -128,4 +128,18 @@ public interface ApprovalOrderService {
      * @return
      */
     List<ApprovalInventoryRecords> listInventoryRecords(Integer approvalId);
+
+    /**
+     * 获取管理员审批权限
+     * @param adminId
+     * @return
+     */
+    AdminApprovalAuthority getApprovalAuthority(Integer adminId);
+
+    /**
+     * 获取管理员审批权限list
+     * @param adminApprovalAuthority
+     * @return
+     */
+    List<AdminApprovalAuthority> listApprovalAuthority(AdminApprovalAuthority adminApprovalAuthority);
 }

+ 1 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/ApplyPickServiceImpl.java

@@ -122,6 +122,7 @@ public class ApplyPickServiceImpl  implements ApplyPickService {
             approvalApplyPickItem.setItemProductModel(approvalProductionItem.getItemProductModel());
             approvalApplyPickItem.setItemProductUnit(approvalProductionItem.getItemProductUnit());
             approvalApplyPickItem.setItemProductBoxNumber(approvalProductionItem.getItemProductBoxNumber());
+            approvalApplyPickItem.setItemExternalModel(approvalProductionItem.getItemExternalModel());
         }
         flag = applyPickItemMapper.saveList(approvalApplyPick.getListApplyPickItem());
         if(flag < 1){

+ 19 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/ApprovalOrderServiceImpl.java

@@ -331,8 +331,12 @@ public class ApprovalOrderServiceImpl implements ApprovalOrderService {
         ApprovalInfo approvalInfo = approvalOrderMapper.getApprovalInfoById(appvalId);
         SendMessageUtil sendMessageUtil = new SendMessageUtil();
         productName = productName.substring(0,productName.length() - 1);
+
+        AdminApprovalAuthority authority = new AdminApprovalAuthority();
+        authority.setIsWarehouse(1);
+        List<AdminApprovalAuthority> listAuthority = approvalOrderMapper.listApprovalAuthority(authority);
         Admin adminTwo = new Admin();
-        adminTwo.setAdminDept(8);//工厂仓库部
+        adminTwo.setAdminId(listAuthority.get(0).getAdminId());
         List<Admin> listAdmin = sysMapper.listAdmin(adminTwo);
         sendMessageUtil.putStoragePush(approvalInfo.getApprovalName()+"已入库,本次入库总数量"+productNum+"台",
                 productName,
@@ -463,8 +467,11 @@ public class ApprovalOrderServiceImpl implements ApprovalOrderService {
                                 ResultInfo.LISTISTARTED);
                         //通知仓库订单已确认
                         //获取仓库人员openid
+                        AdminApprovalAuthority authority = new AdminApprovalAuthority();
+                        authority.setIsWarehouse(1);
+                        List<AdminApprovalAuthority> listAuthority = approvalOrderMapper.listApprovalAuthority(authority);
                         Admin adminTwo = new Admin();
-                        adminTwo.setAdminDept(8);//工厂仓库部
+                        adminTwo.setAdminId(listAuthority.get(0).getAdminId());
                         List<Admin> listAdmin = sysMapper.listAdmin(adminTwo);
                         List<ApprovalProductionItem> items = approvalOrderMapper.getIteminfo(approvalInfo.getApprovalId());
                         String products = "";
@@ -715,4 +722,14 @@ public class ApprovalOrderServiceImpl implements ApprovalOrderService {
     public List<ApprovalInventoryRecords> listInventoryRecords(Integer approvalId) {
         return approvalOrderMapper.listInventoryRecords(approvalId);
     }
+
+    @Override
+    public AdminApprovalAuthority getApprovalAuthority(Integer adminId) {
+        return approvalOrderMapper.getApprovalAuthority(adminId);
+    }
+
+    @Override
+    public List<AdminApprovalAuthority> listApprovalAuthority(AdminApprovalAuthority adminApprovalAuthority) {
+        return approvalOrderMapper.listApprovalAuthority(adminApprovalAuthority);
+    }
 }

+ 14 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/ApprovalOrderMapper.java

@@ -115,4 +115,18 @@ public interface ApprovalOrderMapper {
     * @return
     */
       List<ApprovalInventoryRecords> listInventoryRecords(Integer approvalId);
+
+   /**
+    * 获取管理员审批权限
+    * @param adminId
+    * @return
+    */
+   AdminApprovalAuthority getApprovalAuthority(Integer adminId);
+
+   /**
+    * 获取管理员审批权限list
+    * @param adminApprovalAuthority
+    * @return
+    */
+   List<AdminApprovalAuthority> listApprovalAuthority(AdminApprovalAuthority adminApprovalAuthority);
 }

+ 43 - 9
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/approvalOrderMapper.xml

@@ -40,6 +40,8 @@
     <result column="production_create_time" property="productionCreateTime" jdbcType="TIMESTAMP" />
     <result column="production_update_time" property="productionUpdateTime" jdbcType="TIMESTAMP" />
     <result column="contract_name" property="contractName" jdbcType="INTEGER" />
+    <result column="contact_address" property="contactAddress" jdbcType="VARCHAR" />
+    <result column="inspection_time" property="inspectionTime" jdbcType="VARCHAR" />
     <collection property="listProductionItem" column="production_id" ofType="ApprovalProductionItem" select="listProductionItem"/>
   </resultMap>
 
@@ -88,6 +90,7 @@
     <result column="item_lack_number" property="itemLackNumber" jdbcType="INTEGER" />
     <result column="item_create_time" property="itemCreateTime" jdbcType="TIMESTAMP" />
     <result column="item_update_time" property="itemUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="item_external_model" property="itemExternalModel " jdbcType="VARCHAR" />
   </resultMap>
 
 
@@ -141,13 +144,15 @@
           production_packing_way,
           production_remark,
           production_create_time,
-          contract_name
+          contract_name,
+          contact_address,
+          inspection_time
           )
     VALUES
     (#{approvalId},#{approvalId},#{applicantOrderNo},#{applicantName},#{applicantId}
     ,#{orderName},#{companyName},#{contactName},#{contactTel},#{productionDeliveryDate}
     ,#{productionDeliveryWay},#{productionDeliveryDesc},#{productionState},#{productionPackingWay}
-    ,#{productionRemark},NOW(),#{contractName})
+    ,#{productionRemark},NOW(),#{contractName},#{contactAddress},#{inspectionTime})
   </insert>
 
   <!-- 批量添加订单项数据-->
@@ -166,14 +171,15 @@
     item_should_storage,
     item_actual_storage,
     item_lack_number,
-    item_create_time
+    item_create_time,
+    item_external_model
     )
     VALUES
     <foreach collection="list" item="item" separator=",">
       (
       #{item.productionId},#{item.productId},#{item.itemProductName},#{item.itemColorName},
       #{item.itemProductNum},#{item.itemBrandName},#{item.itemProductModel},#{item.itemProductUnit}
-      ,#{item.itemProductBoxNumber},#{item.itemShouldStorage},#{item.itemActualStorage},#{item.itemLackNumber},NOW()
+      ,#{item.itemProductBoxNumber},#{item.itemShouldStorage},#{item.itemActualStorage},#{item.itemLackNumber},NOW(),#{item.itemExternalModel}
       )
     </foreach>
   </insert>
@@ -368,7 +374,9 @@
     ap.production_remark,
     ap.production_create_time,
     ap.production_update_time,
-    ap.contract_name
+    ap.contract_name,
+    ap.contact_address,
+    ap.inspection_time
     from tb_rst_approval_production ap
     where
         ap.approval_id = #{approvalId}
@@ -413,7 +421,8 @@
     api.item_actual_storage itemActualStorage,
     api.item_lack_number itemLackNumber,
     api.item_create_time itemCreateTime,
-    api.item_update_time itemUpdateTime
+    api.item_update_time itemUpdateTime,
+    api.item_external_model  itemExternalModel
     from tb_rst_approval_production_item api
     where
         api.production_id = #{productionId}
@@ -434,7 +443,8 @@
     aapi.item_product_unit itemProductUnit,
     aapi.item_product_box_number itemProductBoxNumber,
     aapi.item_create_time itemCreateTime,
-    aapi.item_update_time itemUpdateTime
+    aapi.item_update_time itemUpdateTime,
+    aapi.item_external_model  itemExternalModel
     from tb_rst_approval_apply_pick_item aapi
     where
         aapi.apply_pick_id = #{applyPickId}
@@ -583,7 +593,8 @@
     api.item_actual_storage itemActualStorage,
     api.item_lack_number itemLackNumber,
     api.item_create_time itemCreateTime,
-    api.item_update_time itemUpdateTime
+    api.item_update_time itemUpdateTime,
+    api.item_external_model  itemExternalModel
     from tb_rst_approval_production_item api
     where
     api.item_id = #{itemId}
@@ -609,7 +620,9 @@
     ap.production_remark,
     ap.production_create_time,
     ap.production_update_time,
-    ap.contract_name
+    ap.contract_name,
+    ap.contact_address,
+    ap.inspection_time
     from tb_rst_approval_production ap
     where
     ap.approval_id = #{approvalId}
@@ -686,4 +699,25 @@
     where
     approval_id = #{approvalId}
   </select>
+
+  <select id="getApprovalAuthority" parameterType="Integer" resultType="AdminApprovalAuthority">
+    select * from tb_rst_sys_admin_approval_authority WHERE admin_id = #{adminId};
+  </select>
+  <select id="listApprovalAuthority" parameterType="AdminApprovalAuthority" resultType="AdminApprovalAuthority">
+    select * from tb_rst_sys_admin_approval_authority
+    <where>
+      <if test="isSales != null and isSales != ''">
+        is_sales = #{isSales}
+      </if>
+      <if test="isPmc != null and isPmc != ''">
+        is_pmc = #{isPmc}
+      </if>
+      <if test="isManagement != null and isManagement != ''">
+        is_management = #{isManagement}
+      </if>
+      <if test="isWarehouse != null and isWarehouse != ''">
+        is_warehouse = #{isWarehouse}
+      </if>
+    </where>
+  </select>
 </mapper>

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

@@ -801,7 +801,8 @@ WHEN c.customer_secondary_customer = 2 THEN
 	'否'
 ELSE
 	'未知'
-END) AS customerSecondaryCustomer
+END) AS customerSecondaryCustomer,
+sa.admin_name AS adminName
 FROM
 	tb_rst_customer_info c
 LEFT JOIN tb_rst_question_describe qd ON c.customer_id = qd.customer_id
@@ -810,6 +811,7 @@ LEFT JOIN tb_rst_complaint_small_class csc ON csc.small_class_id = cq.small_clas
 LEFT JOIN tb_rst_complaint_type ct ON ct.complaint_id = csc.complaint_id
 LEFT JOIN tb_rst_sales_company sc ON c.company_id = sc.company_id
 LEFT JOIN tb_rst_store_info si ON c.store_id = si.store_id
+LEFT JOIN tb_rst_sys_admin sa ON c.admin_id = sa.admin_id
 
   </select>
   <!-- 退换货统计sql start -->

+ 41 - 7
watero-rst-web/src/main/java/com/iamberry/rst/controllers/approval/ApprovalController.java

@@ -85,9 +85,9 @@ public class ApprovalController {
 
         //封装生产审批产品项
         List<ApprovalProductionItem> listApprovalProductionItem = new ArrayList<ApprovalProductionItem>();
-        JSONArray jsonProductionItems = JSONArray.fromObject(productionItems);
-        for (int i = 0; i < jsonProductionItems.size(); i++) {
-            JSONObject orderItem = jsonProductionItems.getJSONObject(i);
+            JSONArray jsonProductionItems = JSONArray.fromObject(productionItems);
+            for (int i = 0; i < jsonProductionItems.size(); i++) {
+                JSONObject orderItem = jsonProductionItems.getJSONObject(i);
             //添加产品项内容
             ApprovalProductionItem approvalProductionItem = new ApprovalProductionItem();
             approvalProductionItem.setItemBrandName(orderItem.getString("itemBrandName"));
@@ -100,6 +100,7 @@ public class ApprovalController {
             approvalProductionItem.setItemShouldStorage(orderItem.getInt("itemProductNum"));
             approvalProductionItem.setItemActualStorage(0);
             approvalProductionItem.setItemLackNumber(orderItem.getInt("itemProductNum"));
+            approvalProductionItem.setItemExternalModel(orderItem.getString("itemExternalModel"));
             listApprovalProductionItem.add(approvalProductionItem);
         }
         //封装生产审批合同
@@ -349,13 +350,13 @@ public class ApprovalController {
             }
             if(selectType == 3){
                 //判断是否是仓库人员
-                if(admin.getAdminDept() != 8){//8为仓储部门
+                AdminApprovalAuthority adminApprovalAuthority = approvalOrderService.getApprovalAuthority(admin.getAdminId());
+                if(adminApprovalAuthority.getIsWarehouse() == 2){
                     List<ApprovalInfo> list = new ArrayList<>();
                     return new ResponseJson(200, "非仓库人员不得查询", 501).addResponseKeyValue("approvalList",list);
                 }
             }
         }
-
         String stareDate = request.getParameter("stareDate");
         if(stareDate != null ){
             SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
@@ -368,6 +369,7 @@ public class ApprovalController {
         }
         rj.addResponseKeyValue("total", pagedResult.getTotal());
         rj.addResponseKeyValue("approvalList",pagedResult.getDataList());
+        rj.addResponseKeyValue("admin",admin);
         return rj;
     }
 
@@ -423,9 +425,15 @@ public class ApprovalController {
         }
         //判断是否是仓库人员
         int isDelivery = 2;
-        if(admin.getAdminDept() == 8){//8为仓储部门
+        /*if(admin.getAdminDept() == 8){//8为仓储部门
+            isDelivery = 1;
+        }*/
+        //判断是否是仓库人员
+        AdminApprovalAuthority adminApprovalAuthority = approvalOrderService.getApprovalAuthority(admin.getAdminId());
+        if(adminApprovalAuthority.getIsWarehouse() == 1){
             isDelivery = 1;
         }
+
         HistoricalRecord historicalRecord = new HistoricalRecord();
         historicalRecord.setApprovalId(approvalInfo.getApprovalId());
         historicalRecord.setAdminId(admin.getAdminId());
@@ -503,8 +511,11 @@ public class ApprovalController {
             }
             listString.add(str);
         }
+        AdminApprovalAuthority authority = new AdminApprovalAuthority();
+        authority.setIsWarehouse(1);
+        List<AdminApprovalAuthority> listAuthority = approvalOrderService.listApprovalAuthority(authority);
         Admin adminTwo = new Admin();
-        adminTwo.setAdminDept(8);//工厂仓库部
+        adminTwo.setAdminId(listAuthority.get(0).getAdminId());
         List<Admin> listAdmin = sysService.listAdminInfo(adminTwo);
         rj.addResponseKeyValue("list",listString);
         rj.addResponseKeyValue("warehouseAdmin",listAdmin);
@@ -555,4 +566,27 @@ public class ApprovalController {
         return rj;
     }
 
+    /**
+     * 获取优尼雅管理员权限
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/getApprovalAuthority")
+    public ResponseJson getApprovalAuthority(HttpServletRequest request){
+        ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+        //获取openid,根据openid查询当前登录人信息
+        String openId = WechatUtils.getUserBySession(request).getUserOpenid();
+        Admin currentAdmin = sysService.getByOpenid(openId);
+        if(currentAdmin == null){
+            return new ResponseJson(200, "未查询到登录人信息", 500);
+        }
+        if(currentAdmin.getAdminDept() !=9){//9:优尼雅
+            return new ResponseJson(200, "不允许非优尼雅部门员工查询", 500);
+        }
+        AdminApprovalAuthority adminApprovalAuthority = approvalOrderService.getApprovalAuthority(currentAdmin.getAdminId());
+        rj.addResponseKeyValue("adminApprovalAuthority",adminApprovalAuthority);
+        return rj;
+    }
+
 }

+ 2 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -2074,7 +2074,7 @@ public class AdminCustomerController {
                 "问题类别", "小类名称", "客诉问题", "处理过程", "购买日期",
                 "处理结果", "销售公司", "销售渠道", "产品型号", "产品颜色",
                 "产品数量", "寄回快递", "寄回单号", "签收日期",
-                "状态", "寄出快递", "寄出快递", "开箱损", "二次客诉"
+                "状态", "寄出快递", "寄出快递", "开箱损", "二次客诉", "跟进客服"
         };
         List<CustomerStatisticalInfo> customerStatisticalInfoList = new ArrayList<>();
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
@@ -2219,6 +2219,7 @@ public class AdminCustomerController {
             row.createCell(21).setCellValue(customerStatisticalInfo.getRelationSendLogisticsNo() == null ? null : customerStatisticalInfo.getRelationSendLogisticsNo());
             row.createCell(22).setCellValue(customerStatisticalInfo.getCustomerOutDamaged() == null ? null : customerStatisticalInfo.getCustomerOutDamaged());
             row.createCell(23).setCellValue(customerStatisticalInfo.getCustomerSecondaryCustomer() == null ? null : customerStatisticalInfo.getCustomerSecondaryCustomer());
+            row.createCell(24).setCellValue(customerStatisticalInfo.getAdminName() == null ? null : customerStatisticalInfo.getAdminName());
         }
         //下载导出订单Excel
         downloadCustomerExcel(res,wb);

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/utils/ExcelUtil.java

@@ -518,7 +518,7 @@ public class ExcelUtil {
                 }
 
                 // 如果手机号码校验不通过,则应该不录入
-                if (userTel.trim().length() != 11) {
+                if (userTel.trim().length() < 11 || userTel.trim().length() > 15) {
                     //temp.getCell(telColumnIndex).setCellStyle(cellStyle);
                     order.setReturnStatus("error");
                     order.setReturnMsg("手机号码不正确");

+ 1 - 0
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -128,6 +128,7 @@
         <typeAlias type="com.iamberry.rst.core.approval.ApprovalProductionItem" alias="ApprovalProductionItem"/>
         <typeAlias type="com.iamberry.rst.core.approval.HistoricalRecord" alias="HistoricalRecord"/>
         <typeAlias type="com.iamberry.rst.core.approval.ProcessInfo" alias="ProcessInfo"/>
+        <typeAlias type="com.iamberry.rst.core.approval.AdminApprovalAuthority" alias="AdminApprovalAuthority"/>
 		<!--member-->
 		<typeAlias type="com.iamberry.wechat.core.entity.member.Member" alias="Member"/>
 

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

@@ -128,7 +128,7 @@
                     <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="salesAddressName" name="salesAddressName" datatype="*1-16" errormsg="联系人格式不正确!" >
                 </div>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="salesAddressTel" name="salesAddressTel" datatype="*1-11" errormsg="联系人电话格式不正确!">
+                    <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="salesAddressTel" name="salesAddressTel" datatype="*1-20" errormsg="联系人电话格式不正确!">
                 </div>
             </div>
 

+ 32 - 61
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

@@ -495,18 +495,6 @@
          * 批量确认订单
          */
         function confirmOrder(){
-            var isSplit = 1;//是否需要拆单
-            layer.confirm('是否需要进行拆单', {
-                btn: ['需要','不需要'] //按钮
-            }, function(){
-                isSplit = 1;
-            }, function(){
-                isSplit = 2;
-            });
-            /*var index = layer.load(1, {
-                shade: [0.5,'#fff'] //0.1透明度的白色背景
-            });*/
-
             var salesOrderIds = "";
             $(".sales_id:checked").each(function(){
                 var val = $(this).val();
@@ -515,30 +503,38 @@
                 }else{
                     salesOrderIds = val
                 }
-            })
-
-            $.ajax({
-                type:'POST',
-                url: '${path}/admin/salesOrder/confirm_salesOrder',
-                data:{
-                    "salesOrderIds" : salesOrderIds,
-                    "isSplit" : isSplit
-                },
-                dataType: 'json',
-                success:function(res) {
-                    if(res.resultCode == 200 && res.returnCode == 200){
-                        location.reload();
-                    }else{
-                        layer.alert("确认订单异常!", function(index){
-                            layer.close(index);
-                        });
-                        layer.close(index);
-                    }
-                    return false;
-                }
+            });
+            layer.confirm('是否需要进行拆单', {
+                btn: ['需要','不需要'] //按钮
+            }, function(){
+                isConfirm(salesOrderIds,1);
+            }, function(){
+                isConfirm(salesOrderIds,2);
             });
         }
 
+function isConfirm(salesOrderIds,isSplit) {
+    $.ajax({
+        type:'POST',
+        url: '${path}/admin/salesOrder/confirm_salesOrder',
+        data:{
+            "salesOrderIds" : salesOrderIds,
+            "isSplit" : isSplit
+        },
+        dataType: 'json',
+        success:function(res) {
+            if(res.resultCode == 200 && res.returnCode == 200){
+                location.reload();
+            }else{
+                layer.alert("确认订单异常!", function(index){
+                    layer.close(index);
+                });
+                layer.close(index);
+            }
+            return false;
+        }
+    });
+}
 
         function distribution_express(salesId){
             if(salesId == null){
@@ -677,38 +673,13 @@
          * 确认订单
          */
         function confirm_one(salesId){
-            var isSplit = 1;//是否需要拆单
+            var salesOrderIds = salesId;
             layer.confirm('是否需要进行拆单', {
                 btn: ['需要','不需要'] //按钮
             }, function(){
-                isSplit = 1;
+                isConfirm(salesOrderIds,1);
             }, function(){
-                isSplit = 2;
-            });
-            /*var index = layer.load(1, {
-                shade: [0.5,'#fff'] //0.1透明度的白色背景
-            });*/
-
-            var salesOrderIds = salesId;
-            $.ajax({
-                type:'POST',
-                url: '${path}/admin/salesOrder/confirm_salesOrder',
-                data:{
-                    "salesOrderIds" : salesOrderIds,
-                    "isSplit" : isSplit
-                },
-                dataType: 'json',
-                success:function(res) {
-                    if(res.resultCode == 200 && res.returnCode == 200){
-                        location.reload();
-                    }else{
-                        layer.alert("确认订单异常!", function(index){
-                            layer.close(index);
-                        });
-                        layer.close(index);
-                    }
-                    return false;
-                }
+                isConfirm(salesOrderIds,2);
             });
         }