瀏覽代碼

Merge branch 'master' of lhm/kmall-haikong into master

lhm 3 年之前
父節點
當前提交
75ef9e9044

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

@@ -381,4 +381,12 @@ public class OrderGoodsEntity implements Serializable {
 	public void setTaxPrice(BigDecimal taxPrice) {
 		this.taxPrice = taxPrice;
 	}
+
+	public Integer getDeductionScore() {
+		return deductionScore;
+	}
+
+	public void setDeductionScore(Integer deductionScore) {
+		this.deductionScore = deductionScore;
+	}
 }

+ 10 - 7
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -2653,9 +2653,10 @@ public class OrderServiceImpl implements OrderService {
                             orderGiftScoreRulesVo.setGenerateType(Constants.MemberScoreRulesEnum.TWO.getCode());
                             if (ratio.compareTo(BigDecimal.ZERO) > 0) {
                                 // 算出所积的分
-                                int giftScore = money.multiply(ratio).setScale(0, BigDecimal.ROUND_FLOOR).add(new BigDecimal(memberScore.get())).intValue();
+                                BigDecimal bigDecimal = money.multiply(ratio).setScale(0, BigDecimal.ROUND_FLOOR);
+                                int giftScore = bigDecimal.add(new BigDecimal(memberScore.get())).intValue();
                                 memberScore.set(giftScore);
-                                orderGiftScoreRulesVo.setGiftScore(giftScore);
+                                orderGiftScoreRulesVo.setGiftScore(bigDecimal.intValue());
                                 orderGiftScoreRulesVo.setGenerateRatio(ratio);
                             } else {
                                 // 积分比例设置为0,该商品不记积分。
@@ -2683,9 +2684,10 @@ public class OrderServiceImpl implements OrderService {
                                     BigDecimal money = goodsMap.get(sku);
                                     if (ratio.compareTo(BigDecimal.ZERO) > 0) {
                                         // 算出所积的分
-                                        int giftScore = money.multiply(ratio).setScale(0, BigDecimal.ROUND_FLOOR).add(new BigDecimal(memberScore.get())).intValue();
+                                        BigDecimal bigDecimal = money.multiply(ratio).setScale(0, BigDecimal.ROUND_FLOOR);
+                                        int giftScore = bigDecimal.add(new BigDecimal(memberScore.get())).intValue();
                                         memberScore.set(giftScore);
-                                        orderGiftScoreRulesVo.setGiftScore(giftScore);
+                                        orderGiftScoreRulesVo.setGiftScore(bigDecimal.intValue());
                                         orderGiftScoreRulesVo.setGenerateRatio(ratio);
                                     } else {
                                         // 积分比例设置为0,该商品不记积分。
@@ -2712,9 +2714,10 @@ public class OrderServiceImpl implements OrderService {
                                 BigDecimal money = goodsMap.get(sku);
                                 if (ratio.compareTo(BigDecimal.ZERO) != 0) {
                                     // 算出所积的分
-                                    int giftScore = money.multiply(ratio).setScale(0, BigDecimal.ROUND_FLOOR).add(new BigDecimal(memberScore.get())).intValue();
+                                    BigDecimal bigDecimal = money.multiply(ratio).setScale(0, BigDecimal.ROUND_FLOOR);
+                                    int giftScore = bigDecimal.add(new BigDecimal(memberScore.get())).intValue();
                                     memberScore.set(giftScore);
-                                    orderGiftScoreRulesVo.setGiftScore(giftScore);
+                                    orderGiftScoreRulesVo.setGiftScore(bigDecimal.intValue());
                                     orderGiftScoreRulesVo.setGenerateRatio(ratio);
                                 } else {
                                     // 积分比例设置为0,该商品不记积分。
@@ -4713,7 +4716,7 @@ public class OrderServiceImpl implements OrderService {
                 }
                 Integer score = memberInfoDTO.getScore();
                 // 是否适用积分抵扣
-                if (useScore) {
+                if (!useScore) {
                     return calculateOrderDiscountPriceResponseVO;
                 }
                 if (Objects.nonNull(score) && score > 0) {

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

@@ -314,11 +314,11 @@
                                     <div class="modal-body">
                                         <div>
                                             <label for="customPhone" class="control-label">会员码:</label>
-                                            <input autocomplete="off" type="text" v-model="couponBarCode" ref="couponBarCode" size="60%" id="couponBarCode" @on-enter="calculateOrderPriceSubmit" />
+                                            <input autocomplete="off" type="text" v-model="memberCode" ref="couponBarCode" size="60%" id="couponBarCode" @on-enter="calculateOrderPriceSubmit" />
                                         </div>
                                         <div style="margin-top: 30px">
-                                            <label class="control-label" >是否用积分进行抵扣:</label>
-                                            <i-switch v-model="switch1" />
+                                            <label class="control-label" >是否使用积分进行抵扣:</label>
+                                            <i-switch v-model="switch1" on />
                                         </div>
                                     </div>
                                     <div class="modal-footer">
@@ -337,19 +337,17 @@
                                         <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                         <h4 class="modal-title" id="payModalLabel">付款码</h4>
                                     </div>
-
                                     <div class="modal-body">
-                                        <div style="margin-bottom: 50px;">
-                                            <ul style="display: inline-block;">
-                                                <li><h5 style="border: white; padding: 5px; color: red; font-size: 35px;">实付款:{{actualPrice}}</h5></li>
-                                                <li><h5 style="border: white; padding: 8px;">总件数:{{totalCount}}</h5></li>
-                                                <li><h5 style="border: white; padding: 8px;">总价:{{totalPrice}}</h5></li>
-                                                <li><h5 style="border: white; padding: 8px;">抵扣积分:{{deductionScore}}</h5></li>
+                                        <div style="margin-bottom: 50px">
+                                            <ul style="display: inline-block">
+                                                <li><h3 style="border: white;padding: 8px;">总件数:{{totalCount}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px;">总价:{{totalPrice}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px;color: red;">实际支付价:{{actualPrice}}</h3></li>
                                             </ul>
-                                            <ul style="display: inline-block;">
-                                                <li><h5 style="border: white; padding: 8px;"></h5></li>
-                                                <li><h5 style="border: white; padding: 8px;">会员等级:{{levelName}}</h5></li>
-                                                <li><h5 style="border: white; padding: 8px;">会员当前积分:{{memberCurrentAvailableScore}}</h5></li>
+                                            <ul style="display: inline-block">
+                                                <li><h3 style="border: white;padding: 8px">会员等级:{{levelName}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px">会员当前积分:{{memberCurrentAvailableScore}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px">抵扣积分:{{deductionScore}}</h3></li>
                                             </ul>
                                         </div>
                                         <form>

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

@@ -49,7 +49,7 @@
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
             <div>
-                <i-button type="info" @click="checkOrderRestore"></i>&nbsp;查验单恢复库存</i-button>
+<!--                <i-button type="info" @click="checkOrderRestore"></i>&nbsp;查验单恢复库存</i-button>-->
                 #if($shiro.hasPermission("order:exportOffilineOrder"))
                 <i-button type="primary" @click="exportOffilineOrder"><i class="fa fa-cloud-download"></i>&nbsp;导出</i-button>
                 #end
@@ -146,15 +146,15 @@
                             </Radio>
                         </Radio-group>
                     </Form-item>
-                    <!--<Form-item label="收货人" prop="consignee">-->
-                        <!--<i-input v-model="order.consignee" readonly/>-->
-                    <!--</Form-item>-->
+                    <Form-item label="收货人" prop="payName">
+                        <i-input v-model="order.payName" readonly/>
+                    </Form-item>
                     <!--<Form-item label="收货地址" prop="address">-->
                         <!--<i-input v-model="order.address" readonly/>-->
                     <!--</Form-item>-->
-                    <!--<Form-item label="联系电话" prop="mobile">-->
-                        <!--<i-input v-model="order.mobile" readonly/>-->
-                    <!--</Form-item>-->
+                    <Form-item label="手机号" prop="mobile">
+                        <i-input v-model="order.mobile" readonly/>
+                    </Form-item>
                     <!--<Form-item label="客户留言" prop="postscript">-->
                         <!--<i-input v-model="order.postscript" readonly/>-->
                     <!--</Form-item>-->

+ 9 - 4
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -699,6 +699,10 @@ let vm = new Vue({
         query: function () {
             vm.storeId = sessionStorage.getItem("storeId");
             var thisGoods = {};
+            // 挂起后的新订单默认开启
+            if (vm.pendingOrderMap != null || vm.pendingOrderMap.size > 0) {
+                vm.switch1 = true;
+            }
             var overflowLi = this.$refs.overflowLi;
             // console.log("vm.$refs.saomiao.value===>" + vm.$refs.saomiao.value);
             let scanSellVolume = calScanSellVolume(vm.$refs.saomiao.value);
@@ -945,7 +949,7 @@ let vm = new Vue({
             vm.levelName = '';
             vm.deductionScore = '';
             vm.memberCurrentAvailableScore = '';
-            vm.$refs.couponBarCode.value = '';
+            vm.memberCode = '';
             vm.switch1 = true;
             vm.clickFlag = true;
             vm.calActivityFlag = false;
@@ -959,7 +963,7 @@ let vm = new Vue({
             vm.levelName = '';
             vm.deductionScore = '';
             vm.memberCurrentAvailableScore = '';
-            vm.$refs.couponBarCode.value = '';
+            vm.memberCode = '';
             vm.clickFlag = true;
             vm.switch1 = true;
             vm.calActivityFlag = false;
@@ -985,7 +989,7 @@ let vm = new Vue({
             vm.pendingOrderMap.delete(key);
 
             vm.clickFlag = true;
-            vm.$refs.couponBarCode.value = '';
+            vm.memberCode = '';
             vm.switch1 = true;
             vm.calActivityFlag = false;
             removeByValue(vm.pendingOrderKeys,key);
@@ -2137,7 +2141,8 @@ function toPayOrder(payCode){
                     vm.levelName = '';
                     vm.deductionScore = '';
                     vm.memberCurrentAvailableScore = '';
-                    vm.$refs.couponBarCode.value = "";
+                    vm.memberCode = "";
+                    vm.switch1 = true;
                     vm.clickFlag = false;
                     vm.customClearData();
 

+ 13 - 0
sql/init/other_table.sql

@@ -4054,4 +4054,17 @@ CREATE TABLE `wx_cb_pay_doc`  (
   PRIMARY KEY (`wx_pay_sn`) USING BTREE
 ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '微信跨境支付单证' ROW_FORMAT = Compact;
 
+CREATE TABLE `mall_stock_change_record` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `store_id` int(11) DEFAULT NULL COMMENT '门店id',
+  `warehouse_sn` int(11) DEFAULT NULL COMMENT '仓库编号',
+  `sku` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'sku',
+  `type` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '记录类型,0:出库 1:入库',
+  `number` int(8) DEFAULT NULL COMMENT '出库或入库数量',
+  `remark` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
+  `create_time` datetime DEFAULT NULL,
+  `modify_time` datetime DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='海控出入库单记录';
+
 SET FOREIGN_KEY_CHECKS = 1;

+ 18 - 0
sql/init/sys_table.sql

@@ -679,6 +679,24 @@ INSERT INTO `sys_menu` VALUES (909, 394, '修改', NULL, 'address:update', 2, NU
 INSERT INTO `sys_menu` VALUES (915, 942, '接口日志', 'shop/interfacesendlog.html', 'fa fa-eye', 1, 'fa fa-file-text-o', 0, 0);
 INSERT INTO `sys_menu` VALUES (916, 915, '查询', NULL, 'tinterfacesendlog:info,interfacesendlog:list', 2, NULL, 0, 0);
 INSERT INTO `sys_menu` VALUES (942, 0, '日志记录', NULL, NULL, 0, 'fa fa-file-text-o', 10, 0);
+
+INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `status`)
+    VALUES ('357', '出入库单记录', 'shop/stockchangerecord.html', NULL, '1', 'fa fa-file-code-o', '6', '0');
+-- 按钮父菜单ID
+set @parentId = @@identity;
+
+-- 菜单对应按钮SQL
+INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `status`)
+    SELECT @parentId, '查看', null, 'stockchangerecord:list,stockchangerecord:info', '2', null, '6', '0';
+INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `status`)
+    SELECT @parentId, '新增', null, 'stockchangerecord:save', '2', null, '6', '0';
+INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `status`)
+    SELECT @parentId, '修改', null, 'stockchangerecord:update', '2', null, '6', '0';
+INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `status`)
+    SELECT @parentId, '删除', null, 'stockchangerecord:delete', '2', null, '6', '0';
+
+
+
 -- 菜单SQL
 INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `status`)
     VALUES ('942', '会员同步消费订单记录', 'shop/haikongmemberordersyncresend.html', NULL, '1', 'fa fa-file-code-o', '6', '0');