Accept Merge Request #81: (feature/zy -> develop)
Merge Request: feature: 工资管理类型 Created By: @zhuyu Accepted By: @zhuyu URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/81?initial=true
This commit is contained in:
commit
ecb78bd587
|
|
@ -115,18 +115,21 @@ class Detail extends Backend
|
||||||
|
|
||||||
$itemKey = 'item_' . $item['id'];
|
$itemKey = 'item_' . $item['id'];
|
||||||
|
|
||||||
|
$value = 0;
|
||||||
|
|
||||||
if (!empty($queryRes[$adminId][$item['id']])) {
|
if (!empty($queryRes[$adminId][$item['id']])) {
|
||||||
$res[$adminId][$itemKey] = $this->clean_number($queryRes[$adminId][$item['id']]);
|
$value = $this->clean_number($queryRes[$adminId][$item['id']]);
|
||||||
$attrValue[$idAttr[$item['id']]] = $queryRes[$adminId][$item['id']];
|
|
||||||
$total = $this->calc_total($total, $item['type'], $queryRes[$adminId][$item['id']]);
|
$total = $this->calc_total($total, $item['type'], $queryRes[$adminId][$item['id']]);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$attrValue[$item['attr']] = 0;
|
$attrValue[$item['attr']] = $value;
|
||||||
$res[$adminId][$itemKey] = 0;
|
if ($item['attr'] == 'TD') {
|
||||||
|
$value = $value . '%';
|
||||||
|
}
|
||||||
|
$res[$adminId][$itemKey] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
$jxTotal = ($attrValue['ZWJX'] - $attrValue['YYCB']) * $attrValue['TD'];
|
$jxTotal = ($attrValue['ZWJX'] - $attrValue['YYCB']) * $attrValue['TD'] / 100;
|
||||||
$res[$adminId]['jx_total'] = $this->clean_number($jxTotal);
|
$res[$adminId]['jx_total'] = $this->clean_number($jxTotal);
|
||||||
$res[$adminId]['total'] = $this->clean_number($total + $jxTotal);
|
$res[$adminId]['total'] = $this->clean_number($total + $jxTotal);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ class Item extends Backend
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
parent::_initialize();
|
||||||
$this->model = new \app\admin\model\salary\Item;
|
$this->model = new \app\admin\model\salary\Item;
|
||||||
|
$this->view->assign("typeList", $this->model->getTypeList());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,18 +24,6 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -24,18 +24,6 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('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: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user