From 04f9d0857969531f13ccd296717a718f2cd702cf Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 12 Jan 2021 16:34:24 +0800 Subject: [PATCH] modify --- zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html | 2 +- zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html | 13 ++++++++++--- zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html | 2 +- zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java | 14 ++++++++++++-- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java index 42ea6ff..51536f3 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java @@ -159,6 +159,12 @@ // 计算订单折扣金额,收款情况下 计算订单总额 double zkTotal = 0.0; + // 判断是否为退款 + String orderStatus = Dictionary.ORDER_STATU_DFK; + if (Dictionary.ORDER_STATU_TK.equals(sysOrder.getStatu())) { + orderStatus = Dictionary.ORDER_STATU_TK; + } + // 页面的pageOrder 参数只包含支付金额信息,不带有购买商品 for (SysOrderItem item : sysOrder.getItems()) { @@ -171,12 +177,12 @@ // 订单欠款减去支付金额 设置实际欠款 Double itemZkTotal = MoneyUtil.mul(item.getZkPrice(), Double.valueOf(item.getCount())); zkTotal=MoneyUtil.add(zkTotal, itemZkTotal); - item.setStatus(Dictionary.ORDER_STATU_DFK); + item.setStatus(orderStatus); } SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); sysOrder.setZkTotal(zkTotal); - sysOrder.setStatu(Dictionary.ORDER_STATU_DFK); + sysOrder.setStatu(orderStatus); sysOrder.setStaffId(user.getSuId()); sysOrder.setCompanyId(user.getCompanyId()); @@ -496,6 +502,10 @@ i++; } + if (Dictionary.ORDER_STATU_TK.equals(sourceOrder.getStatu())) { + orderStatus = Dictionary.ORDER_STATU_TK; + } + // 更新收款状态 sourceOrder.setStatu(orderStatus); sourceOrder.setCardPay(cardPayTotal); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html index 29a923c..432cd98 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html @@ -99,7 +99,7 @@ <el-col :span="15"> <el-row style="line-height: 50px;" v-for="(item, index) in payMoneys"> <el-col :span="6" style="text-align: right; padding-right: 10px; font-size: 12px;">{{item.value}}</el-col> - <el-col :span="8"><el-input v-model.number="item.money"></el-input></el-col> + <el-col :span="8"><el-input v-model="item.money"></el-input></el-col> <el-col :span="6" style="margin-left: 10px;" v-if="item.type == '储值卡'">{{item.isGift == 1 ? '赠送余额' : '余额' }}:<span class="arrears">¥ {{item.balance}}</span></el-col> </el-row> </el-col> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html index a87b6c8..9f6009a 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html @@ -515,7 +515,7 @@ <el-col :span="15"> <el-row style="line-height: 50px;" v-for="(item, index) in payMoneys"> <el-col :span="6" style="text-align: right; padding-right: 10px; font-size: 12px;">{{item.value}}</el-col> - <el-col :span="8"><el-input v-model.number="item.money"></el-input></el-col> + <el-col :span="8"><el-input v-model="item.money"></el-input></el-col> <el-col :span="6" style="margin-left: 10px;" v-if="item.type == '储值卡'">{{item.isGift == 1 ? '赠送余额' : '余额' }}:<span class="arrears">¥ {{item.balance}}</span></el-col> </el-row> </el-col> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html index dec4aeb..bd5cf20 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html @@ -219,7 +219,7 @@ </el-table-column> <el-table-column label="退款数量"> <template slot-scope="scope"> - <el-input v-model="scope.row.refundCount"></el-input> + <el-input v-model.number="scope.row.refundCount"></el-input> </template> </el-table-column> </el-table> @@ -438,7 +438,7 @@ <el-col :span="15"> <el-row style="line-height: 50px;" v-for="(item, index) in payMoneys"> <el-col :span="6" style="text-align: right; padding-right: 10px; font-size: 12px;">{{item.value}}</el-col> - <el-col :span="8"><el-input v-model.number="item.money"></el-input></el-col> + <el-col :span="8"><el-input v-model="item.money"></el-input></el-col> <el-col :span="6" style="margin-left: 10px;" v-if="item.type == '储值卡'">{{item.isGift == 1 ? '赠送余额' : '余额' }}:<span class="arrears">¥ {{item.balance}}</span></el-col> </el-row> </el-col> @@ -579,14 +579,21 @@ if (item.refundPrice && item.refundCount) { _this.refundMoney += (item.refundPrice * item.refundCount); } else { - if (item.refundCount > item.count) { + if (!item.refundPrice > 0 && !item.refundCount > 0) { + _this.$message.error("退款金额或退款数量须大于0"); + return; + } + if (item.refundCount > item.count) { + _this.$message.error("输入正确的退款数量"); + return; } _this.$message.error("退款单价或退款数量不能为空"); return; } } + _this.dialogSettleVisible = true; }, calOrderTotalFormatter(row, column) { return row.count * row.price; -- Gitblit v1.9.1