From 255e66d5c55f3cbf01e6315ecf2f3e6ff081b7c2 Mon Sep 17 00:00:00 2001 From: JerryYan <792602257@qq.com> Date: Tue, 2 Jun 2020 22:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=83=A8=E5=88=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/behavior/ListenLoginStatus.php | 8 ++++---- hyhproject/admin/controller/Index.php | 8 ++------ hyhproject/admin/model/CashDraws.php | 12 ++++++++++++ hyhproject/admin/model/Orders.php | 3 +++ .../admin/view/cashdraws/view_report.html | 8 +++++++- hyhproject/admin/view/orders/orders.js | 19 +++++++++++-------- hyhproject/admin/view/orders/view.html | 3 --- hyhproject/common/model/UserVouchers.php | 6 +++--- 8 files changed, 42 insertions(+), 25 deletions(-) diff --git a/hyhproject/admin/behavior/ListenLoginStatus.php b/hyhproject/admin/behavior/ListenLoginStatus.php index d7a0026..9f8d5ca 100755 --- a/hyhproject/admin/behavior/ListenLoginStatus.php +++ b/hyhproject/admin/behavior/ListenLoginStatus.php @@ -24,11 +24,11 @@ class ListenLoginStatus if($request->isAjax()){ echo json_encode(['status'=>-999,'msg'=>'对不起,您还没有登录,请先登录']); }else{ - if('quanlianggongmall' == input('key')){ +// if('quanlianggongmall' == input('key')){ header("Location:".url('admin/index/login?key=quanlianggongmall')); - }else{ - echo 'hello'; - } +// }else{ +// echo 'hello'; +// } } exit(); diff --git a/hyhproject/admin/controller/Index.php b/hyhproject/admin/controller/Index.php index 6e4da58..b950b4d 100755 --- a/hyhproject/admin/controller/Index.php +++ b/hyhproject/admin/controller/Index.php @@ -12,12 +12,8 @@ class Index extends Base{ * 跳去登录页 */ public function login(){ - if('quanlianggongmall' == input('key')){ - model('CronJobs')->autoByAdmin(); - return $this->fetch("/login"); - }else{ - echo 'hello'; - } + model('CronJobs')->autoByAdmin(); + return $this->fetch("/login"); } public function index(){ diff --git a/hyhproject/admin/model/CashDraws.php b/hyhproject/admin/model/CashDraws.php index 82747f8..c2f4ce8 100755 --- a/hyhproject/admin/model/CashDraws.php +++ b/hyhproject/admin/model/CashDraws.php @@ -186,6 +186,18 @@ class CashDraws extends Base{ $orders['collectionGatheringSum'] += abs($v['payable']); } } +// $data = Db::name('cash_draws')->whereTime('createTime',[$date,date('Y-m-d',strtotime('+1 day',strtotime($date)))]) +// ->where("cashSatus", '=', 1)->select(); +// foreach ($data as $item){ +// $m->setTable('users'); +// $name = $m->getField(['userId'=>$item['targetId']],'loginName'); +// if(!isset($orders['collection'][$item['targetId']])) $orders['collection'][$item['targetId']]=[]; +// $orders['collection'][$item['targetId']]['shopLoginName'] = $name; +// if(!isset($orders['collection'][$item['targetId']]['gathering'])) $orders['collection'][$shopUserId]['gathering']=0; +// if(!isset($orders['collection'][$item['targetId']]['pay'])) $orders['collection'][$shopUserId]['pay']=0; +// $orders['collection'][$item['targetId']]['pay']+=$item['money'];//代付款 +// $orders['collectionPaySum'] += $item['money']; +// } $allMoney = $orders['collectionGatheringSum']-($orders['coupousEarningsSum']+$orders['hasVouchersEearningsSum']+$orders['taxFeeSum']+$orders['collectionPaySum']); $orders['todayMoney'] = $orders['yesterdayMoney'] + $allMoney; if(1 == $isSave && $allMoney != 0){ diff --git a/hyhproject/admin/model/Orders.php b/hyhproject/admin/model/Orders.php index 4cea854..891ceb3 100755 --- a/hyhproject/admin/model/Orders.php +++ b/hyhproject/admin/model/Orders.php @@ -92,6 +92,9 @@ class Orders extends Base $page['Rows'][$key]['payable'] = '0.00'; } $page['Rows'][$key]['loginName'] = $v['loginName']; + $page['Rows'][$key]['accidentGet'] = number_format($page['Rows'][$key]['productNum'] + $page['Rows'][$key]['couponsNum'],2,'.',''); + $page['Rows'][$key]['accidentTaxGet'] = number_format($page['Rows'][$key]['productTaxFee'] + $page['Rows'][$key]['couponsTaxFee'],2,'.',''); + $page['Rows'][$key]['accidentHandlingGet'] = number_format($page['Rows'][$key]['productHandlingFee'] + $page['Rows'][$key]['couponsHandlingFee'],2,'.',''); $page['Rows'][$key]['userName'] = $v['userName']; $shopUserInfo = getUserInfo(['userId' => $v['shopUserId']], 'loginName'); $page['Rows'][$key]['shopLoginName'] = $shopUserInfo['loginName']; diff --git a/hyhproject/admin/view/cashdraws/view_report.html b/hyhproject/admin/view/cashdraws/view_report.html index 929d989..e766495 100755 --- a/hyhproject/admin/view/cashdraws/view_report.html +++ b/hyhproject/admin/view/cashdraws/view_report.html @@ -98,7 +98,13 @@ - + + diff --git a/hyhproject/admin/view/orders/orders.js b/hyhproject/admin/view/orders/orders.js index 624f72e..afd3997 100755 --- a/hyhproject/admin/view/orders/orders.js +++ b/hyhproject/admin/view/orders/orders.js @@ -158,25 +158,28 @@ function initGrid(){ }}, {title:'交易额', name:'realTotalMoney', width: 60,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, {title:'购户', name:'loginName', width: 50,sortable:true}, - {title:'收货人', name:'userName', width: 50,sortable:true}, {title:'购户付现', name:'moneyNum', width: 60,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'收货人', name:'userName', width: 50,sortable:true}, {title:'旺旺券', name:'wangNum', width: 60,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, - {title:'产品券', name:'productNum', width: 60,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, - {title:'产品券税', name:'productTaxFee', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, - {title:'产品券手续费', name:'productHandlingFee', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + {title:'偶然所得', name:'accidentGet', width: 70,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + {title:'偶然所得税', name:'accidentTaxGet', width: 70,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + {title:'所得手续费', name:'accidentHandlingGet', width: 70,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'产品券', name:'productNum', width: 60,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'产品券税', name:'productTaxFee', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'产品券手续费', name:'productHandlingFee', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, // {title:'产品券手续费+税', name:'productHandlingFee', width: 30,sortable:true, renderer:function(val,item,rowIndex){ // return item['productTaxFee']+val; // }}, - {title:'优惠券', name:'couponsNum', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, - {title:'优惠券税', name:'couponsTaxFee', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, - {title:'优惠券手续费', name:'couponsHandlingFee', width: 40,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'优惠券', name:'couponsNum', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'优惠券税', name:'couponsTaxFee', width: 50,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'优惠券手续费', name:'couponsHandlingFee', width: 40,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, // {title:'优惠券手续费+税', name:'couponsHandlingFee', width: 30,sortable:true, renderer:function(val,item,rowIndex){ // return item['couponsTaxFee']+val;; // }}, {title:'商户', name:'shopLoginName', width: 50,sortable:true}, - {title:'店铺', name:'shopName', width: 60,sortable:true}, {title:'优惠款', name:'coupons', width: 40,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, {title:'商户付现', name:'payable', width: 40,sortable:true, renderer:function(val,item,rowIndex){return '¥'+val;}}, + // {title:'店铺', name:'shopName', width: 60,sortable:true}, // {title:'支付方式', name:'payType' , width: 30,sortable:true}, // // mark by cheng 添加支付通道显示 // {title:'支付通道', name:'payFrom' , width: 30,sortable:true, renderer:function(val,item,rowIndex){ diff --git a/hyhproject/admin/view/orders/view.html b/hyhproject/admin/view/orders/view.html index 4e55018..0379cd9 100755 --- a/hyhproject/admin/view/orders/view.html +++ b/hyhproject/admin/view/orders/view.html @@ -486,8 +486,6 @@
应付总金额:¥{$object['totalMoney']}
-
积分抵扣金额:¥-{$object['scoreMoney']}
- {:hook('adminDocumentOrderSummaryView',['order'=>$object])}
实付总金额:¥{$object['realTotalMoney']}
@@ -495,7 +493,6 @@
使用优惠券:¥{$object['couponsNum']}
使用旺旺券:¥{$object['wangNum']}
使用现金:¥{$object['moneyNum']}
-
可获得积分:{$object["orderScore"]}
diff --git a/hyhproject/common/model/UserVouchers.php b/hyhproject/common/model/UserVouchers.php index 23fe99c..37d20e8 100755 --- a/hyhproject/common/model/UserVouchers.php +++ b/hyhproject/common/model/UserVouchers.php @@ -14,11 +14,11 @@ class UserVouchers extends Base{ //获取代快付值 $toPayFast = $sysData['toPayFast']; //今日代快付释放值 - $payFast = round($toPayFast * (dataConf('fastPayDayScale')*0.01),2); + $payFast = round($toPayFast * (dataConf('fastPayDayScale')*0.01),5); //获取代慢付值 $toPaySlow = $sysData['toPaySlow']; //今日付慢付释放值 - $paySlow = round($toPaySlow * (dataConf('slowPayDayScale')*0.01),2); + $paySlow = round($toPaySlow * (dataConf('slowPayDayScale')*0.01),5); //应释放总额 $toPaySum = $payFast + $paySlow; Db::startTrans(); @@ -27,7 +27,7 @@ class UserVouchers extends Base{ $m->setTable('user_vouchers_summary'); if(1 == date('j')){ //每月损耗 - $monthScale = round((100-dataConf('couponsNextMonthInitSacle'))*0.01,2); + $monthScale = round((100-dataConf('couponsNextMonthInitSacle'))*0.01,5); $giveList = $m->getList([],'id, userId, expectedProductNum, expectedCouponsNum'); foreach ($giveList as &$g) { if($g['expectedProductNum'] > 0){