Przeglądaj źródła

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

wangxiaoming 6 lat temu
rodzic
commit
859ac98663
50 zmienionych plików z 2763 dodań i 91 usunięć
  1. 10 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java
  2. 43 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/MaterialNumberInfo.java
  3. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/OrderBatch.java
  4. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java
  5. 1 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductType.java
  6. 4 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/InventoryService.java
  7. 6 4
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java
  8. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/InventoryServiceImpl.java
  9. 40 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  10. 6 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/companyInfoMapper.xml
  11. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  12. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/storeInfoMapper.xml
  13. 15 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java
  14. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java
  15. 4 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/InventoryMapper.java
  16. 19 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml
  17. 3 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml
  18. 1 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/inventoryLogMapper.xml
  19. 29 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/inventoryMapper.xml
  20. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/order/mapper/orderBatchMapper.xml
  21. 7 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml
  22. 66 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  23. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java
  24. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderBatchController.java
  25. 11 3
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java
  26. 2 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesChannelController.java
  27. 135 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  28. 8 4
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderStatController.java
  29. 21 12
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  30. 6 5
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/InventoryController.java
  31. 1 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  32. 116 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/complete_maintenance.ftl
  33. 340 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl
  34. 23 7
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  35. 294 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_detect.ftl
  36. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inventory/inventory_list.ftl
  37. 2 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inventory/update_inventory.ftl
  38. 35 8
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/complete_signclosed.ftl
  39. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl
  40. 3 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order_new.ftl
  41. 332 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_sdorder.ftl
  42. 153 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/delete_order.ftl
  43. 0 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/deliver_statistics.ftl
  44. 4 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/product_list.ftl
  45. 922 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_sdorder_list.ftl
  46. 3 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/statistics/deliver_statistics.ftl
  47. 4 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/statistics/sell_order_statistics.ftl
  48. 43 12
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/tooth_print_List.ftl
  49. 2 1
      watero-rst-web/src/main/webapp/common/js/common/salesChannel.js
  50. 6 0
      watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

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

@@ -62,7 +62,8 @@ public class ComplaintDetectInfo implements Serializable {
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date signclosedDate;//签收时间
 
-    private Date maintenanceCutTime;//待维修截止时间
+    private Date maintenanceCutTime;//待检测截止时间
+    private Date completeCutTime;//待完成维修截止时间
 
     //5月8号新增字段
     private String detectProduction;//生产月份
@@ -434,4 +435,12 @@ public class ComplaintDetectInfo implements Serializable {
     public void setDetectNumber(String detectNumber) {
         this.detectNumber = detectNumber;
     }
+
+    public Date getCompleteCutTime() {
+        return completeCutTime;
+    }
+
+    public void setCompleteCutTime(Date completeCutTime) {
+        this.completeCutTime = completeCutTime;
+    }
 }

+ 43 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/MaterialNumberInfo.java

@@ -0,0 +1,43 @@
+package com.iamberry.rst.core.fm;
+
+import java.io.Serializable;
+
+public class MaterialNumberInfo implements Serializable{
+    private static final long serialVersionUID = -2059209076296364587L;
+    private Integer materialId;
+    private Integer materialNumber;
+    private String materialName;
+    private Integer materialType;
+
+    public Integer getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(Integer materialId) {
+        this.materialId = materialId;
+    }
+
+    public Integer getMaterialNumber() {
+        return materialNumber;
+    }
+
+    public void setMaterialNumber(Integer materialNumber) {
+        this.materialNumber = materialNumber;
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public Integer getMaterialType() {
+        return materialType;
+    }
+
+    public void setMaterialType(Integer materialType) {
+        this.materialType = materialType;
+    }
+}

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

@@ -42,6 +42,8 @@ public class OrderBatch  implements  Serializable{
 
     private Integer salesAdminId;   //录入人id
 
+    private Integer salesCompanyId;   //销售公司ID
+
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date startDate;                 //开始时间
@@ -168,4 +170,12 @@ public class OrderBatch  implements  Serializable{
     public void setNoticeDistNum(Integer noticeDistNum) {
         this.noticeDistNum = noticeDistNum;
     }
+
+    public Integer getSalesCompanyId() {
+        return salesCompanyId;
+    }
+
+    public void setSalesCompanyId(Integer salesCompanyId) {
+        this.salesCompanyId = salesCompanyId;
+    }
 }

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

@@ -51,6 +51,8 @@ public class ProductColor implements Serializable {
 
     private String productNumber;        //产品型号
 
+    private Integer typeCompany;        //所属公司
+
     public String getProductName() {
         return productName;
     }
@@ -195,6 +197,14 @@ public class ProductColor implements Serializable {
         this.productNumber = productNumber;
     }
 
+    public Integer getTypeCompany() {
+        return typeCompany;
+    }
+
+    public void setTypeCompany(Integer typeCompany) {
+        this.typeCompany = typeCompany;
+    }
+
     @Override
     public String toString() {
         return "ProductColor{" +

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductType.java

@@ -27,7 +27,7 @@ public class ProductType implements Serializable {
 
     private Integer typeStatus;     //状态
 
-    private Integer typeCompany;    // 所属商城   1:美国watero; 2:上朵电动牙刷  3:优尼雅净水机
+    private Integer typeCompany;    // 所属商城
 
     public Integer getTypeId() {
         return typeId;

+ 4 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/InventoryService.java

@@ -27,4 +27,8 @@ public interface InventoryService {
      * @return
      */
     InventoryInfo getByInventoryByBar(String inventoryProductBar);
+    /**
+     * 新增
+     */
+    Integer insert(InventoryInfo inventoryInfo);
 }

+ 6 - 4
watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java

@@ -1,9 +1,6 @@
 package com.iamberry.rst.faces.fm;
 
-import com.iamberry.rst.core.fm.ComplaintDetectImg;
-import com.iamberry.rst.core.fm.ComplaintDetectInfo;
-import com.iamberry.rst.core.fm.ComplaintSignclosedInfo;
-import com.iamberry.rst.core.fm.DetectionBasis;
+import com.iamberry.rst.core.fm.*;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 
@@ -82,4 +79,9 @@ public interface ComplaintDetectInfoService {
      * @return
      */
     Integer getDetectNum();
+    /**
+     * 查询物料代码
+     * @return
+     */
+    List<MaterialNumberInfo> listMaterialNumber();
 }

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/InventoryServiceImpl.java

@@ -43,4 +43,9 @@ public class InventoryServiceImpl implements InventoryService {
     public InventoryInfo getByInventoryByBar(String inventoryProductBar) {
         return inventoryMapper.getByInventoryByBar(inventoryProductBar);
     }
+
+    @Override
+    public Integer insert(InventoryInfo inventoryInfo) {
+        return inventoryMapper.insert(inventoryInfo);
+    }
 }

+ 40 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -95,6 +95,13 @@ public class SalesOrderServiceImpl implements SalesOrderService {
 
     @Override
     public Integer updateSalesOrder(SalesOrder salesOrder) {
+        //作废订单时需要返还库存
+        if(salesOrder.getSalesStatus() != null && salesOrder.getSalesStatus() == 3){
+            //如果已出库则返还库存
+            if(salesOrderMapper.getSalesOrderById(salesOrder.getSalesId()).getSalesDeliver() == 2){
+                returnInventory(salesOrder.getSalesId());
+            }
+        }
         return salesOrderMapper.updateSalesOrder(salesOrder);
     }
 
@@ -871,12 +878,44 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     @Override
     @Transactional
     public Integer delSalesOrder(Integer id) {
+        //查询出库状态判断是否需要返还库存
+        if(salesOrderMapper.getSalesOrderById(id).getSalesDeliver() == 2){
+            returnInventory(id);
+        }
         // 检查客诉是否使用订单,如果有使用订单,无法删除
         salesOrderMapper.delOrderItem(id);
         salesOrderMapper.delSalesOrder(id);
         return 1;
     }
 
+    //执行删除和作废订单时返还库存
+    public boolean returnInventory(Integer salesId){
+        SalesOrderItem salesOrderItem = new SalesOrderItem();
+        salesOrderItem.setItemOrderId(salesId);
+        List<SalesOrderItem> listOrderitem = salesOrderService.listSalesOrderItem(salesOrderItem);
+        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        for(SalesOrderItem item : listOrderitem){
+            InventoryInfo info = inventoryMapper.getByInventoryByBar(item.getItemColorBar());
+            if(info != null){
+                    info.setInventoryGoodProductNum(info.getInventoryGoodProductNum() + item.getItemNum());
+                info.setInventoryRecentRecord(sdf.format(new Date())+"删除/作废订单返还库存:"+item.getItemNum()+"件");
+                inventoryMapper.updateById(info);
+                //添加日志
+                InventoryLog inventoryLog = new InventoryLog();
+                inventoryLog.setLogProductName(info.getInventoryProductName());
+                inventoryLog.setLogProductBar(info.getInventoryProductBar());
+                inventoryLog.setLogRemainingNum(item.getItemNum());
+                inventoryLog.setLogType(1);
+                inventoryLog.setLogOperationType(1);
+                inventoryLog.setLogDesc(sdf.format(new Date())+"删除/作废订单返还库存:"+item.getItemNum()+"件");
+                inventoryLog.setLogQualityType(1);
+                inventoryLog.setLogWarehouseId(1);
+                inventoryLogMapper.insert(inventoryLog);
+            }
+
+        }
+        return true;
+    }
     @Override
     public Integer updateOrderItem(SalesOrderItem salesOrderItem) {
         return salesOrderMapper.updateOrderItem(salesOrderItem);
@@ -1030,7 +1069,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     public Integer updateDeliver(SalesOrder salesOrder) {
             if(salesOrder.getSalesDeliver() == 2){//修改库存
                 if(!updateInventory(salesOrder.getSalesId())){
-                    throw  new RuntimeException("标记出库-修改库存失败!");
+                    return 0;
                 }
             }
         return salesOrderMapper.updateDeliver(salesOrder);

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

@@ -27,8 +27,12 @@
     select
     <include refid="companyInfo" />
     from tb_rst_sales_company
-    where
-      company_status = 1
+    <where>
+    <if test="companyId != null and companyId != ''">
+      AND company_id = #{companyId}
+    </if >
+      AND company_status = 1
+    </where>
   </select>
 
 

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

@@ -1355,6 +1355,9 @@
             <if test="endDate != null and endDate != ''">
                 AND sales_create_time <![CDATA[<=]]> #{endDate}
             </if>
+            <if test="salesCompanyId != null and salesCompanyId != ''">
+                AND sales_company_id = #{salesCompanyId}
+            </if>
         </where>
         GROUP BY item_color_bar
     </select>

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

@@ -43,7 +43,7 @@
       <if test="storeStatus != null">
         and store_status = #{storeStatus}
       </if>
-      <if test="companyId != null">
+      <if test="companyId != null and companyId != ''">
         and company_id = #{companyId}
       </if>
       <if test="storeName != null">

+ 15 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -4,10 +4,7 @@ package com.iamberry.rst.service.fm;
 import com.github.pagehelper.PageHelper;
 import com.iamberry.rst.core.cm.CmRelation;
 import com.iamberry.rst.core.cm.ProcMethod;
-import com.iamberry.rst.core.fm.ComplaintDetectImg;
-import com.iamberry.rst.core.fm.ComplaintDetectInfo;
-import com.iamberry.rst.core.fm.ComplaintSignclosedInfo;
-import com.iamberry.rst.core.fm.DetectionBasis;
+import com.iamberry.rst.core.fm.*;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
@@ -20,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Calendar;
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -133,10 +132,14 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     public boolean customerConfirm(ComplaintDetectInfo detectInfo) {
         ComplaintDetectInfo detect = complaintDetectInfoMapper.getDetectById(detectInfo.getDetectId());
         /*ProcMethod procMethod = procMethodMapper.getProcMethodById(detectInfo.getProcMethodId());*/
+        Calendar date = Calendar.getInstance();
+        date.setTime(new Date());
+        date.set(Calendar.DATE, date.get(Calendar.DATE) + 5);
         switch (detectInfo.getDetectState()){
             case 30:
                 if(detectInfo.getDetectProcessingResults() == 1){//付费维修
                     detectInfo.setDetectState(31);//同意付费维修
+                    detectInfo.setCompleteCutTime(date.getTime());
                 }
                 if(detectInfo.getDetectProcessingResults() == 3 || detectInfo.getDetectProcessingResults() == 4){//退货、换货
                     if(detect.getDetectRenovation() == 1){
@@ -151,13 +154,16 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                 break;
             case 34:
                 detectInfo.setDetectState(35);
+                detectInfo.setCompleteCutTime(date.getTime());
                 break;
             case 38:
                 if(detectInfo.getDetectProcessingResults() == 1){//付费维修
                     detectInfo.setDetectState(31);//同意付费维修
+                    detectInfo.setCompleteCutTime(date.getTime());
                 }
                 if(detectInfo.getDetectProcessingResults() == 2){//免费维修
                     detectInfo.setDetectState(35);//同意免费维修
+                    detectInfo.setCompleteCutTime(date.getTime());
                 }
                 if(detectInfo.getDetectProcessingResults() == 3 || detectInfo.getDetectProcessingResults() == 4){//退货、换货
                     if(detect.getDetectRenovation() == 1){
@@ -200,5 +206,10 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         return complaintDetectInfoMapper.getDetectNum();
     }
 
+    @Override
+    public List<MaterialNumberInfo> listMaterialNumber() {
+        return complaintDetectInfoMapper.listMaterialNumber();
+    }
+
 
 }

+ 7 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java

@@ -3,6 +3,7 @@ package com.iamberry.rst.service.fm.mapper;
 import com.iamberry.rst.core.fm.ComplaintDetectImg;
 import com.iamberry.rst.core.fm.ComplaintDetectInfo;
 import com.iamberry.rst.core.fm.DetectionBasis;
+import com.iamberry.rst.core.fm.MaterialNumberInfo;
 
 import java.util.List;
 
@@ -63,4 +64,10 @@ public interface ComplaintDetectInfoMapper {
      * @return
      */
     Integer getDetectNum();
+
+    /**
+     * 查询物料代码
+     * @return
+     */
+    List<MaterialNumberInfo> listMaterialNumber();
 }

+ 4 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/InventoryMapper.java

@@ -28,4 +28,8 @@ public interface InventoryMapper {
      * 获取库存信息列表
      */
     Integer updateById(InventoryInfo inventoryInfo);
+    /**
+     * 新增
+     */
+    Integer insert(InventoryInfo inventoryInfo);
 }

+ 19 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml

@@ -34,17 +34,23 @@
       detect_is_refurbishing detectIsRefurbishing,
       maintenance_results maintenanceResults,
       detect_number detectNumber,
+      complete_cut_time completeCutTime,
       cd.signclosed_id signclosedId,
       pi.product_name productName,
       ci.color_name colorName,
       cci.customer_create_time customerCreateTime,
-	  oi.sales_pay_time salesPayTime
+	  oi.sales_pay_time salesPayTime,
+	  cpm.proc_method_name procMethodName,
+      cpt.proc_type_name procTypeName
     from tb_rst_complaint_detect cd
     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
     LEFT JOIN tb_rst_product_color ci on cd.product_color_id = ci.color_id
     LEFT JOIN tb_rst_cm_customer_info cci on cci.customer_id = cd.customer_id
     LEFT JOIN tb_rst_sales_order_info oi on oi.sales_customer_id = cci.customer_id
+    LEFT JOIN tb_rst_cm_relation cr ON cd.customer_id = cr.customer_id
+    LEFT JOIN tb_rst_cm_proc_method cpm ON cr.proc_method_id = cpm.proc_method_id
+    LEFT JOIN tb_rst_cm_proc_type cpt ON cpm.proc_type_id = cpt.proc_type_id
     where detect_id = #{detectId,jdbcType=INTEGER}
     GROUP BY cci.customer_id
   </select>
@@ -82,6 +88,7 @@
     cd.detect_is_refurbishing detectIsRefurbishing,
     cd.maintenance_results maintenanceResults,
     cd.detect_number detectNumber,
+    cd.complete_cut_time completeCutTime,
     qd.describe_title questionTitle,
     pi.product_name productName,
     pt.type_name productTypeName,
@@ -225,7 +232,10 @@
           maintenance_results = #{maintenanceResults,jdbcType=VARCHAR},
       </if>
       <if test="detectNumber != null and detectNumber != ''" >
-          detect_number = #{detectNumber,jdbcType=VARCHAR}
+          detect_number = #{detectNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="completeCutTime != null and completeCutTime != ''" >
+        complete_cut_time = #{completeCutTime,jdbcType=VARCHAR}
       </if>
     </set>
     where
@@ -335,4 +345,11 @@
     WHERE
         date_format(detect_create_time, '%Y-%m') = date_format(now(), '%Y-%m')
   </select>
+
+  <select id="listMaterialNumber" resultType="MaterialNumberInfo">
+    SELECT
+        *
+    FROM
+        tb_rst_fm_material_number
+  </select>
 </mapper>

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

@@ -201,13 +201,13 @@
       <if test="signclosedSendTel != null" >
         signclosed_send_tel = #{signclosedSendTel,jdbcType=VARCHAR},
       </if>
-      <if test="signclosedAddrProvinces != null" >
+      <if test="signclosedAddrProvinces != null and signclosedAddrProvinces != ''" >
         signclosed_addr_provinces = #{signclosedAddrProvinces,jdbcType=VARCHAR},
       </if>
-      <if test="signclosedAddrCity != null" >
+      <if test="signclosedAddrCity != null and signclosedAddrCity != ''" >
         signclosed_addr_city = #{signclosedAddrCity,jdbcType=VARCHAR},
       </if>
-      <if test="signclosedAddrArea != null" >
+      <if test="signclosedAddrArea != null and signclosedAddrArea != ''" >
         signclosed_addr_area = #{signclosedAddrArea,jdbcType=VARCHAR},
       </if>
       <if test="signclosedDate != null" >

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

@@ -74,6 +74,7 @@
         and il.log_warehouse_id = #{logWarehouseId}
       </if>
     </where>
+    ORDER BY il.log_create_time DESC
   </select>
 
   <update id="updateById" parameterType="InventoryLog" >

+ 29 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/inventoryMapper.xml

@@ -103,6 +103,8 @@
 
     WHERE
     oi.sales_shipping_status IN (0,3,11)
+    AND  oi.sales_deliver = 1
+    AND  oi.sales_status IN (0,1,2)
     GROUP BY soi.item_color_id
     ) imn on imn.colorId  = pc.color_id
     <where>
@@ -128,6 +130,7 @@
         and pc.color_bar = #{inventoryProductBar}
       </if>
     </where>
+    ORDER BY inventory_sorting
   </select>
 
   <update id="updateById" parameterType="InventoryInfo" >
@@ -202,4 +205,30 @@
     where fi.inventory_product_bar = #{inventoryProductBar}
   </select>
 
+  <insert id="insert" parameterType="InventoryInfo">
+    insert INTO tb_rst_fm_inventory
+    (inventory_id,
+    inventory_product_name,
+    inventory_product_bar,
+    inventory_remaining_num,
+    inventory_state,
+    inventory_desc,
+    inventory_product_color_id,
+    inventory_good_product_num,
+    inventory_defective_product_num,
+    inventory_recent_record)
+     VALUES
+      (
+      #{inventoryId},
+    #{inventoryProductName},
+    #{inventoryProductBar},
+    #{inventoryRemainingNum},
+    #{inventoryState},
+    #{inventoryDesc},
+    #{inventoryProductColorId},
+    #{inventoryGoodProductNum},
+    #{inventoryDefectiveProductNum},
+    #{inventoryRecentRecord}
+    )
+  </insert>
 </mapper>

+ 3 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/order/mapper/orderBatchMapper.xml

@@ -39,6 +39,9 @@
             <if test="endDate != null and endDate != ''">
                 AND sales_create_time <![CDATA[<=]]> #{endDate}
             </if>
+            <if test="salesCompanyId != null and salesCompanyId != ''">
+                AND soi.sales_company_id = #{salesCompanyId}
+            </if>
         </where>
         GROUP BY soi.sales_batch_id
         ORDER BY t.batch_create_time DESC

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

@@ -64,6 +64,9 @@
             <if test="productType != null and productType != ''">
                 AND p.product_type  = #{productType}
             </if >
+            <if test="typeCompany != null and typeCompany != ''">
+                AND pt.type_company  = #{typeCompany}
+            </if >
         </where>
     </select>
 
@@ -101,7 +104,7 @@
     <select id="listProductType" parameterType="ProductType" resultType="ProductType">
       select
         *
-      from
+        from
         tb_rst_product_type
       <where>
           <if test="typeStatus != null and typeStatus != ''">
@@ -110,6 +113,9 @@
           <if test="typeId != null and typeId != ''">
               type_id = #{typeId}
           </if>
+          <if test="typeCompany != null and typeCompany != ''">
+              type_company = #{typeCompany}
+          </if>
       </where>
     </select>
 

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

@@ -222,6 +222,70 @@ public class AdminDetectController {
         return mv;
     }
     /**
+     * 跳转到完成维修页面
+     *
+     * @return
+     */
+    @RequiresPermissions("info:update:info")
+    @RequestMapping(value = "/to_complete")
+    public ModelAndView toComplete(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/complete_maintenance");
+        String detectId = request.getParameter("detectId");
+        String detectState = request.getParameter("detectState");
+        if(detectId == null || detectId.equals("")){
+            return mv;
+        }if(detectState == null || detectState.equals("")){
+            return mv;
+        }
+        ComplaintDetectInfo detectinfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        List<MaterialNumberInfo> listMaterial = complaintDetectInfoService.listMaterialNumber();
+        mv.addObject("detectId",detectId);
+        mv.addObject("detectState",detectState);
+        mv.addObject("detectinfo",detectinfo);
+        mv.addObject("listMaterial",listMaterial);
+        return mv;
+    }
+
+    /**
+     * 跳转到检测详情页面
+     *
+     * @return
+     */
+    @RequiresPermissions("info:update:info")
+    @RequestMapping(value = "/to_detail")
+    public ModelAndView toAddDetail(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/detect_detail");
+        String detectId = request.getParameter("detectId");
+        if(detectId == null || detectId.equals("")){
+            return mv;
+        }
+        ComplaintDetectInfo detectinfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        List<ComplaintDetectImg> imgList = complaintDetectInfoService.listDetectImg(Integer.valueOf(detectId));
+        mv.addObject("detectinfo",detectinfo);
+        mv.addObject("imgList",imgList);
+        return mv;
+    }
+
+    /**
+     * 跳转到修改检测页面
+     *
+     * @return
+     */
+    @RequiresPermissions("info:update:info")
+    @RequestMapping(value = "/to_update")
+    public ModelAndView toupdate(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/update_detect");
+        String detectId = request.getParameter("detectId");
+        if(detectId == null || detectId.equals("")){
+            return mv;
+        }
+        ComplaintDetectInfo detectinfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        List<ComplaintDetectImg> imgList = complaintDetectInfoService.listDetectImg(Integer.valueOf(detectId));
+        mv.addObject("detectInfo",detectinfo);
+        mv.addObject("imgList",imgList);
+        return mv;
+    }
+    /**
      * 跳转到添加修改转入信息页面
      *
      * @return
@@ -283,7 +347,9 @@ public class AdminDetectController {
             msg.setReturnCode(500);
             return msg;
         }
+        /*String[] componentsImgs = request.getParameterValues("componentsImg");*/
         Integer num = complaintDetectInfoService.updateDetectById(detectInfo);
+
         if (num < 1) {
             msg.setResultCode(500);
             msg.setReturnCode(500);

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

@@ -87,7 +87,7 @@ public class AdminSignclosedController {
     public ModelAndView selectDetectList(HttpServletRequest request,
                                         @RequestParam(value = "pageNO", defaultValue = "1", required = false) int pageNO,
                                         @RequestParam(value = "pageTotal", required = false) Integer pageTotal,
-                                        @RequestParam(value = "pageSize", defaultValue = "5", required = false) int pageSize,
+                                        @RequestParam(value = "pageSize", defaultValue = "10", required = false) int pageSize,
                                          ComplaintSignclosedInfo signclosedInfo) {
         ModelAndView mv = new ModelAndView("cm/signclosed/signclosed_list");
         if(signclosedInfo.getIsBinding() != null && signclosedInfo.getIsBinding() == 1){

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

@@ -116,7 +116,7 @@ public class AdminOrderBatchController {
             if(so.getSalesStatus() == 1 && so.getSalesShippingStatus() == 0){  //salesStatus
                 SalesOrder newOrder = new SalesOrder();
                 newOrder.setSalesId(so.getSalesId());
-                newOrder.setSalesOrderId(salesOrder.getSalesDealCode());
+                newOrder.setSalesOrderId(so.getSalesDealCode());
                 newOrder.setSalesShippingStatus(11);
                 newOrder.setSalesWarehouseId(warehouseId);
                 salesOrderService.noticeDistribution(newOrder);

+ 11 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java

@@ -606,10 +606,13 @@ public class AdminOrderController {
     }
 
     @RequestMapping("/upload_excel")
-    public ModelAndView uploadExcel(@RequestParam("file") String file, HttpServletRequest request) throws IOException {
+    public ModelAndView uploadExcel(@RequestParam("file") String file, HttpServletRequest request,StoreInfo storeInfo) throws IOException {
         ModelAndView mv = new ModelAndView("order/excel_to_order_new");
         // 到设置页面
-        List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(storeInfo);
+        if(storeInfo.getCompanyId() != null ){
+            mv.addObject("companyId",storeInfo.getCompanyId());
+        }
         mv.addObject("listStoreInfo",listStoreInfo);
         mv.addObject("heads", ExcelUtil.readExcelHead(request.getServletContext().getRealPath(file)));
         mv.addObject("logisticsInfoList",logisticsInfoService.getLogisticsInfoList(new LogisticsInfo()));
@@ -929,10 +932,15 @@ public class AdminOrderController {
     @RequestMapping("/get_producttype_store")
     public ResponseJson getProducttypeStore(@RequestParam("orderStoreInfo") String orderStoreInfo,
                                         @RequestParam("productUrl") String filePath,
+                                        @RequestParam("companyId") Integer companyId,
                                         HttpServletRequest request) throws IOException {
         ResponseJson json = new ResponseJson(200, "SUCCESS", 200);
         json.addResponseKeyValue("values", ExcelUtil.readCell(request.getServletContext().getRealPath(filePath), orderStoreInfo));
-        json.addResponseKeyValue("stores", storeInfoService.listStore(new StoreInfo()));
+        StoreInfo storeInfo = new StoreInfo();
+        if(companyId != null && !companyId.equals("")){
+            storeInfo.setCompanyId(companyId);
+        }
+        json.addResponseKeyValue("stores", storeInfoService.listStore(storeInfo));
         return json;
     }
 

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

@@ -54,9 +54,9 @@ public class AdminSalesChannelController {
      */
     @ResponseBody
     @RequestMapping(value = "/select_company")
-    public ResponseJson getCompany(HttpServletRequest request) throws Exception {
+    public ResponseJson getCompany(HttpServletRequest request,CompanyInfo companyInfo) throws Exception {
         //获取销售公司
-        List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
+        List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(companyInfo);
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);
         rj.addResponseKeyValue("companyInfoList", companyInfoList);
         return rj;

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

@@ -1,6 +1,8 @@
 package com.iamberry.rst.controllers.order;
 
 import com.iamberry.rst.core.cm.*;
+import com.iamberry.rst.core.fm.InventoryInfo;
+import com.iamberry.rst.core.fm.InventoryLog;
 import com.iamberry.rst.core.order.*;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.sys.Admin;
@@ -101,10 +103,16 @@ public class AdminSalesOrderController {
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
         }
-        List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
+        StoreInfo storeInfo = new StoreInfo();
+        ProductColor productColor = new ProductColor();
+        if(salesOrder.getSalesCompanyId() != null){
+            storeInfo.setCompanyId(salesOrder.getSalesCompanyId());
+            productColor.setTypeCompany(salesOrder.getSalesCompanyId());
+        }
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(storeInfo);
         List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
         salesOrder.setSalesOrderItemList(null);
-        List<ProductColor> productColorList = productService.listproductAndColor(new ProductColor());
+        List<ProductColor> productColorList = productService.listproductAndColor(productColor);
         StitchAttrUtil.getSa()
                 .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
                 .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
@@ -117,6 +125,56 @@ public class AdminSalesOrderController {
     }
 
     /**
+     * 上朵分页查询订单列表信息
+     * @param request
+     * @param salesOrder
+     * @param pageSize
+     * @param pageNO
+     * @param totalNum
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping("/list_sdorder_page")
+    @RequiresPermissions("salesOrder:select:salesOrder")
+    public ModelAndView listsdOrderPage(HttpServletRequest request, SalesOrder salesOrder,
+                                      @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+                                      @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+                                      @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
+        ModelAndView mv = new ModelAndView("order/salesOrder/sales_sdorder_list");
+
+        Admin admin = AdminUtils.getLoginAdmin();
+        Integer identity = admin.getAdminDept();
+        if(identity == 2){
+            salesOrder.setSalesAdminId(admin.getAdminId());
+        }
+        salesOrder.setIsSelectCustomer(2);//不查询客诉添加的订单
+        //分页获取订单信息
+        PagedResult<SalesOrder> pagedResult = salesOrderService.listSalesOrderPage(pageNO, pageSize, salesOrder,totalNum == 0);
+        if (totalNum != 0) {
+            pagedResult.setTotal(totalNum);
+        }
+        StoreInfo storeInfo = new StoreInfo();
+        ProductColor productColor = new ProductColor();
+        if(salesOrder.getSalesCompanyId() != null){
+            storeInfo.setCompanyId(salesOrder.getSalesCompanyId());
+            productColor.setTypeCompany(salesOrder.getSalesCompanyId());
+        }
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(storeInfo);
+        List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
+        salesOrder.setSalesOrderItemList(null);
+        List<ProductColor> productColorList = productService.listproductAndColor(productColor);
+        StitchAttrUtil.getSa()
+                .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
+                .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_sdorder_page", pagedResult);
+
+        mv.addObject("listStoreInfo",listStoreInfo);
+        mv.addObject("logisticsInfoList",logisticsInfoList);
+        mv.addObject("identity",identity);
+        mv.addObject("productColorList",productColorList);
+        return mv;
+    }
+
+    /**
      * 查询订单详情
      * @param request
      * @return
@@ -632,6 +690,20 @@ public class AdminSalesOrderController {
         return mv;
     }
 
+    @RequestMapping("/to_add_sdorder")
+    @RequiresPermissions("salesOrder:add:manual")
+    public ModelAndView toAddsdOrder(HttpServletRequest request,SalesOrder salesOrder) throws Exception {
+        ModelAndView mv = new ModelAndView("order/salesOrder/add_sdorder");
+        StoreInfo storeInfo = new StoreInfo();
+        storeInfo.setCompanyId(4);
+        List<StoreInfo> storeInfoList = storeInfoService.listStore(storeInfo);
+        mv.addObject("storeInfoList", storeInfoList);
+        mv.addObject("admin", AdminUtils.getLoginAdmin());
+        mv.addObject("orderBatchs", orderBatchService.getOrderBatchListTwenty());
+        mv.addObject("salesOrder", salesOrder);
+        return mv;
+    }
+
     /**
      *  弹出添加商品页面
      * @param request
@@ -646,8 +718,12 @@ public class AdminSalesOrderController {
 
         ProductType productType = new ProductType();
         productType.setTypeId(productColor.getProductType());
+        productType.setTypeCompany(productColor.getTypeCompany());
         List<ProductType> productTypeList = productService.listProductType(productType);
 
+        if(productColor.getTypeCompany() != null){
+            mv.addObject("typeCompany",productColor.getTypeCompany());
+        }
         if(isRadio == null){
             isRadio = 0;
         }
@@ -1163,6 +1239,7 @@ public class AdminSalesOrderController {
         Integer res = salesOrderService.delSalesOrder(id);
         return res <= 0 ? ResponseJson.getFAILURE() : ResponseJson.getSUCCESS();
     }
+
     /**
      * 进入修改订单备注页面
      * @param salesId
@@ -1652,4 +1729,60 @@ public class AdminSalesOrderController {
             return new ResponseJson(500, "发送短信失败,失败原因:" + result, 500);
         }
     }
+
+    /**
+     * 进入发送售后短信页面
+     * @param request
+     * @return
+     */
+    @RequestMapping("/to_adminDetectOrder")
+    public ModelAndView to_adminDetectOrder(HttpServletRequest request){
+        ModelAndView mv = new ModelAndView("order/salesOrder/delete_order");
+        return mv;
+    }
+
+
+    /**
+     * 手动删除订单(管理员使用)(支持订单号和批次号,支持返还库存)
+     *
+     * @param request
+     * type  1订单id 2批次号 3订单号 4交易号
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("salesOrder:delete:salesOrder")
+    @RequestMapping("/adminDetectOrder")
+    public ResponseJson adminDetectOrder(HttpServletRequest request,String id,Integer type) throws Exception {
+        if (id == null || id.equals("")|| type == null) {
+            return new ResponseJson(500, "未获取到参数!", 500);
+        }
+        StringBuffer ret1 = new StringBuffer("成功:");
+        StringBuffer ret2 = new StringBuffer("失败:");
+        SalesOrder order = new SalesOrder();
+        if(type == 1){//id
+            order.setSalesId(Integer.valueOf(id));
+        }else if(type == 2){//批次号
+            order.setSalesBatchId(id);
+        }else if(type == 3){//订单号
+            order.setSalesOrderId(id);
+        }else if(type == 4){//交易号
+            order.setSalesDealCode(id);
+        }
+        List<SalesOrder> orderList = salesOrderService.salesOrderListAndItem(order);
+        if(orderList.size() > 0 && orderList.size() < 2000){
+            for (SalesOrder salesOrder : orderList){
+                Integer res = salesOrderService.delSalesOrder(salesOrder.getSalesId());
+                if (res != 1){//失败单号
+                    ret2.append(salesOrder.getSalesId()+":");
+                }else{
+                    ret1.append(salesOrder.getSalesId()+":");
+                }
+            }
+
+        }
+        return new ResponseJson(200, ret1+"-----"+ret2, 200);
+
+            /*return new ResponseJson(500, "发送短信失败,失败原因:" + result, 500);*/
+
+    }
 }

+ 8 - 4
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderStatController.java

@@ -69,12 +69,14 @@ public class AdminSalesOrderStatController {
     public ResponseJson listOrderPage(HttpServletRequest request, SalesOrder salesOrder) throws Exception {
         ResponseJson rj = ResponseJson.getSUCCESS();
         salesOrder.setIsCustmerAddOrder(2);
-
         List<SalesOrder> salesOrderList = new ArrayList();
-
         List<ProcMethod> procMethodList = procMethodService.getProcMethodList(new ProcMethod());
-        List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
-
+        List<CompanyInfo> companyInfoList = new ArrayList<>();
+        if(salesOrder.getSalesCompanyId() != null && !salesOrder.getSalesCompanyId().equals("")){
+            companyInfoList.add(companyInfoService.getCompanyInfoById(salesOrder.getSalesCompanyId()));
+        }else{
+            companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
+        }
         for (CompanyInfo companyInfo:companyInfoList) {
             salesOrder.setProcMethodId(null);
             salesOrder.setSalesCompanyId(companyInfo.getCompanyId());
@@ -101,6 +103,8 @@ public class AdminSalesOrderStatController {
     @RequiresPermissions("salesOrder:select:salesOrder")
     public ModelAndView selectSalesOrder(HttpServletRequest request) throws Exception {
         ModelAndView mv = new ModelAndView("order/statistics/sell_order_statistics");
+        String salesCompanyId = request.getParameter("salesCompanyId");
+        mv.addObject("salesCompanyId",salesCompanyId);
         return mv;
     }
 }

+ 21 - 12
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java

@@ -528,14 +528,15 @@ public class AwaitSendController {
      */
     @RequiresPermissions("salesOrder:statistics:deliver")
     @RequestMapping(value = "/deliver_statistics")
-    public ModelAndView deliverStatistics(HttpServletRequest request) {
+    public ModelAndView deliverStatistics(HttpServletRequest request,Integer salesCompanyId) {
         ModelAndView mv = new ModelAndView("order/statistics/deliver_statistics");
+        mv.addObject("salesCompanyId",salesCompanyId);
         return mv;
     }
 
     /**
      * 出库
-     * @param request
+     * @param request/
      * @return
      */
     @ResponseBody
@@ -552,7 +553,7 @@ public class AwaitSendController {
                 rj.setResultMsg("出货失败,请检查该物流单号("+postNum+")和订单状态是否为已发货。");
                 return rj;
             }
-            //修改库存信息
+            /*//修改库存信息
             if(updateInventory(salesOrder.getSalesId())){
                 rj = ResponseJson.getSUCCESS();
                 rj.setResultMsg("物流单号("+ postNum +")出库成功。");
@@ -560,7 +561,7 @@ public class AwaitSendController {
             }else{
                 rj.setResultMsg("出货失败,请检查该物流单号("+postNum+")和订单状态是否为已发货,产品库存是否充足。");
                 return rj;
-            }
+            }*/
 
         }
         if(salesOrder == null){
@@ -576,13 +577,16 @@ public class AwaitSendController {
             return rj;
         }
         salesOrder.setSalesDeliver(2);
-        if(updateInventory(salesOrder.getSalesId())){
+        /*if(updateInventory(salesOrder.getSalesId())){*/
             Integer flag = salesOrderService.updateDeliver(salesOrder);
             if(flag < 1){
                 rj.setResultMsg("出货失败,请检查该物流单号("+postNum+")和订单状态,产品库存是否充足。");
                 return rj;
             }
-        }
+        /*}else{
+            rj.setResultMsg("出货失败,请检查该物流单号("+postNum+")和订单状态是否为已发货,产品库存是否充足。");
+            return rj;
+        }*/
         //查询出库的产品项
         List<SalesOrderItem> itemList = salesOrderService.selectSalesOrderItemList(salesOrder.getSalesId());
         rj = ResponseJson.getSUCCESS();
@@ -631,12 +635,12 @@ public class AwaitSendController {
     @ResponseBody
     @RequiresPermissions("salesOrder:deliver:deliverList")
     @RequestMapping("/getDeliverNum")
-    public ResponseJson getDeliverNum(HttpServletRequest request,Integer type) {
+    public ResponseJson getDeliverNum(HttpServletRequest request,Integer type,Integer salesCompanyId) {
         ResponseJson rj = ResponseJson.getSUCCESS();
 
         List<HashMap> allList = new ArrayList<>();
 
-        List<Map<String,Object>> toDayList = this.getNotSendNumADay(new Date());
+        List<Map<String,Object>> toDayList = this.getNotSendNumADay(new Date(),salesCompanyId);
         HashMap map = new HashMap();
         map.put("date",new Date());
         map.put("list",toDayList);
@@ -644,7 +648,7 @@ public class AwaitSendController {
 
         Calendar yesterDay = Calendar.getInstance();
         yesterDay.add(Calendar.DATE, -1);// 日期减1
-        List<Map<String,Object>> yesterDayList = this.getNotSendNumADay(yesterDay.getTime());
+        List<Map<String,Object>> yesterDayList = this.getNotSendNumADay(yesterDay.getTime(),salesCompanyId);
         HashMap yerterMap = new HashMap();
         yerterMap.put("date",yesterDay.getTime());
         yerterMap.put("list",yesterDayList);
@@ -655,7 +659,7 @@ public class AwaitSendController {
         Collections.reverse(dateList);
         for (Date date: dateList) {
             HashMap mapx = new HashMap();
-            List<Map<String,Object>> list = this.getNotSendNumADay(date);
+            List<Map<String,Object>> list = this.getNotSendNumADay(date,salesCompanyId);
             mapx.put("date",date);
             mapx.put("list",list);
             allList.add(mapx);
@@ -671,7 +675,7 @@ public class AwaitSendController {
      * @param date
      * @return
      */
-    private List<Map<String,Object>>  getNotSendNumADay(Date date){
+    private List<Map<String,Object>>  getNotSendNumADay(Date date,Integer salesCompanyId){
         List<Map<String,Object>> list = new ArrayList<>();
 
         //总数
@@ -684,6 +688,11 @@ public class AwaitSendController {
         sendSalesOrder.setSalesShippingStatus(1);
         sendSalesOrder.setSalesDeliver(2);
 
+        if(salesCompanyId != null && !"".equals(salesCompanyId)){
+            allSalesOrder.setSalesCompanyId(salesCompanyId);
+            waitSalesOrder.setSalesCompanyId(salesCompanyId);
+            sendSalesOrder.setSalesCompanyId(salesCompanyId);
+        }
         Calendar calendarStart = Calendar.getInstance();
         calendarStart.setTime(date);
         calendarStart.set(Calendar.HOUR_OF_DAY,0);
@@ -760,7 +769,7 @@ public class AwaitSendController {
         Integer flag = salesOrderService.updateDeliver(salesOrder);
 
         if(flag < 1){
-            rj.setResultMsg("出货失败,请检查该订单的发货状态。");
+            rj.setResultMsg("出货失败,请检查该订单的发货状态及产品库存是否充足。");
             return rj;
         }
         rj = ResponseJson.getSUCCESS();

+ 6 - 5
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/InventoryController.java

@@ -245,22 +245,23 @@ public class InventoryController {
      */
     @ResponseBody
     @RequestMapping(value = "/addInventory")
-    public String toUpdateInventory(HttpServletRequest request) {
+    public String toUpdateInventory(HttpServletRequest request,Integer colorId) {
         ProductColor color = new ProductColor();
+        color.setColorId(colorId);
         List<ProductColor> listColor  = productColorService.getProductColorList(color);
         for(ProductColor productColor : listColor){
             Product product = productService.getProductById(productColor.getColorId());
             InventoryInfo inventoryInfo = new InventoryInfo();
             inventoryInfo.setInventoryProductName(product.getProductName());
             inventoryInfo.setInventoryProductBar(productColor.getColorBar());
-            inventoryInfo.setInventoryRemainingNum(0);
+            inventoryInfo.setInventoryRemainingNum(10000);
             inventoryInfo.setInventoryState(1);
             inventoryInfo.setInventoryProductColorId(productColor.getColorId());
-            inventoryInfo.setInventoryGoodProductNum(0);
+            inventoryInfo.setInventoryGoodProductNum(10000);
             inventoryInfo.setInventoryDefectiveProductNum(0);
-
+            inventoryService.insert(inventoryInfo);
         }
-        return "";
+        return "true";
     }
 
 

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

@@ -110,6 +110,7 @@
 		<typeAlias type="com.iamberry.rst.core.fm.FactoryInfo" alias="FactoryInfo"/>
 		<typeAlias type="com.iamberry.rst.core.fm.ComplaintSignclosedImg" alias="ComplaintSignclosedImg"/>
 		<typeAlias type="com.iamberry.rst.core.fm.ComplaintDetectImg" alias="ComplaintDetectImg"/>
+		<typeAlias type="com.iamberry.rst.core.fm.MaterialNumberInfo" alias="MaterialNumberInfo"/>
 
 		<typeAlias type="com.iamberry.rst.core.sys.SysConfig" alias="SysConfig"/>
 		<typeAlias type="com.iamberry.rst.core.sys.SystemLogs" alias="SystemLogs"/>

+ 116 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/complete_maintenance.ftl

@@ -0,0 +1,116 @@
+<!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">
+    <title>完成维修 - H-ui.filter v2.4</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;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;color: #50a2ea;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 45%;height: 6px;width: 6px;border-radius: 6px;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: 15px;}
+        .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;}
+        .huanhang{ float:left}
+        .my-btn-submit{padding: 10px 20px;width: 130px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px auto 0 auto;display: block;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="row cl">
+                <label class="form-label col-1 col-sm-1 huanhang" style="text-align: center">维修配件:</label>
+                <div class="formControls col-6 col-sm-6 huanhang" style="">
+                    <span class="select-box">
+                        <select class="select" id="materialId" name="materialId" >
+                            <option value="1" >请选择(可多选)</option>
+                            <#list listMaterial as material>
+                                <option value="${material.materialName}" >${material.materialName}</option>
+                            </#list>
+                        </select>
+				    </span>
+                </div>
+            </div>
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1 huanhang" style="text-align: center">维修内容:</label>
+                <div class="formControls col-6 col-sm-6 huanhang">
+                    <textarea name="detectContent" id="detectContent" cols="" rows="2"  class="textarea" onKeyUp="$.Huitextarealength(this,100)"></textarea>
+                <#--<span id="addrssMsg"></span>-->
+                </div>
+            </div>
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1 huanhang" style="text-align: center"></label>
+            <div class="col-6 col-sm-6 col-offset-3">
+                <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+                <input type="hidden" value="${detectState!''}" id="detectState" name="detectState">
+                <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
+            </div>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+    $("#materialId").change(function(){
+        $("#detectContent").html($("#detectContent").val()+$(this).val()+";");
+    });
+
+
+    function  add() {
+        /*var detectItemDesc = $("#detectItemDesc").val();
+        if( detectItemDesc != null){
+            if( detectItemDesc.length > 200 ){
+                layer.msg('备注长度不得大于100个字符',{icon: 5,time:1000});
+                return;
+            }
+        }*/
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/update",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('操作成功',{icon: 1,time:1000},function () {
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
+                    });
+                } else {
+                    layer.msg('操作失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('操作错误',{icon: 5,time:1000});
+            }
+        });
+    }
+</script>
+</body>
+</html>

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

@@ -0,0 +1,340 @@
+<!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">
+    <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
+    <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
+    <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
+    <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;color: #50a2ea;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -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;}
+
+        #suggest, #suggest2 {width:200px}
+        .gray {color:gray}
+        .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
+        .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_over, .ac_results li a:hover {background:#c8e3fc}
+        .ac_results li a span {float:right}
+        .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
+
+        .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: 15px;}
+        .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;}
+        .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
+        .dalog-ask .answer{color: #666;margin-bottom: 10px;}
+        .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
+        .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 .red{display: inline-block; padding: 2px; background: red;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;}
+        .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
+        .txt-red{color:red}
+        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+    </style>
+    <title>订单详细信息</title>
+</head>
+<body>
+
+<nav 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"
+       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <a class="btn radius r"
+       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
+</nav>
+
+
+<article class="cl pd-20">
+    <form action="" method="post" class="form form-horizontal" id="form-article-add">
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">维修详细信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+            <thead>
+            <tr>
+                <th width="10">维修编号:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectNumber!''}</span></td>
+                <td width="10"></td>
+                <th width="10">产品名称:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.productName!''}(${detectinfo.colorName!''})</span></td>
+            </tr>
+            <tr>
+                <th width="10">是否可翻新:</th>
+                <td width="10" style="font-weight: normal;">
+                <#if detectinfo.detectRenovation == 1>
+                    可翻新
+                <#elseif detectinfo.detectRenovation == 2>
+                    不可翻新
+                </#if>
+                </span></td>
+                <td width="10"></td>
+                <th width="10">是否有故障:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if detectinfo.isMaintenance == 1>
+                    有故障
+                <#elseif detectinfo.isMaintenance == 2>
+                    无故障
+                </#if>
+                </span></td>
+            </tr>
+            <tr>
+                <th width="10">当前状态:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if detectinfo.detectState == 1>
+                            <span class="c-red">待检测机器(${detectinfo.maintenanceCutTime?string("yyyy/MM/dd")}前完成)</span>
+                </#if>
+                        <#if detectinfo.detectState == 30>
+                            待用户确认
+                        </#if>
+                        <#if detectinfo.detectState == 31>
+                            <span class="c-red">待维修</span>
+                        </#if>
+                        <#if detectinfo.detectState == 32>
+                            <span class="c-success">维修完成</span>
+                        </#if>
+                        <#if detectinfo.detectState == 33>
+                            <span class="c-success">用户不维修(原机退回)</span>
+                        </#if>
+                        <#if detectinfo.detectState == 34>
+                            待客服确认维修
+                        </#if>
+                        <#if detectinfo.detectState == 35>
+                            <span class="c-red">待维修</span>
+                        </#if>
+                        <#if detectinfo.detectState == 36>
+                            <span class="c-success">维修完成</span>
+                        </#if>
+                        <#if detectinfo.detectState == 37>
+                            机器无故障,原机退回
+                        </#if>
+                        <#if detectinfo.detectState == 38>
+                            机器故障,待用户确认
+                        </#if>
+                        <#if detectinfo.detectState == 20>
+                            待翻新入库
+                        </#if>
+                        <#if detectinfo.detectState == 21>
+                        <span class="c-success">已翻新入库</span>
+                        </#if>
+                        <#if detectinfo.detectState == 22>
+                            不能翻新,待报废
+                        </#if>
+                        <#if detectinfo.detectState == 23>
+                            <span class="c-success">已报废回收</span>
+                        </#if>
+                </span></td>
+                <td width="10"></td>
+                <th width="10">维修报价:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.detectOffer??>${detectinfo.detectOffer/100}<#else>-</#if></span></td>
+            </tr>
+            <tr>
+                <th width="10">生产月份:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectProduction!''}</span></td>
+                <td width="10"></td>
+                <th width="10">机身条码:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectFuselageBarcode!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">厚膜类型:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if detectinfo.detectFilmType??>
+                    <#if detectinfo.detectFilmType == 1>
+                        圆
+                    <#elseif detectinfo.detectFilmType == 2>
+                        扁
+                    </#if>
+                </#if>
+                </span></td>
+                <td width="10"></td>
+                <th width="10">浮子类型:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if detectinfo.detectFloatType??>
+                    <#if detectinfo.detectFloatType == 1>
+                        长
+                    <#elseif detectinfo.detectFloatType == 2>
+                        短
+                    </#if>
+                </#if>
+                </span></td>
+            </tr>
+            <tr>
+                <th width="10">版本号:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectVersionNumber!''}</span></td>
+                <td width="10"></td>
+                <th width="10">是否翻新机:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if detectinfo.detectIsRefurbishing??>
+                    <#if detectinfo.detectIsRefurbishing == 1>
+                        是
+                    <#elseif detectinfo.detectIsRefurbishing == 2>
+                        否
+                    </#if>
+                </#if>
+                </span></td>
+            </tr>
+            <tr>
+                <th width="10">QC检测结果:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if detectinfo.maintenanceResults??>
+                    <#if detectinfo.maintenanceResults == 1>
+                        通过
+                    <#elseif detectinfo.maintenanceResults == 2>
+                        不通过
+                    </#if>
+                </#if></span></td>
+                <td width="10"></td>
+                <th width="10">检测日期:</th>
+                <td width="10" style="font-weight: normal;"><span>${(detectinfo.detectDate?string("yyyy-MM-dd"))!''}</span></td>
+            </tr>
+            </thead>
+        </table>
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">
+                    客诉信息
+                </div>
+            </label>
+            <div class="formControls col-10 col-sm-10">
+            </div>
+        </div>
+        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+            <thead>
+            <tr>
+                <th width="10">客诉处理:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.customerId??>${detectinfo.procTypeName!''}-${detectinfo.procMethodName!''}</#if></span></td>
+                <td width="10"></td>
+                <th width="10">客诉描述:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.questionTitle!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">客服备注:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectCustomerDesc!''}</span></td>
+                <td width="10"></td>
+                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span></span></td>
+            </tr>
+            </thead>
+        </table>
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">
+                    检测信息
+                </div>
+            </label>
+            <div class="formControls col-10 col-sm-10">
+            </div>
+        </div>
+        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+            <thead>
+            <tr>
+                <th width="10">检测现象:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectPhenomenon!''}</span></td>
+                <td width="10"></td>
+                <th width="10">故障分类:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectClassification!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">故障原因:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectFailureCause!''}</span></td>
+                <td width="10"></td>
+                <th width="10">判定结果:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectResults!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">故障指向:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectPoint!''}</span></td>
+                <td width="10"></td>
+                <th width="10">原因分析:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectNalysis!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">维修记录:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectContent!''}</span></td>
+                <td width="10"></td>
+                <th width="10">备注:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.detectDesc!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">维修图片:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if (imgList?size > 0)>
+                    <#list imgList as img>
+                        <img  src="${img.detectImgUrl!''}"  width="90" height="80">
+                    </div>
+                    </#list>
+                </#if>
+                </span></td>
+                <td width="10"></td>
+                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span></span></td>
+            </tr>
+            </thead>
+        </table>
+
+
+         <#--<button type="button" style="cursor:pointer;height: 35px;margin-top: 10px;"onClick="" class="my-btn-search"><<返回</button>-->
+    </form>
+    </div>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
+<script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
+<script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
+<script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.js"></script>
+<script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.parse.js"></script>
+<script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
+<script type="text/javascript">
+    $(function(){
+        $('.skin-minimal input').iCheck({
+            checkboxClass: 'icheckbox-blue',
+            radioClass: 'iradio-blue',
+            increaseArea: '20%'
+        });
+        $("#province").ProvinceCity();
+        $('.skin-minimal input').iCheck({
+            checkboxClass: 'icheckbox-blue',
+            radioClass: 'iradio-blue',
+            increaseArea: '20%'
+        });
+        $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
+            console.log($(this)[0].value);
+            //		$("#city2").click()
+        },
+            attachObject:'#suggest'
+        });
+    });
+    /*查看物流*/
+    function openLogistics(title, url, w, h) {
+        layer_show(title,url,w,h);
+    }
+
+</script>
+</body>
+</html>

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

@@ -98,6 +98,7 @@
 
             </select>
             <input class="my-input" style="width: 70px;height: 29px;" type="text" name="customerId" value="${customerId!}" placeholder="客诉编号"/>
+            <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectNumber" value="${detectNumber!}" placeholder="维修编号"/>
             <input class="my-input" style="width: 70px;height: 29px;" type="text" name="questionTitle" value="${questionTitle!}" placeholder="客诉问题"/>
             <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectPhenomenon" value="${detectPhenomenon!}" placeholder="工厂检测现象"/>
             <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectFailureCause" value="${detectFailureCause!}" placeholder="故障原因"/>
@@ -169,7 +170,7 @@
                             待用户确认
                         </#if>
                         <#if detect.detectState == 31>
-                            <span class="c-red">待维修</span>
+                            <span class="c-red">待维修(${detect.completeCutTime?string("yyyy/MM/dd")}前完成)</span>
                         </#if>
                         <#if detect.detectState == 32>
                             <span class="c-success">维修完成</span>
@@ -181,7 +182,7 @@
                             待客服确认维修
                         </#if>
                         <#if detect.detectState == 35>
-                            <span class="c-red">待维修</span>
+                            <span class="c-red">待维修(${detect.completeCutTime?string("yyyy/MM/dd")}前完成)</span>
                         </#if>
                         <#if detect.detectState == 36>
                             <span class="c-success">维修完成</span>
@@ -243,9 +244,19 @@
                            onclick="add_remark('维修记录','${path}/admin/detect/to_add_content?detectId=${detect.detectId!''}','570','450');">
                             <i class="Hui-iconfont">维修记录</i>
                         </a><br>
-                        <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>
+                        <#if detect.detectState == 32 || detect.detectState == 36>
+                            <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>
+                        <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>
+                        <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>
                         <#--<a style="text-decoration:none" href="javascript:;" title="删除"
                            onclick="detele(${detect.detectId!''});">
@@ -279,13 +290,14 @@
                             </#if>
                             <#if detect.detectState == 31>
                                 <a style="text-decoration:none" href="javascript:;" title="维修完成"
-                                   onclick="updateState('${detect.detectId!''}','32');">
+                                   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="updateState('${detect.detectId!''}','36');">
+                                   onclick="add_remark('维修完成','${path}/admin/detect/to_complete?detectId=${detect.detectId!''}&detectState=36','570','450');">
                                     <i class="Hui-iconfont">维修完成</i><br>
                                 </a>
                             </#if>
@@ -527,6 +539,10 @@
     function update_info(title,url,w,h){
         layer_show(title,url,w,h);
     }
+    /*详情*/
+    function detail(url){
+        location.href = url;
+    }
     /**
      * 进入查询问题描述信息页面
      */

+ 294 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_detect.ftl

@@ -0,0 +1,294 @@
+<!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">
+    <title>修改检测内容</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 65%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 130px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px auto 0 auto;display: block;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px; -webkit-appearance:none;appearance:none;background: url(/common/images/pts/select-11.png) right center no-repeat;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .huanhang{ float:left}
+        .check-box, .radio-box{padding-left: 0;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <#--<div class="input-box">
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;"><span class="c-red">*</span>是否故障:</label>
+            <div class=" col-xs-9 col-sm-9 huanhang" >
+                <div class="radio-box">
+                    <input type="radio" id="radio-3" name="isMaintenance" value="2" checked
+                          <#if detectInfo.isMaintenance??><#if detectInfo.isMaintenance == 2>checked</#if></#if>/><label for="radio-3">无故障</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="radio-4" name="isMaintenance" value="1"
+                    <#if detectInfo.isMaintenance??><#if detectInfo.isMaintenance == 1>checked</#if></#if>/><label for="radio-4">有故障</label>
+                </div>
+            </div>
+        </div>-->
+        <div class="input-box" style="margin-top: 20px;">
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>是否可翻新:</label>
+            <div class=" col-xs-9 col-sm-9  huanhang" >
+                <div class="radio-box" style="margin: 10px 0px;">
+                    <input type="radio" id="radio-7" name="detectRenovation" value="1"  checked
+                          <#if detectInfo.detectRenovation??><#if detectInfo.detectRenovation == 1>checked</#if></#if>/><label for="radio-7">可翻新</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="radio-8" name="detectRenovation" value="2"
+                    <#if detectInfo.detectRenovation??><#if detectInfo.detectRenovation == 2>checked</#if></#if>/><label for="radio-8">不可翻新</label>
+                </div>
+            </div>
+        </div>
+        <div class="input-box" style="margin-top: 20px;">
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">厚膜类型:</label>
+            <div class=" col-xs-9 col-sm-9  huanhang" >
+                <div class="radio-box" style="margin: 10px 0px;">
+                    <input type="radio" id="radio-9" name="detectFilmType" value="1"  checked
+                          <#if detectInfo.detectFilmType??><#if detectInfo.detectFilmType == 1>checked</#if></#if>/><label for="radio-9">圆</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="radio-10" name="detectFilmType" value="2"
+                    <#if detectInfo.detectFilmType??><#if detectInfo.detectFilmType == 2>checked</#if></#if>/><label for="radio-10">扁</label>
+                </div>
+            </div>
+        </div>
+        <div class="input-box" style="margin-top: 20px;">
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">浮子类型:</label>
+            <div class=" col-xs-9 col-sm-9  huanhang" >
+                <div class="radio-box" style="margin: 10px 0px;">
+                    <input type="radio" id="radio-11" name="detectFloatType" value="1"  checked
+                          <#if detectInfo.detectFloatType??><#if detectInfo.detectFloatType == 1>checked</#if></#if>/><label for="radio-11">长</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="radio-12" name="detectFloatType" value="2"
+                    <#if detectInfo.detectFloatType??><#if detectInfo.detectFloatType == 2>checked</#if></#if>/><label for="radio-12">短</label>
+                </div>
+            </div>
+        </div>
+        <div class="input-box" style="margin-top: 20px;">
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">是否翻新机:</label>
+            <div class=" col-xs-9 col-sm-9  huanhang" >
+                <div class="radio-box" style="margin: 10px 0px;">
+                    <input type="radio" id="radio-13" name="detectIsRefurbishing" value="1"  checked
+                          <#if detectInfo.detectIsRefurbishing??><#if detectInfo.detectIsRefurbishing == 1>checked</#if></#if>/><label for="radio-13">是</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="radio-14" name="detectIsRefurbishing" value="2"
+                    <#if detectInfo.detectIsRefurbishing??><#if detectInfo.detectIsRefurbishing == 2>checked</#if></#if>/><label for="radio-14">否</label>
+                </div>
+            </div>
+        </div>
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">生产月份:</label>
+            <div class="formControls col-9 col-sm-9  skin-minimal huanhang" style="margin: 10px 0px">
+                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectProduction!''}" name="detectProduction" id="detectProduction" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M',dateFmt: 'yyyy-MM'})" placeholder="请选择月份" readonly="readonly"/>
+            </div>
+        </div>
+        <div class="input-box" >
+            <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;">
+                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectFuselageBarcode!''}" name="detectFuselageBarcode" id="detectFuselageBarcode"  placeholder="请输入机身条码"/>
+            </div>
+        </div>
+        <div class="input-box" >
+            <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;">
+                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectVersionNumber!''}" name="detectVersionNumber" id="detectVersionNumber"  placeholder="请输入版本号"/>
+            </div>
+        </div>
+       <div class="input-box" >
+            <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;">故障分类:</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;">故障原因:</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;">判定结果:</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;">故障指向:</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;">原因分析:</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;">检测内容:</label>
+            <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectContent" id="detectContent" class="my-textarea" placeholder="请输入检测内容">${detectInfo.detectContent!''}</textarea>&ndash;&gt;
+                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectContent!''}" name="detectContent" id="detectContent"  placeholder="请输入检测内容"/>
+
+            </div>
+        </div>-->
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">维修报价:</label>
+            <div class="formControls col-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
+                <input class="my-input" style="width: 90%;" type="text" value="<#if detectInfo.detectOffer??>${detectInfo.detectOffer/100}</#if>" name="detect_Offer" id="detect_Offer"  placeholder="请输入维修报价" oninput = "value=value.replace(/[^\d]/g,'')"/>
+                <input type="hidden" name="detectOffer" id="detectOffer" value="">
+            </div>
+        </div>
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>检测日期:</label>
+            <div class="formControls col-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
+                <input class="my-input" style="width: 90%;" type="text" value="<#if detectInfo.detectDate??>${detectInfo.detectDate?string("yyyy-MM-dd")!''}</#if>" name="detect_date" id="detectDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择检测日期" readonly="readonly"/>
+            </div>
+        </div>
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;">备注信息:</label>
+            <div class="col-xs-9 col-sm-9 skin-minimal">
+                <div class="radio-box" style="padding: 0px; width: 100%;">
+                    <textarea style="height: 60px;margin: 10px 0px 10px 0px;width: 85%;" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请填写寄出订单备注信息!">${detectInfo.detectDesc!''}</textarea>
+                </div>
+            </div>
+        </div>
+
+        <#--<div class="row cl">
+            <label class="form-label col-xs-3 col-sm-3 huanhang" style="text-align: right;">添加附件:</label>
+            <div class="formControls col-xs-2 col-sm-2" id="fileDiv" style="width: 17%;width: 100px;height: 100px;margin-left: 8px;">
+                <input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 80px;height: 80px;">
+                <img alt="介绍图" src="${path}/common/images/pts/addparts.jpg"  id="partsImg" width="80" height="80">
+            &lt;#&ndash;<input type="hidden" id="componentsImg" name="componentsImg" value=""/>&ndash;&gt;
+            &lt;#&ndash;<button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="uploadSubmit"><i class="Hui-iconfont">&#xe665;</i> 上传</button>&ndash;&gt;
+            </div>
+            <div id="imgDiv">
+                <#if (imgList?size > 0)>
+                    <#list imgList as img>
+                <div class="col-xs-8 col-sm-8" onclick="deleteImg(this);" style="width: 17%;width: 100px;height: 100px;">
+                    <img  src="${img.detectImgUrl!''}"  width="90" height="80">
+                    <input type="hidden"  name="componentsImg" value="${img.detectImgUrl!''}"/>
+                    </div>
+                    </#list>
+                </#if>
+            </div>
+        </div>-->
+
+        <div>
+            <input type="hidden" value="${detectInfo.detectId!''}" id="detectId" name="detectId">
+            <input type="hidden" value="${detectInfo.customerId!''}" id="customerId" name="customerId">
+           <button type="button" class="my-btn-submit" onclick="add();">确认修改</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
+<script type="text/javascript">
+    /*初始化单选框样式*/
+    $(function(){
+        $('.skin-minimal input').iCheck({
+            checkboxClass: 'icheckbox-blue',
+            radioClass: 'iradio-blue',
+            increaseArea: '20%'
+        });
+    });
+    /***
+     * 删除图片
+     */
+    function deleteImg(obj){
+        layer.confirm("确认要删除该图片吗", { title: "确认" }, function (index) {
+            layer.close(index);
+            obj.remove();
+        });
+    }
+
+    $('#fileid').change(function() {
+        fileUpload();
+    });
+
+    function fileUpload() {
+        $.ajaxFileUpload({
+            url:"${path}/admin/machineParts/fileUpload",
+            secureuri:false,
+            fileElementId:"fileid",//文件选择框的id属性
+            dataType: 'json',   //json
+            success: function (data) {
+                if(data.returnCode == 200){
+                    /*<input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 90px;height: 80px;">*/
+                    $("#imgDiv").append('<div class="col-xs-8 col-sm-8" onclick="deleteImg(this);" style="width: 17%;width: 100px;height: 100px;">'
+                            +'<img  src="'+root_path+data.returnMsg.imgUrl+'"  width="90" height="80">'
+                            +'<input type="hidden"  name="componentsImg" value="'+data.returnMsg.imgUrl+'"/>'
+                            +'</div>');
+                }else{
+                    layer.msg('上传失败,请重试!',{icon: 5,time:2000});
+                }
+            }
+        });
+        $('#fileid').change(function() {
+            fileUpload();
+        });
+    }
+
+    function  add() {
+
+
+        var detect_Offer = $("#detect_Offer").val();
+        if(detect_Offer != null && detect_Offer != ""){
+            $("#detectOffer").val(detect_Offer * 100)
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/update",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('操作成功',{icon: 1,time:1000},function () {
+                        history.back(-1);
+                    });
+                } else {
+                    layer.msg('操作失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('操作错误',{icon: 5,time:1000});
+            }
+        });
+    }
+</script>
+</body>
+</html>

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

@@ -81,7 +81,7 @@
                 <th width="100">产品69码</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>
             </tr>

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

@@ -48,11 +48,11 @@
                 <strong>质量类型</strong>
                 <div class="radio-box">
                     <input type="radio" id="tel-b1" name="qualityType" checked value="1">
-                    <label for="tel-b1">良品</label>
+                    <label for="tel-b1">正常机器</label>
                 </div>
                 <div class="radio-box">
                     <input type="radio" id="tel-b2" name="qualityType" value="2">
-                    <label for="tel-b2">不良品</label>
+                    <label for="tel-b2">维修机器</label>
                 </div>
             </div>
         </div>

+ 35 - 8
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/complete_signclosed.ftl

@@ -129,8 +129,20 @@
                     <input type="text" value="${complaintSignclosedInfo.signclosedSendTel!''}" class="input-text" placeholder="寄件方联系电话" id="signclosedSendTel" name="signclosedSendTel">
                 </div>
             </div>
-
-            <div class="row cl address_info" style="position: relative;">
+            <div class="row cl">
+                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄回区域:</label>
+                <div class="formControls col-8 col-sm-8">
+                    <div class="radio-box">
+                        <input type="radio" id="tel-s1" name="sendArea" checked value="1">
+                        <label for="tel-s1">有寄回区域</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-s2" name="sendArea" value="2">
+                        <label for="tel-s2">无寄回区域</label>
+                    </div>
+                </div>
+            </div>
+            <div class="row cl address_info" style="position: relative;" id="addrs">
                 <label class="form-label col-3 col-sm-3"></label>
                 <div class="formControls col-2 col-sm-2" style="">
                     <span class="select-box">
@@ -212,6 +224,13 @@
         });
     });
 
+    $("#tel-s1").click(function (){
+            $("#addrs").show();
+    });
+    $("#tel-s2").click(function (){
+            $("#addrs").hide();
+    });
+
     /***
      * 删除图片
      */
@@ -386,12 +405,20 @@
             }
         }
         //设置省市县
-        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 sendArea = $('input[name="sendArea"]:checked').val();//是否有寄回区域
+        if(sendArea === "1"){
+            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);
+        }else{
+            $("#signclosedAddrProvinces").val("");
+            $("#signclosedAddrCity").val("");
+            $("#signclosedAddrArea").val("");
+        }
+
 
         //选择产品
         var flag = false;

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

@@ -134,7 +134,7 @@
                             <#elseif signclosed.signclosedLogistics == "longbanwuliu">
                                 龙邦快递
                             </#if>-->
-                        ${signclosed.signclosedLogistics!}
+                        ${signclosed.signclosedLogisticsName!}
                             -
                         </#if>
                     ${signclosed.signclosedLogisticsNumber!}</td>

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

@@ -184,7 +184,7 @@
                             </div>
                         </div>
                     </div>
-
+                    <input type="hidden" value="${companyId!''}" id="companyId" name="companyId">
                     <div id="store-select-1"  style="width: 100%;float: left;">
                         <label>
                             <select class="my-select" name="shop-id" id="shop-id" style="height: 30px;width: 180px;margin: 0px;">
@@ -447,7 +447,8 @@
         var index = layer.load(1, {
             shade: [0.5,'#fff'] //0.1透明度的白色背景
         });
-        $.post(root_path + "/admin/order/get_producttype_store",{"orderStoreInfo":orderStoreInfo, "productUrl":$("#productUrl").val()},function(result){
+        var companyId = $("#companyId").val();
+        $.post(root_path + "/admin/order/get_producttype_store",{"orderStoreInfo":orderStoreInfo, "productUrl":$("#productUrl").val(), "companyId":companyId},function(result){
             if (result.returnCode != 200) {
                 layer.msg('加载失败,请重试!',{icon: 5,time:3000});
             } else {

+ 332 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_sdorder.ftl

@@ -0,0 +1,332 @@
+<!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;color: #50a2ea;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 45%;height: 6px;width: 6px;border-radius: 6px;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: 15px;}
+        .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: #f00;}
+    </style>
+    <title>添加订单 - 订单管理 - RST</title>
+</head>
+<body>
+<nav 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"
+       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <a class="btn radius r"
+       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
+</nav>
+<article class="page-container" style="padding: 10px;">
+    <div class="pd-20 cl">
+        <form action="${path}/admin/salesOrder/add_salesOrder" method="post" class="form form-horizontal" id="form-order-add"  onkeydown="if(event.keyCode==13)return false;">
+
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">订单基本信息</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
+
+            <div class="row cl" style="">
+                <label class="form-label col-1 col-sm-1">订单类型:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesOrderStatus" name="salesOrderStatus" >
+                            <option value="1" >正常订单</option>
+                            <#if admin.adminDept == 3 || admin.adminDept == 1><option value="2" >售后订单</option></#if>
+                        </select>
+				    </span>
+                </div>
+            </div>
+            <div class="row cl" id="salesCustomer" style="display: none;">
+                <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-2 col-sm-2" style="margin-left: 11.3%;width: 100%;color: #c00;">
+                    <div class="formControls col-1 col-sm-1" id="selectCustomer" style="display: none;">
+                        <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn" onclick="add_customer()" value="选择客诉">
+                    </div>
+                    <span id="salesCustomerIdHtml"></span>
+                    <input type="hidden" id="salesCustomerId" name="salesCustomerId" value="">
+                </div>
+            </div>
+
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1">批次编号:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesBatchId" name="salesBatchId" >
+                            <option value="1" >新增批次</option>
+                            <#list orderBatchs as orderBatch>
+                                <option value="${orderBatch.batchId}" >${orderBatch.batchId}</option>
+                            </#list>
+                        </select>
+				    </span>
+                </div>
+            </div>
+
+                <div class="row cl sales_channel" id="" style="">
+                    <label class="form-label col-1 col-sm-1">销售渠道:</label>
+                    <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select init_company" name="salesCompanyId" id="salesCompanyId" defValue="">
+                            <option value="4">上朵</option>
+                        </select>
+                        <input type="hidden" class="init_typeCompanyId" id="init_typeCompanyId" value="4" name="init_typeCompanyId">
+				    </span>
+                    </div>
+                    <#--<div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                        <select  class="select init_store"  name="salesStoreId" id="">
+                        </select>
+                    </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"  />
+                            <datalist class="select init_store" id="datalist_1">
+                            <#list storeInfoList as storeInfo>
+                                <option value="${storeInfo.storeName}" data-id="${storeInfo.storeId}" >${storeInfo.storeName}</option>
+                            </#list>
+                            </datalist>
+                            <input type="hidden" id="salesStoreId" name="salesStoreId">
+                    </div>
+                </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">用户信息:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="salesAddressName" name="salesAddressName" datatype="*1-16" errormsg="联系人格式不正确!" >
+                </div>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="salesAddressTel" name="salesAddressTel" datatype="*1-20" errormsg="联系人电话格式不正确!">
+                </div>
+            </div>
+
+          <div class="row cl address_info" id="" style="">
+                <label class="form-label col-1 col-sm-1">地址信息:</label>
+                <div class="formControls col-2 col-sm-2" >
+                    <span class="select-box">
+                        <select class="select init_province" id="addressProvince"  >
+                        </select>
+				    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                        <select  class="select init_city" id="addressCity"   >
+                        </select>
+                    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                        <select  class="select init_country" id="addressCountry" >
+                        </select>
+				    </span>
+                </div>
+            </div>
+
+            <div class="row cl" id="recipientAddressText" style="">
+                <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-6 col-sm-6">
+                    <textarea name="addressDesc" style="height: 50px;" id="addressDesc" cols="" rows="2" datatype="*" errormsg="收货地址不正确!" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)"></textarea>
+                    <span id="addrssMsg"></span>
+                </div>
+                <input type="hidden" name="salesAddressInfo" id="salesAddressInfo" value="">
+            </div>
+
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">支付时间:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" placeholder="购买日期" id="salesPayTime"  name="payTime" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate: '%y-%M-%d'})"  readonly="readonly">
+                </div>
+                <label class="form-label col-2 col-sm-2">支付方式:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesPayType" name="salesPayType">
+                            <#--1:微信支付 2:现金支付3:已支付定金¥99 4:刷卡支付 5:支付宝支付-->
+                            <option value="1">微信支付</option>
+                            <option value="2">现金支付</option>
+                            <option value="4">刷卡支付</option>
+                            <option value="5">支付宝支付</option>
+                        </select>
+				    </span>
+                </div>
+            </div>
+
+
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">产品信息</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">产品信息:</label>
+                <div class="formControls col-8 col-sm-8">
+                    <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="add_sdproduct()" value="添加产品" >
+                    <table class="table table-border table-bg table-bordered" style="margin-top: 10px;display: none" id="all_add_product">
+                        <thead>
+                            <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">数量</th>
+                                <th style="text-align: center;" width="10">操作</th>
+                            </tr>
+                        </thead>
+                        <tbody id="add_product">
+                        </tbody>
+                    </table>
+                    <input type="hidden" id="orderItemString" name="orderItemString" value="" >
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">总金额:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" class="input-text" value="" placeholder="总金额" datatype="*" errormsg="必须要输入总金额!" id="salesAmount" name="salesAmount"  >
+                </div>
+                <label class="form-label col-2 col-sm-2">实付金额:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" class="input-text" value="0" placeholder="实付金额" datatype="*" errormsg="必须要输入总金额!" id="salesPayMoney" name="salesPayMoney"  >
+                </div>
+                <div class="formControls col-2 col-sm-2" style="display: none">
+                    <input type="text" class="input-text" value="0" placeholder="优惠金额" datatype="*" errormsg="必须要输入总金额!" id="salesDiscountMoney" name="salesDiscountMoney"  >
+                </div>
+
+                <div class="formControls col-2 col-sm-2">
+                    <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="calculatePrice()" value="计算产品总价" >
+                </div>
+            </div>
+
+            <input type="hidden" class="input-text" value="0" placeholder="待付金额" id="salesWaitMoney" name="salesWaitMoney"  >
+            <input type="hidden" class="input-text" value="0" placeholder="本次支付金额" id="salesLastMoney" name="salesLastMoney"  >
+            <input type="hidden" class="input-text" value="0" placeholder="邮费" id="salesShippingFee" name="salesShippingFee"  >
+
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">备注信息</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">用户备注:</label>
+                <div class="formControls col-6 col-sm-6">
+                    <textarea name="salesUserRemark" id="salesUserRemark" cols="" rows="2"  class="textarea" placeholder="请填写用户备注,最多支持100字符" onKeyUp="$.Huitextarealength(this,100)"></textarea>
+                    <#--<span id="addrssMsg"></span>-->
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">后台备注:</label>
+                <div class="formControls col-6 col-sm-6">
+                    <textarea name="salesAdminRemark" id="salesAdminRemark" cols="" rows="2" class="textarea" placeholder="请填写后台备注,最多支持100字符" onKeyUp="$.Huitextarealength(this,100)"></textarea>
+                    <#--<span id="addrssMsg"></span>-->
+                </div>
+            </div>
+
+            <div class="row cl">
+                <div class="col-2 col-sm-2 col-offset-3">
+                    <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
+                </div>
+            </div>
+        </form>
+    </div>
+</article>
+
+<script type="text/javascript">
+    var url_path = "${path}";
+</script>
+<#--时间控件-->
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+
+
+
+<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({
+        checkboxClass: 'icheckbox-blue',
+        radioClass: 'iradio-blue',
+        increaseArea: '20%'
+    });
+    var ulc = initAddress($(".address_info"));
+    /*var sc = $(".sales_channel").initSalesChannel();*/
+    
+    $(function () {
+       if(isEmpty(salesCustomerId)){
+           setSelectCustomer(salesCustomerId);
+       }
+    })
+
+    $("#store_1").on("input",function(){
+        var $options=$("#datalist_1").children();
+
+        for(var i=0;i<$options.length;i++){
+            if($options.eq(i).val().trim()==$("#store_1").val().trim()){
+                $("#salesStoreId").val($options.eq(i).attr("data-id"));
+                break;
+            }else{
+                $("#salesStoreId").val("");
+            }
+        }
+    });
+
+    /*如果修改信息时匹配地址出现失败,由此标识提醒一次,添加订单不需要次标识*/
+    var isNameCorrect = true;
+
+</script>
+
+
+<script type="text/javascript" charset="utf-8" src="${path}/common/js/salesOrder/salesOrder.js"></script>
+
+
+</body>
+</html>

+ 153 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/delete_order.ftl

@@ -0,0 +1,153 @@
+<!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;color: #50a2ea;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 45%;height: 6px;width: 6px;border-radius: 6px;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: 15px;}
+        .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: #f00;}
+    </style>
+    <title>添加订单 - 订单管理 - RST</title>
+</head>
+<body>
+<nav 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"
+       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <a class="btn radius r"
+       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
+</nav>
+<article class="page-container" style="padding: 10px;">
+    <div class="pd-20 cl">
+        <form action="" method="post" class="form form-horizontal" id="form-order-add"  onkeydown="if(event.keyCode==13)return false;">
+
+            <div class="row cl">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong>id类型:</strong>
+                </div>
+                <div class="formControls col-5 col-sm-5">
+                    <div class="radio-box">
+                        <input type="radio" id="tel-666" name="type" checked value="1">
+                        <label for="tel-666">订单id</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-777" name="type" value="2">
+                        <label for="tel-777">批次号</label>
+                    </div>
+
+                    <div class="radio-box">
+                        <input type="radio" id="tel-888" name="type" value="3">
+                        <label for="tel-888">订单号</label>
+                    </div>
+
+                    <div class="radio-box">
+                        <input type="radio" id="tel-999" name="type" value="4">
+                        <label for="tel-999">交易号</label>
+                    </div>
+                </div>
+            </div>
+            <div class="row cl">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong>ID:</strong>
+                </div>
+                <div class="formControls col-5 col-sm-5">
+                    <input type="text" class="input-text"  id="salesid" name="salesid">
+                </div>
+            </div>
+            <div class="row cl">
+                <div class="formControls col-2 col-sm-2 text-r">
+                    <strong></strong>
+                </div>
+                <div class="formControls col-5 col-sm-5">
+                    <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" onclick="addInformationInfo();" name="">确认删除</button>
+                </div>
+
+            </div>
+            <div class="row cl">
+                <div class="formControls col-5 col-sm-5">
+                    <span id="spanid"></span>
+                </div>
+
+            </div>
+        </form>
+    </div>
+</article>
+
+<script type="text/javascript">
+    var url_path = "${path}";
+</script>
+<#--时间控件-->
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+
+
+
+<script type="text/javascript">
+    /*添加收费信息*/
+    function addInformationInfo() {
+        var id = $("#salesid").val();
+        var type = parseInt($("input[name='type']:checked").val());
+        if(id == null || id == ""){
+            layer.msg("请输入ID!",{icon: 5,time:1000});
+            return;
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"id" : id,
+                "type" : type},
+            url: "${path}/admin/salesOrder/adminDetectOrder",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg("添加成功!",{icon: 1,time:1000});
+                    $("#spanid").html(data.resultMsg);
+                } else {
+                    layer.msg("添加失败!",{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                window.parent.admin_result("添加失败!",5);
+            }
+        })
+    }
+
+</script>
+
+
+<script type="text/javascript" charset="utf-8" src="${path}/common/js/salesOrder/salesOrder.js"></script>
+
+
+</body>
+</html>

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

@@ -86,7 +86,6 @@
                     </tbody>
                 </table>
             </div>
-
         </form>
     </div>
 </article>

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

@@ -91,7 +91,7 @@
                          <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name="">搜索</button>
                      </div>
                 </div>
-
+                <input type="hidden" class="input-text" value="${typeCompany!''}"  id="typeCompany" name="typeCompany"  >
             </form>
         </div>
 
@@ -162,6 +162,7 @@
         var colorName = cufte($("#colorName").val());
         var colorBar = cufte($("#colorBar").val());
         var productType = cufte($("#productType").val());
+        var typeCompany = cufte($("#typeCompany").val());
 
         $.ajax({
             type: "POST",
@@ -169,7 +170,8 @@
                 productName : productName,
                 colorName : colorName,
                 colorBar : colorBar,
-                productType : productType
+                productType : productType,
+                typeCompany : typeCompany
             },
             url: "${path}/admin/product/get_product",
             success: function(data){

Plik diff jest za duży
+ 922 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_sdorder_list.ftl


+ 3 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/statistics/deliver_statistics.ftl

@@ -89,7 +89,7 @@
                     </tbody>
                 </table>
             </div>
-
+            <input type="hidden"  value="${salesCompanyId!''}" id="salesCompanyId" name="salesCompanyId">
         </form>
     </div>
 </article>
@@ -109,10 +109,11 @@
         loadIndex = layer.load(1, {
             shade: [0.5,'#fff'] //0.1透明度的白色背景
         });
+        var salesCompanyId = $("#salesCompanyId").val();
         $.ajax({
             type:'POST',
             url: '${path}/admin/await_send/getDeliverNum',
-            data:{},
+            data:{"salesCompanyId" : salesCompanyId},
             dataType: 'json',
             success:function(res) {
                 for(var i=0;i<res.returnMsg.allList.length;i++){

+ 4 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/statistics/sell_order_statistics.ftl

@@ -63,7 +63,7 @@
                     </tbody>
                 </table>
             </div>
-
+            <input type="hidden"  value="${salesCompanyId!''}" id="salesCompanyId" name="salesCompanyId">
         </form>
     </div>
 
@@ -100,6 +100,7 @@
     });
 
     function getOrderStatistics(){
+        var salesCompanyId = $("#salesCompanyId").val();
         var startDate =  $("#startDate").val();
         var endDate =  $("#endDate").val();
 
@@ -111,7 +112,8 @@
             url: '${path}/admin/salesOrderStat/sell_order_stat',
             data:{
                 startDate : startDate,
-                endDate : endDate
+                endDate : endDate,
+                salesCompanyId : salesCompanyId
             },
             dataType: 'json',
             success:function(res) {

+ 43 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/tooth_print_List.ftl

@@ -76,7 +76,7 @@
                     <td class="text-c" style="font-size: 24px" width="10">${list.machineBarcode?substring(list.machineBarcode?length-5) }</td>
                     <td class="text-c" width="10">${list.machineBarcode }</td>
                     <td class="text-c" width="6">
-                    ${list.produceName }/${list.producePattern }-${list.produceModel }
+                        ${list.produceName }/${list.producePattern }-${list.produceModel }
                     </td>
                     <td>${(list.machineCreateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
                     <!-- 遍历操作 -->
@@ -104,7 +104,7 @@
     <input type="hidden" value="" name="codeId" id="codeId">
     <div style="position: absolute;top: 80px;height: 23px;display:none;" id="bcTarget" class="barcodeImg"></div>
     <div>
-        <div id="printlist" style="margin-left: 31px;">
+        <div id="printlist" style="margin-left: 55px;">
         </div>
     </div>
 </div>
@@ -175,8 +175,8 @@
         var prints = "";
         var settingNumber = $("#settingNumber").val();
         var selectNum = $("#listid").find("input[name='checkbox']:checked").length;
-        if(selectNum > 50){
-            layer.msg('每次打印条数最多可支持50条', {icon: 2, time: 2000});
+        if(selectNum > 30){
+            layer.msg('每次打印条数最多可支持30条', {icon: 2, time: 2000});
             return;
         }
         $("input[name='checkbox']:checkbox:checked").each(function (index,element) {
@@ -187,14 +187,33 @@
             machineQrcode = $("#machineQrcode"+machineId).val();
             machineCreateTime = $("#machineCreateTime"+machineId).val();
             machineProduceType = $("#machineProduceType"+machineId).val();
+            var produce = getProduce(machineId);
+            var producePattern =  produce.producePattern;    //获取产品型号前两位
+            var produceModel =  produce.produceModel;        //获取产品型号后两位
+            var produceName = produce.produceName;            //获取产品名称
+            var produceBrand = produce.produceBrand;            //获取品牌字母
             /*if((index+1)%10 == 0){
                 num = parseInt(num) + 1;
-            }*/
-            $("#printlist").append('<div style="width: 158px;height: 188px;position: relative;/*position: relative;margin-bottom: 4px;*/"> ' +
+            }*//*
+
+            $("#printlist").append('<div style="width: 158px;height: 188px;position: relative;/!*position: relative;margin-bottom: 4px;*!/"> ' +
                     '<span style="position: absolute;margin-left: 26px;z-index: 99;margin-top: 15px;font-size: 16px;">产品唯一码</span>' +
                     '<img style="position: absolute; width: 130px;height: 128px;margin-top: 24px;" src="'+machineQrcode+'" />' +
                     '<span style="position: absolute;margin-left: 20px;margin-top: 133px;font-size: 16px;">'+machineCreateTime+'</span>' +
-                    '</div>');
+                    '</div>');*/
+            if(produceName === "上朵Lips系列便携声波牙刷(贝母白)" ||produceName === "上朵Lips系列便携声波牙刷(樱花粉)" ||produceName === "上朵Lips系列便携声波牙刷(幻影黑)"){
+                $("#printlist").append('<div style="width: 160px;height: 151px;position: relative;"> ' +
+                        '<span style="position: absolute;margin-left: 15px;z-index: 99;font-size: 16px;margin-top: 2px;">产品唯一码</span>' +
+                        '<img style="position: absolute; width: 110px;height: 110px;margin-top: 12px;" src="'+machineQrcode+'" />' +
+                        '</div>');
+            }else{
+                $("#printlist").append('<div style="width: 158px;height: 188px;position: relative;"> ' +
+                        '<span style="position: absolute;margin-left: 26px;z-index: 99;margin-top: 15px;font-size: 16px;">产品唯一码</span>' +
+                        '<img style="position: absolute; width: 130px;height: 128px;margin-top: 24px;" src="'+machineQrcode+'" />' +
+                        '<span style="position: absolute;margin-left: 20px;margin-top: 133px;font-size: 16px;">'+machineCreateTime+'</span>' +
+                        '</div>');
+            }
+
 
             if(${machineIsPrint} == '1')
             {
@@ -317,11 +336,23 @@
         var machineCreateTime = $("#machineCreateTime"+machineId).val();
         var  machineBarcode = barCode;
         var machineQrcode = $("#machineQrcode"+machineId).val();
-        $("#printlist").append('<div style="width: 158px;height: 188px;position: relative;/*position: relative;margin-bottom: 4px;*/"> ' +
-                '<span style="position: absolute;margin-left: 26px;z-index: 99;margin-top: 15px;font-size: 16px;">产品唯一码</span>' +
-                '<img style="position: absolute; width: 130px;height: 128px;margin-top: 24px;" src="'+machineQrcode+'" />' +
-                '<span style="position: absolute;margin-left: 20px;margin-top: 133px;font-size: 16px;">'+machineCreateTime+'</span>' +
-                '</div>');
+        var produce = getProduce(machineId);
+        var producePattern =  produce.producePattern;    //获取产品型号前两位
+        var produceModel =  produce.produceModel;        //获取产品型号后两位
+        var produceName = produce.produceName;            //获取产品名称
+        var produceBrand = produce.produceBrand;            //获取品牌字母
+        if(produceName === "上朵Lips系列便携声波牙刷(贝母白)" || produceName === "上朵Lips系列便携声波牙刷(樱花粉)" || produceName === "上朵Lips系列便携声波牙刷(幻影黑)"){
+            $("#printlist").append('<div style="width: 160px;height: 154px;position: relative;"> ' +
+                    '<span style="position: absolute;margin-left: 15px;z-index: 99;font-size: 16px;margin-top: 2px;">产品唯一码</span>' +
+                    '<img style="position: absolute; width: 110px;height: 110px;margin-top: 12px;" src="'+machineQrcode+'" />' +
+                    '</div>');
+        }else{
+            $("#printlist").append('<div style="width: 158px;height: 188px;position: relative;"> ' +
+                    '<span style="position: absolute;margin-left: 26px;z-index: 99;margin-top: 15px;font-size: 16px;">产品唯一码</span>' +
+                    '<img style="position: absolute; width: 130px;height: 128px;margin-top: 24px;" src="'+machineQrcode+'" />' +
+                    '<span style="position: absolute;margin-left: 20px;margin-top: 133px;font-size: 16px;">'+machineCreateTime+'</span>' +
+                    '</div>');
+        }
         if(${machineIsPrint} == '1')
         {
             updatePrint(machineBarcode,false);

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

@@ -20,7 +20,8 @@
         initCompany:function(){
             var salesChannel = this;
             var $companyNode = $(this.options.companyNode);
-            $.get(root_path +"/admin/salesChannel/select_company", function(result){
+            var typeCompanyId = $("#init_typeCompanyId").val();
+            $.get(root_path +"/admin/salesChannel/select_company?companyId="+cufte(typeCompanyId), function(result){
                 if (result.returnCode == 200) {
                     $companyNode.empty();    //清空下拉框
                     $(result.returnMsg.companyInfoList).each(function (){

+ 6 - 0
watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

@@ -8,6 +8,12 @@ var allCustomerId = "";
 function add_product() {
     layer_show("商品列表",url_path + "/admin/salesOrder/to_add_product","1000","500");
 }
+/**
+ * 打开商品列表
+ */
+function add_sdproduct() {
+    layer_show("商品列表",url_path + "/admin/salesOrder/to_add_product?typeCompany=4","1000","500");
+}
 
 /**
  * 打开客诉列表