Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
youjianchi 5 months ago
parent
commit
aff93c0492
  1. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/ErpTechniqueMeritsController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  3. 54
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  4. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/ErpTechniqueMerits.java
  5. 35
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  6. 4
      ruoyi-admin/src/main/resources/templates/system/customer/add.html
  7. 6
      ruoyi-admin/src/main/resources/templates/system/customer/detail.html
  8. 6
      ruoyi-admin/src/main/resources/templates/system/customer/edit.html
  9. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html
  10. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html
  11. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwzgVerify.html
  12. 6
      ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html
  13. 2
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  14. 16
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html
  15. 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));
}
}

4
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -104,6 +104,10 @@ public class SysCustomerController extends BaseController
SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId();
// 业务员角色只能看到自己创建的数据
SysRole role = roleService.selectRoleById(curUser.getRoleId());
if (role.getRoleKey().equals("ywyRole")){
sysCustomerVo.setCreateBy(curUser.getUserName());
}
startPage();
List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo);
return getDataTable(list);

54
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java

@ -46,6 +46,7 @@ import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.*;
import java.util.stream.Collectors;
import static com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder.log;
@ -100,16 +101,63 @@ public class SysSalesOrderController extends BaseController
@ResponseBody
public TableDataInfo list(SysSalesOrderVo sysSalesOrderVo)
{
startPage();
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
try {
SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("ywy");
if(roleKeys.contains("ywjlRole")){
sysUserlist = sysUserlist.stream().filter(item -> {
return item.getDept().getDeptId() == curUser.getDeptId();
}).collect(Collectors.toList());
List<SysUser> finalSysUserlist = sysUserlist;
finalSysUserlist.add(curUser);
startPage();
list = list.stream().filter(item -> {
for (SysUser sysUser : finalSysUserlist) {
if (sysUser.getLoginName().equals(item.getApplyUser())) {
return true;
}
}
return false;
}).collect(Collectors.toList());
return getDataTable(list);
}
if(roleKeys.contains("ywzgRole")){
sysUserlist = sysUserlist.stream().filter(item -> {
return item.getDept().getDeptId() == curUser.getDeptId();
}).collect(Collectors.toList());
List<SysUser> finalSysUserlist = sysUserlist;
finalSysUserlist.add(curUser);
startPage();
list = list.stream().filter(item -> {
for (SysUser sysUser : finalSysUserlist) {
if (sysUser.getLoginName().equals(item.getApplyUser())) {
return true;
}
}
return false;
}).collect(Collectors.toList());
return getDataTable(list);
}
// 业务员角色只能看到自己创建的数据
if(roleKeys.contains("ywyRole")){
sysSalesOrderVo.setApplyUser(curUser.getLoginName());
startPage();
list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
return getDataTable(list);
}
if(!roleKeys.contains("ywzjRole") && !roleKeys.contains("ywzjRole") && !roleKeys.contains("ywzjRole")){
sysSalesOrderVo.setApplyUser(curUser.getLoginName());
startPage();
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
}
}catch (NullPointerException e){
throw new NullPointerException("当前用户没有申请客户资料");
}
return getDataTable(list);
}
@ -398,7 +446,7 @@ public class SysSalesOrderController extends BaseController
public AjaxResult complete(@PathVariable("taskId") String taskId,@RequestParam(value = "saveEntity", required = false) String saveEntity,
@RequestParam(value = "salesOrderChildList", required = false) String salesOrderChildList,
@ModelAttribute("preloadObj") SysSalesOrderVo sysSalesOrderVo,HttpServletRequest request){
System.out.println("taskId = " + taskId + ", saveEntity = " + saveEntity + ", salesOrderChildList = " + salesOrderChildList + ", sysSalesOrderVo = " + sysSalesOrderVo + ", request = " + request);
// System.out.println("taskId = " + taskId + ", saveEntity = " + saveEntity + ", salesOrderChildList = " + salesOrderChildList + ", sysSalesOrderVo = " + sysSalesOrderVo + ", request = " + request);
sysSalesOrderVo.setSysSalesOrderChildList(JSON.parseArray(salesOrderChildList, SysSalesOrderChild.class));
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
if (saveEntityBoolean) {

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)

35
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -92,19 +92,19 @@ public class SysCustomerServiceImpl implements ISysCustomerService
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomerVo1);
Page<SysCustomerVo> returnList = new Page<>();
//PageHelper 仅对第一List分页有效
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomerVo1);
for(SysCustomerVo sysCustomerVo : list){
SysUser sysUser = userMapper.selectUserByLoginName(sysCustomerVo.getCreateBy());
for(SysCustomerVo sysCustomer : list){
SysUser sysUser = userMapper.selectUserByLoginName(sysCustomer.getCreateBy());
if (sysUser != null) {
sysCustomerVo.setCreateBy(sysUser.getUserName());
sysCustomer.setCreateBy(sysUser.getUserName());
}
SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomerVo.getApplyUser());
SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomer.getApplyUser());
if (sysUser2!=null){
sysCustomerVo.setApplyUserName(sysUser2.getUserName());
sysCustomer.setApplyUserName(sysUser2.getUserName());
}
String instanceId = sysCustomerVo.getInstanceId();
String instanceId = sysCustomer.getInstanceId();
// 当前环节
if (StringUtils.isNotBlank(instanceId)) {
List<Task> taskList = taskService.createTaskQuery()
@ -114,28 +114,27 @@ public class SysCustomerServiceImpl implements ISysCustomerService
if (!CollectionUtils.isEmpty(taskList)) {
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0);
String taskId = task.getId();
sysCustomerVo.setTaskId(taskId);
sysCustomer.setTaskId(taskId);
// 设置待办用户
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId);
if(!CollectionUtils.isEmpty(taskList)){
sysCustomerVo.setTodoUserId(String.join(",",todoUserList));
sysCustomer.setTodoUserId(String.join(",",todoUserList));
}
if (task.getSuspensionState() == 2) {
sysCustomerVo.setTaskName("已挂起");
sysCustomerVo.setSuspendState("2");
sysCustomer.setTaskName("已挂起");
sysCustomer.setSuspendState("2");
} else {
sysCustomerVo.setTaskName(task.getName());
sysCustomerVo.setSuspendState("1");
sysCustomer.setTaskName(task.getName());
sysCustomer.setSuspendState("1");
}
} else {
// 已办结或者已撤销
sysCustomerVo.setTaskName("已结束");
sysCustomer.setTaskName("已结束");
}
} else {
sysCustomer.setTaskName("未启动");
}
else {
sysCustomerVo.setTaskName("未启动");
}
returnList.add(sysCustomerVo);
returnList.add(sysCustomer);
}
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal());
returnList.setPageNum(pageNum);

4
ruoyi-admin/src/main/resources/templates/system/customer/add.html

@ -10,14 +10,14 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-add">
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label">客户ID</label>
<label class="col-sm-6 control-label">客户编号</label>
<div class="col-sm-6">
<input name="id" class="form-control" type="text" required >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码</label>
<label class="col-sm-6 control-label is-required">客户ID</label>
<div class="col-sm-6">
<input name="enterpriseCode" class="form-control" type="text" required>
</div>

6
ruoyi-admin/src/main/resources/templates/system/customer/detail.html

@ -10,13 +10,13 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-detail" th:object="${sysCustomer}">
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID</label>
<label class="col-sm-6 control-label is-required">客户编号</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
<input name="id" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码</label>
<label class="col-sm-6 control-label is-required">客户ID</label>
<div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div>

6
ruoyi-admin/src/main/resources/templates/system/customer/edit.html

@ -10,13 +10,13 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-edit" th:object="${sysCustomer}">
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label">客户ID</label>
<label class="col-sm-6 control-label">客户编号</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" required >
<input name="id" th:field="*{id}" class="form-control" type="number" required >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码</label>
<label class="col-sm-6 control-label is-required">客户ID</label>
<div class="col-sm-6">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html

@ -37,12 +37,6 @@
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html

@ -37,12 +37,6 @@
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskYwzgVerify.html

@ -38,12 +38,6 @@
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div>

6
ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html

@ -37,12 +37,6 @@
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div>

2
ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

@ -640,6 +640,8 @@
});
$("input[name='taxRate']").val(data.taxRate);
$("input[name='confirmFax']").val(data.confirmTax);
$("select[name='customerContact']").val(data.customerContact).trigger('change');
$("select[name='customerDelivery']").val(data.customerDelivery).trigger('change');
$("#commonCurrency_add").val(data.commonCurrency).trigger('change');
commonCurrency = $("#commonCurrency_add option:selected").val();
console.log("commonCurrency",commonCurrency);

16
ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html

@ -102,7 +102,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户联系人:</label>
<div class="col-sm-8">
<input id="customerContact_edit" name="customerContact" th:field="*{customerContact}" class="form-control m-b" required readonly />
<input id="customerContact_edit" name="customerContact" th:field="*{customerContact}" class="form-control" required readonly />
</div>
</div>
<div class="form-group">
@ -175,7 +175,7 @@
<label class="col-sm-3 control-label is-required">报价币种:</label>
<div class="col-sm-8">
<select class="form-control" id="commonCurrency_edit" name="commonCurrency"
th:with="dictList=${@dict.getType('sys_common_currency')}" th:field="*{commonCurrency}" required>
th:with="dictList=${@dict.getType('sys_common_currency')}" th:field="*{commonCurrency}">
<option value="">请选择</option>
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
</select>
@ -191,23 +191,23 @@
<label class="col-sm-3 control-label is-required">是否含税:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required type="radio" th:id="${'confirmTax_' + dict.dictCode}" th:field="*{confirmTax}"
name="confirmTax" th:value="${dict.dictValue}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" th:field="*{confirmTax}"
name="confirmTax" th:value="${dict.dictValue}" required>
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">税率:</label>
<label class="col-sm-3 control-label is-required">国内税率:</label>
<div class="col-sm-8">
<input name="taxRate" id="taxRate_edit" th:field="*{taxRate}" class="form-control" type="number" >
<input name="taxRate" id="taxRate_edit" th:field="*{taxRate}" class="form-control" type="number" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否开票:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input required type="radio" th:id="${'invoice_' + dict.dictCode}" th:field="*{invoice}"
<input type="radio" th:id="${'invoice_' + dict.dictCode}" th:field="*{invoice}" required
name="invoice" th:value="${dict.dictValue}">
<label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
@ -265,7 +265,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">业务员:</label>
<div class="col-sm-8">
<select name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" required>
<select name="businessMembers" class="form-control m-b" th:field="*{businessMembers}">
</select>
</div>
</div>

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