From cd64d6e1bdefedf1366787d7cd21f81e134af65d Mon Sep 17 00:00:00 2001
From: lisong <377344020@qq.com>
Date: Mon, 10 Jan 2022 13:06:53 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/ConsignmentOrderController.php | 8 +-
.../admin/controller/FinanceController.php | 46 ++++++--
.../admin/controller/GoodsController.php | 9 +-
.../admin/controller/ShopConfigController.php | 5 +
.../admin/controller/WithdrawController.php | 6 +-
.../admin/view/consignment_order/examine.html | 2 +-
.../admin/view/consignment_order/shelves.html | 2 +-
application/admin/view/finance/lists.html | 99 ++++--------------
application/admin/view/goods/add.html | 17 +++
application/admin/view/order/detail.html | 1 -
application/admin/view/public/footer.html | 2 +-
.../admin/view/shop_config/website.html | 64 ++++++++++-
application/admin/view/user/index.html | 5 +-
application/admin/view/withdraw/lists.html | 28 -----
application/api/common.php | 31 ++++++
application/api/controller/AuthController.php | 21 ++--
application/api/controller/CartController.php | 30 ++++--
application/api/controller/Controller.php | 2 +-
.../api/controller/GoodsController.php | 52 ++++++---
.../api/controller/IndexController.php | 2 +-
.../api/controller/OrderController.php | 2 +-
.../api/controller/PaymentController.php | 23 +---
application/api/controller/UserController.php | 86 ++++++++-------
application/common/model/Order.php | 5 +
application/common/model/UserAddress.php | 8 +-
application/common/model/WithdrawApply.php | 2 +-
config/cache.php | 1 +
route/route.php | 24 ++---
.../temp/0a321b07c8fc33ed33a6e11c516520e3.php | 4 +-
.../temp/23a9125deeac5660389513769a7f67ff.php | 4 +-
.../temp/43b0bbc24aac33245d5c697d3b42eb57.php | 2 +-
.../temp/6c85cabfeb55988c16eebdf9d16fb180.php | 2 +-
.../temp/98b3c4ff4fb93242dabc9398a0775641.php | 4 +-
.../temp/ce8ecc9e12adf5d8127ce76862c569c1.php | 4 +-
.../temp/d41b160c460be4dd3ee8660ea187db57.php | 2 +-
.../temp/e36eb1afe42271d845632f25a7797fdb.php | 66 +++++++++++-
.../temp/fe63730b8931f4627b3583cb42f362b9.php | 2 +-
归档.zip | Bin
38 files changed, 420 insertions(+), 253 deletions(-)
mode change 100644 => 100755 归档.zip
diff --git a/application/admin/controller/ConsignmentOrderController.php b/application/admin/controller/ConsignmentOrderController.php
index bf1e114..e1d85d5 100755
--- a/application/admin/controller/ConsignmentOrderController.php
+++ b/application/admin/controller/ConsignmentOrderController.php
@@ -140,12 +140,9 @@ class ConsignmentOrderController extends Controller
$order_goods->save();
$goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>0))->count();
$quanbu=0;
+ $order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]);
if($goods_count==0){
- $order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]);
$order->order_status = 3;
- $order->total_amount =$order['total_amount']+$param['evaluation_price'];
- $order->update_time = time();
- $order->save();
//记录日志
ConsignmentOrderLog::record(
$order['id'],
@@ -160,6 +157,9 @@ class ConsignmentOrderController extends Controller
Notice::noticeByScene($order['user_id'],$data_info);
$quanbu=1;
}
+ $order->total_amount =$order['total_amount']+$param['evaluation_price'];
+ $order->update_time = time();
+ $order->save();
// 提交事务
ConsignmentOrderGoods::commit();
}catch(\Exception $e){
diff --git a/application/admin/controller/FinanceController.php b/application/admin/controller/FinanceController.php
index 1e6aae9..66bc28f 100755
--- a/application/admin/controller/FinanceController.php
+++ b/application/admin/controller/FinanceController.php
@@ -5,18 +5,52 @@
*/
namespace app\admin\controller;
-
-use app\admin\model\AdminLog;
-use app\admin\model\AdminMenu;
-use app\admin\model\AdminRole;
-use app\admin\model\AdminUser;
-use tools\SystemInfo;
+use think\db;
use think\Request;
class FinanceController extends Controller
{
public function lists(Request $request)
{
+ //本月订单金额
+ $month_order_amount = Db::name('order')
+ ->where('order_status' , 'in', [1,2,3])
+ ->whereTime('create_time', 'month')
+ ->sum('order_amount');
+
+ //订单总金额
+ $order = Db::name('order')
+ ->field('sum(order_amount) as amount, count(id) as num')
+ ->where('order_status' , 'in', [1,2,3])
+ ->find();
+
+
+ //会员相关
+ $user = Db::name('user')
+ ->field('sum(user_money) as money')
+ ->find();
+
+ //已提现佣金
+ $have_withdraw_earnings = Db::name('withdraw_apply')
+ ->where(['status' =>2])
+ ->sum('money');
+
+ //提现中
+ $wait_withdraw_earnings = Db::name('withdraw_apply')
+ ->where(['status' =>1])
+ ->sum('money');
+
+ $this->assign([
+ 'month_order_amount' => round($month_order_amount, 2),
+
+ 'total_amount' => round($order['amount'], 2),
+ 'order_num' => $order['num'] ?? 0,
+
+
+ 'total_user_money' => round($user['money'], 2),
+ 'have_withdraw_earnings' => round($have_withdraw_earnings, 2),
+ 'wait_earnings' => round($wait_withdraw_earnings, 2),
+ ]);
return $this->fetch();
}
diff --git a/application/admin/controller/GoodsController.php b/application/admin/controller/GoodsController.php
index e4e46b2..c253dba 100755
--- a/application/admin/controller/GoodsController.php
+++ b/application/admin/controller/GoodsController.php
@@ -13,6 +13,7 @@ use app\common\model\GoodsBrand;
use app\common\model\GoodsAttrCategory;
use app\common\model\ShopConfig;
use app\common\model\GoodsItem;
+use app\common\model\PhaseConfig;
use app\common\validate\GoodsValidate;
@@ -38,7 +39,7 @@ class GoodsController extends Controller
}
//添加
- public function add(Request $request, Goods $model,MallImage $mimode,GoodsItem $gimode, GoodsValidate $validate)
+ public function add(Request $request, Goods $model,MallImage $mimode,GoodsItem $gimode,PhaseConfig $pcmode, GoodsValidate $validate)
{
if ($request->isPost()) {
$param = $request->param();
@@ -83,6 +84,8 @@ class GoodsController extends Controller
$size[$key]['size']=$value;
$size[$key]['num']=0;
}
+ //品相
+ $phaseconfig =PhaseConfig::field('id,name')->select();
$this->assign([
'goods_category_list' => $this->getSelectList(new GoodsCategory),
'brand_list' =>GoodsBrand::all(),
@@ -90,6 +93,7 @@ class GoodsController extends Controller
'number'=>0,
'collocation_goods'=>array(),
'size_list' =>$size,
+ 'phaseconfig'=>$phaseconfig,
'goods_list' => Goods::all()
]);
return $this->fetch();
@@ -153,6 +157,8 @@ class GoodsController extends Controller
$num=$goods_item[$value]??'0';
$size[$key]['num']=$num;
}
+ //品相
+ $phaseconfig =PhaseConfig::field('id,name')->select();
$this->assign([
'data' => $data,
'goods_category_list' => $this->getSelectList(new GoodsCategory, $data->goods_category_id),
@@ -163,6 +169,7 @@ class GoodsController extends Controller
'number'=>count($collocation_goods),
'collocation_goods'=>$collocation_goods,
'size_list' =>$size,
+ 'phaseconfig'=>$phaseconfig,
'goods_list' => Goods::all()
]);
return $this->fetch('add');
diff --git a/application/admin/controller/ShopConfigController.php b/application/admin/controller/ShopConfigController.php
index 53fa2cd..7d9c709 100755
--- a/application/admin/controller/ShopConfigController.php
+++ b/application/admin/controller/ShopConfigController.php
@@ -85,6 +85,9 @@ class ShopConfigController extends Controller
ShopConfig::set('website', 'MCHID', $param['MCHID']);
ShopConfig::set('website', 'WXPAYKEY', $param['WXPAYKEY']);
ShopConfig::set('website', 'notify_url', $param['notify_url']);
+
+ ShopConfig::set('website', 'wxqrcode', $param['wxqrcode']);
+ ShopConfig::set('website', 'share_img', $param['share_img']);
$url = URL_RELOAD;
return success('添加成功',$url);
}
@@ -99,6 +102,8 @@ class ShopConfigController extends Controller
'MCHID' => ShopConfig::get('website', 'MCHID'),
'WXPAYKEY' => ShopConfig::get('website', 'WXPAYKEY'),
'notify_url' => ShopConfig::get('website', 'notify_url'),
+ 'wxqrcode' => ShopConfig::get('website', 'wxqrcode'),
+ 'share_img' => ShopConfig::get('website', 'share_img'),
];
$this->assign([
'config' => $config,
diff --git a/application/admin/controller/WithdrawController.php b/application/admin/controller/WithdrawController.php
index 02b4502..8a75682 100755
--- a/application/admin/controller/WithdrawController.php
+++ b/application/admin/controller/WithdrawController.php
@@ -18,7 +18,6 @@ class WithdrawController extends Controller
//列表
public function lists(Request $request, WithdrawApply $model)
{
- $WITHDRAW_TYPE=$model->WITHDRAW_TYPE;
$STATUS_TYPE=$model->STATUS_TYPE;
$param = $request->param();
@@ -68,7 +67,6 @@ class WithdrawController extends Controller
'data' => $data,
'page' => $data->render(),
'total' => $data->total(),
- 'type_list' =>$WITHDRAW_TYPE,
'status_list'=>$STATUS_TYPE,
]);
return $this->fetch();
@@ -126,7 +124,7 @@ class WithdrawController extends Controller
//拒绝提现,回退佣金
$user = User::get($withdraw_apply['user_id']);
- $user->integral = ['inc', $withdraw_apply['money']];
+ $user->user_money = ['inc', $withdraw_apply['money']];
$user->save();
//增加账户变动记录
@@ -134,7 +132,7 @@ class WithdrawController extends Controller
$withdraw_apply['user_id'],
$withdraw_apply['money'],
1,
- 130,
+ 110,
'',
$withdraw_apply['id'],
$withdraw_apply['sn']
diff --git a/application/admin/view/consignment_order/examine.html b/application/admin/view/consignment_order/examine.html
index 4d1ecc9..308f41d 100755
--- a/application/admin/view/consignment_order/examine.html
+++ b/application/admin/view/consignment_order/examine.html
@@ -126,7 +126,7 @@
- {if condition="$goods.refund_status=='0' && $goods.is_confirm=='1'"}
+ {if condition="$goods.refund_status=='0'"}
{/if}
diff --git a/application/admin/view/consignment_order/shelves.html b/application/admin/view/consignment_order/shelves.html
index 5d0f788..6ab6b8b 100755
--- a/application/admin/view/consignment_order/shelves.html
+++ b/application/admin/view/consignment_order/shelves.html
@@ -91,7 +91,7 @@
|
- {if condition="$goods.refund_status=='1'"}
+ {if condition="$goods.refund_status=='1'&& $goods.is_confirm=='1'"}
{/if}
|
diff --git a/application/admin/view/finance/lists.html b/application/admin/view/finance/lists.html
index 702b627..b0cbd43 100755
--- a/application/admin/view/finance/lists.html
+++ b/application/admin/view/finance/lists.html
@@ -36,6 +36,12 @@
margin-left: 42px;
color: #333;
font-size: 25px;
+ line-height: 36px;
+ padding: 5px 0 10px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-break: break-all;
+ white-space: nowrap;
}
@@ -47,43 +53,27 @@
-

+
本月订单金额(元)
-
1
+
{$month_order_amount}
-

+
订单总金额(元)
-
1
+
{$total_amount}
-

+
订单总数(笔)
-
1
-
-
-
-

-
退款订单总额(元)
-
-
-
1
-
-
-
-

-
退款订单总数(笔)
-
-
-
1
+
{$order_num}
@@ -95,76 +85,27 @@
-

+
会员余额(元)
-
1
+
{$total_user_money}
-

-
会员积分
+

+
会员可提现金额(元)
-
1
+
{$wait_earnings}
-

-
会员可提现佣金(元)
+

+
会员已提现金额(元)
-
1
-
-
-
-

-
会员已提现佣金(元)
-
-
-
1
-
-
-
-
-
-
-
-
-
-
-

-
本月分销佣金(元)
-
-
-
1
-
-
-
-

-
分销总佣金(元)
-
-
-
1
-
-
-
-

-
提现中佣金(元)
-
-
-
1
-
-
-
-

-
已提现佣金(元)
-
-
-
1
+
{$have_withdraw_earnings}
diff --git a/application/admin/view/goods/add.html b/application/admin/view/goods/add.html
index 34093ca..359a248 100755
--- a/application/admin/view/goods/add.html
+++ b/application/admin/view/goods/add.html
@@ -302,6 +302,23 @@ ul.albums li a.btn-fm_z{
+
+
-