Browse Source

交易金

master
lemon 4 years ago
parent
commit
f0f66d3aaa
  1. 8
      app/Admin/Controllers/DepositController.php
  2. 48
      app/AdminSupplier/Controllers/DepositLogController.php
  3. 2
      app/AdminSupplier/Controllers/IndustryProductController.php
  4. 2
      app/AdminSupplier/Controllers/ProductController.php

8
app/Admin/Controllers/DepositController.php

@ -32,8 +32,8 @@ class DepositController extends AdminController
$grid->column('id')->sortable();
$grid->column('name');
$grid->column('deposit_normal','正常');
$grid->column('deposit_frozen','冻结中');
$grid->column('deposit_used','已消费');
//$grid->column('deposit_frozen','冻结中');
//$grid->column('deposit_used','已消费');
});
}
@ -48,8 +48,8 @@ class DepositController extends AdminController
$form->decimal('deposit_normal','正常')->rules('required|numeric|min:0|not_in:0',[
'*' => '金额为必填字段且必须大于0',
]);
$form->decimal('deposit_frozen','冻结中')->disable();
$form->decimal('deposit_used','已消费')->disable();
//$form->decimal('deposit_frozen','冻结中')->disable();
//$form->decimal('deposit_used','已消费')->disable();
$form->disableCreatingCheck();
$form->disableViewButton();
$form->disableDeleteButton();

48
app/AdminSupplier/Controllers/DepositLogController.php

@ -34,7 +34,7 @@ class DepositLogController extends AdminController
)
->body(function (Row $row) {
$row->column(4, function (Column $column) {
$row->column(3, function (Column $column) {
$column->row(Card::make('正常', function () {
$price = Admin::user()->deposit_normal ?? 0;
return <<<HTML
@ -45,29 +45,29 @@ HTML;
}));
});
$row->column(4, function (Column $column) {
$column->row(Card::make('冻结', function () {
$price = Admin::user()->deposit_frozen ?? 0;
return <<<HTML
<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
<h2 class="ml-1 font-large-1 text-primary">$price</h2>
</div>
HTML;
}));
});
$row->column(4, function (Column $column) {
$column->row(Card::make('消费', function () {
$price = Admin::user()->deposit_used ?? 0;
return <<<HTML
<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
<h2 class="ml-1 font-large-1 text-primary">$price</h2>
</div>
HTML;
}));
});
// $row->column(4, function (Column $column) {
// $column->row(Card::make('冻结', function () {
// $price = Admin::user()->deposit_frozen ?? 0;
// return <<<HTML
//<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
// <h2 class="ml-1 font-large-1 text-primary">$price</h2>
//</div>
//HTML;
// }));
//
// });
//
// $row->column(4, function (Column $column) {
// $column->row(Card::make('消费', function () {
// $price = Admin::user()->deposit_used ?? 0;
// return <<<HTML
//<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
// <h2 class="ml-1 font-large-1 text-primary">$price</h2>
//</div>
//HTML;
// }));
//
// });
})
->body(

2
app/AdminSupplier/Controllers/IndustryProductController.php

@ -116,7 +116,7 @@ class IndustryProductController extends AdminController
$form->text('title')->required();
$form->currency('price')->required();
$form->currency('original_price')->required();
$form->number('service_persons')->min(0)->required();
//$form->number('service_persons')->min(0)->required();
$form->number('stock')->required();
$form->number('min_sale')->min(1)->required();
if ($form->isEditing() && in_array($form->model()->status, [ProductStatus::SOLD_OUT, ProductStatus::ON_SALE])) {

2
app/AdminSupplier/Controllers/ProductController.php

@ -148,7 +148,7 @@ class ProductController extends AdminController
.has-many-spec .input-group>.form-control:not(:first-child){border-radius:.25rem;}');
Admin::script(file_get_contents(resource_path('js/supplier-batch-add-spec.js')));
})->useTable()->required();
$form->number('service_persons')->min(1)->default(1)->required();
//$form->number('service_persons')->min(1)->default(1)->required();
if ($form->isEditing() && in_array($form->model()->status, [ProductStatus::SOLD_OUT, ProductStatus::ON_SALE])) {
$form->radio('status')->options([1 => '上架', -2 => '下架'])->default(1);
}

Loading…
Cancel
Save