소스 검색

Merge branch 'master' of http://git.ds-bay.com/project/kmall-pt-general

hhq 4 년 전
부모
커밋
0504aedf0a
31개의 변경된 파일1780개의 추가작업 그리고 43개의 파일을 삭제
  1. 19 0
      kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java
  2. 8 3
      kmall-admin/src/main/java/com/kmall/admin/controller/GoodsTransportInfoDetailController.java
  3. 95 0
      kmall-admin/src/main/java/com/kmall/admin/dto/BranchDetailDto.java
  4. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dto/GoodsPanoramaDto.java
  5. 117 0
      kmall-admin/src/main/java/com/kmall/admin/dto/GoodsTransportInfoDetailExcelDto.java
  6. 182 0
      kmall-admin/src/main/java/com/kmall/admin/dto/InventoryDetailDto.java
  7. 9 0
      kmall-admin/src/main/java/com/kmall/admin/dto/StoreDetailDto.java
  8. 37 0
      kmall-admin/src/main/java/com/kmall/admin/entity/GoodsTransportInfoDetailEntity.java
  9. 9 0
      kmall-admin/src/main/java/com/kmall/admin/entity/alarm/Mall2OrderingEarlyWarningRemindsEntity.java
  10. 9 0
      kmall-admin/src/main/java/com/kmall/admin/entity/mk/Mk2GoodsTopicPriceEntity.java
  11. 3 0
      kmall-admin/src/main/java/com/kmall/admin/service/GoodsTransportInfoDetailService.java
  12. 31 4
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsTransportInfoDetailServiceImpl.java
  13. 4 1
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  14. 1 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/alarm/Mall2OrderingEarlyWarningRemindsServiceImpl.java
  15. 23 0
      kmall-admin/src/main/resources/XmlTemplate/GoodsTransportInfoDetailEntityList.xml
  16. 17 2
      kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml
  17. 4 3
      kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml
  18. 10 0
      kmall-admin/src/main/resources/mybatis/mapper/alarm/Mall2OrderingEarlyWarningRemindsDao.xml
  19. 18 16
      kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2GoodsTopicPriceDao.xml
  20. 1 1
      kmall-admin/src/main/webapp/WEB-INF/page/cashier/cashierManager.html
  21. 2 2
      kmall-admin/src/main/webapp/WEB-INF/page/mk/mk2memberbirthday.html
  22. 2 2
      kmall-admin/src/main/webapp/WEB-INF/page/mk/storetopic.html
  23. 243 0
      kmall-admin/src/main/webapp/WEB-INF/page/sale/goodsPanorama.html
  24. 0 1
      kmall-admin/src/main/webapp/js/mk/mk2goodstopichistoryprice.js
  25. 1 2
      kmall-admin/src/main/webapp/js/mk/mk2goodstopicprice.js
  26. 2 2
      kmall-admin/src/main/webapp/js/mk/mk2memberbirthday.js
  27. 0 1
      kmall-admin/src/main/webapp/js/mk/storetopic.js
  28. 923 0
      kmall-admin/src/main/webapp/js/sale/goodsPanorama.js
  29. 1 1
      kmall-admin/src/main/webapp/js/sale/sale.js
  30. 5 2
      kmall-admin/src/main/webapp/login.html
  31. 2 0
      kmall-common/src/main/java/com/kmall/common/constant/JxlsXmlTemplateName.java

+ 19 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java

@@ -81,6 +81,25 @@ public class GoodsController {
     }
 
     /**
+     * 查看信息
+     */
+    @RequestMapping("/infoByQuery")
+    public R infoByQuery(@RequestParam Map<String, Object> params) {
+        ParamUtils.setQueryPowerByRoleType(params, "storeKey", "merchSn", "thirdPartyMerchCode");
+        ParamUtils.setName(params, "name");
+        //查询列表数据
+        Query query = new Query(params);
+
+        query.put("isDelete", 0);
+        List<GoodsEntity> goodsList = goodsService.queryList(query);
+        if(goodsList != null && goodsList.size() != 0) {
+            return R.ok().put("goods", goodsList.get(0));
+        }
+        return R.ok().put("goods", new GoodsEntity());
+    }
+
+
+    /**
      * 保存
      */
     @RequestMapping("/save")

+ 8 - 3
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsTransportInfoDetailController.java

@@ -2,6 +2,7 @@ package com.kmall.admin.controller;
 
 import java.util.*;
 
+import com.kmall.admin.dto.GoodsTransportInfoDetailExcelDto;
 import com.kmall.admin.entity.GoodsTransportInfoEntity;
 import com.kmall.common.constant.JxlsXmlTemplateName;
 import com.kmall.common.utils.PageUtils;
@@ -151,18 +152,22 @@ public class GoodsTransportInfoDetailController {
     @PostMapping("/transInfoDetailUpload")
     @ResponseBody
     public R transInfoDetailUpload(@RequestParam("file") MultipartFile file) {
-        List<GoodsTransportInfoDetailEntity> list = new ArrayList<>();
+        List<GoodsTransportInfoDetailExcelDto> goodsTransportInfoDetailExcelDtoList = new ArrayList<>();
         //上传文件
         try {
-
+            GoodsTransportInfoDetailExcelDto goodsTransportInfoDetailExcelDto = new GoodsTransportInfoDetailExcelDto();
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("GoodsTransportInfoDetailExcelDto", goodsTransportInfoDetailExcelDto);
+            beans.put("GoodsTransportInfoDetailExcelDtoList", goodsTransportInfoDetailExcelDtoList);
             if (file.isEmpty()) {
                 return R.error("文件不能为空!");
             }
-
+            excelUtil.readExcel(JxlsXmlTemplateName.GOODS_TRANSPORT_INFO_DETAIL_ENTITY_LIST, beans, file.getInputStream());
         } catch (Exception e) {
             e.printStackTrace();
             return R.error("导入失败!");
         }
+        goodsTransportInfoDetailService.saveExcelDtoList(goodsTransportInfoDetailExcelDtoList);
         return R.ok("导入成功!");
     }
 }

+ 95 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/BranchDetailDto.java

@@ -0,0 +1,95 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+/**
+ * 分店信息dto
+ */
+public class BranchDetailDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    // id
+    private Integer id;
+    // 商户编号
+    private String merchSn;
+    // 商户名称
+    private String merchName;
+    // 门店名称
+    private String storeName;
+    // 门店编号
+    private String storeNumber;
+    // 门店地址
+    private String storeAddress;
+
+    @Override
+    public String toString() {
+        return "BranchDetailDto{" +
+                "id=" + id +
+                ", merchSn='" + merchSn + '\'' +
+                ", merchName='" + merchName + '\'' +
+                ", storeName='" + storeName + '\'' +
+                ", storeNumber='" + storeNumber + '\'' +
+                ", storeAddress='" + storeAddress + '\'' +
+                '}';
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getMerchName() {
+        return merchName;
+    }
+
+    public void setMerchName(String merchName) {
+        this.merchName = merchName;
+    }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+    public String getStoreNumber() {
+        return storeNumber;
+    }
+
+    public void setStoreNumber(String storeNumber) {
+        this.storeNumber = storeNumber;
+    }
+
+    public String getStoreAddress() {
+        return storeAddress;
+    }
+
+    public void setStoreAddress(String storeAddress) {
+        this.storeAddress = storeAddress;
+    }
+
+    public BranchDetailDto() {
+    }
+
+    public BranchDetailDto(Integer id, String merchSn, String merchName, String storeName, String storeNumber, String storeAddress) {
+        this.id = id;
+        this.merchSn = merchSn;
+        this.merchName = merchName;
+        this.storeName = storeName;
+        this.storeNumber = storeNumber;
+        this.storeAddress = storeAddress;
+    }
+}

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/GoodsPanoramaDto.java

@@ -255,4 +255,6 @@ public class GoodsPanoramaDto implements Serializable {
         this.goodsSn = goodsSn;
         this.brand = brand;
     }
+
+
 }

+ 117 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/GoodsTransportInfoDetailExcelDto.java

@@ -0,0 +1,117 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+public class GoodsTransportInfoDetailExcelDto implements Serializable {
+
+    /**
+     * 是否在途(0:是,1:否,默认为0)
+     */
+    private String wayStatus;
+    /**
+     * 商品sku
+     */
+    private String sku;
+    /**
+     * 供应商id
+     */
+    private String supplierId;
+    /**
+     * 原产地
+     */
+    private String originCountry;
+    /**
+     * 数量
+     */
+    private String num;
+    /**
+     * 创建人编号
+     */
+    private String createrSn;
+    /**
+     * 修改人编号
+     */
+    private String moderSn;
+
+    public String getWayStatus() {
+        return wayStatus;
+    }
+
+    public void setWayStatus(String wayStatus) {
+        this.wayStatus = wayStatus;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getSupplierId() {
+        return supplierId;
+    }
+
+    public void setSupplierId(String supplierId) {
+        this.supplierId = supplierId;
+    }
+
+    public String getOriginCountry() {
+        return originCountry;
+    }
+
+    public void setOriginCountry(String originCountry) {
+        this.originCountry = originCountry;
+    }
+
+    public String getNum() {
+        return num;
+    }
+
+    public void setNum(String num) {
+        this.num = num;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    @Override
+    public String toString() {
+        return "GoodsTransportInfoDetailExcelDto{" +
+                "wayStatus='" + wayStatus + '\'' +
+                ", sku='" + sku + '\'' +
+                ", supplierId='" + supplierId + '\'' +
+                ", originCountry='" + originCountry + '\'' +
+                ", num='" + num + '\'' +
+                ", createrSn='" + createrSn + '\'' +
+                ", moderSn='" + moderSn + '\'' +
+                '}';
+    }
+
+    public GoodsTransportInfoDetailExcelDto() {
+    }
+
+    public GoodsTransportInfoDetailExcelDto(String wayStatus, String sku, String supplierId, String originCountry, String num, String createrSn, String moderSn) {
+        this.wayStatus = wayStatus;
+        this.sku = sku;
+        this.supplierId = supplierId;
+        this.originCountry = originCountry;
+        this.num = num;
+        this.createrSn = createrSn;
+        this.moderSn = moderSn;
+    }
+}

+ 182 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/InventoryDetailDto.java

@@ -0,0 +1,182 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 进销存明细dto(商品全景)
+ */
+public class InventoryDetailDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+
+    // id
+    private Integer id;
+    // 单据号
+    private String documentNo;
+    // 日期
+    private Date inventoryDate;
+    // 方式
+    private String inventoryModel;
+    // 数量(+)
+    private Integer numberAdd;
+    // 数量(-)
+    private Integer numberSub;
+    // 期末库存
+    private Integer endingInventory;
+    // 应存数量
+    private Integer shouldNumber;
+    // 成本价
+    private Double costPrice;
+    // 售价
+    private Double salePrice;
+    // 金额进价(-)
+    private Double moneyBidAdd;
+    // 金额进价(-)
+    private Double moneyBidSub;
+    // 期末金额(进价)
+    private Double endingPrice;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getDocumentNo() {
+        return documentNo;
+    }
+
+    public void setDocumentNo(String documentNo) {
+        this.documentNo = documentNo;
+    }
+
+    public Date getInventoryDate() {
+        return inventoryDate;
+    }
+
+    public void setInventoryDate(Date inventoryDate) {
+        this.inventoryDate = inventoryDate;
+    }
+
+    public String getInventoryModel() {
+        return inventoryModel;
+    }
+
+    public void setInventoryModel(String inventoryModel) {
+        this.inventoryModel = inventoryModel;
+    }
+
+    public Integer getNumberAdd() {
+        return numberAdd;
+    }
+
+    public void setNumberAdd(Integer numberAdd) {
+        this.numberAdd = numberAdd;
+    }
+
+    public Integer getNumberSub() {
+        return numberSub;
+    }
+
+    public void setNumberSub(Integer numberSub) {
+        this.numberSub = numberSub;
+    }
+
+    public Integer getEndingInventory() {
+        return endingInventory;
+    }
+
+    public void setEndingInventory(Integer endingInventory) {
+        this.endingInventory = endingInventory;
+    }
+
+    public Integer getShouldNumber() {
+        return shouldNumber;
+    }
+
+    public void setShouldNumber(Integer shouldNumber) {
+        this.shouldNumber = shouldNumber;
+    }
+
+    public Double getCostPrice() {
+        return costPrice;
+    }
+
+    public void setCostPrice(Double costPrice) {
+        this.costPrice = costPrice;
+    }
+
+    public Double getSalePrice() {
+        return salePrice;
+    }
+
+    public void setSalePrice(Double salePrice) {
+        this.salePrice = salePrice;
+    }
+
+    public Double getMoneyBidAdd() {
+        return moneyBidAdd;
+    }
+
+    public void setMoneyBidAdd(Double moneyBidAdd) {
+        this.moneyBidAdd = moneyBidAdd;
+    }
+
+    public Double getMoneyBidSub() {
+        return moneyBidSub;
+    }
+
+    public void setMoneyBidSub(Double moneyBidSub) {
+        this.moneyBidSub = moneyBidSub;
+    }
+
+    public Double getEndingPrice() {
+        return endingPrice;
+    }
+
+    public void setEndingPrice(Double endingPrice) {
+        this.endingPrice = endingPrice;
+    }
+
+    public InventoryDetailDto() {
+    }
+
+    public InventoryDetailDto(Integer id, String documentNo, Date inventoryDate, String inventoryModel, Integer numberAdd, Integer numberSub, Integer endingInventory, Integer shouldNumber, Double costPrice, Double salePrice, Double moneyBidAdd, Double moneyBidSub, Double endingPrice) {
+        this.id = id;
+        this.documentNo = documentNo;
+        this.inventoryDate = inventoryDate;
+        this.inventoryModel = inventoryModel;
+        this.numberAdd = numberAdd;
+        this.numberSub = numberSub;
+        this.endingInventory = endingInventory;
+        this.shouldNumber = shouldNumber;
+        this.costPrice = costPrice;
+        this.salePrice = salePrice;
+        this.moneyBidAdd = moneyBidAdd;
+        this.moneyBidSub = moneyBidSub;
+        this.endingPrice = endingPrice;
+    }
+
+    @Override
+    public String toString() {
+        return "InventoryDetailDto{" +
+                "id=" + id +
+                ", documentNo='" + documentNo + '\'' +
+                ", inventoryDate=" + inventoryDate +
+                ", inventoryModel='" + inventoryModel + '\'' +
+                ", numberAdd=" + numberAdd +
+                ", numberSub=" + numberSub +
+                ", endingInventory=" + endingInventory +
+                ", shouldNumber=" + shouldNumber +
+                ", costPrice=" + costPrice +
+                ", salePrice=" + salePrice +
+                ", moneyBidAdd=" + moneyBidAdd +
+                ", moneyBidSub=" + moneyBidSub +
+                ", endingPrice=" + endingPrice +
+                '}';
+    }
+}

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/StoreDetailDto.java

@@ -0,0 +1,9 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+/**
+ * 库存信息dto
+ */
+public class StoreDetailDto implements Serializable {
+}

+ 37 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/GoodsTransportInfoDetailEntity.java

@@ -202,4 +202,41 @@ public class GoodsTransportInfoDetailEntity implements Serializable {
     public Date getTstm() {
         return tstm;
     }
+
+
+
+
+    @Override
+    public String toString() {
+        return "GoodsTransportInfoDetailEntity{" +
+                "transItemId=" + transItemId +
+                ", wayStatus=" + wayStatus +
+                ", sku='" + sku + '\'' +
+                ", supplierId=" + supplierId +
+                ", originCountry='" + originCountry + '\'' +
+                ", num=" + num +
+                ", createrSn='" + createrSn + '\'' +
+                ", createTime=" + createTime +
+                ", moderSn='" + moderSn + '\'' +
+                ", modTime=" + modTime +
+                ", tstm=" + tstm +
+                '}';
+    }
+
+    public GoodsTransportInfoDetailEntity() {
+    }
+
+    public GoodsTransportInfoDetailEntity(Integer transItemId, Integer wayStatus, String sku, Integer supplierId, String originCountry, Integer num, String createrSn, Date createTime, String moderSn, Date modTime, Date tstm) {
+        this.transItemId = transItemId;
+        this.wayStatus = wayStatus;
+        this.sku = sku;
+        this.supplierId = supplierId;
+        this.originCountry = originCountry;
+        this.num = num;
+        this.createrSn = createrSn;
+        this.createTime = createTime;
+        this.moderSn = moderSn;
+        this.modTime = modTime;
+        this.tstm = tstm;
+    }
 }

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/alarm/Mall2OrderingEarlyWarningRemindsEntity.java

@@ -27,6 +27,7 @@ public class Mall2OrderingEarlyWarningRemindsEntity implements Serializable {
      * 商品名称
      */
     private String goodsName;
+    private String sku;
     /**
      * 平均销量
      */
@@ -237,4 +238,12 @@ public class Mall2OrderingEarlyWarningRemindsEntity implements Serializable {
     public Date getTstm() {
         return tstm;
     }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
 }

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/mk/Mk2GoodsTopicPriceEntity.java

@@ -43,6 +43,7 @@ public class Mk2GoodsTopicPriceEntity implements Serializable {
      * 活动产品
      */
     private String topicGoodsSku;
+    private String goodsName;
     /**
      * 活动开始时间
      */
@@ -267,4 +268,12 @@ public class Mk2GoodsTopicPriceEntity implements Serializable {
     public void setTopicGoodsSku(String topicGoodsSku) {
         this.topicGoodsSku = topicGoodsSku;
     }
+
+    public String getGoodsName() {
+        return goodsName;
+    }
+
+    public void setGoodsName(String goodsName) {
+        this.goodsName = goodsName;
+    }
 }

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/service/GoodsTransportInfoDetailService.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.service;
 
+import com.kmall.admin.dto.GoodsTransportInfoDetailExcelDto;
 import com.kmall.admin.entity.GoodsTransportInfoDetailEntity;
 import com.kmall.common.utils.Query;
 
@@ -75,4 +76,6 @@ public interface GoodsTransportInfoDetailService {
     List<GoodsTransportInfoDetailEntity> searchListByStatusAndSku(Query query, Integer wayStatus, String sku);
 
     int queryTotalByStatusAndSku(Query query, Integer wayStatus, String sku);
+
+    void saveExcelDtoList(List<GoodsTransportInfoDetailExcelDto> goodsTransportInfoDetailExcelDtoList);
 }

+ 31 - 4
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsTransportInfoDetailServiceImpl.java

@@ -1,16 +1,19 @@
 package com.kmall.admin.service.impl;
 
+import com.kmall.admin.dao.GoodsTransportInfoDetailDao;
+import com.kmall.admin.dto.GoodsTransportInfoDetailExcelDto;
+import com.kmall.admin.entity.GoodsTransportInfoDetailEntity;
+import com.kmall.admin.service.GoodsTransportInfoDetailService;
 import com.kmall.common.utils.Query;
+import com.kmall.common.utils.RRException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
-import com.kmall.admin.dao.GoodsTransportInfoDetailDao;
-import com.kmall.admin.entity.GoodsTransportInfoDetailEntity;
-import com.kmall.admin.service.GoodsTransportInfoDetailService;
-
 /**
  * 在途商品明细表Service实现类
  *
@@ -68,4 +71,28 @@ public class GoodsTransportInfoDetailServiceImpl implements GoodsTransportInfoDe
         return goodsTransportInfoDetailDao.queryTotalByStatusAndSku(query,wayStatus,sku);
     }
 
+    @Override
+    @Transactional
+    public void saveExcelDtoList(List<GoodsTransportInfoDetailExcelDto> goodsTransportInfoDetailExcelDtoList) {
+        goodsTransportInfoDetailExcelDtoList.forEach(goodsTransportInfoDetailExcelDto -> {
+            GoodsTransportInfoDetailEntity goodsTransportInfoDetailEntity = new GoodsTransportInfoDetailEntity();
+            if (goodsTransportInfoDetailExcelDto.getWayStatus()==null ||
+                    (Integer.parseInt(goodsTransportInfoDetailExcelDto.getWayStatus())!=0
+                            && Integer.parseInt(goodsTransportInfoDetailExcelDto.getWayStatus()) != 1)){
+                throw new RRException("是否在途必填,且只能填0或1");
+            }
+            goodsTransportInfoDetailEntity.setWayStatus(Integer.parseInt(goodsTransportInfoDetailExcelDto.getWayStatus()));
+            goodsTransportInfoDetailEntity.setSku(goodsTransportInfoDetailExcelDto.getSku());
+            goodsTransportInfoDetailEntity.setSupplierId(Integer.parseInt(goodsTransportInfoDetailExcelDto.getSupplierId()));
+            goodsTransportInfoDetailEntity.setOriginCountry(goodsTransportInfoDetailExcelDto.getOriginCountry());
+            goodsTransportInfoDetailEntity.setNum(Integer.parseInt(goodsTransportInfoDetailExcelDto.getNum()));
+            goodsTransportInfoDetailEntity.setCreaterSn(goodsTransportInfoDetailExcelDto.getCreaterSn());
+            goodsTransportInfoDetailEntity.setModerSn(goodsTransportInfoDetailExcelDto.getModerSn());
+            goodsTransportInfoDetailEntity.setTstm(new Date());
+            goodsTransportInfoDetailEntity.setModTime(new Date());
+            goodsTransportInfoDetailEntity.setCreateTime(new Date());
+            goodsTransportInfoDetailDao.save(goodsTransportInfoDetailEntity);
+        });
+    }
+
 }

+ 4 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -131,6 +131,8 @@ public class OrderServiceImpl implements OrderService {
     @Autowired
     private CashierLoginRecordDao cashierLoginRecordDao; // 收银员登录记录
     @Autowired
+    private SaleRecordDao saleRecordDao; // 销售记录
+    @Autowired
     private StoreTopicDao storeTopicDao; // 查询是否有门店活动
     @Autowired
     private Mk2GoodsTopicPriceDao mk2GoodsTopicPriceDao; // 门店商品价格
@@ -1838,7 +1840,8 @@ public class OrderServiceImpl implements OrderService {
                 saleRecordEntity.setSallerId(userId+"");
                 saleRecordEntity.setSalesTime(new Date());
                 saleRecordEntity.setDiscountId(topicId + "");
-
+                saleRecordEntity.setCreateTime(new Date());
+                saleRecordDao.save(saleRecordEntity);
             }
 
             // 查询积分规则 ,默认先按消费金额1:1积分

+ 1 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/alarm/Mall2OrderingEarlyWarningRemindsServiceImpl.java

@@ -148,6 +148,7 @@ public class Mall2OrderingEarlyWarningRemindsServiceImpl implements Mall2Orderin
                     if(orderingEarlyWarningRemindsEntity == null){
                         orderingEarlyWarningRemindsEntity = new Mall2OrderingEarlyWarningRemindsEntity();
                         orderingEarlyWarningRemindsEntity.setAverageSales(new BigDecimal(totalSellVolumn));
+                        orderingEarlyWarningRemindsEntity.setSku(goodsEntity.getGoodsSn());
                         orderingEarlyWarningRemindsEntity.setTotalNum(totalNum);
                         orderingEarlyWarningRemindsEntity.setGoodsId(goodsEntity.getId().intValue());
                         orderingEarlyWarningRemindsEntity.setGoodsName(goodsEntity.getName());

+ 23 - 0
kmall-admin/src/main/resources/XmlTemplate/GoodsTransportInfoDetailEntityList.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="GoodsTransportInfoDetailExcelDtoList" var="GoodsTransportInfoDetailExcelDto"
+              varType="com.kmall.admin.dto.GoodsTransportInfoDetailExcelDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">GoodsTransportInfoDetailExcelDto.wayStatus</mapping>
+                <mapping row="1" col="1">GoodsTransportInfoDetailExcelDto.sku</mapping>
+                <mapping row="1" col="2">GoodsTransportInfoDetailExcelDto.supplierId</mapping>
+                <mapping row="1" col="3">GoodsTransportInfoDetailExcelDto.originCountry</mapping>
+                <mapping row="1" col="4">GoodsTransportInfoDetailExcelDto.num</mapping>
+                <mapping row="1" col="5">GoodsTransportInfoDetailExcelDto.createrSn</mapping>
+                <mapping row="1" col="6">GoodsTransportInfoDetailExcelDto.moderSn</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0"></cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 17 - 2
kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml

@@ -163,6 +163,9 @@
         <if test="sku != null and sku.trim() != ''">
             AND gs.sku = #{sku}
         </if>
+        <if test="prodBarcode != null and prodBarcode.trim() != ''">
+            AND gs.prod_barcode = #{prodBarcode}
+        </if>
         <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
             AND s.third_party_merch_code = #{thirdPartyMerchCode}
         </if>
@@ -361,6 +364,9 @@
         <if test="sku != null and sku.trim() != ''">
             AND gs.sku = #{sku}
         </if>
+        <if test="prodBarcode != null and prodBarcode.trim() != ''">
+            AND gs.prod_barcode = #{prodBarcode}
+        </if>
         <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
             AND s.third_party_merch_code = #{thirdPartyMerchCode}
         </if>
@@ -405,17 +411,20 @@
         </if>
     </select>
     <select id="queryOffilineOrderList" resultType="com.kmall.admin.entity.OrderEntity">
-        SELECT
+        SELECT distinct
         o.*,
         u.username AS username,
         p.is_payment_send,
         p.is_ele_order_send,
-        p.is_customs_send
+        p.is_customs_send,
+        s.store_name storeName
         FROM
         mall_order o
         LEFT JOIN sys_user u ON o.user_id = u.user_id
         LEFT JOIN mall_order_process_record p ON o.order_sn = p.order_sn
+        LEFT JOIN mall_order_goods g ON o.id = g.order_id
         left join mall_store s on o.store_id = s.id
+        LEFT JOIN mall_goods gs ON g.goods_id = gs.id
         WHERE 1=1
         <if test="storeId != null and storeId != ''">
             AND o.store_id = #{storeId}
@@ -423,6 +432,12 @@
         <if test="merchSn != null and merchSn.trim() != ''">
             AND o.merch_sn = #{merchSn}
         </if>
+        <if test="sku != null and sku.trim() != ''">
+            AND gs.sku = #{sku}
+        </if>
+        <if test="prodBarcode != null and prodBarcode.trim() != ''">
+            AND gs.prod_barcode = #{prodBarcode}
+        </if>
         <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
             AND s.third_party_merch_code = #{thirdPartyMerchCode}
         </if>

+ 4 - 3
kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml

@@ -207,6 +207,9 @@
         <if test="categoryTwo != null and categoryTwo != ''">
             AND a.category_id = #{categoryTwo}
         </if>
+        <if test="prodBarcode != null and prodBarcode != ''">
+            AND b.prod_barcode = #{prodBarcode}
+        </if>
         <if test="storeId != null and storeId != '' ">
             AND a.store_id = #{storeId}
         </if>
@@ -231,9 +234,7 @@
         <if test="productId != null">
             AND a.product_id = #{productId}
         </if>
-        <if test="storeId != null and storeId != ''">
-            AND s.id = #{storeId}
-        </if>
+
         <if test="goodsBizType != null and goodsBizType != ''">
             AND b.goods_biz_type = #{goodsBizType}
         </if>

+ 10 - 0
kmall-admin/src/main/resources/mybatis/mapper/alarm/Mall2OrderingEarlyWarningRemindsDao.xml

@@ -7,6 +7,7 @@
         <result property="moewrId" column="moewr_id"/>
         <result property="goodsId" column="goods_id"/>
         <result property="goodsName" column="goods_name"/>
+		<result property="sku" column="sku"/>
         <result property="averageSales" column="average_sales"/>
         <result property="totalNum" column="total_num"/>
         <result property="alarmType" column="alarm_type"/>
@@ -24,6 +25,7 @@
 			`moewr_id`,
 			`goods_id`,
 			`goods_name`,
+			`sku`,
 			`average_sales`,
 			`total_num`,
 			`alarm_type`,
@@ -43,6 +45,7 @@
     		`moewr_id`,
     		`goods_id`,
     		`goods_name`,
+    		`sku`,
     		`average_sales`,
     		`total_num`,
     		`alarm_type`,
@@ -86,6 +89,7 @@
 			`moewr_id`,
 			`goods_id`,
 			`goods_name`,
+			`sku`,
 			`average_sales`,
 			`total_num`,
 			`alarm_type`,
@@ -100,6 +104,7 @@
 			#{moewrId},
 			#{goodsId},
 			#{goodsName},
+			#{sku},
 			#{averageSales},
 			#{totalNum},
 			#{alarmType},
@@ -117,6 +122,7 @@
 		<set>
 			<if test="goodsId != null">`goods_id` = #{goodsId}, </if>
 			<if test="goodsName != null">`goods_name` = #{goodsName}, </if>
+			<if test="sku != null">`sku` = #{sku}, </if>
 			<if test="averageSales != null">`average_sales` = #{averageSales}, </if>
 			<if test="totalNum != null">`total_num` = #{totalNum}, </if>
 			<if test="alarmType != null">`alarm_type` = #{alarmType}, </if>
@@ -147,6 +153,7 @@
 			`moewr_id`,
 			`goods_id`,
 			`goods_name`,
+			`sku`,
 			`average_sales`,
 			`total_num`,
 			`alarm_type`,
@@ -163,6 +170,7 @@
 			#{item.moewrId},
 			#{item.goodsId},
 			#{item.goodsName},
+			#{ite.sku},
 			#{item.averageSales},
 			#{item.totalNum},
 			#{item.alarmType},
@@ -184,6 +192,7 @@
 			<set>
 				<if test="item.goodsId != null">`goods_id` = #{item.goodsId}, </if>
 				<if test="item.goodsName != null">`goods_name` = #{item.goodsName}, </if>
+				<if test="item.sku != null">`sku` = #{item.sku}, </if>
 				<if test="item.averageSales != null">`average_sales` = #{item.averageSales}, </if>
 				<if test="item.totalNum != null">`total_num` = #{item.totalNum}, </if>
 				<if test="item.alarmType != null">`alarm_type` = #{item.alarmType}, </if>
@@ -205,6 +214,7 @@
 			`moewr_id`,
 			`goods_id`,
 			`goods_name`,
+			`sku`,
 			`average_sales`,
 			`total_num`,
 			`alarm_type`,

+ 18 - 16
kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2GoodsTopicPriceDao.xml

@@ -44,22 +44,24 @@
 
 	<select id="queryList" resultType="com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity">
 		select
-    		`mgthp_id`,
-    		`topic_id`,
-    		`topic_type`,
-    		`topic_price`,
-    		`topic_name`,
-    		`topic_content`,
-    		`topic_goods_sku`,
-    		`topic_begin_time`,
-    		`topic_end_time`,
-    		`import_time`,
-    		`creater_sn`,
-    		`create_time`,
-    		`moder_sn`,
-    		`mod_time`,
-    		`tstm`
-		from mk2_goods_topic_price
+    		mk2.mgthp_id,
+    		mk2.topic_id,
+    		mk2.topic_type,
+    		mk2.topic_price,
+    		mk2.topic_name,
+    		mk2.topic_content,
+    		mk2.topic_goods_sku,
+    		mk2.topic_begin_time,
+    		mk2.topic_end_time,
+    		mk2.import_time,
+    		mk2.creater_sn,
+    		mk2.create_time,
+    		mk2.moder_sn,
+    		mk2.mod_time,
+    		mk2.tstm,
+			goods.name as goodsName
+		from mk2_goods_topic_price mk2
+		left join mall_goods goods on mk2.topic_goods_sku = goods.sku
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')

+ 1 - 1
kmall-admin/src/main/webapp/WEB-INF/page/cashier/cashierManager.html

@@ -12,7 +12,7 @@
                 <i-col span="4">
                     <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                 </i-col>
-                <i-button @click="query">查询1</i-button>
+                <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
             <div class="buttons-group">

+ 2 - 2
kmall-admin/src/main/webapp/WEB-INF/page/mk/mk2memberbirthday.html

@@ -31,8 +31,8 @@
             <Form-item label="活动名称" prop="topicName">
                 <i-input v-model="mk2MemberBirthday.topicName" placeholder="活动名称"/>
             </Form-item>
-            <Form-item label="优惠类型 00.按比例  10.按金额" prop="topicType">
-                <i-input v-model="mk2MemberBirthday.topicType" placeholder="优惠类型 00.按比例  10.按金额"/>
+            <Form-item label="优惠类型" prop="topicType">
+                <i-input v-model="mk2MemberBirthday.topicType" placeholder="优惠类型"/>
             </Form-item>
             <Form-item label="优惠金额" prop="topicPrice">
                 <i-input v-model="mk2MemberBirthday.topicPrice" placeholder="优惠金额"/>

+ 2 - 2
kmall-admin/src/main/webapp/WEB-INF/page/mk/storetopic.html

@@ -16,11 +16,11 @@
                 <i-button @click="reloadSearch">重置</i-button>
 
             </div>
-            <div class="buttons-group">
+            <!--<div class="buttons-group">
                 <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                 <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                 <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-            </div>
+            </div>-->
         </Row>
 	    <table id="jqGrid"></table>
 	    <div id="jqGridPager"></div>

+ 243 - 0
kmall-admin/src/main/webapp/WEB-INF/page/sale/goodsPanorama.html

@@ -0,0 +1,243 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    #parse("sys/header.html")
+    <style>
+        .upload-list {
+            display: inline-block;
+            width: 60px;
+            height: 60px;
+            text-align: center;
+            line-height: 60px;
+            border: 1px solid transparent;
+            border-radius: 4px;
+            overflow: hidden;
+            background: #fff;
+            position: relative;
+            box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
+            margin-right: 4px;
+        }
+
+        .upload-list img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .upload-list-cover {
+            display: none;
+            position: absolute;
+            top: 0;
+            bottom: 0;
+            left: 0;
+            right: 0;
+            background: rgba(0, 0, 0, .6);
+        }
+
+        .upload-list:hover .upload-list-cover {
+            display: block;
+        }
+
+        .upload-list-cover i {
+            color: #fff;
+            font-size: 20px;
+            cursor: pointer;
+            margin: 0 2px;
+        }
+
+        .hselect {
+            margin: 0;
+            padding: 0;
+        }
+
+        .ui-jqgrid .ui-jqgrid-bdiv {
+            border-top: 1px solid #E1E1E1;
+            overflow-x: auto;
+        }
+        .frozen-div, .frozen-bdiv {
+            background-color: #E4E6E9;/*与网页背景色一致*/
+        }
+    </style>
+</head>
+<body>
+<div id="rrapp" v-cloak>
+    <div v-show="!showList">
+        <Row :gutter="16">
+
+            <div class="buttons-group" style="width: 100%;margin-top: 8px; padding-left: 10px;">
+                #if($shiro.hasPermission("goods:update"))
+                <i-button type="warning" @click="update">&nbsp;全景图</i-button>
+                #end
+
+
+                <!--<i-button type="info" @click="goodsExport"><i class="fa fa-plus"></i>&nbsp;商品导入</i-button>-->
+                <!--<i-button type="info" @click="sameGoodsExport"><i class="fa fa-plus"></i>&nbsp;普货商品导入</i-button>-->
+
+            </div>
+        </Row>
+        <table id="jqGrid"></table>
+        <div id="jqGridPager"><div class="ui-jqgrid-bdiv frozen-div"></div></div>
+
+    </div>
+
+    <Card v-show="showList">
+        <div class="search-group">
+            <i-col span="3">
+                <i-input v-model="q.goodsSn" @on-enter="query" placeholder="商品编码"/>
+            </i-col>
+            <i-col span="3">
+                <i-input v-model="q.prodBarcode" @on-enter="query" placeholder="商品条码"/>
+            </i-col>
+            <i-col span="3">
+                <i-select v-model="q.storeId" placeholder="门店" filterable label-in-value>
+                    <i-option v-for="store in stores" :value="store.id"
+                              :key="store.id">{{store.storeName}}
+                    </i-option>
+                </i-select>
+            </i-col>
+            <i-button @click="query">查询</i-button>
+            <i-button @click="reloadSearch">重置</i-button>
+        </div>
+<!--        <p slot="title">{{title}}</p>-->
+
+        <i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="140">
+        <Row>
+            <i-col span="4">
+                <Form-item label="商品名称" prop="name">
+                    <i-input v-model="goods.name" placeholder="商品名称"/>
+                </Form-item>
+            </i-col>
+            <i-col span="4">
+                <Form-item label="商品简称" prop="name">
+                    <i-input v-model="goods.name" placeholder="商品简称"/>
+                </Form-item>
+            </i-col>
+            <i-col span="4">
+                <Form-item label="规格" prop="ciqProdModel">
+                    <i-input v-model="goods.ciqProdModel" placeholder="规格"/>
+                </Form-item>
+            </i-col>
+            <i-col span="4">
+                <Form-item label="基本单位" prop="goodsUnit">
+                    <i-input v-model="goods.goodsUnit" placeholder="基本单位"/>
+                </Form-item>
+            </i-col>
+        </Row>
+            <Row>
+                <i-col span="4">
+                    <Form-item label="品类" prop="goodsSn">
+<!--                        <i-input v-model="goods.goodsSn" placeholder="品类"/>-->
+                        <i-input  placeholder="品类"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="部门" prop="goodsSn">
+<!--                        <i-input v-model="goods.goodsSn" placeholder="部门"/>-->
+                        <i-input placeholder="部门"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="品牌厅" prop="brand">
+                        <i-input v-model="goods.brand" placeholder="品牌厅"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="进货单位" prop="goodsSn">
+<!--                        <i-input v-model="goods.goodsSn" placeholder="进货单位"/>-->
+                        <i-input  placeholder="进货单位"/>
+                    </Form-item>
+                </i-col>
+            </Row>
+            <Row>
+                <i-col span="4">
+                    <Form-item label="主供应商" prop="goodsSn">
+<!--                        <i-input v-model="goods.goodsSn" placeholder="主供应商"/>-->
+                        <i-input  placeholder="主供应商"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="商品U级" prop="goodsSn">
+<!--                        <i-input v-model="goods.goodsSn" placeholder="商品U级"/>-->
+                        <i-input  placeholder="商品U级"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="包装含量" prop="goodsSn">
+<!--                        <i-input v-model="goods.goodsSn" placeholder="包装含量"/>-->
+                        <i-input placeholder="包装含量"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="产地" prop="goodsSn">
+                        <i-select v-model="goods.oriCntCode" filterable placeholder="原产国"
+                                  label-in-value>
+                            <i-option v-for="cusNationCode in cusNationCodeList" :value="cusNationCode.code" :key="cusNationCode.sn">{{cusNationCode.name}}</i-option>
+                        </i-select>
+<!--                        <i-input v-model="goods.goodsSn" placeholder="产地"/>-->
+                    </Form-item>
+                </i-col>
+            </Row>
+            <Row>
+                <i-col span="4">
+                    <Form-item label="主条码" prop="prodBarcode">
+                        <i-input v-model="goods.prodBarcode" placeholder="主条码"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="PLU编码" prop="sku">
+                        <!--<i-input v-model="goods.sku" placeholder="PLU编码"/>-->
+                        <i-input  placeholder="PLU编码"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="编码" prop="sku">
+                        <i-input v-model="goods.sku" placeholder="编码"/>
+                    </Form-item>
+                </i-col>
+                <i-col span="4">
+                    <Form-item label="品牌" prop="brand">
+                        <i-input v-model="goods.brand" placeholder="品牌"/>
+                    </Form-item>
+                </i-col>
+            </Row>
+
+        <Tabs value="branch">
+            <Tab-Pane label="分店信息" name="branch">
+                <table id="branchJqGrid"></table>
+                <div id="branchJqGridPager"><div class="ui-jqgrid-bdiv frozen-div"></div></div>
+            </Tab-Pane>
+
+            <Tab-Pane label="折扣信息" name="discount">
+                <table id="discountJqGrid"></table>
+                <div id="discountJqGridPager"><div class="ui-jqgrid-bdiv frozen-div"></div></div>
+            </Tab-Pane>
+            <Tab-Pane label="条码信息" name="barcode">
+                <table id="barcodeJqGrid"></table>
+                <div id="barcodeJqGridPager"><div class="ui-jqgrid-bdiv frozen-div"></div></div>
+            </Tab-Pane>
+            <Tab-Pane label="进销存明细查询" name="detail">
+                <table id="detailJqGrid"></table>
+                <div id="detailJqGridPager"><div class="ui-jqgrid-bdiv frozen-div"></div></div>
+            </Tab-Pane>
+            <Tab-Pane label="销售查询" name="sales">
+                <table id="salesJqGrid"></table>
+                <div id="salesJqGridPager"><div class="ui-jqgrid-bdiv frozen-div"></div></div>
+            </Tab-Pane>
+        </Tabs>
+        </i-form>
+        <div style="padding-left: 20px">
+            <!--<i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>-->
+            <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+            <!--<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>-->
+        </div>
+    </Card>
+</div>
+
+<!-- 选择类型 -->
+<div id="categoryLayer" style="display: none;padding: 10px;">
+    <ul id="categoryTree" class="ztree"></ul>
+</div>
+
+<script src="${rc.contextPath}/js/sale/goodsPanorama.js?_${date.systemTime}"></script>
+</body>
+</html>

+ 0 - 1
kmall-admin/src/main/webapp/js/mk/mk2goodstopichistoryprice.js

@@ -16,7 +16,6 @@ $(function () {
         rownumbers: true,
         rownumWidth: 25,
         autowidth: true,
-        multiselect: true,
         pager: "#jqGridPager",
         jsonReader: {
             root: "page.list",

+ 1 - 2
kmall-admin/src/main/webapp/js/mk/mk2goodstopicprice.js

@@ -9,7 +9,7 @@ $(function () {
 			{label: '活动价格', name: 'topicPrice', index: 'topic_price',align: 'center', width: 80},
 			{label: '活动名称', name: 'topicName', index: 'topic_name' ,align: 'center',width: 80},
 			{label: '活动内容', name: 'topicContent', index: 'topic_content', align: 'center',width: 80},
-			{label: '活动产品', name: 'topicGoodsId', index: 'topic_goods_id', align: 'center',width: 80},
+			{label: '活动产品', name: 'goodsName', index: 'goodsName', align: 'center',width: 80},
 			{label: '活动开始时间', name: 'topicBeginTime', index: 'topic_begin_time', width: 80,align: 'center',
 				formatter: function (value) {
 					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
@@ -27,7 +27,6 @@ $(function () {
         rownumbers: true,
         rownumWidth: 25,
         autowidth: true,
-        multiselect: true,
         pager: "#jqGridPager",
         jsonReader: {
             root: "page.list",

+ 2 - 2
kmall-admin/src/main/webapp/js/mk/mk2memberbirthday.js

@@ -5,7 +5,7 @@ $(function () {
         colModel: [
 			{label: 'mmbId', name: 'mmbId', index: 'mmb_id', key: true, hidden: true},
 			{label: '活动名称', name: 'topicName', index: 'topic_name', width: 280},
-			{label: '优惠类型 00.按比例  10.按金额', name: 'topicType', index: 'topic_type', width: 180,align: 'center',
+			{label: '优惠类型', name: 'topicType', index: 'topic_type', width: 180,align: 'center',
                 formatter: function (value) {
                     if (value == '00') {
                         return '按比例';
@@ -165,4 +165,4 @@ let vm = new Vue({
             handleResetForm(this, name);
         }
 	}
-});
+});

+ 0 - 1
kmall-admin/src/main/webapp/js/mk/storetopic.js

@@ -35,7 +35,6 @@ $(function () {
         shrinkToFit: false,
         autoScroll: true,   //开启水平滚动条
         width: 1500,
-        multiselect: true,
         pager: "#jqGridPager",
         jsonReader: {
             root: "page.list",

+ 923 - 0
kmall-admin/src/main/webapp/js/sale/goodsPanorama.js

@@ -0,0 +1,923 @@
+$(function () {
+    $("#jqGrid").jqGrid({
+        url: '../goods/list',
+        datatype: "json",
+        colModel: [
+            // {label: 'ID', name: 'id', index: 'id', width: 60, key: true},
+            {label: '商户名称', name: 'merchName', index: 'merchName', width: 100, align: 'center'},
+            {label: '第三方商户编号', name: 'thirdPartyMerchCode', index: 'thirdPartyMerchCode', width: 160, align: 'center'},
+            {label: '商品编码', name: 'goodsSn', index: 'goods_Sn', width: 180, align: 'center'},
+            {label: 'SKU', name: 'sku', index: 'sku', width: 180, align: 'center'},
+            {label: 'PLU', name: 'plu', index: 'plu', width: 180, align: 'center'},
+            {label: '英文名称', name: 'englishName', index: 'englishName', width: 180, align: 'center'},
+            {label: '产品条码', name: 'prodBarcode', index: 'prod_barcode', width: 160, align: 'center'},
+            // {label: '商品类型', name: 'categoryName', index: 'category_id', width: 40, align: 'center'},
+            {label: '名称', name: 'name', index: 'name', width: 500, align: 'left'},
+            {
+                label: '货品业务类型', name: 'goodsBizType', index: 'goods_biz_type', width: 100, align: 'center',
+                formatter: function (value) {
+                    if (value == '00') {
+                        return '保税备货';
+                    } else if (value == '02') {
+                        return '保税展示补货';
+                    } else if (value == '10') {
+                        return '保税展示跨境';
+                    }
+                    return '普通货物';
+                }
+            },
+            {label: '库存是否共享', name: 'isStockShare', index: 'isStockShare', width: 100, align: 'center',
+                formatter: function (value) {
+                    if (value == '0') {
+                        return '否';
+                    } else if (value == '1') {
+                        return '是';
+                    }
+                    return '-';
+                }},
+            {label: '商品库存', name: 'goodsNumber', index: 'goodsNumber', width: 100, align: 'right'},
+            // {label: '零售价格', name: 'retailPrice', index: 'retail_price', width: 80, align: 'center'},
+            // {label: '市场价', name: 'marketPrice', index: 'market_price', width: 80, align: 'center'},
+            {
+                label: '上架', name: 'isOnSale', index: 'is_on_sale', width: 50, align: 'center',
+                formatter: function (value) {
+                    return transIsNot(value);
+                }
+            },
+            {
+                label: '热销', name: 'isHot', index: 'is_hot', width: 50, align: 'center',formatter: function (value) {
+                return transIsNot(value);
+            }
+            },
+            /*{
+                label: '活动', name: 'goodsType', index: 'goodsType', width: 80,
+                formatter: function (value) {
+                    if (value == 2) {
+                        return '<span class="label label-warning">团购</span>';
+                    } else {
+                        return '<span class="label label-success">无活动</span>';
+                    }
+                }
+            },*/
+            {
+                label: '录入日期', name: 'addTime', index: 'add_time', width: 200, align: 'center',
+                formatter: function (value) {
+                    return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+                }
+            }
+        ],
+        viewrecords: true,
+        height: 475,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        shrinkToFit: false,
+        autoScroll: true,   //开启水平滚动条
+        width: 1600,
+        multiselect: true,
+        pager: "#jqGridPager",
+        jsonReader: {
+            root: "page.list",
+            page: "page.currPage",
+            total: "page.totalPage",
+            records: "page.totalCount"
+        },
+        prmNames: {
+            page: "page",
+            rows: "limit",
+            order: "order"
+        },
+        gridComplete: function () {
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+        }
+    });
+    $('#goodsDesc').editable({
+        inlineMode: false,
+        alwaysBlank: true,
+        height: '500px', //高度
+        minHeight: '200px',
+        language: "zh_cn",
+        spellcheck: false,
+        plainPaste: true,
+        enableScript: false,
+        imageButtons: ["floatImageLeft", "floatImageNone", "floatImageRight", "linkImage", "replaceImage", "removeImage"],
+        allowedImageTypes: ["jpeg", "jpg", "png", "gif"],
+        imageUploadURL: '../sys/oss/upload',
+        imageUploadParams: {id: "edit"},
+        imagesLoadURL: '../sys/oss/queryAll'
+    });
+
+
+    $("#branchJqGrid").jqGrid({
+        url: '../productstorerela/list',
+        datatype: "json",
+        colModel: [
+            {label: '所属门店', name: 'storeName', index: 'storeName', width: 180, align: 'center'},
+            {label: '商品类型', name: 'categoryName', index: 'categoryName', width: 120, align: 'center'},
+            {label: '批次编号', name: 'batchSn', index: 'batchSn', width: 140, align: 'center'},
+            {label: '批次到期日期', name: 'batchExpireDate', index: 'batchExpireDate', width: 160, align: 'center',formatter: function (value) {
+                    return transDate(value,'yyyy-MM-dd hh:mm:ss');
+                }},
+            {label: '门店库存', name: 'stockNum', index: 'stockNum', width: 80, align: 'center'},
+            {label: '园区库存', name: 'parkStock', index: 'parkStock', width: 80, align: 'center'},
+            {label: '零售价格', name: 'retailPrice', index: 'retailPrice', width: 80, align: 'right'},
+            {label: '市场价', name: 'marketPrice', index: 'marketPrice', width: 80, align: 'right'},
+            {label: '底线价格', name: 'bottomLinePrice', index: 'bottomLinePrice', width: 80, align: 'right',formatter: function (value) {
+                    if (value){
+                        return value;
+                    }
+                    return '-';
+                }},
+            {
+                label: '销售量',
+                name: 'sellVolume',
+                index: 'a.sell_volume',
+                width: 80,
+                sortable: true, align: 'center',
+                onSortCol: function (index, colindex, sortorder) {
+                    //列排序事件
+                    jQuery("#jqGrid").jqGrid('setGridParam', {page: $('#XtoPage').val()});
+                }
+            }
+        ],
+        viewrecords: true,
+        height: 475,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        shrinkToFit: false,
+        autoScroll: true,   //开启水平滚动条
+        width: 1600,
+        pager: "#branchJqGridPager",
+        jsonReader: {
+            root: "page.list",
+            page: "page.currPage",
+            total: "page.totalPage",
+            records: "page.totalCount"
+        },
+        prmNames: {
+            page: "page",
+            rows: "limit",
+            order: "order"
+        },
+        gridComplete: function () {
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+        }
+    });
+
+
+    $("#barcodeJqGrid").jqGrid({
+        url: '../goods/list',
+        datatype: "json",
+        colModel: [
+            // {label: 'ID', name: 'id', index: 'id', width: 60, key: true},
+            {label: '商户名称', name: 'merchName', index: 'merchName', width: 100, align: 'center'},
+            {label: '商品编码', name: 'goodsSn', index: 'goods_Sn', width: 180, align: 'center'},
+            {label: 'SKU', name: 'sku', index: 'sku', width: 180, align: 'center'},
+            {label: 'PLU', name: 'plu', index: 'plu', width: 180, align: 'center'},
+            {label: '英文名称', name: 'englishName', index: 'englishName', width: 180, align: 'center'},
+            {label: '产品条码', name: 'prodBarcode', index: 'prod_barcode', width: 160, align: 'center'}
+        ],
+        viewrecords: true,
+        height: 475,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        shrinkToFit: false,
+        autoScroll: true,   //开启水平滚动条
+        width: 1600,
+        multiselect: true,
+        pager: "#barcodeJqGridPager",
+        jsonReader: {
+            root: "page.list",
+            page: "page.currPage",
+            total: "page.totalPage",
+            records: "page.totalCount"
+        },
+        prmNames: {
+            page: "page",
+            rows: "limit",
+            order: "order"
+        },
+        gridComplete: function () {
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+        }
+    });
+
+
+    $("#salesJqGrid").jqGrid({
+        url: '../order/offilineOrderList',
+        datatype: "json",
+        colModel: [
+            {label: '所属门店', name: 'storeName', index: 'storeName',align: 'center', width: 180},
+            {label: '订单号', name: 'orderSn', index: 'order_sn', align: 'center',width: 180},
+            {label: '会员', name: 'consignee', index: 'consignee',align: 'center', width: 80},
+            {label: '商户订单号', name: 'merchOrderSn', index: 'merchOrderSn', align: 'center',width: 150},
+            {
+                label: '订单状态', name: 'orderStatus', index: 'order_status', align: 'center',width: 120,
+                formatter: function (value) {
+                    if (value == '0') {
+                        return '订单创建成功等待付款';
+                    } else if (value == '100') {
+                        return '订单付款中';
+                    } else if (value == '101') {
+                        return '订单已取消';
+                    } else if (value == '102') {
+                        return '订单已删除';
+                    } else if (value == '201') {
+                        return '订单已付款';
+                    } else if (value == '300') {
+                        return '订单已发货';
+                    } else if (value == '301') {
+                        return '用户确认收货';
+                    } else if (value == '401') {
+                        return '没有发货,退款';
+                    } else if (value == '402') {
+                        return '已收货,退款退货';
+                    }
+                    return value;
+                }
+            },
+            {
+                label: '订付人核验', name: 'buyerPayCheck', index: 'buyer_pay_check', align: 'center',width: 80,
+                formatter: function (value) {//订购人支付人校验,0:未知,1:一致,2:不一致,3:校验异常
+                    if (value == '0') {
+                        return '未知';
+                    } else if (value == '1') {
+                        return '一致';
+                    } else if (value == '2') {
+                        return '不一致';
+                    }
+                    return "-";
+                }
+            },
+            {
+                label: '付款状态', name: 'payStatus', index: 'pay_status', align: 'center',width: 80,
+                formatter: function (value) {
+                    if (value == '0') {
+                        return '未付款';
+                    } else if (value == '1') {
+                        return '付款中';
+                    } else if (value == '2') {
+                        return '已付款';
+                    } else if (value == '3') {
+                        return '退款中';
+                    } else if (value == '4') {
+                        return '退款';
+                    }
+                    return value;
+                }
+            },
+            {label: '实际支付', name: 'actualPrice', index: 'actual_price', align: 'right',width: 80},
+            {label: '订单总价', name: 'orderPrice', index: 'order_price', align: 'right',width: 80},
+            {
+                label: '下单时间', name: 'addTime', index: 'add_time',align: 'center', width: 160,
+                formatter: function (value) {
+                    return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+                }
+            }
+        ],
+        viewrecords: true,
+        height: 550,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        shrinkToFit: false,
+        autoScroll: true,   //开启水平滚动条
+        width: 1500,
+        pager: "#salesJqGridPager",
+        jsonReader: {
+            root: "page.list",
+            page: "page.currPage",
+            total: "page.totalPage",
+            records: "page.totalCount"
+        },
+        prmNames: {
+            page: "page",
+            rows: "limit",
+            order: "order"
+        },
+        gridComplete: function () {
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+        }
+    });
+
+
+});
+
+var ztree;
+
+var setting = {
+    data: {
+        simpleData: {
+            enable: true,
+            idKey: "id",
+            pIdKey: "parentId",
+            rootPId: -1
+        },
+        key: {
+            url: "nourl"
+        }
+    }
+};
+var vm = new Vue({
+    el: '#rrapp',
+    data: {
+        showList: true,
+        fileList: true,
+        title: null,
+        uploadList: [],
+        imgName: '',
+        visible: false,
+        stores: [],
+        goods: {primaryPicUrl: '', listPicUrl: '',videoUrl:'', categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0, isHot: 0, categoryName: '', retailPrice: '', marketPrice: '', goodsRate: '', sortOrder: '',goodsNumber: '' },
+        ruleValidate: {
+        },
+        q: {name: '', goodsSn: '', prodBarcode: '',goodsBizType:'', merchSn: '',thirdPartyMerchCode:''},
+        attributes: [],
+        attributeEntityList: [{'id': '', 'goodsId': '', 'attributeId': '', 'value': '', 'isDelete': 0}],
+        productEntityList: [{'id': '', 'goodsId': '', 'goodsSpecificationIds': '', 'goodsSpecificationNameValue': '', 'goodsSn': '', 'goodsNumber': '', 'isDelete': 0, 'goodsDefault': 0}],
+        queryMerch: [],
+        macros: [],//商品单位
+        specifications: [],
+        showInput: true,
+        cusUnitCodeList: [],
+        cusNationCodeList: [],
+        merchList: [],
+        suppliers: [],
+        thirdMerchantBizList: [],
+        thirdMerchantBizViewList: [],
+        isStockShare: false,
+        goodsBizType: '',
+        isOperator: '',
+        share: ''
+    },
+    methods: {
+        delSpeRow: function (index) {
+            //最后一行时禁止删除
+            if (vm.productEntityList.length == 1) {
+                return;
+            }
+            vm.productEntityList[index].isDelete = 1;
+        },
+        addSpeRow: function () {
+            let goodsId = '';
+            if (vm.goods) {
+                goodsId = vm.goods.id;
+            }
+            vm.productEntityList.push({'id': '', 'goodsId': '', 'goodsSpecificationIds': '', 'goodsSpecificationNameValue': '', 'goodsSn': '', 'goodsNumber': '', 'isDelete': 0, 'goodsDefault': 0});
+        },
+        reloadSearch: function () {
+            vm.q = {
+                name: '',
+                goodsSn: '',
+                prodBarcode: '',
+                goodsBizType: '',
+                merchSn: '',
+                thirdPartyMerchCode:''
+            }
+        },
+        query: function () {
+            vm.reload(1);
+        },
+        add: function () {
+            vm.showList = false;
+            vm.isOperator='add';
+            vm.title = "新增";
+            vm.uploadList = [];
+            vm.goods = {primaryPicUrl: '', listPicUrl: '',videoUrl:'', categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0,
+                isHot: 0, categoryName: '', retailPrice: '', marketPrice: '', goodsRate: '', sortOrder: '',goodsNumber: '' };
+            $('#goodsDesc').editable('setHTML', '');
+            vm.getCategory();
+            vm.macros = [];
+            vm.brands = [];
+            // vm.freights = [];
+            vm.cusUnitCodeList = [];
+            vm.cusNationCodeList = [];
+            // vm.attributeEntityList = [{'id': '', 'goodsId': '', 'attributeId': '', 'value': '', 'isDelete': 0}];
+            vm.getMacro();
+            vm.getCusUnitCodeList();
+            vm.getCusNationCode();
+            vm.getMerchList();
+            vm.showInput = true;
+        },
+        update: function (event) {
+            var id = getSelectedRow();
+            if (id == null) {
+                return;
+            }
+            vm.isOperator='update';
+            vm.showList = false;
+            vm.title = "修改";
+            vm.uploadList = [];
+            // vm.goods = {primaryPicUrl: '', listPicUrl: '',videoUrl:'', categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0,
+            //     isHot: 0, categoryName: '', retailPrice: '', marketPrice: '', goodsRate: '', sortOrder: '',goodsNumber: '' };
+            vm.getInfo(id);/*
+            var opt = {};
+            opt.value = vm.goods.categoryId;
+            opt.flag = 1;
+            vm.getAttributes(opt);*/
+
+            vm.thirdMerchantBizList = [];
+            vm.getCusUnitCodeList();
+            vm.getCusNationCode();
+            vm.showInput = true;
+            if (vm.goods.goodsBizType == '10' || vm.goods.goodsBizType == '02') {
+                vm.showInput = false;
+            }
+
+            vm.price();
+            vm.discount();
+            vm.detail();
+
+        },
+        getInfo: function () {
+            var postData = {"goodsSn":vm.q.goodsSn,'prodBarcode':vm.q.prodBarcode,'storeId':vm.q.storeId};
+            vm.getCusUnitCodeList();
+            vm.getCusNationCode();
+            $.post("../goods/infoByQuery",postData,function(r){
+
+                vm.goods = r.goods;
+                // vm.goodsBizType = r.goods.goodsBizType;
+            });
+            // $.get("../goods/info/" + id, function (r) {
+            //     vm.goods = r.goods;
+            //     vm.goodsBizType = r.goods.goodsBizType;
+            //
+            //     // vm.branch(r.goods.goodsSn);
+            //     // vm.barcode(r.goods.goodsSn);
+            //     // vm.sales(r.goods.goodsSn);
+            // });
+        },
+        branch:function(){
+
+            var postData = {"goodsSn":vm.q.goodsSn,'prodBarcode':vm.q.prodBarcode,'storeId':vm.q.storeId};
+
+            $("#branchJqGrid").jqGrid('setGridParam',{
+                datatype:'json',
+                postData:postData,
+            }).trigger("reloadGrid");
+        },
+        price:function(){
+
+        },
+        discount:function(){
+
+        },
+        barcode:function(){
+            var postData = {"goodsSn":vm.q.goodsSn,'prodBarcode':vm.q.prodBarcode,'storeId':vm.q.storeId};
+
+            $("#barcodeJqGrid").jqGrid('setGridParam',{
+                datatype:'json',
+                postData:postData,
+            }).trigger("reloadGrid");
+        },
+        detail:function(){
+
+        },
+        sales:function(){
+            var postData = {"goodsSn":vm.q.goodsSn,'prodBarcode':vm.q.prodBarcode,'storeId':vm.q.storeId};
+
+            $("#salesJqGrid").jqGrid('setGridParam',{
+                datatype:'json',
+                postData:postData,
+            }).trigger("reloadGrid");
+        },
+        getMacro: function () {
+            // 获取货品业务类型
+            $.get("../sys/macro/queryMacrosByValue?value=goodsBizType", function (r) {
+                vm.macros = r.list;
+            });
+        },/*
+        getBrand: function (merchSn) {
+            $.get("../brand/queryAll?merchSn=" + merchSn, function (r) {
+                vm.brands = r.list;
+            });
+        },*/
+        getSuppliers: function (thirdMerchantCode) {
+            $.get("../supplier/queryAll?thirdPartyMerchCode=" + thirdMerchantCode, function (r) {
+                vm.suppliers = r.list;
+            });
+        },
+        getCusUnitCodeList: function () {
+            $.get("../syscusunitcode/queryAll", function (r) {
+                vm.cusUnitCodeList = r.list;
+            });
+        },
+        getCusNationCode: function () {
+            $.get("../syscusnationcode/queryAll", function (r) {
+                vm.cusNationCodeList = r.list;
+            });
+        },/*
+        getFreights: function(merchSn) {
+            $.get("../freight/queryAll?merchSn=" + merchSn, function (r) {
+                vm.freights = r.list;
+            });
+        },*/
+        getGoodsGallery: function (id) {//获取商品顶部轮播图
+            $.get("../goodsgallery/queryAll?goodsId=" + id, function (r) {
+                vm.uploadList = r.list;
+            });
+        },
+        getMerchList: function() {
+            $.get("../merch/queryAll", function (r) {
+                vm.merchList = r.list;
+            });
+        },
+        getThirdMerchantBizList: function(merchSn) {
+            $.get("../thirdmerchantbiz/queryAll?merchSn=" + merchSn, function (r) {
+                vm.thirdMerchantBizList = r.list;
+            });
+        },
+        saveOrUpdate: function (event) {
+            var url = vm.goods.id == null ? "../goods/save" : "../goods/update";
+            vm.goods.goodsDesc = $('#goodsDesc').editable('getHTML');
+            vm.goods.goodsImgList = vm.uploadList;
+            // vm.goods.attributeEntityList = vm.attributeEntityList;
+            vm.goods.productEntityList = vm.productEntityList;
+            $.ajax({
+                type: "POST",
+                url: url,
+                dataType: "json",
+                contentType: "application/json",
+                data: JSON.stringify(vm.goods),
+                success: function (r) {
+                    if (r.code === 0) {
+                        alert('操作成功', function (index) {
+                            vm.reload();
+                        });
+                    } else {
+                        alert(r.msg);
+                    }
+                }
+            });
+        },
+        enSale: function () {
+            var ids = getSelectedRows();
+            if (ids == null) {
+                return;
+            }
+            confirm('确定要上架选中的商品?', function () {
+                $.ajax({
+                    type: "POST",
+                    url: "../goods/enSaleBatch",
+                    contentType: "application/json",
+                    data: JSON.stringify(ids),
+                    success: function (r) {
+                        if (r.code == 0) {
+                            alert('操作成功', function (index) {
+                                $("#jqGrid").trigger("reloadGrid");
+                            });
+                        } else {
+                            alert(r.msg);
+                        }
+                    }
+                });
+            });
+        },
+        openSpe: function () {
+            var id = getSelectedRow();
+            if (id == null) {
+                return;
+            }
+            openWindow({
+                type: 2,
+                title: '商品规格',
+                content: '../shop/goodsspecification.html?goodsId=' + id
+            })
+        },
+        openPro: function () {
+            var id = getSelectedRow();
+            if (id == null) {
+                return;
+            }
+            openWindow({
+                type: 2,
+                title: '产品设置',
+                content: '../shop/product.html?goodsId=' + id
+            });
+        },
+        unSale: function () {
+            var ids = getSelectedRows();
+            if (ids == null) {
+                return;
+            }
+            confirm('确定要下架选中的商品?', function () {
+                $.ajax({
+                    type: "POST",
+                    url: "../goods/unSaleBatch",
+                    contentType: "application/json",
+                    data: JSON.stringify(ids),
+                    success: function (r) {
+                        if (r.code == 0) {
+                            alert('操作成功', function (index) {
+                                $("#jqGrid").trigger("reloadGrid");
+                            });
+                        } else {
+                            alert(r.msg);
+                        }
+                    }
+                });
+            });
+        },
+        del: function (event) {
+            var ids = getSelectedRows();
+            if (ids == null) {
+                return;
+            }
+
+            confirm('确定要删除选中的记录?', function () {
+                $.ajax({
+                    type: "POST",
+                    url: "../goods/delete",
+                    contentType: "application/json",
+                    data: JSON.stringify(ids),
+                    success: function (r) {
+                        if (r.code == 0) {
+                            alert('操作成功', function (index) {
+                                $("#jqGrid").trigger("reloadGrid");
+                            });
+                        } else {
+                            alert(r.msg);
+                        }
+                    }
+                });
+            });
+        },
+        reload: function (event) {
+            vm.sales();
+            vm.branch();
+            vm.barcode();
+            vm.getInfo();
+            vm.showList = true;
+            // let page = event;
+            // if (event != 1) {
+            //     page = $("#jqGrid").jqGrid('getGridParam', 'page');
+            // }
+            // $("#jqGrid").jqGrid('setGridParam', {
+            //     postData: {
+            //         'name': vm.q.name,
+            //         'englishName': vm.q.englishName,
+            //         'goodsSn': vm.q.goodsSn,
+            //         'prodBarcode': vm.q.prodBarcode,
+            //         'goodsBizType': vm.q.goodsBizType,
+            //         'merchSn': vm.q.merchSn,
+            //         'thirdPartyMerchCode': vm.q.thirdPartyMerchCode
+            //     },
+            //     page: page
+            // }).trigger("reloadGrid");
+            // vm.handleReset('formValidate');
+        },
+        getCategory: function () {
+            //加载分类树
+            $.get("../category/query", function (r) {
+                ztree = $.fn.zTree.init($("#categoryTree"), setting, r.list);
+                var node = ztree.getNodeByParam("id", vm.goods.categoryId);
+                if (node) {
+                    ztree.selectNode(node);
+                    vm.goods.categoryName = node.name;
+                } else {
+                    node = ztree.getNodeByParam("id", 0);
+                    ztree.selectNode(node);
+                    vm.goods.categoryName = node.name;
+                }
+            })
+        },
+        categoryTree: function () {
+            openWindow({
+                title: "选择类型",
+                area: ['300px', '450px'],
+                content: jQuery("#categoryLayer"),
+                btn: ['确定', '取消'],
+                btn1: function (index) {
+                    var node = ztree.getSelectedNodes();
+                    if (node[0].isParent) {
+                        alert("只能选择");
+                        return;
+                    }
+                    //选择上级菜单
+                    vm.goods.categoryId = node[0].id;
+                    vm.goods.categoryName = node[0].name;
+
+                    layer.close(index);
+                }
+            });
+        },
+        showStockShare:function(opt){
+            var thirdMerchantCode = opt.value;
+            /*$.get("../thirdmerchantbiz/infoByCode?thirdMerchantCode=" + thirdMerchantCode, function (r) {
+                if(r.thirdMerchantBiz){
+                    vm.share = r.thirdMerchantBiz.isStockShare;
+                    if(vm.goods.goodsBizType == '00' && r.thirdMerchantBiz.isStockShare == 1){
+                        // vm.isStockShare = true;
+                    }else{
+                        // vm.isStockShare = false;
+                        vm.goods.goodsNumber= '';
+                    }
+                }
+            });*/
+            vm.getSuppliers(thirdMerchantCode);
+        },
+        changeGoodsBizType: function(opt) {
+            var goodsBizType = opt.value;
+            if (vm.goods.goodsBizType == '10' || vm.goods.goodsBizType == '02') {
+                vm.showInput = false;
+            } else {
+                vm.showInput = true;
+            }
+            // console.log('goodsBizType:'+vm.goods.goodsBizType)
+            // console.log('share:'+vm.share)
+            // if(vm.goods.goodsBizType == '00' && vm.share == 1){
+            //     vm.isStockShare = true;
+            // }else{
+            //     vm.isStockShare = false;
+            //     // vm.goods.goodsNumber= '';
+            //     // console.log('错错错')
+            // }
+
+        },
+        handleView(name) {
+            this.imgName = name;
+            this.visible = true;
+        },
+        /*changeQueryCategories: function (opt) {
+            var value = opt.value;
+            $.get("../category/getCategorySelectByParent?parentId=" + value, function (r) {
+                vm.queryCategoriesTwo = r.list;
+            });
+        },
+
+        getAttributes: function (opt) {
+            var value = opt.value;
+            $.get("../attribute/query?attributeCategoryId=" + value, function (r) {
+                vm.attributes = r.list;
+            });
+
+            if (opt.flag != 1 && !(value === vm.categoryId)) {
+                if (vm.attributeEntityList.length > 0 && vm.attributeEntityList[0].attributeId != '') {
+                    for (var i = 0; i < vm.attributeEntityList.length; i++) {
+                        if (!(vm.attributeEntityList[0].attributeId === '')) {
+                            vm.attributeEntityList[i].isDelete = 1;
+                        }
+                    }
+
+                    var goodsId = '';
+                    if (vm.goods) {
+                        goodsId = vm.goods.id;
+                    }
+                    vm.attributeEntityList.unshift({'id': '', 'goodsId': goodsId, 'attributeId': '', 'value': '', 'isDelete': 0});
+                }
+            }
+        },
+        changeCategories: function (opt) {
+            var value = opt.value;
+            $.get("../category/getCategorySelectByParent?isShow=1&parentId=" + value, function (r) {
+                vm.categoriesTwo = r.list;
+            });
+        },*/
+        uploadExcelSuccess: function (data) {
+            // console.log(data);
+            if(data.code==0){
+                alert('导入成功', function (index) {
+                    $("#jqGrid").trigger("reloadGrid");
+                });
+            }else{
+                alert(data.msg);
+            }
+        },
+        uploadExcelError: function () {
+            alert('上传出现异常,请重试!');
+        },
+        uploadExcelFormatError: function (file) {
+            this.$Notice.warning({
+                title: '文件格式不正确',
+                desc: '文件 ' + file.name + ' 格式不正确,请上传 xls 或 xlsx 格式的文件。'
+            });
+        },
+        handleRemove(file) {
+            // 从 upload 实例删除数据
+            const fileList = vm.uploadList;
+            vm.uploadList.splice(fileList.indexOf(file), 1);
+        },
+        handleSuccess(res, file) {
+            // 因为上传过程为实例,这里模拟添加 url
+            file.imgUrl = res.url;
+            file.name = res.url;
+            vm.uploadList.add(file);
+        },
+        handleBeforeUpload() {
+            const check = vm.uploadList.length < 5;
+            if (!check) {
+                this.$Notice.warning({
+                    title: '最多只能上传 5 张图片。'
+                });
+            }
+            return check;
+        },
+        handleSubmit: function (name) {
+            // handleSubmitValidate(this, name, function () {
+                vm.saveOrUpdate()
+            // });
+        },
+        handleFormatError: function (file) {
+            this.$Notice.warning({
+                title: '文件格式不正确',
+                desc: '文件 ' + file.name + ' 格式不正确,请上传 jpg 或 png 格式的图片。'
+            });
+        },
+        handleMaxSize: function (file) {
+            this.$Notice.warning({
+                title: '超出文件大小限制',
+                desc: '文件 ' + file.name + ' 太大,不能超过 100k。'
+            });
+        },
+        handleMaxSizeByInfo: function (file) {
+            this.$Notice.warning({
+                title: '超出文件大小限制',
+                desc: '文件 ' + file.name + ' 太大,不能超过 300k。'
+            });
+        },
+        handleReset: function (name) {
+            handleResetForm(this, name);
+        },
+        handleSuccessPicUrl: function (res, file) {
+            vm.goods.primaryPicUrl = file.response.url;
+        },
+        handleSuccessListPicUrl: function (res, file) {
+            vm.goods.listPicUrl = file.response.url;
+        },
+        eyeImagePicUrl: function () {
+            var url = vm.goods.primaryPicUrl;
+            eyeImage(url);
+        },
+        eyeImageListPicUrl: function () {
+            var url = vm.goods.listPicUrl;
+            eyeImage(url);
+        },
+        eyeImage: function (e) {
+            eyeImage($(e.target).attr('src'));
+        },
+        eyeImageListVideoUrl: function (e) {
+            var url = vm.goods.videoUrl;
+            eyeVideo(url);
+        },
+        handleVideoFormatError: function (file) {
+            this.$Notice.warning({
+                title: '文件格式不正确',
+                desc: '文件 ' + file.name + ' 格式不正确,请上传 mp4 格式的图片。'
+            });
+        },
+        handleVideoMaxSize: function (file) {
+            this.$Notice.warning({
+                title: '超出文件大小限制',
+                desc: '文件 ' + file.name + ' 太大,不能超过 1M。'
+            });
+        },
+        handleSuccessListVideoUrl: function (res, file) {
+            vm.goods.videoUrl = file.response.url;
+        },
+        goodsExport: function () {
+            vm.fileList = false;
+        },
+        showMerchInfo:function(opt){
+            var merchSn = opt.value;
+            // vm.getCategories(merchSn);
+            // vm.getFreights(merchSn);
+            // vm.getBrand(merchSn);
+            vm.getThirdMerchantBizList(merchSn);
+        },
+        // getCategories: function (merchSn) {
+        //     $.get("../category/getCategorySelect?isShow=1&merchSn=" + merchSn, function (r) {
+        //         vm.categories = r.list;
+        //     });
+        // }
+    },
+    mounted() {
+        // this.uploadList = this.$refs.upload.fileList;
+        /*$.get("../category/getCategorySelect", function (r) {
+            vm.queryCategories = r.list;
+        });*/
+        $.get("../merch/queryAll", function (r) {
+            vm.queryMerch = r.list;
+        });
+        $.get("../store/queryAll", function (r) {
+            vm.stores = r.list;
+        });
+        $.get("../sys/macro/queryMacrosByValue?value=goodsBizType", function (r) {
+            vm.macros = r.list;
+        });
+
+        $.get("../thirdmerchantbiz/queryAll", function (r) {
+            vm.thirdMerchantBizViewList = r.list;
+        });
+
+    }
+});

+ 1 - 1
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -120,7 +120,7 @@ let vm = new Vue({
         submitOrder:function(){
             $('#payCode').unbind('keydown').keydown(function(event){});
             vm.machineCode = sessionStorage.getItem("machineCode");
-
+            console.log(vm.machineCode);
             var param = {'userInfo':vm.userInfo,'payCode':this.$refs.payCode.currentValue,'goodsList':vm.goodsList,'sessionId':vm.sessionId,'machineCode':vm.machineCode};
             this.$refs.payCode.currentValue = '';
             $.ajax({

+ 5 - 2
kmall-admin/src/main/webapp/login.html

@@ -119,14 +119,17 @@
         beforeMount: function(){
             // TODO 调用接口获取机器码
             console.log("获取机器码");
-            this.machineCode = "1";
+            this.machineCode = "MxMmJQvK+KQ=";
+            this.machineCode = this.machineCode.replace("+","%2B");
+            sessionStorage.setItem("machineCode",this.machineCode);
         },
         methods: {
             refreshCode: function () {
                 this.src = "captcha.jpg?t=" + $.now();
             },
             login: function (event) {
-                var data = "username=" + vm.username + "&password=" + vm.password + "&captcha=" + vm.captcha + "&machineCode=" + vm.machineCode //TODO  新增加一个机器码;
+                var data = "username=" + vm.username + "&password=" + vm.password + "&captcha=" + vm.captcha + "&machineCode=" + vm.machineCode; //TODO  新增加一个机器码;
+                console.log(vm.machineCode);
                 sessionStorage.removeItem("permsSet");
                 $.ajax({
                     type: "POST",

+ 2 - 0
kmall-common/src/main/java/com/kmall/common/constant/JxlsXmlTemplateName.java

@@ -22,4 +22,6 @@ public class JxlsXmlTemplateName {
     public static final String STORE_ID_DTO_LIST = "/XmlTemplate/StoreIdDtoList.xml";
 
     public static final String CATE_STORE_DTO_LIST = "/XmlTemplate/CateStoreDtoList.xml";
+    // 在途商品明细导入
+    public static final String GOODS_TRANSPORT_INFO_DETAIL_ENTITY_LIST = "/XmlTemplate/GoodsTransportInfoDetailEntityList.xml";
 }