Browse Source

邮费转账

wangxiaoming 7 years ago
parent
commit
0133c9c33d

+ 13 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java

@@ -1,5 +1,7 @@
 package com.iamberry.rst.core.cm;
 
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Date;
@@ -94,6 +96,9 @@ public class CustomerCommon implements Serializable {
     private String salesOrderId;
     //是否需要添加订单
     private Integer isNeedSelectOrder;
+    //签收时间
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    private Date relationBackReceiptDate;
 
     public String getSalesOrderId() {
         return salesOrderId;
@@ -414,4 +419,12 @@ public class CustomerCommon implements Serializable {
     public void setIsNeedSelectOrder(Integer isNeedSelectOrder) {
         this.isNeedSelectOrder = isNeedSelectOrder;
     }
+
+    public Date getRelationBackReceiptDate() {
+        return relationBackReceiptDate;
+    }
+
+    public void setRelationBackReceiptDate(Date relationBackReceiptDate) {
+        this.relationBackReceiptDate = relationBackReceiptDate;
+    }
 }

+ 5 - 5
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/NoreasonBack.java

@@ -53,7 +53,7 @@ public class NoreasonBack  implements Serializable {
     private Date noreasonBackUpdateTime;
     //签收日期
     @DateTimeFormat(pattern="yyyy-MM-dd")
-    private Date noreasonCackReceiptDate;
+    private Date noreasonBackReceiptDate;
 
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
@@ -252,11 +252,11 @@ public class NoreasonBack  implements Serializable {
         this.noreasonBackAlipayName = noreasonBackAlipayName;
     }
 
-    public Date getNoreasonCackReceiptDate() {
-        return noreasonCackReceiptDate;
+    public Date getNoreasonBackReceiptDate() {
+        return noreasonBackReceiptDate;
     }
 
-    public void setNoreasonCackReceiptDate(Date noreasonCackReceiptDate) {
-        this.noreasonCackReceiptDate = noreasonCackReceiptDate;
+    public void setNoreasonBackReceiptDate(Date noreasonBackReceiptDate) {
+        this.noreasonBackReceiptDate = noreasonBackReceiptDate;
     }
 }

+ 11 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Postage.java

@@ -53,6 +53,9 @@ public class Postage implements Serializable {
     //销售来源名称
     private String storeName;
 
+    //物流单号上传
+    private String postageLogisticsImg;
+
     //销售公司集合
     private  Integer[] companyIds;
 
@@ -279,4 +282,12 @@ public class Postage implements Serializable {
     public void setCustomerConfirm(Integer customerConfirm) {
         this.customerConfirm = customerConfirm;
     }
+
+    public String getPostageLogisticsImg() {
+        return postageLogisticsImg;
+    }
+
+    public void setPostageLogisticsImg(String postageLogisticsImg) {
+        this.postageLogisticsImg = postageLogisticsImg;
+    }
 }

+ 3 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.xml.crypto.Data;
+import java.beans.Transient;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -89,6 +90,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     }
 
     @Override
+    @Transient
     public boolean addOrderAndItem(SalesOrder salesOrder, List<SalesOrderItem> list) throws Exception {
         if (list == null || list.size() == 0) {
             return false;
@@ -363,6 +365,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     }
 
     @Override
+    @Transient
     public boolean syncEfastOrder(JSONObject orderInfo) throws Exception {
         if (orderInfo == null) {
             return false;

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerCommonMapper.xml

@@ -17,6 +17,7 @@
                 renewed_back_name AS  relationBackName,
                 renewed_back_tel AS  relationBackTel,
                 renewed_back_status  AS relationBackStatus,
+                renewed_back_receipt_date  AS relationBackReceiptDate,
                 renewed_back_logistics_company AS relationBackLogisticsCompany,
                 renewed_back_logistics_no AS relationBackLogisticsNo,
                 renewed_back_postage AS relationBackPostage,
@@ -48,6 +49,7 @@
                 repair_back_name AS  relationBackName,
                 repair_back_tel AS  relationBackTel,
                 repair_back_status  AS relationBackStatus,
+                repair_back_receipt_date  AS relationBackReceiptDate,
                 repair_back_logistics_company AS relationBackLogisticsCompany,
                 repair_back_logistics_no AS relationBackLogisticsNo,
                 repair_back_postage AS relationBackPostage,
@@ -79,6 +81,7 @@
                 NULL AS  relationBackName,
                 NULL AS  relationBackTel,
                 NULL  AS relationBackStatus,
+                NULL  AS relationBackReceiptDate,
                 NULL AS relationBackLogisticsCompany,
                 NULL AS relationBackLogisticsNo,
                 NULL AS relationBackPostage,
@@ -110,6 +113,7 @@
                 back_goods_back_name AS  relationBackName,
                 back_goods_back_tel AS  relationBackTel,
                 back_goods_back_status  AS relationBackStatus,
+                back_goods_back_receipt_date  AS relationBackReceiptDate,
                 back_goods_back_logistics_company AS relationBackLogisticsCompany,
                 back_goods_back_logistics_no AS relationBackLogisticsNo,
                 back_goods_back_postage AS relationBackPostage,
@@ -141,6 +145,7 @@
                 noreason_back_back_name AS  relationBackName,
                 noreason_back_back_tel AS  relationBackTel,
                 noreason_back_back_status  AS relationBackStatus,
+                noreason_back_receipt_date  AS relationBackReceiptDate,
                 noreason_back_back_logistics_company AS relationBackLogisticsCompany,
                 noreason_back_back_logistics_no AS relationBackLogisticsNo,
                 noreason_back_back_postage AS relationBackPostage,

+ 5 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/noreasonBackMapper.xml

@@ -21,7 +21,7 @@
     <result column="noreason_back_create_time" property="noreasonBackCreateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_update_time" property="noreasonBackUpdateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_alipay_name" property="noreasonBackAlipayName" jdbcType="VARCHAR" />
-    <result column="noreason_back_receipt_date" property="noreasonCackReceiptDate" jdbcType="TIMESTAMP" />
+    <result column="noreason_back_receipt_date" property="noreasonBackReceiptDate" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
     noreason_back_id, customer_id, order_id, signclosed_id, noreason_back_back_status, 
@@ -106,7 +106,7 @@
     <result column="noreason_back_create_time" property="noreasonBackCreateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_update_time" property="noreasonBackUpdateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_alipay_name" property="noreasonBackAlipayName" jdbcType="VARCHAR" />
-    <result column="noreason_back_receipt_date" property="noreasonCackReceiptDate" jdbcType="TIMESTAMP" />
+    <result column="noreason_back_receipt_date" property="noreasonBackReceiptDate" jdbcType="TIMESTAMP" />
     <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
   </resultMap>
 
@@ -156,7 +156,7 @@
       #{noreasonBackBackLogisticsNo,jdbcType=VARCHAR}, #{noreasonBackBackPostage,jdbcType=INTEGER}, 
       #{noreasonBackBackMachineNo,jdbcType=VARCHAR}, #{noreasonBackDesc,jdbcType=VARCHAR}, 
       #{noreasonBackState,jdbcType=BIT}, #{noreasonBackAlipay,jdbcType=VARCHAR},#{noreasonBackAlipayName,jdbcType=VARCHAR}, #{noreasonBackIsTransfer,jdbcType=BIT},
-       #{noreasonCackReceiptDate,jdbcType=TIMESTAMP}
+       #{noreasonBackReceiptDate,jdbcType=TIMESTAMP}
       )
   </insert>
 
@@ -215,8 +215,8 @@
       <if test="noreasonBackAlipayName != null" >
         noreason_back_alipay_name = #{noreasonBackAlipayName},
       </if>
-      <if test="noreasonCackReceiptDate != null" >
-        noreason_back_receipt_date = #{noreasonCackReceiptDate},
+      <if test="noreasonBackReceiptDate != null" >
+        noreason_back_receipt_date = #{noreasonBackReceiptDate},
       </if>
     </set>
     where noreason_back_id = #{noreasonBackId}

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

@@ -18,12 +18,13 @@
     <result column="postage_amount" property="postageAmount" jdbcType="INTEGER" />
     <result column="postage_alipay" property="postageAlipay" jdbcType="VARCHAR" />
     <result column="postage_alipay_name" property="postageAlipayName" jdbcType="VARCHAR" />
+    <result column="postage_logistics_img" property="postageLogisticsImg" jdbcType="VARCHAR" />
     <result column="postage_create_time" property="postageCreateTime" jdbcType="TIMESTAMP" />
     <result column="postage_update_time" property="postageUpdateTime" jdbcType="TIMESTAMP" />
   </resultMap>
 
   <sql id="Base_Column_List" >
-    p.postage_id, p.admin_id, p.customer_id, p.company_id,  p.postage_customer_status, p.postage_manager_status, p.postage_finance_status,
+    p.postage_id, p.admin_id, p.customer_id, p.company_id,  p.postage_customer_status, p.postage_manager_status, p.postage_finance_status,p.postage_logistics_img,
     p.postage_order_source, p.postage_treatment_method, p.sales_orderId, p.postage_client_name,
     p.postage_client_tel,p.postage_client_address, p.postage_logistics_company, p.postage_logistics_no, p.postage_amount,
     p.postage_alipay, p.postage_alipay_name, p.postage_create_time, p.postage_update_time
@@ -111,7 +112,7 @@
     sales_orderId, postage_client_name, postage_client_tel,
     postage_client_address,
     postage_logistics_company, postage_logistics_no,
-    postage_amount, postage_alipay, postage_alipay_name
+    postage_amount, postage_alipay, postage_alipay_name,postage_logistics_img
     )
     values (#{postageId,jdbcType=INTEGER}, #{adminId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER},#{companyId,jdbcType=INTEGER}, #{postageCustomerStatus,jdbcType=INTEGER},
     #{postageManagerStatus,jdbcType=INTEGER}, #{postageFinanceStatus,jdbcType=INTEGER},
@@ -119,7 +120,7 @@
     #{salesOrderId,jdbcType=VARCHAR}, #{postageClientName,jdbcType=VARCHAR}, #{postageClientTel,jdbcType=VARCHAR},
     #{postageClientAddress,jdbcType=VARCHAR},
     #{postageLogisticsCompany,jdbcType=VARCHAR}, #{postageLogisticsNo,jdbcType=VARCHAR},
-    #{postageAmount,jdbcType=INTEGER}, #{postageAlipay,jdbcType=VARCHAR}, #{postageAlipayName,jdbcType=VARCHAR}
+    #{postageAmount,jdbcType=INTEGER}, #{postageAlipay,jdbcType=VARCHAR}, #{postageAlipayName,jdbcType=VARCHAR}, #{postageLogisticsImg,jdbcType=VARCHAR}
     )
   </insert>
 

+ 53 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -1785,6 +1785,58 @@ public class AdminCustomerController {
             return new ResponseJson(500, "该条客诉已在申请邮费中了", 500);
         }
 
+        ResponseJson rj = new ResponseJson(200, "可以申请邮费", 200);
+        rj.addResponseKeyValue("customerCommon",customerCommon);
+        rj.addResponseKeyValue("customerInfo",customerInfo);
+        return rj;
+    }
+
+    /**
+     * 申请邮费
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:applyPostage:customer")
+    @RequestMapping(value = "/add_postage")
+    public ResponseJson addPostage(HttpServletRequest request, Integer customerId,String postageLogisticsImg) throws Exception {
+        CustomerInfo customerInfo = customerService.getCustomerInfo(customerId);
+        if(customerInfo == null){
+            return new ResponseJson(500, "未获取到客诉", 500);
+        }
+
+        CustomerCommon customerCommon = new CustomerCommon();
+        customerCommon.setCustomerId(customerId);
+        List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
+        customerCommon = customerCommonList.get(0);
+
+        if(customerCommon.getRelationBackStatus() == 1){    //1:未寄回  2:已寄回  3:已收货  4:已签收待确认
+            return new ResponseJson(500, "请修改寄回状态,并填写寄回信息", 500);
+        }
+
+        if(customerCommon.getRelationBackStatus() == 2){    //1:未寄回  2:已寄回  3:已收货  4:已签收待确认
+            return new ResponseJson(500, "产品正在寄回中!", 500);
+        }
+
+        if(customerCommon.getRelationIsTransfer() == 0){    //relationIsTransfer 是否需要转账邮费  0:不需要 10:需要转账
+            return new ResponseJson(500, "请修改邮费转账状态,并填写邮费信息", 500);
+        }
+
+        if(customerCommon.getRelationBackPostage() == null || customerCommon.getRelationBackPostage() == 0  //relationBackPostage
+                || customerCommon.getRelationAlipay() == null || customerCommon.getRelationAlipayName() == null ){
+            return new ResponseJson(500, "请填写邮费信息", 500);
+        }
+
+        if(customerInfo.getCompanyId() == null || customerInfo.getCompanyId() == 0 ){
+            return new ResponseJson(500, "未正确选择销售公司", 500);
+        }
+
+        Postage age = new Postage();
+        age.setCustomerId(customerInfo.getCustomerId());    //客诉id
+        List<Postage> postageList = postageService.listPostage(age);
+        if(postageList != null && postageList.size() > 0){
+            return new ResponseJson(500, "该条客诉已在申请邮费中了", 500);
+        }
+
         Integer flag = 0;
         Postage postage = new Postage();
         postage.setCompanyId(customerInfo.getCompanyId());      //销售公司
@@ -1803,6 +1855,7 @@ public class AdminCustomerController {
         postage.setPostageAmount(customerCommon.getRelationBackPostage());  //寄回邮费
         postage.setPostageAlipay(customerCommon.getRelationAlipay());   //支付宝账户
         postage.setPostageAlipayName(customerCommon.getRelationAlipayName());   //支付宝账号名称
+        postage.setPostageLogisticsImg(postageLogisticsImg);
         flag = postageService.savePostage(postage);
 
         if(flag < 1){

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

@@ -307,7 +307,7 @@ public class AdminSalesOrderController {
         if (!StringUtils.isNotEmpty(salesDealCode)) {
             return new ResponseJson(500, "订单编号不能为空,请重新输入!", 500);
         }
-        //根据时间排序查询订单信息
+        //根据时间排序查询订单 信息
         SalesOrder salesOrder = new SalesOrder();
         salesOrder.setSalesOrderId(salesDealCode);
         int num = salesOrderService.getOrderInfoCount(salesOrder);

+ 8 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java

@@ -453,4 +453,12 @@ public class MQTask implements InitializingBean {
 	}
 
 
+	/**客诉系统  自动追踪发货信息**/
+//	@Scheduled(cron = "0 0/30 * * * ?")//每30分钟执行一次
+//	//	@Scheduled(cron = "0 0 9 * * ?")//每天上午午9点触发
+//	public void postageRemind()throws Exception{
+//
+//	}
+
+
 }

+ 178 - 9
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

@@ -26,6 +26,7 @@
             white-space: nowrap;
             text-overflow: ellipsis;
         }
+        .postage-table{float: left;width: 150px;height: 30px;line-height: 30px;}
     </style>
 </head>
 <body>
@@ -47,7 +48,7 @@
 
             <#--<input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.describeTitle!}" placeholder="请输入问题描述" id="describeTitle" name="describeTitle">-->
 
-            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="customerIsSolve" id="customerIsSolve" style="height: 36px;width: 100px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value="">处理结果</option>
                 <option value="1" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 1 >selected="selected"</#if></#if>>已解决</option>
                 <option value="2" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 2 >selected="selected"</#if></#if>>未解决</option>
@@ -58,13 +59,13 @@
                 <option value="7" <#if customerInfo.customerIsSolve??><#if customerInfo.customerIsSolve == 7 >selected="selected"</#if></#if>>无理由退货</option>
             </select>
 
-            <select class="my-select" name="customerSourceType" id="customerSourceType" style="height: 36px;width: 100px;margin: 0px;padding: 6px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="my-select" name="customerSourceType" id="customerSourceType" style="height: 36px;width: 100px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value="">来源</option>
                 <option value="1" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 1 >selected="selected"</#if></#if>>400电话</option>
                 <option value="2" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 2 >selected="selected"</#if></#if>>微信公众号</option>
                 <option value="3" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 3 >selected="selected"</#if></#if>>其他</option>
             </select>
-            <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+            <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value ="">客诉产品</option>
                 <#if typeList?? &&  (typeList?size > 0) >
                     <#list typeList as type>
@@ -73,14 +74,14 @@
                 </#if>
             </select>
 
-            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+            <select class="my-select" name="customerIsVisit" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value ="">是否需要回访</option>
                 <option value="">是否回访</option>
                 <option value ="1" <#if customerInfo.customerIsVisit??><#if customerInfo.customerIsVisit == "1" >selected="selected"</#if></#if>>不需要回访</option>
                 <option value ="2" <#if customerInfo.customerIsVisit??><#if customerInfo.customerIsVisit == "2" >selected="selected"</#if></#if>>需要回访</option>
             </select>
 
-            <select class="my-select" name="adminId" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+            <select class="my-select" name="adminId" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value ="">全部跟进客服</option>
                 <#if adminList?? &&  (adminList?size > 0) >
                     <#list adminList as admin>
@@ -380,10 +381,109 @@
     </table>
     </div>
 </div>
+
+<!-- 申请邮费状态 -->
+<div class="layui-layer layui-anim layui-layer-iframe" id="layui-postage" times="4" showtime="0" contype="string" style="display:none;z-index: 10; width: 900px; height: 450px; left: 20%;top:20px ">
+    <form action="" method="post" class="form form-horizontal" id="form-admin-SynOrder">
+        <div class="layui-layer-title" style="cursor: move;" move="ok">申请邮费</div>
+        <input type="hidden" id="postageCustomerId" value="">
+        <br>
+
+
+        <div class="row cl" style="margin-top: 0px;">
+            <label class="form-label col-2" style="float: left;">客诉ID:</label>
+            <div class="postage-table" id="postageCustomer"></div>
+            <label class="form-label col-2" style="float: left;">百胜订单号:</label>
+            <div class="postage-table" id="postageOrder"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">寄回快递:</label>
+            <div class="postage-table" id="postageLogisticsCompany"></div>
+            <label class="form-label col-2" style="float: left;">快递单号:</label>
+            <div class="postage-table" id="postageLogisticsNo"></div>
+            <label class="form-label col-2" style="float: left;">寄回状态:</label>
+            <div class="postage-table" id="postageLogisticsStatus"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">寄件人姓名:</label>
+            <div class="postage-table" id="postageName"></div>
+            <label class="form-label col-2" style="float: left;">寄件人电话:</label>
+            <div class="postage-table" id="postagePhone"></div>
+            <label class="form-label col-2" style="float: left;">签收时间:</label>
+            <div class="postage-table" id="postageReceiptDate"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">邮费:</label>
+            <div class="postage-table" id="postageCost"></div>
+            <label class="form-label col-2" style="float: left;">转账账号:</label>
+            <div class="postage-table" id="postageAliPay"></div>
+            <label class="form-label col-2" style="float: left;">转账账号名称:</label>
+            <div class="postage-table" id="postageAliPayName"></div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2" style="float: left;">快递单号上传:</label>
+            <button onClick="upImage();" class="btn radius" style="background: #32a3d8;color: #fff;margin-left: 20px;" type="button">点击上传</button>
+            <input type="hidden" id="postageLogisticsImg" value="">
+            <div id="postImgDiv" style="width: 150px;height: 150px;float: left;display: none"><img  style="width: 150px;height: 150px;" id="postImg"/></div>
+        </div>
+
+        <div class="row cl" style="width: 100px;margin: 0 auto;">
+            <input class="btn btn-primary radius" onclick="add_postage()" type="button" value="&nbsp;&nbsp;申请邮费&nbsp;&nbsp;">
+        </div>
+
+    </form>
+    <span class="layui-layer-setwin">
+            <a class="layui-layer-ico layui-layer-close layui-layer-close1" id="closeId" onclick="exitWindowsDiv(this);" href="javascript:;"></a>
+    </span>
+</div>
+
+
 <tfoot>
 <#include "/base/page_util.ftl">
+
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>
+<script type="text/javascript" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
+<script type="text/plain" id="upload_ue"></script>
 </tfoot>
 <script type="text/javascript">
+    var _editor;
+    $(function() {
+        //重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
+        _editor = UE.getEditor('upload_ue',{
+            initialFrameWidth : 375,
+            initialFrameHeight: 600
+        });
+        _editor.ready(function () {
+//            _editor.setDisabled("attachment");//设置编辑器不可用
+            _editor.hide();//隐藏编辑器,因为不会用到这个编辑器实例,所以要隐藏
+            //侦听图片上传
+            _editor.addListener('beforeInsertImage', function (t, arg) {
+                console.log(arg[0].src);
+                $("#postageLogisticsImg").attr("value", arg[0].src);//将地址赋值给相应的input,只去第一张图片的路径
+                $("#postImg").attr("src", arg[0].src);  //图片预览
+                $("#postImgDiv").show();  //图片预览
+            });
+        });
+    });
+
+    //弹出图片上传的对话框
+    function upImage() {
+        var myImage = _editor.getDialog("insertimage");
+        myImage.open();
+    }
+    // 关闭窗口
+    function exitWindowsDiv(_this) {
+        $(_this).parent().parent().hide();
+    }
+</script>
+
+
+<script type="text/javascript">
     /**
      * 跳转到添加customer页面
      */
@@ -520,16 +620,80 @@
      * 申请邮费
      */
     function ApplyForPostage(customerId) {
-        layer.confirm('确认要申请吗?',function(index){
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":customerId},
+            url: "${path}/admin/customer/apply_postage",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var customerCommon = data.returnMsg.customerCommon;
+                    var customerInfo = data.returnMsg.customerInfo;
+
+                    $("#postageCustomerId").val(customerId);
+
+                    $("#postageCustomer").text(customerId);
+                    $("#postageOrder").text(customerCommon.salesOrderId);
+
+                    var postageLogisticsCompany = "";
+                    postageLogisticsCompany = replace(customerCommon.relationBackLogisticsCompany);
+
+                    $("#postageLogisticsCompany").text(postageLogisticsCompany);
+
+                    $("#postageLogisticsNo").text(customerCommon.relationBackLogisticsNo);
+                    var postageLogisticsStatus = "";
+                    switch (customerCommon.relationBackStatus){ //1:未寄回  2:已寄回  3:已收货  4:已签收待确认
+                        case 1:
+                            postageLogisticsStatus = "未寄回";
+                            break;
+                        case 2:
+                            postageLogisticsStatus = "已寄回";
+                            break;
+                        case 3:
+                            postageLogisticsStatus = "已收货";
+                            break;
+                        case 4:
+                            postageLogisticsStatus = "已签收待确认";
+                            break;
+                    }
+                    $("#postageLogisticsStatus").text(postageLogisticsStatus);
+
+                    $("#postageName").text(customerCommon.relationBackName);
+                    $("#postagePhone").text(customerCommon.relationBackPostage);
+                    $("#postageReceiptDate").text(customerCommon.relationBackReceiptDate);
+
+                    $("#postageCost").text(customerCommon.relationBackPostage);
+                    $("#postageAliPay").text(customerCommon.relationAlipay);
+                    $("#postageAliPayName").text(customerCommon.relationAlipayName);
+
+                    $("#layui-postage").show();
+                } else {
+                    layer.msg(data.resultMsg,{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+    /*
+    *申请邮费
+    * */
+    function add_postage() {
+        var customerId =  $("#postageCustomerId").val();
+        var postageLogisticsImg = $("#postageLogisticsImg").val();
+        layer.confirm('确认要申请邮费吗?',function(index){
             $.ajax({
                 cache: true,
                 type: "POST",
-                data: {"customerId":customerId},
-                url: "${path}/admin/customer/apply_postage",
-                async: false,
+                data: {"customerId":customerId,"postageLogisticsImg":postageLogisticsImg},
+                url: "${path}/admin/customer/add_postage",
+                async: true,
                 success: function(data){
                     if (data.returnCode == 200) {
                         layer.msg(data.resultMsg,{icon: 1,time:1000});
+                        exitWindowsDiv($("#closeId"));
                     } else {
                         layer.msg(data.resultMsg,{icon: 5,time:1000});
                     }
@@ -541,6 +705,11 @@
         });
     }
 
+    // 关闭窗口
+    function exitWindowsDiv(_this) {
+        $(_this).parent().parent().hide();
+    }
+
     /*查看物流*/
     function openLogistics(title, url, w, h) {
         layer_show(title,url,w,h);

+ 4 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_noreason_back.ftl

@@ -117,7 +117,7 @@
                         <strong>签收日期</strong>
                     </div>
                     <div class="formControls col-4 col-sm-4">
-                        <input type="text" placeholder="请选择签收日期" id="noreasonCackReceiptDate"  name="noreasonCackReceiptDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly" seleType="send">
+                        <input type="text" placeholder="请选择签收日期" id="noreasonBackReceiptDate"  name="noreasonBackReceiptDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly" seleType="send">
                     </div>
                 </div>
                 <div class="row cl">
@@ -432,7 +432,7 @@
                     $('#noreasonBackBackPostage').val(noreasonBack.noreasonBackBackPostage/100);
                     $('#noreasonBackAlipay').val(noreasonBack.noreasonBackAlipay);
                     $('#noreasonBackAlipayName').val(noreasonBack.noreasonBackAlipayName);
-                    $('#noreasonCackReceiptDate').val(formatDate(noreasonBack.noreasonCackReceiptDate));
+                    $('#noreasonBackReceiptDate').val(formatDate(noreasonBack.noreasonBackReceiptDate));
                     $('input[name="noreasonBackIsTransfer"]').each(function(){
                         if (this.value == noreasonBack.noreasonBackIsTransfer) {
                             $(this).iCheck('check');
@@ -587,8 +587,8 @@
 //                }
             }
             if (noreasonBackBackStatus == 3) {
-                var noreasonCackReceiptDate = $('#noreasonCackReceiptDate').val();//签收日期
-                if (noreasonCackReceiptDate == null || noreasonCackReceiptDate == '') {
+                var noreasonBackReceiptDate = $('#noreasonBackReceiptDate').val();//签收日期
+                if (noreasonBackReceiptDate == null || noreasonBackReceiptDate == '') {
                     layer.msg("签收日期不能为空",{icon: 5,time:1000});
                     noreasonBack_flag = false;
                     return noreasonBack_flag;

+ 15 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/cm/postage/postage_list.ftl

@@ -8,7 +8,11 @@
     <meta http-equiv="Cache-Control" content="no-siteapp" />
     <link rel="Bookmark" href="/favicon.ico" >
     <link rel="Shortcut Icon" href="/favicon.ico" />
-<#include "/base/list_base.ftl">
+    <#include "/base/list_base.ftl">
+
+    <link rel="stylesheet" type="text/css" href="${path}/common/lib/lightbox2/2.8.1/css/lightbox.css" />
+
+
     <title>邮费转账列表</title>
     <style>
         *{padding: 0;margin: 0;}
@@ -20,12 +24,7 @@
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
         /*input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}*/
-        .txt2{
-            width:60px;
-            overflow: hidden;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-        }
+        .txt2{width:60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
     </style>
 </head>
 <body>
@@ -81,6 +80,7 @@
                 <th width="60">退款金额</th>
                 <th width="60">支付宝账户</th>
                 <th width="80">支付宝姓名</th>
+                <th width="80">快递单号图片</th>
                 <th width="100">操作</th>
             </tr>
             </thead>
@@ -175,6 +175,13 @@
                     <td>${postage.postageAlipay!''}</td>
                     <td>${postage.postageAlipayName!''}</td>
                     <td>
+                        <div>
+                            <a class="example-image-link" href="${path}${postage.postageLogisticsImg!''}" data-lightbox="example-1" data-title="图片标题">
+                                 <img class="example-image" src="${path}${postage.postageLogisticsImg!''}" style="width: 50px;" alt="image-1" />
+                            </a>
+                        </div>
+                    </td>
+                    <td>
                         <#if postage.postageCustomerStatus == 1 && postage.customerConfirm == 1 >
                             <a style="text-decoration:none" href="javascript:;" title="确认申请" onclick="updatePostage(${postage.postageId},2,1);">
                                 <i class="Hui-iconfont">&#xe6a7;</i>
@@ -215,22 +222,13 @@
 </div>
 <tfoot>
 <#include "/base/page_util.ftl">
+<script type="text/javascript" src="${path}/common/lib/lightbox2/2.8.1/js/lightbox.js"></script>
 </tfoot>
 <script type="text/javascript">
     /**
      * 修改状态
      */
     function updatePostage(postageId,status,type) {
-//        var url = "";
-//        if(type == 1){
-//            url = '/admin/postage/updateConfirmPostage';   //客服确认
-//        }else if(type == 2){
-//            url = '/admin/postage/updateCustomerReview';   //客服经理审核
-//        }else if(type == 3){
-//            url = '/admin/postage/updateFinanceReview';   //财务审核
-//        }else if(type == 4){
-//            url = '/admin/postage/updateFinanceMoney';   //财务打款
-//        }
         layer.confirm('确认要修改吗?',function(index){
             $.ajax({
                 cache: true,
@@ -250,7 +248,6 @@
                 }
             })
         }, function() {
-
         });
     }
 </script>

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/report/customer_report.ftl

@@ -354,7 +354,7 @@
      * @param employee
      */
     function to_customer_list(title) {
-        window.location.href= "${path}/admin/customer/select_customer_list?questionId="+title+"&isFirst=1";
+        window.location.href= "${path}/admin/customer/select_customer_list?questionId="+title+"&isFirst=2";
     }
 </script>
 

+ 0 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/salesOrder/sales_order_list.ftl

@@ -236,11 +236,6 @@
         myImage.open();
     }
 
-    /*进入订单详情*/
-    function sales_order_detail(salesId) {
-        window.location.href= "${path}/admin/salesOrder/select_sales_order?salesId="+salesId;
-    }
-
     $('#synOrder').click(function (e) {
         $("#layui-SynOrder").show();
     });

+ 1 - 1
watero-rst-web/src/main/webapp/common/js/common/common.js

@@ -221,7 +221,7 @@ function vailErrorMsg_5(node,msg){
 /**物流名称替换**/
 function replace(code) {
     var name = null;
-    switch (billName){
+    switch (code){
         case "sto":
             name= "申通快递";
             break;