Browse Source

[feat]基础信息:添加报销单页面,报销单添加功能,添加编辑功能面。报价报销单报销分类表,报销单分类对象,报销单报销分类表查询方法,添加方法。

dev
zhangsiqi 6 months ago
parent
commit
49bb36869f
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java
  2. 151
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountChildController.java
  3. 155
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java
  4. 262
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java
  5. 184
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccountChild.java
  6. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderChildMapper.java
  7. 77
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountChildMapper.java
  8. 77
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountMapper.java
  9. 75
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountChildService.java
  10. 78
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java
  11. 84
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java
  12. 126
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountChildServiceImpl.java
  13. 136
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java
  14. 13
      ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderChildMapper.xml
  15. 133
      ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountChildMapper.xml
  16. 151
      ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml
  17. 175
      ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html
  18. 155
      ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html
  19. 183
      ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html
  20. 108
      ruoyi-admin/src/main/resources/templates/system/baseExpenseChild/add.html
  21. 163
      ruoyi-admin/src/main/resources/templates/system/baseExpenseChild/baseExpenseChild.html
  22. 103
      ruoyi-admin/src/main/resources/templates/system/baseExpenseChild/edit.html
  23. 6
      ruoyi-admin/src/main/resources/templates/system/empRequisiteOrderChild/empRequisiteOrderChild.html
  24. 67
      ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html

6
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java

@ -147,5 +147,9 @@ public class BaseEmpRequisiteOrderController extends BaseController
return toAjax(baseEmpRequisiteOrderService.restoreBaseEmpRequisiteOrderById(id));
}
@RequestMapping("/getId")
@ResponseBody
public AjaxResult getId(String requisiteId){
return AjaxResult.success(baseEmpRequisiteOrderService.getId());
}
}

151
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountChildController.java

@ -0,0 +1,151 @@
package com.ruoyi.system.controller;
import java.util.List;
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 com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.BaseExpenseAccountChild;
import com.ruoyi.system.service.IBaseExpenseAccountChildService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 报销单分类子Controller
*
* @author zhang
* @date 2024-05-20
*/
@Controller
@RequestMapping("/system/expenseChild")
public class BaseExpenseAccountChildController extends BaseController
{
private String prefix = "system/baseExpenseChild";
@Autowired
private IBaseExpenseAccountChildService baseExpenseAccountChildService;
// @RequiresPermissions("system:expenseChild:view")
@GetMapping()
public String expenseChild()
{
return prefix + "/baseExpenseChild";
}
/**
* 查询报销单分类子列表
*/
// @RequiresPermissions("system:expenseChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BaseExpenseAccountChild baseExpenseAccountChild)
{
startPage();
List<BaseExpenseAccountChild> list = baseExpenseAccountChildService.selectBaseExpenseAccountChildList(baseExpenseAccountChild);
return getDataTable(list);
}
/**
* 导出报销单分类子列表
*/
// @RequiresPermissions("system:expenseChild:export")
@Log(title = "报销单分类子", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BaseExpenseAccountChild baseExpenseAccountChild)
{
List<BaseExpenseAccountChild> list = baseExpenseAccountChildService.selectBaseExpenseAccountChildList(baseExpenseAccountChild);
ExcelUtil<BaseExpenseAccountChild> util = new ExcelUtil<BaseExpenseAccountChild>(BaseExpenseAccountChild.class);
return util.exportExcel(list, "报销单分类子数据");
}
/**
* 新增报销单分类子
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存报销单分类子
*/
// @RequiresPermissions("system:expenseChild:add")
@Log(title = "报销单分类子", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BaseExpenseAccountChild baseExpenseAccountChild)
{
return toAjax(baseExpenseAccountChildService.insertBaseExpenseAccountChild(baseExpenseAccountChild));
}
/**
* 修改报销单分类子
*/
@GetMapping("/edit/{expenseChildId}")
public String edit(@PathVariable("expenseChildId") Long expenseChildId, ModelMap mmap)
{
BaseExpenseAccountChild baseExpenseAccountChild = baseExpenseAccountChildService.selectBaseExpenseAccountChildById(expenseChildId);
mmap.put("baseExpenseAccountChild", baseExpenseAccountChild);
return prefix + "/edit";
}
/**
* 修改保存报销单分类子
*/
// @RequiresPermissions("system:expenseChild:edit")
@Log(title = "报销单分类子", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BaseExpenseAccountChild baseExpenseAccountChild)
{
return toAjax(baseExpenseAccountChildService.updateBaseExpenseAccountChild(baseExpenseAccountChild));
}
/**
* 删除报销单分类子
*/
// @RequiresPermissions("system:expenseChild:remove")
@Log(title = "报销单分类子", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(baseExpenseAccountChildService.deleteBaseExpenseAccountChildByIds(ids));
}
/**
* 作废报销单分类子
*/
// @RequiresPermissions("system:expenseChild:cancel")
@Log(title = "报销单分类子", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(baseExpenseAccountChildService.cancelBaseExpenseAccountChildById(id));
}
/**
* 恢复报销单分类子
*/
// @RequiresPermissions("system:expenseChild:restore")
@Log(title = "报销单分类子", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(baseExpenseAccountChildService.restoreBaseExpenseAccountChildById(id));
}
}

155
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java

@ -0,0 +1,155 @@
package com.ruoyi.system.controller;
import java.util.List;
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 com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.BaseExpenseAccount;
import com.ruoyi.system.service.IBaseExpenseAccountService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 报销单Controller
*
* @author zhang
* @date 2024-05-20
*/
@Controller
@RequestMapping("/system/baseExpense")
public class BaseExpenseAccountController extends BaseController
{
private String prefix = "system/baseExpense";
@Autowired
private IBaseExpenseAccountService baseExpenseAccountService;
@RequiresPermissions("system:baseExpense:view")
@GetMapping()
public String baseExpense()
{
return prefix + "/baseExpense";
}
/**
* 查询报销单列表
*/
@RequiresPermissions("system:baseExpense:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BaseExpenseAccount baseExpenseAccount)
{
startPage();
List<BaseExpenseAccount> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount);
return getDataTable(list);
}
/**
* 导出报销单列表
*/
@RequiresPermissions("system:baseExpense:export")
@Log(title = "报销单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BaseExpenseAccount baseExpenseAccount)
{
List<BaseExpenseAccount> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount);
ExcelUtil<BaseExpenseAccount> util = new ExcelUtil<BaseExpenseAccount>(BaseExpenseAccount.class);
return util.exportExcel(list, "报销单数据");
}
/**
* 新增报销单
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存报销单
*/
@RequiresPermissions("system:baseExpense:add")
@Log(title = "报销单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BaseExpenseAccount baseExpenseAccount)
{
return toAjax(baseExpenseAccountService.insertBaseExpenseAccount(baseExpenseAccount));
}
/**
* 修改报销单
*/
@GetMapping("/edit/{expenseId}")
public String edit(@PathVariable("expenseId") Long expenseId, ModelMap mmap)
{
BaseExpenseAccount baseExpenseAccount = baseExpenseAccountService.selectBaseExpenseAccountById(expenseId);
mmap.put("baseExpenseAccount", baseExpenseAccount);
return prefix + "/edit";
}
/**
* 修改保存报销单
*/
@RequiresPermissions("system:baseExpense:edit")
@Log(title = "报销单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BaseExpenseAccount baseExpenseAccount)
{
return toAjax(baseExpenseAccountService.updateBaseExpenseAccount(baseExpenseAccount));
}
/**
* 删除报销单
*/
@RequiresPermissions("system:baseExpense:remove")
@Log(title = "报销单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(baseExpenseAccountService.deleteBaseExpenseAccountByIds(ids));
}
/**
* 作废报销单
*/
@RequiresPermissions("system:baseExpense:cancel")
@Log(title = "报销单", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(baseExpenseAccountService.cancelBaseExpenseAccountById(id));
}
/**
* 恢复报销单
*/
@RequiresPermissions("system:baseExpense:restore")
@Log(title = "报销单", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(baseExpenseAccountService.restoreBaseExpenseAccountById(id));
}
@RequestMapping("/getId")
@ResponseBody
public AjaxResult getId(){
return AjaxResult.success(baseExpenseAccountService.getId());
}
}

262
ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java

@ -0,0 +1,262 @@
package com.ruoyi.system.domain;
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;
/**
* 报销单对象 base_emp_expense_account
*
* @author zhang
* @date 2024-05-20
*/
public class BaseExpenseAccount extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 报销单索引id */
private Long expenseId;
/** 上级审核状态 */
@Excel(name = "上级审核状态")
private String auditStatus;
/** 总经理审核状态 */
@Excel(name = "总经理审核状态")
private String managerAuditStatus;
/** 财务审核状态 */
@Excel(name = "财务审核状态")
private String financeAuditStatus;
/** 报销单编号 */
@Excel(name = "报销单编号")
private String expenseCode;
/** 部门 */
@Excel(name = "部门")
private String deptName;
/** 岗位 */
@Excel(name = "岗位")
private String postName;
/** 姓名 */
@Excel(name = "姓名")
private String fullName;
/** 报销方式 */
@Excel(name = "报销方式")
private String expenseMethod;
/** 是否是委外/采购采销 */
@Excel(name = "是否是委外/采购采销")
private String isPurchaseOutsource;
/** 供应商ID */
@Excel(name = "供应商ID")
private String supplierCode;
/** 对公收款方 */
@Excel(name = "对公收款方")
private String corporatePayee;
/** 对公收款账户 */
@Excel(name = "对公收款账户")
private String corporateReceivingAccount;
/** 对公开户行 */
@Excel(name = "对公开户行")
private String publicAccountBanks;
/** 申请人 */
@Excel(name = "申请人")
private String applyUser;
/** 使用状态 */
@Excel(name = "使用状态")
private String useStatus;
private String del_flag;
public String getDel_flag() {
return del_flag;
}
public void setDel_flag(String del_flag) {
this.del_flag = del_flag;
}
public void setExpenseId(Long expenseId)
{
this.expenseId = expenseId;
}
public Long getExpenseId()
{
return expenseId;
}
public void setAuditStatus(String auditStatus)
{
this.auditStatus = auditStatus;
}
public String getAuditStatus()
{
return auditStatus;
}
public void setManagerAuditStatus(String managerAuditStatus)
{
this.managerAuditStatus = managerAuditStatus;
}
public String getManagerAuditStatus()
{
return managerAuditStatus;
}
public void setFinanceAuditStatus(String financeAuditStatus)
{
this.financeAuditStatus = financeAuditStatus;
}
public String getFinanceAuditStatus()
{
return financeAuditStatus;
}
public void setExpenseCode(String expenseCode)
{
this.expenseCode = expenseCode;
}
public String getExpenseCode()
{
return expenseCode;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getDeptName()
{
return deptName;
}
public void setPostName(String postName)
{
this.postName = postName;
}
public String getPostName()
{
return postName;
}
public void setFullName(String fullName)
{
this.fullName = fullName;
}
public String getFullName()
{
return fullName;
}
public void setExpenseMethod(String expenseMethod)
{
this.expenseMethod = expenseMethod;
}
public String getExpenseMethod()
{
return expenseMethod;
}
public void setIsPurchaseOutsource(String isPurchaseOutsource)
{
this.isPurchaseOutsource = isPurchaseOutsource;
}
public String getIsPurchaseOutsource()
{
return isPurchaseOutsource;
}
public void setSupplierCode(String supplierCode)
{
this.supplierCode = supplierCode;
}
public String getSupplierCode()
{
return supplierCode;
}
public void setCorporatePayee(String corporatePayee)
{
this.corporatePayee = corporatePayee;
}
public String getCorporatePayee()
{
return corporatePayee;
}
public void setCorporateReceivingAccount(String corporateReceivingAccount)
{
this.corporateReceivingAccount = corporateReceivingAccount;
}
public String getCorporateReceivingAccount()
{
return corporateReceivingAccount;
}
public void setPublicAccountBanks(String publicAccountBanks)
{
this.publicAccountBanks = publicAccountBanks;
}
public String getPublicAccountBanks()
{
return publicAccountBanks;
}
public void setApplyUser(String applyUser)
{
this.applyUser = applyUser;
}
public String getApplyUser()
{
return applyUser;
}
public void setUseStatus(String useStatus)
{
this.useStatus = useStatus;
}
public String getUseStatus()
{
return useStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("expenseId", getExpenseId())
.append("auditStatus", getAuditStatus())
.append("managerAuditStatus", getManagerAuditStatus())
.append("financeAuditStatus", getFinanceAuditStatus())
.append("expenseCode", getExpenseCode())
.append("deptName", getDeptName())
.append("postName", getPostName())
.append("fullName", getFullName())
.append("expenseMethod", getExpenseMethod())
.append("isPurchaseOutsource", getIsPurchaseOutsource())
.append("supplierCode", getSupplierCode())
.append("corporatePayee", getCorporatePayee())
.append("corporateReceivingAccount", getCorporateReceivingAccount())
.append("publicAccountBanks", getPublicAccountBanks())
.append("applyUser", getApplyUser())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("useStatus", getUseStatus())
.toString();
}
}

184
ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccountChild.java

@ -0,0 +1,184 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 报销单分类子对象 base_expense_account_child
*
* @author zhang
* @date 2024-05-20
*/
public class BaseExpenseAccountChild extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 报销单分项子表 */
private Long expenseChildId;
/** 关联报销单号 */
@Excel(name = "关联报销单号")
private String quoteId;
/** 成本类型 */
@Excel(name = "成本类型")
private String costType;
/** 成本小类 */
@Excel(name = "成本小类")
private String costSmallType;
/** 用途 */
@Excel(name = "用途")
private String purpose;
/** 金额 */
@Excel(name = "金额")
private String amounts;
/** 报销时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报销时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date expenseTime;
/** 出差单号 */
@Excel(name = "出差单号")
private String evectionCode;
/** 采购单号 */
@Excel(name = "采购单号")
private String purcahseCode;
/** 委外单号 */
@Excel(name = "委外单号")
private String outsourceCode;
/** 删除状态 */
private String delFlag;
public void setExpenseChildId(Long expenseChildId)
{
this.expenseChildId = expenseChildId;
}
public Long getExpenseChildId()
{
return expenseChildId;
}
public void setQuoteId(String quoteId)
{
this.quoteId = quoteId;
}
public String getQuoteId()
{
return quoteId;
}
public void setCostType(String costType)
{
this.costType = costType;
}
public String getCostType()
{
return costType;
}
public void setCostSmallType(String costSmallType)
{
this.costSmallType = costSmallType;
}
public String getCostSmallType()
{
return costSmallType;
}
public void setPurpose(String purpose)
{
this.purpose = purpose;
}
public String getPurpose()
{
return purpose;
}
public void setAmounts(String amounts)
{
this.amounts = amounts;
}
public String getAmounts()
{
return amounts;
}
public void setExpenseTime(Date expenseTime)
{
this.expenseTime = expenseTime;
}
public Date getExpenseTime()
{
return expenseTime;
}
public void setEvectionCode(String evectionCode)
{
this.evectionCode = evectionCode;
}
public String getEvectionCode()
{
return evectionCode;
}
public void setPurcahseCode(String purcahseCode)
{
this.purcahseCode = purcahseCode;
}
public String getPurcahseCode()
{
return purcahseCode;
}
public void setOutsourceCode(String outsourceCode)
{
this.outsourceCode = outsourceCode;
}
public String getOutsourceCode()
{
return outsourceCode;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("expenseChildId", getExpenseChildId())
.append("quoteId", getQuoteId())
.append("cost type", getCostType())
.append("costSmallType", getCostSmallType())
.append("purpose", getPurpose())
.append("amounts", getAmounts())
.append("expenseTime", getExpenseTime())
.append("evectionCode", getEvectionCode())
.append("purcahseCode", getPurcahseCode())
.append("outsourceCode", getOutsourceCode())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("delFlag", getDelFlag())
.append("remark", getRemark())
.toString();
}
}

5
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderChildMapper.java

@ -51,6 +51,10 @@ public interface BaseEmpRequisiteOrderChildMapper
*/
public int deleteBaseEmpRequisiteOrderChildById(Long requisitioningChildId);
public int deleteBaseEmpRequisiteOrderChildByCode(String code);
public int deleteBaseEmpRequisiteOrderChildByCodes(String[] codes);
/**
* 批量删除员工单领料单物料信息
*
@ -59,6 +63,7 @@ public interface BaseEmpRequisiteOrderChildMapper
*/
public int deleteBaseEmpRequisiteOrderChildByIds(String[] requisitioningChildIds);
/**
* 作废员工单领料单物料信息
*

77
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountChildMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.BaseExpenseAccountChild;
/**
* 报销单分类子Mapper接口
*
* @author zhang
* @date 2024-05-20
*/
public interface BaseExpenseAccountChildMapper
{
/**
* 查询报销单分类子
*
* @param expenseChildId 报销单分类子ID
* @return 报销单分类子
*/
public BaseExpenseAccountChild selectBaseExpenseAccountChildById(Long expenseChildId);
/**
* 查询报销单分类子列表
*
* @param baseExpenseAccountChild 报销单分类子
* @return 报销单分类子集合
*/
public List<BaseExpenseAccountChild> selectBaseExpenseAccountChildList(BaseExpenseAccountChild baseExpenseAccountChild);
/**
* 新增报销单分类子
*
* @param baseExpenseAccountChild 报销单分类子
* @return 结果
*/
public int insertBaseExpenseAccountChild(BaseExpenseAccountChild baseExpenseAccountChild);
/**
* 修改报销单分类子
*
* @param baseExpenseAccountChild 报销单分类子
* @return 结果
*/
public int updateBaseExpenseAccountChild(BaseExpenseAccountChild baseExpenseAccountChild);
/**
* 删除报销单分类子
*
* @param expenseChildId 报销单分类子ID
* @return 结果
*/
public int deleteBaseExpenseAccountChildById(Long expenseChildId);
/**
* 批量删除报销单分类子
*
* @param expenseChildIds 需要删除的数据ID
* @return 结果
*/
public int deleteBaseExpenseAccountChildByIds(String[] expenseChildIds);
/**
* 作废报销单分类子
*
* @param expenseChildId 报销单分类子ID
* @return 结果
*/
public int cancelBaseExpenseAccountChildById(Long expenseChildId);
/**
* 恢复报销单分类子
*
* @param expenseChildId 报销单分类子ID
* @return 结果
*/
public int restoreBaseExpenseAccountChildById(Long expenseChildId);
}

77
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.BaseExpenseAccount;
/**
* 报销单Mapper接口
*
* @author zhang
* @date 2024-05-20
*/
public interface BaseExpenseAccountMapper
{
/**
* 查询报销单
*
* @param expenseId 报销单ID
* @return 报销单
*/
public BaseExpenseAccount selectBaseExpenseAccountById(Long expenseId);
/**
* 查询报销单列表
*
* @param baseExpenseAccount 报销单
* @return 报销单集合
*/
public List<BaseExpenseAccount> selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount);
/**
* 新增报销单
*
* @param baseExpenseAccount 报销单
* @return 结果
*/
public int insertBaseExpenseAccount(BaseExpenseAccount baseExpenseAccount);
/**
* 修改报销单
*
* @param baseExpenseAccount 报销单
* @return 结果
*/
public int updateBaseExpenseAccount(BaseExpenseAccount baseExpenseAccount);
/**
* 删除报销单
*
* @param expenseId 报销单ID
* @return 结果
*/
public int deleteBaseExpenseAccountById(Long expenseId);
/**
* 批量删除报销单
*
* @param expenseIds 需要删除的数据ID
* @return 结果
*/
public int deleteBaseExpenseAccountByIds(String[] expenseIds);
/**
* 作废报销单
*
* @param expenseId 报销单ID
* @return 结果
*/
public int cancelBaseExpenseAccountById(Long expenseId);
/**
* 恢复报销单
*
* @param expenseId 报销单ID
* @return 结果
*/
public int restoreBaseExpenseAccountById(Long expenseId);
}

75
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountChildService.java

@ -0,0 +1,75 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.BaseExpenseAccountChild;
/**
* 报销单分类子Service接口
*
* @author zhang
* @date 2024-05-20
*/
public interface IBaseExpenseAccountChildService
{
/**
* 查询报销单分类子
*
* @param expenseChildId 报销单分类子ID
* @return 报销单分类子
*/
public BaseExpenseAccountChild selectBaseExpenseAccountChildById(Long expenseChildId);
/**
* 查询报销单分类子列表
*
* @param baseExpenseAccountChild 报销单分类子
* @return 报销单分类子集合
*/
public List<BaseExpenseAccountChild> selectBaseExpenseAccountChildList(BaseExpenseAccountChild baseExpenseAccountChild);
/**
* 新增报销单分类子
*
* @param baseExpenseAccountChild 报销单分类子
* @return 结果
*/
public int insertBaseExpenseAccountChild(BaseExpenseAccountChild baseExpenseAccountChild);
/**
* 修改报销单分类子
*
* @param baseExpenseAccountChild 报销单分类子
* @return 结果
*/
public int updateBaseExpenseAccountChild(BaseExpenseAccountChild baseExpenseAccountChild);
/**
* 批量删除报销单分类子
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBaseExpenseAccountChildByIds(String ids);
/**
* 删除报销单分类子信息
*
* @param expenseChildId 报销单分类子ID
* @return 结果
*/
public int deleteBaseExpenseAccountChildById(Long expenseChildId);
/**
* 作废报销单分类子
* @param expenseChildId 报销单分类子ID
* @return
*/
int cancelBaseExpenseAccountChildById(Long expenseChildId);
/**
* 恢复报销单分类子
* @param expenseChildId 报销单分类子ID
* @return
*/
int restoreBaseExpenseAccountChildById(Long expenseChildId);
}

78
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java

@ -0,0 +1,78 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.BaseExpenseAccount;
/**
* 报销单Service接口
*
* @author zhang
* @date 2024-05-20
*/
public interface IBaseExpenseAccountService
{
/**
* 查询报销单
*
* @param expenseId 报销单ID
* @return 报销单
*/
public BaseExpenseAccount selectBaseExpenseAccountById(Long expenseId);
/**
* 查询报销单列表
*
* @param baseExpenseAccount 报销单
* @return 报销单集合
*/
public List<BaseExpenseAccount> selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount);
/**
* 新增报销单
*
* @param baseExpenseAccount 报销单
* @return 结果
*/
public int insertBaseExpenseAccount(BaseExpenseAccount baseExpenseAccount);
/**
* 修改报销单
*
* @param baseExpenseAccount 报销单
* @return 结果
*/
public int updateBaseExpenseAccount(BaseExpenseAccount baseExpenseAccount);
/**
* 批量删除报销单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBaseExpenseAccountByIds(String ids);
/**
* 删除报销单信息
*
* @param expenseId 报销单ID
* @return 结果
*/
public int deleteBaseExpenseAccountById(Long expenseId);
/**
* 作废报销单
* @param expenseId 报销单ID
* @return
*/
int cancelBaseExpenseAccountById(Long expenseId);
/**
* 恢复报销单
* @param expenseId 报销单ID
* @return
*/
int restoreBaseExpenseAccountById(Long expenseId);
public Object getId();
}

84
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java

@ -1,14 +1,23 @@
package com.ruoyi.system.service.impl;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.BaseEmpRequisiteOrderChild;
import com.ruoyi.system.domain.BaseRequisitioningOrderChild;
import com.ruoyi.system.mapper.BaseEmpRequisiteOrderChildMapper;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseEmpRequisiteOrderMapper;
import com.ruoyi.system.domain.BaseEmpRequisiteOrder;
import com.ruoyi.system.service.IBaseEmpRequisiteOrderService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
/**
* 员工领料单Service业务层处理
@ -21,6 +30,14 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS
{
@Autowired
private BaseEmpRequisiteOrderMapper baseEmpRequisiteOrderMapper;
@Autowired
private BaseEmpRequisiteOrderChildMapper baseEmpRequisiteOrderChildMapper;
@Autowired
private RedisCache redisCache;
@Autowired
private ISysUserService userService;
/**
* 查询员工领料单
@ -53,11 +70,41 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS
* @return 结果
*/
@Override
@Transactional(rollbackFor = NullPointerException.class)
public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder)
{
String loginName = ShiroUtils.getLoginName();
baseEmpRequisiteOrder.setCreateBy(loginName);
baseEmpRequisiteOrder.setCreateTime(DateUtils.getNowDate());
if (baseEmpRequisiteOrder.getRequisitieCode() == null) {
baseEmpRequisiteOrder.setRequisitieCode(redisCache.generateBillNo("QG"));
}
List<BaseEmpRequisiteOrderChild> childList = baseEmpRequisiteOrder.getBaseEmpRequisiteOrderChildList();
Long materialSum = 0L;
BigDecimal materialRmbSum = new BigDecimal(0);
BigDecimal materialNoRmbSum = new BigDecimal(0);
//物料合计
Integer childSize = childList.size();
if (childSize > 0) {
for (BaseEmpRequisiteOrderChild child : childList) {
//物料数量
materialSum += child.getMaterialNum();
//物料不含税总价(RMB)
materialRmbSum = child.getMaterialRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
//物料含税总价(RMB)
materialNoRmbSum = child.getMaterialNoRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
child.setQuoteId(baseEmpRequisiteOrder.getRequisitieCode());
child.setCreateBy(loginName);
child.setCreateTime(DateUtils.getNowDate());
baseEmpRequisiteOrderChildMapper.insertBaseEmpRequisiteOrderChild(child);
}
}
baseEmpRequisiteOrder.setAuditStatus("1");
baseEmpRequisiteOrder.setUseStatus("1");
baseEmpRequisiteOrder.setMaterialAmount(Long.valueOf(childSize));
baseEmpRequisiteOrder.setMaterialSum(materialSum);
baseEmpRequisiteOrder.setRmbSum(materialRmbSum);
baseEmpRequisiteOrder.setNoRmbSum(materialNoRmbSum);
return baseEmpRequisiteOrderMapper.insertBaseEmpRequisiteOrder(baseEmpRequisiteOrder);
}
@ -68,11 +115,42 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS
* @return 结果
*/
@Override
@Transactional(rollbackFor = NullPointerException.class)
public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder)
{
String loginName = ShiroUtils.getLoginName();
baseEmpRequisiteOrder.setUpdateBy(loginName);
baseEmpRequisiteOrder.setUpdateTime(DateUtils.getNowDate());
baseEmpRequisiteOrderChildMapper.deleteBaseEmpRequisiteOrderChildByCode(baseEmpRequisiteOrder.getRequisitieCode());
if (baseEmpRequisiteOrder.getRequisitieCode() == null) {
baseEmpRequisiteOrder.setRequisitieCode(redisCache.generateBillNo("QG"));
}
List<BaseEmpRequisiteOrderChild> childList = baseEmpRequisiteOrder.getBaseEmpRequisiteOrderChildList();
Long materialSum = 0L;
BigDecimal materialRmbSum = new BigDecimal(0);
BigDecimal materialNoRmbSum = new BigDecimal(0);
//物料合计
Integer childSize = childList.size();
if (childSize > 0) {
for (BaseEmpRequisiteOrderChild child : childList) {
//物料数量
materialSum += child.getMaterialNum();
//物料不含税总价(RMB)
materialRmbSum = child.getMaterialRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
//物料含税总价(RMB)
materialNoRmbSum = child.getMaterialNoRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum);
child.setQuoteId(baseEmpRequisiteOrder.getRequisitieCode());
child.setCreateBy(loginName);
child.setCreateTime(DateUtils.getNowDate());
baseEmpRequisiteOrderChildMapper.insertBaseEmpRequisiteOrderChild(child);
}
}
baseEmpRequisiteOrder.setAuditStatus("1");
baseEmpRequisiteOrder.setUseStatus("1");
baseEmpRequisiteOrder.setMaterialAmount(Long.valueOf(childSize));
baseEmpRequisiteOrder.setMaterialSum(materialSum);
baseEmpRequisiteOrder.setRmbSum(materialRmbSum);
baseEmpRequisiteOrder.setNoRmbSum(materialNoRmbSum);
return baseEmpRequisiteOrderMapper.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrder);
}
@ -123,4 +201,10 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS
{
return baseEmpRequisiteOrderMapper.restoreBaseEmpRequisiteOrderById(requisiteId);
}
//todo 生成员工领料单编号
@Override
public Object getId() {
return redisCache.generateBillNo("YGLL");
}
}

126
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountChildServiceImpl.java

@ -0,0 +1,126 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseExpenseAccountChildMapper;
import com.ruoyi.system.domain.BaseExpenseAccountChild;
import com.ruoyi.system.service.IBaseExpenseAccountChildService;
import com.ruoyi.common.core.text.Convert;
/**
* 报销单分类子Service业务层处理
*
* @author zhang
* @date 2024-05-20
*/
@Service
public class BaseExpenseAccountChildServiceImpl implements IBaseExpenseAccountChildService
{
@Autowired
private BaseExpenseAccountChildMapper baseExpenseAccountChildMapper;
/**
* 查询报销单分类子
*
* @param expenseChildId 报销单分类子ID
* @return 报销单分类子
*/
@Override
public BaseExpenseAccountChild selectBaseExpenseAccountChildById(Long expenseChildId)
{
return baseExpenseAccountChildMapper.selectBaseExpenseAccountChildById(expenseChildId);
}
/**
* 查询报销单分类子列表
*
* @param baseExpenseAccountChild 报销单分类子
* @return 报销单分类子
*/
@Override
public List<BaseExpenseAccountChild> selectBaseExpenseAccountChildList(BaseExpenseAccountChild baseExpenseAccountChild)
{
return baseExpenseAccountChildMapper.selectBaseExpenseAccountChildList(baseExpenseAccountChild);
}
/**
* 新增报销单分类子
*
* @param baseExpenseAccountChild 报销单分类子
* @return 结果
*/
@Override
public int insertBaseExpenseAccountChild(BaseExpenseAccountChild baseExpenseAccountChild)
{
baseExpenseAccountChild.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName();
baseExpenseAccountChild.setCreateBy(loginName);
return baseExpenseAccountChildMapper.insertBaseExpenseAccountChild(baseExpenseAccountChild);
}
/**
* 修改报销单分类子
*
* @param baseExpenseAccountChild 报销单分类子
* @return 结果
*/
@Override
public int updateBaseExpenseAccountChild(BaseExpenseAccountChild baseExpenseAccountChild)
{
String loginName = ShiroUtils.getLoginName();
baseExpenseAccountChild.setUpdateBy(loginName);
baseExpenseAccountChild.setUpdateTime(DateUtils.getNowDate());
return baseExpenseAccountChildMapper.updateBaseExpenseAccountChild(baseExpenseAccountChild);
}
/**
* 删除报销单分类子对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteBaseExpenseAccountChildByIds(String ids)
{
return baseExpenseAccountChildMapper.deleteBaseExpenseAccountChildByIds(Convert.toStrArray(ids));
}
/**
* 删除报销单分类子信息
*
* @param expenseChildId 报销单分类子ID
* @return 结果
*/
@Override
public int deleteBaseExpenseAccountChildById(Long expenseChildId)
{
return baseExpenseAccountChildMapper.deleteBaseExpenseAccountChildById(expenseChildId);
}
/**
* 作废报销单分类子
*
* @param expenseChildId 报销单分类子ID
* @return 结果
*/
@Override
public int cancelBaseExpenseAccountChildById(Long expenseChildId)
{
return baseExpenseAccountChildMapper.cancelBaseExpenseAccountChildById(expenseChildId);
}
/**
* 恢复报销单分类子信息
*
* @param expenseChildId 报销单分类子ID
* @return 结果
*/
@Override
public int restoreBaseExpenseAccountChildById(Long expenseChildId)
{
return baseExpenseAccountChildMapper.restoreBaseExpenseAccountChildById(expenseChildId);
}
}

136
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java

@ -0,0 +1,136 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseExpenseAccountMapper;
import com.ruoyi.system.domain.BaseExpenseAccount;
import com.ruoyi.system.service.IBaseExpenseAccountService;
import com.ruoyi.common.core.text.Convert;
/**
* 报销单Service业务层处理
*
* @author zhang
* @date 2024-05-20
*/
@Service
public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
{
@Autowired
private BaseExpenseAccountMapper baseExpenseAccountMapper;
@Autowired
private RedisCache redisCache;
/**
* 查询报销单
*
* @param expenseId 报销单ID
* @return 报销单
*/
@Override
public BaseExpenseAccount selectBaseExpenseAccountById(Long expenseId)
{
return baseExpenseAccountMapper.selectBaseExpenseAccountById(expenseId);
}
/**
* 查询报销单列表
*
* @param baseExpenseAccount 报销单
* @return 报销单
*/
@Override
public List<BaseExpenseAccount> selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount)
{
return baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount);
}
/**
* 新增报销单
*
* @param baseExpenseAccount 报销单
* @return 结果
*/
@Override
public int insertBaseExpenseAccount(BaseExpenseAccount baseExpenseAccount)
{
String loginName = ShiroUtils.getLoginName();
baseExpenseAccount.setCreateBy(loginName);
baseExpenseAccount.setCreateTime(DateUtils.getNowDate());
return baseExpenseAccountMapper.insertBaseExpenseAccount(baseExpenseAccount);
}
/**
* 修改报销单
*
* @param baseExpenseAccount 报销单
* @return 结果
*/
@Override
public int updateBaseExpenseAccount(BaseExpenseAccount baseExpenseAccount)
{
String loginName = ShiroUtils.getLoginName();
baseExpenseAccount.setUpdateBy(loginName);
baseExpenseAccount.setUpdateTime(DateUtils.getNowDate());
return baseExpenseAccountMapper.updateBaseExpenseAccount(baseExpenseAccount);
}
/**
* 删除报销单对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteBaseExpenseAccountByIds(String ids)
{
return baseExpenseAccountMapper.deleteBaseExpenseAccountByIds(Convert.toStrArray(ids));
}
/**
* 删除报销单信息
*
* @param expenseId 报销单ID
* @return 结果
*/
@Override
public int deleteBaseExpenseAccountById(Long expenseId)
{
return baseExpenseAccountMapper.deleteBaseExpenseAccountById(expenseId);
}
/**
* 作废报销单
*
* @param expenseId 报销单ID
* @return 结果
*/
@Override
public int cancelBaseExpenseAccountById(Long expenseId)
{
return baseExpenseAccountMapper.cancelBaseExpenseAccountById(expenseId);
}
/**
* 恢复报销单信息
*
* @param expenseId 报销单ID
* @return 结果
*/
@Override
public int restoreBaseExpenseAccountById(Long expenseId)
{
return baseExpenseAccountMapper.restoreBaseExpenseAccountById(expenseId);
}
@Override
public Object getId() {
return redisCache.generateBillNo("BX");
}
}

13
ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderChildMapper.xml

@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialModel != null">material_model = #{materialModel},</if>
<if test="specifications != null">specifications = #{specifications},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="describe != null">describe = #{describe},</if>
<if test="describe != null">`describe` = #{describe},</if>
<if test="materialNum != null">materialNum = #{materialNum},</if>
<if test="materialRmb != null">materialRmb = #{materialRmb},</if>
<if test="materialNoRmb != null">materialNoRmb = #{materialNoRmb},</if>
@ -146,14 +146,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteBaseEmpRequisiteOrderChildById" parameterType="Long">
delete from base_emp_requisite_order_child where requisitioning_child_id = #{requisitioningChildId}
</delete>
<delete id="deleteBaseEmpRequisiteOrderChildByCode" parameterType="Long">
delete from base_emp_requisite_order_child where quote_id = #{code}
</delete>
<delete id="deleteBaseEmpRequisiteOrderChildByIds" parameterType="String">
delete from base_emp_requisite_order_child where requisitioning_child_id in
<foreach item="requisitioningChildId" collection="array" open="(" separator="," close=")">
#{requisitioningChildId}
</foreach>
</delete>
<delete id="deleteBaseEmpRequisiteOrderChildByCodes" parameterType="String">
delete from base_emp_requisite_order_child where requisitioning_child_id in
<foreach item="code" collection="array" open="(" separator="," close=")">
#{code}
</foreach>
</delete>
<update id="cancelBaseEmpRequisiteOrderChildById" parameterType="Long">
update base_emp_requisite_order_child set del_flag = '1' where requisitioning_child_id = #{requisitioningChildId}
</update>

133
ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountChildMapper.xml

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BaseExpenseAccountChildMapper">
<resultMap type="BaseExpenseAccountChild" id="BaseExpenseAccountChildResult">
<result property="expenseChildId" column="expense_child_id" />
<result property="quoteId" column="quote_id" />
<result property="costType" column="cost_type" />
<result property="costSmallType" column="cost_small_type" />
<result property="purpose" column="purpose" />
<result property="amounts" column="amounts" />
<result property="expenseTime" column="expense_time" />
<result property="evectionCode" column="evection_code" />
<result property="purcahseCode" column="purcahse_code" />
<result property="outsourceCode" column="outsource_code" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectBaseExpenseAccountChildVo">
select expense_child_id, quote_id, cost_type, cost_small_type,
purpose, amounts, expense_time, evection_code, purcahse_code,
outsource_code, create_time, create_by, update_by, update_time,
del_flag, remark
from base_expense_account_child
</sql>
<select id="selectBaseExpenseAccountChildList" parameterType="BaseExpenseAccountChild" resultMap="BaseExpenseAccountChildResult">
<include refid="selectBaseExpenseAccountChildVo"/>
<where>
<if test="quoteId != null and quoteId != ''"> and quote_id = #{quoteId}</if>
<if test="cost type != null and cost type != ''"> and cost_type = #{costType}</if>
<if test="costSmallType != null and costSmallType != ''"> and cost_small_type = #{costSmallType}</if>
<if test="purpose != null and purpose != ''"> and purpose = #{purpose}</if>
<if test="amounts != null and amounts != ''"> and amounts = #{amounts}</if>
<if test="expenseTime != null "> and expense_time = #{expenseTime}</if>
<if test="evectionCode != null and evectionCode != ''"> and evection_code = #{evectionCode}</if>
<if test="purcahseCode != null and purcahseCode != ''"> and purcahse_code = #{purcahseCode}</if>
<if test="outsourceCode != null and outsourceCode != ''"> and outsource_code = #{outsourceCode}</if>
</where>
</select>
<select id="selectBaseExpenseAccountChildById" parameterType="Long" resultMap="BaseExpenseAccountChildResult">
<include refid="selectBaseExpenseAccountChildVo"/>
where expense_child_id = #{expenseChildId}
</select>
<insert id="insertBaseExpenseAccountChild" parameterType="BaseExpenseAccountChild" useGeneratedKeys="true" keyProperty="expenseChildId">
insert into base_expense_account_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quoteId != null">quote_id,</if>
<if test="cost type != null">cost_type,</if>
<if test="costSmallType != null">cost_small_type,</if>
<if test="purpose != null">purpose,</if>
<if test="amounts != null">amounts,</if>
<if test="expenseTime != null">expense_time,</if>
<if test="evectionCode != null">evection_code,</if>
<if test="purcahseCode != null">purcahse_code,</if>
<if test="outsourceCode != null">outsource_code,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quoteId != null">#{quoteId},</if>
<if test="cost type != null">#{costType},</if>
<if test="costSmallType != null">#{costSmallType},</if>
<if test="purpose != null">#{purpose},</if>
<if test="amounts != null">#{amounts},</if>
<if test="expenseTime != null">#{expenseTime},</if>
<if test="evectionCode != null">#{evectionCode},</if>
<if test="purcahseCode != null">#{purcahseCode},</if>
<if test="outsourceCode != null">#{outsourceCode},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBaseExpenseAccountChild" parameterType="BaseExpenseAccountChild">
update base_expense_account_child
<trim prefix="SET" suffixOverrides=",">
<if test="quoteId != null">quote_id = #{quoteId},</if>
<if test="cost type != null">cost_type = #{costType},</if>
<if test="costSmallType != null">cost_small_type = #{costSmallType},</if>
<if test="purpose != null">purpose = #{purpose},</if>
<if test="amounts != null">amounts = #{amounts},</if>
<if test="expenseTime != null">expense_time = #{expenseTime},</if>
<if test="evectionCode != null">evection_code = #{evectionCode},</if>
<if test="purcahseCode != null">purcahse_code = #{purcahseCode},</if>
<if test="outsourceCode != null">outsource_code = #{outsourceCode},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where expense_child_id = #{expenseChildId}
</update>
<delete id="deleteBaseExpenseAccountChildById" parameterType="Long">
delete from base_expense_account_child where expense_child_id = #{expenseChildId}
</delete>
<delete id="deleteBaseExpenseAccountChildByIds" parameterType="String">
delete from base_expense_account_child where expense_child_id in
<foreach item="expenseChildId" collection="array" open="(" separator="," close=")">
#{expenseChildId}
</foreach>
</delete>
<update id="cancelBaseExpenseAccountChildById" parameterType="Long">
update base_expense_account_child set del_flag = '1' where expense_child_id = #{expenseChildId}
</update>
<update id="restoreBaseExpenseAccountChildById" parameterType="Long">
update base_expense_account_child set del_flag = '0' where expense_child_id = #{expenseChildId}
</update>
</mapper>

151
ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BaseExpenseAccountMapper">
<resultMap type="BaseExpenseAccount" id="BaseExpenseAccountResult">
<result property="expenseId" column="expense_id" />
<result property="auditStatus" column="audit_status" />
<result property="managerAuditStatus" column="manager_audit_status" />
<result property="financeAuditStatus" column="finance_audit_status" />
<result property="expenseCode" column="expense_code" />
<result property="deptName" column="deptName" />
<result property="postName" column="postName" />
<result property="fullName" column="fullName" />
<result property="expenseMethod" column="expense_method" />
<result property="isPurchaseOutsource" column="is_purchase_outsource" />
<result property="supplierCode" column="supplier_code" />
<result property="corporatePayee" column="corporate_payee" />
<result property="corporateReceivingAccount" column="corporate_receiving_account" />
<result property="publicAccountBanks" column="public_account_banks" />
<result property="applyUser" column="apply_user" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="useStatus" column="use_status" />
</resultMap>
<sql id="selectBaseExpenseAccountVo">
select expense_id, audit_status, manager_audit_status, finance_audit_status,
expense_code, deptName, postName, fullName, expense_method, is_purchase_outsource,
supplier_code, corporate_payee, corporate_receiving_account, public_account_banks,
apply_user, create_by, create_time, update_by, update_time, remark, use_status,del_flag
from base_expense_account
</sql>
<select id="selectBaseExpenseAccountList" parameterType="BaseExpenseAccount" resultMap="BaseExpenseAccountResult">
<include refid="selectBaseExpenseAccountVo"/>
<where>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="managerAuditStatus != null and managerAuditStatus != ''"> and manager_audit_status = #{managerAuditStatus}</if>
<if test="financeAuditStatus != null and financeAuditStatus != ''"> and finance_audit_status = #{financeAuditStatus}</if>
<if test="expenseCode != null and expenseCode != ''"> and expense_code = #{expenseCode}</if>
<if test="expenseMethod != null and expenseMethod != ''"> and expense_method = #{expenseMethod}</if>
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
</where>
</select>
<select id="selectBaseExpenseAccountById" parameterType="Long" resultMap="BaseExpenseAccountResult">
<include refid="selectBaseExpenseAccountVo"/>
where expense_id = #{expenseId}
</select>
<insert id="insertBaseExpenseAccount" parameterType="BaseExpenseAccount" useGeneratedKeys="true" keyProperty="expenseId">
insert into base_emp_expense_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditStatus != null">audit_status,</if>
<if test="managerAuditStatus != null">manager_audit_status,</if>
<if test="financeAuditStatus != null">finance_audit_status,</if>
<if test="expenseCode != null">expense_code,</if>
<if test="deptName != null">deptName,</if>
<if test="postName != null">postName,</if>
<if test="fullName != null">fullName,</if>
<if test="expenseMethod != null">expense_method,</if>
<if test="isPurchaseOutsource != null">is_purchase_outsource,</if>
<if test="supplierCode != null">supplier_code,</if>
<if test="corporatePayee != null">corporate_payee,</if>
<if test="corporateReceivingAccount != null">corporate_receiving_account,</if>
<if test="publicAccountBanks != null">public_account_banks,</if>
<if test="applyUser != null">apply_user,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="useStatus != null">use_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditStatus != null">#{auditStatus},</if>
<if test="managerAuditStatus != null">#{managerAuditStatus},</if>
<if test="financeAuditStatus != null">#{financeAuditStatus},</if>
<if test="expenseCode != null">#{expenseCode},</if>
<if test="deptName != null">#{deptName},</if>
<if test="postName != null">#{postName},</if>
<if test="fullName != null">#{fullName},</if>
<if test="expenseMethod != null">#{expenseMethod},</if>
<if test="isPurchaseOutsource != null">#{isPurchaseOutsource},</if>
<if test="supplierCode != null">#{supplierCode},</if>
<if test="corporatePayee != null">#{corporatePayee},</if>
<if test="corporateReceivingAccount != null">#{corporateReceivingAccount},</if>
<if test="publicAccountBanks != null">#{publicAccountBanks},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="useStatus != null">#{useStatus},</if>
</trim>
</insert>
<update id="updateBaseExpenseAccount" parameterType="BaseExpenseAccount">
update base_emp_expense_account
<trim prefix="SET" suffixOverrides=",">
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="managerAuditStatus != null">manager_audit_status = #{managerAuditStatus},</if>
<if test="financeAuditStatus != null">finance_audit_status = #{financeAuditStatus},</if>
<if test="expenseCode != null">expense_code = #{expenseCode},</if>
<if test="deptName != null">deptName = #{deptName},</if>
<if test="postName != null">postName = #{postName},</if>
<if test="fullName != null">fullName = #{fullName},</if>
<if test="expenseMethod != null">expense_method = #{expenseMethod},</if>
<if test="isPurchaseOutsource != null">is_purchase_outsource = #{isPurchaseOutsource},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="corporatePayee != null">corporate_payee = #{corporatePayee},</if>
<if test="corporateReceivingAccount != null">corporate_receiving_account = #{corporateReceivingAccount},</if>
<if test="publicAccountBanks != null">public_account_banks = #{publicAccountBanks},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="useStatus != null">use_status = #{useStatus},</if>
</trim>
where expense_id = #{expenseId}
</update>
<delete id="deleteBaseExpenseAccountById" parameterType="Long">
delete from base_emp_expense_account where expense_id = #{expenseId}
</delete>
<delete id="deleteBaseExpenseAccountByIds" parameterType="String">
delete from base_emp_expense_account where expense_id in
<foreach item="expenseId" collection="array" open="(" separator="," close=")">
#{expenseId}
</foreach>
</delete>
<update id="cancelBaseExpenseAccountById" parameterType="Long">
update base_emp_expense_account set del_flag = '1' where expense_id = #{expenseId}
</update>
<update id="restoreBaseExpenseAccountById" parameterType="Long">
update base_emp_expense_account set del_flag = '0' where expense_id = #{expenseId}
</update>
</mapper>

175
ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html

@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增报销单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseExpense-add">
<div class="form-group" hidden>
<label class="col-sm-6 control-label">报销单编号:</label>
<div class="col-sm-6">
<input name="expenseCode" class="form-control" type="text">
</div>
</div>
<div class="col-xs-12 mt-5">
<div class="col-xs-4">
<label class="col-sm-6 control-label">部门:</label>
<div class="col-sm-6">
<input name="deptName" class="form-control" type="text">
</div>
</div>
<div class="col-xs-4">
<label class="col-sm-6 control-label">岗位:</label>
<div class="col-sm-6">
<input name="postName" class="form-control" type="text">
</div>
</div>
<div class="col-xs-4">
<label class="col-sm-6 control-label">姓名:</label>
<div class="col-sm-6">
<input name="fullName" class="form-control" type="text">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">报销方式:</label>
<div class="col-sm-6">
<select name="expenseMethod" class="form-control" th:with="dictOptions=${@dict.getType('sys_expense_method')}">
<option th:each="dict : ${dictOptions}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否是委外/采购采销:</label>
<div class="col-sm-6">
<input name="isPurchaseOutsource" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">供应商ID:</label>
<div class="col-sm-6">
<input name="supplierCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款方:</label>
<div class="col-sm-6">
<input name="corporatePayee" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款账户:</label>
<div class="col-sm-6">
<input name="corporateReceivingAccount" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公开户行:</label>
<div class="col-sm-6">
<input name="publicAccountBanks" class="form-control" type="text">
</div>
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span style="color: black;font-size:17px;font-weight: bold" >报销分类信息</span>
<a class="btn btn-success" onclick="insertRow()">
<span class="fa fa-plus"></span> 添加报销
</a>
</div>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-expense"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/baseExpense"
$("#form-baseExpense-add").validate({focusCleanup: true});
$(function(){
$.ajax({
url: prefix + "/getId",
type: "post",
dataType: "json",
success: function(result) {
if (result.code == 0) {
$("input[name='expenseCode']").val(result.data);
} else {
$.modal.msgError(result.msg);
}
}
});
})
var $table = $("#bootstrap-sub-table-expense");
//获取子表信息
$(function() {
var options = {
id:'bootstrap-sub-table-expense',
pagination: false,
sidePagination: "client",
model: "报销单数据",
columns: [
{checkbox: true},
{title: '主键',field: '',visible: false,
formatter: function (value, row, index) {
return index;
}
},
{title: '报销单分项子表',field: 'expenseChildId',visible: false},
{title: '关联报销单号',field: 'quoteId',visible: false},
{title: '成本类型',field: 'costType',},
{title: '成本小类',field: 'costSmallType',},
{title: '用途',field: 'purpose',editable:{type:'text',options:{maxlength:100}}},
{title: '金额',field: 'amounts',editable: {type:'text',options:{maxlength:100}}},
{title: '报销时间',field: 'expenseTime',editable:{type:'date'}},
{title: '出差单号',field: 'evectionCode',},
{title: '采购单号',field: 'purcahseCode',},
{title: '委外单号',field: 'outsourceCode',},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
};
$.table.init(options);
});
function insertRow() {
$table.bootstrapTable('insertRow', {
index:1,
row: {
expenseChildId:'',
costType: "<select name='costType' class='form-control'>"+ "<option value=''>所有</option>" + "</select>",
costSmallType:"<select name='costSmallType' class='form-control'>"+ "\"<option value=''>所有</option>\"" +"</select>",
purpose:'<input name="purpose" class="form-control" type="text">' ,
amounts: '<input name="amounts" class="form-control" type="text">',
expenseTime: '<div class="input-group date">\n' +
'<input name="expenseTime" class="form-control" placeholder="yyyy-MM-dd" type="date"></div>',
evectionCode:'<input name="evectionCode" class="form-control" type="text">' ,
purcahseCode:'<input name="purcahseCode" class="form-control" type="text">',
outsourceCode: '<input name="outsourceCode" class="form-control" type="text">',
}
})
layer.close(index);
}
/* 删除指定表格行 */
function removeRow(id){
$table.bootstrapTable('remove', {
field: 'id',
values: id
})
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-baseExpense-add').serialize());
}
}
</script>
</body>
</html>

155
ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('报销单列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>报销单号:</label>
<input type="text" name="expenseCode"/>
</li>
<li>
<label>报销人:</label>
<select name="applyUser" >
<option value="">所有</option>
</select>
</li>
<li>
<label>生产单号:</label>
<input name="expenseCode" type="text"/>
</li>
<li>
<label>出差单号:</label>
<input name="expenseCode" type="text"/>
</li>
<li>
<label>上级审核状态:</label>
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>总经理审核状态:</label>
<select name="managerAuditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>财务审核状态:</label>
<select name="financeAuditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>成本类型:</label>
<select name="financeAuditStatus">
<option value="">所有</option>
</select>
</li>
<li>
<label>成本小类:</label>
<select name="financeAuditStatus">
<option value="">所有</option>
</select>
</li>
<li>
<label>报销方式:</label>
<select name="expenseMethod" th:with="type=${@dict.getType('sys_base_expense_method')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>录入时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:baseExpense:add">
<i class="fa fa-plus"></i> 添加
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:baseExpense:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:baseExpense:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:baseExpense:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:baseExpense:restore')}]];
var prefix = ctx + "system/baseExpense";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "报销单",
columns: [
{checkbox: true},
{title: '报销单索引id',field: 'expenseId',visible: false},
{title: '上级审核状态',field: 'auditStatus',},
{title: '总经理审核状态',field: 'managerAuditStatus',},
{title: '财务审核状态',field: 'financeAuditStatus',},
{title: '报销单编号',field: 'expenseCode',},
{title: '报销人',field: 'applyUser',},
{title: '报销方式',field: 'expenseMethod', },
{title: '是否是委外/采购采销',field: 'isPurchaseOutsource',visible: false},
{title: '供应商ID',field: 'supplierCode',visible: false},
{title: '对公收款方',field: 'corporatePayee',visible: false},
{title: '对公收款账户',field: 'corporateReceivingAccount',visible: false},
{title: '对公开户行',field: 'publicAccountBanks',visible: false},
{title: '备注',field: 'remark',visible: false},
{title: '使用状态',field: 'useStatus',visible: false},
{
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.expenseId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.expenseId + '\')"><i class="fa fa-details"></i>详情</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}
]
};
$.table.init(options);
});
</script>
</body>
</html>

183
ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html

@ -0,0 +1,183 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改报销单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseExpense-edit" th:object="${baseExpenseAccount}">
<input name="expenseId" th:field="*{expenseId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">报销单编号:</label>
<div class="col-sm-8">
<input name="expenseCode" th:field="*{expenseCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<input name="deptName" th:field="*{deptName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<input name="postName" th:field="*{postName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<input name="fullName" th:field="*{fullName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报销方式:</label>
<div class="col-sm-8">
<input name="expenseMethod" th:field="*{expenseMethod}" class="form-control" type="text">
</div>
</div>
<div class="form-row" id="expanseType">
<div class="form-group">
<label class="col-sm-3 control-label">供应商ID:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否是委外/采购采销:</label>
<div class="col-sm-8">
<input name="isPurchaseOutsource" th:field="*{isPurchaseOutsource}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">对公收款方:</label>
<div class="col-sm-8">
<input name="corporatePayee" th:field="*{corporatePayee}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">对公收款账户:</label>
<div class="col-sm-8">
<input name="corporateReceivingAccount" th:field="*{corporateReceivingAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">对公开户行:</label>
<div class="col-sm-8">
<input name="publicAccountBanks" th:field="*{publicAccountBanks}" class="form-control" type="text">
</div>
</div>
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span style="color: black;font-size:17px;font-weight: bold" >报销分类信息</span>
<a class="btn btn-success" onclick="insertRow()">
<span class="fa fa-plus"></span> 添加报销
</a>
</div>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-expense"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/baseExpense"
$("#form-baseExpense-add").validate({focusCleanup: true});
$(function(){
$.ajax({
url: prefix + "/getId",
type: "post",
dataType: "json",
success: function(result) {
if (result.code == 0) {
$("input[name='expenseCode']").val(result.data);
} else {
$.modal.msgError(result.msg);
}
}
});
})
var $table = $("#bootstrap-sub-table-expense");
//获取子表信息
$(function() {
var options = {
id:'bootstrap-sub-table-expense',
url:prefix + "/getChildList",
queryParams: function(params) {
return {
quoteId: $("#expenseCode").val()
};
},
pagination: false,
sidePagination: "client",
model: "报销单数据",
columns: [
{checkbox: true},
{title: '主键',field: 'index',visible: false,
formatter: function (value, row, index) {
return index;
}
},
{title: '报销单分项子表',field: 'expenseChildId',visible: false},
{title: '关联报销单号',field: 'quoteId',visible: false},
{title: '成本类型',field: 'costType',},
{title: '成本小类',field: 'costSmallType',},
{title: '用途',field: 'purpose',editable:{type:'text',options:{maxlength:100}}},
{title: '金额',field: 'amounts',editable: {type:'text',options:{maxlength:100}}},
{title: '报销时间',field: 'expenseTime',editable:{type:'date'}},
{title: '出差单号',field: 'evectionCode',},
{title: '采购单号',field: 'purcahseCode',},
{title: '委外单号',field: 'outsourceCode',},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
};
$.table.init(options);
});
function insertRow() {
$table.bootstrapTable('insertRow', {
index:1,
row: {
expenseChildId:'',
costType: "<select name='costType' class='form-control'>"+ "<option value=''>所有</option>" + "</select>",
costSmallType:"<select name='costSmallType' class='form-control'>"+ "\"<option value=''>所有</option>\"" +"</select>",
purpose:'<input name="purpose" class="form-control" type="text">' ,
amounts: '<input name="amounts" class="form-control" type="text">',
expenseTime: '<div class="input-group date">\n' +
'<input name="expenseTime" class="form-control" placeholder="yyyy-MM-dd" type="date"></div>',
evectionCode:'<input name="evectionCode" class="form-control" type="text">' ,
purcahseCode:'<input name="purcahseCode" class="form-control" type="text">',
outsourceCode: '<input name="outsourceCode" class="form-control" type="text">',
}
})
layer.close(index);
}
/* 删除指定表格行 */
function removeRow(id){
$table.bootstrapTable('remove', {
field: 'id',
values: id
})
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-baseExpense-edit').serialize());
}
}
</script>
</body>
</html>

108
ruoyi-admin/src/main/resources/templates/system/baseExpenseChild/add.html

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增报销单分类子')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-expenseChild-add">
<div class="form-group">
<label class="col-sm-3 control-label">关联报销单号:</label>
<div class="col-sm-8">
<input name="quoteId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成本类型:</label>
<div class="col-sm-8">
<select name="cost type" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成本小类:</label>
<div class="col-sm-8">
<select name="costSmallType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用途:</label>
<div class="col-sm-8">
<input name="purpose" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">金额:</label>
<div class="col-sm-8">
<input name="amounts" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报销时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="expenseTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差单号:</label>
<div class="col-sm-8">
<input name="evectionCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购单号:</label>
<div class="col-sm-8">
<input name="purcahseCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">委外单号:</label>
<div class="col-sm-8">
<input name="outsourceCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除状态:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/expenseChild"
$("#form-expenseChild-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-expenseChild-add').serialize());
}
}
$("input[name='expenseTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

163
ruoyi-admin/src/main/resources/templates/system/baseExpenseChild/baseExpenseChild.html

@ -0,0 +1,163 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('报销单分类子列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>关联报销单号:</label>
<input type="text" name="quoteId"/>
</li>
<li>
<label>成本类型:</label>
<select name="cost type">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>成本小类:</label>
<select name="costSmallType">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>用途:</label>
<input type="text" name="purpose"/>
</li>
<li>
<label>金额:</label>
<input type="text" name="amounts"/>
</li>
<li>
<label>报销时间:</label>
<input type="text" class="time-input" placeholder="请选择报销时间" name="expenseTime"/>
</li>
<li>
<label>出差单号:</label>
<input type="text" name="evectionCode"/>
</li>
<li>
<label>采购单号:</label>
<input type="text" name="purcahseCode"/>
</li>
<li>
<label>委外单号:</label>
<input type="text" name="outsourceCode"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:expenseChild:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:expenseChild:edit">
<i class="fa fa-edit"></i> 修改
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:expenseChild:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:expenseChild:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:expenseChild:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:expenseChild:restore')}]];
var prefix = ctx + "system/expenseChild";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "报销单分类子",
columns: [{
checkbox: true
},
{
title: '报销单分项子表',
field: 'expenseChildId',
visible: false
},
{
title: '关联报销单号',
field: 'quoteId',
},
{
title: '成本类型',
field: 'cost type',
},
{
title: '成本小类',
field: 'costSmallType',
},
{
title: '用途',
field: 'purpose',
},
{
title: '金额',
field: 'amounts',
},
{
title: '报销时间',
field: 'expenseTime',
},
{
title: '出差单号',
field: 'evectionCode',
},
{
title: '采购单号',
field: 'purcahseCode',
},
{
title: '委外单号',
field: 'outsourceCode',
},
{
title: '备注',
field: 'remark',
},
{
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.expenseChildId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.expenseChildId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

103
ruoyi-admin/src/main/resources/templates/system/baseExpenseChild/edit.html

@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改报销单分类子')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-expenseChild-edit" th:object="${baseExpenseAccountChild}">
<input name="expenseChildId" th:field="*{expenseChildId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">关联报销单号:</label>
<div class="col-sm-8">
<input name="quoteId" th:field="*{quoteId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成本类型:</label>
<div class="col-sm-8">
<select name="cost type" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">成本小类:</label>
<div class="col-sm-8">
<select name="costSmallType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用途:</label>
<div class="col-sm-8">
<input name="purpose" th:field="*{purpose}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">金额:</label>
<div class="col-sm-8">
<input name="amounts" th:field="*{amounts}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报销时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="expenseTime" th:value="${#dates.format(baseExpenseAccountChild.expenseTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差单号:</label>
<div class="col-sm-8">
<input name="evectionCode" th:field="*{evectionCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购单号:</label>
<div class="col-sm-8">
<input name="purcahseCode" th:field="*{purcahseCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">委外单号:</label>
<div class="col-sm-8">
<input name="outsourceCode" th:field="*{outsourceCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/expenseChild";
$("#form-expenseChild-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-expenseChild-edit').serialize());
}
}
$("input[name='expenseTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

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

@ -97,12 +97,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:empRequisiteOrderChild:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:empRequisiteOrderChild:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:empRequisiteOrderChild:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:empRequisiteOrderChild:export">
<i class="fa fa-download"></i> 导出
</a>

67
ruoyi-admin/src/main/resources/templates/system/requesitioningChild/requesitioningChild.html

@ -10,22 +10,10 @@
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>关联请购单编号字段:</label>
<input type="text" name="quoteId"/>
</li>
<li>
<label>物料表中的id:</label>
<input type="text" name="materialId"/>
</li>
<li>
<label>料号:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料的图片:</label>
<input type="text" name="photoUrl"/>
</li>
<li>
<label>物料的名称:</label>
<input type="text" name="materialName"/>
@ -34,71 +22,26 @@
<label>物料的类型:</label>
<select name="materialType">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>物料的型号:</label>
<input type="text" name="materialModel"/>
</li>
<li>
<label>物料的规格:</label>
<input type="text" name="specifications"/>
</li>
<li>
<label>物料的品牌:</label>
<input type="text" name="brand"/>
</li>
<li>
<label>物料的描述:</label>
<input type="text" name="describe"/>
</li>
<li>
<label>物料的数量:</label>
<input type="text" name="materialNum"/>
</li>
<li>
<label>物料的不含税单价(RMB):</label>
<input type="text" name="materialRmb"/>
</li>
<li>
<label>物料的含税单价(RMB):</label>
<input type="text" name="materialNoRmb"/>
</li>
<li>
<label>物料的含税总价(RMB):</label>
<input type="text" name="materialNoRmbSum"/>
</li>
<li>
<label>物料的不含税总价(RMB):</label>
<input type="text" name="materialRmbSum"/>
</li>
<li>
<label>创建人:</label>
<input type="text" name="createBy"/>
</li>
<li class="select-time">
<label>创建时间:</label>
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<label>修改人:</label>
<label>录入人:</label>
<input type="text" name="updateBy"/>
</li>
<li>
<label>删除状态:</label>
<select name="useStatus">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>审核状态:</label>
<select name="auditStatus">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
@ -114,12 +57,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="requesitioningChild:requesitioningChild:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="requesitioningChild:requesitioningChild:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="requesitioningChild:requesitioningChild:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="requesitioningChild:requesitioningChild:export">
<i class="fa fa-download"></i> 导出
</a>

Loading…
Cancel
Save