Kaynağa Gözat

Merge remote-tracking branch 'origin/master' into feature/支付单重推和bug修复1213

qng 3 yıl önce
ebeveyn
işleme
314f51a3a5
23 değiştirilmiş dosya ile 458 ekleme ve 272 silme
  1. 2 2
      kmall-admin/src/main/java/com/kmall/admin/controller/BrandController.java
  2. 4 0
      kmall-admin/src/main/java/com/kmall/admin/controller/mk/MkActivitiesController.java
  3. 9 0
      kmall-admin/src/main/java/com/kmall/admin/dao/mk/MkActivitiesAssociationDao.java
  4. 13 0
      kmall-admin/src/main/java/com/kmall/admin/entity/StoreSmsConfigEntity.java
  5. 88 35
      kmall-admin/src/main/java/com/kmall/admin/service/impl/BrandServiceImpl.java
  6. 27 2
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  7. 16 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesScoreServiceImpl.java
  8. 1 1
      kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesServiceImpl.java
  9. 3 1
      kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml
  10. 15 13
      kmall-admin/src/main/resources/mybatis/mapper/StoreSmsConfigDao.xml
  11. 15 0
      kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesAssociationDao.xml
  12. 6 0
      kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesScoreDao.xml
  13. 6 3
      kmall-admin/src/main/webapp/WEB-INF/page/mk/mkactivitiesscore.html
  14. 102 102
      kmall-admin/src/main/webapp/WEB-INF/page/shop/brand.html
  15. 47 18
      kmall-admin/src/main/webapp/js/mk/mkactivitiesscore.js
  16. 29 24
      kmall-admin/src/main/webapp/js/mk/mkactivityform.js
  17. 1 1
      kmall-admin/src/main/webapp/js/receipt/receiptCheck.js
  18. 3 3
      kmall-admin/src/main/webapp/js/sale/sale.js
  19. 68 65
      kmall-admin/src/main/webapp/js/shop/brand.js
  20. 2 1
      kmall-admin/src/main/webapp/js/shop/storesmsconfig.js
  21. BIN
      kmall-admin/src/main/webapp/statics/file/activities_score_yyyy_mm_dd_v1.0.0.xlsx
  22. BIN
      kmall-admin/src/main/webapp/statics/file/brand_export_yyyy_mm_dd_v1.0.0.xls
  23. 1 1
      kmall-manager/src/main/resources/conf/redis.properties

+ 2 - 2
kmall-admin/src/main/java/com/kmall/admin/controller/BrandController.java

@@ -250,8 +250,8 @@ public class BrandController {
         }
         try {
             if (brandEntityList == null || brandEntityList.size() == 0) {
-                logger.error("读取数据为空!");
-                return R.error("读取数据为空!");
+                logger.error("品牌名称不能为空!");
+                return R.error("品牌名称不能为空!");
             }
 
             brandService.uploadExcel(brandEntityList);

+ 4 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/mk/MkActivitiesController.java

@@ -108,6 +108,10 @@ public class MkActivitiesController {
             throw new RRException(r.get("msg").toString());
         }
 
+        if("0".equals(mkActivities.getMkaEndEarly())){
+            mkActivities.setMkdEndEarlyTime("");
+        }
+
         mkActivitiesService.update(mkActivities);
         return R.ok();
     }

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/mk/MkActivitiesAssociationDao.java

@@ -13,5 +13,14 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface MkActivitiesAssociationDao extends BaseDao<MkActivitiesAssociationEntity> {
 
+    /**
+     * 根据营销活动id更新营销活动关联表对应数据
+     *
+     * @author zhuhh
+     * @param mkActivitiesAssociationEntity
+     * @return
+     */
+    int updateByMkaId(MkActivitiesAssociationEntity mkActivitiesAssociationEntity);
+
     MkActivitiesAssociationEntity queryByMkCodeAndTopic(@Param("mkCode") String mkCode, @Param("mkaTopic") String mkaTopic, @Param("mkaStoreId") String mkaStoreId);
 }

+ 13 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/StoreSmsConfigEntity.java

@@ -61,6 +61,11 @@ public class StoreSmsConfigEntity implements Serializable {
 
     private String isEnable;
 
+    /**
+     * 门店名称
+     */
+    private String storeName;
+
     public String getIsEnable() {
         return isEnable;
     }
@@ -212,4 +217,12 @@ public class StoreSmsConfigEntity implements Serializable {
     public Date getTstm() {
         return tstm;
     }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
 }

+ 88 - 35
kmall-admin/src/main/java/com/kmall/admin/service/impl/BrandServiceImpl.java

@@ -6,6 +6,7 @@ import com.kmall.admin.dto.CateStoreDto;
 import com.kmall.admin.dto.CopyBrandDto;
 import com.kmall.admin.entity.*;
 import com.kmall.admin.service.BrandService;
+import com.kmall.admin.utils.ValidateUtils;
 import com.kmall.common.utils.MapBeanUtil;
 import com.kmall.common.utils.R;
 import com.kmall.common.utils.RRException;
@@ -59,37 +60,63 @@ public class BrandServiceImpl implements BrandService {
     @Override
     public int save(BrandEntity brand) {
 
-//        // 品牌唯一标识符正则校验
-//        String uniqueIdentifier = brand.getUniqueIdentifier();
-//        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
-//        if(!Pattern.matches(regex,uniqueIdentifier)){
-//            throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:"+uniqueIdentifier);
-//        }
-//
-//        // 如果是正确的,根据唯一简码查询该简码是否存在
-//        BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
-//        if(brandEntity != null ){
-//            throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:"+uniqueIdentifier);
-//        }
+        // 品牌唯一标识符正则校验
+        String uniqueIdentifier = brand.getUniqueIdentifier();
+        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
+        if (StringUtils.isNotBlank(uniqueIdentifier)) {
+            if (!Pattern.matches(regex, uniqueIdentifier)) {
+                throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:" + uniqueIdentifier);
+            }
+
+            // 如果是正确的,根据唯一简码查询该简码是否存在
+            BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+            if (brandEntity != null) {
+                throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:" + uniqueIdentifier);
+            }
+        }
+
+        // 品牌名称正则校验
+        if (!ValidateUtils.validateSpecialAllowChinese(brand.getName())) {
+            throw new RuntimeException("请输入正确的品牌名称,有问题的品牌名称:" + brand.getName());
+        }
+
+        // 根据名称查询该名称是否存在
+        BrandEntity nameEntity = brandDao.queryByName(brand.getName());
+        if (nameEntity != null) {
+            throw new RuntimeException("该品牌名称已存在,请检查品牌名称,品牌名称:" + brand.getName());
+        }
 
         return brandDao.save(brand);
     }
 
     @Override
     public int update(BrandEntity brand) {
-//
-//        // 品牌唯一标识符正则校验
-//        String uniqueIdentifier = brand.getUniqueIdentifier();
-//        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
-//        if(!Pattern.matches(regex,uniqueIdentifier)){
-//            throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:"+uniqueIdentifier);
-//        }
-//
-//        // 如果是正确的,根据唯一简码查询该简码是否存在
-//        BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
-//        if(brandEntity != null && brand.getId().compareTo(brandEntity.getId()) != 0){
-//            throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:"+uniqueIdentifier);
-//        }
+
+        // 品牌唯一标识符正则校验
+        String uniqueIdentifier = brand.getUniqueIdentifier();
+        String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
+        if (StringUtils.isNotBlank(uniqueIdentifier)) {
+            if (!Pattern.matches(regex, uniqueIdentifier)) {
+                throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:" + uniqueIdentifier);
+            }
+
+            // 如果是正确的,根据唯一简码查询该简码是否存在
+            BrandEntity brandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+            if (brandEntity != null && brand.getId().compareTo(brandEntity.getId()) != 0) {
+                throw new RuntimeException("该唯一简码已存在,请检查唯一简码,唯一简码:" + uniqueIdentifier);
+            }
+        }
+
+        // 品牌名称正则校验
+        if (!ValidateUtils.validateSpecialAllowChinese(brand.getName())) {
+            throw new RuntimeException("请输入正确的品牌名称,有问题的品牌名称:" + brand.getName());
+        }
+
+        // 根据名称查询该名称是否存在
+        BrandEntity nameEntity = brandDao.queryByName(brand.getName());
+        if (nameEntity != null && !nameEntity.getId().equals(brand.getId())) {
+            throw new RuntimeException("该品牌名称已存在,请检查品牌名称,品牌名称:" + brand.getName());
+        }
 
         return brandDao.update(brand);
     }
@@ -241,19 +268,31 @@ public class BrandServiceImpl implements BrandService {
             String name = brandEntity.getName();
             Integer isShow = brandEntity.getIsShow();
             Integer isNew = brandEntity.getIsNew();
-            // 品牌唯一标识符正则校验
             String uniqueIdentifier = brandEntity.getUniqueIdentifier();
+            String simpleDesc = brandEntity.getSimpleDesc();
 
-            if (isShow.intValue() != 0 && isShow.intValue() != 1 && isNew.intValue() != 0 && isNew != 1) {
-                throw new ServiceException("第" + (i + 1) + "行的是否显示或者是否新品牌只可填(0:否 1:是)");
+            if (isShow != 0 && isShow != 1) {
+                throw new ServiceException("第" + (i + 1) + "行的是否显示只可填(0:否 1:是)");
             }
-
+            if (isNew != 0 && isNew != 1) {
+                throw new ServiceException("第" + (i + 1) + "行的是否新品牌只可填(0:否 1:是)");
+            }
+            // 品牌唯一标识符正则校验
             if (StringUtils.isNotBlank(uniqueIdentifier)) {
                 String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
                 if (!Pattern.matches(regex, uniqueIdentifier)) {
-                    throw new RuntimeException("请输入正确的品牌唯一简码,有问题的简码:" + uniqueIdentifier);
+                    throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码包含特殊字符或长度过长");
                 }
             }
+            if (!ValidateUtils.validateSpecialAllowChinese(name)) {
+                throw new ServiceException("第" + (i + 1) + "行的品牌名称包含特殊字符或长度过长");
+            }
+            if (StringUtils.isBlank(simpleDesc)) {
+                throw new ServiceException("第" + (i + 1) + "行的描述不能为空");
+            }
+            if (!ValidateUtils.validateSpecialAllowChinese(simpleDesc)) {
+                throw new ServiceException("第" + (i + 1) + "行的描述包含特殊字符或长度过长");
+            }
 
             // 数据库查询是否存在对应名字的对象
             BrandEntity isExist = brandDao.queryByName(name);
@@ -261,9 +300,11 @@ public class BrandServiceImpl implements BrandService {
             // 不存在则添加
             if (isExist == null) {
                 // 如果是正确的,根据唯一简码查询该简码是否存在
-                BrandEntity queryBrandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
-                if (Objects.nonNull(queryBrandEntity)) {
-                    throw new ServiceException("第" + (i + 1) + "行的该品牌:【" + queryBrandEntity.getName() + "】已存在!");
+                if (StringUtils.isNotBlank(uniqueIdentifier)) {
+                    BrandEntity queryBrandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+                    if (Objects.nonNull(queryBrandEntity)) {
+                        throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码:【" + queryBrandEntity.getUniqueIdentifier() + "】已存在!");
+                    }
                 }
 
                 BrandEntity insertBrandEntity = new BrandEntity();
@@ -272,12 +313,24 @@ public class BrandServiceImpl implements BrandService {
                 insertBrandEntity.setUniqueIdentifier(uniqueIdentifier);
                 insertBrandEntity.setIsShow(isShow);
                 insertBrandEntity.setIsNew(isNew);
-                this.save(insertBrandEntity);
+                brandDao.save(insertBrandEntity);
 
             } else {
                 // 存在则修改
+
+                // 判断品牌唯一简码是否存在
+                if (StringUtils.isNotBlank(uniqueIdentifier)) {
+                    BrandEntity queryBrandEntity = brandDao.queryByUniqueIdentifier(uniqueIdentifier);
+                    if (Objects.nonNull(queryBrandEntity) && !queryBrandEntity.getName().equals(name)) {
+                        throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码:【" + queryBrandEntity.getUniqueIdentifier() + "】已存在!");
+                    }
+                }
+
+                Integer id = isExist.getId();
                 BeanUtils.copyProperties(brandEntity, isExist);
-                this.update(isExist);
+                isExist.setId(id);
+                isExist.setUniqueIdentifier(uniqueIdentifier == null ? "" : uniqueIdentifier);
+                brandDao.update(isExist);
             }
         }
     }

+ 27 - 2
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -4175,12 +4175,32 @@ public class OrderServiceImpl implements OrderService {
         BigDecimal orderTotalPrice = BigDecimal.ZERO;
         List<QueryGoodsVO> goodsVos = new ArrayList<>();
         for (GoodsDetailsDto good : goodsDetailsDtos) {
+            // 清空上一次计算活动价格的相关信息
+            BigDecimal deductionPrice = good.getDeductionPrice();
+            if (Objects.nonNull(deductionPrice)) {
+                good.setDeductionPrice(null);
+            }
+            Integer deductionScore = good.getDeductionScore();
+            if (Objects.nonNull(deductionScore)) {
+                good.setDeductionScore(null);
+            }
+            BigDecimal discountedPrice = good.getDiscountedPrice();
+            if (Objects.nonNull(discountedPrice)) {
+                good.setDiscountedPrice(null);
+            }
+            String activity = good.getActivity();
+            if (Objects.nonNull(activity)) {
+                good.setActivity(null);
+            }
+            BigDecimal actualPaymentAmount = good.getActualPaymentAmount();
+            good.setActualPaymentAmount(good.getRetailPrice());
+
             QueryGoodsVO queryGoodsVo = new QueryGoodsVO();
             BeanUtils.copyProperties(good, queryGoodsVo);
             queryGoodsVo.setSku(good.getGoodsSn());
             queryGoodsVo.setStoreId(Long.parseLong(storeId));
             queryGoodsVo.setDisCountedPrice(BigDecimal.ZERO);
-            queryGoodsVo.setTotalPrice(good.getActualPaymentAmount());
+            queryGoodsVo.setTotalPrice(actualPaymentAmount);
             orderTotalPrice = orderTotalPrice.add(good.getRetailPrice());
             goodsVos.add(queryGoodsVo);
         }
@@ -4283,7 +4303,7 @@ public class OrderServiceImpl implements OrderService {
                             goodsDetailsDto.setGoodstaxes(String.valueOf(tax.multiply(new BigDecimal(goodsDetailsDto.getSellVolume()))));
                             goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.LSCX.getTopicName());
                             goodsDetailsDto.setDiscountedPrice(retailPrice.subtract(activityPrice));
-                            goodsDetailsDto.setDeductionPrice(retailPrice.subtract(activityPrice));
+                            goodsDetailsDto.setDeductionPrice(null);
                             activityFlag.set(false);
                             promotionActivityFlag.set(true);
                         }
@@ -4325,6 +4345,7 @@ public class OrderServiceImpl implements OrderService {
                                     goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.MZ.getTopicName());
                                     goodsDetailsDto.setGiftNumber(mkActivitiesFullGiftEntity.getGiftNumber());
                                     goodsDetailsDto.setDiscountedPrice(goodsEntity.getRetailPrice());
+                                    goodsDetailsDto.setDeductionPrice(null);
                                     // 添加进商品详情列表
                                     goodsDetailsDtos.add(goodsDetailsDto);
                                     activityFlag.set(false);
@@ -4357,6 +4378,7 @@ public class OrderServiceImpl implements OrderService {
                                     goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.MZ.getTopicName());
                                     goodsDetailsDto.setGiftNumber(mkActivitiesFullGiftEntity.getGiftNumber());
                                     goodsDetailsDto.setDiscountedPrice(goodsEntity.getRetailPrice());
+                                    goodsDetailsDto.setDeductionPrice(null);
                                     // 添加进商品详情列表
                                     goodsDetailsDtos.add(goodsDetailsDto);
                                     activityFlag.set(false);
@@ -4413,6 +4435,7 @@ public class OrderServiceImpl implements OrderService {
                                     goodsDetailsDto.setGoodstaxes(String.valueOf(tax.multiply(new BigDecimal(goodsDetailsDto.getSellVolume()))));
                                     goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.YHQ.getTopicName());
                                     goodsDetailsDto.setDiscountedPrice(retailPrice.subtract(discountAfterPrice));
+                                    goodsDetailsDto.setDeductionPrice(null);
                                     goodsDetailsDtos.add(goodsDetailsDto);
                                     activityFlag.set(false);
                                 }
@@ -4441,6 +4464,7 @@ public class OrderServiceImpl implements OrderService {
                                     goodsDetailsDto.setGoodstaxes(String.valueOf(tax.multiply(new BigDecimal(goodsDetailsDto.getSellVolume()))));
                                     goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.YHQ.getTopicName());
                                     goodsDetailsDto.setDiscountedPrice(retailPrice.subtract(discountAfterPrice));
+                                    goodsDetailsDto.setDeductionPrice(null);
                                     goodsDetailsDtos.add(goodsDetailsDto);
                                     activityFlag.set(false);
                                 }
@@ -4470,6 +4494,7 @@ public class OrderServiceImpl implements OrderService {
                                         goodsDetailsDto.setGoodstaxes(String.valueOf(tax.multiply(new BigDecimal(goodsDetailsDto.getSellVolume()))));
                                         goodsDetailsDto.setActivity(Constants.ActivityTopicEnum.YHQ.getTopicName());
                                         goodsDetailsDto.setDiscountedPrice(retailPrice.subtract(discountAfterPrice));
+                                        goodsDetailsDto.setDeductionPrice(null);
                                         goodsDetailsDtos.add(goodsDetailsDto);
                                         activityFlag.set(false);
                                     }

+ 16 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesScoreServiceImpl.java

@@ -6,7 +6,9 @@ import com.google.common.collect.ImmutableBiMap;
 import com.kmall.admin.dao.mk.MkActivitiesScoreDao;
 import com.kmall.admin.dto.ScoreReductionDTO;
 import com.kmall.admin.entity.mk.MkActivitiesScoreEntity;
+import com.kmall.admin.fromcomm.entity.SysUserEntity;
 import com.kmall.admin.service.mk.MkActivitiesScoreService;
+import com.kmall.admin.utils.ShiroUtils;
 import com.kmall.common.utils.*;
 import org.springframework.aop.framework.AopContext;
 import org.springframework.beans.BeanUtils;
@@ -48,11 +50,25 @@ public class MkActivitiesScoreServiceImpl implements MkActivitiesScoreService {
 
     @Override
     public int save(MkActivitiesScoreEntity mkActivitiesScore) {
+
+        SysUserEntity user = ShiroUtils.getUserEntity();
+
+        mkActivitiesScore.setCreaterSn(user.getUserId() + "");
+        mkActivitiesScore.setCreateTime(new Date());
+        mkActivitiesScore.setModerSn(user.getUserId() + "");
+        mkActivitiesScore.setUpdateTime(mkActivitiesScore.getCreateTime());
+
         return mkActivitiesScoreDao.save(mkActivitiesScore);
     }
 
     @Override
     public int update(MkActivitiesScoreEntity mkActivitiesScore) {
+
+        SysUserEntity user = ShiroUtils.getUserEntity();
+
+        mkActivitiesScore.setModerSn(user.getUserId() + "");
+        mkActivitiesScore.setUpdateTime(new Date());
+
         return mkActivitiesScoreDao.update(mkActivitiesScore);
     }
 

+ 1 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/mk/MkActivitiesServiceImpl.java

@@ -84,7 +84,7 @@ public class MkActivitiesServiceImpl implements MkActivitiesService {
 
         MkActivitiesAssociationEntity mkActivitiesAssociation = new MkActivitiesAssociationEntity();
         BeanUtils.copyProperties(mkActivities, mkActivitiesAssociation);
-        mkActivitiesAssociationDao.update(mkActivitiesAssociation);
+        mkActivitiesAssociationDao.updateByMkaId(mkActivitiesAssociation);
 
         return 1;
     }

+ 3 - 1
kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml

@@ -412,11 +412,13 @@
         o.actual_price,
         o.order_price,
         o.pay_time,
-        o.pay_flag
+        o.pay_flag,
+        c.pick_up_code_sn
         from mall_order o
         LEFT JOIN mall_store s on o.store_id = s.id
         LEFT JOIN mall_order_goods g ON o.id = g.order_id
         LEFT JOIN mall_user u ON o.user_id = u.id
+        LEFT JOIN mall_pick_up_code c on c.order_sn = o.order_sn
         WHERE 1=1
         <if test="storeId != null and storeId != ''">
             AND o.store_id = #{storeId}

+ 15 - 13
kmall-admin/src/main/resources/mybatis/mapper/StoreSmsConfigDao.xml

@@ -38,19 +38,21 @@
 
 	<select id="queryList" resultType="com.kmall.admin.entity.StoreSmsConfigEntity">
 		select
-    		`id`,
-    		`store_id`,
-    		`merch_sn`,
-    		`send_start_time`,
-    		`send_end_time`,
-    		`is_valid`,
-		`is_enable`,
-    		`creater_sn`,
-    		`create_time`,
-    		`moder_sn`,
-    		`mod_time`,
-    		`tstm`
-		from mall_store_sms_config
+			config.`id`,
+			config.`store_id`,
+			config.`merch_sn`,
+			config.`send_start_time`,
+			config.`send_end_time`,
+			config.`is_valid`,
+			config.`is_enable`,
+			config.`creater_sn`,
+			config.`create_time`,
+			config.`moder_sn`,
+			config.`mod_time`,
+			config.`tstm`,
+		    store.`store_name`
+		from mall_store_sms_config config
+		left join mall_store store on config.store_id = store.id
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')

+ 15 - 0
kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesAssociationDao.xml

@@ -143,6 +143,21 @@
 		</foreach>
 	</delete>
 
+	<update id="updateByMkaId" parameterType="com.kmall.admin.entity.mk.MkActivitiesAssociationEntity">
+		update mk_activities_association
+		<set>
+			<if test="mkCode != null">`mk_code` = #{mkCode}, </if>
+			<if test="merchSn != null">`merch_sn` = #{merchSn}, </if>
+			<if test="thirdMerchSn != null">`third_merch_sn` = #{thirdMerchSn}, </if>
+			<if test="mkaStoreId != null">`mka_store_id` = #{mkaStoreId}, </if>
+			<if test="mkaStatus != null">`mka_status` = #{mkaStatus}, </if>
+			<if test="mkaStartTime != null">`mka_start_time` = #{mkaStartTime}, </if>
+			<if test="mkdEndTime != null">`mkd_end_time` = #{mkdEndTime}, </if>
+			<if test="mkaEndEarly != null">`mka_end_early` = #{mkaEndEarly}, </if>
+			<if test="mkdEndEarlyTime != null">`mkd_end_early_time` = #{mkdEndEarlyTime}</if>
+		</set>
+		where `mka_id` = #{mkaId}
+	</update>
 
 
 </mapper>

+ 6 - 0
kmall-admin/src/main/resources/mybatis/mapper/mk/MkActivitiesScoreDao.xml

@@ -55,6 +55,9 @@
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')
 		</if>
+		<if test="prodBarcode != null and prodBarcode.trim() != ''">
+			AND `prod_barcode` LIKE concat('%',#{prodBarcode},'%')
+		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}
@@ -74,6 +77,9 @@
         <if test="name != null and name.trim() != ''">
             AND name LIKE concat('%',#{name},'%')
         </if>
+		<if test="prodBarcode != null and prodBarcode.trim() != ''">
+			AND `prod_barcode` LIKE concat('%',#{prodBarcode},'%')
+		</if>
 	</select>
 
 	<select id="queryEntityByProdBarcodeAndSkuAndStoreIdAndTime"

+ 6 - 3
kmall-admin/src/main/webapp/WEB-INF/page/mk/mkactivitiesscore.html

@@ -12,6 +12,9 @@
                 <i-col span="4">
                     <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                 </i-col>
+                <i-col span="4">
+                    <i-input v-model="q.prodBarcode" @on-enter="query" placeholder="商品条码"/>
+                </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
@@ -60,9 +63,9 @@
             <Form-item label="营销活动编号" prop="mkaId">
                 <i-input v-model="mkActivitiesScore.mkaId" placeholder="营销活动编号"/>
             </Form-item>
-            <Form-item label="截止日期" prop="deadline">
-                <i-input v-model="mkActivitiesScore.deadline" placeholder="截止日期"/>
-            </Form-item>
+<!--            <Form-item label="截止日期" prop="deadline">-->
+<!--                <Date-picker type="datetime" format="yyyy-MM-dd HH:mm:ss" v-model="mkActivitiesScore.deadline" @on-change="getDeadLine" placeholder="截止日期" style="width: 240px"></Date-picker>-->
+<!--            </Form-item>-->
             <!--<Form-item label="创建时间" prop="createTime">
                 <i-input v-model="mkActivitiesScore.createTime" placeholder="创建时间"/>
             </Form-item>

+ 102 - 102
kmall-admin/src/main/webapp/WEB-INF/page/shop/brand.html

@@ -71,29 +71,29 @@
             <Form-item label="品牌唯一简码" prop="uniqueIdentifier">
                 <i-input v-model="brand.uniqueIdentifier" placeholder="品牌唯一简码,限制只能为字母数字下划线,长度不能超过10位"/>
             </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="图片" prop="listPicUrl">
-                        <i-input v-model="brand.listPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessListPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImageListPicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="图片" prop="listPicUrl">-->
+<!--                        <i-input v-model="brand.listPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessListPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImageListPicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>-->
                 <!--<i-col span="16" style="margin-top: -30px;"  placeholder="图片尺寸建议760*484像素以内,大小100k以下">-->
                     <!--&lt;!&ndash;<span style="margin-left: 100px;color: red;font-size: 12px;">* 图片尺寸建议760*484像素以内,大小100k以下</span>&ndash;&gt;-->
@@ -102,37 +102,37 @@
             <Form-item label="描述" prop="simpleDesc">
                 <i-input type="textarea" v-model="brand.simpleDesc" placeholder="描述"/>
             </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="图片" prop="picUrl">
-                        <i-input v-model="brand.picUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImagePicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="图片" prop="picUrl">-->
+<!--                        <i-input v-model="brand.picUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImagePicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>
                 <i-col span="16" style="margin-top: -30px;">
                     <span style="margin-left: 100px;color: red;font-size: 12px;">* 图片尺寸建议760*484像素以内,大小100k以下</span>
                 </i-col>
             </Row>-->
-            <Form-item label="排序" prop="sortOrder">
-                <Input-number :min="0" :step="1" v-model="brand.sortOrder" placeholder="排序" style="width: 188px;"/>
-            </Form-item>
+<!--            <Form-item label="排序" prop="sortOrder">-->
+<!--                <Input-number :min="0" :step="1" v-model="brand.sortOrder" placeholder="排序" style="width: 188px;"/>-->
+<!--            </Form-item>-->
             <Form-item label="显示" prop="isShow">
                 <Radio-group v-model="brand.isShow">
                     <Radio label="1">
@@ -143,32 +143,32 @@
                     </Radio>
                 </Radio-group>
             </Form-item>
-            <Form-item label="展示价格" prop="floorPrice">
-                <Input-number :min="0" v-model="brand.floorPrice" placeholder="展示价格" style="width: 188px;"/>
-            </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="app显示图片" prop="appListPicUrl">
-                        <i-input v-model="brand.appListPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessAppListPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImageAppListPicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Form-item label="展示价格" prop="floorPrice">-->
+<!--                <Input-number :min="0" v-model="brand.floorPrice" placeholder="展示价格" style="width: 188px;"/>-->
+<!--            </Form-item>-->
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="app显示图片" prop="appListPicUrl">-->
+<!--                        <i-input v-model="brand.appListPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessAppListPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImageAppListPicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>
                 <i-col span="16" style="margin-top: -30px;">
                     <span style="margin-left: 100px;color: red;font-size: 12px;">* app显示图片尺寸建议760*484像素以内,大小100k以下</span>
@@ -184,38 +184,38 @@
                     </Radio>
                 </Radio-group>
             </Form-item>
-            <Row>
-                <i-col span="16">
-                    <Form-item label="新品牌图片" prop="newPicUrl">
-                        <i-input v-model="brand.newPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
-                                max-size="100"
-                                :on-success="handleSuccessNewPicUrl" :on-format-error="handleFormatError"
-                                :show-upload-list="false"
-                                :on-exceeded-size="handleMaxSize">
-                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
-                        </Upload>
-                    </Form-item>
-                </i-col>
-                <i-col span="4">
-                    <Form-item :label-width="1">
-                        <i-button icon="eye" @click="eyeImageNewPicUrl">预览图片</i-button>
-                    </Form-item>
-                </i-col>
-            </Row>
+<!--            <Row>-->
+<!--                <i-col span="16">-->
+<!--                    <Form-item label="新品牌图片" prop="newPicUrl">-->
+<!--                        <i-input v-model="brand.newPicUrl" placeholder="图片尺寸建议760*484像素以内,大小100k以下" readonly/>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"-->
+<!--                                max-size="100"-->
+<!--                                :on-success="handleSuccessNewPicUrl" :on-format-error="handleFormatError"-->
+<!--                                :show-upload-list="false"-->
+<!--                                :on-exceeded-size="handleMaxSize">-->
+<!--                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>-->
+<!--                        </Upload>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--                <i-col span="4">-->
+<!--                    <Form-item :label-width="1">-->
+<!--                        <i-button icon="eye" @click="eyeImageNewPicUrl">预览图片</i-button>-->
+<!--                    </Form-item>-->
+<!--                </i-col>-->
+<!--            </Row>-->
             <!--<Row>
                 <i-col span="16" style="margin-top: -30px;" placeholder="* 新品牌图片尺寸建议760*484像素以内,大小100k以下">
                     &lt;!&ndash;<span style="margin-left: 100px;color: red;font-size: 12px;"></span>&ndash;&gt;
                 </i-col>
             </Row>-->
-            <Form-item label="新品牌排序" prop="newSortOrder">
-                <Input-number :min="0" :step="1" v-model="brand.newSortOrder" placeholder="新品牌排序"
-                              style="width: 188px;"/>
-            </Form-item>
+<!--            <Form-item label="新品牌排序" prop="newSortOrder">-->
+<!--                <Input-number :min="0" :step="1" v-model="brand.newSortOrder" placeholder="新品牌排序"-->
+<!--                              style="width: 188px;"/>-->
+<!--            </Form-item>-->
             <Form-item>
                 <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                 <i-button type="warning" @click="reload" style="margin-left: 8px"/>

+ 47 - 18
kmall-admin/src/main/webapp/js/mk/mkactivitiesscore.js

@@ -24,16 +24,26 @@ $(function () {
         datatype: "json",
         colModel: [
 			{label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-			{label: '商品条码', name: 'prodBarcode', index: 'prod_barcode', width: 80},
-			{label: 'sku', name: 'sku', index: 'sku', width: 80},
+			{label: '商品条码', name: 'prodBarcode', index: 'prod_barcode', width: 150},
+			{label: 'sku', name: 'sku', index: 'sku', width: 150},
 			{label: '门店id', name: 'storeId', index: 'store_id', width: 80},
 			{label: '抵扣比例', name: 'scoreLimit', index: 'score_limit', width: 80},
-			{label: '营销活动编号', name: 'mkaId', index: 'mka_id', width: 80},
-			{label: '截止日期', name: 'deadline', index: 'deadline', width: 80},
-			{label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
-			{label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
-			{label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
-			{label: '修改时间', name: 'updateTime', index: 'update_time', width: 80}],
+			{label: '营销活动编号', name: 'mkaId', index: 'mka_id', width: 100}
+			// {label: '截止日期', name: 'deadline', index: 'deadline', width: 200,
+			// 	formatter: function (value) {
+			// 		return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+			// 	}}
+			// {label: '创建时间', name: 'createTime', index: 'create_time', width: 200,
+			// 	formatter: function (value) {
+			// 		return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+			// 	}},
+			// {label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 100},
+			// {label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
+			// {label: '修改时间', name: 'updateTime', index: 'update_time', width: 200,
+			// 	formatter: function (value) {
+			// 		return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+			// 	}}
+			],
 		viewrecords: true,
 		postData: {'mkaId': vm.mkaId},
         height: 550,
@@ -43,7 +53,9 @@ $(function () {
         rownumWidth: 25,
         autowidth: true,
         multiselect: true,
-        pager: "#jqGridPager",
+		shrinkToFit: true,
+		autoScroll: true,
+		pager: "#jqGridPager",
         jsonReader: {
             root: "page.list",
             page: "page.currPage",
@@ -56,7 +68,8 @@ $(function () {
             order: "order"
         },
         gridComplete: function () {
-            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+			$("#jqGrid").setGridWidth($(window).width());
         }
     });
 });
@@ -68,12 +81,24 @@ let vm = new Vue({
         title: null,
 		mkActivitiesScore: {},
 		ruleValidate: {
-			name: [
-				{required: true, message: '名称不能为空', trigger: 'blur'}
+			sku: [
+				{required: true, message: 'sku不能为空', trigger: 'blur'},
+				{max: 32, message: 'sku长度不能超过32', trigger: 'blur'}
+			],
+			prodBarcode: [
+				{required: true, message: '商品条码不能为空', trigger: 'blur'},
+				{max: 32, message: '商品条码长度不能超过32', trigger: 'blur'}
+			],
+			scoreLimit: [
+				{required: true, message: '抵扣比例不能为空', trigger: 'blur'}
 			]
+			// deadLine: [
+			// 	{required: true, message: '截止日期不能为空', trigger: 'blur'}
+			// ]
 		},
 		q: {
-		    name: ''
+		    name: '',
+			prodBarcode: ''
 		},
 		isMkactivitiesShow: true,
 		mkCode: '',
@@ -104,8 +129,8 @@ let vm = new Vue({
             let url = vm.mkActivitiesScore.id == null ? "../mkactivitiesscore/save" : "../mkactivitiesscore/update";
 
 			//添加上层的门店编号与营销方式编号
-			vm.mkActivitiesHalfPrice.shopSn = vm.storeId;
-			vm.mkActivitiesHalfPrice.mkaId = vm.mkaId;
+			vm.mkActivitiesScore.storeId = vm.storeId;
+			vm.mkActivitiesScore.mkaId = vm.mkaId;
 
             $.ajax({
 				type: "POST",
@@ -154,7 +179,8 @@ let vm = new Vue({
 		},
         reloadSearch: function() {
             vm.q = {
-                name: ''
+                name: '',
+				prodBarcode: ''
             }
             vm.reload();
 		},
@@ -162,7 +188,7 @@ let vm = new Vue({
 			vm.showList = true;
             let page = $("#jqGrid").jqGrid('getGridParam', 'page');
 			$("#jqGrid").jqGrid('setGridParam', {
-                postData: {'name': vm.q.name},
+                postData: {'name': vm.q.name, 'prodBarcode': vm.q.prodBarcode},
                 page: page
             }).trigger("reloadGrid");
             vm.handleReset('formValidate');
@@ -180,7 +206,6 @@ let vm = new Vue({
 			window.location.href = "/mk/mkactivityform.html?mkCode="+vm.mkCode;
 		},
 		uploadExcelSuccess: function (data) {
-			// console.log(data);
 			if(data.code==0){
 				alert('导入成功', function (index) {
 					$("#jqGrid").trigger("reloadGrid");
@@ -209,6 +234,10 @@ let vm = new Vue({
 			});
 			return promise; //通过返回一个promis对象解决
 
+		},
+		// 获取时间
+		getDeadLine: function (e) {
+			vm.mkActivitiesScore.deadLine = e;
 		}
 	}
 });

+ 29 - 24
kmall-admin/src/main/webapp/js/mk/mkactivityform.js

@@ -44,7 +44,7 @@ $(function () {
             order: "order"
         },
         gridComplete: function () {
-            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
         }
     });
 
@@ -63,8 +63,16 @@ $(function () {
         url: '../mkactivityform/queryMkactivitiesList',
         datatype: "json",
         colModel: [
+            {label: '操作', width: 100, align: 'center',
+                formatter: function (value, col, row) {
+                    htmlStr = "<button class='btn btn-outline btn-primary' " +
+                        "onclick='vm.showMkactivitiesGoods(\""+row.mkaId+"\",\""+row.mkaStoreId+"\",\""+row.mkaTopic+"\")'>管理商品</button>";
+
+                    return htmlStr;
+                }
+            },
             {label: 'mkaId', name: 'mkaId', index: 'mka_id', key: true, hidden: true},
-            {label: '营销方式', name: 'mkaTopic', index: 'mka_topic', width: 80, align: 'center',
+            {label: '营销方式', name: 'mkaTopic', index: 'mka_topic', width: 100, align: 'center',
                 formatter:function(value){
                     var mkaTopicName ;
                     if(value === 'lscx')
@@ -87,11 +95,11 @@ $(function () {
                         mkaTopicName = marketing.drjbj;
                     return mkaTopicName == null? value : mkaTopicName;
                 }},
-            {label: '商户名称', name: 'merchName', width: 80, align: 'center'},
-            {label: '第三方商户', name: 'thirdMerchName', width: 80, align: 'center'},
-            {label: '门店编号', name: 'mkaStoreId', width: 80, align: 'center',hidden: true},
-            {label: '活动门店', name: 'storeName', width: 80, align: 'center'},
-            {label: '是否启用', name: 'mkaStatus', index: 'mka_status', width: 60, align: 'center',
+            {label: '商户名称', name: 'merchName', width: 200, align: 'center'},
+            {label: '第三方商户', name: 'thirdMerchName', width: 200, align: 'center'},
+            {label: '门店编号', name: 'mkaStoreId', width: 200, align: 'center',hidden: true},
+            {label: '活动门店', name: 'storeName', width: 200, align: 'center'},
+            {label: '是否启用', name: 'mkaStatus', index: 'mka_status', width: 100, align: 'center',
                 formatter: function (value) {
                     if (value == '0') {
                         return '否';
@@ -101,10 +109,10 @@ $(function () {
                     return '';
                 }
             },
-            {label: '活动优先级', name: 'priority', index: 'priority', width: 80, align: 'center'},
-            {label: '开始时间', name: 'mkaStartTime', index: 'mka_start_time', width: 80, align: 'center'},
-            {label: '结束时间', name: 'mkdEndTime', index: 'mkd_end_time', width: 80, align: 'center'},
-            {label: '是否提前结束', name: 'mkaEndEarly', index: 'mka_end_early', width: 60, align: 'center',
+            {label: '活动优先级', name: 'priority', index: 'priority', width: 100, align: 'center'},
+            {label: '开始时间', name: 'mkaStartTime', index: 'mka_start_time', width: 200, align: 'center'},
+            {label: '结束时间', name: 'mkdEndTime', index: 'mkd_end_time', width: 200, align: 'center'},
+            {label: '是否提前结束', name: 'mkaEndEarly', index: 'mka_end_early', width: 200, align: 'center',
                 formatter: function (value) {
                     if (value == '0') {
                         return '否';
@@ -114,25 +122,20 @@ $(function () {
                     return '';
                 }
             },
-            {label: '提前结束时间', name: 'mkdEndEarlyTime', index: 'mkd_end_early_time', width: 80, align: 'center'},
-            {label: '操作', width: 80, align: 'center',
-                formatter: function (value, col, row) {
-                    htmlStr = "<button class='btn btn-outline btn-primary' " +
-                        "onclick='vm.showMkactivitiesGoods(\""+row.mkaId+"\",\""+row.mkaStoreId+"\",\""+row.mkaTopic+"\")'>管理商品</button>";
-
-                    return htmlStr;
-                }
-            }],
+            {label: '提前结束时间', name: 'mkdEndEarlyTime', index: 'mkd_end_early_time', width: 200, align: 'center'}
+            ],
         viewrecords: true,
-        height: 550,
+        height: '100%',
         width:1680,
         postData: {'mkCode': vm.mkCode, 'topic': vm.q.topic},
         rowNum: 10,
         rowList: [10, 30, 50],
         rownumbers: true,
         rownumWidth: 25,
-        autowidth: false,
+        autowidth: true,
         multiselect: true,
+        autoScroll: true,   //开启水平滚动条
+        shrinkToFit: false,
         pager: "#jqGridPagerOrder",
         jsonReader: {
             root: "page.list",
@@ -146,11 +149,13 @@ $(function () {
             order: "order"
         },
         gridComplete: function () {
-            $("#jqGridOrder").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+            $("#jqGridOrder").closest(".ui-jqgrid-bdiv").css({"overflow-x": "scroll"});
+            $("#jqGridOrder").setGridWidth($(window).width());
         }
     });
 
-
+    // 启动冻结列
+    $("#jqGridOrder").jqGrid("setFrozenColumns");
 
 });
 

+ 1 - 1
kmall-admin/src/main/webapp/js/receipt/receiptCheck.js

@@ -21,7 +21,7 @@ $(function () {
         datatype: "json",
         colModel: [
             {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-            {label: '小票号', name: 'orderSn', index: 'order_sn', align: 'center',width: 120},
+            {label: '小票号', name: 'pickUpCodeSn', index: 'pick_up_code_sn', align: 'center',width: 120},
             {label: '订单号', name: 'orderSn', index: 'order_sn', align: 'center',width: 120},
             {label: '门店地址', name: 'storeName', index: 'storeName', align: 'center',width: 150},
             {label: '操作店员', name: 'userName', index: 'userName', align: 'center',width: 80},

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

@@ -35,7 +35,7 @@ function calculateGoodsPrice(r){
     var brand = r.goodsDetails.brand;
     console.log(rMap);
 
-    if(rMap.yhq){
+    /*if(rMap.yhq){
         for(var i in rMap.yhq){
             vm.coupons.set(i,rMap.yhq[i]);
         }
@@ -81,7 +81,7 @@ function calculateGoodsPrice(r){
             vm.halfPrice.set(rMap.drjbj.barcode,1);
         }
 
-    }
+    }*/
 
 
     // if(rMap.zhjsp){
@@ -1921,7 +1921,7 @@ function handle(goodsDetails,operatorType){
         vm.goodsList.push(data);
         vm.index = vm.index + 1;
     }
-    vm.totalPrice = (vm.totalPrice + data.retailPrice);
+    vm.totalPrice = new BigNumber(vm.totalPrice).add(new BigNumber(data.retailPrice));
 
     if("minus" == operatorType){
         vm.totalCount = vm.totalCount - 1;

+ 68 - 65
kmall-admin/src/main/webapp/js/shop/brand.js

@@ -2,39 +2,44 @@ $(function () {
     $("#jqGrid").jqGrid({
         url: '../brand/list',
         datatype: "json",
-        colModel: [{
-            label: 'id', name: 'id', index: 'id', key: true, width: 140, align: 'center'
-        },
+        colModel: [
+            {label: 'id', name: 'id', index: 'id', key: true, width: 140, align: 'center', hidden: true},
             // {label: '所属商户', name: 'merchName', index: 'merchName', width: 180, align: 'center'},
             // {label: '所属门店', name: 'storeName', index: 'storeName', width: 180, align: 'center'},
             // {label: '所属分类', name: 'categoryName', index: 'categoryName', width: 180, align: 'center'},
             {
                 label: '品牌名称', name: 'name', index: 'name', width: 300
-            },{
+            },
+            {
                 label: '品牌唯一简码', name: 'uniqueIdentifier', index: 'name', width: 100
-            }, {
-                label: '图片',
-                name: 'listPicUrl',
-                index: 'list_pic_url',
-                width: 100,
-                align: 'center',
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
+            },
+            // {
+            //     label: '图片',
+            //     name: 'listPicUrl',
+            //     index: 'list_pic_url',
+            //     width: 100,
+            //     align: 'center',
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // },
+            {
                 label: '描述', name: 'simpleDesc', index: 'simple_desc', width: 250
-            }, {
-                label: '图片',
-                name: 'picUrl',
-                index: 'pic_url',
-                width: 100,
-                align: 'center',
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
-                label: '排序', name: 'sortOrder', index: 'sort_order', width: 100, align: 'center'
-            }, {
+            },
+            // {
+            //     label: '图片',
+            //     name: 'picUrl',
+            //     index: 'pic_url',
+            //     width: 100,
+            //     align: 'center',
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // },
+            // {
+            //     label: '排序', name: 'sortOrder', index: 'sort_order', width: 100, align: 'center'
+            // },
+            {
                 label: '显示',
                 name: 'isShow',
                 index: 'is_show',
@@ -43,33 +48,36 @@ $(function () {
                 formatter: function (value) {
                     return transIsNot(value)
                 }
-            }, {
-                label: '展示价格', name: 'floorPrice', index: 'floor_Price', width: 100, align: 'right'
-            }, {
-                label: 'app显示图片',
-                name: 'appListPicUrl',
-                index: 'app_list_pic_url',
-                align: 'center',
-                width: 100,
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
+            },
+            // {
+            //     label: '展示价格', name: 'floorPrice', index: 'floor_Price', width: 100, align: 'right'
+            // }, {
+            //     label: 'app显示图片',
+            //     name: 'appListPicUrl',
+            //     index: 'app_list_pic_url',
+            //     align: 'center',
+            //     width: 100,
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // },
+            {
                 label: '新品牌', name: 'isNew', index: 'is_new', align: 'center', width: 100, formatter: function (value) {
                     return transIsNot(value)
                 }
-            }, {
-                label: '新品牌图片',
-                name: 'newPicUrl',
-                index: 'new_pic_url',
-                align: 'center',
-                width: 100,
-                formatter: function (value) {
-                    return transImg(value);
-                }
-            }, {
-                label: '新品牌排序', name: 'newSortOrder', index: 'new_sort_order', align: 'center', width: 80
             }
+            // {
+            //     label: '新品牌图片',
+            //     name: 'newPicUrl',
+            //     index: 'new_pic_url',
+            //     align: 'center',
+            //     width: 100,
+            //     formatter: function (value) {
+            //         return transImg(value);
+            //     }
+            // }, {
+            //     label: '新品牌排序', name: 'newSortOrder', index: 'new_sort_order', align: 'center', width: 80
+            // }
             // ,
             //     {label: '操作', width: 150, align: 'center', sortable: false,
             //         formatter: function (value, col, row) {
@@ -113,7 +121,7 @@ $(function () {
 
 
 var category_ztree;
-var exportMsg;
+
 var category_setting = {
     data: {
         simpleData: {
@@ -146,16 +154,19 @@ var vm = new Vue({
         brand: {listPicUrl: '', picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0},
         ruleValidate: {
             name: [
-                {required: true, message: '品牌名称不能为空', trigger: 'blur'}
+                {required: true, message: '品牌名称不能为空', trigger: 'blur'},
+                {max: 64, message: '品牌名称长度不能超过64', trigger: 'blur'}
             ],
             uniqueIdentifier: [
-                {required: true, message: '品牌唯一简码不能为空', trigger: 'blur'}
+                // {required: true, message: '品牌唯一简码不能为空', trigger: 'blur'},
+                {max: 10, message: '品牌唯一简码长度不能超过10', trigger: 'blur'}
             ],
             // listPicUrl: [
             //     {required: true, message: '品牌图片不能为空', trigger: 'blur'}
             // ],
             simpleDesc: [
-                {required: true, message: '品牌描述不能为空', trigger: 'blur'}
+                {required: true, message: '品牌描述不能为空', trigger: 'blur'},
+                {max: 200, message: '品牌描述长度不能超过200', trigger: 'blur'}
             ],
             // picUrl: [
             //     {required: true, message: '品牌图片不能为空', trigger: 'blur'}
@@ -289,9 +300,10 @@ var vm = new Vue({
 
             // 校验品牌唯一简码
             var uniqueIdentifier = vm.brand.uniqueIdentifier;
-            var uniqueReg = /^[0-9a-zA-Z_]{1,10}$/;
+            var uniqueReg = /^[0-9a-zA-Z_]{0,10}$/;
             if(!uniqueReg.test(uniqueIdentifier)){
                 alert("请输入正确的唯一简码");
+                return;
             }
 
 
@@ -475,7 +487,6 @@ var vm = new Vue({
             });
         },
         uploadExcelSuccess: function (data) {
-            // console.log(data);
             if (data.code == 0) {
                 alert('导入成功', function (index) {
                     $("#jqGrid").trigger("reloadGrid");
@@ -483,30 +494,22 @@ var vm = new Vue({
             } else {
                 alert(data.msg);
             }
-            setTimeout(exportMsg, 100);
         },
         uploadExcelError: function () {
             alert('上传出现异常,请重试!');
-            setTimeout(exportMsg, 100);
         },
         uploadExcelProgress: function (event, file, fileList) {
-            console.log("上传中")
-            console.log(event)
-            console.log(file)
-            console.log(fileList)
-            console.log("上传中")
-            exportMsg = this.$Message.loading({
+            const msg = this.$Message.loading({
                 content: 'Loading...',
                 duration: 0
             });
-            // setTimeout(msg, 3000);
+            setTimeout(msg, 1000);
         },
         uploadExcelFormatError: function (file) {
             this.$Notice.warning({
                 title: '文件格式不正确',
                 desc: '文件 ' + file.name + ' 格式不正确,请上传 xls 或 xlsx 格式的文件。'
             });
-            setTimeout(exportMsg, 100);
         }
     },
     mounted() {

+ 2 - 1
kmall-admin/src/main/webapp/js/shop/storesmsconfig.js

@@ -5,7 +5,8 @@ $(function () {
         colModel: [
 			{label: 'id', name: 'id', index: 'id', key: true, hidden: true},
 			{label: '商户编号', name: 'merchSn', index: 'merch_sn', align: 'center', width: 80},
-			{label: '门店id', name: 'storeId', index: 'store_id',  align: 'center',width: 80},
+			{label: '门店id', name: 'storeId', index: 'store_id',  align: 'center',width: 80, hidden: true},
+			{label: '门店名称', name: 'storeName', index: 'store_name',  align: 'center',width: 80},
 			{label: '发送开始时间', name: 'sendStartTime', index: 'send_start_time',  align: 'center',width: 80,formatter: function (value) {
 					return transDate(value,'yyyy-MM-dd hh:mm:ss');
 				}},

BIN
kmall-admin/src/main/webapp/statics/file/activities_score_yyyy_mm_dd_v1.0.0.xlsx


BIN
kmall-admin/src/main/webapp/statics/file/brand_export_yyyy_mm_dd_v1.0.0.xls


+ 1 - 1
kmall-manager/src/main/resources/conf/redis.properties

@@ -1,7 +1,7 @@
 ########## redis \u914D\u7F6E ##########
 
 # [dev, prod]
-redis.env=prod
+redis.env=dev
 
 # \u5F00\u53D1\u73AF\u5883
 redis.dev.keyPrefix=platform