zq-erp/src/main/java/com/matrix/system/hive/pojo/CzXkVo.java
@@ -1,6 +1,7 @@ package com.matrix.system.hive.pojo; import com.matrix.system.hive.bean.AchieveNew; import com.matrix.system.hive.bean.SysOrderFlow; import java.util.List; @@ -18,6 +19,15 @@ private Long vipId; private List<AchieveNew> achaeveList; private List<SysOrderFlow> flows; public List<SysOrderFlow> getFlows() { return flows; } public void setFlows(List<SysOrderFlow> flows) { this.flows = flows; } public Long getCardId() { return cardId; zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -1135,11 +1135,11 @@ public SysOrder updateAddCardMoney(CzXkVo czVo) { SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); SysVipInfo vip = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); czVo.setVipId(vip.getId()); // SysVipInfo vip = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); // czVo.setVipId(vip.getId()); //更新会员会员卡金额 MoneyCardUse cardUser = moneyCardUseDao.selectVipCard(vip.getId()); MoneyCardUse cardUser = moneyCardUseDao.selectVipCard(czVo.getVipId()); cardUser.setRealMoney(MoneyUtil.add(cardUser.getRealMoney(), czVo.getBjmoney())); cardUser.setGiftMoney(MoneyUtil.add(cardUser.getGiftMoney(), czVo.getGiftMoney())); moneyCardUseDao.update(cardUser); @@ -1204,7 +1204,7 @@ moneyCardUseFlow.setBalance(cardUser.getGiftMoney()+cardUser.getRealMoney()); moneyCardUseFlowDao.insert(moneyCardUseFlow); changeOrderStatu(order); // 添加员工业绩 achieveNewService.addAchaeveByOrder(order); return order; zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
@@ -161,11 +161,14 @@ <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script> <script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script> <script type="text/javascript" th:inline="javascript"> var vipId = $.query.get("vipId"); //<![CDATA[ var vue = new Vue({ el: '#app', data : { cardInfo : "", loginUser : "", rechargeMoney : "", payMethods: [{ value: '现金支付', @@ -208,6 +211,7 @@ let _this = this; this.cardInfo = /*[[${obj}]]*/ this.cardInfo.vipId = vipId; //获取用户列表 AjaxProxy.requst({ app: _this, @@ -216,10 +220,37 @@ _this.userList = data.rows; } }); //获取登录用户信息 AjaxProxy.requst({ app: _this, url: basePath + '/admin/getLoginUser', callback: function (data) { _this.loginUser = data.mapInfo.user; _this.achieveList.push({ saleId: _this.loginUser.suId, achieveMoney: 0, commission : 0, isShare: false, }); } }); }, methods : { submitRecharge() { let _this = this; if (!_this.rechargeMoney) { this.$message.warning("请输入充值金额"); return; } if (_this.rechargeMoney < 0.1) { this.$message.warning("0.1元起充"); return; } if (_this.payMoneys.length > 0) { let flows = [] var total = 0; @@ -231,28 +262,25 @@ return false; } flow.amount = item.money; if (item.type == '储值卡'){ flow.isGift = item.isGift; flow.cardId = item.id; } total += item.money; flows.push(flow) flows.push(flow); }) if (total > _this.order.arrears) { this.$message.warning("输入付款总金额大于应还金额"); if (total == _this.rechargeMoney) { this.$message.warning("付款金额应等于充值金额"); return false; } _this.order.flows = flows; _this.cardInfo.flows = flows; } else { this.$message.warning("请选择支付方式"); return false; } _this.cardInfo.bjMoney = _this.rechargeMoney; let url = basePath + "/admin/moneyCardUse/cz"; AjaxProxy.requst({ app: _this, data: _this.order, data: _this.cardInfo, url: url, callback: function (data) { if (_this.printPaper) { @@ -339,6 +367,15 @@ closeFrame() { parent.layer.close(parent.layer.getFrameIndex(window.name)); }, shareAchieve(index, row) { row2 = JSON.parse(JSON.stringify(row)); row2.isShare = true; this.achieveList.push(row2); }, //删除业绩 delAchieve(index, row) { this.achieveList.splice(index, 1); }, } }); //]]> zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
@@ -951,17 +951,30 @@ } if (item.uuid == achieve.orderItem.uuid) { let achieveNew = { uuid:item.uuid, beaultId: achieve.saleId, t1: achieve.achieveMoney, t3: achieve.t3, projPercentage: achieve.commission, }; var flag = true; for(var j = 0; j < item.achaeveList.length; j++) { if(item.achaeveList[j].uuid == achieveNew.uuid && item.achaeveList[j].beaultId == achieveNew.beaultId) { flag = false; break; } } if (flag) { item.achaeveList.push(achieveNew); } break; } } }) console.log(_this.order); //校验业绩金额 if (_this.checkAchieve()) { let url = basePath + "/admin/order/payOrder";