Commit ecfb1977 by 孙龙
parents 94fc9893 5fc9a79d
......@@ -30,14 +30,14 @@ class ScmUserController extends AdminController
$grid->column('company_name');
$grid->column('first_name');
$grid->column('last_name');
$grid->column('created_time');
$grid->column('create_time');
$grid->column('update_time');
$grid->column('created_at');
$grid->column('updated_at')->sortable();
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('id');
});
});
}
......@@ -64,7 +64,7 @@ class ScmUserController extends AdminController
$show->field('company_name');
$show->field('first_name');
$show->field('last_name');
$show->field('created_time');
$show->field('create_time');
$show->field('update_time');
$show->field('created_at');
$show->field('updated_at');
......@@ -91,9 +91,9 @@ class ScmUserController extends AdminController
$form->text('company_name');
$form->text('first_name');
$form->text('last_name');
$form->text('created_time');
$form->text('create_time');
$form->text('update_time');
$form->display('created_at');
$form->display('updated_at');
});
......
......@@ -23,10 +23,10 @@ class UserService
{
$grid->filter(function ($filter) {
$filter->expand(true);
$filter->whereBetween('created_time', function ($q) {
$filter->whereBetween('create_time', function ($q) {
$start = strtotime($this->input['start'] ?? null);
$end = strtotime($this->input['end'] ?? null);
$q->whereBetween('created_time', [$start, $end]);
$q->whereBetween('create_time', [$start, $end]);
})->datetime()->width(3);
$filter->startWith('company_name')->width(2);
......@@ -64,7 +64,7 @@ class UserService
];
return "{$data['pending']}/{$data['all']}";
});
$grid->column('created_time')->display(function ($time) {
$grid->column('create_time')->display(function ($time) {
return $time ? date('Y-m-d H:i:s', $time) : '';
})->sortable();;
$grid->column('status')->using(admin_trans('user.options.status'));
......@@ -92,7 +92,7 @@ class UserService
// $rowArray = $actions->row->toArray();
// 获取当前行主键值
$id = $actions->getKey();
$actions->append('<a style="margin-right: 5px" href="' . admin_url("/users/{$id}") . '" class="btn btn-primary btn-sm
$actions->append('<a style="margin-right: 5px" href="' . admin_url("/users/{$id}") . '" class="btn btn-primary btn-sm
btn-mini">' . admin_trans("detail") . '</a>');
//状态按钮
$actions->append(new UserStatusAction());
......@@ -125,7 +125,7 @@ class UserService
"status" => User::STATUS_NORMAL,
"sale_id" => request()->user->userId ?? "1000",
"sale_name" => request()->user->name ?? "admin",
"created_time" => time(),
"create_time" => time(),
"update_time" => time(),
];
$userId = User::insertData($userData);
......
......@@ -23,7 +23,7 @@ use Illuminate\Database\Eloquent\Model;
* @property $sale_id 业务员
* @property $sale_name 业务员名字
* @property $last_name 姓氏
* @property $created_time 创建时间
* @property $create_time 创建时间
* @property $update_time 更新时间
*/
class User extends BaseModel
......
......@@ -26,7 +26,7 @@ class CreateUsersTable extends Migration
$table->string('company_name', 100)->comment('公司名称')->default('');
$table->string('first_name', 100)->comment('名字')->default('');
$table->string('last_name', 100)->comment('姓氏')->default('');
$table->integer('created_time')->unsigned()->comment('创建时间')->default(0);
$table->integer('create_time')->unsigned()->comment('创建时间')->default(0);
$table->integer('update_time')->unsigned()->comment('更新时间')->default(0);
});
}
......
......@@ -27,7 +27,7 @@ class CreateUserAddressTable extends Migration
$table->string('postal_code', 50)->comment('邮政编码')->default('');
$table->string('address', 255)->comment('具体地址')->default('');
$table->tinyInteger('is_default')->comment('是否是默认地址,1是,-1否')->default(-1);
$table->integer('created_time')->unsigned()->comment('创建时间')->default(0);
$table->integer('create_time')->unsigned()->comment('创建时间')->default(0);
$table->integer('update_time')->unsigned()->comment('更新时间')->default(0);
});
}
......
......@@ -22,7 +22,7 @@ class CreateFrqTable extends Migration
$table->integer('quantity')->unsigned()->comment('数量')->default(0);
$table->string('remark')->comment('备注')->default('');
$table->tinyInteger('status')->unsigned()->comment('询价状态,1是进行中,2是已回复')->default(1);
$table->integer('created_time')->unsigned()->comment('创建时间')->default(0);
$table->integer('create_time')->unsigned()->comment('创建时间')->default(0);
$table->integer('update_time')->unsigned()->comment('更新时间')->default(0);
});
}
......
......@@ -17,7 +17,7 @@ return [
'company_name' => '公司名称',
'first_name' => '名字',
'last_name' => '姓氏',
'created_time' => '创建时间',
'create_time' => '创建时间',
'update_time' => '更新时间',
],
'options' => [
......
......@@ -25,7 +25,7 @@ return [
'sale_id' => '业务员',
'sale_name' => '业务员名字',
'last_name' => '姓氏',
'created_time' => '创建时间',
'create_time' => '创建时间',
'update_time' => '更新时间',
'reg_source' => '注册来源',
'order_num_data' => '进行中 / 总计 订单数',
......
<?php
<?php
return [
'labels' => [
'ScmUser' => 'ScmUser',
......@@ -17,7 +17,7 @@ return [
'company_name' => '公司名称',
'first_name' => '名字',
'last_name' => '姓氏',
'created_time' => '创建时间',
'create_time' => '创建时间',
'update_time' => '更新时间',
],
'options' => [
......
......@@ -20,7 +20,7 @@ return [
'sale_id' => '业务员',
'sale_name' => '业务员名字',
'last_name' => '姓氏',
'created_time' => '创建时间',
'create_time' => '创建时间',
'update_time' => '更新时间',
],
'options' => [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment