Browse Source

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

dev
王晓迪 3 months ago
parent
commit
a677e2e6cc
  1. 16
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/CompanyCost.java
  2. 37
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java
  3. 197
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoiceHistory.java
  4. 85
      ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java
  5. 82
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java
  6. 140
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java
  7. 14
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java
  8. 27
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  9. 26
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  10. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java
  11. 9
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysInvoiceMapper.java
  12. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java
  13. 57
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  14. 129
      ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml
  15. 14
      ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml
  16. 11
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  17. 5
      ruoyi-admin/src/main/resources/mapper/system/SysInvoiceMapper.xml
  18. 2
      ruoyi-admin/src/main/resources/templates/erp/material/select.html
  19. 3
      ruoyi-admin/src/main/resources/templates/financial/companyCost/companyCost.html
  20. 488
      ruoyi-admin/src/main/resources/templates/index.html
  21. 129
      ruoyi-admin/src/main/resources/templates/remind/remind.html
  22. 180
      ruoyi-admin/src/main/resources/templates/remind/view.html
  23. 201
      ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html
  24. 27
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java

16
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/CompanyCost.java

@ -1,6 +1,8 @@
package com.ruoyi.financial.domain;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -31,9 +33,7 @@ public class CompanyCost extends BaseEntity
@Excel(name = "月份")
private Long costMonth;
/** 经营成本 */
@Excel(name = "经营成本")
private Long operatingCosts;
/** 工资费用 */
@Excel(name = "工资费用")
@ -55,9 +55,9 @@ public class CompanyCost extends BaseEntity
@Excel(name = "其他费用")
private BigDecimal ohterExpenses;
/** 业务成本 */
@Excel(name = "业务成本")
private BigDecimal businessCost;
/** 经营成本 */
@Excel(name = "经营成本合计")
private Long operatingCosts;
/** 运输费用 */
@Excel(name = "运输费用")
@ -83,6 +83,10 @@ public class CompanyCost extends BaseEntity
@Excel(name = "业务提成")
private BigDecimal businessCommission;
/** 业务成本 */
@Excel(name = "业务成本合计")
private BigDecimal businessCost;
public void setId(Long id)
{
this.id = id;

37
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java

@ -130,8 +130,12 @@ public class FinancialTaxInvoice extends BaseEntity
@Excel(name = "开票额度比例")
private BigDecimal invoiceQuotaRatio;
/** 开票金额 */
private BigDecimal invoiceAmount;
/** 开票金额(RMB) */
private BigDecimal invoiceAmountRmb;
/** 开票金额(美元) */
private BigDecimal invoiceAmountUsd;
/** 实际开票金额 */
@Excel(name = "实际开票金额")
@ -455,16 +459,16 @@ public class FinancialTaxInvoice extends BaseEntity
{
return invoiceQuotaRatio;
}
public void setInvoiceAmount(BigDecimal invoiceAmount)
{
this.invoiceAmount = invoiceAmount;
public BigDecimal getInvoiceAmountRmb() {
return invoiceAmountRmb;
}
public BigDecimal getInvoiceAmount()
{
return invoiceAmount;
public void setInvoiceAmountRmb(BigDecimal invoiceAmountRmb) {
this.invoiceAmountRmb = invoiceAmountRmb;
}
public void setActualInvoiceAmount(BigDecimal actualInvoiceAmount)
public void setActualInvoiceAmount(BigDecimal actualInvoiceAmount)
{
this.actualInvoiceAmount = actualInvoiceAmount;
}
@ -473,7 +477,17 @@ public class FinancialTaxInvoice extends BaseEntity
{
return actualInvoiceAmount;
}
public void setActualInvoiceAmountRmb(BigDecimal actualInvoiceAmountRmb)
public BigDecimal getInvoiceAmountUsd() {
return invoiceAmountUsd;
}
public void setInvoiceAmountUsd(BigDecimal invoiceAmountUsd) {
this.invoiceAmountUsd = invoiceAmountUsd;
}
public void setActualInvoiceAmountRmb(BigDecimal actualInvoiceAmountRmb)
{
this.actualInvoiceAmountRmb = actualInvoiceAmountRmb;
}
@ -597,7 +611,8 @@ public class FinancialTaxInvoice extends BaseEntity
.append("usdTaxSum", getUsdTaxSum())
.append("invoiceEmail", getInvoiceEmail())
.append("invoiceQuotaRatio", getInvoiceQuotaRatio())
.append("invoiceAmount", getInvoiceAmount())
.append("invoiceAmountRmb", getInvoiceAmountRmb())
.append("invoiceAmountUsd", getInvoiceAmountUsd())
.append("actualInvoiceAmount", getActualInvoiceAmount())
.append("actualInvoiceAmountRmb", getActualInvoiceAmountRmb())
.append("actualInvoiceAmountUsd", getActualInvoiceAmountUsd())

197
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoiceHistory.java

@ -0,0 +1,197 @@
package com.ruoyi.financial.domain;
import java.math.BigDecimal;
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;
/**
* 国税发票历史记录对象 financial_tax_invoice_history
*
* @author 刘晓旭
* @date 2024-08-14
*/
public class FinancialTaxInvoiceHistory extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 国税发票历史id */
private Long invoiceHistoryId;
/** 国税发票单号 */
@Excel(name = "国税发票单号")
private String taxInvoiceCode;
/** 销售订单编号 */
private String salesOrderCode;
/** 发票状态(0待审核、1待开具、2已开具、3审核拒绝) */
@Excel(name = "发票状态(0待审核、1待开具、2已开具、3审核拒绝)")
private String taxInvoiceStatus;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 财务员 */
@Excel(name = "财务员")
private String financeMembers;
/** 开票额度比例 */
@Excel(name = "开票额度比例")
private BigDecimal invoiceQuotaRatio;
/** 开票金额(RMB) */
@Excel(name = "开票金额(RMB)")
private BigDecimal invoiceAmountRmb;
/** 开票金额(美元) */
@Excel(name = "开票金额(美元)")
private BigDecimal invoiceAmountUsd;
/** 开票用途 */
@Excel(name = "开票用途")
private String invoicePurpose;
/** 使用状态(1是、0否、2已作废) */
private String useStatus;
/** 删除标志 0正常 1删除 */
private String delFlag;
public void setInvoiceHistoryId(Long invoiceHistoryId)
{
this.invoiceHistoryId = invoiceHistoryId;
}
public Long getInvoiceHistoryId()
{
return invoiceHistoryId;
}
public void setTaxInvoiceCode(String taxInvoiceCode)
{
this.taxInvoiceCode = taxInvoiceCode;
}
public String getTaxInvoiceCode()
{
return taxInvoiceCode;
}
public void setSalesOrderCode(String salesOrderCode)
{
this.salesOrderCode = salesOrderCode;
}
public String getSalesOrderCode()
{
return salesOrderCode;
}
public void setTaxInvoiceStatus(String taxInvoiceStatus)
{
this.taxInvoiceStatus = taxInvoiceStatus;
}
public String getTaxInvoiceStatus()
{
return taxInvoiceStatus;
}
public void setApplyTime(Date applyTime)
{
this.applyTime = applyTime;
}
public Date getApplyTime()
{
return applyTime;
}
public void setFinanceMembers(String financeMembers)
{
this.financeMembers = financeMembers;
}
public String getFinanceMembers()
{
return financeMembers;
}
public void setInvoiceQuotaRatio(BigDecimal invoiceQuotaRatio)
{
this.invoiceQuotaRatio = invoiceQuotaRatio;
}
public BigDecimal getInvoiceQuotaRatio()
{
return invoiceQuotaRatio;
}
public void setInvoiceAmountRmb(BigDecimal invoiceAmountRmb)
{
this.invoiceAmountRmb = invoiceAmountRmb;
}
public BigDecimal getInvoiceAmountRmb()
{
return invoiceAmountRmb;
}
public void setInvoiceAmountUsd(BigDecimal invoiceAmountUsd)
{
this.invoiceAmountUsd = invoiceAmountUsd;
}
public BigDecimal getInvoiceAmountUsd()
{
return invoiceAmountUsd;
}
public void setInvoicePurpose(String invoicePurpose)
{
this.invoicePurpose = invoicePurpose;
}
public String getInvoicePurpose()
{
return invoicePurpose;
}
public void setUseStatus(String useStatus)
{
this.useStatus = useStatus;
}
public String getUseStatus()
{
return useStatus;
}
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("invoiceHistoryId", getInvoiceHistoryId())
.append("taxInvoiceCode", getTaxInvoiceCode())
.append("salesOrderCode", getSalesOrderCode())
.append("taxInvoiceStatus", getTaxInvoiceStatus())
.append("applyTime", getApplyTime())
.append("financeMembers", getFinanceMembers())
.append("invoiceQuotaRatio", getInvoiceQuotaRatio())
.append("invoiceAmountRmb", getInvoiceAmountRmb())
.append("invoiceAmountUsd", getInvoiceAmountUsd())
.append("invoicePurpose", getInvoicePurpose())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("useStatus", getUseStatus())
.append("delFlag", getDelFlag())
.toString();
}
}

85
ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java

@ -0,0 +1,85 @@
package com.ruoyi.financial.mapper;
import java.util.List;
import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory;
/**
* 国税发票历史记录Mapper接口
*
* @author 刘晓旭
* @date 2024-08-14
*/
public interface FinancialTaxInvoiceHistoryMapper
{
/**
* 查询国税发票历史记录
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 国税发票历史记录
*/
public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 查询国税发票历史记录列表
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 国税发票历史记录集合
*/
public List<FinancialTaxInvoiceHistory> selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory);
/**
* 新增国税发票历史记录
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 结果
*/
public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory);
/**
* 修改国税发票历史记录
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 结果
*/
public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory);
/**
* 删除国税发票历史记录
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 结果
*/
public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 批量删除国税发票历史记录
*
* @param invoiceHistoryIds 需要删除的数据ID
* @return 结果
*/
public int deleteFinancialTaxInvoiceHistoryByIds(String[] invoiceHistoryIds);
/**
* 作废国税发票历史记录
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 结果
*/
public int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 恢复国税发票历史记录
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 结果
*/
public int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 根据销售订单编号查询发票历史记录集合
*
* @param salesOrderCode 销售订单编号
* @return 结果
*/
List<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode);
}

82
ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java

@ -0,0 +1,82 @@
package com.ruoyi.financial.service;
import java.util.List;
import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory;
/**
* 国税发票历史记录Service接口
*
* @author 刘晓旭
* @date 2024-08-14
*/
public interface IFinancialTaxInvoiceHistoryService
{
/**
* 查询国税发票历史记录
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 国税发票历史记录
*/
public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 查询国税发票历史记录列表
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 国税发票历史记录集合
*/
public List<FinancialTaxInvoiceHistory> selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory);
/**
* 新增国税发票历史记录
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 结果
*/
public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory);
/**
* 修改国税发票历史记录
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 结果
*/
public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory);
/**
* 批量删除国税发票历史记录
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteFinancialTaxInvoiceHistoryByIds(String ids);
/**
* 删除国税发票历史记录信息
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 结果
*/
public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 作废国税发票历史记录
* @param invoiceHistoryId 国税发票历史记录ID
* @return
*/
int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 恢复国税发票历史记录
* @param invoiceHistoryId 国税发票历史记录ID
* @return
*/
int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId);
/**
* 根据销售订单编号查询发票历史记录集合
* @param salesOrderCode 销售订单编号
* @return
*/
List<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode);
}

140
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java

@ -0,0 +1,140 @@
package com.ruoyi.financial.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.financial.mapper.FinancialTaxInvoiceHistoryMapper;
import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory;
import com.ruoyi.financial.service.IFinancialTaxInvoiceHistoryService;
import com.ruoyi.common.core.text.Convert;
/**
* 国税发票历史记录Service业务层处理
*
* @author 刘晓旭
* @date 2024-08-14
*/
@Service
public class FinancialTaxInvoiceHistoryServiceImpl implements IFinancialTaxInvoiceHistoryService
{
@Autowired
private FinancialTaxInvoiceHistoryMapper financialTaxInvoiceHistoryMapper;
/**
* 查询国税发票历史记录
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 国税发票历史记录
*/
@Override
public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId)
{
return financialTaxInvoiceHistoryMapper.selectFinancialTaxInvoiceHistoryById(invoiceHistoryId);
}
/**
* 查询国税发票历史记录列表
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 国税发票历史记录
*/
@Override
public List<FinancialTaxInvoiceHistory> selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory)
{
return financialTaxInvoiceHistoryMapper.selectFinancialTaxInvoiceHistoryList(financialTaxInvoiceHistory);
}
/**
* 新增国税发票历史记录
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 结果
*/
@Override
public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory)
{
String loginName = ShiroUtils.getLoginName();
financialTaxInvoiceHistory.setCreateBy(loginName);
financialTaxInvoiceHistory.setCreateTime(DateUtils.getNowDate());
return financialTaxInvoiceHistoryMapper.insertFinancialTaxInvoiceHistory(financialTaxInvoiceHistory);
}
/**
* 修改国税发票历史记录
*
* @param financialTaxInvoiceHistory 国税发票历史记录
* @return 结果
*/
@Override
public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory)
{
String loginName = ShiroUtils.getLoginName();
financialTaxInvoiceHistory.setUpdateBy(loginName);
financialTaxInvoiceHistory.setUpdateTime(DateUtils.getNowDate());
return financialTaxInvoiceHistoryMapper.updateFinancialTaxInvoiceHistory(financialTaxInvoiceHistory);
}
/**
* 删除国税发票历史记录对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteFinancialTaxInvoiceHistoryByIds(String ids)
{
return financialTaxInvoiceHistoryMapper.deleteFinancialTaxInvoiceHistoryByIds(Convert.toStrArray(ids));
}
/**
* 删除国税发票历史记录信息
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 结果
*/
@Override
public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId)
{
return financialTaxInvoiceHistoryMapper.deleteFinancialTaxInvoiceHistoryById(invoiceHistoryId);
}
/**
* 作废国税发票历史记录
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 结果
*/
@Override
public int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId)
{
return financialTaxInvoiceHistoryMapper.cancelFinancialTaxInvoiceHistoryById(invoiceHistoryId);
}
/**
* 恢复国税发票历史记录信息
*
* @param invoiceHistoryId 国税发票历史记录ID
* @return 结果
*/
@Override
public int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId)
{
return financialTaxInvoiceHistoryMapper.restoreFinancialTaxInvoiceHistoryById(invoiceHistoryId);
}
/**
* 根据销售订单编号查询历史记录集合
*
* @param salesOrderCode 销售订单编号
* @return 结果
*/
@Override
public List<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode) {
List<FinancialTaxInvoiceHistory> list = financialTaxInvoiceHistoryMapper.selectInvoiceHistoryListBySalesOrderCode(salesOrderCode);
return list;
}
}

14
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java

@ -10,7 +10,9 @@ import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.financial.domain.FinancialTaxInvoiceMaterial;
import com.ruoyi.financial.mapper.FinancialTaxInvoiceMaterialMapper;
import com.ruoyi.financial.service.IFinancialTaxInvoiceMaterialService;
import com.ruoyi.system.domain.SysCustomerVo;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.mapper.SysCustomerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.financial.mapper.FinancialTaxInvoiceMapper;
@ -37,6 +39,9 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi
@Autowired
private IFinancialTaxInvoiceMaterialService invoiceMaterialService;
@Autowired
private SysCustomerMapper sysCustomerMapper;
@Autowired
private RedisCache redisCache;
@ -164,6 +169,15 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi
financialTaxInvoice.setNoRmbSum(BigDecimal.valueOf(sysSalesOrder.getNoRmbSum()));
financialTaxInvoice.setUsdTaxSum(BigDecimal.valueOf(sysSalesOrder.getUsdTaxSum()));
financialTaxInvoice.setNoUsdSum(BigDecimal.valueOf(sysSalesOrder.getNoUsdSum()));
SysCustomerVo sysCustomerVo = sysCustomerMapper.selectSysCustomerByEnterpriseCode(sysSalesOrder.getEnterpriseCode());
financialTaxInvoice.setInvoiceCompanyCode(sysCustomerVo.getInvoicingCustomerName());
financialTaxInvoice.setInvoiceCompanyName(sysCustomerVo.getInvoicingCompanyName());
financialTaxInvoice.setBankAccount(sysCustomerVo.getBankAccount());
financialTaxInvoice.setDepositBank(sysCustomerVo.getDepositBank());
return financialTaxInvoice;
}

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

@ -581,4 +581,31 @@ public class SysCustomerController extends BaseController
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerByCustomerId(enterpriseCode);
return AjaxResult.success(sysCustomer);
}
/**
* 通过客户id查询开票公司信息
* */
@ResponseBody
@GetMapping("/getAllInvoiceCompanyNameByCode")
public List<SysInvoice> getAllInvoiceCompanyNameByCode(@RequestParam("enterpriseCode") String enterpriseCode ) {
List<SysInvoice> invoiceList = sysCustomerService.getInvoiceCompanyListByCode(enterpriseCode);
return invoiceList;
}
/**
* 通过开票公司名称查询开票公司信息
* */
@ResponseBody
@PostMapping("/getSysInvoiceInfoByName")
public AjaxResult getSysInvoiceInfoByName(String invoiceCompanyName) {
SysInvoice result = sysCustomerService.getSysInvoiceInfoByName(invoiceCompanyName);
if (result != null) {
return AjaxResult.success(result);
} else {
return AjaxResult.error("未找到对应的开票信息");
}
}
}

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

@ -22,7 +22,9 @@ import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.erp.domain.ErpMaterialVo;
import com.ruoyi.financial.domain.FinancialTaxInvoice;
import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory;
import com.ruoyi.financial.service.IFinancialReceivablesService;
import com.ruoyi.financial.service.IFinancialTaxInvoiceHistoryService;
import com.ruoyi.financial.service.IFinancialTaxInvoiceService;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.system.domain.*;
@ -101,6 +103,10 @@ public class SysSalesOrderController extends BaseController
@Autowired
private IFinancialTaxInvoiceService taxInvoiceService;
@Autowired
private IFinancialTaxInvoiceHistoryService invoiceHistoryService;
@RequiresPermissions("system:salesOrder:view")
@GetMapping()
public String salesOrder(ModelMap mmap)
@ -623,11 +629,27 @@ public class SysSalesOrderController extends BaseController
*/
@ResponseBody
@PostMapping("/getSalesOrderCodeChildListByCode")
public TableDataInfo getSalesOrderCodeChildListByCode(@RequestParam("salesOrderCode") String salesOrderCode)
@PostMapping("/getSalesOrderChildListByCode")
public TableDataInfo getSalesOrderChildListByCode(@RequestParam("salesOrderCode") String salesOrderCode)
{
startPage();
List<SysSalesOrderChild> list = sysSalesOrderChildService.selectOrderChildListBySalesOrderCode(salesOrderCode);
return getDataTable(list);
}
/**
* 查询开票历史记录列表
*/
@ResponseBody
@PostMapping("/getInvoiceHistoryListBySalesOrderCode")
public TableDataInfo getInvoiceHistoryListBySalesOrderCode(@RequestParam("salesOrderCode") String salesOrderCode)
{
startPage();
List<FinancialTaxInvoiceHistory> list = invoiceHistoryService.selectInvoiceHistoryListBySalesOrderCode(salesOrderCode);
return getDataTable(list);
}
}

10
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java

@ -89,4 +89,14 @@ public interface SysCustomerMapper
int cancelSysCustomerById(Long id);
SysCustomerVo selectSysCustomerByCustomer(SysCustomerVo sysCustomerVo);
/*
* 通过客户名称查询客户详情
* */
SysCustomerVo selectSysCustomerByEnterpriseName(String enterpriseName);
/*
* 通过开票公司名称名称查询客户详情
* */
SysCustomerVo selectSysCustomerByInvoiceCompanyName(String invoicingCompanyName);
}

9
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysInvoiceMapper.java

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysInvoice;
import org.apache.ibatis.annotations.Param;
/**
* 其他开票信息Mapper接口
@ -80,4 +81,12 @@ public interface SysInvoiceMapper
* @return 结果
*/
public int restoreSysInvoiceById(Long id);
/**
* 根据客户名称查询客户信息
*
* @param invoiceCompanyName 客户名称
* @return 结果
*/
SysInvoice selectSysInvoiceByName(String invoiceCompanyName);
}

11
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java

@ -3,6 +3,7 @@ package com.ruoyi.system.service;
import com.ruoyi.aftersales.domain.dto.CustomerDto;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.domain.SysCustomerVo;
import com.ruoyi.system.domain.SysInvoice;
import org.activiti.engine.runtime.ProcessInstance;
import org.springframework.transaction.annotation.Transactional;
@ -99,4 +100,14 @@ public interface ISysCustomerService
List<SysCustomer> selectSysCustomerWithComplaintNotice();
List<SysCustomer> getMatchCustomerList(String customerCode);
/**
* 通过客户id查询开票公司信息
* */
List<SysInvoice> getInvoiceCompanyListByCode(String enterpriseCode);
/**
* 通过开票公司名称查询开票公司信息
* */
SysInvoice getSysInvoiceInfoByName(String invoiceCompanyName);
}

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

@ -14,6 +14,7 @@ import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.*;
import com.ruoyi.system.mapper.SysCustomerMapper;
import com.ruoyi.system.mapper.SysInvoiceMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysCustomerService;
import com.ruoyi.system.service.ISysInvoiceService;
@ -43,6 +44,9 @@ public class SysCustomerServiceImpl implements ISysCustomerService
@Autowired
private SysCustomerMapper sysCustomerMapper;
@Autowired
private SysInvoiceMapper sysInvoiceMapper;
@Autowired
private RedisCache redisCache;
@ -319,6 +323,59 @@ public class SysCustomerServiceImpl implements ISysCustomerService
return sysCustomerMapper.selectSysCustomerByCustomerId(enterpriseCode);
}
/**
* 通过客户id查询开票公司信息
* */
@Override
public List<SysInvoice> getInvoiceCompanyListByCode(String enterpriseCode) {
List<SysInvoice> sysInvoices = new ArrayList<>();
//SysCustomerVo sysCustomerVo = sysCustomerMapper.selectSysCustomerByEnterpriseCode(enterpriseCode);
List<SysInvoice> invoiceList = sysInvoiceService.selectSysInvoiceByCode(enterpriseCode);
// SysInvoice sysInvoice = new SysInvoice();
// sysInvoice.setBankAccount(sysCustomerVo.getBankAccount());
// sysInvoice.setDepositBank(sysCustomerVo.getDepositBank());
// sysInvoice.setEnterpriseCode(sysCustomerVo.getEnterpriseCode());
// sysInvoice.setEnterpriseName(sysCustomerVo.getEnterpriseName());
// sysInvoice.setInvoiceCompanyCode(sysCustomerVo.getInvoicingCustomerName());
// sysInvoice.setInvoiceCompanyName(sysCustomerVo.getInvoicingCompanyName());
//
// if (sysInvoice != null){
// sysInvoices.add(sysInvoice);
// }
sysInvoices.addAll(invoiceList);
return sysInvoices;
}
/**
* 通过开票公司名称查询开票公司信息
* */
@Override
public SysInvoice getSysInvoiceInfoByName(String invoiceCompanyName) {
SysInvoice sysInvoice = sysInvoiceMapper.selectSysInvoiceByName(invoiceCompanyName);
if (sysInvoice != null){
return sysInvoice;
}else {
SysInvoice tempSysInvoice = new SysInvoice();
SysCustomerVo sysCustomerVo = sysCustomerMapper.selectSysCustomerByInvoiceCompanyName(invoiceCompanyName);
tempSysInvoice.setBankAccount(sysCustomerVo.getBankAccount());
tempSysInvoice.setDepositBank(sysCustomerVo.getDepositBank());
tempSysInvoice.setEnterpriseCode(sysCustomerVo.getEnterpriseCode());
tempSysInvoice.setEnterpriseName(sysCustomerVo.getEnterpriseName());
tempSysInvoice.setInvoiceCompanyCode(sysCustomerVo.getInvoicingCustomerName());
tempSysInvoice.setInvoiceCompanyName(sysCustomerVo.getInvoicingCompanyName());
return tempSysInvoice;
}
}
@Override
public int add(SysCustomer sysCustomer) {
return sysCustomerMapper.insertSysCustomer(sysCustomer);

129
ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml

@ -0,0 +1,129 @@
<?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.financial.mapper.FinancialTaxInvoiceHistoryMapper">
<resultMap type="FinancialTaxInvoiceHistory" id="FinancialTaxInvoiceHistoryResult">
<result property="invoiceHistoryId" column="invoice_history_id" />
<result property="taxInvoiceCode" column="tax_invoice_code" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="taxInvoiceStatus" column="tax_invoice_status" />
<result property="applyTime" column="apply_time" />
<result property="financeMembers" column="finance_members" />
<result property="invoiceQuotaRatio" column="invoice_quota_ratio" />
<result property="invoiceAmountRmb" column="invoice_amount_rmb" />
<result property="invoiceAmountUsd" column="invoice_amount_usd" />
<result property="invoicePurpose" column="invoice_purpose" />
<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" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectFinancialTaxInvoiceHistoryVo">
select invoice_history_id, tax_invoice_code, sales_order_code, tax_invoice_status, apply_time, finance_members, invoice_quota_ratio, invoice_amount_rmb, invoice_amount_usd, invoice_purpose, create_by, create_time, update_by, update_time, remark, use_status, del_flag from financial_tax_invoice_history
</sql>
<select id="selectFinancialTaxInvoiceHistoryList" parameterType="FinancialTaxInvoiceHistory" resultMap="FinancialTaxInvoiceHistoryResult">
<include refid="selectFinancialTaxInvoiceHistoryVo"/>
<where>
</where>
</select>
<select id="selectFinancialTaxInvoiceHistoryById" parameterType="Long" resultMap="FinancialTaxInvoiceHistoryResult">
<include refid="selectFinancialTaxInvoiceHistoryVo"/>
where invoice_history_id = #{invoiceHistoryId}
</select>
<select id="selectInvoiceHistoryListBySalesOrderCode" parameterType="String" resultMap="FinancialTaxInvoiceHistoryResult">
<include refid="selectFinancialTaxInvoiceHistoryVo"/>
where sales_order_code = #{salesOrderCode}
</select>
<insert id="insertFinancialTaxInvoiceHistory" parameterType="FinancialTaxInvoiceHistory" useGeneratedKeys="true" keyProperty="invoiceHistoryId">
insert into financial_tax_invoice_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taxInvoiceCode != null">tax_invoice_code,</if>
<if test="salesOrderCode != null">sales_order_code,</if>
<if test="taxInvoiceStatus != null">tax_invoice_status,</if>
<if test="applyTime != null">apply_time,</if>
<if test="financeMembers != null">finance_members,</if>
<if test="invoiceQuotaRatio != null">invoice_quota_ratio,</if>
<if test="invoiceAmountRmb != null">invoice_amount_rmb,</if>
<if test="invoiceAmountUsd != null">invoice_amount_usd,</if>
<if test="invoicePurpose != null">invoice_purpose,</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>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taxInvoiceCode != null">#{taxInvoiceCode},</if>
<if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="taxInvoiceStatus != null">#{taxInvoiceStatus},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="financeMembers != null">#{financeMembers},</if>
<if test="invoiceQuotaRatio != null">#{invoiceQuotaRatio},</if>
<if test="invoiceAmountRmb != null">#{invoiceAmountRmb},</if>
<if test="invoiceAmountUsd != null">#{invoiceAmountUsd},</if>
<if test="invoicePurpose != null">#{invoicePurpose},</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>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateFinancialTaxInvoiceHistory" parameterType="FinancialTaxInvoiceHistory">
update financial_tax_invoice_history
<trim prefix="SET" suffixOverrides=",">
<if test="taxInvoiceCode != null">tax_invoice_code = #{taxInvoiceCode},</if>
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="taxInvoiceStatus != null">tax_invoice_status = #{taxInvoiceStatus},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="financeMembers != null">finance_members = #{financeMembers},</if>
<if test="invoiceQuotaRatio != null">invoice_quota_ratio = #{invoiceQuotaRatio},</if>
<if test="invoiceAmountRmb != null">invoice_amount_rmb = #{invoiceAmountRmb},</if>
<if test="invoiceAmountUsd != null">invoice_amount_usd = #{invoiceAmountUsd},</if>
<if test="invoicePurpose != null">invoice_purpose = #{invoicePurpose},</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>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where invoice_history_id = #{invoiceHistoryId}
</update>
<delete id="deleteFinancialTaxInvoiceHistoryById" parameterType="Long">
delete from financial_tax_invoice_history where invoice_history_id = #{invoiceHistoryId}
</delete>
<delete id="deleteFinancialTaxInvoiceHistoryByIds" parameterType="String">
delete from financial_tax_invoice_history where invoice_history_id in
<foreach item="invoiceHistoryId" collection="array" open="(" separator="," close=")">
#{invoiceHistoryId}
</foreach>
</delete>
<update id="cancelFinancialTaxInvoiceHistoryById" parameterType="Long">
update financial_tax_invoice_history set del_flag = '1' where invoice_history_id = #{invoiceHistoryId}
</update>
<update id="restoreFinancialTaxInvoiceHistoryById" parameterType="Long">
update financial_tax_invoice_history set del_flag = '0' where invoice_history_id = #{invoiceHistoryId}
</update>
</mapper>

14
ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml

@ -36,7 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="usdTaxSum" column="usdTaxSum" />
<result property="invoiceEmail" column="invoice_email" />
<result property="invoiceQuotaRatio" column="invoice_quota_ratio" />
<result property="invoiceAmount" column="invoice_amount" />
<result property="invoiceAmountRmb" column="invoice_amount_rmb" />
<result property="invoiceAmountUsd" column="invoice_amount_usd" />
<result property="actualInvoiceAmount" column="actual_invoice_amount" />
<result property="actualInvoiceAmountRmb" column="actual_invoice_amount_rmb" />
<result property="actualInvoiceAmountUsd" column="actual_invoice_amount_usd" />
@ -55,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectFinancialTaxInvoiceVo">
select tax_invoice_id, tax_invoice_code, tax_invoice_status, use_status, sales_order_code, sales_order_number, sales_order_type, tax_invoice_type, tax_invoice_class, tax_invoice_title, business_members, apply_user, enterprise_code, enterprise_name, contact_number, enterprise_address, common_currency, invoice_company_name, invoice_company_code, deposit_bank, bank_account, tax_rate, usd_tax, material_sum, enterprise_sum, noRmbSum, rmbTaxSum, noUsdSum, usdTaxSum, invoice_email, invoice_quota_ratio, invoice_amount, actual_invoice_amount, actual_invoice_amount_rmb, actual_invoice_amount_usd, invoice_purpose, business_remark, invoice_remark, invoice_data, invoice_code, invoice_phone, create_by, create_time, update_by, update_time, remark, del_flag from financial_tax_invoice
select tax_invoice_id, tax_invoice_code, tax_invoice_status, use_status, sales_order_code, sales_order_number, sales_order_type, tax_invoice_type, tax_invoice_class, tax_invoice_title, business_members, apply_user, enterprise_code, enterprise_name, contact_number, enterprise_address, common_currency, invoice_company_name, invoice_company_code, deposit_bank, bank_account, tax_rate, usd_tax, material_sum, enterprise_sum, noRmbSum, rmbTaxSum, noUsdSum, usdTaxSum, invoice_email, invoice_quota_ratio, invoice_amount_rmb, invoice_amount_usd, actual_invoice_amount, actual_invoice_amount_rmb, actual_invoice_amount_usd, invoice_purpose, business_remark, invoice_remark, invoice_data, invoice_code, invoice_phone, create_by, create_time, update_by, update_time, remark, del_flag from financial_tax_invoice
</sql>
<select id="selectFinancialTaxInvoiceList" parameterType="FinancialTaxInvoice" resultMap="FinancialTaxInvoiceResult">
@ -113,7 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usdTaxSum != null">usdTaxSum,</if>
<if test="invoiceEmail != null">invoice_email,</if>
<if test="invoiceQuotaRatio != null">invoice_quota_ratio,</if>
<if test="invoiceAmount != null">invoice_amount,</if>
<if test="invoiceAmountRmb != null">invoice_amount_rmb,</if>
<if test="invoiceAmountUsd != null">invoice_amount_usd,</if>
<if test="actualInvoiceAmount != null">actual_invoice_amount,</if>
<if test="actualInvoiceAmountRmb != null">actual_invoice_amount_rmb,</if>
<if test="actualInvoiceAmountUsd != null">actual_invoice_amount_usd,</if>
@ -161,7 +163,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usdTaxSum != null">#{usdTaxSum},</if>
<if test="invoiceEmail != null">#{invoiceEmail},</if>
<if test="invoiceQuotaRatio != null">#{invoiceQuotaRatio},</if>
<if test="invoiceAmount != null">#{invoiceAmount},</if>
<if test="invoiceAmountRmb != null">#{invoiceAmountRmb},</if>
<if test="invoiceAmountUsd != null">#{invoiceAmountUsd},</if>
<if test="actualInvoiceAmount != null">#{actualInvoiceAmount},</if>
<if test="actualInvoiceAmountRmb != null">#{actualInvoiceAmountRmb},</if>
<if test="actualInvoiceAmountUsd != null">#{actualInvoiceAmountUsd},</if>
@ -213,7 +216,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usdTaxSum != null">usdTaxSum = #{usdTaxSum},</if>
<if test="invoiceEmail != null">invoice_email = #{invoiceEmail},</if>
<if test="invoiceQuotaRatio != null">invoice_quota_ratio = #{invoiceQuotaRatio},</if>
<if test="invoiceAmount != null">invoice_amount = #{invoiceAmount},</if>
<if test="invoiceAmountRmb != null">invoice_amount_rmb = #{invoiceAmountRmb},</if>
<if test="invoiceAmountUsd != null">invoice_amount_usd = #{invoiceAmountUsd},</if>
<if test="actualInvoiceAmount != null">actual_invoice_amount = #{actualInvoiceAmount},</if>
<if test="actualInvoiceAmountRmb != null">actual_invoice_amount_rmb = #{actualInvoiceAmountRmb},</if>
<if test="actualInvoiceAmountUsd != null">actual_invoice_amount_usd = #{actualInvoiceAmountUsd},</if>

11
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -151,6 +151,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where enterprise_code = #{enterpriseCode}
</select>
<select id="selectSysCustomerByInvoiceCompanyName" parameterType="String" resultMap="SysCustomerResult">
<include refid="selectSysCustomerVo"/>
where invoicing_company_name = #{invoicingCompanyName}
</select>
<select id="selectSysCustomerByEnterpriseName" parameterType="String" resultMap="SysCustomerResult">
<include refid="selectSysCustomerVo"/>
where enterprise_name = #{enterpriseName}
</select>
<select id="selectSysCustomerByCustomer" parameterType="SysCustomerVo" resultMap="SysCustomerResult">
<include refid="selectSysCustomerVo"/>
where enterprise_name = #{enterpriseName} and customer_purser = #{customerPurser}
@ -353,4 +363,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where use_status = '1' and use_status = '1'
and enterprise_code like concat(#{prefix}, '%') escape '\\'
</select>
</mapper>

5
ruoyi-admin/src/main/resources/mapper/system/SysInvoiceMapper.xml

@ -44,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where enterprise_code = #{enterpriseCode}
</select>
<select id="selectSysInvoiceByName" parameterType="String" resultMap="SysInvoiceResult">
<include refid="selectSysInvoiceVo"/>
where invoice_company_name = #{invoiceCompanyName}
</select>
<insert id="insertSysInvoice" parameterType="SysInvoice" useGeneratedKeys="true" keyProperty="id">
insert into sys_invoice
<trim prefix="(" suffix=")" suffixOverrides=",">

2
ruoyi-admin/src/main/resources/templates/erp/material/select.html

@ -51,7 +51,7 @@
var options = {
id: 'bootstrap-select-table',
clickToSelect: true, // 点击选中行
singleSelect: true, // 单选
singleSelect: false, // 单选
url: prefix + "/selectList",
modalName: "物料信息",
columns: [

3
ruoyi-admin/src/main/resources/templates/financial/companyCost/companyCost.html

@ -44,6 +44,9 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="financial:companyCost:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="financial:companyCost:export">
<i class="fa fa-plus"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>

488
ruoyi-admin/src/main/resources/templates/index.html

@ -9,6 +9,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <link th:href="@{favicon.ico}" rel="shortcut icon"/>-->
<link rel="icon" href="../static/img/favicon.ico" type="image/x-icon" th:href="@{/img/favicon.ico}">
<link href="/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/bootstrapv4/bootstrap.min.css" th:href="@{/css/bootstrapv4/bootstrap.min.css}"
rel="stylesheet"/>
<link th:href="@{/css/jquery.contextMenu.min.css}" rel="stylesheet"/>
@ -126,62 +127,57 @@
</a>
</div>
<div class="collapse navbar-collapse">
<span class="header-title" style="padding: 0 0 0 30px ;font-size: 24px">
东莞万材智能设备有限公司
</span>
<span class="header-title" style="padding: 0 0 0 30px ;font-size: 24px">东莞万材智能设备有限公司</span>
<ul class="navbar-nav ml-auto">
<li>
<div class="dropdown">
<a class="dropdown-toggle" href="javascript:" data-toggle="dropdown"><i
class="icon feather icon-bell"></i></a>
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"
data-hover="dropdown" data-close-others="true">
<!-- 小圆点 -->
<i class="fa fa-rocket"></i>
<!-- 数量 -->
<span class="badge badge-default" id="todoBadge"></span>
</a>
<div class="dropdown-menu dropdown-menu-right notification">
<div class="noti-head">
<h6 class="d-inline-block m-b-0">Notifications</h6>
<h6 class="d-inline-block m-b-0">待办任务</h6>
<div class="float-right">
<a href="javascript:" class="m-r-10">mark as read</a>
<a href="javascript:">clear all</a>
<h8>你有<strong id="todoSize"></strong>任务</h8>
<!-- <a href="javascript:;" onclick="viewAllTasks();">查看全部</a>-->
</div>
</div>
<ul class="noti-body">
<li class="n-title">
<p class="m-b-0">NEW</p>
</li>
<!-- <li class="notification">-->
<!-- <div class="media">-->
<!-- <img class="img-radius" th:src="@{/img/user/avatar-2.jpg}" alt="Generic placeholder image">-->
<!-- <div class="media-body">-->
<!-- <p><strong>John Doe</strong><span class="n-time text-muted"><i class="icon feather icon-clock m-r-10"></i>30 min</span></p>-->
<!-- <p>New ticket Added</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </li>-->
<li class="n-title">
<p class="m-b-0">EARLIER</p>
</li>
<li class="notification" th:each="remind : ${reminds}" th:value="${remind.id}">
<div class="media">
<div class="media-body">
<p><strong th:text="${remind.remind}"></strong><span
class="n-time text-muted"><i
class="icon feather icon-clock m-r-10"></i><span
th:text="${remind.remindDate}"></span></span></p>
<p th:text="${remind.remindContent}"></p>
</div>
</div>
</li>
<!-- <li class="notification">-->
<!-- <div class="media">-->
<!-- <img class="img-radius" th:src="@{/img/user/avatar-2.jpg}" alt="Generic placeholder image">-->
<!-- <div class="media-body">-->
<!-- <p><strong>Sara Soudein</strong><span class="n-time text-muted"><i class="icon feather icon-clock m-r-10"></i>30 min</span></p>-->
<!-- <p>currently login</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </li>-->
<ul class="noti-body" id="todoItemList" style="height: 300px;overflow-y: scroll">
<li class="n-title"><p class="m-b-0">新的待办</p></li>
<!-- <li class="n-title"><p class="m-b-0">更早时候</p></li>-->
</ul>
<div class="noti-footer">
<a href="javascript:" onclick="viewAllTasks();">查看全部</a>
</div>
</div>
</div>
</li>
<li>
<div class="dropdown">
<a class="dropdown-toggle" href="javascript:" data-toggle="dropdown">
<i class="icon feather icon-bell"></i>
<span class="badge badge-default" id="remindBadge"></span>
</a>
<div class="dropdown-menu dropdown-menu-right notification">
<div class="noti-head">
<h6 class="d-inline-block m-b-0">消息提醒</h6>
<div class="float-right">
<h8>你有<strong id="remindSize"></strong>提醒</h8>
<!-- <a href="javascript:" class="m-r-10">已读</a>-->
<!-- <a href="javascript:">清除全部</a>-->
</div>
</div>
<ul class="noti-body" id="remindList">
<li class="n-title"><p class="m-b-0">新的提醒</p></li>
<!-- <li class="n-title"><p class="m-b-0">更早之前</p></li>-->
</ul>
<div class="noti-footer">
<a href="javascript:">show all</a>
<a href="javascript:">查看全部</a>
</div>
</div>
</div>
@ -202,14 +198,12 @@
</a>
</div>
<ul class="pro-body">
<li><a href="javascript:" class="dropdown-item menuItem"><i
class="feather icon-settings"></i> 个人中心</a></li>
<li><a href="javascript:" class="dropdown-item menuItem"><i
class="feather icon-user"></i> Profile</a></li>
<li><a href="javascript:" class="dropdown-item menuItem"><i
class="feather icon-mail"></i> 我的消息</a></li>
<li><a href="auth-signin.html" class="dropdown-item menuItem"><i
class="feather icon-lock"></i> 我的待办</a></li>
<!--<li><a href="javascript:" class="dropdown-item menuItem"><i class="feather icon-settings"></i>个人中心</a></li>-->
<li><a href="javascript:" onclick="viewMyProfile()" class="dropdown-item menuItem"><i class="feather icon-user"></i>个人中心</a></li>
<li><a href="javascript:" onclick="viewAllRequestItem()" class="dropdown-item menuItem"><i class="feather icon-mail"></i>我的请求</a></li>
<li><a href="javascript:" onclick="viewAllRemind()" class="dropdown-item menuItem"><i class="feather icon-bell"></i>我的提醒</a></li>
<li><a href="javascript:;" onclick="viewAllTasks()" class="dropdown-item menuItem" id="todoBadge2"><i class="feather icon-rocket"></i>我的待办</a></li>
<li><a href="javascript:;" onclick="viewAllDoneTasks()" class="dropdown-item menuItem" id="todoBadge3"><i class="feather icon-rocket"></i>我的已办</a></li>
</ul>
</div>
</div>
@ -242,7 +236,7 @@
<a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
<div class="row mainContent" id="content-main">
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" data-id="/system/main"
<iframe id="erpFrame" class="RuoYi_iframe" name="iframe0" width="100%" height="100%" data-id="/system/main"
th:src="@{/system/main}" frameborder="0" seamless></iframe>
</div>
@ -264,14 +258,12 @@
<script th:src="@{/js/bootstrapv4/js/bootstrap.min.js}"></script>
<script th:src="@{/js/pcoded.min.js}"></script>
<script th:src="@{/ruoyi/index.js?v=20201208}"></script>
<script th:inline="javascript">var loginName = [[${user.loginName}]]</script>
<script th:inline="javascript">
window.history.forward(1);
var ctx = [[@{/}]];
var lockscreen = [[${session.lockscreen}]];
if (lockscreen) {
window.top.location = ctx + "lockscreen";
}
if (lockscreen) {window.top.location = ctx + "lockscreen";}
// 皮肤缓存
var skin = storage.get("skin");
// history(表示去掉地址的#)否则地址以"#"形式展示
@ -368,21 +360,387 @@
});
}
$("[data-toggle='tooltip']").tooltip();
// if (loginName != "admin") {
getTodoItem();
getRemind();
// self.setInterval("getTodoItem()", 1000 * 20);
// self.setInterval("getRemind()", 1000 * 20);
// }
});
function getTodoItem() {
$.ajax({
url: ctx + 'process/todoitem/getTodoItemListNoPaging',//地址
success: function (data, status) {
if (status == 'success') {
$("#todoItemList").empty();
if (data.length > 0) {
$("#todoBadge").text(data.length);
$("#todoBadge2").append("<span class=\"badge badge-danger\">" + data.length + "</span>")
} else if (data.length == 0) {
$("#todoBadge").text('');
$("#todoBadge2 span").remove();
}
$("#todoSize").text(data.length + "项待办");
for (var i = 0; i < data.length; i++) {
var obj = data[i];
//console.log(obj);
var offset = transDate(obj.todoTime)
//$("#todoItemList").append("<li><a href="+ctx+obj.moduleUrl+"/edit/"+obj.keyNo+"> <span class=\"time\">"+transDate(obj.todoTime)+"</span> <span class=\"details\"> <span class=\"label label-sm label-icon label-info\"> <i class=\"fa fa-bullhorn\"></i></span>"+obj.itemName+"</span></a></li>");
var url = ctx + obj.moduleUrl + "/edit/" + obj.itemContent;
$("#todoItemList").append("<li class=\"todoItemLi\"><a href=\"javascript:;\" data-url="+url+"> <span class=\"time\">"+transDate(obj.todoTime)+"</span> <span class=\"details\"> <span class=\"label label-sm label-icon label-info\"> <i class=\"fa fa-bullhorn\"></i></span>"+obj.itemName+"</span></a></li>");
// $("#todoItemList").append(
// "<li class=\"todoItemLi notification \">" +
// "<div class='media'>" +
// "<div class='media-body'>"+
// "<a href=" + url + "><span class=\"time\">" + transDate(obj.todoTime) +"</span> " +
// "<span class=\"details\"><span class=\"label label-sm label-icon label-info\"><i class=\"fa fa-bullhorn\"></i>" + "</span>" + obj.itemName + "" + "</span></a></div></div></li>"
// );
}
}
}
})
}
//获取我的提醒
function getRemind() {
$.ajax({
url: ctx + 'remind/getRemindListNoPaging',//地址
success: function (data, status) {
//alert(data);
if (status == 'success') {
$("#remindList").empty();
if (data.length > 0) {
if (data.length > 10) {$("#remindBadge").text('10+');}
else {$("#remindSize").text(data.length + "项新");}
$("#remindBadge2").append("<span class=\"badge badge-danger\">" + data.length + "</span>")
} else if (data.length == 0) {
$("#remindBadge").text('');
$("#remindBadge2 span").remove();
}
if (data.length > 10) {
$("#remindSize").text('10+' + "项新");
} else {$("#remindSize").text(data.length + "项新");}
for (var i = 0; i < data.length; i++) {
var obj = data[i];
var offset = transDate(obj.remindDate)
var url = ctx + "remind/view/" + obj.id;
$("#remindList").append(
"<li class=\"remindLi\">" +
"<a href=" + url + "> " +
"<span class=\"time\">" + offset + "</span> " +
"<span class=\"details\"> " +
"<span class=\"label label-sm label-icon label-info\"> <i class=\"fa fa-bolt\"></i></span>" +
obj.formName +
"</span>" +
"</a>" +
"</li>");
}
}
}
})
}
//解决frame高度问题
function reinitIframe() {
var iframe = document.getElementById("erpFrame");
try {
//var bHeight = iframe.contentWindow.document.body.scrollHeight;
/* var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height; */
// iframe.height = bHeight;
/* var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
} */
//var bHeight = iframe.contentWindow.document.body.scrollHeight;
//var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
//var height = Math.min(bHeight, dHeight);
//iframe.height = height;
//iframe.height = iframe.document.body.scrollHeight;
//该方法有白边
/* var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.min(bHeight, dHeight);
iframe.height = height+50; */
/* var idoc = iframe.contentWindow && iframe.contentWindow.document || iframe.contentDocument;
var iheight = Math.min(idoc.body.scrollHeight, idoc.documentElement.scrollHeight); //取得其高
iframe.height = iheight+50; */
//有多余部分出现
// iframe.height=document.documentElement.clientHeight;
//显示不全
//iframe.height = iframe.document.body.scrollHeight;
//有多余部分出现
/* var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
} */
//显示不全
/* if (document.getElementById)
{
if (iframe && !window.opera)
{
if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight)
iframe.height = iframe.contentDocument.body.offsetHeight;
else if(iframe.Document && iframe.Document.body.scrollHeight)
iframe.height = iframe.Document.body.scrollHeight;
}
} */
/* alert(iframe.contentWindow.document.documentElement.scrollHeight);
alert(iframe.contentDocument.body.offsetHeight);
alert(iframe.contentWindow.document.body.scrollHeight); */
} catch (ex) {
}
}
//下拉项设置
$('.menuItem').click(function () {
var dataUrl = $(this).attr('href');
var itemText = $(this).text();
//console.log(dataUrl);
//console.log(itemText);
//设置frame路径
$('#erpFrame').attr("src", dataUrl);
//取消悬浮
$('.menu-dropdown').removeClass('open');
//修改导航条下面的内容
$('.page-title').find("h1").html(itemText + "<small></small>");
//修改菜单选中
//清除选中
clearActive();
//清除面包屑
$('.page-breadcrumb>li').remove();
//设置选中
$(this).parent().addClass("active");
//alert($(this).parent().parent().parent("li").length);
if ($(this).parent().parent().parent("li").length != 0) {
$(this).parent().parent().parent().addClass("active");
if ($(this).parent().parent().parent().parent().parent("li").length != 0) {
$(this).parent().parent().parent().parent().parent().addClass("active");
//alert($(this).parent().parent().parent().children("a").text().trim());
if ($(this).parent().parent().parent().parent().parent().parent().parent("li").length != 0) {
$(this).parent().parent().parent().parent().parent().parent().parent().addClass("active");
/* $('.page-breadcrumb').append(
'<li><a href='+ctx+'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">'
+ $(this).parent().parent().parent().parent().parent().children("a").text().trim() + '</a> <i class="fa fa-circle"></i></li><li class="active">'
+ itemText + '</li>'); */
$('.page-breadcrumb').append(
'<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">'
+ $(this).parent().parent().parent().parent().parent().parent().parent().children("a").text().trim() + '</a> <i class="fa fa-circle"></i></li><li><a href="#">'
+ $(this).parent().parent().parent().parent().parent().children("a").text().trim() + '</a> <i class="fa fa-circle"></i></li><li><a href="#">'
+ $(this).parent().parent().parent().children("a").text().trim() + '</a> <i class="fa fa-circle"></i></li><li class="active">'
+ itemText + '</li>');
} else {
$('.page-breadcrumb').append(
'<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">'
+ $(this).parent().parent().parent().parent().parent().children("a").text().trim() + '</a> <i class="fa fa-circle"></i></li><li><a href="#">'
+ $(this).parent().parent().parent().children("a").text().trim() + '</a> <i class="fa fa-circle"></i></li><li class="active">'
+ itemText + '</li>');
}
} else {
$('.page-breadcrumb').append(
'<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">'
+ $(this).parent().parent().parent().children("a").text().trim() + '</a> <i class="fa fa-circle"></i></li><li class="active">'
+ itemText + '</li>');
}
} else {
//home和自己
$('.page-breadcrumb').append('<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li class="active">' + itemText + '</li>');
}
$(".page-header .menu-toggler").click();
return false;
})
//查看所有待办任务
function viewAllTasks() {
//控制iframe跳转
$('#erpFrame').attr("src", ctx + "process/todoitem");
$('.page-title').find("h1").html("我的待办" + "<small></small>");
//清除面包屑
$('.page-breadcrumb>li').remove();
$('.page-breadcrumb').append(
'<li>' +'<a href=' + ctx + 'index' + '>Home</a><i class="fa fa-circle"></i></li>' +
' <li>' +'<a href="#">我的待办</a> ' +' <i class= "fa fa-circle"></i>' +'</li>' +'<li class="active">我的待办</li>'
);
//清除选中
clearActive();
//控制选中
/* $('#flowManager').addClass("active");
$('#myTodoParent').addClass("active");
$('#myTodo').addClass("active");*/
}
//查看所有提醒
function viewAllRemind() {
//控制iframe跳转
$('#erpFrame').attr("src", ctx + "remind");
$('.page-title').find("h1").html("我的提醒" + "<small></small>");
//清除面包屑
$('.page-breadcrumb>li').remove();
$('.page-breadcrumb').append(
'<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">我的提醒</a> <i class="fa fa-circle"></i></li><li class="active">我的提醒</li>');
//清除选中
clearActive();
//控制选中
$('#flowManager').addClass("active");
$('#myRemindParent').addClass("active");
$('#myRemind').addClass("active");
}
//所需单据绑定回车键
$('#allSearch').bind('keydown', function (event) {
if (event.keyCode == "13") {
viewAllselect();
}
});
//查看所有提醒
function viewAllselect() {
//控制iframe跳转
var value = $('#allSearch').val();
$('#erpFrame').attr("src", ctx + "remind/");
$('.page-title').find("h1").html("我的提醒" + "<small></small>");
//清除面包屑
$('.page-breadcrumb>li').remove();
$('.page-breadcrumb').append(
'<li><a href='+ctx+'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">我的提醒</a> <i class="fa fa-circle"></i></li><li class="active">我的提醒</li>');
//清除选中
clearActive();
//控制选中
/*$('#flowManager').addClass("active");
$('#myRemindParent').addClass("active");
$('#myRemind').addClass("active"); */
}
//查看个人资料
function viewMyProfile() {
//控制iframe跳转
$('#erpFrame').attr("src", ctx + "system/user/profile");
$('.page-title').find("h1").html("我的个人资料" + "<small></small>");
//清除面包屑
$('.page-breadcrumb>li').remove();
$('.page-breadcrumb').append(
'<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">我的个人资料</a> <i class="fa fa-circle"></i></li><li class="active">我的个人资料</li>');
//清除选中
clearActive();
}
//新建流程
//我的请求
function viewAllRequestItem() {
//控制iframe跳转
$('#erpFrame').attr("src", ctx + "process/requestitem");
$('.page-title').find("h1").html("我的请求" + "<small></small>");
//清除面包屑
$('.page-breadcrumb>li').remove();
$('.page-breadcrumb').append(
'<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">我的请求</a> <i class="fa fa-circle"></i></li><li class="active">我的请求</li>');
//清除选中
clearActive();
//控制选中
/*$('#flowManager').addClass("active");
$('#myTodoParent').addClass("active");
$('#myTodo').addClass("active");*/
}
//我的已办
function viewAllDoneTasks() {
//控制iframe跳转
$('#erpFrame').attr("src", ctx + "process/doneitemView");
$('.page-title').find("h1").html("我的已办" + "<small></small>");
//清除面包屑
$('.page-breadcrumb>li').remove();
$('.page-breadcrumb').append(
'<li><a href=' + ctx + 'index>Home</a><i class="fa fa-circle"></i></li><li><a href="#">我的已办</a> <i class="fa fa-circle"></i></li><li class="active">我的已办</li>');
//清除选中
clearActive();
//控制选中
/*$('#flowManager').addClass("active");
$('#myTodoParent').addClass("active");
$('#myTodo').addClass("active");*/
}
//清除选中
function clearActive() {
$('.menuItem').parent().removeClass("active");
if ($('.menuItem').parent().parent().parent("li").length != 0) {
$('.menuItem').parent().parent().parent().removeClass("active");
if ($('.menuItem').parent().parent().parent().parent().parent("li").length != 0) {
$('.menuItem').parent().parent().parent().parent().parent().removeClass("active");
if ($('.menuItem').parent().parent().parent().parent().parent().parent().parent("li").length != 0) {
$('.menuItem').parent().parent().parent().parent().parent().parent().parent().removeClass("active");
}
}
}
}
// 计算耗时
function transDate(todoTime) {
date = new Date(todoTime);
var tt = date;
var days = parseInt((new Date().getTime() - date) / 86400000);
var today = new Date().getDate();
var year = tt.getFullYear();
var mouth = tt.getMonth() + 1;
var day = tt.getDate();
var time = tt.getHours() < 10 ? "0" + tt.getHours() : tt.getHours();
var min = tt.getMinutes() < 10 ? "0" + tt.getMinutes() : tt.getMinutes();
var result, offset;
offset = Math.abs(today - day);
if (days < 4 && offset < 4) {
if (offset === 0) {
result = "今天" + time + ":" + min;
} else if (offset === 1) {
result = "昨天" + time + ":" + min;
} else if (offset === 2) {
result = "前天" + time + ":" + min;
} else if (offset === 3) {
result = "3天前" + time + ":" + min;
}
} else {
// result = year + "-" + mouth + "-" + day + " " + time + ":" + min;
result = "3天以前";
}
return result;
}
$('#todoItemList').on('click', 'li', function (e) {
var dataUrl = $(this).children('a').attr('href');
//console.log(aa);
$('#erpFrame').attr("src", dataUrl);
return false;
});
$('#remindList').on('click', 'li', function (e) {
var dataUrl = $(this).children('a').attr('href');
//console.log(aa);
$('#erpFrame').attr("src", dataUrl);
return false;
});
$(".notification").on("click", function () {
let id = $(this).val();
$.ajax({
url: ctx + "buyorderHead/buyOrderList/changeView",
url: ctx + "remind/getRemindListNoPaging",
type: "post",
dataType: "json",
data: {"id": id},
success: function (resp) {
if (resp.code === 1) {
$.modal.msgError("阅读失败!");
}else {
$("li[value='"+id+"']").css("display","none")
}
$("li[value='"+id+"']").css("display","none")
},
error: function () {
$.modal.msgError("出错了!");

129
ruoyi-admin/src/main/resources/templates/remind/remind.html

@ -0,0 +1,129 @@
<!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('消息提醒')" />
<th:block th:include="include :: select2-css" />
</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="params[materialNo]"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</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="useStatus" th:with="type=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>工程员:</label>
<select id="createBySel" name="businessMembers">
<option value="">所有</option>
</select>
</li>
<li class="select-time">
<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>
<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">
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var prefix = ctx + "remind";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
itemUrl: prefix + "/item",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
detailUrl: prefix + "/detail/{id}",
pageList: [10, 25, 50],
pageSize: 10,
showColumns: true,
modalName: "消息提醒",
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
height: $(window).height() - 100,
columns: [
{checkbox: true},
{field: 'id', title: '序号', align: 'center'},
{field: 'remindName', title: '提醒人', align: 'center'},
{field: 'remindDeptName', title: '提醒人部门', align: 'center'},
{field: 'remindDate', title: '提醒时间', align: 'center'},
{field: 'formUrl', title: '表单地址', align: 'center', visible: false},
{field: 'formName', title: '表单', align: 'center'},
{
field: 'remindContent', title: '提醒内容', align: 'center',
cellStyle: 'colStyle', //缩放
formatter: 'hoverShow', //鼠标停留显示
},
{field: 'receiverName', title: '接收人', align: 'center'},
{
field: 'isView', title: '是否查看', align: 'center',
formatter: function (value, row, index) {
if (value == "0") {
return "否";
}
return "是";
}
},
{
title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="' + ctx + "remind/view/" + row.id + '"><i class="fa fa-user"></i> 表单数据</a> ');
return actions.join('');
}
}
],
onLoadError: function (status, res) {
window.location.href = "/login";
},
onClickRow: function (row, $element) {
}
};
$.table.init(options);
});
</script>
</body>
</html>

180
ruoyi-admin/src/main/resources/templates/remind/view.html

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('我的提醒')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: theme" />
<th:block th:include="include :: bootstrap-datepicker-css" />
<th:block th:include="include :: bootstrap-table-css" />
<th:block th:include="include :: bootstrap-table-editable-css" />
<th:block th:include="include :: fileinput-css" />
<style type="text/css">
html, body {
height: 100%;
}
</style>
</head>
<body style="overflow-x: hidden;">
<div style="background-color: #eff3f8; padding-top: 1px; height: 100%;">
<div class="modal fade" id="portlet-config" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true"></button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">Widget settings form goes here</div>
<div class="modal-footer">
<button type="button" class="btn blue">Save changes</button>
<button type="button" class="btn default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet light bordered">
<div class="portlet-title">
<div class="caption">
<i class="icon-equalizer font-red-sunglo"></i> <span
class="caption-subject font-red-sunglo bold uppercase">我的提醒</span>
</div>
<div class="tools">
<a href="" class="collapse" data-original-title="" title="">
</a> <a href="#portlet-config" data-toggle="modal" class="config"
data-original-title="" title=""> </a> <a href="" class="reload"
data-original-title="" title=""> </a> <a href="" class="remove"
data-original-title="" title=""> </a>
</div>
</div>
<div class="portlet-body form">
<form th:action="@{/remind/add}" id="remindForm"
name="remindForm" method="post" enctype="multipart/form-data">
<div class="form-body">
<input type="hidden" name="table1" id="table1">
<div class="row">
<div class="col-md-12" align="center">
<h1>我的提醒</h1>
</div>
</div>
<div class="row" style="display: none">
<div class="col-md-12" align="center">
<input type="text" class="form-control" name="id"
id="id">
</div>
</div>
<div class="row">
<div class="col-md-2" align="center">提醒人</div>
<div class="col-md-2">
<input type="text" class="form-control" name="remindName"
id="remindName" readOnly>
</div>
<div class="col-md-2" align="center">提醒人部门</div>
<div class="col-md-2">
<input type="text" class="form-control" name="remindDeptName"
id="remindDeptName" readOnly>
</div>
<div class="col-md-2" align="center">提醒时间</div>
<div class="col-md-2">
<input
class="form-control form-control-inline input-medium date-picker"
size="16" type="text" data-date-format="yyyy-mm-dd" disabled
name="remindDate" id="remindDate" />
</div>
</div>
<div class="row">
<div class="col-md-2" align="center">表单</div>
<div class="col-md-2">
<a class="form-control" id="formUrl" name="formUrl"></a>
</div>
</div>
<div class="row">
<div class="col-md-2" align="center">提醒内容</div>
<div class="col-md-10">
<textarea rows="8" cols="10" class="form-control" name="remindContent"
id="remindContent" readOnly></textarea>
</div>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-12">
<div class="row">
<div align="center">
<button type="button" class="btn gray-haze" id="cancel">
取消</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: page-js" />
<th:block th:include="include :: bootstrap-datepicker-js" />
<th:block th:include="include :: bootstrap-table-js" />
<th:block th:include="include :: fileinput-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">id = [[${id}]];</script>
<script th:src="@{/assets/admin/pages/scripts/components-pickers.js}"
type="text/javascript"></script>
<script>
var prefix = ctx + "remind";
jQuery(document).ready(function() {
Metronic.init(); // init metronic core components
Layout.init(); // init current layout
Demo.init(); // init demo features
ComponentsPickers.init();
});
$.ajax({
url : prefix + '/edit',
data : {
id : id
},
success : function(data) {
console.log(data);
}
});
$.ajax({
url : prefix + '/getRemind',
data : {
id : id
},
success : function(data) {
//赋值
$('#id').val(data.id);
$('#remindName').val(data.remindName);
$('#remindDeptName').val(data.remindDeptName);
$('#remindDate').val(data.remindDate);
$('#formUrl').attr("href",ctx+data.formUrl);
$('#formUrl').text(data.formName);
$('#remindContent').val(data.remindContent);
}
});
$("#cancel").click(function() {
//拦截器拦截session失效登录跳转
window.history.back();
})
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>

201
ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html

@ -61,31 +61,35 @@
<div class="form-group">
<label class="col-sm-5 control-label">开票公司名称:</label>
<div class="col-sm-7">
<input name="invoiceCompanyName" th:field="*{invoiceCompanyName}" class="form-control" type="text">
<select class="form-control" id="invoiceCompanyName" name="invoiceCompanyName" th:field="*{invoiceCompanyName}">
<!-- 这里动态生成开票公司名称选项 -->
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">开票公司税号:</label>
<div class="col-sm-7">
<input name="invoiceCompanyCode" th:field="*{invoiceCompanyCode}" class="form-control" type="text">
<input name="invoiceCompanyCode" th:field="*{invoiceCompanyCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">公司开户行:</label>
<div class="col-sm-7">
<input name="depositBank" th:field="*{depositBank}" class="form-control" type="text">
<input name="depositBank" th:field="*{depositBank}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">公司开户账号:</label>
<div class="col-sm-7">
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text">
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">税率:</label>
<div class="col-sm-7">
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text">
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text" readonly>
</div>
</div>
@ -120,19 +124,6 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">业务人员:</label>
<div class="col-sm-7">
<input name="businessMembers" th:field="*{businessMembers}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">申请人:</label>
<div class="col-sm-7">
<input name="applyUser" th:field="*{applyUser}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">邮箱:</label>
<div class="col-sm-7">
@ -210,9 +201,9 @@
</div>
<div class="form-group">
<label class="col-sm-5 control-label">开票金额:</label>
<label class="col-sm-5 control-label">开票金额(RMB)</label>
<div class="col-sm-7">
<input name="invoiceAmount" th:field="*{invoiceAmount}" class="form-control" type="text">
<input name="invoiceAmountUsd" th:field="*{invoiceAmountUsd}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@ -233,6 +224,9 @@
var materialProcessMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var taxInvoiceStatusDatas = [[${@dict.getType('tax_invoice_status')}]];
var taxInvoice = [[${taxInvoice}]];
var prefix = ctx + "system/salesOrder"
$("#form-taxInvoice-RMBAdd").validate({
@ -280,11 +274,11 @@
}
//开票物料
$(function() {
var options = {
id: 'bootstrap-table-material',
url: prefix + "/getSalesOrderCodeChildListByCode",
url: prefix + "/getSalesOrderChildListByCode",
queryParams: function(params) {
return {
salesOrderCode: $("#salesOrderCode").val(),
@ -371,6 +365,169 @@
});
//开票历史
$(function() {
var options = {
id: 'bootstrap-table-history',
url: prefix + "/getInvoiceHistoryListBySalesOrderCode",
queryParams: function(params) {
return {
salesOrderCode: $("#salesOrderCode").val(),
}
},
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
modalName: "国税发票历史记录",
columns: [{
checkbox: true
},
{
title: '国税发票历史id',
field: 'invoiceHistoryId',
visible: false
},
{
title: '国税发票单号',
field: 'taxInvoiceCode',
},
{
title: '发票状态', //(0待审核、1待开具、2已开具、3审核拒绝)
field: 'taxInvoiceStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(taxInvoiceStatusDatas, value);
}
},
{
title: '申请时间',
field: 'applyTime',
},
{
title: '财务员',
field: 'financeMembers',
},
{
title: '开票额度比例',
field: 'invoiceQuotaRatio',
},
{
title: '开票金额(RMB)',
field: 'invoiceAmountRmb',
},
{
title: '开票用途',
field: 'invoicePurpose',
},
{
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.invoiceHistoryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
//获取客户发票信息
$(document).ready(function() {
// 初始化时默认加载客户编号列表
loadInvoiceCompanyNames();
// 监听开票公司名称下拉框的变化
$('#invoiceCompanyName').on('change', function() {
var selectedInvoiceCompanyName = $(this).val(); // 获取选中的开票公司名称
if (selectedInvoiceCompanyName) {
// 发起Ajax请求获取客户名称
$.ajax({
type: 'POST',
url: ctx + 'system/customer/getSysInvoiceInfoByName',
dataType: 'json', // 假设返回的数据格式是JSON
data: { invoiceCompanyName: selectedInvoiceCompanyName }, // 数据放在这里
success: function(data) {
console.log(data);
// 将获取到的客户名称填充到输入框
if (!data || !data.data) {
// 如果返回的数据有问题,可以给出提示或处理
$.modal.alertWarning('未能获取到开票公司信息!');
} else {
fillInvoiceDetails(data.data);
}
},
error: function(jqXHR, textStatus, errorThrown) {
console.error('Error:', textStatus, errorThrown);
$.modal.alertWarning('查询开票公司名称时发生错误!');
}
});
} else {
// 如果没有选择开票公司名称,清开票信息输入框
clearInvoiceDetails();
}
});
});
// 封装填充发票详情的函数
function fillInvoiceDetails(details) {
$('input[name="invoiceCompanyCode"]').val(details.invoiceCompanyCode);
$('input[name="depositBank"]').val(details.depositBank);
$('input[name="bankAccount"]').val(details.bankAccount);
}
// 封装清空发票详情的函数
function clearInvoiceDetails() {
$('input[name="invoiceCompanyCode"]').val('');
$('input[name="depositBank"]').val('');
$('input[name="bankAccount"]').val('');
}
// 假设的加载客户编号列表函数
function loadInvoiceCompanyNames() {
var enterpriseCode = $("#enterpriseCode").val();
var url = ctx + 'system/customer/getAllInvoiceCompanyNameByCode' + '?enterpriseCode=' + enterpriseCode;
var tempInvoiceCompanyName = taxInvoice.invoiceCompanyName;
$.ajax({
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
success: function(data) {
if (data && Array.isArray(data)) {
var selectElement = $('#invoiceCompanyName'); // 获取开票公司名称下拉框元素
// 清空下拉框现有选项
selectElement.empty();
// 添加默认选项
if (tempInvoiceCompanyName) {
selectElement.append('<option value="' + tempInvoiceCompanyName + '">' + tempInvoiceCompanyName + '</option>');
}
// 遍历返回的数据,添加为下拉框的选项
$.each(data, function(index, item) {
// 假设item有invoiceCompanyName属性,代表客户名称
selectElement.append('<option value="' + item.invoiceCompanyName + '">' + item.invoiceCompanyName + '</option>');
});
// 设置默认值
if (tempInvoiceCompanyName) {
selectElement.val(tempInvoiceCompanyName);
}
} else {
$.modal.errMsg("开票公司信息为空");
}
},
});
}
</script>
</body>
</html>

27
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java

@ -2,6 +2,8 @@ package com.ruoyi.system.mapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@ -137,4 +139,29 @@ public interface SysUserMapper
List<Map<String,String>> selectUserSelList(String userName);
List<SysUser> selectRoleToUserList(String[] roleKeys);
/**
* 根据角色名称查找用户
* @param roleKey
* @return
*/
@Select("select a.login_name from sys_user a,sys_role b,sys_user_role c\r\n" +
"where a.del_flag = 0 and a.status = 0\r\n" +
"and b.del_flag = 0 and b.status = 0\r\n" +
"and b.role_id = c.role_id\r\n" +
"and a.user_id = c.user_id\r\n" +
"and b.role_key = #{roleKey} order by a.login_name ")
public String selectUserByUniqueRolekey(String roleKey);
@Select("select a.user_name as userName,a.login_name as loginName from sys_user a,sys_dept b where a.dept_id = b.dept_id and b.dept_name=#{deptName} and a.status = 0 and a.del_flag = 0")
public List<SysUser> selectUserByDeptName(String deptName);
/**
* 查询部门领导
* @param roleKey
* @param deptId
* @return
*/
@Select("select login_name from sys_user a,sys_user_role b,sys_role c where a.user_id = b.user_id and b.role_id = c.role_id and a.dept_id=#{deptId} and c.role_key= #{roleKey} and a.del_flag = 0 and a.status = 0")
public String selectDeptLeaderId(@Param(value = "roleKey") String roleKey, @Param(value = "deptId") Long deptId);
}

Loading…
Cancel
Save