From bf23e279aacff93ae7cfc505c2ffb91cc7f56500 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 16 Mar 2022 15:15:54 +0800 Subject: [PATCH] setter --- app/controller/api/Business.php | 7 ++++++- app/controller/manager/Bill.php | 2 +- public/static/manager/js/bill.js | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controller/api/Business.php b/app/controller/api/Business.php index d52d234..f43bb1a 100644 --- a/app/controller/api/Business.php +++ b/app/controller/api/Business.php @@ -384,7 +384,12 @@ class Business extends Base $data["lat"] = $couponMain->lat; $data["lng"] = $couponMain->lng; $data["money"] = $couponMain->money; - $data["is_distribution"] = $couponMain->is_distribution; + $data["is_distribution"] = + $business['is_assign'] == BusinessModel::COMMON_ON + ? + BusinessModel::COMMON_OFF + : + BusinessModel::COMMON_ON; $data["usingRule"] = DictionaryRepository::getInstance()->getUsingRuleByCouponMainId($couponMain->id); $data["punishRule"] = '';//处罚规则 已取消 diff --git a/app/controller/manager/Bill.php b/app/controller/manager/Bill.php index ce58ac9..8bf0e67 100644 --- a/app/controller/manager/Bill.php +++ b/app/controller/manager/Bill.php @@ -29,7 +29,7 @@ class Bill extends Base $list['agency_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::agency_money, $keyword, $startTime, $endTime); $list['admin_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::admin_money, $keyword, $startTime, $endTime); $list['consumer_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::consumer_money, $keyword, $startTime, $endTime); - $list['distribution_money_money'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::distribution_money_money, $keyword, $startTime, $endTime); + $list['distribution_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::distribution_money_money, $keyword, $startTime, $endTime); return $this->json(0, 'success', $list); } diff --git a/public/static/manager/js/bill.js b/public/static/manager/js/bill.js index 942deb1..7a41fe7 100644 --- a/public/static/manager/js/bill.js +++ b/public/static/manager/js/bill.js @@ -38,7 +38,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect',"laydate"] $("#new_agency_money_sum").text(res.data.agency_money_sum?res.data.agency_money_sum:0) $("#new_admin_money_sum").text(res.data.admin_money_sum?res.data.admin_money_sum:0) $("#new_consumer_money_sum").text(res.data.consumer_money_sum?res.data.consumer_money_sum:0) - $("#new_distribution_money_sum").text(res.data.new_distribution_money_sum?res.data.new_distribution_money_sum:0) + $("#new_distribution_money_sum").text(res.data.distribution_money_sum?res.data.distribution_money_sum:0) return { "code": res.code, //解析接口状态 "msg": res.msg, //解析提示文本