Просмотр исходного кода

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

qihanjiao 6 лет назад
Родитель
Сommit
19a6b9cb65
26 измененных файлов с 729 добавлено и 206 удалено
  1. 27 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java
  2. 1 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/ei/Billing.java
  3. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java
  4. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java
  5. 12 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  6. 1 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/ei/mapper/billingMapper.xml
  7. 33 23
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java
  8. 26 24
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java
  9. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml
  10. 2 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml
  11. 11 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  12. 88 14
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/ei/BillingController.java
  13. 3 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  14. 15 0
      watero-rst-web/src/main/java/com/iamberry/rst/utils/UploadFileUtils.java
  15. 5 5
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl
  16. 4 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  17. 77 24
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl
  18. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl
  19. 40 12
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  20. 9 9
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl
  21. 67 16
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl
  22. 28 11
      watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_add_billing.ftl
  23. 47 52
      watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_billing_list.ftl
  24. 196 0
      watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_billing_upload.ftl
  25. 11 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl
  26. 4 2
      watero-rst-web/src/main/webapp/common/js/common/UnlimitedLevelContact.js

+ 27 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -181,6 +181,9 @@ public class CustomerInfo  implements Serializable {
     private Integer beRefurbished;//待翻新条数
     private Integer beScrapped;//待报废条数
     private Integer beContact;//待联系条数
+    private Integer completeMaintenanceNum;//维修完成数量
+    private Integer beenScrappedNum;//已报废的数量
+    private Integer beenRenovatedNum;//已翻新的数量
 
     public void setComplaintDetectList(List<ComplaintDetectInfo> complaintDetectList) {
         this.complaintDetectList = complaintDetectList;
@@ -955,4 +958,28 @@ public class CustomerInfo  implements Serializable {
     public void setBeContact(Integer beContact) {
         this.beContact = beContact;
     }
+
+    public Integer getCompleteMaintenanceNum() {
+        return completeMaintenanceNum;
+    }
+
+    public void setCompleteMaintenanceNum(Integer completeMaintenanceNum) {
+        this.completeMaintenanceNum = completeMaintenanceNum;
+    }
+
+    public Integer getBeenScrappedNum() {
+        return beenScrappedNum;
+    }
+
+    public void setBeenScrappedNum(Integer beenScrappedNum) {
+        this.beenScrappedNum = beenScrappedNum;
+    }
+
+    public Integer getBeenRenovatedNum() {
+        return beenRenovatedNum;
+    }
+
+    public void setBeenRenovatedNum(Integer beenRenovatedNum) {
+        this.beenRenovatedNum = beenRenovatedNum;
+    }
 }

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/ei/Billing.java

@@ -49,7 +49,7 @@ public class Billing  implements  Serializable{
     private String billBankBranchName;
     //姓名
     private String billPersonalName;
-    //状态 0:未开票; 1:开票中; 2为开票成功 3:开票失败;
+    //状态 0:未开票; 1:开票中; 2为开票成功 3:开票失败; 4:已推送
     private Integer billStatus;
     //开票流水号 开票成功,诺诺平台流水号
     private String billInvoiceSerialNum;

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java

@@ -62,6 +62,8 @@ public class ComplaintDetectInfo implements Serializable {
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date signclosedDate;//签收时间
 
+    private Date maintenanceCutTime;//待维修截止时间
+
     public Integer getDetectId() {
         return detectId;
     }
@@ -349,4 +351,12 @@ public class ComplaintDetectInfo implements Serializable {
     public void setSignclosedId(Integer signclosedId) {
         this.signclosedId = signclosedId;
     }
+
+    public Date getMaintenanceCutTime() {
+        return maintenanceCutTime;
+    }
+
+    public void setMaintenanceCutTime(Date maintenanceCutTime) {
+        this.maintenanceCutTime = maintenanceCutTime;
+    }
 }

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java

@@ -49,6 +49,8 @@ public class ProductColor implements Serializable {
 
     private Integer colorIsMachine; //是否是水机 1:水机 2;其它产品
 
+    private String productNumber;        //产品型号
+
     public String getProductName() {
         return productName;
     }
@@ -185,6 +187,14 @@ public class ProductColor implements Serializable {
         this.colorJdProductId = colorJdProductId;
     }
 
+    public String getProductNumber() {
+        return productNumber;
+    }
+
+    public void setProductNumber(String productNumber) {
+        this.productNumber = productNumber;
+    }
+
     @Override
     public String toString() {
         return "ProductColor{" +

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

@@ -302,7 +302,10 @@
     cs.beMaintenance as beMaintenance,
     cs.beRefurbished as beRefurbished,
     cs.beScrapped as beScrapped,
-    cs.beContact as beContact
+    cs.beContact as beContact,
+    cs.completeMaintenanceNum as completeMaintenanceNum,
+    cs.beenScrappedNum as beenScrappedNum,
+    cs.beenRenovatedNum as beenRenovatedNum
     FROM
     tb_rst_cm_customer_info c
     LEFT JOIN (
@@ -400,7 +403,14 @@
     end) as beScrapped,
     COUNT(case detect_state when 30 then 1
     when 34 then 1 WHEN 38 then 1
-    end) as beContact
+    end) as beContact,
+    COUNT(case detect_state when 32 then 1
+    when 36 then 1
+    end) as completeMaintenanceNum,
+    COUNT(case detect_state when 23 then 1
+    end) as beenScrappedNum,
+    COUNT(case detect_state when 21 then 1
+    end) as beenRenovatedNum
     FROM
     tb_rst_complaint_detect
     GROUP BY

+ 1 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/ei/mapper/billingMapper.xml

@@ -85,7 +85,7 @@
                 AND t.bill_type = #{billType}
             </if >
             <if test="billCompanyName != null and billCompanyName != ''">
-                AND t.bill_company_name  like  CONCAT ('%',#{billCompanyName},'%')
+                AND (t.bill_company_name  like  CONCAT ('%',#{billCompanyName},'%') OR t.bill_personal_name  like  CONCAT ('%',#{billPersonalName},'%'))
             </if >
             <if test="billTaxNumber != null and billTaxNumber != ''">
                 AND t.bill_tax_number  like  CONCAT ('%',#{billTaxNumber},'%')
@@ -96,9 +96,6 @@
             <if test="billAddress != null and billAddress != ''">
                 AND t.bill_address  like  CONCAT ('%',#{billAddress},'%')
             </if >
-            <if test="billPersonalName != null and billPersonalName != ''">
-                AND t.bill_personal_name  like  CONCAT ('%',#{billPersonalName},'%')
-            </if >
             <if test="billStatus != null ">
                 AND t.bill_status = #{billStatus}
             </if >

+ 33 - 23
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -44,31 +44,41 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     @Override
     public int updateDetectById(ComplaintDetectInfo record,String[] imgs) {
         //判断售后流程
-        CmRelation cmRelation = new CmRelation();
-        cmRelation.setCustomerId(record.getCustomerId());
-        cmRelation = customerInfoMapper.getCmRelationInfo(cmRelation);
-        ProcMethod procMethod = procMethodMapper.getProcMethodById(cmRelation.getProcMethodId());
-        switch (cmRelation.getProcTypeId()){
-            case 3://维修
-                if(procMethod.getProcMethodIsCharge() == 0){//待定
-                    if(record.getIsMaintenance() == 1){
-                        record.setDetectState(38);//机器故障,待用户确认
-                    }else if(record.getIsMaintenance() == 2){
-                        record.setDetectState(37);//机器无故障,原机退回
+
+        if(record.getCustomerId() == null){
+            if(record.getDetectRenovation() == 1){
+                record.setDetectState(20);//待翻新入库
+            }else{
+                record.setDetectState(22);//不能翻新,待报废
+            }
+        }else{
+            CmRelation cmRelation = new CmRelation();
+            cmRelation.setCustomerId(record.getCustomerId());
+            cmRelation = customerInfoMapper.getCmRelationInfo(cmRelation);
+            ProcMethod procMethod = procMethodMapper.getProcMethodById(cmRelation.getProcMethodId());
+            switch (cmRelation.getProcTypeId()){
+                case 3://维修
+                    if(procMethod.getProcMethodIsCharge() == 0){//待定
+                        if(record.getIsMaintenance() == 1){
+                            record.setDetectState(38);//机器故障,待用户确认
+                        }else if(record.getIsMaintenance() == 2){
+                            record.setDetectState(37);//机器无故障,原机退回
+                        }
+                    }else if(procMethod.getProcMethodIsCharge() == 1){//付费
+                        record.setDetectState(30);//待用户确认
+                    }else if(procMethod.getProcMethodIsCharge() == 2){//免费
+                        record.setDetectState(34);//待客服确认维修
                     }
-                }else if(procMethod.getProcMethodIsCharge() == 1){//付费
-                    record.setDetectState(30);//待用户确认
-                }else if(procMethod.getProcMethodIsCharge() == 2){//免费
-                    record.setDetectState(34);//待客服确认维修
-                }
-            break;
-            default:
-                if(record.getDetectRenovation() == 1){//是否可翻新 1可翻新 2不可翻新
-                    record.setDetectState(20);//待翻新入库
-                }else if(record.getDetectRenovation() == 2){
-                    record.setDetectState(22);//不能翻新,待报废
-                }
+                    break;
+                default:
+                    if(record.getDetectRenovation() == 1){//是否可翻新 1可翻新 2不可翻新
+                        record.setDetectState(20);//待翻新入库
+                    }else if(record.getDetectRenovation() == 2){
+                        record.setDetectState(22);//不能翻新,待报废
+                    }
+            }
         }
+
         try {
             if(complaintDetectInfoMapper.updateDetectById(record) > 0){
                 if(imgs != null){

+ 26 - 24
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java

@@ -65,18 +65,19 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                             if(productColor == null){
                                 msg = false;
                             }
-                        for (int j = 0;j<salesOrderItem.getItemNum();j++){
                             signclosedProductInfo.setSignclosedId(record.getSignclosedId());
                             signclosedProductInfo.setProductName(productColor.getProductName());
-                            signclosedProductInfo.setProductNum(1);
+                            signclosedProductInfo.setProductNum(salesOrderItem.getItemNum());
                             signclosedProductInfo.setSignclosedProductType(1);
                             signclosedProductInfo.setSignclosedProductId(productColor.getColorProductId());
                             signclosedProductInfo.setSignclosedProductColor(salesOrderItem.getItemColorId());
                             signclosedProductInfo.setSignclosedCreateTime(new Date());
                             signclosedProductInfo.setSignclosedState(2);
                             complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
+                        /*for (int j = 0;j<salesOrderItem.getItemNum();j++){
+
                             //判断是否需要生成维修记录
-                            /*if(product.getProductIsDetection() == 1){
+                            *//*if(product.getProductIsDetection() == 1){
                                 //添加待检测信息
                                 //查询签收信息
                                 ComplaintSignclosedInfo signclosedInfo = complaintSignclosedInfoMapper.getSignclosedById(record.getSignclosedId());
@@ -94,10 +95,10 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                                 }catch (Exception e){
                                     throw new RuntimeException("------------生成检测信息出错------------");
                                 }
-                            }*/
+                            }*//*
 
-                            i++;
-                        }
+                            j++;
+                        }*/
 
                     }
                 }
@@ -371,21 +372,22 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                         if(productColor == null){
                             msg = false;
                         }
-                        for (int j = 0;j<salesOrderItem.getItemNum();j++){
-                            signclosedProductInfo.setSignclosedId(record.getSignclosedId());
-                            signclosedProductInfo.setProductName(productColor.getProductName());
-                            signclosedProductInfo.setProductNum(1);
-                            signclosedProductInfo.setSignclosedProductType(1);
-                            signclosedProductInfo.setSignclosedProductId(productColor.getColorProductId());
-                            signclosedProductInfo.setSignclosedProductColor(salesOrderItem.getItemColorId());
-                            signclosedProductInfo.setSignclosedCreateTime(new Date());
-                            signclosedProductInfo.setSignclosedState(2);
-                            try {
-                                complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
-                            }catch (Exception e){
-                                    throw new RuntimeException("------------生成签收产品出错------------");
-                            }
-                            /*//判断是否需要生成维修记录
+                        signclosedProductInfo.setSignclosedId(record.getSignclosedId());
+                        signclosedProductInfo.setProductName(productColor.getProductName());
+                        signclosedProductInfo.setProductNum(1);
+                        signclosedProductInfo.setSignclosedProductType(1);
+                        signclosedProductInfo.setSignclosedProductId(productColor.getColorProductId());
+                        signclosedProductInfo.setSignclosedProductColor(salesOrderItem.getItemColorId());
+                        signclosedProductInfo.setSignclosedCreateTime(new Date());
+                        signclosedProductInfo.setSignclosedState(2);
+                        try {
+                            complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
+                        }catch (Exception e){
+                            throw new RuntimeException("------------生成签收产品出错------------");
+                        }
+                        /*for (int j = 0;j<salesOrderItem.getItemNum();j++){
+
+                            //判断是否需要生成维修记录
                             if(product.getProductIsDetection() == 1){
                                 //添加待检测信息
                                 //查询签收信息
@@ -405,9 +407,9 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                                 }catch (Exception e){
                                     throw new RuntimeException("------------生成检测信息出错------------");
                                 }
-                            }*/
-                            i++;
-                        }
+                            }
+                            j++;
+                        }*/
                     }
                 }
             }

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml

@@ -175,7 +175,7 @@
     values (
       #{signclosedLogistics,jdbcType=VARCHAR}, #{signclosedLogisticsNumber,jdbcType=VARCHAR},
       #{signclosedSendName,jdbcType=VARCHAR}, #{signclosedSendTel,jdbcType=VARCHAR}, 
-      #{signclosedAddrProvinces,jdbcType=VARCHAR}, #{signclosedAddrCity,jdbcType=VARCHAR},#{signclosedAddrArea,jdbcType=VARCHAR},
+      #{signclosedAddrProvinces,jdbcType=INTEGER}, #{signclosedAddrCity,jdbcType=INTEGER},#{signclosedAddrArea,jdbcType=INTEGER},
       #{signclosedDate,jdbcType=DATE},
       #{signclosedCustomerId,jdbcType=INTEGER},
       #{signclosedDesc,jdbcType=VARCHAR},

+ 2 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml

@@ -32,7 +32,8 @@
             c.color_cretae_time colorCretaeTime,
             c.color_update_time colorUpdateTime,
             p.product_name productName,
-            p.Product_type productType,
+            p.product_type productType,
+            p.product_number productNumber,
             pt.type_name productTypeName
         from
           tb_rst_product_color c

+ 11 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -30,6 +30,7 @@ import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
 import java.text.SimpleDateFormat;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -103,6 +104,12 @@ public class AdminDetectController {
         if (totalNum != 0) {
             result.setTotal(totalNum);
         }
+        Calendar date = Calendar.getInstance();
+        for (ComplaintDetectInfo info : result.getDataList()){
+            date.setTime(info.getDetectCreateTime());
+            date.set(Calendar.DATE, date.get(Calendar.DATE) + 6);
+            info.setMaintenanceCutTime(date.getTime());
+        }
         //获取所有产品类型
         ProductType productType = new ProductType();
         List<ProductType> productTypeList = productService.listProductType(productType);
@@ -136,6 +143,7 @@ public class AdminDetectController {
             msg.setReturnCode(500);
             return msg;
         }*/
+        detectInfo.setDetectState(1);
         detectInfo.setIsMaintenance(0);
         detectInfo.setDetectRenovation(0);
         detectInfo.setDetectProcessingResults(0);
@@ -298,6 +306,7 @@ public class AdminDetectController {
             return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        detectInfo.setDetectDate(new Date());
         mv.addObject("detectId",detectId);
         mv.addObject("detectInfo",detectInfo);
         return mv;
@@ -482,8 +491,10 @@ public class AdminDetectController {
             msg.setResultCode(500);
             msg.setReturnCode(500);
         } else {
+            ComplaintDetectInfo info = complaintDetectInfoService.getDetectById(detectInfo.getDetectId());
             msg.setResultCode(200);
             msg.setReturnCode(200);
+            msg.addResponseKeyValue("detectInfo",info);
         }
         return msg;
     }

+ 88 - 14
watero-rst-web/src/main/java/com/iamberry/rst/controllers/ei/BillingController.java

@@ -15,6 +15,7 @@ import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.util.JdServiceUtil;
 import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
+import com.iamberry.rst.utils.UploadFileUtils;
 import com.iamberry.wechat.tools.NameUtils;
 import com.iamberry.wechat.tools.ResponseJson;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -25,10 +26,15 @@ 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.multipart.commons.CommonsMultipartFile;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.util.Date;
 import java.util.List;
+import java.util.Random;
+import java.util.UUID;
 
 /**
  * 发票管理
@@ -64,17 +70,18 @@ public class BillingController {
                                           @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) {
         ModelAndView mv = new ModelAndView("ei/ei_billing_list");
 
+        Admin admin = AdminUtils.getLoginAdmin();
+        Integer adminDept = admin.getAdminDept();   // 1:技术组 2:销售组(销售部) 3:客服组(客服运营部) 4:运营组 5:财务部  6工厂生产部 7.管理部8工厂仓库部
+
         PagedResult<Billing> pagedResult = billingService.getBillingPage(pageNO, pageSize, billing, totalNum == 0);
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
         }
 
-//        String path = request.getSession().getServletContext().getRealPath("/");
-//        boolean flag = nuoNuoServiceUtil.invoGetByNuoNuo(path);
-
         StitchAttrUtil.getSa()
                 .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
                 .setModelAndView(billing, mv, "/admin/customerBasic/listCustomerBasic", pagedResult);
+        mv.addObject("adminDept",adminDept);
         return mv;
     }
 
@@ -195,32 +202,94 @@ public class BillingController {
         return  new ResponseJson(200, "添加成功", 200);
     }
 
+
+    /**
+     *  to发票上传
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping("/to_upload")
+    @RequiresPermissions("ei:billing:add")
+    public ModelAndView toUpload(HttpServletRequest request,Integer billId) throws Exception {
+        ModelAndView mv = new ModelAndView("ei/ei_billing_upload");
+        mv.addObject("billId",billId);
+        return mv;
+    }
+
+
     /**
-     * 重新开票
+     * 发票上传
      * @param request
      * @return
      * @throws Exception
      */
     @ResponseBody
-    @RequestMapping("/re_invoice")
+    @RequestMapping("/upload_invoice")
     @RequiresPermissions("ei:billing:add")
-    public ResponseJson reInvoice(HttpServletRequest request,Integer billId) throws Exception {
+    public ResponseJson uploadInvoice(HttpServletRequest request,Integer billId, @RequestParam("file") CommonsMultipartFile file)  {
         ResponseJson rj = new ResponseJson();
         Billing billing = billingService.getBillingById(billId);
-        PlatformInfo platformInfo = platformInfoService.getPlatformInfoById(billing.getPlatId());
-        if(platformInfo == null){
-            rj = new ResponseJson(500, "查询所属平台失败", 500);
+        if(billing == null){
+            rj = new ResponseJson(500, "未查询到该发票信息", 500);
             return rj;
         }
-        BillingItem billingItem = new BillingItem();
-        billingItem.setBillId(billId);
-        List<BillingItem> billingItemList =  billingItemService.getBillingItemList(billingItem);
-        billing.setBillingItemList(billingItemList);
+        if(billing.getBillStatus() == 4){
+            rj = new ResponseJson(500, "该发票已推送,无法重新上传。", 500);
+            return rj;
+        }
+
+        String uuid = UUID.randomUUID().toString().substring(0,5);
 
-        rj = new ResponseJson(500, "查询所属平台失败", 500);
+        String realPath = request.getSession().getServletContext().getRealPath("/");
+
+        String suffix = file.getOriginalFilename().substring(file.getOriginalFilename().toString().lastIndexOf("."));
+        String name = billing.getBillOrderNo()+"-"+uuid+suffix;
+        String path = "";
+        try{
+            path = UploadFileUtils.eiUploadFile(realPath,name,file);
+        }catch (Exception e){
+            e.printStackTrace();
+            return  new ResponseJson(500, "上传PDF失败", 500);
+        }
+        rj = new ResponseJson(200, "上传发票成功", 200);
+        rj.addResponseKeyValue("path",path);
+        return rj;
+    }
+
+    /**
+     * 发票上传
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping("/update_file")
+    @RequiresPermissions("ei:billing:add")
+    public ResponseJson updateFile(HttpServletRequest request,Billing bl)  {
+        ResponseJson rj = new ResponseJson();
+        Billing billing = billingService.getBillingById(bl.getBillId());
+        if(bl.getBillInvoiceFileUrl() == null || "".equals(bl.getBillInvoiceFileUrl())){
+            rj = new ResponseJson(500, "上传路径为空", 500);
+            return rj;
+        }
+
+        if(billing.getBillStatus() == 4){
+            rj = new ResponseJson(500, "该发票已推送,无法重新上传。", 500);
+            return rj;
+        }
+
+        bl.setBillStatus(2);
+        Integer flag = billingService.update(bl);
+
+        if(flag < 1){
+            return  new ResponseJson(500, "修改发票信息失败", 500);
+        }
+        rj = new ResponseJson(200, "上传发票成功", 200);
         return rj;
     }
 
+
     /**
      *  查询发票详情
      * @param request
@@ -276,9 +345,14 @@ public class BillingController {
                 break;
         }
         if(jdPushLog.getPushLogStatus() == 1){
+            Billing billing = new Billing();
+            billing.setBillId(pushLog.getBillId());
+            billing.setBillStatus(4);
+            Integer flag = billingService.update(billing);
             return new ResponseJson(200, "上传发票成功", 200);
         }else{
             return new ResponseJson(500, "上传发票失败,"+jdPushLog.getPushLogResultMsg(), 500);
         }
     }
+
 }

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

@@ -674,7 +674,9 @@ public class AdminSalesOrderController {
         String orderItemString
     ) throws Exception {
 
-
+        if(salesOrder.getSalesStoreId() == null){
+            return  new ResponseJson(500, "添加订单失败,失败原因:未选择店铺", 500);
+        }
         if(salesOrder.getSalesAddressTel() != null && !"".equals(salesOrder.getSalesAddressTel())){
             salesOrder.setSalesAddressTel(salesOrder.getSalesAddressTel().trim());
         }

+ 15 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/UploadFileUtils.java

@@ -19,6 +19,7 @@ public class UploadFileUtils {
 
     private UploadFileUtils(){
         map.put("scmOrder","scmOrder");
+        map.put("eiInvo","eiInvo");
     };
 
     /**
@@ -86,6 +87,7 @@ public class UploadFileUtils {
 
     /**
      * 上朵牙刷定制的图片上传
+     * path  : common/upload/yyyyMMdd/
      * @param name
      * @param file
      * @return
@@ -97,4 +99,17 @@ public class UploadFileUtils {
         return path;
     }
 
+    /**
+     * 发票上传
+     * path  : common/pdf/
+     * @param name
+     * @param file
+     * @return
+     */
+    public static String eiUploadFile(String rootPathh, String name, CommonsMultipartFile file){
+        String soonPath = "/pdf/";
+        String path = UploadFileUtils.getUf().upload("eiInvo",rootPathh,soonPath,name,file);
+        return path;
+    }
+
 }

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

@@ -358,7 +358,7 @@ f<!DOCTYPE HTML>
 
             <input type="hidden" id="customerIsSolve" name="customerIsSolve" value="">
 
-            <div class="row cl init_proMethod" id="" code="returnCode" msg="resultMsg" data="returnMsg" >
+            <div class="row cl init_proMethod" id="" code="returnCode" msg="resultMsg" data="returnMsg" urlPrefix="${path}" >
                 <label class="form-label col-1 col-sm-1">处理结果:</label>
                 <div class="formControls col-2 col-sm-2">
                     <span class="select-box">
@@ -474,7 +474,7 @@ f<!DOCTYPE HTML>
                 <input type="hidden" name="relationSendMergeAddress" id="relationSendMergeAddress">
             </div>-->
 
-            <div class="row cl recipientAddress relation_address" style="display: none;" code="returnCode" msg="resultMsg" data="returnMsg">
+            <div class="row cl recipientAddress relation_address" style="display: none;" code="returnCode" msg="resultMsg" data="returnMsg" urlPrefix="${path}">
                 <input type="hidden" id="addressInfo">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2" style="position: relative;">
@@ -614,7 +614,7 @@ f<!DOCTYPE HTML>
                 <div class="formControls col-10 col-sm-10"></div>
             </div>
 
-            <div class="row cl init_address" id="TDScollect" style="display: none;" code="returnCode" msg="resultMsg" data="returnMsg">
+            <div class="row cl init_address" id="TDScollect" style="display: none;" code="returnCode" msg="resultMsg" data="returnMsg" urlPrefix="${path}">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2" style="position: relative;">
                     <span class="select-box">
@@ -862,12 +862,12 @@ f<!DOCTYPE HTML>
                 $("#openTheLock").show();
                 promethodUlc.setUlcById(0,2);
             }
-        })
+        });
 
         /*监听问题类型 选择事件*/
         $("[name='complaintId']").change(function(){
             initComplaintSmallClassInfo($(this).val());
-        })
+        });
 
         /*监听问题关键字搜索*/
         $(document).on('click', '#search_button', function() {

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

@@ -227,7 +227,7 @@
                             <#if customer.customerSecondaryCustomer == '1' >是</#if>
                             <#if customer.customerSecondaryCustomer == '2' >否</#if></td>
 
-                            <td>${customer.companyName!''}<br/>${customer.storeName!''}</td>
+                            <td>${customer.storeName!''}</td>
                             <td>${(customer.salesTime?string("yyyy-MM-dd"))!''}</td>
                             <#--<td>${customer.customerArea!''}</td>
                             <td>进${customer.customerInTDS!'0'}PPM<br/>出${customer.customerOutTDS!'0'}PPM</td>-->
@@ -238,6 +238,9 @@
                                 <#if customer.beRefurbished??><#if customer.beRefurbished gt 0 >待翻新:<span class="c-red">${customer.beRefurbished}</span><br></#if></#if>
                                 <#if customer.beScrapped??><#if customer.beScrapped gt 0 >待报废:<span class="c-red">${customer.beScrapped}</span><br></#if></#if>
                                 <#if customer.beContact??><#if customer.beContact gt 0 >待联系:<span class="c-red">${customer.beContact}</span></#if></#if>
+                                <#if customer.completeMaintenanceNum??><#if customer.completeMaintenanceNum gt 0 >维修完成:<span class="c-success">${customer.completeMaintenanceNum}</span></#if></#if>
+                                <#if customer.beenScrappedNum??><#if customer.beenScrappedNum gt 0 >已报废:<span class="c-success">${customer.beenScrappedNum}</span></#if></#if>
+                                <#if customer.beenRenovatedNum??><#if customer.beenRenovatedNum gt 0 >已翻新:<span class="c-success">${customer.beenRenovatedNum}</span></#if></#if>
                             </td>
                             <td>
                                 <#if customer.sendbackInfoList?? &&  (customer.sendbackInfoList?size > 0) >

+ 77 - 24
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl

@@ -99,7 +99,12 @@
                                         </#list>
                                     </#if>
                                 </td>
-                                <td><a onclick="deleteSendbackInfo(${(sendbackInfo.sendbackId)!});">删除</a>&nbsp;&nbsp;<a onclick="getSendbackInfo(${(sendbackInfo.sendbackId)!});">修改</a>&nbsp;&nbsp;<#if sendbackInfo.sendbackStatus == 2><a onclick="updateSendbackStatus(${(sendbackInfo.sendbackId)!});">签收</a></#if></td>
+                                <td><#if sendbackInfo.sendbackStatus != 3><a onclick="deleteSendbackInfo(${(sendbackInfo.sendbackId)!});">删除</a>&nbsp;&nbsp;<a onclick="getSendbackInfo(${(sendbackInfo.sendbackId)!});">修改</a>&nbsp;&nbsp;
+                                        <#if sendbackInfo.sendbackStatus == 2>
+                                        <a onclick="updateSendbackStatus(${(sendbackInfo.sendbackId)!});">签收</a>
+                                        </#if>
+                                    </#if>
+                                </td>
                             </tr>
                             </#list>
                         <#else>
@@ -129,10 +134,10 @@
                         <input type="radio" id="tel-b2" name="sendbackStatus" value="2">
                         <label for="tel-b2">已寄回</label>
                     </div>
-                    <div class="radio-box">
+                    <#--<div class="radio-box">
                         <input type="radio" id="tel-b3" name="sendbackStatus" value="3">
                         <label for="tel-b3">已签收</label>
-                    </div>
+                    </div>-->
                 </div>
             </div>
             <div class="row cl" id="backLogisticsInfo">
@@ -204,14 +209,14 @@
                         <input type="hidden" id="sendProdcues" value="">
                     </div>
                 </div>
-                <div class="row cl" style="position: relative;/*display: none;*/">
+                <#--<div class="row cl" style="position: relative;/*display: none;*/">
                     <div class="formControls col-2 col-sm-2 text-r">
                         <strong>仓库签收时间</strong>
                     </div>
                     <div class="formControls col-4 col-sm-4">
                         <input type="text" placeholder="请选择仓库签收时间" id="sendbackSignTime"  name="sendbackSignTime" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})"  readonly="readonly" seleType="send">
                     </div>
-                </div>
+                </div>-->
                 <div class="row cl">
                     <div class="formControls col-2 col-sm-2">
                     </div>
@@ -240,10 +245,10 @@
                         <input type="radio" id="tel-c2" name="sendbackStatuss" value="2">
                         <label for="tel-c2">已寄回</label>
                     </div>
-                    <div class="radio-box">
+                    <#--<div class="radio-box">
                         <input type="radio" id="tel-c3" name="sendbackStatuss" value="3">
                         <label class="c-success">已签收</label>
-                    </div>
+                    </div>-->
                 </div>
             </div>
             <div class="row cl" id="backLogisticsInfos">
@@ -313,14 +318,14 @@
                         <input type="hidden" id="sendProdcuess" value="">
                     </div>
                 </div>
-                <div class="row cl" style="position: relative;/*display: none;*/">
+                <#--<div class="row cl" style="position: relative;/*display: none;*/">
                     <div class="formControls col-2 col-sm-2 text-r">
                         <strong>仓库签收时间</strong>
                     </div>
                     <div class="formControls col-4 col-sm-4">
                         <input type="text" placeholder="请选择仓库签收时间" id="sendbackSignTimes"  name="sendbackSignTimes" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})"  readonly="readonly">
                     </div>
-                </div>
+                </div>-->
                 <div class="row cl">
                     <div class="formControls col-2 col-sm-2">
                     </div>
@@ -332,7 +337,7 @@
             </div>
         </div>
         <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
-            <div class="row cl" id="backTransferInfo">
+            <#--<div class="row cl" id="backTransferInfo">
                 <div class="formControls col-2 col-sm-2 text-r">
                     <strong>邮费处理</strong>
                 </div>
@@ -347,8 +352,8 @@
                     </div>
 
                 </div>
-            </div>
-            <div class="row cl" id="postageInformation" style="display: none;">
+            </div>-->
+            <div class="row cl" id="postageInformation">s
                 <#--<div class="formControls col-2 col-sm-2 text-r">
                     <strong>邮费信息</strong>
                 </div>-->
@@ -801,7 +806,7 @@
                                 <tr>
                                 <#--<td class="text-c" width="100">${detect.customerId!}</td>-->
                                     <td class="text-c" width="100">${detect.detectId!''}</td>
-                                    <td class="text-c" width="100">
+                                    <td class="text-c" width="100" id="detectState${(detect.detectId)!}">
                                         <#if detect.detectState == 1>
                                             待检测机器
                                         </#if>
@@ -1235,7 +1240,7 @@
                     $("#sendbackLogisticsNos").val(info.sendbackLogisticsNo);
                     $("#sendbackNames").val(info.sendbackName);
                     $("#sendbackTels").val(info.sendbackTel);
-                    $("#sendbackSignTimes").val(info.sendbackSignTime);
+                    /*$("#sendbackSignTimes").val(info.sendbackSignTime);*/
                     $("#productbodyIds").find(".input-prodcueNumber-ids").each(function () {
                         for(var i=0;i<info.listSendbackItem.length;i++){
                            if(info.listSendbackItem[i].sendbackProductId == $(this).parents("tr").find(".input-produce-ids").eq(0).val()
@@ -1263,7 +1268,7 @@
             var sendbackLogisticsNo = $("#sendbackLogisticsNo").val();
             var sendbackName = $("#sendbackName").val();
             var sendbackTel = $("#sendbackTel").val();
-            var sendbackSignTime = $("#sendbackSignTime").val();
+            /*var sendbackSignTime = $("#sendbackSignTime").val();*/
             var sendProdcues = new Array();  //寄出产品表
 
             $("#productbodyId").find(".input-prodcueNumber-id").each(function () {
@@ -1295,10 +1300,10 @@
                 layer.msg("请输入寄回人电话!",{icon: 5,time:1000});
                 return;
             }
-            if(sendbackSignTime == null || postageAlipayName == ""){
+            /*if(sendbackSignTime == null || postageAlipayName == ""){
                 layer.msg("请输入签收时间!",{icon: 5,time:1000});
                 return;
-            }
+            }*/
             $.ajax({
                 cache: true,
                 type: "POST",
@@ -1308,7 +1313,6 @@
                     "sendbackLogisticsNo" : sendbackLogisticsNo,
                     "sendbackName" : sendbackName,
                     "sendbackTel" : sendbackTel,
-                    "sendbackSignTime" : sendbackSignTime,
                     "sendProdcues" : SendProdcues
                 },
                 url: "${path}/admin/customer/add_SendbackInfo",
@@ -1341,6 +1345,7 @@
                                     '<td>'+sendbackStatus+'</td>' +
                                     '<td>'+html+'</td>' +
                                     '<td>'+htmls+'</td></tr>');
+                            $("#addSendBackDiv").hide();
                             layer.msg("添加成功!",{icon: 1,time:1000});
 
                     } else {
@@ -1361,7 +1366,7 @@
         var sendbackLogisticsNo = $("#sendbackLogisticsNos").val();
         var sendbackName = $("#sendbackNames").val();
         var sendbackTel = $("#sendbackTels").val();
-        var sendbackSignTime = $("#sendbackSignTimes").val();
+        /*var sendbackSignTime = $("#sendbackSignTimes").val();*/
         var sendProdcues = new Array();  //寄出产品表
 
         $("#productbodyIds").find(".input-prodcueNumber-ids").each(function () {
@@ -1394,10 +1399,10 @@
             layer.msg("请输入寄回人电话!",{icon: 5,time:1000});
             return;
         }
-        if(sendbackSignTime == null || postageAlipayName == ""){
+        /*if(sendbackSignTime == null || postageAlipayName == ""){
             layer.msg("请输入签收时间!",{icon: 5,time:1000});
             return;
-        }
+        }*/
         $.ajax({
             cache: true,
             type: "POST",
@@ -1407,7 +1412,6 @@
                 "sendbackLogisticsNo" : sendbackLogisticsNo,
                 "sendbackName" : sendbackName,
                 "sendbackTel" : sendbackTel,
-                "sendbackSignTime" : sendbackSignTime,
                 "sendProdcues" : SendProdcues
             },
             url: "${path}/admin/customer/update_SendbackInfo",
@@ -1439,6 +1443,7 @@
                             '<td>'+sendbackStatus+'</td>' +
                             '<td>'+html+'</td>' +
                             '<td>'+htmls+'</td>');
+                    $("#addSendBackDiv").hide();
                     layer.msg("修改成功!",{icon: 1,time:1000});
 
                 } else {
@@ -2449,14 +2454,14 @@
                     return relation_flag;
                 }
             }
-            if (relationBackStatus == 3) {
+            /*if (relationBackStatus == 3) {
                 var relationBackReceiptDate = $('#relationBackReceiptDate').val();//仓库签收时间
                 if (relationBackReceiptDate == null || relationBackReceiptDate == '') {
                     layer.msg("仓库签收时间不能为空",{icon: 5,time:1000});
                     relation_flag = false;
                     return relation_flag;
                 }
-            }
+            }*/
         }else if(type == 2){
             var relationIsTransfer = $('input[name="relationIsTransfer"]:checked').val();
             /*var relationBackPostage = $('#relationBackPostage').val().trim();//寄回邮费
@@ -2929,6 +2934,54 @@
             success: function(data){
                 if (data.returnCode == 200) {
                     layer.msg("操作成功!",{icon: 1,time:1000});
+                    var detectInfo = data.returnMsg.detectInfo;
+                    var detectStateName;
+                    switch (detectInfo.detectState){
+                        case 1:
+                            detectStateName = "待检测机器";
+                            break
+                        case 30:
+                            detectStateName = "待用户确认";
+                            break
+                        case 31:
+                            detectStateName = "用户同意维修(待维修)";
+                            break
+                        case 32:
+                            detectStateName = "维修完成";
+                            break
+                        case 33:
+                            detectStateName = "用户不维修(原机退回)";
+                            break
+                        case 34:
+                            detectStateName = "待客服确认维修";
+                            break
+                        case 35:
+                            detectStateName = "客服确认维修,(待维修)";
+                            break
+                        case 36:
+                            detectStateName = "维修完成";
+                            break
+                        case 37:
+                            detectStateName = "机器无故障,原机退回";
+                            break
+                        case 38:
+                            detectStateName = "机器故障,待用户确认";
+                            break
+                        case 20:
+                            detectStateName = "待翻新入库";
+                            break
+                        case 21:
+                            detectStateName = "已翻新入库";
+                            break
+                        case 22:
+                            detectStateName = "不能翻新,待报废";
+                            break
+                        case 23:
+                            detectStateName = "已报废回收";
+                            break
+                    }
+                    $("#detectState"+detectInfo.detectId).html(detectStateName);
+                    $("#updateDetect").hide();
                 } else {
                     layer.msg("操作失败!",{icon: 5,time:1000});
                 }

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

@@ -68,7 +68,7 @@
         </div>
 
         <div class="input-box">
-            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>客诉编号:</label>
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">客诉编号:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
                 <input class="my-input" type="text" style="width:510px;"  name="customerId" id="customerId" placeholder="请输入客诉编号,如没有请留空"/>
             </div>

Разница между файлами не показана из-за своего большого размера
+ 40 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


+ 9 - 9
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl

@@ -59,49 +59,49 @@
             </div>
         </div>
        <div class="input-box" >
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>检测现象:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测现象:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="请输入工厂的检测现象">${detectInfo.detectPhenomenon!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPhenomenon!''}" name="detectPhenomenon" id="detectPhenomenon"  placeholder="请输入检测现象"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障分类:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification"  placeholder="请输入故障分类"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障原因:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障原因:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="请输入故障原因">${detectInfo.detectFailureCause!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectFailureCause!''}" name="detectFailureCause" id="detectFailureCause"  placeholder="请输入故障原因"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>判定结果:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">判定结果:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="请输入判定结果">${detectInfo.detectResults!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectResults!''}" name="detectResults" id="detectResults"  placeholder="请输入判定结果"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障指向:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障指向:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="请输入故障指向">${detectInfo.detectPoint!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPoint!''}" name="detectPoint" id="detectPoint"  placeholder="请输入故障指向"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>原因分析:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">原因分析:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectNalysis" id="detectNalysis" class="my-textarea" placeholder="请输入原因分析">${detectInfo.detectNalysis!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectNalysis!''}" name="detectNalysis" id="detectNalysis"  placeholder="请输入原因分析"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>检测内容:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测内容:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectContent" id="detectContent" class="my-textarea" placeholder="请输入检测内容">${detectInfo.detectContent!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectContent!''}" name="detectContent" id="detectContent"  placeholder="请输入检测内容"/>
@@ -199,7 +199,7 @@
     }
 
     function  add() {
-        var detectPhenomenon = $("#detectPhenomenon").val();
+        /*var detectPhenomenon = $("#detectPhenomenon").val();
         if( detectPhenomenon == null || detectPhenomenon == "" ){
             layer.msg('请输入检测现象',{icon: 5,time:1000});
             return;
@@ -265,7 +265,7 @@
         if( detectContent.length > 300 ){
             layer.msg('维修内容长度不得大于150个字符',{icon: 5,time:1000});
             return;
-        }
+        }*/
 
         var detect_Offer = $("#detect_Offer").val();
         if(detect_Offer != null && detect_Offer != ""){

+ 67 - 16
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl

@@ -114,7 +114,9 @@
                             <tr class="text-c" id="table1">
                                 <th style="text-align: center;" width="30" >产品名称</th>
                                 <th style="text-align: center;" width="25" >产品颜色</th>
-                                <th style="text-align: center;" width="10">售价</th>
+                                <#--<th style="text-align: center;" width="10">售价</th>-->
+                                <th style="text-align: center;" width="10">69码</th>
+                                <th style="text-align: center;" width="10">产品型号</th>
                                 <th style="text-align: center;" width="10">数量</th>
                                 <th style="text-align: center;" width="10">操作</th>
                             </tr>
@@ -151,7 +153,7 @@
             </div>-->
 
                 <div class="row cl">
-                    <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄件人信息:</label>
+                    <label class="form-label col-3 col-sm-3">寄件人信息:</label>
                     <div class="formControls col-2 col-sm-2 skin-minimal">
                         <input type="text"  class="input-text" placeholder="寄件方姓名/公司名称" id="signclosedSendName" name="signclosedSendName">
                     </div>
@@ -159,7 +161,7 @@
                         <input type="text" class="input-text" placeholder="寄件方联系电话" id="signclosedSendTel" name="signclosedSendTel">
                     </div>
                 </div>
-            <div class="row cl address_info" style="position: relative;">
+            <#--<div class="row cl address_info" style="position: relative;">
                 <label class="form-label col-3 col-sm-3"></label>
                 <div class="formControls col-2 col-sm-2" style="">
                     <span class="select-box">
@@ -179,10 +181,42 @@
                         </select>
 				    </span>
                 </div>
+
+            </div>-->
+
+            <div class="row cl recipientAddress address_info" code="returnCode" msg="resultMsg" data="returnMsg" urlPrefix="${path}">
+                <input type="hidden" id="addressInfo">
+                <label class="form-label col-3 col-sm-3"></label>
+                <div class="formControls col-2 col-sm-2" style="position: relative;">
+                    <span class="select-box">
+                        <select name="provinceNumber" class="select" id="provinces"
+                                ulcValName="province" ulcValId="provinceId"  ulcURL="/address/list_province" ulcMsg="" ulcList="provinceList"
+                                ulcIsFristSelect="true" ulcFristSelectMsg="请选择省份">
+                        </select>
+                    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                        <select name="cityNumber" class="select" id="citys"
+                                ulcValName="city" ulcValId="cityId"  ulcURL="/address/list_city?provinceId=" ulcMsg="" ulcList="cityList"
+                                ulcIsFristSelect="true" ulcFristSelectMsg="请选择市">
+                        </select>
+                    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2" style="position: relative;">
+                    <span class="select-box">
+                        <select name="areaNumber" class="select" id="area"
+                                ulcValName="district" ulcValId="districtId"  ulcURL="/address/list_district?cityId=" ulcMsg="" ulcList="districtList"
+                                ulcIsFristSelect="true" ulcFristSelectMsg="请选择区/县">
+                        </select>
+                    </span>
+                </div>
+                <input type="hidden" name="relationSendMergeAddress" id="relationSendMergeAddress">
                 <input type="hidden" name="signclosedAddrProvinces" id="signclosedAddrProvinces" >
                 <input type="hidden" name="signclosedAddrCity" id="signclosedAddrCity" >
                 <input type="hidden" name="signclosedAddrArea" id="signclosedAddrArea" >
             </div>
+
             <div class="row cl">
                 <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>签收图片:</label>
                 <div class="formControls col-xs-2 col-sm-2" id="fileDiv" style="width: 17%;width: 100px;height: 100px;">
@@ -270,9 +304,9 @@
 
     /*初始化省市区*/
     /*$(".address_info").initAddress();*/
-    var ulc = initAddress($(".address_info"));
-    var sc = initSalesChannel($(".sales_channel"));
-
+   /* var ulc = initAddress($(".address_info"));
+    var sc = initSalesChannel($(".sales_channel"));*/
+    var ulcRelationAddress = init_address($(".address_info"));
 
 
     //动态回显产品js end
@@ -329,7 +363,7 @@
             layer.msg('物流单号长度不得大于20个字符',{icon: 5,time:1000});
             return;
         }
-        var signclosedSendName = $("#signclosedSendName").val();
+        /*var signclosedSendName = $("#signclosedSendName").val();
         if( signclosedSendName == null || signclosedSendName == "" ){
             layer.msg('寄件人姓名不能为空',{icon: 5,time:1000});
             return;
@@ -346,7 +380,7 @@
         if( signclosedSendTel.length > 11 ){
             layer.msg('寄件人电话长度不得大于11个字符',{icon: 5,time:1000});
             return;
-        }
+        }*/
         /*var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
         if(!myreg.test(signclosedSendTel)){
             layer.msg('寄件人电话格式不正确',{icon: 5,time:1000});
@@ -365,13 +399,9 @@
                 return;
             }
         }
-        //设置省市县
-        var provinces = $("#provinces").find("option:selected").val();
-        var city = $("#city").find("option:selected").val();
-        var area = $("#area").find("option:selected").val();
-        $("#signclosedAddrProvinces").val(provinces);
-        $("#signclosedAddrCity").val(city);
-        $("#signclosedAddrArea").val(area);
+
+
+
 
         //选择产品
         var flag = false;
@@ -389,6 +419,26 @@
             return false;
         }
 
+        //设置省市县
+        var provinces = $("#provinces").find("option:selected").val();
+        var city = $("#citys").find("option:selected").val();
+        var area = $("#area").find("option:selected").val();
+        if(provinces != null && provinces != ""){
+            $("#signclosedAddrProvinces").val(provinces);
+        }else{
+            $("#signclosedAddrProvinces").remove();
+        }
+        if(city != null && city != ""){
+            $("#signclosedAddrCity").val(city);
+        }else{
+            $("#signclosedAddrCity").remove();
+        }
+        if(area != null && area != ""){
+            $("#signclosedAddrArea").val(area);
+        }else{
+            $("#signclosedAddrArea").remove();
+        }
+
         $("#orderItemString").val(JSON.stringify(orderItemArray));
 
         $.ajax({
@@ -472,7 +522,8 @@
                                     '<input type="hidden" class="color_id" id="" value="'+ productColor.colorId +'" >' +
                                     ' <td>'+ cufte(productColor.productName) +'</td>' +
                                     ' <td>'+ cufte(productColor.colorName) +'</td>' +
-                                    ' <td>'+ cufte(productColor.colorPrice)/100 +'</td>' +
+                                    ' <td>'+ cufte(productColor.colorBar) +'</td>' +
+                                    ' <td>'+ cufte(productColor.productNumber) +'</td>' +
                                     ' <td><input type="text" class="input-text input-number item-num"  style="width: 100%;border: none;text-align: center;" name="" id="" placeholder="产品数量" value="1" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>' +
                                     ' <td><a href="javascript:void(0)" class="del_product all_down" onclick="delProduct($(this))" >删除</a></td>' +
                                     ' </tr>';

+ 28 - 11
watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_add_billing.ftl

@@ -220,26 +220,43 @@
 
 
 <script type="text/javascript">
+
     $(function(){
+        $("input[name='billType']").on('ifChecked', function(event){
+            var billType = $("input[name='billType']:checked").val();
+            if(billType == 1){   //企业
+                $("#billCompany").show();
+                $("#billPersonal").hide();
+            }else{
+                $("#billCompany").hide();
+                $("#billPersonal").show();
+            }
+        });
+
+
         $('.skin-minimal input').iCheck({
             checkboxClass: 'icheckbox-blue',
             radioClass: 'iradio-blue',
             increaseArea: '20%'
         });
 
-        $("input[name='billType']").change(function (){
-            var billType = $(this).val()
-           if(billType == 1){   //企业
-                $("#billCompany").show();
-                $("#billPersonal").hide();
-           }else{
-               $("#billCompany").hide();
-               $("#billPersonal").show();
-           }
-        })
-    });
 
+//        $("input[name='billType']").change(function (){
+//            var billType = $(this).val();
+//           if(billType == 1){   //企业
+//                $("#billCompany").show();
+//                $("#billPersonal").hide();
+//           }else{
+//               $("#billCompany").hide();
+//               $("#billPersonal").show();
+//           }
+//        })
 
+//        $(document).on('change', "input[name='billType']", function() {
+//
+//        });
+
+    });
 </script>
 
 

Разница между файлами не показана из-за своего большого размера
+ 47 - 52
watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_billing_list.ftl


+ 196 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_billing_upload.ftl

@@ -0,0 +1,196 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <#include "/base/add_base.ftl">
+
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
+        .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
+        .ac_results li {border:1px solid #fff}
+        .ac_results li a span {float:right}
+        .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
+        .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
+        .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
+        .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
+        .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent  #32a3d8 transparent transparent;font-size:0; line-height:0;}
+        .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
+        .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
+        .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
+        .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
+        .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
+        .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
+        .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent  transparent  transparent #32a3d8;font-size:0; line-height:0;}
+        .time-line-list>li:first-child .arrow{display: none;}
+        .table-bg th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+        .msg-phone{height: 35px;line-height: 35px;}
+        .col-sm-1{width: 150px;}
+
+        .all_down{text-decoration: underline;color: #00c;}
+    </style>
+    <title>发票上传 - 发票管理 - RST</title>
+</head>
+<body>
+
+<article class="page-container" style="padding: 10px;">
+    <div class="pd-20 cl">
+        <form action="${path}/admin/ei_billing/update_file" method="post" class="form form-horizontal" id="form-order-add"  onkeydown="if(event.keyCode==13)return false;">
+
+        <input type="hidden" id="billId" name="billId" value="${billId}">
+            <input type="hidden" id="billInvoiceFileUrl" name="billInvoiceFileUrl" value="">
+
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;"><span class="c-red">*</span>PDF文件:</label>
+                <div class="formControls col-8 col-sm-8" style="margin-top: 3px;float: left;">
+                    <div class="select_invo" style="display: none;float: left;"><a href="javascript:void(0)" class=" all_down"  onclick="toReadPdf()">查看发票</a></div>
+                    <input type="file" class="up_file" name="file" upload_type="file" id="upload_file_pdf" style="display: none">
+                    <div class="upload_file" style="margin-left: 10px;float: left;"><a href="javascript:void(0)" class=" all_down"  onclick="fileOnclick(this)">点击上传发票</a></div>
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;">发票代码 :</label>
+                <div class="formControls col-5 col-sm-5" style="float: left;">
+                    <input type="text" class="input-text trim_input" value="" placeholder="发票代码" id="billInvoiceCode" datatype="/^.{0,50}$/" name="billInvoiceCode" >
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;">发票号码 :</label>
+                <div class="formControls col-5 col-sm-5" style="float: left;">
+                    <input type="text" class="input-text trim_input" value="" placeholder="发票号码" id="billInvoiceNum" datatype="/^.{0,50}$/" name="billInvoiceNum" >
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;">开票日期 :</label>
+                <div class="formControls col-5 col-sm-5" style="float: left;">
+                    <input type="text" placeholder="开票日期" id="billInvoiceDate"  name="billInvoiceDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate: '%y-%M-%d'})"  readonly="readonly">
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="margin-top: 50px;">
+                <div class="formControls col-11 col-sm-11" style="text-align: center;">
+                    <input type="submit" class="btn btn-primary add-order-button"  value="确定上传" >
+                </div>
+            </div>
+
+        </form>
+    </div>
+</article>
+
+<script type="text/javascript">
+    var url_path = "${path}";
+</script>
+<script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+
+
+<script type="text/javascript">
+    var billId = "${billId}";
+    var FILE_URL = "";
+
+    $(function(){
+        $("#upload_file_pdf").change(function() {
+            fileUpload("upload_file_pdf");
+        });
+    });
+
+    function fileOnclick(node){
+        $(node).parent().siblings('.up_file').click();
+    }
+
+    /***
+     * 发票上传
+     */
+    function fileUpload(idValue) {
+        $.ajaxFileUpload({
+            url:"/admin/ei_billing/upload_invoice?billId="+billId,
+            secureuri:false,
+            fileElementId : idValue,//文件选择框的id属性/名称
+            dataType: 'json',   //json
+            success: function (data) {
+                if(data.returnCode == 200){
+                    $("#billInvoiceFileUrl").val(data.returnMsg.path);
+                    FILE_URL = data.returnMsg.path;
+                    $(".select_invo").show();
+                    $(".upload_file").find("a").eq(0).html("重新上传发票");
+                }else{
+                    layer.msg('上传文件失败,请重试!',{icon: 5,time:2000});
+                }
+                $("#upload_file_pdf").change(function() {
+                    fileUpload("upload_file_pdf");
+                });
+            }
+        });
+    }
+
+    $(function(){
+        var loadIndex = 0;
+        $("#form-order-add").Validform({
+            tiptype: function (msg, o, cssctl) {
+                if (o.type == 3) {//失败
+                    layer.msg(msg, {icon: 5, time: 3000});
+                    $(window).scrollTop(o.obj.offset().top - 40);
+                }
+            },
+            datatype: {//自定义验证类型
+            },
+            ignoreHidden: true,
+            tipSweep: true, //若为true,则只在表单提交时验证
+            ajaxPost: true, //异步提交
+            beforeCheck: function (curform) {  //验证通过之前执行的函数
+                var flag = false;
+            },
+            beforeSubmit: function (curform) {  //验证通过之后执行的函数
+                var billInvoiceFileUrl = $("#billInvoiceFileUrl").val();
+                if(!isEmpty(billInvoiceFileUrl)){
+                    layer.msg("请上传发票文件!", {icon: 5, time: 3000});
+                    return false;
+                }
+                loadIndex = layer.load(1, {
+                    shade: [0.5,'#fff'] //0.1透明度的白色背景
+                });
+            },
+            callback: function (data) {//异步回调函数
+                if (data) {
+                    if (data.resultCode == 200) {
+                        layer.msg(data.resultMsg,{icon: 5,time:3000});
+                        parent.layer.close(parent.layer.getFrameIndex(window.name));
+                    }else {
+                        layer.msg("上传发票失败!", {icon: 5, time: 3000});
+                    }
+                    if(loadIndex != 0 ){
+                        layer.close(loadIndex);
+                    }
+                }
+                return false;
+            }
+        });
+    });
+
+    /**
+     * 查看pdf
+     * @param url
+     */
+    function toReadPdf() {
+        window.open("/"+FILE_URL);
+    }
+
+
+
+</script>
+
+
+</body>
+</html>

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

@@ -112,7 +112,7 @@
                     </span>
                     </div>-->
                     <div class="formControls col-2 col-sm-2">
-                        <input id="store_1" name="maktMaktx" class="input-text" list="datalist_1" value="" placeholder="输入店铺关键字或双击" datatype="*1-20" errormsg="请选择销售店铺!" />
+                        <input id="store_1" name="maktMaktx" class="input-text" list="datalist_1" value="" placeholder="输入店铺关键字或双击" datatype="*1-20"  />
                             <datalist class="select init_store" id="datalist_1">
 
                             </datalist>
@@ -276,7 +276,16 @@
 
 
 <script type="text/javascript">
-
+    var date = new Date();
+    var newyear = date.getFullYear();
+    var newmonth = date.getMonth() + 1;
+    var day = date.getDate();
+    var hours = date.getHours(); //获取当前小时数(0-23)
+    var minutes = date.getMinutes(); //获取当前分钟数(0-59)
+    var seconds = date.getSeconds(); //获取当前秒数(0-59)
+    newmonth = (newmonth<10 ? "0"+newmonth:newmonth);
+    var newdate = newyear+ "-"+newmonth + "-" + day +" "+hours+":"+minutes+":"+seconds;
+    $("#salesPayTime").val(newdate);
     var salesCustomerId = "${salesOrder.salesCustomerId!''}";
 
     $('.skin-minimal input').iCheck({

+ 4 - 2
watero-rst-web/src/main/webapp/common/js/common/UnlimitedLevelContact.js

@@ -89,7 +89,7 @@
                 }
             }
             if(falg){
-                $.get(ulc.options.urlPrefix + node.ulcURL + id, function(result){
+                $.get(ulc.ulcCufte(ulc.options.urlPrefix) + node.ulcURL + id, function(result){
                     var res = node.repData(result);
                     if (res.code == res.isFlag) {
                         //数据返回
@@ -425,6 +425,7 @@
             ulcLevel.push(obj);
         });
         options.ulcLevel=ulcLevel;
+        options.urlPrefix=$selectUlc.attr("urlPrefix");
         var ulc = new UnlimitedLevelContact(this, options);
         ulc.init();
         return ulc;
@@ -438,7 +439,8 @@
  */
 function init_ulc(node){
     var ulc = $(node).initUlcByHtml({
-        ulcLevel:null
+        ulcLevel:null,
+        urlPrefix:null
     });
     return ulc;
 };