suochencheng 7 år sedan
förälder
incheckning
81256fa626

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/LogisticsInfoMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.LogisticsInfo;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.LogisticsInfoMapper")
+public interface LogisticsInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(LogisticsInfo record);
+
+    LogisticsInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(LogisticsInfo record);
+
+    List<LogisticsInfo> queryAllLogisticsInfo(LogisticsInfo record);
+
+    List<LogisticsInfo> queryLogisticsInfoByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    LogisticsInfo queryLogisticsInfo(LogisticsInfo record);
+
+    List<LogisticsInfo> query(LogisticsInfo record);
+}
+

+ 245 - 0
src/main/java/com/izouma/awesomeadmin/dao/LogisticsInfoMapper.xml

@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.izouma.awesomeadmin.dao.LogisticsInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.LogisticsInfo">
+        <result column="code" property="code" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            code,
+
+            name,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from logistics_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.LogisticsInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into logistics_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="code!= null">
+                code,
+            </if>
+            <if test="name!= null">
+                name,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="code != null">
+                #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        update logistics_info
+        <set>
+            <if test="code != null">
+                code= #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name= #{name,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryLogisticsInfoByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            <if test="record.code != null and !&quot;&quot;.equals(record.code)">
+                and code = #{record.code}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and name = #{record.name}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{record.searchKey},'%')
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        code
+    </select>
+    <select id="queryAllLogisticsInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{searchKey},'%')
+                    OR name LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        code
+    </select>
+    <select id="queryLogisticsInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            and del_flag = 'N'
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE logistics_info SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 23 - 4
src/main/java/com/izouma/awesomeadmin/dao/OrderLogisticsMapper.xml

@@ -172,12 +172,23 @@
                remark= #{remark,jdbcType=VARCHAR},
             </if>
                  </set>
-        where id = #{id,jdbcType=INTEGER}
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
     </update>
     <select id="queryOrderLogisticsByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderLogistics">
         select <include refid="Base_Column_List"/> from order_logistics
         <where>
             and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
                     <if test="record.id != null and !&quot;&quot;.equals(record.id)">
                 and  id = #{record.id}
             </if>
@@ -281,6 +292,9 @@
         select <include refid="Base_Column_List"/> from order_logistics
         <where>
             and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
                     <if test="id != null and !&quot;&quot;.equals(id)">
                 and  id = #{id}
             </if>
@@ -425,9 +439,14 @@
     </select>
     <update id="delete">
         UPDATE order_logistics SET del_flag = 'Y'
-        <where>
-            AND id = #{id}
-        </where>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
     </update>
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderLogistics">
         select <include refid="Base_Column_List"/> from order_logistics

+ 20 - 1
src/main/java/com/izouma/awesomeadmin/dao/ProductCommentMapper.xml

@@ -200,7 +200,7 @@
         where id = #{id,jdbcType=INTEGER}
     </update>
     <select id="queryProductCommentByPage" parameterType="java.util.Map"
-            resultType="com.izouma.awesomeadmin.model.ProductComment">
+            resultMap="AllInfoForGetList">
         select
         <include refid="Base_Column_List"/>
         from product_comment
@@ -553,6 +553,25 @@
                     select="com.izouma.awesomeadmin.dao.ProductCommentImageMapper.queryAllProductCommentImage"
                     column="{ productId = id }"/>
 
+    </resultMap>
+
+    <resultMap id="AllInfoForGetList" type="com.izouma.awesomeadmin.model.ProductComment" extends="BaseResultMap">
+
+
+        <association property="userInfo"
+                     javaType="com.izouma.awesomeadmin.model.UserInfo"
+                     select="com.izouma.awesomeadmin.dao.UserInfoMapper.queryUserInfo"
+                     column="{ id = user_id }"/>
+
+        <association property="productInfo"
+                     javaType="com.izouma.awesomeadmin.model.ProductInfo"
+                     select="com.izouma.awesomeadmin.dao.ProductInfoMapper.queryProductInfo"
+                     column="{ id = product_id }"/>
+
+        <collection property="productCommentImageList"
+                    ofType="com.izouma.awesomeadmin.model.ProductCommentImage"
+                    select="com.izouma.awesomeadmin.dao.ProductCommentImageMapper.queryAllProductCommentImage"
+                    column="{ commentId = id }"/>
 
     </resultMap>
 

+ 68 - 0
src/main/java/com/izouma/awesomeadmin/model/LogisticsInfo.java

@@ -0,0 +1,68 @@
+package com.izouma.awesomeadmin.model;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class LogisticsInfo {
+    private String code;
+    private String name;
+
+    private String searchKey;
+
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
+
+    /**
+     * column_name_,desc_;column_name_,asc
+     */
+    private String orderByStr;
+
+    public String getCode() {
+        return this.code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getOrderByStr() {
+        return orderByStr;
+    }
+
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
+
+
+}
+

+ 10 - 0
src/main/java/com/izouma/awesomeadmin/model/OrderLogistics.java

@@ -21,6 +21,8 @@ public class OrderLogistics{
     private Integer typeFlag;
     private String remark;
 
+private String idStr;
+
 private String searchKey;
 
 /**
@@ -142,5 +144,13 @@ public void setOrderByStr(String orderByStr) {
     this.orderByStr = orderByStr;
 }
 
+public String getIdStr() {
+    return idStr;
+}
+
+public void setIdStr(String idStr) {
+    this.idStr = idStr;
+}
+
 }
 

+ 19 - 0
src/main/java/com/izouma/awesomeadmin/model/ProductComment.java

@@ -28,6 +28,9 @@ public class ProductComment {
 
     private List<ProductCommentImage> productCommentImageList;
 
+    private UserInfo userInfo;
+
+    private ProductInfo productInfo;
 
     private String searchKey;
 
@@ -192,5 +195,21 @@ public class ProductComment {
     public void setProductCommentImageList(List<ProductCommentImage> productCommentImageList) {
         this.productCommentImageList = productCommentImageList;
     }
+
+    public UserInfo getUserInfo() {
+        return userInfo;
+    }
+
+    public void setUserInfo(UserInfo userInfo) {
+        this.userInfo = userInfo;
+    }
+
+    public ProductInfo getProductInfo() {
+        return productInfo;
+    }
+
+    public void setProductInfo(ProductInfo productInfo) {
+        this.productInfo = productInfo;
+    }
 }
 

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/service/LogisticsInfoService.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.LogisticsInfo;
+
+
+/**
+*  service接口类
+*/
+public interface LogisticsInfoService{
+
+    List<LogisticsInfo> getLogisticsInfoList(LogisticsInfo record);
+
+    List<LogisticsInfo> getLogisticsInfoByPage(Page page, LogisticsInfo record);
+
+    LogisticsInfo getLogisticsInfoById(String id);
+
+    LogisticsInfo getLogisticsInfo(LogisticsInfo record);
+
+    boolean createLogisticsInfo(LogisticsInfo record);
+
+    boolean deleteLogisticsInfo(String id);
+
+    boolean updateLogisticsInfo(LogisticsInfo record);
+}
+

+ 137 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/LogisticsInfoServiceImpl.java

@@ -0,0 +1,137 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.LogisticsInfo;
+import com.izouma.awesomeadmin.service.LogisticsInfoService;
+import com.izouma.awesomeadmin.dao.LogisticsInfoMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class LogisticsInfoServiceImpl implements LogisticsInfoService{
+
+    private static Logger logger = Logger.getLogger(LogisticsInfoServiceImpl.class);
+
+    @Autowired
+    private LogisticsInfoMapper logisticsInfoMapper;
+
+    @Override
+    public List<LogisticsInfo> getLogisticsInfoList(LogisticsInfo record) {
+
+        logger.info("getLogisticsInfoList");
+        try {
+
+        return logisticsInfoMapper.queryAllLogisticsInfo(record);
+        } catch (Exception e) {
+        logger.error("getLogisticsInfoList", e);
+        }
+
+        return null;
+    }
+    @Override
+    public List<LogisticsInfo> getLogisticsInfoByPage(Page page, LogisticsInfo record) {
+
+        logger.info("getLogisticsInfoByPage");
+        try {
+
+        Map<String, Object> parameter = new HashMap<String, Object>();
+        parameter.put("record", record);
+        parameter.put(AppConstant.PAGE, page);
+
+        return logisticsInfoMapper.queryLogisticsInfoByPage(parameter);
+        } catch (Exception e) {
+        logger.error("getLogisticsInfoByPage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public LogisticsInfo getLogisticsInfoById(String id) {
+
+        logger.info("getLogisticsInfoyId");
+        try {
+
+            return logisticsInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+        logger.error("getLogisticsInfoById", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public LogisticsInfo getLogisticsInfo(LogisticsInfo record) {
+
+        logger.info("getLogisticsInfo");
+        try {
+
+            return logisticsInfoMapper.queryLogisticsInfo(record);
+        } catch (Exception e) {
+        logger.error("getLogisticsInfo", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean createLogisticsInfo(LogisticsInfo record) {
+
+        logger.info("createLogisticsInfo");
+        try {
+
+            int updates = logisticsInfoMapper.insertSelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createLogisticsInfo", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean deleteLogisticsInfo(String id) {
+
+        logger.info("deleteLogisticsInfo");
+        try {
+
+             int updates = logisticsInfoMapper.delete(id);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deleteLogisticsInfo", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean updateLogisticsInfo(LogisticsInfo record) {
+
+        logger.info("updateLogisticsInfo");
+        try {
+
+            int updates = logisticsInfoMapper.updateByPrimaryKeySelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updateLogisticsInfo", e);
+        }
+
+        return false;
+    }
+}
+

+ 185 - 0
src/main/java/com/izouma/awesomeadmin/web/LogisticsInfoController.java

@@ -0,0 +1,185 @@
+package com.izouma.awesomeadmin.web;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.*;
+
+import com.izouma.awesomeadmin.util.ExportExcelUtil;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.LogisticsInfo;
+import com.izouma.awesomeadmin.service.LogisticsInfoService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * controller类
+ */
+@Controller
+@RequestMapping("/logisticsInfo")
+public class LogisticsInfoController {
+
+    @Autowired
+    private LogisticsInfoService logisticsInfoService;
+
+    /**
+     * <p>获取全部记录。</p>
+     */
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(LogisticsInfo record) {
+        List<LogisticsInfo> pp = logisticsInfoService.getLogisticsInfoList(record);
+        return new Result(true, pp);
+    }
+
+    /**
+     * <p>根据Id。</p>
+     */
+    @RequestMapping(value = "/getLogisticsInfo", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getLogisticsInfo(@RequestParam(required = false, value = "id") String id) {
+        LogisticsInfo data = logisticsInfoService.getLogisticsInfoById(id);
+        return new Result(true, data);
+    }
+
+    /**
+     * <p>根据条件获取。</p>
+     */
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(LogisticsInfo record) {
+        LogisticsInfo data = logisticsInfoService.getLogisticsInfo(record);
+        return new Result(true, data);
+    }
+
+
+    /**
+     * <p>分页查询。</p>
+     */
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, LogisticsInfo record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<LogisticsInfo> pp = logisticsInfoService.getLogisticsInfoByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+
+    /**
+     * <p>保存。</p>
+     */
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(LogisticsInfo record) {
+        boolean num = logisticsInfoService.createLogisticsInfo(record);
+        if (num) {
+            return new Result(true, num);
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+     * <p>更新信息。</p>
+     */
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateLogisticsInfo(LogisticsInfo record) {
+        boolean num = logisticsInfoService.updateLogisticsInfo(record);
+        if (num) {
+            return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+     * <p>删除。</p>
+     */
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteLogisticsInfo(@RequestParam(required = true, value = "id") String id) {
+
+        boolean num = logisticsInfoService.deleteLogisticsInfo(id);
+        if (num) {
+            return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    /**
+     * 导出Excel
+     *
+     * @param request
+     * @param response
+     * @param record
+     * @throws Exception
+     */
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, LogisticsInfo record) throws Exception {
+
+        List<LogisticsInfo> logisticsInfos = logisticsInfoService.getLogisticsInfoList(record);
+
+
+        String sheetName = "logistics_info";
+        String titleName = "快递公司数据表";
+        String fileName = "快递公司表";
+        int columnNumber = 2;
+        int[] columnWidth = {20, 20};
+        String[] columnName = {"物流公司code", "公司名称"};
+        String[][] dataList = new String[logisticsInfos.size()][2];
+
+        for (int i = 0; i < logisticsInfos.size(); i++) {
+
+            dataList[i][0] = String.valueOf(logisticsInfos.get(i).getCode());
+            dataList[i][1] = String.valueOf(logisticsInfos.get(i).getName());
+        }
+
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+
+
+    }
+
+
+    //物流api(物流100)
+    @RequestMapping(value = "/logisticsApi", method = RequestMethod.GET, produces = "text/plain;charset=UTF-8")
+    @ResponseBody
+    public String logisticsApi(@RequestParam(required = false, value = "logisticsCode") String logisticsCode, @RequestParam(required = false, value = "expressCode") String expressCode) {
+
+        String logisticsUrl = "https://m.kuaidi100.com/query?type=" + logisticsCode + "&postid=" + expressCode;
+        StringBuilder json = new StringBuilder();
+        try {
+            URL oracle = new URL(logisticsUrl);
+            URLConnection yc = oracle.openConnection();
+            BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream(), "UTF-8"));
+            String inputLine = null;
+            while ((inputLine = in.readLine()) != null) {
+                json.append(inputLine);
+            }
+            in.close();
+            return json.toString();
+        } catch (MalformedURLException e) {
+        } catch (IOException e) {
+        }
+
+        return "";
+    }
+}
+

+ 108 - 0
src/main/vue/src/pages/LogisticsInfo.vue

@@ -0,0 +1,108 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small"
+                 style="max-width: 500px;">
+                                                            <el-form-item prop="code" label="物流公司code">
+                <el-input v-model="formData.code" :disabled="'code'==subColumn"></el-input>
+            </el-form-item>
+                                                                                                                                                                                                                                                                                                                            <el-form-item prop="name" label="公司名称">
+                <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+            </el-form-item>
+                                                                                                                                                                                                                                                                                        <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+    import formValidator from '../formValidator'
+
+    export default {
+        created() {
+            if (this.$route.query.column) {
+                this.subColumn = this.$route.query.column.split(',')[1];
+                this.subValue = this.$route.query.column.split(',')[0];
+            }
+
+            if (this.$route.query.id) {
+                this.$http.get({
+                    url: '/logisticsInfo/getOne',
+                    data: {
+                        id: this.$route.query.id
+                    }
+                }).then(res => {
+                    if (res.success) {
+
+                                                                                                                                
+                        this.formData = res.data;
+
+                    if (this.$route.query.column) {
+                        this.formData[this.subColumn] = this.subValue;
+                    }
+                    }
+                })
+            }else {
+                if (this.$route.query.column) {
+                    this.formData[this.subColumn] = this.subValue;
+                }
+            }
+
+                                                                            },
+        data() {
+            return {
+                saving: false,
+                formData: {},
+                rules: {
+                                                                            },
+                            subColumn: '',
+            subValue: '',
+        }
+        },
+        methods: {
+            onSave() {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.submit();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            submit() {
+                var data = JSON.parse(JSON.stringify(this.formData));
+                this.$http.post({
+                    url: this.formData.id ? '/logisticsInfo/update' : '/logisticsInfo/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            },
+            onDelete() {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                    return this.$http.post({
+                    url: '/logisticsInfo/del',
+                    data: { id: this.formData.id }
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                }).catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            },
+        }
+    }
+</script>
+<style lang="less" scoped>
+</style>

+ 384 - 0
src/main/vue/src/pages/LogisticsInfos.vue

@@ -0,0 +1,384 @@
+<template>
+    <div>
+        <div class="filters-container">
+
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
+            </el-button>
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small" icon="el-icon-search" class="filter-item">高级查询
+            </el-button>
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
+            </el-button>
+            <!-- <el-button @click="$router.push({path:'/logisticsInfo',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
+            </el-button> -->
+            <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
+            </el-button>
+            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                <span>
+                    筛选数据
+                    <i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
+                    </el-checkbox>
+                </el-dropdown-menu>
+            </el-dropdown>
+        </div>
+        <el-table :data="tableData" :height="tableHeight" row-key="id" ref="table">
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50">
+            </el-table-column>
+            <el-table-column type="index" min-width="50" align="center">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('code')" prop="code" label="物流公司code" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('name')" prop="name" label="公司名称" min-width="100">
+            </el-table-column>
+            <!-- <el-table-column label="操作" align="center" fixed="right" min-width="150">
+                <template slot-scope="scope">
+                    <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
+                </template>
+            </el-table-column> -->
+        </el-table>
+        <div class="pagination-wrapper">
+            <div class="multiple-mode-wrapper" v-if="0">
+                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button size="small" @click="operation1">批量操作1</el-button>
+                    <el-button size="small" @click="operation2">批量操作2</el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div>
+            <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
+            </el-pagination>
+        </div>
+        <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="advancedQueryFields">
+
+                <el-table-column prop="link" label="链接符" align="center">
+                    <template slot-scope="{row}">
+                        <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
+                            <el-option label="AND" value="AND">
+                            </el-option>
+                            <el-option label="OR" value="OR">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.searchMethod">
+                            <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="value" label="参数" align="center">
+                    <template slot-scope="{row}">
+                        <el-input v-model="row.value"></el-input>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="排序" :visible.sync="showTableSortDialog">
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="tableSortFields">
+
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="order" label="排序" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.order">
+                            <el-option label="降序" value="desc">
+                            </el-option>
+                            <el-option label="升序" value="asc">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
+            <img width="100%" :src="imgSrc" alt="">
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+
+export default {
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: '物流公司code',
+                    value: 'code',
+                    show: true
+                },
+                {
+                    label: '公司名称',
+                    value: 'name',
+                    show: true
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: '物流公司code',
+                    value: 'code'
+                },
+                {
+                    label: '公司名称',
+                    value: 'name'
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        }
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
+            this.getData();
+        },
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
+        },
+        getData() {
+
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+            }
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+            }
+
+            this.$http.get({
+                url: '/logisticsInfo/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
+                }
+            })
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/logisticsInfo',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                }
+            })
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (item.link && item.name && item.searchMethod && item.value) {
+                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+
+            this.orderByStr = '';
+
+            if (this.tableSortFields.length > 0) {
+
+                var templist = [];
+
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.orderByStr = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/logisticsInfo/exportExcel?searchKey="
+                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/logisticsInfo/del',
+                    data: { id: row.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.getData();
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+            }
+
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
+
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+
+    }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 115 - 79
src/main/vue/src/pages/OrderLogistics.vue

@@ -1,26 +1,30 @@
 <template>
     <div>
-        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small"
-                 style="max-width: 500px;">
-                                                                                                                                                                                                                                    <el-form-item prop="orderId" label="订单">
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <el-form-item prop="orderId" label="订单">
                 <el-input v-model="formData.orderId" :disabled="'orderId'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="userId" label="用户">
+            <el-form-item prop="userId" label="用户">
                 <el-input v-model="formData.userId" :disabled="'userId'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="logistic" label="物流公司">
-                <el-input v-model="formData.logistic" :disabled="'logistic'==subColumn"></el-input>
+            <el-form-item prop="logistic" label="物流公司">
+                <template>
+                    <el-select v-model="formData.logistic" clearable filterable  placeholder="请选择" :disabled="'logistic'==subColumn">
+                        <el-option v-for="item in logisticOptions" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="trackingNo" label="快递单号">
+            <el-form-item prop="trackingNo" label="快递单号">
                 <el-input v-model="formData.trackingNo" :disabled="'trackingNo'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="typeFlag" label="类型">
+            <el-form-item prop="typeFlag" label="类型">
                 <el-input v-model="formData.typeFlag" :disabled="'typeFlag'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="remark" label="备注">
+            <el-form-item prop="remark" label="备注">
                 <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                        <el-form-item>
+            <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
                 <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
@@ -29,92 +33,124 @@
     </div>
 </template>
 <script>
-    import formValidator from '../formValidator'
+import formValidator from '../formValidator'
 
-    export default {
-        created() {
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
-            }
+export default {
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
 
-            if (this.$route.query.id) {
-                this.$http.get({
-                    url: '/orderLogistics/getOne',
-                    data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
-                    if (res.success) {
+        if (this.$route.query.id) {
+            this.$http.get({
+                url: '/orderLogistics/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
-                        this.formData = res.data;
+
+                    this.formData = res.data;
 
                     if (this.$route.query.column) {
                         this.formData[this.subColumn] = this.subValue;
                     }
-                    }
-                })
-            }else {
-                if (this.$route.query.column) {
-                    this.formData[this.subColumn] = this.subValue;
                 }
+            })
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
             }
+        }
+
+
+
 
-                                                                                                                                                                                                                                                                                                                                                                    },
-        data() {
-            return {
-                saving: false,
-                formData: {},
-                rules: {
-                                                                                                                                                                                                                                                                                                                                                                    },
-                                                                                                            subColumn: '',
+        this.$http.get({
+            url: '/logisticsInfo/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.logisticOptions.push({ label: item.name, value: item.code });
+                    })
+                }
+            }
+        });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {
+                orderId:
+                    [
+                        { required: true, message: '请输入 订单', trigger: 'blur' },
+                    ],
+                userId:
+                    [
+                        { required: true, message: '请输入 用户', trigger: 'blur' },
+                    ],
+                logistic:
+                    [
+                        { required: true, message: '请输入 物流公司', trigger: 'blur' },
+                    ],
+                trackingNo:
+                    [
+                        { required: true, message: '请输入 快递单号', trigger: 'blur' },
+                    ],
+            },
+            logisticOptions: [],
+            subColumn: '',
             subValue: '',
         }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
         },
-        methods: {
-            onSave() {
-                this.$refs.form.validate((valid) => {
-                    if (valid) {
-                        this.submit();
-                    } else {
-                        return false;
-                    }
-                });
-            },
-            submit() {
-                var data = JSON.parse(JSON.stringify(this.formData));
-                this.$http.post({
-                    url: this.formData.id ? '/orderLogistics/update' : '/orderLogistics/save',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.$message.success('成功');
-                        this.$router.go(-1);
-                    } else {
-                        this.$message.warning('失败')
-                    }
-                });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                    return this.$http.post({
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/orderLogistics/update' : '/orderLogistics/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
                     url: '/orderLogistics/del',
                     data: { id: this.formData.id }
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
                 })
-            },
-        }
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
     }
+}
 </script>
 <style lang="less" scoped>
 </style>

+ 10 - 0
src/main/vue/src/router/index.js

@@ -584,6 +584,16 @@ const router = new Router({
                     path: '/companyTypes',
                     name: 'CompanyTypes',
                     component: () => import('../pages/CompanyTypes')
+                },
+                {
+                    path: '/logisticsInfo',
+                    name: 'LogisticsInfo',
+                    component: () => import('../pages/LogisticsInfo')
+                },
+                {
+                    path: '/logisticsInfos',
+                    name: 'LogisticsInfos',
+                    component: () => import('../pages/LogisticsInfos')
                 }
                 /**INSERT_LOCATION**/
             ]