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:
zhuyu 2025-05-29 17:24:25 +08:00 committed by Coding
commit ecb78bd587
5 changed files with 10 additions and 31 deletions

View File

@ -115,18 +115,21 @@ class Detail extends Backend
$itemKey = 'item_' . $item['id'];
$value = 0;
if (!empty($queryRes[$adminId][$item['id']])) {
$res[$adminId][$itemKey] = $this->clean_number($queryRes[$adminId][$item['id']]);
$attrValue[$idAttr[$item['id']]] = $queryRes[$adminId][$item['id']];
$value = $this->clean_number($queryRes[$adminId][$item['id']]);
$total = $this->calc_total($total, $item['type'], $queryRes[$adminId][$item['id']]);
continue;
}
$attrValue[$item['attr']] = 0;
$res[$adminId][$itemKey] = 0;
$attrValue[$item['attr']] = $value;
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]['total'] = $this->clean_number($total + $jxTotal);
}

View File

@ -22,6 +22,7 @@ class Item extends Backend
{
parent::_initialize();
$this->model = new \app\admin\model\salary\Item;
$this->view->assign("typeList", $this->model->getTypeList());
}

View File

@ -24,18 +24,6 @@
</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">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">

View File

@ -24,18 +24,6 @@
</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">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">

View File

@ -26,7 +26,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'admin_id', title: __('Admin_id')},
{field: 'name', title: __('Name'), operate: 'LIKE'},
{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},