From e0cff10e6649adf1ed09f3e1c73566af076da0c9 Mon Sep 17 00:00:00 2001 From: lemon <15040771@qq.com> Date: Thu, 16 Sep 2021 19:34:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=A4=E6=98=93=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/DepositController.php | 62 +++++++++++++++++++++ app/Admin/routes.php | 1 + resources/lang/zh_CN/global.php | 2 + 3 files changed, 65 insertions(+) create mode 100644 app/Admin/Controllers/DepositController.php diff --git a/app/Admin/Controllers/DepositController.php b/app/Admin/Controllers/DepositController.php new file mode 100644 index 0000000..162ee06 --- /dev/null +++ b/app/Admin/Controllers/DepositController.php @@ -0,0 +1,62 @@ +disableDeleteButton(); + $grid->disableCreateButton(); + $grid->disableRowSelector(); + $grid->disableViewButton(); + $grid->column('id')->sortable(); + $grid->column('name'); + $grid->column('deposit_normal','正常'); + $grid->column('deposit_frozen','冻结中'); + $grid->column('deposit_used','已消费'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new Supplier(), function (Form $form) { + $form->decimal('deposit_normal','正常')->rules('required|numeric|min:0|not_in:0',[ + '*' => '金额为必填字段且必须大于0', + ]); + $form->decimal('deposit_frozen','冻结中')->disable(); + $form->decimal('deposit_used','已消费')->disable(); + $form->disableCreatingCheck(); + $form->disableViewButton(); + $form->disableDeleteButton(); + $form->disableListButton(); + $form->disableResetButton(); + $form->disableViewCheck(); + $form->disableEditingCheck(); + }); + } +} diff --git a/app/Admin/routes.php b/app/Admin/routes.php index e2ba74d..474d488 100644 --- a/app/Admin/routes.php +++ b/app/Admin/routes.php @@ -45,4 +45,5 @@ Route::group([ $router->resource('withdrawal', 'WithdrawalController'); $router->resource('system', 'SystemSettingController'); + $router->resource('deposit', 'DepositController'); }); diff --git a/resources/lang/zh_CN/global.php b/resources/lang/zh_CN/global.php index 3b7daf8..f4a694d 100644 --- a/resources/lang/zh_CN/global.php +++ b/resources/lang/zh_CN/global.php @@ -35,6 +35,8 @@ return [ 'my_bidding_product' => '竞标产品库', 'demand_product'=> '产品管理', 'MyBiddingProduct' => '竞标产品库', + 'deposit' => '交易金', + 'Deposit' => '交易金' ], 'options' => [ // From 588407f6f8170e3c4159e05cc322dd33ac0beb0d Mon Sep 17 00:00:00 2001 From: lemon <15040771@qq.com> Date: Fri, 17 Sep 2021 11:03:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Metrics/Examples/AgentStatistics.php | 2 +- app/Admin/Metrics/Examples/OrderStatistics.php | 2 +- app/Admin/Metrics/Examples/ProductStatistics.php | 2 +- app/Admin/Metrics/Examples/SupplierStatistics.php | 2 +- app/AdminAgent/Metrics/Examples/FinanceStatistics.php | 2 +- app/AdminAgent/Metrics/Examples/OrderStatistics.php | 2 +- app/AdminAgent/Metrics/Examples/ProductStatistics.php | 2 +- app/AdminSupplier/Metrics/Examples/FinanceStatistics.php | 2 +- app/AdminSupplier/Metrics/Examples/OrderStatistics.php | 2 +- app/AdminSupplier/Metrics/Examples/ProductStatistics.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Admin/Metrics/Examples/AgentStatistics.php b/app/Admin/Metrics/Examples/AgentStatistics.php index 64f619b..86c3df8 100644 --- a/app/Admin/Metrics/Examples/AgentStatistics.php +++ b/app/Admin/Metrics/Examples/AgentStatistics.php @@ -77,7 +77,7 @@ class AgentStatistics extends Chart $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { diff --git a/app/Admin/Metrics/Examples/OrderStatistics.php b/app/Admin/Metrics/Examples/OrderStatistics.php index 46a1a39..655cae1 100644 --- a/app/Admin/Metrics/Examples/OrderStatistics.php +++ b/app/Admin/Metrics/Examples/OrderStatistics.php @@ -74,7 +74,7 @@ class OrderStatistics extends Chart $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { diff --git a/app/Admin/Metrics/Examples/ProductStatistics.php b/app/Admin/Metrics/Examples/ProductStatistics.php index ad44771..6a7f089 100644 --- a/app/Admin/Metrics/Examples/ProductStatistics.php +++ b/app/Admin/Metrics/Examples/ProductStatistics.php @@ -70,7 +70,7 @@ class ProductStatistics extends Chart ->select('*'); $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { case '1': diff --git a/app/Admin/Metrics/Examples/SupplierStatistics.php b/app/Admin/Metrics/Examples/SupplierStatistics.php index 1d6a503..864fe44 100644 --- a/app/Admin/Metrics/Examples/SupplierStatistics.php +++ b/app/Admin/Metrics/Examples/SupplierStatistics.php @@ -78,7 +78,7 @@ class SupplierStatistics extends Chart $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { diff --git a/app/AdminAgent/Metrics/Examples/FinanceStatistics.php b/app/AdminAgent/Metrics/Examples/FinanceStatistics.php index 6b83415..07f5791 100644 --- a/app/AdminAgent/Metrics/Examples/FinanceStatistics.php +++ b/app/AdminAgent/Metrics/Examples/FinanceStatistics.php @@ -76,7 +76,7 @@ class FinanceStatistics extends Chart $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { diff --git a/app/AdminAgent/Metrics/Examples/OrderStatistics.php b/app/AdminAgent/Metrics/Examples/OrderStatistics.php index 0c2e839..ecde124 100644 --- a/app/AdminAgent/Metrics/Examples/OrderStatistics.php +++ b/app/AdminAgent/Metrics/Examples/OrderStatistics.php @@ -75,7 +75,7 @@ class OrderStatistics extends Chart $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { diff --git a/app/AdminAgent/Metrics/Examples/ProductStatistics.php b/app/AdminAgent/Metrics/Examples/ProductStatistics.php index 77d4e2b..7ef75dc 100644 --- a/app/AdminAgent/Metrics/Examples/ProductStatistics.php +++ b/app/AdminAgent/Metrics/Examples/ProductStatistics.php @@ -71,7 +71,7 @@ class ProductStatistics extends Chart ->select('*'); $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { case '1': diff --git a/app/AdminSupplier/Metrics/Examples/FinanceStatistics.php b/app/AdminSupplier/Metrics/Examples/FinanceStatistics.php index 3ad7227..d629683 100644 --- a/app/AdminSupplier/Metrics/Examples/FinanceStatistics.php +++ b/app/AdminSupplier/Metrics/Examples/FinanceStatistics.php @@ -79,7 +79,7 @@ class FinanceStatistics extends Chart $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { diff --git a/app/AdminSupplier/Metrics/Examples/OrderStatistics.php b/app/AdminSupplier/Metrics/Examples/OrderStatistics.php index 36a9e40..efd257d 100644 --- a/app/AdminSupplier/Metrics/Examples/OrderStatistics.php +++ b/app/AdminSupplier/Metrics/Examples/OrderStatistics.php @@ -76,7 +76,7 @@ class OrderStatistics extends Chart $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { diff --git a/app/AdminSupplier/Metrics/Examples/ProductStatistics.php b/app/AdminSupplier/Metrics/Examples/ProductStatistics.php index af1ccad..863f732 100644 --- a/app/AdminSupplier/Metrics/Examples/ProductStatistics.php +++ b/app/AdminSupplier/Metrics/Examples/ProductStatistics.php @@ -72,7 +72,7 @@ class ProductStatistics extends Chart ->select('*'); $dateTime = request('created_at', 0); if ($dateTime) { - $query->whereBetween('created_at',$dateTime); + $query->whereBetween('created_at',[$dateTime['start'] . ' 00:00:00',$dateTime['end'].' 23:59:59']); } switch (request('time_key', 0)) { case '1':