feature: 工资管理类型
This commit is contained in:
parent
7cbf0c5a01
commit
a988d4d54b
|
|
@ -5,6 +5,9 @@ return [
|
||||||
'Admin_id' => '创建人id',
|
'Admin_id' => '创建人id',
|
||||||
'Name' => '名称',
|
'Name' => '名称',
|
||||||
'Desc' => '描述',
|
'Desc' => '描述',
|
||||||
|
'Type 1' => '加',
|
||||||
|
'Type 2' => '自定义',
|
||||||
|
'Type 3' => '减',
|
||||||
'Create_time' => '创建时间',
|
'Create_time' => '创建时间',
|
||||||
'Update_time' => '编辑时间'
|
'Update_time' => '编辑时间'
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,18 @@ class Item extends Model
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function getTypeList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Type 1'), '2' => __('Type 2'), '3' => __('Type 3')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getTypeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ?: ($data['type'] ?? '');
|
||||||
|
$list = $this->getTypeList();
|
||||||
|
return $list[$value] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,18 @@
|
||||||
<input id="c-desc" data-rule="required" class="form-control" name="row[desc]" type="text" value="">
|
<input id="c-desc" data-rule="required" class="form-control" name="row[desc]" type="text" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
||||||
|
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
||||||
|
{foreach name="typeList" item="vo"}
|
||||||
|
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,18 @@
|
||||||
<input id="c-desc" data-rule="required" class="form-control" name="row[desc]" type="text" value="{$row.desc|htmlentities}">
|
<input id="c-desc" data-rule="required" class="form-control" name="row[desc]" type="text" value="{$row.desc|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
||||||
|
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
||||||
|
{foreach name="typeList" item="vo"}
|
||||||
|
<option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
{field: 'admin_id', title: __('Admin_id')},
|
{field: 'admin_id', title: __('Admin_id')},
|
||||||
{field: 'name', title: __('Name'), operate: 'LIKE'},
|
{field: 'name', title: __('Name'), operate: 'LIKE'},
|
||||||
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
||||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user