浏览代码

系统增加优尼雅售后系统功能

xian 4 年之前
父节点
当前提交
6961a748ba

+ 0 - 6
watero-rst-web/pom.xml

@@ -25,12 +25,6 @@
             <version>1.0.0</version>
         </dependency>
 
-        <dependency>
-            <groupId>net.sf.json-lib</groupId>
-            <artifactId>json-lib</artifactId>
-            <version>2.4</version>
-        </dependency>
-
         <!-- shiro -->
         <dependency>
             <groupId>org.apache.shiro</groupId>

+ 237 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminAfterSaleController.java

@@ -0,0 +1,237 @@
+package com.iamberry.rst.controllers.cm;
+
+import com.iamberry.rst.core.cm.CompanyInfo;
+import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
+import com.iamberry.rst.core.cm.StoreInfo;
+import com.iamberry.rst.core.fm.ComplaintAfterSalesNum;
+import com.iamberry.rst.core.fm.ComplaintDetectInfo;
+import com.iamberry.rst.core.fm.DetectionBasis;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.ProductColor;
+import com.iamberry.rst.core.order.ProductType;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.pts.Produce;
+import com.iamberry.rst.core.pts.PtsMachine;
+import com.iamberry.rst.core.sys.Admin;
+import com.iamberry.rst.faces.cm.StoreInfoService;
+import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
+import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.faces.pts.MachineService;
+import com.iamberry.rst.faces.pts.ProduceService;
+import com.iamberry.rst.service.cm.mapper.ComplaintQuestionInfoMapper;
+import com.iamberry.rst.util.GenerateKeyUtil;
+import com.iamberry.rst.utils.*;
+import com.iamberry.url.URLUtils;
+import com.iamberry.wechat.tools.ResponseJson;
+import com.iamberry.wechat.tools.StrUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/***
+ * 优尼雅客户系统-售后服务功能
+ */
+@Controller
+@RequestMapping("/admin/afterSales")
+public class AdminAfterSaleController {
+
+    @Autowired
+    private ComplaintDetectInfoService complaintDetectInfoService;
+    @Autowired
+    private ProductService productService;
+    @Autowired
+    private ComplaintQuestionInfoMapper complaintQuestionInfoMapper;
+    @Autowired
+    private StoreInfoService storeInfoService;
+    @Autowired
+    private MachineService machineService;
+    @Autowired
+    private ProduceService produceService;
+    @Autowired
+    private GenerateKeyUtil generateKeyUtil;
+
+    @RequiresPermissions("afterSales:SysAfterSales")
+    @RequestMapping(value = "/adafterSalesUI")
+    public ModelAndView adafterSalesUI() {
+        // 查询当前管理员所属的公司的店铺
+        StoreInfo store = new StoreInfo();
+        store.setCompanyId(AdminUtils.getLoginAdmin().getAdminPcId());
+        List<StoreInfo> storeInfos = storeInfoService.listStore(store);
+        //查询客诉问题
+        ComplaintQuestionInfo complaintQuestionInfo = new ComplaintQuestionInfo();
+        complaintQuestionInfo.setDetectComplaintType(1);
+        List<ComplaintQuestionInfo> listComplaintQuestionInfo = complaintQuestionInfoMapper.listComplaintQuestionInfo(complaintQuestionInfo);
+        // 装配数据
+        ModelAndView mv = new ModelAndView("yulia/add");
+        mv.addObject("listComplaintQuestionInfo",listComplaintQuestionInfo);
+        mv.addObject("storeInfos",storeInfos);
+        return mv;
+    }
+
+    @ResponseBody
+    @RequiresPermissions("afterSales:SysAfterSales")
+    @RequestMapping(value = "/parseMachineNoByImage")
+    public ResponseJson parseMachineNoByImage(@RequestParam("image") String image, HttpServletRequest request) {
+        String realPath = request.getServletContext().getRealPath("/");
+        String decode = BarCodeUtil.decode(realPath + image);
+        return getProductByMachineNo(decode).addResponseKeyValue("machineNo", decode);
+    }
+
+    @ResponseBody
+    @RequiresPermissions("afterSales:SysAfterSales")
+    @RequestMapping(value = "/getProductByMachineNo")
+    public ResponseJson getProductByMachineNo(@RequestParam("machineNo") String no) {
+        PtsMachine machine = machineService.getMachineByBarCode(no);
+        if (machine == null) {
+            return ResponseJson.getFAILURE();
+        }
+        // 查询生产产品
+        Produce produce = new Produce();
+        produce.setProduceId(machine.getMachineProduceId());
+        produce = produceService.getProduce(produce);
+        if (produce == null) {
+            return ResponseJson.getFAILURE();
+        }
+        // 查询销售产品
+        Integer productId = produce.getProductId();
+        if (productId == null) {
+            return ResponseJson.getFAILURE();
+        }
+
+        return ResponseJson.getSUCCESS().addResponseKeyValue("product", productService.getProduce(productId));
+    }
+
+    /**
+     * 添加检测信息
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping("/add_detect")
+    @RequiresPermissions("afterSales:SysAfterSales")
+    public ResponseJson addDetect(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(detectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        // 生成维修编号(临时的)
+        detectInfo.setDetectNumber(generateKeyUtil.detectNumber());
+        // 状态都是0 ,待确认
+        detectInfo.setDetectState(0);
+        detectInfo.setIsMaintenance(0);
+        detectInfo.setDetectRenovation(0);
+        detectInfo.setDetectProcessingResults(0);
+        detectInfo.setSalesmanAdminId(AdminUtils.getLoginAdmin().getAdminSalesId());
+        detectInfo.setMaintenanceCutTime(new Date());
+        detectInfo.setDetectSource(3);
+
+        return complaintDetectInfoService.insert(detectInfo) > 0 ? ResponseJson.getSUCCESS() : ResponseJson.getFAILURE();
+    }
+
+
+    /**
+     * 查询售后信息
+     * @return
+     */
+    @RequiresPermissions("afterSales:list")
+    @RequestMapping("/listAfterSales")
+    public ModelAndView listAfterSales(HttpServletRequest request,
+                                         @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+                                         @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+                                         ComplaintDetectInfo detect) {
+        // 查询当前管理员所属的公司的店铺
+        StoreInfo store = new StoreInfo();
+        store.setCompanyId(AdminUtils.getLoginAdmin().getAdminPcId());
+        List<StoreInfo> storeInfos = storeInfoService.listStore(store);
+        if (detect == null) {
+            detect = new ComplaintDetectInfo();
+        }
+        if (storeInfos != null && !storeInfos.isEmpty()) {
+            Integer[] temp = new Integer[storeInfos.size()];
+            for (int i = 0; i < storeInfos.size(); i++) {
+                temp[i] = storeInfos.get(i).getStoreId();
+            }
+            detect.setStoreIds(temp);
+        }
+        // 设置查询数据
+        ModelAndView mv = new ModelAndView("yulia/list");
+        mv.addObject("page", complaintDetectInfoService.listAfterSales(new PageRequest<>(detect, pageNO, pageSize, true)));
+        mv.addObject("req", detect);
+        mv.addObject("stores", storeInfos);
+        mv.addObject("adminId", AdminUtils.getLoginAdmin().getAdminId());
+        mv.addObject("util", StaticModelUtil.useStaticPacker(StrUtils.class.getName()));
+        mv.addObject("url", request.getRequestURI().replace(request.getContextPath(), "") + "?" + URLUtils.getString(detect, pageSize));
+        return mv;
+    }
+
+    /**
+     * 删除检测信息
+     */
+    @RequiresPermissions("afterSales:list")
+    @ResponseBody
+    @RequestMapping("/del")
+    public ResponseJson delete(@RequestParam("id") Integer detectId) {
+        return complaintDetectInfoService.deleteDetect(detectId) >= 1 ? ResponseJson.getSUCCESS() : ResponseJson.getFAILURE();
+    }
+
+    @RequestMapping("/confirmMachineUI")
+    @RequiresPermissions("afterSales:confirmMachine")
+    public ModelAndView confirmMachineUI() {
+        return new ModelAndView("yulia/confirm");
+    }
+
+    /**
+     * 维修部处理,此处需要 预计完成时间 maintenanceCutTime,并将状态更改为1(待检测)
+     */
+    @ResponseBody
+    @RequestMapping("/confirmMachine")
+    @RequiresPermissions("afterSales:confirmMachine")
+    public ResponseJson confirmMachine(@RequestParam("machineNo") String machineNo) {
+        ComplaintDetectInfo detectByMachine = complaintDetectInfoService.getDetectByMachine(machineNo);
+        if (detectByMachine == null || detectByMachine.getDetectState() != 0) {
+            return ResponseJson.getFAILURE();
+        }
+        // 更改状态,并通知检测
+        ComplaintDetectInfo temp = new ComplaintDetectInfo();
+        temp.setDetectId(detectByMachine.getDetectId());
+        temp.setDetectState(1);
+        // 预计完成时间
+        Calendar date = Calendar.getInstance();
+        date.setTime(new Date());
+        boolean fl = false;
+        for (int i = 1 ; i <= 3; i++){
+            date.set(Calendar.DATE, date.get(Calendar.DATE) + i);
+            //1--7的值,对应:星期日,星期一,星期二,星期三....星期六
+            int week = date.get(Calendar.DAY_OF_WEEK);
+            if(week == 1){
+                fl = true;
+            }
+            date.set(Calendar.DATE, date.get(Calendar.DATE) - i);
+        }
+        if(fl){
+            date.set(Calendar.DATE, date.get(Calendar.DATE) + 4);
+        }else{
+            date.set(Calendar.DATE, date.get(Calendar.DATE) + 3);
+        }
+        temp.setDetectConfirmTime(new Date());
+        temp.setMaintenanceCutTime(date.getTime());
+        // 修改
+        return complaintDetectInfoService.updateDetectById(temp) >= 1 ? ResponseJson.getSUCCESS().addResponseKeyValue("no", detectByMachine.getDetectNumber()) : ResponseJson.getFAILURE();
+    }
+
+}

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

@@ -1518,7 +1518,7 @@ public class AdminCustomerController {
 
         numberMap.put("adminDept", admin.getAdminDept());
 
-        SalesOrder salesOrderNum = salesOrderService.getStatusNum();
+        SalesOrder salesOrderNum = salesOrderService.getStatusNum(new SalesOrder());
         numberMap.put("salesOrderNum", salesOrderNum);
         msg.setResultCode(ResultInfo.SUCCESSCODE);
         msg.setStatus(true);

+ 2 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -104,8 +104,7 @@ public class AdminDetectController {
         mv.addObject("listAdmin",listAdmin);
         mv.addObject("listComplaintQuestionInfo",listComplaintQuestionInfo);
         mv.addObject("detectionBasisList",detectionBasisList);
-        List<CompanyInfo> companyInfoList =  companyInfoService.listCompanyInfo(new CompanyInfo());
-        mv.addObject("companyInfoList",companyInfoList);
+        mv.addObject("companyInfoList",companyInfoService.listCompanyInfo(new CompanyInfo()));
         return mv;
     }
 
@@ -155,9 +154,9 @@ public class AdminDetectController {
      * @return
      * @throws Exception
      */
-    @RequiresPermissions("detect:add:detect")
     @ResponseBody
     @RequestMapping("/add_detect")
+    @RequiresPermissions("detect:add:detect")
     public ResponseJson addDetect(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
         ResponseJson msg = new ResponseJson();
         if(detectInfo == null){

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

@@ -49,24 +49,8 @@ public class ComplaintQuestionInfoController {
      */
     @ResponseBody
     @RequestMapping(value = "/list_complaintType")
-    public ResponseJson listComplaintTypeInfo(HttpServletRequest request) {
-        ComplaintTypeInfo complaintTypeInfo = new ComplaintTypeInfo();
-        String complaintConsultingTypeOther =  request.getParameter("complaintConsultingType");
-
-        //咨询类型
-        if (complaintConsultingTypeOther != null && !"".equals(complaintConsultingTypeOther)) {
-            Integer complaintConsultingType = Integer.valueOf(complaintConsultingTypeOther);
-            complaintTypeInfo.setComplaintConsultingType(complaintConsultingType);
-        }
-        String complaintType =  request.getParameter("complaintType");
-
-        if (complaintType != null && !"".equals(complaintType)) {
-            Integer type = Integer.valueOf(complaintType);
-            complaintTypeInfo.setComplaintType(type);
-        }
-
+    public ResponseJson listComplaintTypeInfo(ComplaintTypeInfo complaintTypeInfo) {
         List<ComplaintTypeInfo> complaintTypeInfoList = complaintTypeInfoService.listComplaintTypeInfo(complaintTypeInfo);
-
         if (complaintTypeInfoList == null || complaintTypeInfoList.size() < 1) {
             return new ResponseJson(500, "查询失败", 500);
         } else {

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

@@ -151,7 +151,7 @@ public class AdminSalesOrderController {
         Admin admin = new Admin();
         admin.setAdminStatus(1);
         mv.addObject("admins", sysService.listSelectAdmin(admin));
-        mv.addObject("orderNum",salesOrderService.getStatusNum());
+        mv.addObject("orderNum",salesOrderService.getStatusNum(salesOrder));
         mv.addObject("listStoreInfo",listStoreInfo);
         mv.addObject("logisticsInfoList",logisticsInfoList);
         mv.addObject("identity",AdminUtils.getLoginAdmin().getAdminDept());
@@ -2272,9 +2272,12 @@ public class AdminSalesOrderController {
     @ResponseBody
     @RequestMapping("/getStatusNum")
     public ResponseJson getStatusNum(HttpServletRequest request) throws Exception {
+        // 获取当前管理员 管理的销售店铺
+        SalesOrder salesOrder = new SalesOrder();
+        salesOrder.setStoreIds(orderDepartService.getDepartStoreIds(AdminUtils.getLoginAdminId()));
         ResponseJson rj =  new ResponseJson(200, "SUCCESS", 200);
         //查询订单各个状态数量
-        SalesOrder orderNum = salesOrderService.getStatusNum();
+        SalesOrder orderNum = salesOrderService.getStatusNum(salesOrder);
         Admin admin = AdminUtils.getLoginAdmin();
         rj.addResponseKeyValue("orderNum",orderNum);
         rj.addResponseKeyValue("admin",admin);

+ 72 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/BarCodeUtil.java

@@ -0,0 +1,72 @@
+package com.iamberry.rst.utils;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import javax.imageio.ImageIO;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.BinaryBitmap;
+import com.google.zxing.LuminanceSource;
+import com.google.zxing.MultiFormatReader;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.Result;
+import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.common.HybridBinarizer;
+
+public class BarCodeUtil {
+    /**
+     * 条形码编码
+     * @param contents
+     * @param width
+     * @param height
+     * @param imgPath
+     */
+    public static void encode(String contents, int width, int height, String imgPath) {
+        //保证最小为70*25的大小
+        int codeWidth = Math.max(70, width);
+        int codeHeight = Math.max(25, height);
+        try {
+            //使用EAN_13编码格式进行编码
+            BitMatrix bitMatrix = new MultiFormatWriter().encode(contents,
+                    BarcodeFormat.EAN_13, codeWidth, codeHeight, null);
+            //生成png格式的图片保存到imgPath路径
+            MatrixToImageWriter.writeToStream(bitMatrix, "png",
+                    new FileOutputStream(imgPath));
+            System.out.println("encode success! the img's path is "+imgPath);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 解析条形码
+     * @param imgPath
+     * @return
+     */
+    public static String decode(String imgPath) {
+        BufferedImage image = null;
+        Result result = null;
+        try {
+            image = ImageIO.read(new File(imgPath));
+            if (image == null) {
+                return null;
+            }
+            LuminanceSource source = new BufferedImageLuminanceSource(image);
+            BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
+
+            result = new MultiFormatReader().decode(bitmap, null);
+            return result.getText();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public static void main(String[] args) {
+        System.out.println(decode("C:\\Users\\Administrator\\Desktop\\cnaidc.png"));
+    }
+}

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

@@ -6,8 +6,8 @@
     <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">
-    <title>添加检测记录 - H-ui.filter v2.4</title>
+    <#include "/base/add_base.ftl">
+    <title>添加检测记录</title>
     <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;}

+ 10 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl

@@ -58,7 +58,7 @@
 </head>
 <body>
 
-<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+<nav style="display: none" class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
     <span class="c-gray en">/</span> 维修管理
     <span class="c-gray en">/</span> 维修详情
     <a class="btn radius r"
@@ -107,10 +107,14 @@
             </tr>-->
             <tr>
                 <th width="10">当前状态:</th>
-                <td width="10" style="font-weight: normal;"><span>
-                <#if detectinfo.detectState == 1>
+                <td width="10" style="font-weight: normal;">
+                    <span>
+                        <#if detectinfo.detectState == 1>
                             <span class="c-red">待检测机器<#if detectinfo.maintenanceCutTime??>(${detectinfo.maintenanceCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
-                </#if>
+                        </#if>
+                        <#if detectinfo.detectState == 0>
+                            待收货确认
+                        </#if>
                         <#if detectinfo.detectState == 30>
                             待用户确认
                         </#if>
@@ -150,7 +154,8 @@
                         <#if detectinfo.detectState == 23>
                             <span class="c-success">已报废回收</span>
                         </#if>
-                </span></td>
+                    </span>
+                </td>
                 <td width="10"></td>
                 <th width="10">签收日期:</th>
                 <td width="10" style="font-weight: normal;"><span><#if detectinfo.signclosedDate??>${(detectinfo.signclosedDate?string("yyyy-MM-dd"))!''}<#else>-</#if></span></td>

+ 108 - 127
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

@@ -127,6 +127,7 @@
             </select>
             <select class="my-select" name="status" id="status" style="width: 120px;">
                 <option value="">维修状态</option>
+                <option value="1" <#if status??><#if status == 0>selected</#if></#if>>待收货确认</option>
                 <option value="1" <#if status??><#if status == 1>selected</#if></#if>>待检测</option>
                 <option value="2" <#if status??><#if status == 2>selected</#if></#if>>已检测,待确认</option>
                 <option value="3" <#if status??><#if status == 3>selected</#if></#if>>待维修</option>
@@ -157,9 +158,8 @@
         <table class="table table-border table-bordered table-bg table-hover table-sort">
             <thead>
             <tr class="text-c">
-                <#--<th width="100">客诉编号</th>-->
                 <th width="100">检测编号</th>
-                    <th width="90">店铺</th>
+                <th width="90">店铺</th>
                 <th width="100">客诉处理</th>
                 <th width="100">产品</th>
                 <th width="100">当前状态</th>
@@ -169,17 +169,7 @@
                 <th width="100">物流单号</th>
                 <th width="100">是否有故障</th>
                 <th width="100">是否可翻新</th>
-                <#--<th width="100">检测现象</th>
-                <th width="100">故障分类</th>
-                <th width="100">故障原因</th>
-                <th width="100">判定结果</th>
-                <th width="100">故障指向</th>
-                <th width="100">原因分析</th>
-                <th width="100">维修内容</th>
-                <th width="100">维修报价</th>-->
                 <th width="100">机器故障问题</th>
-                <#--<th width="150">客诉描述</th>-->
-                <#--<th width="150">是否转入生产部门</th>-->
                 <th width="100">QC检测</th>
                 <th width="100">备注</th>
                 <th width="100">客服备注</th>
@@ -194,15 +184,21 @@
             <#if (page.dataList?size > 0)>
                 <#list page.dataList as detect>
                 <tr>
-                    <#--<td class="text-c" width="100">${detect.customerId!}</td>-->
                     <td class="text-c" width="100">${detect.detectNumber!''}</td>
-                    <td class="text-c" width="100"><#if detect.signclosedStoreName??>${detect.signclosedStoreName!''}</#if></td>
+                    <td class="text-c" width="100">
+                        <#if detect.signclosedStoreName??>${detect.signclosedStoreName!''}
+                        <#else>${(detect.storeName)!}
+                        </#if>
+                    </td>
                     <td class="text-c" width="100">
                         <#if detect.customerId??>${detect.procTypeName!''}-${detect.procMethodName!''}</#if>
                         <#if detect.typeName??>${detect.typeName!''}-${detect.methodName!''}</#if>
                     </td>
                     <td class="text-c" width="100">${detect.productName!'暂无产品'}(${detect.colorName!'暂无颜色'})</td>
                     <td class="text-c" width="100">
+                        <#if detect.detectState == 0>
+                            <span class="c-red" title="此机器需要等待收货,在确认售后机器 处进行确认">待收货确认</span>
+                        </#if>
                         <#if detect.detectState == 1>
                             <span class="c-red">待检测机器<#if detect.maintenanceCutTime??>(${detect.maintenanceCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
                         </#if>
@@ -275,51 +271,34 @@
                             </#if>
                         </#if>
                     </td>
-                    <#--<td class="text-c" width="100"><div  title="${detect.detectPhenomenon!}">${detect.detectPhenomenon!'-'}</div></td>
-                    <td class="text-c" width="100"><div  title="${detect.detectClassification!}">${detect.detectClassification!'-'}</div></td>
-                    <td class="text-c" width="100"><div  title="${detect.detectFailureCause!}">${detect.detectFailureCause!'-'}</div></td>
-                    <td class="text-c" width="100"><div  title="${detect.detectResults!}">${detect.detectResults!'-'}</div></td>
-                    <td class="text-c" width="100"><div  title="${detect.detectPoint!}">${detect.detectPoint!'-'}</div></td>
-                    <td class="text-c" width="100"><div  title="${detect.detectNalysis!}">${detect.detectNalysis!'-'}</div></td>
-                    <td class="text-c" width="100"><div  title="${detect.detectContent!}">${detect.detectContent!'-'}</div></td>
-                    <td class="text-c" width="100"><#if detect.detectOffer??>${detect.detectOffer/100}<#else>-</#if></td>-->
-                    <td class="text-c" width="100"><span class="txt2" >${detect.questionTitle!''}${detect.questionName!''}</span><#--<br><#if detect.questionTitle??><#if detect.questionTitle != ""><a href="#" onclick="getDescribeInfo(${detect.customerId!});" style="color : #50a2ea;">查看详情</a></#if></#if>--></td>
-                        <td class="text-c" width="100">
-                    <#if detect.maintenanceResults??>
-                        <#if detect.maintenanceResults == 1>
-                                通过
-                        <#elseif detect.maintenanceResults == 2>
-                                不通过
+                    <td class="text-c" width="100"><span class="txt2" >${detect.questionTitle!''}${detect.questionName!''}</span></td>
+                    <td class="text-c" width="100">
+                        <#if detect.maintenanceResults??>
+                            <#if detect.maintenanceResults == 1>
+                                    通过
+                            <#elseif detect.maintenanceResults == 2>
+                                    不通过
+                            </#if>
                         </#if>
-                    </#if>
-                        </td>
+                    </td>
                     <td class="text-c" width="100">${detect.detectDesc!'-'}</td>
                     <td class="text-c" width="100">${detect.detectCustomerDesc!'-'}</td>
                     <td class="text-c" width="100">${(detect.detectDate?string("yyyy-MM-dd"))!'-'}</td>
                     <td class="text-c" width="100">${(detect.detectConfirmTime?string("yyyy-MM-dd"))!'-'}${(detect.customerCreateTime?string("yyyy-MM-dd"))!'-'}</td>
                     <td class="text-c" width="100">${(detect.detectBuytime?string("yyyy-MM-dd"))!'-'}</td>
                     <td class="text-c" width="100" id="print${detect.detectId}">
-                    <#if detect.detectIsPrint??>
-                        <#if detect.detectIsPrint == 1>
-                                未打印
-                        <#elseif detect.detectIsPrint == 2>
-                                已打印
+                        <#if detect.detectIsPrint??>
+                            <#if detect.detectIsPrint == 1>
+                                    未打印
+                            <#elseif detect.detectIsPrint == 2>
+                                    已打印
+                            </#if>
                         </#if>
-                    </#if>
                     </td>
                     <!-- 遍历操作 -->
                     <td class="td-manage text-c" width="120">
-                        <#--<a style="text-decoration:none" href="javascript:;" title="维修记录"
-                           onclick="add_remark('维修记录','${path}/admin/detect/to_add_content?detectId=${detect.detectId!''}','570','450');">
-                            <i class="Hui-iconfont">维修记录</i>
-                        </a><br>-->
+
                         <#if detect.detectState == 21 ||detect.detectState == 32 || detect.detectState == 36 || detect.detectState == 39|| detect.detectState == 33>
-                            <#--<#if detect.maintenanceResults == 2>
-                                <a style="text-decoration:none" href="javascript:;" title="QC检测"
-                                   onclick="add_remark('QC检测','${path}/admin/detect/to_add_QC?detectId=${detect.detectId!''}','570','450');">
-                                    <i class="Hui-iconfont">QC检测</i>
-                                </a><br>
-                            </#if>-->
                             <#if !detect.maintenanceResults?? || detect.maintenanceResults == 2 >
                                 <a style="text-decoration:none" href="javascript:;" title="QC检测"
                                    onclick="add_remark('QC检测','${path}/admin/detect/to_add_QC?detectId=${detect.detectId!''}','570','450');">
@@ -327,73 +306,69 @@
                                 </a><br>
                             </#if>
                         </#if>
-                        <a style="text-decoration:none" href="javascript:;" title="详情"
-                           onclick="detail('${path}/admin/detect/to_detail?detectId=${detect.detectId!''}');">
-                            <i class="Hui-iconfont">详情</i>
-                        </a><br>
-                        <#if detect.detectState != 1>
-                            <a style="text-decoration:none" href="javascript:;" title="修改"
-                               onclick="detail('${path}/admin/detect/to_update?detectId=${detect.detectId!''}');">
-                                <i class="Hui-iconfont">修改</i>
+                        <#if detect.detectState != 0>
+                            <a style="text-decoration:none" href="javascript:;" title="详情"
+                               onclick="detail('${path}/admin/detect/to_detail?detectId=${detect.detectId!''}');">
+                                <i class="Hui-iconfont">详情</i>
                             </a><br>
-                        </#if>
-                        <#if detect.detectState == 1>
-                            <a style="text-decoration:none;color: #50a2ea" href="javascript:;" title="完成检测"
-                               onclick="update_info('完成检测','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','770','650');">
-                                <i class="Hui-iconfont">完成检测</i><br>
-                            </a>
-                        </#if>
-                        <#--<#if detect.signclosedId??>
-                            <#if detect.detectState == 1>
-                                <a style="text-decoration:none" href="javascript:;" title="查看仓储进度"
-                                   onclick="add_remark('查看仓储进度','${path}/admin/detect/to_view_progress?signclosedId=${detect.signclosedId!''}','570','450');">
-                                    <i class="Hui-iconfont">&#xe6cd;</i>
-                                </a>
+                            <#if detect.detectState != 1>
+                                <a style="text-decoration:none" href="javascript:;" title="修改"
+                                   onclick="detail('${path}/admin/detect/to_update?detectId=${detect.detectId!''}');">
+                                    <i class="Hui-iconfont">修改</i>
+                                </a><br>
                             </#if>
-                        </#if>-->
-                            <#if detect.detectState == 22>
-                                <a style="text-decoration:none" href="javascript:;" title="报废完成"
-                                   onclick="updateScrap('${detect.detectId!''}','23');">
-                                    <i class="Hui-iconfont">报废完成</i><br>
+                            <#if detect.detectState == 1>
+                                <a style="text-decoration:none;color: #50a2ea" href="javascript:;" title="完成检测"
+                                   onclick="update_info('完成检测','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','770','650');">
+                                    <i class="Hui-iconfont">完成检测</i><br>
                                 </a>
                             </#if>
-                            <#if detect.detectState == 20>
-                                <a style="text-decoration:none" href="javascript:;" title="维修完成"
-                                   onclick="add_remark('维修完成','${path}/admin/detect/to_complete?detectId=${detect.detectId!''}&detectState=21','570','450');">
+                        </#if>
 
-                                    <i class="Hui-iconfont">维修完成</i><br>
-                                </a>
-                            </#if>
-                            <#if detect.detectState == 31>
-                                <a style="text-decoration:none" href="javascript:;" title="维修完成"
-                                   onclick="add_remark('维修完成','${path}/admin/detect/to_complete?detectId=${detect.detectId!''}&detectState=32','570','450');">
+                        <#if detect.detectState == 22>
+                            <a style="text-decoration:none" href="javascript:;" title="报废完成"
+                               onclick="updateScrap('${detect.detectId!''}','23');">
+                                <i class="Hui-iconfont">报废完成</i><br>
+                            </a>
+                        </#if>
+                        <#if detect.detectState == 20>
+                            <a style="text-decoration:none" href="javascript:;" title="维修完成"
+                               onclick="add_remark('维修完成','${path}/admin/detect/to_complete?detectId=${detect.detectId!''}&detectState=21','570','450');">
 
-                                    <i class="Hui-iconfont">维修完成</i><br>
-                                </a>
-                            </#if>
-                            <#if detect.detectState == 35>
-                                <a style="text-decoration:none" href="javascript:;" title="维修完成"
-                                   onclick="add_remark('维修完成','${path}/admin/detect/to_complete?detectId=${detect.detectId!''}&detectState=36','570','450');">
-                                    <i class="Hui-iconfont">维修完成</i><br>
-                                </a>
-                            </#if>
-                            <#if detect.detectIsPrint == 1>
-                                <a style="text-decoration:none;color : #50a2ea;" href="javascript:;" title="打印维修卡"
-                                   onclick="printPageMaintenance(${detect.detectId!''});">
-                                    <i class="Hui-iconfont">打印维修卡</i><br>
-                                </a>
-                            </#if>
-                            <#if detect.detectIsPrint == 2>
-                                <a style="text-decoration:none;color : #50a2ea;" href="javascript:;" title="打印维修卡"
-                                   onclick="printPageMaintenance(${detect.detectId!''});">
-                                    <i class="Hui-iconfont">重新打印</i><br>
-                                </a>
-                            </#if>
+                                <i class="Hui-iconfont">维修完成</i><br>
+                            </a>
+                        </#if>
+                        <#if detect.detectState == 31>
+                            <a style="text-decoration:none" href="javascript:;" title="维修完成"
+                               onclick="add_remark('维修完成','${path}/admin/detect/to_complete?detectId=${detect.detectId!''}&detectState=32','570','450');">
 
+                                <i class="Hui-iconfont">维修完成</i><br>
+                            </a>
+                        </#if>
+                        <#if detect.detectState == 35>
+                            <a style="text-decoration:none" href="javascript:;" title="维修完成"
+                               onclick="add_remark('维修完成','${path}/admin/detect/to_complete?detectId=${detect.detectId!''}&detectState=36','570','450');">
+                                <i class="Hui-iconfont">维修完成</i><br>
+                            </a>
+                        </#if>
+                        <#if detect.detectIsPrint == 1 && detect.detectState != 0>
+                            <a style="text-decoration:none;color : #50a2ea;" href="javascript:;" title="打印维修卡"
+                               onclick="printPageMaintenance(${detect.detectId!''});">
+                                <i class="Hui-iconfont">打印维修卡</i><br>
+                            </a>
+                        </#if>
+                        <#if detect.detectIsPrint == 2 && detect.detectState != 0>
+                            <a style="text-decoration:none;color : #50a2ea;" href="javascript:;" title="打印维修卡"
+                               onclick="printPageMaintenance(${detect.detectId!''});">
+                                <i class="Hui-iconfont">重新打印</i><br>
+                            </a>
+                        </#if>
+                        <#if detect.detectState != 0>
                             <a style="text-decoration:none" href="javascript:;" title="删除"
                                onclick="detele(${detect.detectId!''});">
                                 <i class="Hui-iconfont">删除</i>
                             </a><br>
+                        </#if>
                     </td>
                 </tr>
                 </#list>
@@ -557,73 +532,79 @@
                     $("#date").html("");
                     $("#detectPhenomenonId").html("");
                     $("#detectNumberTd").html(detectInfo.detectNumber);
-                    if(null != signclosedInfo && "" !=signclosedInfo){
-                        if(signclosedInfo.signclosedSendName != null && signclosedInfo.signclosedSendName != ""){
+                    if(null != signclosedInfo && "" !== signclosedInfo){
+                        if(signclosedInfo.signclosedSendName != null && signclosedInfo.signclosedSendName !== ""){
                             $("#signclosedSendNameTd").html(signclosedInfo.signclosedSendName);
-                        }if(signclosedInfo.signclosedSendTel != null && signclosedInfo.signclosedSendTel != ""){
+                        }
+                        if(signclosedInfo.signclosedSendTel != null && signclosedInfo.signclosedSendTel !== ""){
                             $("#signclosedSendTelTd").html(signclosedInfo.signclosedSendTel);
                         }
-                        if(signclosedInfo.signclosedLogisticsName != null && signclosedInfo.signclosedLogisticsName != ""){
+                        if(signclosedInfo.signclosedLogisticsName != null && signclosedInfo.signclosedLogisticsName !== ""){
                             $("#signclosedLogisticsNameTd").html(signclosedInfo.signclosedLogisticsName);
                         }
-                        if(signclosedInfo.signclosedLogisticsNumber != null && signclosedInfo.signclosedLogisticsNumber != ""){
+                        if(signclosedInfo.signclosedLogisticsNumber != null && signclosedInfo.signclosedLogisticsNumber !== ""){
                             $("#signclosedLogisticsNumberTd").html(signclosedInfo.signclosedLogisticsNumber);
                         }
-                        if(signclosedInfo.signclosedDate != null && signclosedInfo.signclosedDate != ""){
+                        if(signclosedInfo.signclosedDate != null && signclosedInfo.signclosedDate !== ""){
                             $("#signclosedDateTd").html(signclosedInfo.signclosedDate);
                         }
-                        if(signclosedInfo.describeHandleDesc != null && signclosedInfo.describeHandleDesc != ""){
+                        if(signclosedInfo.describeHandleDesc != null && signclosedInfo.describeHandleDesc !== ""){
                             $("#describeHandleDescTd").html(repalceHtml(signclosedInfo.describeHandleDesc));
                         }
-                        if(signclosedInfo.signclosedAddrProvincesName != null && signclosedInfo.signclosedAddrProvincesName != "" &&
-                                signclosedInfo.signclosedAddrCityName != null && signclosedInfo.signclosedAddrCityName != "" &&
-                                signclosedInfo.signclosedAddrAreaName != null && signclosedInfo.signclosedAddrAreaName != ""){
+                        if(signclosedInfo.signclosedAddrProvincesName != null && signclosedInfo.signclosedAddrProvincesName !== "" &&
+                                signclosedInfo.signclosedAddrCityName != null && signclosedInfo.signclosedAddrCityName !== "" &&
+                                signclosedInfo.signclosedAddrAreaName != null && signclosedInfo.signclosedAddrAreaName !== ""){
                             $("#signclosedAddrTd").html(signclosedInfo.signclosedAddrProvincesName + "-"+signclosedInfo                                       .signclosedAddrCityName+"-"+signclosedInfo.signclosedAddrAreaName);
                         }
+                    } else {
+                        // 如果没有签收信息时,展示此内容
+                        $("#signclosedSendNameTd").html(detectInfo.detectName);
+                        $("#signclosedSendTelTd").html(detectInfo.detectTel);
+
                     }
-                    if(detectInfo.questionDescription != null && detectInfo.questionDescription != ""){
+                    if(detectInfo.questionDescription != null && detectInfo.questionDescription !== ""){
                         $("#describeHandleDescTd").html(detectInfo.questionDescription);
                     }
-                    if(detectInfo.detectConfirmTime != null && detectInfo.detectConfirmTime != ""){
+                    if(detectInfo.detectConfirmTime != null && detectInfo.detectConfirmTime !== ""){
                         $("#customerCreateTimeTd").html(detectInfo.detectConfirmTime);
-                    }else if(detectInfo.customerCreateTime != null && detectInfo.customerCreateTime != ""){
+                    }else if(detectInfo.customerCreateTime != null && detectInfo.customerCreateTime !== ""){
                         $("#customerCreateTimeTd").html(detectInfo.customerCreateTime);
                     }
 
-                    if(detectInfo.procTypeName != null && detectInfo.procTypeName != ""){
+                    if(detectInfo.procTypeName != null && detectInfo.procTypeName !== ""){
                         $("#procTypeNameTd").html(detectInfo.procTypeName+"("+detectInfo.procMethodName+")");
                     }
 
-                    if(detectInfo.typeName != null && detectInfo.typeName != ""){
+                    if(detectInfo.typeName != null && detectInfo.typeName !== ""){
                         $("#procTypeNameTd").html(detectInfo.typeName+"("+detectInfo.methodName+")");
                     }
 
-                    if(detectInfo.productName != null && detectInfo.productName != ""){
+                    if(detectInfo.productName != null && detectInfo.productName !== ""){
                         $("#productNameTd").html(detectInfo.productName);
                     }
-                    if(detectInfo.colorName != null && detectInfo.colorName != ""){
+                    if(detectInfo.colorName != null && detectInfo.colorName !== ""){
                         $("#colorNameTd").html(detectInfo.colorName);
                     }
-                    if(detectInfo.detectBuytime != null && detectInfo.detectBuytime != ""){
+                    if(detectInfo.detectBuytime != null && detectInfo.detectBuytime !== ""){
                         $("#salesPayTimeTd").html(detectInfo.detectBuytime);
-                    }else if(detectInfo.salesPayTime != null && detectInfo.salesPayTime != ""){
+                    }else if(detectInfo.salesPayTime != null && detectInfo.salesPayTime !== ""){
                         $("#salesPayTimeTd").html(detectInfo.salesPayTime);
                     }
 
-                    if(detectInfo.questionTitle != null && detectInfo.questionTitle != ""){
+                    if(detectInfo.questionTitle != null && detectInfo.questionTitle !== ""){
                         $("#questionTitleTd").html(detectInfo.questionTitle);
                     }
 
-                    if(detectInfo.questionName != null && detectInfo.questionName != ""){
+                    if(detectInfo.questionName != null && detectInfo.questionName !== ""){
                         $("#questionTitleTd").html(detectInfo.questionName);
                     }
-                    if(data.returnMsg.date != null && data.returnMsg.date != ""){
+                    if(data.returnMsg.date != null && data.returnMsg.date !== ""){
                         $("#date").html(data.returnMsg.date);
                     }
-                    if(data.returnMsg.adminName != null && data.returnMsg.adminName != ""){
+                    if(data.returnMsg.adminName != null && data.returnMsg.adminName !== ""){
                         $("#adminName").html(data.returnMsg.adminName);
                     }
-                    if(detectInfo.detectPhenomenon != null && detectInfo.detectPhenomenon != ""){
+                    if(detectInfo.detectPhenomenon != null && detectInfo.detectPhenomenon !== ""){
                         $("#detectPhenomenonId").html(detectInfo.detectPhenomenon);
                     }
                     /*$("#pageid").printArea();*/

+ 94 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/yulia/confirm.ftl

@@ -0,0 +1,94 @@
+<!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">
+    <!-- 新增需求引入js、css -->
+    <link href="${path}/common/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
+    <title>售后确认</title>
+    <style>
+        .input-text{
+            height: 31px;
+        }
+        .form-label {
+            padding-left: 0;
+            margin-left: 0px;
+            width: 17%;
+        }
+        .formControls{
+            padding-top: 3px;
+        }
+    </style>
+</head>
+<body>
+<div class="pd-20">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="row cl">
+            <label class="form-label col-xs-4 col-sm-3" style="padding-left: 0;margin-left: 0px;width: 17%;"><h4 style="font-weight: bold;">确认售后机器</h4></label>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>机器条码:</label>
+            <div class="formControls col-9 col-sm-9">
+                <input style="height: 31px;width: 70%" type="text" class="input-text" placeholder="请输入机器条码 或 点击上传条码(系统自动识别)" id="machineNo" name="machineNo">
+            </div>
+        </div>
+        <div class="row cl" id="message-div" style="display: none">
+            <div class="formControls col-9 col-sm-9" style="margin-left: 17%;">
+                <h4>
+                    <i class="Hui-iconfont" id="message-icon">&#xe6e1;</i>
+                    <span id="message-text" style="height: 50px;display: block;"></span>
+                </h4>
+            </div>
+        </div>
+
+    </form>
+</div>
+<script type="text/javascript">
+    $(function () {
+        $("#form-admin-add").submit(function () {
+            let machineNo = $("#machineNo").val();
+            if (machineNo == null || machineNo === '') {
+                setMessage(2, "条码不能为空,请填写或扫描录入");
+                return false;
+            }
+            $.ajax({
+                type: "POST",
+                data: {
+                    "machineNo" : machineNo
+                },
+                url: "${path}/admin/afterSales/confirmMachine",
+                async: true,
+                success: function(data){
+                    if (data.returnCode === 200) {
+                        setMessage(1, "确认成功,请在维修列表打印:" + data.returnMsg.no + "  此维修编号的维修卡,并开始检测");
+                    }else{
+                        setMessage(2, "确认失败,请确认此机器已经被客户录入,未录入时 需要先让客户录入(可通知业务员要求客户录入)");
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){}
+            });
+            return false;
+        });
+    });
+
+    function setMessage(state, msg) {
+        if (state === 1) {
+            // 成功
+            $("#message-icon").html("&#xe676;").attr("style","color:green;float: left;font-size: 50px;");
+        } else {
+            // 失败
+            $("#message-icon").html("&#xe706;").attr("style","color:red;float: left;font-size: 50px;");
+        }
+        $("#message-text").text(msg);
+        // 展示div
+        $("#message-div").show();
+    }
+</script>
+</body>
+</html>

+ 157 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/yulia/list.ftl

@@ -0,0 +1,157 @@
+<!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" />
+    <link rel="Bookmark" href="/favicon.ico" >
+    <link rel="Shortcut Icon" href="/favicon.ico" />
+    <#include "/base/list_base.ftl">
+    <link href="${path}/common/lib/lightbox2/2.8.1/css/lightbox.css" rel="stylesheet" type="text/css" >
+    <title>售后机器管理</title>
+</head>
+<body>
+<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 售后管理 <span class="c-gray en">&gt;</span> 售后机器管理 <a class="btn btn-success radius" id="btn-refresh" style="float: right;line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
+<div class="page-container">
+    <div class="text-c">
+        <form action="${path}/admin/afterSales/listAfterSales" method="POST" id="search-form">
+            <select class="select" name="detectState" id="detectState" style="height: 31px;width:8%">
+                <option value="">检测进度状态</option>
+                <option <#if (req.detectState)??><#if req.detectState ==  0>selected="selected"</#if></#if> value= "0">${(util.detectState(0))}</option>
+                <option <#if (req.detectState)??><#if req.detectState ==  1>selected="selected"</#if></#if> value= "1">${(util.detectState(1))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 30>selected="selected"</#if></#if> value="30">${(util.detectState(30))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 31>selected="selected"</#if></#if> value="31">${(util.detectState(31))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 32>selected="selected"</#if></#if> value="32">${(util.detectState(32))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 33>selected="selected"</#if></#if> value="33">${(util.detectState(33))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 34>selected="selected"</#if></#if> value="34">${(util.detectState(34))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 35>selected="selected"</#if></#if> value="35">${(util.detectState(35))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 36>selected="selected"</#if></#if> value="36">${(util.detectState(36))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 37>selected="selected"</#if></#if> value="37">${(util.detectState(37))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 38>selected="selected"</#if></#if> value="38">${(util.detectState(38))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 20>selected="selected"</#if></#if> value="20">${(util.detectState(20))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 21>selected="selected"</#if></#if> value="21">${(util.detectState(21))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 22>selected="selected"</#if></#if> value="22">${(util.detectState(22))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 23>selected="selected"</#if></#if> value="23">${(util.detectState(23))}</option>
+                <option <#if (req.detectState)??><#if req.detectState == 40>selected="selected"</#if></#if> value="40">${(util.detectState(40))}</option>
+            </select>
+            <select class="select" name="storeId" id="storeId" style="height: 31px;width:8%">
+                <option value="">店铺信息</option>
+                <#list stores as s>
+                    <option value="${(s.storeId)!}" <#if (req.storeId)?? && req.storeId == s.storeId>selected</#if>>${(s.storeName)!}</option>
+                </#list>
+            </select>
+            <input type="text" class="input-text" style="width:8%;margin-top: -3px;" value="${(req.machineNo)!}" placeholder="机器条码" id="machineNo" name="machineNo">
+            <input type="text" class="input-text" style="width:8%;margin-top: -3px;" value="${(req.productName)!}" placeholder="产品名称" id="productName" name="productName">
+            <input type="text" class="input-text" style="width:11%;margin-top: -3px;" value="${(req.detectName)!}" placeholder="客户姓名/昵称" id="detectName" name="detectName">
+            <input type="text" class="input-text" style="width:11%;margin-top: -3px;" value="${(req.detectTel)!}" placeholder="客户电话/手机" id="detectTel" name="detectTel">
+            <input type="text" class="input-text" style="width:8%;margin-top: -3px;" value="${(req.methodName)!}" placeholder="处理方式" id="methodName" name="methodName">
+            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索 </button>
+        </form>
+    </div>
+     <table class="table table-border table-bordered table-hover" style="margin-top: 20px">
+        <thead>
+        <tr class="text-c">
+            <th width="20">维修状态<i class="Hui-iconfont" style="cursor: pointer;color: blue;" title="点击查看状态说明" onclick="state_details()">&#xe633;</i></th>
+            <th width="20">维修编号<i class="Hui-iconfont" style="cursor: pointer;color: blue;" title="此为维修部的唯一编号,后期可通过此编号沟通具体事项">&#xe633;</i></th>
+            <th width="40">产品信息</th>
+            <th width="50">客户姓名/昵称</th>
+            <th width="50">客户电话/手机</th>
+            <th width="50">客户反馈问题</th>
+            <th width="40">处理方式</th>
+            <th width="45">机器条码</th>
+            <th width="20">录入时间</th>
+            <th width="40">操作</th>
+        </tr>
+        </thead>
+        <tbody>
+        <#if (page.dataList?size <= 0)>
+            <tr class="text-c"><td colspan="10">暂无数据</td></tr>
+        <#else>
+            <#list page.dataList as o>
+            <tr class="text-c">
+                <td>
+                    ${(util.detectState(o.detectState))}
+                    <#if o.detectState == 1>
+                        <br>
+                        <span class="c-red"><#if o.maintenanceCutTime??>(${o.maintenanceCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
+                    </#if>
+                    <#if o.detectState == 31 || o.detectState == 35>
+                        <br>
+                        <span class="c-red"><#if o.completeCutTime??>(${o.completeCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
+                    </#if>
+                </td>
+                <td>${(o.detectNumber)!}</td>
+                <td>${(o.productName)!}(${(o.colorName)!})</td>
+                <td>${(o.detectName)!}</td>
+                <td>${(o.detectTel)!}</td>
+                <td>${(o.questionTitle)!}</td>
+                <td>${(o.methodName)!}</td>
+                <td>${(o.machineNo)!}</td>
+                <td>${(o.detectCreateTime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
+                <td class="td-manage">
+                    <#if o.detectState == 30 || o.detectState == 34|| o.detectState == 38>
+                        <a style="text-decoration:none" href="javascript:;" title="确认处理" onclick="layer_show('确认处理','${path}/detect/to_detect_msg?detectId=${o.detectId!''}','570','750');">
+                            <i class="Hui-iconfont">&#xe6e1;</i>
+                        </a>
+                    </#if>
+                    <a title="查看详情" href="javascript:layer_show('维修详情','${path}/admin/detect/to_detail?detectId=${o.detectId}','800','600');" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe695;</i></a>
+                    <#if (o.detectState == 0)>
+                        <a title="删除" href="javascript:del_detect(${(o.detectId)!})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe609;</i></a>
+                    </#if>
+                </td>
+            </tr>
+            </#list>
+        </#if>
+        </tbody>
+    </table>
+</div>
+
+<#include "/base/page_util.ftl">
+</body>
+<script type="text/javascript" src="${path}/common/lib/lightbox2/2.8.1/js/lightbox.min.js"></script>
+<script type="text/javascript">
+    function state_details() {
+        layer.open({
+            type: 1,
+            area: ['600px', '300px'],
+            fix: false,
+            maxmin: true,
+            shade: 0.4,
+            title: '维修状态说明',
+            content: '<p style="margin-top: 10px">&nbsp;&nbsp;<b style="color: red;float: left;width: 100px;display: block;margin-left: 10px;">待收货确认:</b>表示机器还未到维修部,维修部还未收货,收货后将开始检测</p>' +
+                     '<p>&nbsp;&nbsp;<b style="color: red;float: left;width: 100px;display: block;margin-left: 10px;">待检测机器:</b>维修部门已经收到机器,正在进行对机器的检测,预计三个工作日完成</p>' +
+                     '<p>&nbsp;&nbsp;<b style="color: red;float: left;width: 100px;display: block;margin-left: 10px;">用户同意维修:</b>您已确认维修机器,维修部正在维修机器中</p>' +
+                     '<p>&nbsp;&nbsp;<b style="color: red;float: left;width: 100px;display: block;margin-left: 10px;">维修完成:</b>维修部已经完成机器的维修,需要返回给客户</p>' +
+                     '<p>&nbsp;&nbsp;<b style="color: red;float: left;width: 100px;display: block;margin-left: 10px;">用户不维修:</b>维修部完成对机器的检测后,但是用户不同意维修</p>' +
+                     '<p>&nbsp;&nbsp;<b style="color: red;float: left;width: 100px;display: block;margin-left: 10px;">其他状态:</b>其他状态是针对换货、补发、只针对机器检测的描述,可忽略</p>'
+        });
+    }
+
+    function del_detect(id) {
+        layer.confirm('是否确认删除此售后信息?',function(index){
+            // 确定按钮
+            $.ajax({
+                cache: true,
+                type: "POST",
+                data: {"id":id},
+                url: "${path}/admin/afterSales/del",
+                async: false,
+                success: function(data){
+                    if (data.returnCode === 200) {
+                        layer.msg('删除成功',{icon: 1,time:1000}, function () {
+                            window.location.reload();
+                        });
+                    } else {
+                        layer.msg('删除失败,请稍后重试!',{icon: 1,time:1000});
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                }
+            });
+        });
+
+    }
+</script>
+</html>

+ 1 - 0
watero-rst-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/image/image.js

@@ -104,6 +104,7 @@
             }
 
             if(list) {
+                editor.fireEvent('beforeinsertimage', list);
                 editor.execCommand('insertimage', list);
                 remote && editor.fireEvent("catchRemoteImage");
             }