소스 검색

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

# Conflicts:
#	watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java
liujiankang 5 년 전
부모
커밋
215467632e
24개의 변경된 파일1057개의 추가작업 그리고 80개의 파일을 삭제
  1. 18 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SendbackInfo.java
  2. 67 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/CargoInfo.java
  3. 127 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/OrderStatisticsInfo.java
  4. 4 1
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/InventoryService.java
  5. 40 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java
  6. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/InventoryServiceImpl.java
  7. 50 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  8. 46 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java
  9. 145 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  10. 4 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/InventoryMapper.java
  11. 6 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/inventoryMapper.xml
  12. 4 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/ProductServiceImpl.java
  13. 79 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  14. 94 13
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  15. 2 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/product/AdminProductController.java
  16. 4 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  17. 40 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl
  18. 165 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_crgoInfo.ftl
  19. 126 19
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/dayDeliveryNum_list.ftl
  20. 1 37
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_detail.ftl
  21. 7 2
      watero-rst-web/src/main/webapp/WEB-INF/views/product/add_product.ftl
  22. 9 1
      watero-rst-web/src/main/webapp/WEB-INF/views/product/update_product.ftl
  23. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl
  24. 13 4
      watero-rst-web/src/main/webapp/common/js/product/product.js

+ 18 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SendbackInfo.java

@@ -27,6 +27,8 @@ public class SendbackInfo implements Serializable {
     private String sendbackLogisticsName;//物流公司名称
     private List<SendbackItem> listSendbackItem;
     private String sendProdcues;//寄回产品json
+    private Integer sendbackNoticeCustomer;//签收是否通知售前客服 1通知 2不通知
+    private Integer sendbackPresaleAdminId;//售前客服id
 
     public Integer getSendbackId() {
         return sendbackId;
@@ -131,4 +133,20 @@ public class SendbackInfo implements Serializable {
     public void setSendProdcues(String sendProdcues) {
         this.sendProdcues = sendProdcues;
     }
+
+    public Integer getSendbackNoticeCustomer() {
+        return sendbackNoticeCustomer;
+    }
+
+    public void setSendbackNoticeCustomer(Integer sendbackNoticeCustomer) {
+        this.sendbackNoticeCustomer = sendbackNoticeCustomer;
+    }
+
+    public Integer getSendbackPresaleAdminId() {
+        return sendbackPresaleAdminId;
+    }
+
+    public void setSendbackPresaleAdminId(Integer sendbackPresaleAdminId) {
+        this.sendbackPresaleAdminId = sendbackPresaleAdminId;
+    }
 }

+ 67 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/order/CargoInfo.java

@@ -0,0 +1,67 @@
+package com.iamberry.rst.core.order;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class CargoInfo implements Serializable{
+    private static final long serialVersionUID = -8192100706689063716L;
+    private Integer cargoId;
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+    private Date cargoDate;//拉货日期
+    private Integer cargoNum;//拉货数量
+    private String cargoLogisticsCode;//物流公司
+    private Date cargoCreateTime;
+    private Integer increaseDcrease;//增加或减少 1增加 2减少
+
+    public Integer getCargoId() {
+        return cargoId;
+    }
+
+    public void setCargoId(Integer cargoId) {
+        this.cargoId = cargoId;
+    }
+
+    public Date getCargoDate() {
+        return cargoDate;
+    }
+
+    public void setCargoDate(Date cargoDate) {
+        this.cargoDate = cargoDate;
+    }
+
+    public Integer getCargoNum() {
+        return cargoNum;
+    }
+
+    public void setCargoNum(Integer cargoNum) {
+        this.cargoNum = cargoNum;
+    }
+
+    public String getCargoLogisticsCode() {
+        return cargoLogisticsCode;
+    }
+
+    public void setCargoLogisticsCode(String cargoLogisticsCode) {
+        this.cargoLogisticsCode = cargoLogisticsCode;
+    }
+
+    public Date getCargoCreateTime() {
+        return cargoCreateTime;
+    }
+
+    public void setCargoCreateTime(Date cargoCreateTime) {
+        this.cargoCreateTime = cargoCreateTime;
+    }
+
+    public Integer getIncreaseDcrease() {
+        return increaseDcrease;
+    }
+
+    public void setIncreaseDcrease(Integer increaseDcrease) {
+        this.increaseDcrease = increaseDcrease;
+    }
+}

+ 127 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/order/OrderStatisticsInfo.java

@@ -0,0 +1,127 @@
+package com.iamberry.rst.core.order;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+public class OrderStatisticsInfo implements Serializable {
+    private static final long serialVersionUID = 4444467578878294772L;
+    private Date orderDate;//日期
+    private Integer distributionNum;//通知配货数量
+    private List<OrderStatisticsInfo> playSingleList;//打单数量
+    private List<OrderStatisticsInfo> outboundList;//出库数量
+    private List<CargoInfo> cargoList;//拉货数量
+    private List<OrderStatisticsInfo> distributionInvalidList;//通知配货后作废
+    private List<OrderStatisticsInfo> playSingleInvalidList;//打单后作废
+    private List<OrderStatisticsInfo> outboundInvalidNumList;//出库后作废
+
+    private Date startDate;//开始时间
+    private Date endDate;//结束时间
+    private Integer selectType;//1通知批货时间,2下单时间
+    private Integer invalidType;//作废类型 1通知配货后作废 2打单后作废 3出库后作废
+    private Integer warehouseId;//发货出库id
+
+    public Date getOrderDate() {
+        return orderDate;
+    }
+
+    public void setOrderDate(Date orderDate) {
+        this.orderDate = orderDate;
+    }
+
+    public Integer getDistributionNum() {
+        return distributionNum;
+    }
+
+    public void setDistributionNum(Integer distributionNum) {
+        this.distributionNum = distributionNum;
+    }
+
+    public List<OrderStatisticsInfo> getPlaySingleList() {
+        return playSingleList;
+    }
+
+    public void setPlaySingleList(List<OrderStatisticsInfo> playSingleList) {
+        this.playSingleList = playSingleList;
+    }
+
+    public List<OrderStatisticsInfo> getOutboundList() {
+        return outboundList;
+    }
+
+    public void setOutboundList(List<OrderStatisticsInfo> outboundList) {
+        this.outboundList = outboundList;
+    }
+
+    public List<CargoInfo> getCargoList() {
+        return cargoList;
+    }
+
+    public void setCargoList(List<CargoInfo> cargoList) {
+        this.cargoList = cargoList;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Integer getSelectType() {
+        return selectType;
+    }
+
+    public void setSelectType(Integer selectType) {
+        this.selectType = selectType;
+    }
+
+    public Integer getInvalidType() {
+        return invalidType;
+    }
+
+    public void setInvalidType(Integer invalidType) {
+        this.invalidType = invalidType;
+    }
+
+    public List<OrderStatisticsInfo> getDistributionInvalidList() {
+        return distributionInvalidList;
+    }
+
+    public void setDistributionInvalidList(List<OrderStatisticsInfo> distributionInvalidList) {
+        this.distributionInvalidList = distributionInvalidList;
+    }
+
+    public List<OrderStatisticsInfo> getPlaySingleInvalidList() {
+        return playSingleInvalidList;
+    }
+
+    public void setPlaySingleInvalidList(List<OrderStatisticsInfo> playSingleInvalidList) {
+        this.playSingleInvalidList = playSingleInvalidList;
+    }
+
+    public List<OrderStatisticsInfo> getOutboundInvalidNumList() {
+        return outboundInvalidNumList;
+    }
+
+    public void setOutboundInvalidNumList(List<OrderStatisticsInfo> outboundInvalidNumList) {
+        this.outboundInvalidNumList = outboundInvalidNumList;
+    }
+
+    public Integer getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(Integer warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+}

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

@@ -47,5 +47,8 @@ public interface InventoryService {
      * @return
      */
     Integer minusInventory(InventoryInfo inventoryInfo);
-
+    /**
+     * 删除
+     */
+    Integer deleteInv(Integer colorId);
 }

+ 40 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java

@@ -492,4 +492,44 @@ public interface SalesOrderService {
      *查询一天的发货总数
      */
     List<LogisticsInfo> dayDeliveryNum(LogisticsInfo logisticsInfo);
+    /**
+     *添加拉货数量
+     */
+    Integer addCargoInfo(CargoInfo cargoInfo);
+    /**
+     *查询拉货信息
+     */
+    CargoInfo getCargoInfo(CargoInfo cargoInfo);
+    /**
+     *修改拉货信息
+     */
+    Integer updateCargoInfo(CargoInfo cargoInfo);
+    /**
+     *查询通知配货数量
+     */
+    List<OrderStatisticsInfo> listDistributionNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *查询通知配货数量
+     */
+    List<OrderStatisticsInfo> listSendNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *查询某天所有拉货数量
+     */
+    List<CargoInfo> listCargoInfo(CargoInfo cargoInfo);
+    /**
+     *查询打单数量
+     */
+    List<OrderStatisticsInfo> listPlaySingleNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *查询出库数量
+     */
+    List<OrderStatisticsInfo> listOutboundNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *作废数量,根据通知配货时间查询
+     */
+    List<OrderStatisticsInfo> listDistributionInvalidNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *作废数量,根据下单时间查询
+     */
+    List<OrderStatisticsInfo> listSendInvalidNum(OrderStatisticsInfo orderStatisticsInfo);
 }

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

@@ -223,6 +223,11 @@ public class InventoryServiceImpl implements InventoryService {
         return flag;
     }
 
+    @Override
+    public Integer deleteInv(Integer colorId) {
+        return inventoryMapper.deleteInv(colorId);
+    }
+
 
     public Integer minus(InventoryInfo invent) {
         Integer flag = 0;

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

@@ -1785,6 +1785,56 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         return salesOrderMapper.dayDeliveryNum(logisticsInfo);
     }
 
+    @Override
+    public Integer addCargoInfo(CargoInfo cargoInfo) {
+        return salesOrderMapper.addCargoInfo(cargoInfo);
+    }
+
+    @Override
+    public CargoInfo getCargoInfo(CargoInfo cargoInfo) {
+        return salesOrderMapper.getCargoInfo(cargoInfo);
+    }
+
+    @Override
+    public Integer updateCargoInfo(CargoInfo cargoInfo) {
+        return salesOrderMapper.updateCargoInfo(cargoInfo);
+    }
+
+    @Override
+    public List<OrderStatisticsInfo> listDistributionNum(OrderStatisticsInfo orderStatisticsInfo) {
+        return salesOrderMapper.listDistributionNum(orderStatisticsInfo);
+    }
+
+    @Override
+    public List<OrderStatisticsInfo> listSendNum(OrderStatisticsInfo orderStatisticsInfo) {
+        return salesOrderMapper.listSendNum(orderStatisticsInfo);
+    }
+
+    @Override
+    public List<CargoInfo> listCargoInfo(CargoInfo cargoInfo) {
+        return salesOrderMapper.listCargoInfo(cargoInfo);
+    }
+
+    @Override
+    public List<OrderStatisticsInfo> listPlaySingleNum(OrderStatisticsInfo orderStatisticsInfo) {
+        return salesOrderMapper.listPlaySingleNum(orderStatisticsInfo);
+    }
+
+    @Override
+    public List<OrderStatisticsInfo> listOutboundNum(OrderStatisticsInfo orderStatisticsInfo) {
+        return salesOrderMapper.listOutboundNum(orderStatisticsInfo);
+    }
+
+    @Override
+    public List<OrderStatisticsInfo> listDistributionInvalidNum(OrderStatisticsInfo orderStatisticsInfo) {
+        return salesOrderMapper.listDistributionInvalidNum(orderStatisticsInfo);
+    }
+
+    @Override
+    public List<OrderStatisticsInfo> listSendInvalidNum(OrderStatisticsInfo orderStatisticsInfo) {
+        return salesOrderMapper.listSendInvalidNum(orderStatisticsInfo);
+    }
+
     /***
      * 计算金额
      * @param salesOrder

+ 46 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java

@@ -412,4 +412,50 @@ public interface SalesOrderMapper {
      *查询一天的发货总数
      */
     List<LogisticsInfo> dayDeliveryNum(LogisticsInfo logisticsInfo);
+
+    /**
+     *添加拉货数量
+     */
+    Integer addCargoInfo(CargoInfo cargoInfo);
+
+    /**
+     *查询拉货信息
+     */
+    CargoInfo getCargoInfo(CargoInfo cargoInfo);
+
+    /**
+     *修改拉货信息
+     */
+    Integer updateCargoInfo(CargoInfo cargoInfo);
+
+    /**
+     *查询通知配货数量
+     */
+    List<OrderStatisticsInfo> listDistributionNum(OrderStatisticsInfo orderStatisticsInfo);
+
+    /**
+     *查询发货数量
+     */
+    List<OrderStatisticsInfo> listSendNum(OrderStatisticsInfo orderStatisticsInfo);
+
+    /**
+     *查询某天所有拉货数量
+     */
+    List<CargoInfo> listCargoInfo(CargoInfo cargoInfo);
+    /**
+     *查询打单数量
+     */
+    List<OrderStatisticsInfo> listPlaySingleNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *查询出库数量
+     */
+    List<OrderStatisticsInfo> listOutboundNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *作废数量,根据通知配货时间查询
+     */
+    List<OrderStatisticsInfo> listDistributionInvalidNum(OrderStatisticsInfo orderStatisticsInfo);
+    /**
+     *作废数量,根据下单时间查询
+     */
+    List<OrderStatisticsInfo> listSendInvalidNum(OrderStatisticsInfo orderStatisticsInfo);
 }

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

@@ -272,6 +272,9 @@
       <if test="salesAddType != null ">
          AND sales_add_type = #{salesAddType}
       </if>
+      <if test="salesWarehouseId != null ">
+         AND sales_warehouse_id = #{salesWarehouseId}
+      </if>
       <if test="salesIds != null and salesIds != ''">
         AND sales_id IN
         <foreach collection="salesIds" item="node" index="index" separator="," open="(" close=")">
@@ -1966,4 +1969,146 @@
         where sales_send_time &gt; #{startDate} AND sales_send_time &lt; #{endDate}
         GROUP BY li.logistics_rst_code
     </select>
+    
+    <insert id="addCargoInfo" parameterType="CargoInfo">
+        insert into tb_rst_cargo_info
+        (
+        cargo_date,
+        cargo_num,
+        cargo_logistics_code,
+        cargo_create_time
+        ) values
+        (
+        #{cargoDate},
+        #{cargoNum},
+        #{cargoLogisticsCode},
+        NOW()
+        )
+    </insert>
+
+    <select id="getCargoInfo" parameterType="CargoInfo" resultType="CargoInfo">
+        SELECT * from tb_rst_cargo_info
+        <where>
+            <if test="cargoLogisticsCode != null and cargoLogisticsCode != '' ">
+                cargo_logistics_code = #{cargoLogisticsCode}
+            </if>
+            <if test="cargoDate != null and cargoDate != '' ">
+                AND cargo_date = #{cargoDate}
+            </if>
+        </where>
+    </select>
+    <select id="listCargoInfo" parameterType="CargoInfo" resultType="CargoInfo">
+        SELECT * from tb_rst_cargo_info
+        <where>
+            <if test="cargoDate != null and cargoDate != '' ">
+                AND cargo_date = #{cargoDate}
+            </if>
+        </where>
+    </select>
+    <update id="updateCargoInfo" parameterType="CargoInfo">
+        update tb_rst_cargo_info
+        <set>
+            <if test="cargoNum != null and cargoNum != ''">
+                cargo_num = #{cargoNum}
+            </if>
+        </set>
+        WHERE cargo_id = #{cargoId}
+    </update>
+
+    <select id="listDistributionNum" parameterType="OrderStatisticsInfo" resultType="OrderStatisticsInfo">
+        SELECT sales_distribution_time AS orderDate,count(1) AS distributionNum from tb_rst_sales_order_info
+        where
+            sales_status != 3
+            and sales_warehouse_id = #{warehouseId}
+            AND sales_distribution_time &gt; #{startDate} AND sales_distribution_time &lt; #{endDate}
+        GROUP BY DATE_FORMAT( sales_distribution_time, "%Y-%m-%d" )
+    </select>
+
+    <select id="listSendNum" parameterType="OrderStatisticsInfo" resultType="OrderStatisticsInfo">
+        SELECT sales_send_time AS orderDate,count(1) AS distributionNum from tb_rst_sales_order_info
+        where
+            sales_status != 3
+            and sales_warehouse_id = #{warehouseId}
+            AND sales_send_time &gt; #{startDate} AND sales_send_time &lt; #{endDate}
+            GROUP BY DATE_FORMAT( sales_send_time, "%Y-%m-%d" )
+    </select>
+
+    <select id="listPlaySingleNum" parameterType="OrderStatisticsInfo" resultType="OrderStatisticsInfo">
+        SELECT sales_send_time AS orderDate,count(1) AS distributionNum from tb_rst_sales_order_info
+        <where>
+            AND sales_status != 3
+            AND sales_shipping_status = 1
+            and sales_warehouse_id = #{warehouseId}
+            <if test="selectType != null and selectType != '' and selectType == 1 ">
+                AND sales_distribution_time &gt; #{startDate} AND sales_distribution_time &lt; #{endDate}
+            </if>
+            <if test="selectType != null and selectType != '' and selectType == 2 ">
+                AND sales_send_time &gt; #{startDate} AND sales_send_time &lt; #{endDate}
+            </if>
+        </where>
+        GROUP BY DATE_FORMAT( sales_send_time, "%Y-%m-%d" )
+    </select>
+
+    <select id="listOutboundNum" parameterType="OrderStatisticsInfo" resultType="OrderStatisticsInfo">
+        SELECT sales_deliver_time AS orderDate,count(1) AS distributionNum from tb_rst_sales_order_info
+        <where>
+            AND sales_status != 3
+            AND sales_shipping_status = 1
+            AND sales_deliver = 2
+            and sales_warehouse_id = #{warehouseId}
+            <if test="selectType != null and selectType != '' and selectType == 1 ">
+                AND sales_distribution_time &gt; #{startDate} AND sales_distribution_time &lt; #{endDate}
+            </if>
+            <if test="selectType != null and selectType != '' and selectType == 2 ">
+                AND sales_send_time &gt; #{startDate} AND sales_send_time &lt; #{endDate}
+            </if>
+        </where>
+        GROUP BY DATE_FORMAT( sales_deliver_time, "%Y-%m-%d" )
+    </select>
+    <!--作废数量,根据通知配货时间查询-->
+    <select id="listDistributionInvalidNum" parameterType="OrderStatisticsInfo" resultType="OrderStatisticsInfo">
+        SELECT sales_distribution_time AS orderDate,count(1) AS distributionNum from tb_rst_sales_order_info
+
+        <where>
+            sales_distribution_time &gt; #{startDate} AND sales_distribution_time &lt; #{endDate}
+            and sales_status = 3
+            and sales_warehouse_id = #{warehouseId}
+            <if test="invalidType != null and invalidType != '' and invalidType == 1 ">
+                AND sales_shipping_status = 11
+                AND sales_deliver = 1
+            </if>
+            <if test="invalidType != null and invalidType != '' and invalidType == 2 ">
+                AND sales_shipping_status = 1
+                AND sales_deliver = 1
+            </if>
+            <if test="invalidType != null and invalidType != '' and invalidType == 3 ">
+                AND sales_deliver = 2
+                AND sales_shipping_status = 1
+            </if>
+        </where>
+
+        GROUP BY DATE_FORMAT( sales_distribution_time, "%Y-%m-%d" )
+    </select>
+    <!--作废数量,根据下单时间查询-->
+    <select id="listSendInvalidNum" parameterType="OrderStatisticsInfo" resultType="OrderStatisticsInfo">
+        SELECT sales_send_time AS orderDate,count(1) AS distributionNum from tb_rst_sales_order_info
+        <where>
+            sales_send_time &gt; #{startDate} AND sales_send_time &lt; #{endDate}
+            and sales_status = 3
+            and sales_warehouse_id = #{warehouseId}
+            <if test="invalidType != null and invalidType != '' and invalidType == 1 ">
+                AND sales_shipping_status = 11
+                AND sales_deliver = 1
+            </if>
+            <if test="invalidType != null and invalidType != '' and invalidType == 2 ">
+                AND sales_shipping_status = 1
+                AND sales_deliver = 1
+            </if>
+            <if test="invalidType != null and invalidType != '' and invalidType == 3 ">
+                AND sales_deliver = 2
+                AND sales_shipping_status = 1
+            </if>
+        </where>
+        GROUP BY DATE_FORMAT( sales_send_time, "%Y-%m-%d" )
+    </select>
 </mapper>

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

@@ -32,4 +32,8 @@ public interface InventoryMapper {
      * 新增
      */
     Integer insert(InventoryInfo inventoryInfo);
+    /**
+     * 删除
+     */
+    Integer deleteInv(Integer colorId);
 }

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

@@ -228,4 +228,10 @@
     #{warehouseId}
     )
   </insert>
+
+  <delete id="deleteInv" parameterType="Integer">
+      delete FROM
+      tb_rst_fm_inventory
+      where inventory_product_color_id=#{colorId}
+  </delete>
 </mapper>

+ 4 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/product/ProductServiceImpl.java

@@ -288,6 +288,10 @@ public class ProductServiceImpl implements ProductService {
         if(!"".equals(colors)){
             String[] colorDels = colors.split(",");
             flag = productColorMapper.deleteList(colorDels);
+            //20191115删除产品库存
+            /*for (String colorId : colorDels){
+               inventoryService.deleteInv(Integer.valueOf(colorId));
+            }*/
             if(flag < 1){
                 throw new RuntimeException("删除颜色失败");
             }

+ 79 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -218,6 +218,14 @@ public class AdminSalesOrderController {
         order.setSalesOrderItemList(itemList);
         //查询更正信息
         List<OrderCorrectInfo> listOrderCorrectInfo = salesOrderService.listOrderCorrectInfo(order.getSalesId());
+
+        //查询物流公司信息
+        if(order.getSalesPostFirm() != null || !order.getSalesPostFirm().equals("")){
+            LogisticsInfo logisticsInfo = new LogisticsInfo();
+            logisticsInfo.setLogisticsRstCode(order.getSalesPostFirm());
+            List<LogisticsInfo> logis = salesOrderService.getLogisticsInfo(logisticsInfo);
+            order.setSalesPostFirmName(logis.get(0).getLogisticsName());
+        }
         mv.addObject("listOrderCorrectInfo",listOrderCorrectInfo);
         mv.addObject("order",order);
         return mv;
@@ -2111,4 +2119,75 @@ public class AdminSalesOrderController {
         }
         return data;
     }
+    /**
+     * 进入添加拉货数量
+     * @param request
+     * @return
+     */
+    @RequestMapping("/to_addCargoInfo")
+    public ModelAndView to_addCargoInfo(HttpServletRequest request){
+        ModelAndView mv = new ModelAndView("order/salesOrder/add_crgoInfo");
+        List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
+        mv.addObject("logisticsInfoList",logisticsInfoList);
+        mv.addObject("date",new Date());
+        return mv;
+    }
+
+    /**
+     * 添加拉货信息
+     * @param request
+     * @param cargoInfo
+     * @return
+     */
+    @RequestMapping("/addCargoInfo")
+    @ResponseBody
+    public ResponseJson addCargoInfo(HttpServletRequest request,CargoInfo cargoInfo) throws Exception {
+        ResponseJson rj =  new ResponseJson(200, "SUCCESS", 200);
+        if(cargoInfo == null){
+            rj = ResponseJson.getFAILURE();
+            rj.setResultMsg("添加物流信息异常,请刷新重试。");
+            return rj;
+        }
+        String cargo_date = request.getParameter("cargo_date");
+        if(cargo_date != null){
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+            cargoInfo.setCargoDate(format.parse(cargo_date));
+        }else{
+            rj = ResponseJson.getFAILURE();
+            rj.setResultMsg("添加物流信息异常,请刷新重试。");
+            return rj;
+        }
+        int msg = 0;
+        if(cargoInfo.getIncreaseDcrease() != null){
+            CargoInfo cargo = salesOrderService.getCargoInfo(cargoInfo);
+            if(cargo == null){
+                msg = salesOrderService.addCargoInfo(cargoInfo);
+            }else{
+                if(cargoInfo.getIncreaseDcrease() == 1){
+                    cargo.setCargoNum(cargo.getCargoNum() + cargoInfo.getCargoNum());
+                    msg = salesOrderService.updateCargoInfo(cargo);
+                }else if(cargoInfo.getIncreaseDcrease() == 2){
+                    if(cargo.getCargoNum() < cargoInfo.getCargoNum()){
+                        rj = ResponseJson.getFAILURE();
+                        rj.setResultMsg("减少数量不得大于已拉货数量");
+                        return rj;
+                    }
+                    cargo.setCargoNum(cargo.getCargoNum() - cargoInfo.getCargoNum());
+                    msg = salesOrderService.updateCargoInfo(cargo);
+                }
+            }
+            if(msg > 0){
+                return rj;
+            }else{
+                rj = ResponseJson.getFAILURE();
+                rj.setResultMsg("添加物流信息失败,请刷新重试。");
+                return rj;
+            }
+        }else{
+            rj = ResponseJson.getFAILURE();
+            rj.setResultMsg("添加物流信息异常,请刷新重试。");
+            return rj;
+        }
+    }
+
 }

+ 94 - 13
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java

@@ -23,6 +23,7 @@ import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.OrderUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.wechat.tools.*;
+import com.iamberry.wechat.tools.payUtil.DatetimeUtil;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -592,6 +593,15 @@ public class AwaitSendController {
         ResponseJson rj = ResponseJson.getFAILURE();
         salesOrder.setSalesShippingStatus(11);      //salesShippingStatus
         salesOrder.setEndOrderNO(pageSize);
+
+        // 分页获取订单信息(仓库只能查询已确认的订单)
+        Admin admin = AdminUtils.getLoginAdmin();
+        //查询当前登录人属于哪个仓库
+        OrderWarehouse orderWarehouse = salesOrderService.selectAdminWarehouse(admin.getAdminId());
+        if(orderWarehouse == null){
+            return rj;
+        }
+        salesOrder.setSalesWarehouseId(orderWarehouse.getWarehouseId());
         List<SalesOrder>  salesOrderList = salesOrderService.listSalesOrder(salesOrder);
         StringBuffer ids = new StringBuffer();
         for (int i =0 ;i<salesOrderList.size();i++){
@@ -1241,18 +1251,36 @@ public class AwaitSendController {
     @RequiresPermissions("salesOrder:dayDeliveryNum:deliver")
     public ModelAndView  dayDeliveryNum(HttpServletRequest request) throws ParseException {
         ModelAndView mv = new ModelAndView("order/salesOrder/dayDeliveryNum_list");
-        String dates = request.getParameter("date");
-        Date date = null;
-        if(dates != null){
+        String sDate = request.getParameter("startDate");
+        String eDate = request.getParameter("endDate");
+        String selectType = request.getParameter("selectType");//1通知批货时间,2下单时间
+        String warehouseId = request.getParameter("warehouseId");//1通知批货时间,2下单时间
+        Date startDate = null;
+        Date endDate = null;
+        OrderStatisticsInfo orderStatisticsInfo = new OrderStatisticsInfo();
+        if(sDate != null){
             SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-            date = simpleDateFormat.parse(dates);
+            startDate = simpleDateFormat.parse(sDate);
+        }
+        if(eDate != null){
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+            endDate = simpleDateFormat.parse(eDate);
+        }
+        if(selectType != null && !selectType.equals("")){
+            orderStatisticsInfo.setSelectType(Integer.valueOf(selectType));
+        }else{
+            orderStatisticsInfo.setSelectType(1);
+        }
+        if(warehouseId != null && !warehouseId.equals("")){
+            orderStatisticsInfo.setWarehouseId(Integer.valueOf(warehouseId));
+        }else{
+            orderStatisticsInfo.setWarehouseId(1);
         }
-        LogisticsInfo logisticsInfo = new LogisticsInfo();
         Calendar calendarStart = Calendar.getInstance();
         Calendar calendarEnd = Calendar.getInstance();
-        if(date != null){
-            calendarStart.setTime(date);
-            calendarEnd.setTime(date);
+        if(startDate != null && endDate != null){
+            calendarStart.setTime(startDate);
+            calendarEnd.setTime(endDate);
         }else{
             calendarStart.setTime(new Date());
             calendarEnd.setTime(new Date());
@@ -1264,12 +1292,65 @@ public class AwaitSendController {
         calendarEnd.set(Calendar.MINUTE,59);
         calendarEnd.set(Calendar.SECOND,59);
 
-        logisticsInfo.setStartDate(calendarStart.getTime());
-        logisticsInfo.setEndDate(calendarEnd.getTime());
+        orderStatisticsInfo.setStartDate(calendarStart.getTime());
+        orderStatisticsInfo.setEndDate(calendarEnd.getTime());
 
-        List<LogisticsInfo> logisticsInfoList = salesOrderService.dayDeliveryNum(logisticsInfo);
-        mv.addObject("logisticsInfoList",logisticsInfoList);
-        mv.addObject("date",date);
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+        List<OrderStatisticsInfo> statisticsList = null;
+        if(orderStatisticsInfo.getSelectType() == 1){
+            statisticsList = salesOrderService.listDistributionNum(orderStatisticsInfo);
+        }
+        if(orderStatisticsInfo.getSelectType() == 2){
+            statisticsList = salesOrderService.listSendNum(orderStatisticsInfo);
+        }
+
+        if(statisticsList != null && statisticsList.size() > 0){
+            for(OrderStatisticsInfo info : statisticsList){
+                //查询拉货数量
+                CargoInfo cargoInfo = new CargoInfo();
+                cargoInfo.setCargoDate(df.parse(df.format(info.getOrderDate())));
+                info.setCargoList(salesOrderService.listCargoInfo(cargoInfo));
+                //查询打单数量
+                OrderStatisticsInfo info1 = new OrderStatisticsInfo();
+                info1.setWarehouseId(orderStatisticsInfo.getWarehouseId());
+                info1.setSelectType(Integer.valueOf(orderStatisticsInfo.getSelectType()));
+                info1.setStartDate(DatetimeUtil.getDayBegin(info.getOrderDate()));
+                info1.setEndDate(DatetimeUtil.getDayEnd(info.getOrderDate()));
+                info.setPlaySingleList(salesOrderService.listPlaySingleNum(info1));
+                //查询打单数量
+                info1.setStartDate(DatetimeUtil.getDayBegin(info.getOrderDate()));
+                info1.setEndDate(DatetimeUtil.getDayEnd(info.getOrderDate()));
+                info.setOutboundList(salesOrderService.listOutboundNum(info1));
+
+                if(orderStatisticsInfo.getSelectType() == 1){
+                    info1.setInvalidType(1);
+                    info.setDistributionInvalidList(salesOrderService.listDistributionInvalidNum(info1));
+
+                    info1.setInvalidType(2);
+                    info.setPlaySingleInvalidList(salesOrderService.listDistributionInvalidNum(info1));
+
+                    info1.setInvalidType(3);
+                    info.setOutboundInvalidNumList(salesOrderService.listDistributionInvalidNum(info1));
+                }
+                if(orderStatisticsInfo.getSelectType() == 2){
+
+                    info1.setInvalidType(1);
+                    info.setDistributionInvalidList(salesOrderService.listSendInvalidNum(info1));
+
+                    info1.setInvalidType(2);
+                    info.setPlaySingleInvalidList(salesOrderService.listSendInvalidNum(info1));
+
+                    info1.setInvalidType(3);
+                    info.setOutboundInvalidNumList(salesOrderService.listSendInvalidNum(info1));
+                }
+
+            }
+        }
+        mv.addObject("statisticsList",statisticsList);
+        mv.addObject("orderStatisticsInfo",orderStatisticsInfo);
+        mv.addObject("selectType",selectType);
+        mv.addObject("startDate",startDate);
+        mv.addObject("endDate",endDate);
         return mv;
     }
 }

+ 2 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/product/AdminProductController.java

@@ -145,7 +145,7 @@ public class AdminProductController {
         mv.addObject("productTypeList",productTypeList);
 
         StitchAttrUtil.getSa()
-                .addNoPro("colorList","fittingsList","productAreaRelaList")
+                .addNoPro("colorList","fittingsList","productCombinatList","productAreaRelaList")
                 .setModelAndView(product, mv, "/admin/product/product_page", pagedResult);
         return mv;
     }
@@ -190,7 +190,7 @@ public class AdminProductController {
         JSONArray jsonArray = JSONArray.fromObject(colorListJson);
         List<ProductColor> productColorList =  (List) JSONArray.toCollection(jsonArray, ProductColor.class);
         product.setColorList(productColorList);
-        if(productString != null) {
+        if(productString != null && !productString.equals("")) {
             JSONArray productCombinatArray = JSONArray.fromObject(productString);
             List<ProductCombinatInfo> productCombinatList = (List) JSONArray.toCollection(productCombinatArray, ProductCombinatInfo.class);
             product.setProductCombinatList(productCombinatList);

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

@@ -227,6 +227,10 @@
 
 		<!--产品新增-->
 		<typeAlias type="com.iamberry.rst.core.order.ProductCombinatInfo" alias="ProductCombinatInfo"/>
+
+		<!--订单新增-->
+		<typeAlias type="com.iamberry.rst.core.order.CargoInfo" alias="CargoInfo"/>
+		<typeAlias type="com.iamberry.rst.core.order.OrderStatisticsInfo" alias="OrderStatisticsInfo"/>
 	</typeAliases>
 	<!-- PageHelper -->
 	<plugins>

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

@@ -181,6 +181,46 @@
                     <input type="text" class="input-text" value="" placeholder="寄件人电话" id="sendbackTel" name="sendbackTel">
                 </div>
             </div>
+
+                <div class="row cl">
+                    <div class="formControls col-12 col-sm-12">
+                        <div class="formControls col-2 col-sm-2 text-r">
+                            <strong>是否通知售前客服</strong>
+                        </div>
+                        <div class="radio-box">
+                            <input type="radio" id="tel-Notice1" name="sendbackNoticeCustomer" value="1">
+                            <label for="tel-Notice1">是</label>
+                        </div>
+                        <div class="radio-box">
+                            <input type="radio" id="tel-Notice2" name="sendbackNoticeCustomer" value="2">
+                            <label for="tel-Notice2">否</label>
+                        </div>
+                    </div>
+                </div>
+                <div class="row cl" id="backLogisticsInfo">
+                    <div class="formControls col-2 col-sm-2 text-r">
+                        <strong>售前客服</strong>
+                    </div>
+                    <div class="formControls col-4 col-sm-4">
+                        <div style="width: 100%;display: inline-block;margin-right: 10px;">
+                        <span class="select-box">
+                                <select name="sendbackLogisticsCompany" id="sendbackLogisticsCompany" class="select" seleType="send">
+                                    <#if logisticsInfoList?? &&  (logisticsInfoList?size > 0) >
+                                        <#list logisticsInfoList as logisticsInfo>
+                                            <option value="${logisticsInfo.logisticsRstCode!''}" >${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
+                                        </#list>
+                                    </#if>
+                                </select>
+                        </span>
+                        </div>
+                    </div>
+
+                    <div class="formControls col-4 col-sm-4">
+                        <input style="margin-right: 10px;" type="text" class="input-text" value="" placeholder="请输入快递单号" id="sendbackLogisticsNo" name="sendbackLogisticsNo">
+                    <#--<input style="width: 150px;margin-right: 10px;" type="text" class="input-text" value="" placeholder="寄回邮费" id="renewedBackPostage" name="renewedBackPostage">
+                    <input style="width: 150px;" type="text" class="input-text" value="" placeholder="用户支付宝账户" id="renewedAlipay" name="renewedAlipay">-->
+                    </div>
+                </div>
                 <div class="row cl" style="position: relative;" id="backUserInfo">
                     <div class="formControls col-2 col-sm-2 text-r">
                         <strong>寄回产品</strong>

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

@@ -0,0 +1,165 @@
+<!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;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
+
+        #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}
+        .check-box, .radio-box{padding-left: 0;}
+
+        .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>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: #f7fafd;height: 40px;}
+        .table-bg td{height: 40px;}
+        .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%; }
+        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;}
+    </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>
+</nav>
+<article class="page-container" style="padding: 10px;">
+    <div class="pd-20 cl">
+        <form action="" method="post" class="form form-horizontal" id="form-add">
+            <div class="row cl">
+                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>拉货日期:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" style="" class="input-text my-input-date Wdate" placeholder="拉货日期"  value="${date?string('yyyy-MM-dd')}" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="cargo_date" name="cargo_date" readonly="readonly"/>
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>快递公司:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                    <select id="cargoLogisticsCode" name="cargoLogisticsCode" class="select">
+                        <#if logisticsInfoList?? &&  (logisticsInfoList?size > 0) >
+                            <#list logisticsInfoList as logisticsInfo>
+                                <option value="${logisticsInfo.logisticsRstCode!''}" >${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
+                            </#list>
+                        </#if>
+                    </select>
+                    </span>
+                </div>
+            </div>
+                <div class="row cl">
+                    <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>增加或减少:</label>
+                    <div class="formControls col-2 col-sm-2">
+                        <div class="radio-box">
+                            <input type="radio" value="1"  checked="checked" name="increaseDcrease">
+                            <label for="tel-1">增加</label>
+                        </div>
+                        <div class="radio-box">
+                            <input type="radio" value="2"  name="increaseDcrease">
+                            <label for="tel-1">减少</label>
+                        </div>
+                    </div>
+                </div>
+            <div class="row cl">
+                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>拉货数量:</label>
+                    <div class="formControls col-2 col-sm-2 skin-minimal">
+                        <input type="text" style="" class="input-text" placeholder="填写拉货数量" id="cargoNum" name="cargoNum">
+                    </div>
+                </div>
+            </div>
+            <div class="row cl">
+                <div class="col-2 col-sm-2 col-offset-3">
+                    <button onClick="add();" class="btn btn-block btn-primary size-XL" type="button">确认</button>
+                </div>
+            </div>
+        </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">
+
+
+
+
+
+
+
+    function  add() {
+        var cargo_date = $("#cargo_date").val();
+        if(cargo_date == null || cargo_date == ""){
+            layer.msg('请选择拉货日期',{icon: 5,time:2000});
+            return;
+        }
+        var cargoNum = $("#cargoNum").val();
+        if(cargoNum == null || cargoNum == ""){
+            layer.msg('请添加拉货数量',{icon: 5,time:2000});
+            return;
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/salesOrder/addCargoInfo",
+            data:$('#form-add').serialize(),
+            async: false,
+            success: function(data){
+                if (data.returnCode === 200) {
+                    /*layer.msg('签收成功', {icon: 1, time: 1000}, function () {
+                        location.replace(location.href);
+                        window.location.href = "${path}/admin/signclosed/select_signclosed_list";
+                    });*/
+                    layer.msg('添加成功',{icon: 1,time:2000});
+                    $("#cargoNum").val("");
+                }else{
+                    layer.msg(data.resultMsg,{icon: 1,time:2000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('添加错误',{icon: 5,time:2000});
+            }
+        });
+    }
+
+
+</script>
+<!--/请在上方写此页面业务相关的脚本-->
+</body>
+</html>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 126 - 19
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/dayDeliveryNum_list.ftl


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

@@ -235,43 +235,7 @@
             <tr>
                 <th width="10">物流公司:</th>
                 <td width="10" style="font-weight: normal;"><span>
-                <#if order.salesPostFirm??>
-                    <#if order.salesPostFirm == 'sto'>
-                        申通快递
-                    <#elseif order.salesPostFirm == 'yto'>
-                        圆通快递
-                    <#elseif order.salesPostFirm == 'sf'>
-                        顺丰快递
-                    <#elseif order.salesPostFirm == 'ems'>
-                        邮政EMS
-                    <#elseif order.salesPostFirm == 'zto'>
-                        中通快递
-                    <#elseif order.salesPostFirm == 'zjs'>
-                        宅急送
-                    <#elseif order.salesPostFirm == 'yunda'>
-                        韵达快递
-                    <#elseif order.salesPostFirm == 'cces'>
-                        cces快递
-                    <#elseif order.salesPostFirm == 'pick'>
-                        上门提货
-                    <#elseif order.salesPostFirm == 'htky'>
-                        汇通快递
-                    <#elseif order.salesPostFirm == 'ttkdex'>
-                        天天快递
-                    <#elseif order.salesPostFirm == 'stars'>
-                        星晨急便
-                    <#elseif order.salesPostFirm == 'jd'>
-                        京东快递
-                    <#elseif order.salesPostFirm == '01'>
-                        其他
-                    <#elseif order.salesPostFirm == '02'>
-                        上门送货
-                    <#elseif order.salesPostFirm == 'eyb'>
-                        E邮宝
-                    <#elseif order.salesPostFirm == 'dbkd'>
-                        德邦物流
-                    </#if>
-                </#if></span></td>
+                ${order.salesPostFirmName!''}</span></td>
                 <td width="10"></td>
                 <th width="10">物流单号:</th>
                 <td width="10" style="font-weight: normal;"><span>

+ 7 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/product/add_product.ftl

@@ -108,10 +108,11 @@
                 </div>-->
 
                    <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>售后检测:</label>
-                   <div class="formControls col-2 col-sm-2">
+                   <div class="formControls col-4 col-sm-4">
                        <div class="radio-box">
                            <input type="radio" id="productIsDetection-1" name="productIsDetection" value="1" >
                            <label for="productIsDetection-1">需要</label>
+
                        </div>
                        <div class="radio-box">
                            <input type="radio" id="productIsDetection-2" name="productIsDetection" value="2" checked>
@@ -121,7 +122,7 @@
             </div>
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否组合产品:</label>
-                <div class="formControls col-2 col-sm-2">
+                <div class="formControls col-4 col-sm-4">
                     <div class="radio-box">
                         <input type="radio" id="productIsCombination-1" name="productIsCombination" value="1" checked>
                         <label for="productIsCombination-1">否&nbsp;&nbsp;&nbsp;</label>
@@ -272,6 +273,10 @@
                         <div class="download_file"><a href="javascript:void(0)" class="del_product all_down" onclick="fileOnclick(this)">上传图片</a></div>
                         <input type="hidden" class="add_color str colorPicture " name="" id="" value="" >
                     </div>
+                    <label class="form-label col-1 col-sm-1">添加库存:</label>
+                    <div class="formControls col-2 col-sm-2">
+                        <input type="text" class="input-text add_color str colorInventory" value="" placeholder="库存" id="" name=""  myMaxlength="10"  errormsg="库存非必填,可填写1-10个字符!">
+                    </div>
                 </div>
 
                 <div class="row cl" id="" style="">

+ 9 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/product/update_product.ftl

@@ -232,6 +232,7 @@
                                     <tr class="text-c">
                                         <input type="hidden" class="colorId" value="${productColor.colorId!''}">
                                         <input type="hidden" class="isUpdate" value="2">
+                                        <input type="hidden" class="isAdd" value="2">
                                         <td width="30" class="colorIdHtml">${productColor.colorId!''}</td>
                                         <td width="30" class="colorName">${productColor.colorName!''}</td>
                                         <td width="30" class="colorAbbreviation">${productColor.colorAbbreviation!''}</td>
@@ -253,7 +254,8 @@
                                             <img style="width: 40px;" src="<#if productColor.colorPicture?? && productColor.colorPicture?length gt 0 >${path}/${productColor.colorPicture}</#if>"  class="colorPictureMsg" >
                                             <input type="hidden"  class="colorPicture" value="${productColor.colorPicture}">
                                         </td>
-                                        <td width="10"><input type="hidden"  class="colorInventory" value="${productColor.inventoryGoodProductNum!''}"><span class="colorInventoryMsg">${productColor.inventoryGoodProductNum!''}</span></td>
+                                        <#--<td width="10"><input type="hidden"  class="colorInventory" value="${productColor.inventoryGoodProductNum!''}"><span class="colorInventoryMsg">${productColor.inventoryGoodProductNum!''}</span></td>-->
+                                        <td width="10" class="colorInventory" > ${productColor.inventoryGoodProductNum!''}</td>
                                         <td width="5">
                                             <a href="javascript:void(0)" class="del_product all_down" onclick="updTr($(this))" >修改</a>&nbsp;&nbsp;
                                             <a href="javascript:void(0)" class="del_product all_down" onclick="delTr($(this))" >删除</a>
@@ -319,6 +321,12 @@
                         <div class="download_file"><a href="javascript:void(0)" class="del_product all_down" onclick="fileOnclick(this)">上传图片</a></div>
                         <input type="hidden" class="add_color str colorPicture " name="" id="" value="" >
                     </div>
+                    <div id="colorInventoryDiv">
+                    <label class="form-label col-1 col-sm-1">添加库存:</label>
+                    <div class="formControls col-2 col-sm-2">
+                        <input type="text" class="input-text add_color str colorInventory" value="" placeholder="库存" id="" name=""  myMaxlength="10"  errormsg="库存非必填,可填写1-10个字符!">
+                    </div>
+                    </div>
                 </div>
 
                 <div class="row cl" id="" style="">

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl

@@ -264,7 +264,7 @@
                                         '</div>');
                             }
                         }else{
-                                $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
+                                $("#printlist").append('<div style="width: 242px;height: 122px;position: relative;">' +
                                         '<span style="position: absolute;left: 10px;font-size: 14px;">反渗透净水机</span>' +
                                         '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
                                         '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +

+ 13 - 4
watero-rst-web/src/main/webapp/common/js/product/product.js

@@ -30,6 +30,7 @@ function add_color(isUpdate){
         colorHtml += '<td width="40" class="colorJdProductId">'+$node.find(".colorJdProductId").val()+'</td>';
         colorHtml += '<td width="40" class="colorIsWeight">'+$node.find(".colorIsWeight").val()+'</td>';
         colorHtml += '<td width="40" class="colorMode">'+$node.find(".colorMode").val()+'</td>';
+
         var colorIsMachine = $(':radio[name="colorIsMachine"]:checked').val();
         var colorIsMachineStr = '';
         if(colorIsMachine == 1){
@@ -57,14 +58,15 @@ function add_color(isUpdate){
             + '<img style="width: 40px;" src="' + showImg + '"  class="colorPictureMsg" >'
             + '<input type="hidden"  class="colorPicture" value="'+ img +'">'
             + '</td>';
-        colorHtml += '<td width="40" >' +
+        /*colorHtml += '<td width="40" >' +
             '<input type="hidden"  class="colorInventory" value="0">'+
             '<span class="colorInventoryMsg" >0</span>'+
-            '</td>';
+            '</td>';*/
+        colorHtml += '<td width="40" class="colorInventory">'+$node.find(".colorInventory").val()+'</td>';
         colorHtml += '<td width="40">' +
             '<a href="javascript:void(0)" class="del_product all_down" onclick="updTr($(this))" >修改</a>&nbsp;&nbsp;' +
             '<a href="javascript:void(0)" class="del_product all_down" onclick="delTr($(this))" >删除</a><br>' +
-            '<a href="javascript:void(0)" class="del_product all_down" onclick="to_inventory($(this))" >添加库存</a>' +
+            /*'<a href="javascript:void(0)" class="del_product all_down" onclick="to_inventory($(this))" >添加库存</a>' +*/
             '</td>';
         colorHtml += '</tr>';
         if(isHaveColorList == 2){
@@ -118,6 +120,7 @@ function add_color(isUpdate){
                     showImg = url_path +"/"+ img;
                 }
                 $(this).find(".colorPictureMsg").attr("src",showImg);
+                $(this).find(".colorInventory").html($node.find(".colorInventory").val());
             }
         });
         if(noHaveColorId){
@@ -328,7 +331,7 @@ function getColorList(){
         color.colorPicture = cufte($(this).find(".colorPicture").val());
         color.colorIsMachine = cufte($(this).find('.colorIsMachine').val());
         color.colorStatus = cufte($(this).find('.colorStatus').val());
-        color.inventoryGoodProductNum = cufte($(this).find('.colorInventory').val());
+        color.inventoryGoodProductNum = cufte($(this).find('.colorInventory').html());
         colorList.push(color);
     });
     return colorList;
@@ -376,6 +379,7 @@ function updTr($this) {
     $addColor.find(".colorJdProductId").val($this.find(".colorJdProductId").html());
     $addColor.find(".colorIsWeight").val($this.find(".colorIsWeight").html());
     $addColor.find(".colorMode").val($this.find(".colorMode").html());
+    $addColor.find(".colorInventory").val($this.find(".colorInventory").html());
     var colorPicture = $this.find(".colorPicture").val();
     var html ='';
     if(isEmpty(colorPicture)){
@@ -405,6 +409,11 @@ function updTr($this) {
     $(".add-color-button").val("修改");
     $("#addColorHtml").show();
     color_is_update = 2;
+    if($this.find(".isAdd").val() == null || $this.find(".isAdd").val() == ""){
+        $("#colorInventoryDiv").show();
+    }else{
+        $("#colorInventoryDiv").hide();
+    }
 }
 
 /**