浏览代码

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

 Conflicts:
	kmall-admin/src/main/webapp/js/sale/sale.js
lsp 4 年之前
父节点
当前提交
96eec73d62

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

@@ -1041,7 +1041,7 @@ public class OrderController {
     }
 
     @RequestMapping("/resendOrderToCCNET/{orderSn}/{resendType}")
-    public String resendWayBill(@PathVariable("orderSn") String orderSn, @PathVariable("resendType") String resendType){
+    public R resendWayBill(@PathVariable("orderSn") String orderSn, @PathVariable("resendType") String resendType){
 
         String response = null;
         Map map = new HashMap();
@@ -1067,7 +1067,7 @@ public class OrderController {
         }
 
 
-        return response;
+        return R.ok(response);
     }
 
 
@@ -1238,6 +1238,45 @@ public class OrderController {
     }
 
 
+    @RequestMapping("/queryOrderStatus/{orderSn}")
+    public R queryOrderStatus(@PathVariable("orderSn")String orderSn){
+        try {
+
+            // 根据订单查询是什么支付方式
+            OrderEntity order = orderService.queryObjectByOrderSn(orderSn);
+            if(order == null){
+                return R.error("该订单不存在");
+            }
+            String payFlag = order.getPayFlag();
+            if("alipay".equals(payFlag)){
+                AliPayMicropayApiResult aliPayMicropayApiResult = AliPayUtil.aliTradeQuery(orderSn, "");
+                String tradeStatus = aliPayMicropayApiResult.getTradeStatus();
+                if(StringUtils.isBlank(tradeStatus)){
+                    return R.error("交易不存在");
+                }
+                return R.ok("订单号:" +orderSn + "支付方式为:支付宝支付,"+
+                        "订单支付状态:"+tradeStatus);
+            }else if("weixin".equals(payFlag)){
+                WechatRefundApiResult wechatRefundApiResult = WechatUtil.wxOrderQuery(orderSn);
+                String tradeState = wechatRefundApiResult.getTrade_state();
+                String tradeStateDesc = wechatRefundApiResult.getTrade_state_desc();
+                if(StringUtils.isBlank(tradeState)){
+                    return R.error("交易不存在");
+                }
+                return R.ok("订单号:" +orderSn + "支付方式为:微信支付,"+
+                        "订单支付状态:"+tradeState+"。 交易详情:"+tradeStateDesc);
+            }else{
+                return R.ok();
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error();
+        }
+
+    }
+
+
 
 
 
@@ -1268,6 +1307,41 @@ public class OrderController {
             for (SystemFormatDto systemFormat : systemFormatList) {
                 LinkedHashMap<String, Object> map = new LinkedHashMap<>();
 
+
+                if (Objects.nonNull(systemFormat.getTaxRate()) && Objects.nonNull(systemFormat.getTotalSalesInclTax())){
+                    // 设置综合税额
+                    systemFormat.setTaxAmount(new BigDecimal(systemFormat.getTotalSalesInclTax()).multiply(new BigDecimal(systemFormat.getTaxRate())).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
+                    // 设置商品销售额(税前)
+                    systemFormat.setSales(new BigDecimal(systemFormat.getTotalSalesInclTax()).subtract(new BigDecimal(systemFormat.getTaxAmount())).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
+                    // 设置实际销售额
+                    systemFormat.setCurrentPrice(new BigDecimal(systemFormat.getTotalSalesInclTax()).divide(new BigDecimal(systemFormat.getUnitSold()),2,BigDecimal.ROUND_HALF_UP).setScale(2,BigDecimal.ROUND_HALF_UP).toEngineeringString());
+                    if (Dict.orderStatus.item_401.equals(systemFormat.getOrderStatus())){
+                        systemFormat.setUnitSold("-"+systemFormat.getUnitSold());
+                        systemFormat.setSales("-"+systemFormat.getSales());
+                        systemFormat.setTaxAmount("-"+systemFormat.getTaxAmount());
+                        systemFormat.setTotalSalesInclTax("-"+systemFormat.getTotalSalesInclTax());
+                    }
+                }
+
+                if (Objects.nonNull(systemFormat.getCurrentPrice()) && Objects.nonNull(systemFormat.getEdlp())){
+                    // 设置扣率
+                    systemFormat.setDeductionRate(new BigDecimal(systemFormat.getCurrentPrice()).divide(new BigDecimal(systemFormat.getEdlp()),2,BigDecimal.ROUND_HALF_UP).setScale(2,BigDecimal.ROUND_HALF_UP).toEngineeringString());
+                    if (Objects.nonNull(systemFormat.getCostPrice())){
+                        // 设置GP ¥
+                        systemFormat.setGp1(new BigDecimal(systemFormat.getCurrentPrice()).subtract(new BigDecimal(systemFormat.getCostPrice())).setScale(4,BigDecimal.ROUND_HALF_UP).toEngineeringString());
+                        // 设置GP %
+                        systemFormat.setGp2(new BigDecimal(systemFormat.getGp1()).divide(new BigDecimal(systemFormat.getCurrentPrice()),8,BigDecimal.ROUND_HALF_UP).setScale(8,BigDecimal.ROUND_HALF_UP).toString());
+                    }
+                }
+                // 如果是退货
+                if (Dict.orderStatus.item_401.equals(systemFormat.getOrderStatus())){
+                    systemFormat.setSaleReturnType("整单退货");
+                    systemFormat.setTransactionType("退货");
+                }else{
+                    systemFormat.setTransactionType("销售");
+                }
+
+
                 map.put("ReceiptNo",systemFormat.getReceiptNo());
                 map.put("CashRegisterNo",systemFormat.getCashRegisterNo());
                 map.put("TimeStampDetails",systemFormat.getTimeStampDetails());

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/SystemFormatDto.java

@@ -43,6 +43,16 @@ public class SystemFormatDto implements Serializable {
     private String saleReturnType;// 退货类型
     private String remark;// 备注
 
+    private String orderStatus;//订单状态
+
+
+    public String getOrderStatus() {
+        return orderStatus;
+    }
+
+    public void setOrderStatus(String orderStatus) {
+        this.orderStatus = orderStatus;
+    }
 
     public String getReceiptNo() {
         return receiptNo;

+ 44 - 14
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java

@@ -827,7 +827,7 @@ public class GoodsServiceImpl implements GoodsService {
                 map.put("goodsBizType", goodsDto.getGoodsBizType());
                 List<GoodsEntity> list = querySame(map);
                 if (list != null && list.size() != 0) {
-                    isFail = true;
+//                    isFail = true;
                     if(goodsDto.getSku()!=null) {
                         failSameSkuList.add(goodsDto.getSku());
                     }
@@ -953,12 +953,41 @@ public class GoodsServiceImpl implements GoodsService {
 
                 if(!isFail){
                     GoodsEntity goods = goodsDao.queryObjectBySn(goodsDto.getGoodsSn());
+
+                    MngChangeEntity mngChangeEntity = new MngChangeEntity();
+                    mngChangeEntity.setThirdPartyMerchCode(goodsEntity.getThirdPartyMerchCode());
+                    mngChangeEntity.setChangeReason("更新商户商品总库存");
+                    mngChangeEntity.setCreateTime(new Date());
+                    mngChangeEntity.setModTime(new Date());
+                    mngChangeEntity.setCreaterSn(user.getUsername());
+                    mngChangeEntity.setModerSn(user.getUsername());
+                    mngChangeEntity.setIsValid(0);
+                    mngChangeEntity.setMerchSn(goodsEntity.getMerchSn());
+
                     if(goods!=null) {// 修改商品
+                        mngChangeEntity.setOriginalNum(goods.getGoodsNumber());//原库存数
+                        mngChangeEntity.setValidNum(goods.getGoodsNumber() + Integer.parseInt(goodsDto.getGoodsNumber()));//可用数
+                        mngChangeEntity.setChangeNum(Integer.parseInt(goodsDto.getGoodsNumber()));//变化数
+                        mngChangeEntity.setChangeType(Dict.changeType.item_3.getItem());
+                        mngChangeEntity.setGoodsId(Integer.parseInt(String.valueOf(goods.getId())));
+
                         goodsEntity.setId(goods.getId());
+                        goodsEntity.setGoodsNumber(goods.getGoodsNumber()+Integer.parseInt(goodsDto.getGoodsNumber()));
                         goodsDao.update(goodsEntity);
                     }else{
+                        mngChangeEntity.setOriginalNum(0);//原库存数
+                        mngChangeEntity.setValidNum(Integer.parseInt(goodsDto.getGoodsNumber()));//可用数
+                        mngChangeEntity.setChangeNum(Integer.parseInt(goodsDto.getGoodsNumber()));//变化数
+                        mngChangeEntity.setChangeType(Dict.changeType.item_2.getItem());
+
                         goodsDao.save(goodsEntity);
+                        mngChangeEntity.setGoodsId(goodsEntity.getId().intValue());
                     }
+
+
+
+
+                    mngChangeDao.save(mngChangeEntity);
 //                    // 保税商品修改各个门店商品价格
 //                    if (!Dict.orderBizType.item_11.getItem().equals(goodsDto.getGoodsBizType())) {
 //                        List<ProductStoreRelaEntity> productStoreRelaEntityList = productStoreRelaDao.queryByGoodsId(goodsDto.getId());
@@ -1028,19 +1057,19 @@ public class GoodsServiceImpl implements GoodsService {
                 goodsUtils.save(exportExceptionDataEntity);
                 throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
             }
-            if(failGoodsSnList != null && failGoodsSnList.size() > 0){
-                if(failSameSkuList.size()>0) {
-                    exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
-                            failGoodsTypeList + "】,SKU【" + failSameSkuList + "】的商品信息");
-                    goodsUtils.save(exportExceptionDataEntity);
-                    throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
-                }else{
-                    exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
-                            failGoodsTypeList + "】的商品信息");
-                    goodsUtils.save(exportExceptionDataEntity);
-                    throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
-                }
-            }
+//            if(failGoodsSnList != null && failGoodsSnList.size() > 0){
+//                if(failSameSkuList.size()>0) {
+//                    exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
+//                            failGoodsTypeList + "】,SKU【" + failSameSkuList + "】的商品信息");
+//                    goodsUtils.save(exportExceptionDataEntity);
+//                    throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
+//                }else{
+//                    exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
+//                            failGoodsTypeList + "】的商品信息");
+//                    goodsUtils.save(exportExceptionDataEntity);
+//                    throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
+//                }
+//            }
             if(failTypeGoodsSnList != null && failTypeGoodsSnList.size() > 0){
                 exportExceptionDataEntity.setExportExceptionData("货品业务类型只能是【00保税备货、02保税补货、10保税展示】!请检查商品编码【"+failTypeGoodsSnList+"】的商品信息");
                 goodsUtils.save(exportExceptionDataEntity);
@@ -1273,6 +1302,7 @@ public class GoodsServiceImpl implements GoodsService {
                         goodsEntity.setVideoUrl(goods.getVideoUrl());
                         goodsEntity.setListPicUrl(goods.getListPicUrl());
                         goodsEntity.setPrimaryPicUrl(goods.getPrimaryPicUrl());
+                        goodsEntity.setGoodsNumber(goods.getGoodsNumber()+Integer.parseInt(goodsDto.getGoodsNumber()));
                         goodsDao.update(goodsEntity);
                     }else{
                         goodsDao.save(goodsEntity);

+ 46 - 6
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -1824,6 +1824,23 @@ public class OrderServiceImpl implements OrderService {
 //                                return resultObj;
 //                            }
 //                        }
+                            StoreMngChangeEntity storeMngChangeEntity = new StoreMngChangeEntity();
+                            storeMngChangeEntity.setChangeType(Dict.changeType.item_1.getItem());
+                            storeMngChangeEntity.setChangeReason("商品销售扣减");
+                            storeMngChangeEntity.setGoodsId(Integer.parseInt(String.valueOf(productInfo.getGoodsId())));
+                            storeMngChangeEntity.setStoreId(Integer.parseInt(String.valueOf(productInfo.getStoreId())));
+                            storeMngChangeEntity.setMerchSn(productInfo.getMerchSn());
+                            storeMngChangeEntity.setStoreChangeNum(num);
+                            storeMngChangeEntity.setStoreOriginalNum(productInfo.getStockNum());
+                            storeMngChangeEntity.setStoreValidNum(productInfo.getStockNum() - num);
+                            storeMngChangeEntity.setCreateTime(new Date());
+                            storeMngChangeEntity.setModTime(new Date());
+                            storeMngChangeEntity.setCreaterSn(user.getUsername());
+                            storeMngChangeEntity.setModerSn(user.getUsername());
+                            storeMngChangeEntity.setIsValid(0);
+                            storeMngChangeDao.save(storeMngChangeEntity);
+
+
                             productInfo.setStockNum(productInfo.getStockNum() - num);
                             productInfo.setStoreId(Long.valueOf(storeId));
                             productInfo.setSellVolume(productInfo.getSellVolume() + num);
@@ -1831,10 +1848,35 @@ public class OrderServiceImpl implements OrderService {
                             productInfo.setLastSaleTime(new Date());
                             productStoreRelaDao.updateStockNum(productInfo);//修改普通商品库存
 
+
+
+
+
                             if(goodsEntity != null) {
+                                MngChangeEntity mngChangeEntity = new MngChangeEntity();
+                                mngChangeEntity.setThirdPartyMerchCode(goodsEntity.getThirdPartyMerchCode());
+                                mngChangeEntity.setChangeReason("商品销售扣减");
+                                mngChangeEntity.setCreateTime(new Date());
+                                mngChangeEntity.setModTime(new Date());
+                                mngChangeEntity.setCreaterSn(user.getUsername());
+                                mngChangeEntity.setModerSn(user.getUsername());
+                                mngChangeEntity.setIsValid(0);
+                                mngChangeEntity.setMerchSn(goodsEntity.getMerchSn());
+                                mngChangeEntity.setOriginalNum(goodsEntity.getGoodsNumber());//原库存数
+                                mngChangeEntity.setValidNum(goodsEntity.getGoodsNumber() - num);//可用数
+                                mngChangeEntity.setChangeNum(num);//变化数
+                                mngChangeEntity.setChangeType(Dict.changeType.item_1.getItem());
+                                mngChangeEntity.setGoodsId(Integer.parseInt(String.valueOf(goodsEntity.getId())));
+
+                                mngChangeDao.save(mngChangeEntity);
+
+
                                 goodsEntity.setGoodsNumber(goodsEntity.getGoodsNumber() - num);
                                 goodsEntity.setLastSaleTime(new Date());
                                 goodsDao.update(goodsEntity);
+
+
+
                             }
                         }
 
@@ -2044,10 +2086,6 @@ public class OrderServiceImpl implements OrderService {
             }
 
             OrderEntity orderEntity = queryObject(order.getId());
-//            orderEntity.setOrderStatus(Integer.parseInt(Dict.orderStatus.item_201.getItem()));
-//            orderEntity.setPayStatus(Integer.parseInt(Dict.payStatus.item_2.getItem()));
-//            orderEntity.setPayFlag(payFlag);
-//            orderEntity.setPayTime(new Date());
             orderDao.update(orderEntity);
             resultObj.put("shopName",store.getStoreName()); // 根据门店编号查询
             resultObj.put("userName",user.getUsername());
@@ -2109,6 +2147,8 @@ public class OrderServiceImpl implements OrderService {
             consumptionRecords.setCreateTime(new Date());
             memberConsumptionRecordsDao.save(consumptionRecords);
 
+
+
             // 生成取票码
             PickUpCodeEntity pickUpCodeEntity = new PickUpCodeEntity();
             pickUpCodeEntity.setOrderSn(order.getOrder_sn());
@@ -2721,9 +2761,9 @@ public class OrderServiceImpl implements OrderService {
         // 加上税额
         goodsTotalPrice = goodsTotalPrice.subtract(totalTax).setScale(2,RoundingMode.HALF_UP);
 
+        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
 
-
-        String orderSn = "ZWCW" +  CommonUtil.generateOrderNumber();
+        String orderSn = "ZWCW" + format.format(new Date()) +  CommonUtil.generateOrderNumber();
         orderInfo.setOrder_sn(orderSn);
         orderInfo.setMerchSn(merchSn);
         orderInfo.setUser_id(loginUser.getId().longValue());

+ 10 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java

@@ -904,7 +904,15 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 storeRelaEntity.setRetailPrice(new BigDecimal(storeGoodsDto.getRetailPrice()));
                 storeRelaEntity.setBottomLinePrice(storeGoodsDto.getBottomLinePrice());
                 storeRelaEntity.setStockNum(Integer.valueOf(storeGoodsDto.getStockNum()));
-                save(storeRelaEntity);
+
+                ProductStoreRelaEntity productStoreRelaEntity = productStoreRelaDao.queryByGoodsIdAndStoreId(storeRelaEntity.getStoreId(), storeRelaEntity.getGoodsId());
+                if (Objects.isNull(productStoreRelaEntity)) {
+                    save(storeRelaEntity);
+                }else{
+                    storeRelaEntity.setId(productStoreRelaEntity.getId());
+                    storeRelaEntity.setStockNum(productStoreRelaEntity.getStockNum()+Integer.valueOf(storeGoodsDto.getStockNum()));
+                    update(storeRelaEntity);
+                }
             }
         }else{
             throw new RRException("导入数据为空,或者检查数据是否为空");
@@ -970,6 +978,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                     save(storeRelaEntity);
                 }else{
                     storeRelaEntity.setId(productStoreRelaEntity.getId());
+                    storeRelaEntity.setStockNum(productStoreRelaEntity.getStockNum()+Integer.valueOf(storeGoodsDto.getStockNum()));
                     update(storeRelaEntity);
                 }
             }

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

@@ -238,7 +238,7 @@
         LEFT JOIN mall_goods_specification r ON r.goods_id = a.id
         left join mall_product_store_rela m on m.goods_id = a.id and r.goods_id = m.goods_id
         where a.prod_barcode = #{prodBarcode} and m.store_id = #{storeId}
-        and m.stock_num > 0
+        and m.stock_num > 0 order by m.stock_num desc
         limit 1
     </select>
 
@@ -739,7 +739,7 @@
         LEFT JOIN mall_product_store_rela r ON r.goods_id = a.id
         inner join mall_store s on r.store_id=s.id
         where a.prod_barcode = #{prodBarcode}  and r.store_id = #{storeId}
-        and r.stock_num > 0
+        and r.stock_num > 0 order by r.stock_num desc
     </select>
 
 

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

@@ -2050,11 +2050,13 @@
         uc.name as productSpecification,
         b.name as brand,
         gs.daily_price as edlp,
+        sr.bottom_line_price as costPrice,
         g.number as unitSold,
-        g.actual_payment_amount as sales,
-        o.order_price as totalSalesInclTax,
+        g.actual_payment_amount as totalSalesInclTax,
         gs.goods_rate as taxRate,
-        sup.child_supplier_name as supplierName
+        '专柜单品' as productCategory,
+        sup.child_supplier_name as supplierName,
+        o.order_status as orderStatus
         FROM
         mall_order o
         LEFT JOIN mall_order_goods g ON o.id = g.order_id

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

@@ -56,6 +56,7 @@
     		`tstm`
 		from mall_pick_up_code
 		WHERE 1=1
+		and pick_up_code_status != 3
 		<if test="orderSn != null and orderSn.trim() != ''">
 			AND `order_sn` LIKE concat('%',#{orderSn},'%')
 		</if>
@@ -70,7 +71,7 @@
                 order by ${sidx} ${order}
             </when>
 			<otherwise>
-                order by pick_up_code_status, pick_up_code_createtime desc
+                order by FIELD(pick_up_code_status,0,2,3,1), pick_up_code_createtime desc
 			</otherwise>
         </choose>
 		<if test="offset != null and limit != null">

+ 5 - 1
kmall-admin/src/main/webapp/WEB-INF/page/sale/sale.html

@@ -36,8 +36,12 @@
                 </div>
                 <div class="col-md-9" style="background-color: #f0f0f0;margin:0px;padding: 0px" >
                     <div v-show="showList">
+
                         <Row :gutter="16">
                             <ul class="nav navbar-top-links navbar-right" style="font-size: 1.3em;">
+                                <li>
+                                    <i-input v-model="orderSn" @on-enter="queryOrderStatus" placeholder="输入要查询的订单号" id="queryOrderStatus"  />
+                                </li>
                                 <li >
                                     <span style="margin-right: 40px">&nbsp; 门店:<b>{{storeName}}</b></span>
                                 </li>
@@ -77,7 +81,7 @@
             </div>
             <div class="col-md-6" style="padding: 0px;padding-bottom: 10%;background-color: #f0f0f0">
                 <ul class="list-unstyled; ">
-                    <li style="height: 600px;overflow:auto">
+                    <li ref="overflowLi" 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: 300px;padding: 7px">跨境商品名称</th>

+ 29 - 14
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -493,6 +493,7 @@ let vm = new Vue({
         goodsDetail:false,
         title: null,
         goods:{},
+        orderSn:"",
         sysNotice: {},
         goodsList:[],
         orderInfo:[],
@@ -563,13 +564,10 @@ let vm = new Vue({
         // 存储商品信息
         goodsMap:new Map(),
         response: "",
-
         // 支付码
         parCode : "",
-
         // 总件数
         totalCount:0
-
     },
     methods: {
 
@@ -579,13 +577,15 @@ let vm = new Vue({
             toPayOrder();
         },2000),
 
+        queryOrderStatus:function(){
+            $.get("../order/queryOrderStatus/"+vm.orderSn, function (r) {
+                alert(r.msg);
+            });
+        },
         query: function () {
-
-
-
-
             vm.storeId = sessionStorage.getItem("storeId");;
             var thisGoods = {};
+            var overflowLi = this.$refs.overflowLi;
             $.get("../goods/details/"+vm.prodBarcode+"/"+vm.storeId, function (r) {
                 if (r.code == 0) {
 
@@ -595,8 +595,10 @@ let vm = new Vue({
                     calculateGoodsPrice(r);
                     handle(r.goodsDetails,"add");
 
-
-
+                    //此时必须异步执行滚动条滑动至底部
+                    setTimeout(()=>{
+                        overflowLi.scrollTop = overflowLi.scrollHeight;
+                    },0)
                 } else {
                     alert(r.msg);
                 }
@@ -736,7 +738,14 @@ let vm = new Vue({
                 alert("订单挂起最多支持3单");
                 return;
             }
-            vm.pendingOrderMap.set(vm.pendingIndex,this.goodsList);
+            var pendingObject = {
+                'goodsList':this.goodsList,
+                'totalPrice':vm.totalPrice,
+                'totalCount':vm.totalCount,
+                'discountedPrice':vm.discountedPrice,
+                'actualPrice':vm.actualPrice
+            }
+            vm.pendingOrderMap.set(vm.pendingIndex,pendingObject);
             vm.pendingOrderKeys.push(vm.pendingIndex);
             var newIndex = ++vm.pendingIndex;
             vm.pendingIndex = newIndex > 3?1: newIndex;
@@ -758,7 +767,13 @@ let vm = new Vue({
                 alert("购物车中已有商品,不允许恢复!")
                 return ;
             }
-            vm.goodsList = vm.pendingOrderMap.get(key);
+            var pendingObject = vm.pendingOrderMap.get(key);
+            console.log(pendingObject);
+            vm.goodsList = pendingObject.goodsList;
+            vm.totalPrice = pendingObject.totalPrice;
+            vm.totalCount = pendingObject.totalCount;
+            vm.discountedPrice = pendingObject.discountedPrice;
+            vm.actualPrice = pendingObject.actualPrice;
             // 清除恢复的数据
             vm.pendingOrderMap.delete(key);
             removeByValue(vm.pendingOrderKeys,key);
@@ -961,21 +976,21 @@ let vm = new Vue({
         resendNotice:function(){
             confirm('确认重发重置吗?', function () {
                 $.get("../order/resendOrderToCCNET/"+vm.orderEntity.orderSn+"/notice", function (r) {
-                    alert(r);
+                    alert(r.msg);
                 });
             })
         },
         resendWaybill:function(){
             confirm('确认重发运单吗?', function () {
                 $.get("../order/resendOrderToCCNET/"+vm.orderEntity.orderSn+"/waybill", function (r) {
-                    alert(r);
+                    alert(r.msg);
                 });
             })
         },
         resendPayment:function(){
             confirm('确认重发支付单吗?', function () {
                 $.get("../order/resendOrderToCCNET/"+vm.orderEntity.orderSn+"/payment", function (r) {
-                    alert(r);
+                    alert(r.msg);
                 });
             })
         },

+ 2 - 0
kmall-admin/src/main/webapp/js/shop/offilineOrderList.js

@@ -91,6 +91,8 @@ $(function () {
                         return '退款中';
                     } else if (value == '4') {
                         return '退款';
+                    } else if (value == '5') {
+                        return '退款已关闭';
                     }
                     return value;
                 }