Browse Source

[update] 绩效列表新增发放绩效功能

dev
zhangsiqi 7 months ago
parent
commit
88d3bf1d79
  1. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/ErpTechniqueMeritsController.java
  2. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/ErpTechniqueMerits.java
  3. 189
      ruoyi-admin/src/main/resources/templates/system/technicalMerits/technicalMerits.html

14
ruoyi-admin/src/main/java/com/ruoyi/system/controller/ErpTechniqueMeritsController.java

@ -5,11 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.ErpTechniqueMerits;
@ -152,6 +148,10 @@ public class ErpTechniqueMeritsController extends BaseController
{
return toAjax(erpTechniqueMeritsService.restoreErpTechniqueMeritsById(id));
}
@GetMapping("/getTechnicalMerits")
@ResponseBody
public AjaxResult getTechnicalMerits(@RequestParam("id") Long id)
{
return AjaxResult.success(erpTechniqueMeritsService.selectErpTechniqueMeritsById(id));
}
}

13
ruoyi-admin/src/main/java/com/ruoyi/system/domain/ErpTechniqueMerits.java

@ -5,6 +5,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.poi.hpsf.Decimal;
/**
* 技术绩效列表对象 erp_technique_merits
@ -55,6 +56,9 @@ public class ErpTechniqueMerits extends BaseEntity
@Excel(name = "已发放绩效")
private Long grantNum;
//本次发放绩效
private Decimal benGrantNum;
public void setId(Long id)
{
this.id = id;
@ -146,6 +150,15 @@ public class ErpTechniqueMerits extends BaseEntity
return grantNum;
}
public Decimal getBenGrantNum() {
return benGrantNum;
}
public void setBenGrantNum(Decimal benGrantNum) {
this.benGrantNum = benGrantNum;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

189
ruoyi-admin/src/main/resources/templates/system/technicalMerits/technicalMerits.html

@ -36,12 +36,11 @@
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a
<a class="btn btn-warning">
<i class="fa fa-download"></i> 导入已发放绩效
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:technicalMerits:export">
<i class="fa fa-download"></i> 导出
</a>
@ -51,6 +50,63 @@
</div>
</div>
</div>
<div class="modal inmodal" id="technicalGantModel" tabindex="1"
role="dilog" aria-hidden="true">
<div class="modal-dialog" style="width: 1000px;background-color: #FFFFFF">
<div class="modal-content" style="background-color: #FFFFFF">
<div style="font-size: 20px;padding: 10px 50px 0">发放绩效</div>
<div class="modal-body">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-technicalGant-add" style="display: flex;flex-wrap: wrap;">
<div class="form-group" hidden="hidden">
<input name="id" class="form-control" type="number">
</div>
<div class="form-group">
<label class="col-sm-2 control-label">员工ID:</label>
<div class="col-sm-10">
<input name="staffNo" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">技术员:</label>
<div class="col-sm-10">
<input name="staffName" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">部门:</label>
<div class="col-sm-10">
<input name="dept" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">待发放绩效:</label>
<div class="col-sm-10">
<input name="ngrantNum" class="form-control" type="number" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">已发放绩效:</label>
<div class="col-sm-10">
<input name="grantNum" class="form-control" type="number" disabled>
</div>
</div>
<div class="col-xs-12">
<label class="col-sm-2 control-label">本次发放绩效金额:</label>
<div class="col-sm-10">
<input name="benGrantNum" class="form-control" type="text">
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<div type="button" class="btn btn-primary" onclick="submitHandlerSign()">确定</div>
<div type="button" class="btn btn-default" onclick="closeSign()">取消</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:technicalMerits:edit')}]];
@ -71,78 +127,87 @@
exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
modalName: "技术绩效列表",
columns: [{
checkbox: true
},
{
title: '技术绩效表id',
field: 'id',
visible: false
},
{
title: '技术绩效ID',
field: 'techniqueId',
},
{
title: '员工ID',
field: 'staffNo',
},
{
title: '生产员',
field: 'makeName',
},
{
title: '部门',
field: 'dept',
},
{
title: '币种',
field: 'currency',
columns: [
{checkbox: true},
{ title: '技术绩效表id',field: 'id',visible: false},
{title: '技术绩效ID', field: 'techniqueId',},
{title: '员工ID',field: 'staffNo',},
{title: '生产员',field: 'makeName',},
{title: '部门',field: 'dept',},
{title: '币种',field: 'currency',
formatter: function(value, row, index) {
return $.table.selectDictLabel(currencyDatas, value);
}
},
{
title: '待结算绩效',
field: 'nsettleNum',
},
{
title: '已结算绩效',
field: 'sttleNum',
},
{
title: '待发放绩效',
field: 'ngrantNum',
},
{
title: '已发放绩效',
field: 'grantNum',
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
{title: '待结算绩效',field: 'nsettleNum'},
{title: '已结算绩效',field: 'sttleNum',},
{title: '待发放绩效', field: 'ngrantNum',},
{title: '已发放绩效',field: 'grantNum',},
{title: '录入时间',field: 'createTime',},
{title: '更新人',field: 'updateBy',},
{title: '上次更新时间',field: 'updateTime',},
{title: '操作',align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>发放绩效</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-remove"></i>详情</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="showFa(\'' + row+ '\')"><i class="fa fa-edit"></i>发放绩效</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-save"></i>详情</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
function showFa(row){
var id = row.id;
if(id != null && id > 0){
$("#technicalGantModel").show();
var form = $("#form-technicalGant-add");
$.ajax({
type: 'POST',
url: prefix + "/getTechnicalMerits",
data: {"id": id},
dataType: 'json',
async: false,
success: function (result) {
if (result.code == web_status.SUCCESS) {
form.find("input[name='id']").val(result.data.id);
form.find("input[name='staffNo']").val(result.data.staffNo);
form.find("input[name='dept']").val(result.data.dept);
form.find("input[name='ngrantNum']").val(result.data.ngrantNum);
form.find("input[name='grantNum']").val(result.data.grantNum);
}
}
});
}else{
$.modal.alertWarning("请先选择一条数据");
}
}
function showFa(row){
var id = row.id;
if(id != null && id > 0){
$("#technicalGantModel").show();
var form = $("#form-technicalGant-add");
$.ajax({
type: 'POST',
url: prefix + "/getTechnicalMerits",
data: {"id": id},
dataType: 'json',
async: false,
success: function (result) {
if (result.code == web_status.SUCCESS) {
form.find("input[name='id']").val(result.data.id);
form.find("input[name='staffNo']").val(result.data.staffNo);
form.find("input[name='dept']").val(result.data.dept);
form.find("input[name='ngrantNum']").val(result.data.ngrantNum);
form.find("input[name='grantNum']").val(result.data.grantNum);
}
}
});
}else{
$.modal.alertWarning("请先选择一条数据");
}
}
</script>
</body>
</html>
Loading…
Cancel
Save