Explorar el Código

订单挂起与恢复

zcb hace 4 años
padre
commit
dd776b79db
Se han modificado 24 ficheros con 269 adiciones y 80 borrados
  1. 1 1
      kmall-admin/src/main/java/com/kmall/admin/controller/BrandController.java
  2. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/MkActivitiesCouponDao.java
  3. 30 0
      kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java
  4. 21 0
      kmall-admin/src/main/java/com/kmall/admin/entity/OrderGoodsEntity.java
  5. 2 0
      kmall-admin/src/main/java/com/kmall/admin/service/MkActivitiesCouponService.java
  6. 4 4
      kmall-admin/src/main/java/com/kmall/admin/service/impl/CategoryServiceImpl.java
  7. 5 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/MkActivitiesCouponServiceImpl.java
  8. 32 2
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  9. 5 8
      kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesCombinationPriceDao.xml
  10. 21 2
      kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesCouponDao.xml
  11. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesDiscountDao.xml
  12. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesFullGiftDao.xml
  13. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesFullReductionDao.xml
  14. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesGetOneFreeGoodsDao.xml
  15. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesPromotionDao.xml
  16. 2 2
      kmall-admin/src/main/resources/mybatis/mapper/MkDailyActivitiesDao.xml
  17. 4 0
      kmall-admin/src/main/resources/mybatis/mapper/OrderGoodsDao.xml
  18. 37 14
      kmall-admin/src/main/webapp/WEB-INF/page/sale/sale.html
  19. 7 7
      kmall-admin/src/main/webapp/WEB-INF/page/shop/category.html
  20. 1 0
      kmall-admin/src/main/webapp/WEB-INF/page/shop/goodstransportinfodetail.html
  21. 61 20
      kmall-admin/src/main/webapp/js/sale/sale.js
  22. 1 1
      kmall-admin/src/main/webapp/js/shop/attribute.js
  23. 1 9
      kmall-admin/src/main/webapp/js/shop/goodstransportinfodetail.js
  24. 22 0
      kmall-api/src/main/java/com/kmall/api/entity/OrderGoodsVo.java

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

@@ -34,7 +34,7 @@ public class BrandController {
     @RequiresPermissions("brand:list")
     public R list(@RequestParam Map<String, Object> params) {
         ParamUtils.setQueryPowerByRoleType(params, "storeId", "merchSn", "thirdPartyMerchCode");
-        ParamUtils.setName(params, "name");
+//        ParamUtils.setName(params, "name");
 
         //查询列表数据
         Query query = new Query(params);

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/MkActivitiesCouponDao.java

@@ -21,4 +21,6 @@ public interface MkActivitiesCouponDao extends BaseDao<MkActivitiesCouponEntity>
      */
     MkActivitiesCouponEntity queryByBarCode(@Param("mkaId") Long mkaId,
                                             @Param("prodBarcode") String prodBarcode);
+
+    MkActivitiesCouponEntity queryByCouponSn(@Param("couponSn") String couponSn);
 }

+ 30 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java

@@ -225,6 +225,36 @@ public class GoodsEntity implements Serializable {
 
     private String activity;
 
+    // 单价
+    private BigDecimal retailPrice;
+    // 优惠金额
+    private BigDecimal discountedPrice;
+    // 实际支付价
+    private BigDecimal actualPaymentAmount;
+
+    public BigDecimal getRetailPrice() {
+        return retailPrice;
+    }
+
+    public void setRetailPrice(BigDecimal retailPrice) {
+        this.retailPrice = retailPrice;
+    }
+
+    public BigDecimal getDiscountedPrice() {
+        return discountedPrice;
+    }
+
+    public void setDiscountedPrice(BigDecimal discountedPrice) {
+        this.discountedPrice = discountedPrice;
+    }
+
+    public BigDecimal getActualPaymentAmount() {
+        return actualPaymentAmount;
+    }
+
+    public void setActualPaymentAmount(BigDecimal actualPaymentAmount) {
+        this.actualPaymentAmount = actualPaymentAmount;
+    }
 
     public Date getLastSaleTime() {
         return lastSaleTime;

+ 21 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/OrderGoodsEntity.java

@@ -67,6 +67,11 @@ public class OrderGoodsEntity implements Serializable {
 
 	private String activity;
 
+	// 优惠金额
+	private BigDecimal discountedPrice;
+	// 实际支付价
+	private BigDecimal actualPaymentAmount;
+
 	public String getPlu() {
 		return plu;
 	}
@@ -335,4 +340,20 @@ public class OrderGoodsEntity implements Serializable {
 	public void setActivity(String activity) {
 		this.activity = activity;
 	}
+
+	public BigDecimal getDiscountedPrice() {
+		return discountedPrice;
+	}
+
+	public void setDiscountedPrice(BigDecimal discountedPrice) {
+		this.discountedPrice = discountedPrice;
+	}
+
+	public BigDecimal getActualPaymentAmount() {
+		return actualPaymentAmount;
+	}
+
+	public void setActualPaymentAmount(BigDecimal actualPaymentAmount) {
+		this.actualPaymentAmount = actualPaymentAmount;
+	}
 }

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/service/MkActivitiesCouponService.java

@@ -87,4 +87,6 @@ public interface MkActivitiesCouponService {
      * @return
      */
     MkActivitiesCouponEntity queryByBarCode(Long mkaId, String prodBarcode);
+
+    MkActivitiesCouponEntity queryByCouponSn(String couponSn);
 }

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

@@ -69,9 +69,9 @@ public class CategoryServiceImpl implements CategoryService {
         Map<String, Object> valideDate = MapBeanUtil.fromObject(category);
         ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
         builder.put("merchSn", "商户");
-        if("2".equals(category.getShare())){
-            builder.put("storeId", "门店");
-        }
+//        if("2".equals(category.getShare())){
+//            builder.put("storeId", "门店");
+//        }
         R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
         if (Integer.valueOf(r.get("code").toString()) != 0) {
             throw new RRException(r.get("msg").toString());
@@ -89,7 +89,7 @@ public class CategoryServiceImpl implements CategoryService {
         Map<String, Object> valideDate = MapBeanUtil.fromObject(category);
         ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
         builder.put("merchSn", "商户");
-        builder.put("storeId", "门店");
+//        builder.put("storeId", "门店");
         R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
         if (Integer.valueOf(r.get("code").toString()) != 0) {
             throw new RRException(r.get("msg").toString());

+ 5 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/MkActivitiesCouponServiceImpl.java

@@ -133,4 +133,9 @@ public class MkActivitiesCouponServiceImpl implements MkActivitiesCouponService
     public MkActivitiesCouponEntity queryByBarCode(Long mkaId, String prodBarcode) {
         return mkActivitiesCouponDao.queryByBarCode(mkaId,prodBarcode);
     }
+
+    @Override
+    public MkActivitiesCouponEntity queryByCouponSn(String couponSn) {
+        return mkActivitiesCouponDao.queryByCouponSn(couponSn);
+    }
 }

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

@@ -155,6 +155,10 @@ public class OrderServiceImpl implements OrderService {
     @Autowired
     private Mall2LowPriceWarningDao lowPriceWarningDao;
 
+    @Autowired
+    private MkActivitiesCouponService mkActivitiesCouponService;
+
+
     @Override
     public OrderEntity queryObject(Long id) {
         return orderDao.queryObject(id);
@@ -1667,6 +1671,9 @@ public class OrderServiceImpl implements OrderService {
             e.printStackTrace();
         }
 
+
+
+
         Map resultObj = Maps.newHashMap();
 
 
@@ -1763,14 +1770,27 @@ public class OrderServiceImpl implements OrderService {
                             goodsDao.update(goodsEntity);
                         }
                     }
-                    ;
+
+
                     if(goodsDto.get("actualPaymentAmount") instanceof Double){
                         goodsEntity.setStoreRetailPrice(new BigDecimal((Double)goodsDto.get("actualPaymentAmount")));
+                        goodsEntity.setRetailPrice(new BigDecimal((Double)goodsDto.get("retailPrice"))); // 单价
+                        goodsEntity.setDiscountedPrice(new BigDecimal((Double)goodsDto.get("discountedPrice"))); // 优惠金额
+                        goodsEntity.setActualPaymentAmount(new BigDecimal((Double)goodsDto.get("actualPaymentAmount"))); // 实际支付价格
                     }else if(goodsDto.get("actualPaymentAmount") instanceof Integer){
                         goodsEntity.setStoreRetailPrice(new BigDecimal((Integer)goodsDto.get("actualPaymentAmount")));
+                        goodsEntity.setRetailPrice(new BigDecimal((Integer)goodsDto.get("retailPrice")));
+                        goodsEntity.setDiscountedPrice(new BigDecimal((Integer)goodsDto.get("discountedPrice")));
+                        goodsEntity.setActualPaymentAmount(new BigDecimal((Integer)goodsDto.get("actualPaymentAmount")));
                     }else if(goodsDto.get("actualPaymentAmount") instanceof Float){
                         goodsEntity.setStoreRetailPrice(new BigDecimal((Float)goodsDto.get("actualPaymentAmount")));
+                        goodsEntity.setRetailPrice(new BigDecimal((Float)goodsDto.get("retailPrice")));
+                        goodsEntity.setDiscountedPrice(new BigDecimal((Float)goodsDto.get("discountedPrice")));
+                        goodsEntity.setActualPaymentAmount(new BigDecimal((Float)goodsDto.get("actualPaymentAmount")));
                     }
+
+
+
 //                    goodsEntity.setStoreRetailPrice(productInfo.getRetailPrice());
                     // 借用这个字段来存储购买数
                     goodsEntity.setGoodsNumber(sellVolume);
@@ -1805,9 +1825,15 @@ public class OrderServiceImpl implements OrderService {
                 merchUserDao.save(merchUserEntity);
             }
 
-
+            // TODO 查询使用的优惠券,并减扣金额
+            String couponSn = (String) userInfo.get("couponSn");
+            MkActivitiesCouponEntity couponEntity = mkActivitiesCouponService.queryByCouponSn(couponSn);
 //            // 优惠金额
             BigDecimal disCountAmount = new BigDecimal(0);
+            if(couponEntity != null){
+                disCountAmount= couponEntity.getCouponPrice();
+            }
+
 
 
             // 判断该用户是否是生日
@@ -2416,6 +2442,10 @@ public class OrderServiceImpl implements OrderService {
         orderGoodsVo.setList_pic_url(goodsDto.getListPicUrl());
         orderGoodsVo.setMarket_price(goodsDto.getStoreMarketPrice());
         orderGoodsVo.setRetail_price(goodsDto.getStoreRetailPrice());
+
+        orderGoodsVo.setDiscountedPrice(goodsDto.getDiscountedPrice());
+        orderGoodsVo.setActualPaymentAmount(goodsDto.getActualPaymentAmount());
+
         orderGoodsVo.setNumber(goodsDto.getGoodsNumber());
 //        orderGoodsVo.setGoods_specification_name_value(goodsDto.get);
 //        orderGoodsVo.setGoods_specification_ids(goodsItem.getGoods_specification_ids());

+ 5 - 8
kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesCombinationPriceDao.xml

@@ -51,17 +51,14 @@
     		`update_time`
 		from mk_activities_combination_price
 		WHERE 1=1
-		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
-		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
 		</if>
 		<if test="mkaId != null">
 			AND mka_id = #{mkaId}
 		</if>
-		<if test="prodBarcode != null and prodBarcode.trim() != ''">
-			AND combination_type like concat ( '%' , #{prodBarcode}, '%')
+		<if test="name != null and name.trim() != ''">
+			AND combination_type like concat ( '%' , #{name}, '%')
 		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
@@ -79,15 +76,15 @@
  	<select id="queryTotal" resultType="int">
 		select count(*) from mk_activities_combination_price
 		WHERE 1=1
-        <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
-        </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
 		</if>
 		<if test="mkaId != null">
 			AND mka_id = #{mkaId}
 		</if>
+		<if test="name != null and name.trim() != ''">
+			AND combination_type like concat ( '%' , #{name}, '%')
+		</if>
 	</select>
 
 	<insert id="save" parameterType="com.kmall.admin.entity.MkActivitiesCombinationPriceEntity" useGeneratedKeys="true" keyProperty="macpId">

+ 21 - 2
kmall-admin/src/main/resources/mybatis/mapper/MkActivitiesCouponDao.xml

@@ -53,7 +53,7 @@
 		from mk_activities_coupon
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND barcode LIKE concat('%',#{name},'%')
 		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -78,7 +78,7 @@
 		select count(*) from mk_activities_coupon
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND barcode LIKE concat('%',#{name},'%')
         </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -163,4 +163,23 @@
 		and barcode = #{prodBarcode}
 	</select>
 
+
+	<select id="queryByCouponSn" resultType="com.kmall.admin.entity.MkActivitiesCouponEntity">
+		select
+			`mac_id`,
+			`goods_sn`,
+			`barcode`,
+			`shop_sn`,
+			`coupon_sn`,
+			`coupon_price`,
+			`mka_id`,
+			`deadline`,
+			`create_time`,
+			`creater_sn`,
+			`moder_sn`,
+			`update_time`
+		from mk_activities_coupon
+		where coupon_sn = #{couponSn}
+	</select>
+
 </mapper>

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

@@ -59,7 +59,7 @@
 		from mk_activities_discount
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND barcode LIKE concat('%',#{name},'%')
 		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -84,7 +84,7 @@
 		select count(*) from mk_activities_discount
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND barcode LIKE concat('%',#{name},'%')
         </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}

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

@@ -65,7 +65,7 @@
 		from mk_activities_full_gift
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND barcode LIKE concat('%',#{name},'%')
 		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -90,7 +90,7 @@
 		select count(*) from mk_activities_full_gift
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND barcode LIKE concat('%',#{name},'%')
         </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}

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

@@ -62,7 +62,7 @@
 		from mk_activities_full_reduction
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND barcode LIKE concat('%',#{name},'%')
 		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -87,7 +87,7 @@
 		select count(*) from mk_activities_full_reduction
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND barcode LIKE concat('%',#{name},'%')
         </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}

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

@@ -65,7 +65,7 @@
 		from mk_activities_get_one_free_goods
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND barcode LIKE concat('%',#{name},'%')
 		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -90,7 +90,7 @@
 		select count(*) from mk_activities_get_one_free_goods
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND barcode LIKE concat('%',#{name},'%')
         </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}

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

@@ -59,7 +59,7 @@
 		from mk_activities_promotion
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND barcode LIKE concat('%',#{name},'%')
 		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -84,7 +84,7 @@
 		select count(*) from mk_activities_promotion
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND barcode LIKE concat('%',#{name},'%')
         </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}

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

@@ -62,7 +62,7 @@
 		from mk_daily_activities
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND barcode LIKE concat('%',#{name},'%')
 		</if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}
@@ -87,7 +87,7 @@
 		select count(*) from mk_daily_activities
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND barcode LIKE concat('%',#{name},'%')
         </if>
 		<if test="storeId != null and storeId.trim() != ''">
 			AND shop_sn = #{storeId}

+ 4 - 0
kmall-admin/src/main/resources/mybatis/mapper/OrderGoodsDao.xml

@@ -95,6 +95,8 @@
         `number`,
         `market_price`,
         `retail_price`,
+        `discounted_price`,
+        `actual_payment_amount`,
         `goods_specification_name_value`,
         `is_real`,
         `goods_specification_ids`,
@@ -140,6 +142,8 @@
         #{number},
         #{market_price},
         #{retail_price},
+        #{discountedPrice},
+        #{actualPaymentAmount},
         #{goods_specification_name_value},
         #{is_real},
         #{goods_specification_ids},

+ 37 - 14
kmall-admin/src/main/webapp/WEB-INF/page/sale/sale.html

@@ -16,7 +16,7 @@
         }
         .goods-button{
             border: #e5a032;
-            background-color: #e5a032;
+            /*background-color: #e5a032;*/
             font-size: 1.3em;
             margin-left: 20px;
         }
@@ -79,15 +79,15 @@
                     <li style="height: 600px;overflow:auto">
                         <table id="cbec" class="table .table-striped">
                             <tr style="border: white;background-color: #F5DCB3;font-size: 1.3em" >
-                                <th style="width: 371px">跨境商品名称</th>
-                                <th >规格</th>
-                                <th>单价</th>
-                                <th>优惠金额</th>
-                                <th>实际支付价</th>
+                                <th style="width: 350px;padding: 7px">跨境商品名称</th>
+                                <th style="padding: 7px">规格</th>
+                                <th style="padding: 7px">单价</th>
+                                <th style="padding: 7px">优惠金额</th>
+                                <th style="padding: 7px">实际支付价</th>
                                 <!--<th>税费</th>-->
-                                <th>数量</th>
+                                <th style="padding: 7px">数量</th>
 <!--                                <th>操作</th>-->
-                                <th>参与活动</th>
+                                <th style="padding: 7px">参与活动</th>
                             </tr>
                             <tr v-for="(item,i) in goodsList" v-if="item.name" style="font-size: 1.3em">
                                 <td><h3>{{item.name}}</h3></td>
@@ -118,8 +118,29 @@
                         </ul>
                     </li>
                     <li  style="height: 100px;">
-                        <i-button type="warning" @click="clearGoodsList" class="goods-button"><i class="fa fa-pencil-square-o"></i>&nbsp;清空商品列表</i-button>
-                        <i-button data-toggle="modal" @click="toOrderSubmit" type="warning" class="goods-button" ><i class="fa fa-pencil-square-o"></i>&nbsp;提交订单</i-button>
+                        <i-button type="error" @click="clearGoodsList" class="goods-button"><i class="fa fa-pencil-square-o"></i>&nbsp;清空</i-button>
+                        <i-button data-toggle="modal" @click="pendingOrder" class="goods-button" ><i class="fa fa-pencil-square-o"></i>&nbsp;订单挂起</i-button>
+                        <i-button data-toggle="modal" @click="toResumePending" class="goods-button" ><i class="fa fa-pencil-square-o"></i>&nbsp;恢复挂起</i-button>
+                        <i-button data-toggle="modal" @click="toOrderSubmit" type="primary" class="goods-button" ><i class="fa fa-pencil-square-o"></i>&nbsp;提交订单</i-button>
+
+<!--                        45636914-->
+                        <div class="modal fade" id="pendignOrderModal"  role="dialog" aria-labelledby="pendignOrderLabel" aria-hidden="true">
+                            <div class="modal-dialog">
+                                <div class="modal-content">
+                                    <div class="modal-header">
+                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                                        <h4 class="modal-title" id="pendingOrderLabel">挂起订单列表{{pendingOrderKeys}}</h4>
+                                    </div>
+                                    <div class="modal-body">
+                                        <div class="col-xs-4 col-sm-4" v-for="(value,index) in pendingOrderKeys" style="margin-bottom: 8px;">
+                                            <i-button data-toggle="modal" data-target="#resumePending" style="width: 110px;font-family: 微软雅黑" @click="resumePending(value)"   >&nbsp;{{value}}</i-button>
+                                        </div>
+                                    </div>
+                                    <div class="modal-footer">
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
 
                         <div class="modal fade" id="myModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                             <div class="modal-dialog">
@@ -243,6 +264,7 @@
                             </div>
                             <div class="row" style="border:0">
                                 <div class="col-md-3" id="orderTotal">订单总额: {{orderEntity.actualPrice}}</div>
+                                <div class="col-md-3" id="discount">订单优惠券金额: {{orderEntity.couponPrice}}</div>
                                 <div class="col-md-3" id="orderTaxes">订单税费: {{tax}}</div>
                                 <div class="col-md-3" id="invetoryReceipt">清关回执: <!--{{orderProcessRecord.eleOrderStartTime}}--></div>
                             </div>
@@ -250,9 +272,9 @@
                                 <tr style="border: white;background-color: orange">
                                     <th>商品名称</th>
                                     <th>规格</th>
-                                    <th>单价</th>
+                                    <th>市场价</th>
+                                    <th>优惠价</th>
                                     <th>实际支付价</th>
-                                    <!--<th>税费</th>-->
                                     <th>数量</th>
                                     <th>总额</th>
                                     <th>参与活动</th>
@@ -261,9 +283,10 @@
                                     <td><h3>{{item.goodsName}}</h3></td>
                                     <td>{{item.specification}}</td>
                                     <td>{{item.marketPrice}}</td>
-                                    <td>{{item.retailPrice}}</td>
+                                    <td>{{item.discountedPrice}}</td>
+                                    <td>{{item.actualPaymentAmount}}</td>
                                     <td>{{item.number}}</td>
-                                    <td >{{item.number*item.retailPrice}}</td>
+                                    <td >{{item.number*item.actualPaymentAmount}}</td>
                                     <td >{{item.activity}}</td>
                                 </tr>
                             </table>

+ 7 - 7
kmall-admin/src/main/webapp/WEB-INF/page/shop/category.html

@@ -9,13 +9,13 @@
     <div v-show="!showViewList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <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-col span="4">-->
+<!--                    <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-col span="4">
                     <i-input v-model="q.categoryName" @on-enter="query" placeholder="分类名称"/>
                 </i-col>

+ 1 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/goodstransportinfodetail.html

@@ -52,6 +52,7 @@
             <Form-item label="商品sku" prop="sku">
                 <i-input v-model="goodsTransportInfoDetail.sku" placeholder="商品sku"/>
             </Form-item>
+
             <Form-item label="供应商id" prop="supplierId">
                 <i-input v-model="goodsTransportInfoDetail.supplierId" placeholder="供应商id"/>
             </Form-item>

+ 61 - 20
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -346,6 +346,11 @@ let vm = new Vue({
         fullGiftCode:[],// 满赠商品条码
         // 优惠券
         coupons: new Map(),
+        // 挂起订单集合
+        pendingOrderMap: new Map(),
+        // 挂起订单的key 在1~3循环
+        pendingIndex:1,
+        pendingOrderKeys:[],
     },
     methods: {
         query: function () {
@@ -353,7 +358,7 @@ let vm = new Vue({
             var thisGoods = {};
             $.get("../goods/details/"+vm.prodBarcode+"/"+vm.storeId, function (r) {
                 if (r.code == 0) {
-
+                    vm.prodBarcode = '';
                     // r.goodsDetails.discountedPrice = 0;
                     // r.goodsDetails.actualPaymentAmount = r.goodsDetails.retailPrice;
 
@@ -443,6 +448,40 @@ let vm = new Vue({
             vm.customClearData();
 
         },
+        pendingOrder:function(){
+            if(this.goodsList.length == 0){
+                alert("购物车中没有商品");
+                return;
+            }
+            console.log(this.goodsList);
+            if(vm.pendingOrderMap.size > 3){
+                alter("订单挂起最多支持3单");
+                return
+            }
+            vm.pendingOrderMap.set(vm.pendingIndex,this.goodsList);
+            vm.pendingOrderKeys.push(vm.pendingIndex);
+            var newIndex = ++vm.pendingIndex;
+            vm.pendingIndex = newIndex >= 3?1: newIndex;
+            vm.clearGoodsList();
+        },
+        resumePending:function(key){
+            if(vm.pendingOrderMap.size == 0){
+                alert("当前没有挂起的订单");
+                return ;
+            }
+            vm.goodsList = vm.pendingOrderMap.get(key);
+            // 清除恢复的数据
+            vm.pendingOrderMap.delete(key);
+            removeByValue(vm.pendingOrderKeys,key);
+            $('#pendignOrderModal').modal('hide')
+        },
+        toResumePending:function(){
+            if(vm.pendingOrderMap.size == 0){
+                alert("当前没有挂起的订单");
+                return ;
+            }
+            $('#pendignOrderModal').modal('show')
+        },
         toOrderSubmit:function(){
 
             if(this.goodsList.length == 0){
@@ -472,7 +511,7 @@ let vm = new Vue({
                             })
                             // 打印取货码小票
                             var content = getPrintContent(r.resultObj);
-                            // printArea2(content);
+                            printArea2(content);
                             vm.goodsList = [];
                             vm.customname = '' ;
                             vm.customidcard = '';
@@ -532,19 +571,19 @@ let vm = new Vue({
             if(this.$refs.couponSn)
                 this.userInfo.couponSn = this.$refs.couponSn.value;
             var idcardReg = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
-            // if(!this.userInfo.customName){
-            //     alert("姓名不能为空!");
-            //     return ;
-            // }
-            // if(!idcardReg.test(this.userInfo.customIDCard)){
-            //     alert("请输入正确的身份证号");
-            //     return ;
-            // }
-            //
-            // if(!(/^1[3456789]\d{9}$/.test(this.userInfo.customPhone))){
-            //     alert("手机号码有误,请重填");
-            //     return ;
-            // }
+            if(!this.userInfo.customName){
+                alert("姓名不能为空!");
+                return ;
+            }
+            if(!idcardReg.test(this.userInfo.customIDCard)){
+                alert("请输入正确的身份证号");
+                return ;
+            }
+
+            if(!(/^1[3456789]\d{9}$/.test(this.userInfo.customPhone))){
+                alert("手机号码有误,请重填");
+                return ;
+            }
 
             if(this.userInfo.couponSn){
                 var coupon = vm.coupons.get(this.userInfo.couponSn);
@@ -800,7 +839,7 @@ function openWebSocket() {
         //无法使用wss,浏览器打开WebSocket时报错
         //ws对应http、wss对应https。
         // webSocket = new WebSocket("ws://183.62.225.124:8080/ws/server/"+storeId);
-        webSocket = new WebSocket("ws://localhost:8080//ws/server/"+storeId);
+        webSocket = new WebSocket("ws://127.0.0.1:8080//ws/server/"+storeId);
         if (webSocket.readyState === webSocket.CONNECTING) {
             console.log('1.连接正在打开......');
         }
@@ -1013,11 +1052,13 @@ function queryAssistantInfo(){
         }
     });
 
+}
 
-
-
-
-
+function removeByValue(arr, val) {
+    var index = arr.indexOf(val);
+    if (index > -1) {
+        arr.splice(index, 1);
+    }
 }
 
 

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

@@ -5,7 +5,7 @@ $(function () {
         colModel: [
             {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
             {label: '所属商户', name: 'merchName', index: 'merchName', width: 120, align: 'center'},
-            {label: '所属门店', name: 'storeName', index: 'storeName', width: 180, align: 'center'},
+            // {label: '所属门店', name: 'storeName', index: 'storeName', width: 180, align: 'center'},
             {label: '所属分类', name: 'categoryName', index: 'attribute_category_id', width: 180},
             {label: '名称', name: 'name', index: 'name', width: 500},
             // {label: '类型', name: 'inputType', index: 'input_type', width: 80},

+ 1 - 9
kmall-admin/src/main/webapp/js/shop/goodstransportinfodetail.js

@@ -15,15 +15,7 @@ $(function () {
 			{label: '供应商id', name: 'supplierId', index: 'supplier_id', width: 120},
 			{label: '原产地', name: 'originCountry', index: 'origin_country', align: 'center',width: 120},
 			{label: '数量', name: 'num', index: 'num', align: 'right',width: 120},
-			{label: '创建人编号', name: 'createrSn', index: 'creater_sn',align: 'center', width: 180},
-			{label: '创建时间', name: 'createTime', index: 'create_time', width: 180, align: 'center',formatter: function (value) {
-                    return transDate(value,'yyyy-MM-dd hh:mm:ss');
-                }},
-			{label: '修改人编号', name: 'moderSn', index: 'moder_sn', align: 'center',width: 180},
-			{label: '修改时间', name: 'modTime', index: 'mod_time', width: 180, align: 'center',formatter: function (value) {
-                    return transDate(value,'yyyy-MM-dd hh:mm:ss');
-                }
-			}],
+			],
 		viewrecords: true,
         height: 550,
         rowNum: 10,

+ 22 - 0
kmall-api/src/main/java/com/kmall/api/entity/OrderGoodsVo.java

@@ -67,6 +67,28 @@ public class OrderGoodsVo implements Serializable {
     private Integer campTopicId;
 
     private Integer distcountTopicId;
+    // 优惠金额
+    private BigDecimal discountedPrice;
+    // 实际支付价
+    private BigDecimal actualPaymentAmount;
+
+
+
+    public BigDecimal getDiscountedPrice() {
+        return discountedPrice;
+    }
+
+    public void setDiscountedPrice(BigDecimal discountedPrice) {
+        this.discountedPrice = discountedPrice;
+    }
+
+    public BigDecimal getActualPaymentAmount() {
+        return actualPaymentAmount;
+    }
+
+    public void setActualPaymentAmount(BigDecimal actualPaymentAmount) {
+        this.actualPaymentAmount = actualPaymentAmount;
+    }
 
     public Integer getCampTopicId() {
         return campTopicId;