Merge branch 'master'

# Conflicts:
#	src/main/java/com/bonus/boot/manager/basic/controller/DownloadController.java
#	src/main/java/com/bonus/boot/manager/ca/bm/entity/PayAccountInfoBean.java
#	src/main/java/com/bonus/boot/manager/ca/bm/service/impl/PayAccountInfoServiceImpl.java
#	src/main/java/com/bonus/boot/manager/ca/im/controller/PayableController.java
#	src/main/java/com/bonus/boot/manager/ca/im/dao/PayableDao.java
#	src/main/java/com/bonus/boot/manager/ca/im/entity/PayableBean.java
#	src/main/java/com/bonus/boot/manager/ca/im/service/PayableService.java
#	src/main/java/com/bonus/boot/manager/ca/im/service/impl/PayableServiceImpl.java
#	src/main/java/com/bonus/boot/manager/manager/utils/ImportNoPhotoExcelHelper.java
#	src/main/java/com/bonus/boot/manager/wages/entity/WagesDetailsBean.java
#	src/main/java/com/bonus/boot/manager/wages/service/impl/WagesServiceImpl.java
#	src/main/java/com/bonus/boot/manager/wages/service/impl/WagesStaticsServiceImpl.java
#	src/main/resources/application.properties
#	src/main/resources/download/招商银行工资导入模板.xlsx
#	src/main/resources/mappers/ca/PayAccountInfoMapper.xml
#	src/main/resources/mappers/ca/PayableMapper.xml
#	src/main/resources/mappers/logs/SysLogsMapper.xml
#	src/main/resources/mappers/wages/WagesMapper.xml
#	src/main/resources/mappers/wages/WagesStaticsMapper.xml
#	src/main/resources/static/js/common.js
#	src/main/resources/static/pages/finance/addPayable.html
#	src/main/resources/static/pages/finance/addPaymentAccount.html
#	src/main/resources/static/pages/finance/payable.html
#	src/main/resources/static/pages/finance/paymentAccount.html
#	src/main/resources/static/pages/wages/uploadReceipt.html
#	src/main/resources/static/pages/wages/uploadWages.html
#	src/main/resources/static/pages/wages/uploadWagesTwo.html
#	src/main/resources/static/pages/wages/wagesStaticsList.html
#	src/main/resources/static/pages/work/SysLogManage.html
This commit is contained in:
fl 2025-04-28 18:54:56 +08:00
commit 4e8cee4ef0
30 changed files with 522 additions and 125 deletions

View File

@ -23,6 +23,7 @@ import java.net.URLConnection;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Objects;
@Api(tags = "下载")
@RestController
@ -53,6 +54,11 @@ public class DownloadController {
response.addHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.addHeader("charset", "utf-8");
response.addHeader("Pragma", "no-cache");
if(Objects.equals(filename,"zh_model.xlsx")){ // 招行新模版
filename = "招商银行工资导入模板(新).xlsx";
}else if(Objects.equals(filename,"jh_gy_gzc.xlsx")){ // 建行贵阳新模版
filename = "建设银行工资导入模板(贵阳).xlsx";
}
String encodeName = URLEncoder.encode(filename, StandardCharsets.UTF_8.toString());
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodeName + "\"; filename*=utf-8''" + encodeName);

View File

@ -16,4 +16,33 @@ public class PayAccountInfoBean {
*/
String accountNumber;
/**
* 账户名
*/
String accountName;
/**
* 农民工工资代发账户
*/
String specialAccountSuffix;
/**
* 专户属地
*/
String accountTerritory;
/**
* 开户行
*/
String openingBank;
/**
* 开户行地址
*/
String openingBankAddress;
/**
* 开户日期
*/
String openingAccountDate;
}

View File

@ -93,30 +93,40 @@ public class PayAccountInfoServiceImpl implements PayAccountInfoService {
}
// 导出标题
ExcelWriter writer = cn.hutool.poi.excel.ExcelUtil.getWriter(true);
writer.merge(5, fileName,false);
writer.merge(8, fileName,false);
// 合并二级表头
writer.writeCellValue(0,1,"序号");
writer.setColumnWidth(0, 8);
writer.writeCellValue(1,1,"账户名称");
writer.writeCellValue(1,1,"账户名称");
writer.setColumnWidth(1, 25);
writer.writeCellValue(2,1,"账户");
writer.setColumnWidth(2, 35);
writer.writeCellValue(3,1,"备注");
writer.writeCellValue(3,1,"开户行");
writer.setColumnWidth(3, 35);
writer.writeCellValue(4,1,"操作人");
writer.setColumnWidth(4, 10);
writer.writeCellValue(5,1,"操作时间");
writer.setColumnWidth(5, 25);
writer.writeCellValue(4,1,"开户行地址");
writer.setColumnWidth(4, 35);
writer.writeCellValue(5,1,"开户时间");
writer.setColumnWidth(4, 35);
writer.writeCellValue(6,1,"备注");
writer.setColumnWidth(5, 35);
writer.writeCellValue(7,1,"操作人");
writer.setColumnWidth(6, 10);
writer.writeCellValue(8,1,"操作时间");
writer.setColumnWidth(8, 45);
// 设置表头高度单元格宽度
writer.setRowHeight(0, 35);
for (int i = 0; i < list.size(); i++) {
writer.writeCellValue(0, 2 + i, i + 1);
writer.writeCellValue(1, 2 + i, list.get(i).getName()==null?"":list.get(i).getName());
writer.writeCellValue(2, 2 + i, list.get(i).getAccountNumber()==null?"":list.get(i).getAccountNumber());
writer.writeCellValue(3, 2 + i, list.get(i).getRemarks()==null?"":list.get(i).getRemarks());
writer.writeCellValue(4, 2 + i, list.get(i).getCzyName()==null?"":list.get(i).getCzyName());
writer.writeCellValue(5, 2 + i, list.get(i).getCzsj()==null?"":list.get(i).getCzsj());
writer.writeCellValue(3, 2 + i, list.get(i).getOpeningBank()==null?"":list.get(i).getOpeningBank());
writer.writeCellValue(4, 2 + i, list.get(i).getOpeningBankAddress()==null?"":list.get(i).getOpeningBankAddress());
writer.writeCellValue(5, 2 + i, list.get(i).getOpeningAccountDate()==null?"":list.get(i).getOpeningAccountDate());
writer.writeCellValue(6, 2 + i, list.get(i).getRemarks()==null?"":list.get(i).getRemarks());
writer.writeCellValue(7, 2 + i, list.get(i).getCzyName()==null?"":list.get(i).getCzyName());
writer.writeCellValue(8, 2 + i, list.get(i).getCzsj()==null?"":list.get(i).getCzsj());
writer.setRowHeight(2 + i, 35);
}
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");

View File

@ -104,6 +104,13 @@ public class PayableController {
return dao.getFKZH();
}
@LogAnnotation
@GetMapping("/getBankAccount")
@ApiOperation(value = "银行账号下拉选")
public List<PayAccountInfoBean> getBankAccount() {
return dao.getBankAccount();
}
@PostMapping("/getUnit")
@ApiOperation(value = "查询")
@PreAuthorize("hasAuthority('sys:unit:query')")

View File

@ -83,4 +83,6 @@ public interface PayableDao {
List<Integer> getHTIDByMC(String htmc);
List<PayAccountInfoBean> getBankAccount();
}

View File

@ -52,5 +52,8 @@ public class PayableBean {
String gyssl;//供应商数量
String ht;//对应的合同id
String department;//组织机构
Integer accountId;//应付款账号
String accountName;//应付款账号
Integer personNum;//人次
}

View File

@ -1,6 +1,7 @@
package com.bonus.boot.manager.ca.im.service;
import com.bonus.boot.manager.ca.bm.entity.PayAccountInfoBean;
import com.bonus.boot.manager.ca.bm.entity.SupplierInfoBean;
import com.bonus.boot.manager.ca.im.entity.PayableBean;

View File

@ -2,6 +2,7 @@ package com.bonus.boot.manager.ca.im.service.impl;
import cn.hutool.core.io.IoUtil;
import cn.hutool.poi.excel.ExcelWriter;
import com.bonus.boot.manager.ca.bm.entity.PayAccountInfoBean;
import com.bonus.boot.manager.ca.bm.entity.SupplierInfoBean;
import com.bonus.boot.manager.ca.im.dao.PayableDao;
import com.bonus.boot.manager.ca.im.entity.PayableBean;
@ -71,7 +72,6 @@ public class PayableServiceImpl implements PayableService {
List<Long> integerList = new ArrayList<>();
collect.forEach((k,v) -> integerList.add(v));
String fileName = "应付录入信息";
//记录用于合并的rowIndex
ArrayList<HashMap<String, Integer>> mergeRows = new ArrayList<>();
@ -90,7 +90,7 @@ public class PayableServiceImpl implements PayableService {
}
// 导出标题
ExcelWriter writer = cn.hutool.poi.excel.ExcelUtil.getWriter(true);
writer.merge(12, fileName,false);
writer.merge(14, fileName,false);
// 合并二级表头
writer.writeCellValue(0,1,"序号");
@ -109,16 +109,20 @@ public class PayableServiceImpl implements PayableService {
writer.setColumnWidth(6, 15);
writer.writeCellValue(7,1,"商品名称");
writer.setColumnWidth(7, 15);
writer.writeCellValue(8,1,"金额");
writer.writeCellValue(8,1,"付款账号");
writer.setColumnWidth(8, 15);
writer.writeCellValue(9,1,"发票号码");
writer.setColumnWidth(9, 20);
writer.writeCellValue(10,1,"开票金额");
writer.writeCellValue(9,1,"金额");
writer.setColumnWidth(9, 15);
writer.writeCellValue(10,1,"人次");
writer.setColumnWidth(10, 15);
writer.writeCellValue(11,1,"制单人");
writer.setColumnWidth(11, 15);
writer.writeCellValue(12,1,"摘要");
writer.setColumnWidth(12, 20);
writer.writeCellValue(11,1,"发票号码");
writer.setColumnWidth(11, 20);
writer.writeCellValue(12,1,"开票金额");
writer.setColumnWidth(12, 15);
writer.writeCellValue(13,1,"制单人");
writer.setColumnWidth(13, 15);
writer.writeCellValue(14,1,"摘要");
writer.setColumnWidth(14, 20);
// 设置表头高度单元格宽度
writer.setRowHeight(0, 35);
for (int i = 0; i < list.size(); i++) {
@ -130,11 +134,13 @@ public class PayableServiceImpl implements PayableService {
writer.writeCellValue(5, 2 + i, list.get(i).getGysmc()==null?"":list.get(i).getGysmc());
writer.writeCellValue(6, 2 + i, list.get(i).getSpbh()==null?"":list.get(i).getSpbh());
writer.writeCellValue(7, 2 + i, list.get(i).getSpmc()==null?"":list.get(i).getSpmc());
writer.writeCellValue(8, 2 + i, list.get(i).getJe());
writer.writeCellValue(9, 2 + i, list.get(i).getFphm()==null?"":list.get(i).getFphm());
writer.writeCellValue(10, 2 + i, list.get(i).getKpje());
writer.writeCellValue(11, 2 + i, list.get(i).getZdr()==null?"":list.get(i).getZdr());
writer.writeCellValue(12, 2 + i, list.get(i).getSpzy()==null?"":list.get(i).getSpzy());
writer.writeCellValue(8, 2 + i, list.get(i).getAccountName());
writer.writeCellValue(9, 2 + i, list.get(i).getJe());
writer.writeCellValue(10, 2 + i, list.get(i).getPersonNum());
writer.writeCellValue(11, 2 + i, list.get(i).getFphm()==null?"":list.get(i).getFphm());
writer.writeCellValue(12, 2 + i, list.get(i).getKpje());
writer.writeCellValue(13, 2 + i, list.get(i).getZdr()==null?"":list.get(i).getZdr());
writer.writeCellValue(14, 2 + i, list.get(i).getSpzy()==null?"":list.get(i).getSpzy());
writer.setRowHeight(2 + i, 35);
}
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
@ -584,4 +590,5 @@ public class PayableServiceImpl implements PayableService {
writer.close();
IoUtil.close(out);
}
}

View File

@ -104,12 +104,21 @@ public class ImportNoPhotoExcelHelper {
private static boolean checkModal(Sheet sheet, String className) {
int colNum = 0;
// 是否是招行新模板
boolean isNewModel = false;
if (className.equals("UploadPayrollBean")){
colNum = sheet.getRow(1).getLastCellNum();
}else if (className.equals("CareerBean")){
colNum = sheet.getRow(1).getLastCellNum();
}else if (className.equals("WagesDetailsBean")){
colNum = sheet.getRow(5).getLastCellNum();
String applyDateTitle = sheet.getRow(4).getCell(0).getStringCellValue();
if(Objects.equals(applyDateTitle,"申请时间")){
isNewModel = true;
colNum = sheet.getRow(12).getLastCellNum();
}else{
colNum = sheet.getRow(5).getLastCellNum();
}
}else{
colNum = sheet.getRow(0).getLastCellNum();
}
@ -123,7 +132,11 @@ public class ImportNoPhotoExcelHelper {
case "CareerBean":
return colNum == 12;
case "WagesDetailsBean":
return colNum == 19;
if(isNewModel){
return colNum >= 7;
}else{
return colNum >= 18;
}
case "VoucherDetailsBean":
return colNum == 28;
case "CCBWagesDetailsBean":
@ -140,8 +153,17 @@ public class ImportNoPhotoExcelHelper {
}
List<JSONObject> list = new ArrayList<>();
int last = 0;
// 是否是招行新模板
boolean isNewModel = false;
Map<String, String> zhDataMap = new HashMap<>(); // 存放招行新模板通用数据
if (className.equals("WagesDetailsBean")){
last = sheet.getRow(5).getLastCellNum();
String applyDateTitle = sheet.getRow(4).getCell(0).getStringCellValue();
if(Objects.equals(applyDateTitle,"申请时间")){
isNewModel = true;
last = sheet.getRow(12).getLastCellNum();
}else{
last = sheet.getRow(5).getLastCellNum();
}
}else{
last = sheet.getRow(0).getLastCellNum();
}
@ -193,7 +215,54 @@ public class ImportNoPhotoExcelHelper {
if (row.getRowNum() < 2) continue;
break;
case "WagesDetailsBean":
if (row.getRowNum() < 6) continue;
if(isNewModel){
if (row.getRowNum() < 3) {
continue;
}else if(row.getRowNum() == 4){
// 申请时间主账号
row.getCell(1).setCellType(CellType.STRING);
row.getCell(3).setCellType(CellType.STRING);
String applyDate = row.getCell(1).getStringCellValue();
String mainNumber = row.getCell(3).getStringCellValue();
if(StringUtils.isEmpty(applyDate)){
return R.fail("申请时间不能为空");
}
if(StringUtils.isEmpty(mainNumber)){
return R.fail("主账号不能为空");
}
zhDataMap.put("applyDate",applyDate);
zhDataMap.put("mainNumber",mainNumber);
continue;
}else if(row.getRowNum() == 7){
// 业务参考号批次摘要/备注
row.getCell(1).setCellType(CellType.STRING);
row.getCell(3).setCellType(CellType.STRING);
String serviceReferenceNumber = row.getCell(1).getStringCellValue();
String batchSummary = row.getCell(3).getStringCellValue();
if(StringUtils.isEmpty(serviceReferenceNumber)){
return R.fail("业务参考号不能为空");
}
if(StringUtils.isEmpty(batchSummary)){
return R.fail("批次摘要/备注不能为空");
}
zhDataMap.put("serviceReferenceNumber",serviceReferenceNumber);
zhDataMap.put("batchSummary",batchSummary);
continue;
}else if(row.getRowNum() == 8){
row.getCell(1).setCellType(CellType.STRING);
// 主账户名称
String masterAccountName = row.getCell(1).getStringCellValue();
if(StringUtils.isEmpty(masterAccountName)){
return R.fail("主账户名称不能为空");
}
zhDataMap.put("masterAccountName",masterAccountName);
continue;
}else if(row.getRowNum() == 3 || row.getRowNum() == 5 || row.getRowNum() == 6 || (row.getRowNum() > 8 && row.getRowNum() <= 12)){
continue;
}
}else{
if (row.getRowNum() < 5) continue;
}
break;
case "CCBWagesDetailsBean":
if (row.getRowNum() < 1) continue;
@ -351,45 +420,88 @@ public class ImportNoPhotoExcelHelper {
obj.put("suggest", row.getCell(11).getStringCellValue());
break;
case "WagesDetailsBean":
setExcleTString(19, row, 0);
if (row.getCell(0) != null)
obj.put("zh", row.getCell(0).getStringCellValue());
if (row.getCell(1) != null)
obj.put("hm", row.getCell(1).getStringCellValue());
if (row.getCell(2) != null)
obj.put("je", row.getCell(2).getStringCellValue());
if (row.getCell(3) != null)
obj.put("sjdkje", row.getCell(3).getStringCellValue());
if (row.getCell(4) != null)
obj.put("zt", row.getCell(4).getStringCellValue());
if (row.getCell(5) != null)
obj.put("zs", row.getCell(5).getStringCellValue());
if (row.getCell(6) != null)
obj.put("ckh", row.getCell(6).getStringCellValue());
if (row.getCell(7) != null)
obj.put("ts", row.getCell(7).getStringCellValue());
if (row.getCell(8) != null)
obj.put("khh", row.getCell(8).getStringCellValue());
if (row.getCell(9) != null)
obj.put("khd", row.getCell(9).getStringCellValue());
if (row.getCell(10) != null)
obj.put("jbr", row.getCell(10).getStringCellValue());
if (row.getCell(11) != null)
obj.put("qwr", row.getCell(11).getStringCellValue());
if (row.getCell(12) != null)
obj.put("sfkzhm", row.getCell(12).getStringCellValue());
if (row.getCell(13) != null)
obj.put("sfkzh", row.getCell(13).getStringCellValue());
if (row.getCell(14) != null)
obj.put("yt", row.getCell(14).getStringCellValue());
if (row.getCell(15) != null)
obj.put("ywckh", row.getCell(15).getStringCellValue());
if (row.getCell(16) != null)
obj.put("lx", row.getCell(16).getStringCellValue());
if (row.getCell(17) != null)
obj.put("qdbz", row.getCell(17).getStringCellValue());
if (row.getCell(18) != null)
obj.put("hnbz", row.getCell(18).getStringCellValue());
int dynamicColumnCount = row.getLastCellNum();
setExcleTString(dynamicColumnCount, row, 0);
if(!isNewModel){
if (row.getCell(0) != null)
obj.put("zh", row.getCell(0).getStringCellValue());
if (row.getCell(1) != null)
obj.put("hm", row.getCell(1).getStringCellValue());
if (row.getCell(2) != null)
obj.put("je", row.getCell(2).getStringCellValue());
if (row.getCell(3) != null)
obj.put("sjdkje", row.getCell(3).getStringCellValue());
if (row.getCell(4) != null)
obj.put("zt", row.getCell(4).getStringCellValue());
if (row.getCell(5) != null)
obj.put("zs", row.getCell(5).getStringCellValue());
if (row.getCell(6) != null)
obj.put("ckh", row.getCell(6).getStringCellValue());
if (row.getCell(7) != null)
obj.put("ts", row.getCell(7).getStringCellValue());
if (row.getCell(8) != null)
obj.put("khh", row.getCell(8).getStringCellValue());
if (row.getCell(9) != null)
obj.put("khd", row.getCell(9).getStringCellValue());
if (row.getCell(10) != null)
obj.put("jbr", row.getCell(10).getStringCellValue());
if (row.getCell(11) != null)
obj.put("qwr", row.getCell(11).getStringCellValue());
if (row.getCell(12) != null)
obj.put("sfkzhm", row.getCell(12).getStringCellValue());
if (row.getCell(13) != null)
obj.put("sfkzh", row.getCell(13).getStringCellValue());
if (row.getCell(14) != null)
obj.put("yt", row.getCell(14).getStringCellValue());
if (row.getCell(15) != null)
obj.put("ywckh", row.getCell(15).getStringCellValue());
if (row.getCell(16) != null)
obj.put("lx", row.getCell(16).getStringCellValue());
if (row.getCell(17) != null)
obj.put("qdbz", row.getCell(17).getStringCellValue());
// if (row.getCell(18) != null)
// obj.put("hnbz", row.getCell(18).getStringCellValue());
// 处理第18列之后的所有列
StringBuilder additionalData = new StringBuilder();
for (int i = 18; i < dynamicColumnCount; i++) {
Cell cell = row.getCell(i);
if (cell != null) {
String columnName = sheet.getRow(5).getCell(i).getStringCellValue();
String cellValue = cell.getStringCellValue();
if (additionalData.length() > 0) {
additionalData.append("; ");
}
additionalData.append(columnName).append(": ").append(cellValue);
}
}
if (additionalData.length() > 0) {
obj.put("additionalData", additionalData.toString());
}
}else{
if (row.getCell(0) != null) // 员工姓名
obj.put("hm", row.getCell(0).getStringCellValue());
if (row.getCell(1) != null) // 个人账号
obj.put("zh", row.getCell(1).getStringCellValue());
if (row.getCell(2) != null) // 开户行
obj.put("khh", row.getCell(2).getStringCellValue());
if (row.getCell(3) != null) // 代发金额
obj.put("je", row.getCell(3).getStringCellValue());
if (row.getCell(4) != null) // 代发状态
obj.put("zt", row.getCell(4).getStringCellValue());
if (row.getCell(5) != null) // 失败原因
obj.put("ts", row.getCell(5).getStringCellValue());
if (row.getCell(6) != null) // 备注
obj.put("additionalData", row.getCell(6).getStringCellValue());
obj.put("zs", "网上代发代扣");
obj.put("jbr", zhDataMap.get("applyDate"));
obj.put("qwr", zhDataMap.get("applyDate"));
obj.put("sfkzhm", zhDataMap.get("masterAccountName"));
obj.put("sfkzh", zhDataMap.get("mainNumber"));
obj.put("yt", zhDataMap.get("batchSummary"));
obj.put("ywckh", zhDataMap.get("serviceReferenceNumber"));
obj.put("lx", "代发其他");
obj.put("qdbz", "超网代发");
}
break;
case "CCBWagesDetailsBean":
setExcleTString(12, row, -1);

View File

@ -58,4 +58,6 @@ public class WagesDetailsBean {
private String cbi;
private String zc;
private String additionalData;
}

View File

@ -108,10 +108,10 @@ public class WagesServiceImpl implements WagesService {
lstError = lstError + "" + obj.getString("rowNo") + "行,用途不能为空;";
continue;
}
if (StringUtils.isBlank(ywckh)) {
lstError = lstError + "" + obj.getString("rowNo") + "行,业务参考号不能为空;";
continue;
}
// if (StringUtils.isBlank(ywckh)) {
// lstError = lstError + "" + obj.getString("rowNo") + "行,业务参考号不能为空;";
// continue;
// }
WagesDetailsBean bean = new WagesDetailsBean();
bean.setMonth(month);
@ -156,6 +156,7 @@ public class WagesServiceImpl implements WagesService {
bean.setYwckh(ywckh);
bean.setLx(obj.getString("lx"));
bean.setQdbz(obj.getString("qdbz"));
bean.setAdditionalData(obj.getString("additionalData"));
list.add(bean);
}
}else {
@ -380,7 +381,7 @@ public class WagesServiceImpl implements WagesService {
}
// 导出标题
ExcelWriter writer = cn.hutool.poi.excel.ExcelUtil.getWriter(true);
writer.merge(24, fileName,false);
writer.merge(25, fileName,false);
// 合并二级表头
writer.writeCellValue(0,1,"序号");
@ -433,6 +434,8 @@ public class WagesServiceImpl implements WagesService {
writer.setColumnWidth(23, 25);
writer.writeCellValue(24,1,"渠道标志");
writer.setColumnWidth(24, 25);
writer.writeCellValue(25,1,"额外数据");
writer.setColumnWidth(25, 25);
// 设置表头高度单元格宽度
writer.setRowHeight(0, 35);
for (int i = 0; i < list.size(); i++) {
@ -461,6 +464,7 @@ public class WagesServiceImpl implements WagesService {
writer.writeCellValue(22, 2 + i, list.get(i).getYwckh()==null?"":list.get(i).getYwckh());
writer.writeCellValue(23, 2 + i, list.get(i).getLx()==null?"":list.get(i).getLx());
writer.writeCellValue(24, 2 + i, list.get(i).getQdbz()==null?"":list.get(i).getQdbz());
writer.writeCellValue(25, 2 + i, list.get(i).getAdditionalData() == null ? "" : list.get(i).getAdditionalData().replace("; ", "\n"));
writer.setRowHeight(2 + i, 35);
}
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");

View File

@ -113,6 +113,8 @@ public class WagesStaticsServiceImpl implements WagesStaticsService {
writer.setColumnWidth(23, 25);
writer.writeCellValue(24,1,"渠道标志");
writer.setColumnWidth(24, 25);
writer.writeCellValue(25,1,"额外数据");
writer.setColumnWidth(25, 25);
// 设置表头高度单元格宽度
writer.setRowHeight(0, 35);
for (int i = 0; i < list.size(); i++) {
@ -141,6 +143,8 @@ public class WagesStaticsServiceImpl implements WagesStaticsService {
writer.writeCellValue(22, 2 + i, list.get(i).getYwckh()==null?"":list.get(i).getYwckh());
writer.writeCellValue(23, 2 + i, list.get(i).getLx()==null?"":list.get(i).getLx());
writer.writeCellValue(24, 2 + i, list.get(i).getQdbz()==null?"":list.get(i).getQdbz());
writer.writeCellValue(25, 2 + i, list.get(i).getAdditionalData() == null ? "" : list.get(i).getAdditionalData().replace("; ", "\n"));
writer.setRowHeight(2 + i, 35);
}
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");

View File

@ -2,9 +2,9 @@ server.port=2002
#????·??
server.servlet.context-path=/yncw
#mysql?????????
spring.datasource.url=jdbc:mysql://192.168.0.14:1103/yncw1?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
spring.datasource.url=jdbc:mysql://192.168.0.14:4418/yncw1?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
spring.datasource.username=root
spring.datasource.password=dszadmin@ynreal14!
spring.datasource.password=Bonus@admin123!
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/yncw_real?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
#spring.datasource.username=mroot
#spring.datasource.password=bonus@admin123
@ -21,13 +21,13 @@ mybatis.type-aliases-package=com.bonus.boot.manager.*.entity
# ?????????????????????
mybatis.configuration.map-underscore-to-camel-case=true
#redis config
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.host=192.168.0.14
spring.redis.port=2001
spring.redis.password=Dszbns@Redis123!
#spring.redis.host=192.168.0.14
#spring.redis.port=2001
#spring.redis.password=Dszbns@Redis123!
# ???
logging.config=classpath:logback-boot.xml
log.level.root=info

Binary file not shown.

Binary file not shown.

View File

@ -4,13 +4,14 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.boot.manager.ca.bm.dao.PayAccountInfoDao">
<insert id="add">
insert into ca_bm_pay_account_info (name,remark,oper_user,oper_time,is_active, account_number)
values (#{name},#{remarks},#{czy},now(),'1', #{accountNumber})
insert into ca_bm_pay_account_info (name,remark,oper_user,oper_time,is_active, account_number,opening_bank,opening_bank_address,opening_account_date)
values (#{name},#{remarks},#{czy},now(),'1', #{accountNumber},#{openingBank},#{openingBankAddress},#{openingAccountDate})
</insert>
<update id="update">
update ca_bm_pay_account_info
set name = #{name},remark = #{remarks},oper_user = #{czy},oper_time = now(), account_number = #{accountNumber}
set name = #{name},remark = #{remarks},oper_user = #{czy},oper_time = now(), account_number = #{accountNumber},
opening_bank = #{openingBank},opening_bank_address = #{openingBankAddress},opening_account_date = #{openingAccountDate}
where id = #{id}
</update>
@ -30,25 +31,37 @@
</select>
<select id="getList" resultType="com.bonus.boot.manager.ca.bm.entity.PayAccountInfoBean">
select
cbpai.id,
cbpai.name,
cbpai.account_number as accountNumber,
cbpai.remark as remarks,
su.username as czyName,
cbpai.oper_time as czsj
select cbpai.id,
cbpai.name,
cbpai.account_number as accountNumber,
cbpai.opening_bank as openingBank,
cbpai.opening_bank_address as openingBankAddress,
cbpai.opening_account_date as openingAccountDate,
cbpai.remark as remarks,
su.username as czyName,
cbpai.oper_time as czsj
from ca_bm_pay_account_info cbpai
left join sys_user su on su.is_active = '1' and cbpai.oper_user = su.id
left join sys_user su on su.is_active = '1' and cbpai.oper_user = su.id
where cbpai.is_active = '1'
<if test="params.name != null and params.name !='' ">
and cbpai.name like concat ('%',#{params.name},'%')
</if>
<if test="params.openingAccountDate != null and params.openingAccountDate !='' ">
and cbpai.opening_account_date like concat ('%',#{params.openingAccountDate},'%')
</if>
order by cbpai.oper_time desc
</select>
<select id="getById" resultType="com.bonus.boot.manager.ca.bm.entity.PayAccountInfoBean">
select id,name,remark as remarks, account_number as accountNumber
select id,
name,
remark as remarks,
account_number as accountNumber,
opening_bank as openingBank,
opening_bank_address as openingBankAddress,
opening_account_date as openingAccountDate
from ca_bm_pay_account_info
where is_active = '1' and id = #{id}
where is_active = '1'
and id = #{id}
</select>
<select id="getIdByName" resultType="java.lang.String">
select id
@ -61,6 +74,9 @@
cbpai.id,
cbpai.name,
cbpai.account_number as accountNumber,
cbpai.opening_bank as openingBank,
cbpai.opening_bank_address as openingBankAddress,
cbpai.opening_account_date as openingAccountDate,
cbpai.remark as remarks,
su.username as czyName,
cbpai.oper_time as czsj
@ -70,6 +86,9 @@
<if test="name != null and name !='' ">
and cbpai.name like concat ('%',#{name},'%')
</if>
<if test="openingAccountDate != null and openingAccountDate !='' ">
and cbpai.opening_account_date like concat ('%',#{openingAccountDate},'%')
</if>
order by cbpai.oper_time asc
</select>
<select id="getPayAccountInfoByName" resultType="com.bonus.boot.manager.ca.bm.entity.PayAccountInfoBean">

View File

@ -15,11 +15,13 @@
kpje,
zdr,
spzy,
account_id,
person_num,
OPER_USER,
OPER_TIME,
IS_ACTIVE
)
values (#{rq},#{pzh},#{htmcid},#{gysmc},#{spbh},#{je},#{fphm},#{kpje},#{zdr},#{spzy},#{czy},now(),'1')
values (#{rq},#{pzh},#{htmcid},#{gysmc},#{spbh},#{je},#{fphm},#{kpje},#{zdr},#{spzy},#{accountId},#{personNum},#{czy},now(),'1')
</insert>
<update id="update">
@ -33,6 +35,8 @@
fphm = #{fphm},
kpje = #{kpje},
spzy = #{spzy},
account_id = #{accountId},
person_num = #{personNum},
zdr = #{zdr},
oper_user = #{czy},
oper_time = now()
@ -103,11 +107,15 @@
su.id as zdrid,
cip.spzy,
cip.htmc as htmcid,
po.name as department
po.name as department,
cbpa.id as accountId,
cbpa.name as accountName,
cip.person_num as personNum
from ca_im_payable cip
left join ca_bm_supplier_info cbsi on cbsi.is_active = '1' and cbsi.id = cip.htmc
left join pm_organization po on po.id = cbsi.department and po.is_active = '1'
left join ca_bm_goods_info cbgi on cbgi.is_active = '1' and cbgi.id = cip.spbh
left join ca_bm_pay_account_info cbpa on cbpa.id = cip.account_id and cbgi.is_active = '1'
left join sys_user su on su.is_active = '1' and su.id = cip.zdr
where cip.is_active = '1') a
where '1' = '1'
@ -129,6 +137,9 @@
<if test="params.startTime != null and params.startTime !=''and params.endTime != null and params.endTime !='' ">
and a.rq between #{params.startTime} and #{params.endTime}
</if>
<if test="params.accountId != null and params.accountId !='' ">
and a.accountId = #{params.accountId}
</if>
ORDER BY a.rq DESC
</select>
@ -192,7 +203,9 @@
su.username as zdr,
su.id as zdrid,
cip.spzy,
cip.htmc as htmcid
cip.htmc as htmcid,
cip.account_id as accountId,
cip.person_num as personNum
from ca_im_payable cip
left join ca_bm_supplier_info cbsi on cbsi.is_active = '1' and cbsi.id = cip.htmc
left join ca_bm_goods_info cbgi on cbgi.is_active = '1' and cbgi.id = cip.spbh
@ -291,11 +304,15 @@
su.username as zdr,
cip.spzy,
cip.htmc as htmcid,
po.name as department
po.name as department,
cbpa.id as accountId,
cbpa.name as accountName,
cip.person_num as personNum
from ca_im_payable cip
left join ca_bm_supplier_info cbsi on cbsi.is_active = '1' and cbsi.id = cip.htmc
left join pm_organization po on po.id = cbsi.department and po.is_active = '1'
left join ca_bm_goods_info cbgi on cbgi.is_active = '1' and cbgi.id = cip.spbh
left join ca_bm_pay_account_info cbpa on cbpa.id = cip.account_id and cbgi.is_active = '1'
left join sys_user su on su.is_active = '1' and su.id = cip.zdr
where cip.is_active = '1') a
where '1' = '1'
@ -317,6 +334,9 @@
<if test="params.startTime != null and params.startTime !=''and params.endTime != null and params.endTime !='' ">
and a.rq between #{params.startTime} and #{params.endTime}
</if>
<if test="params.accountId != null and params.accountId !='' ">
and a.accountId = #{params.accountId}
</if>
ORDER BY a.rq asc
</select>
@ -735,6 +755,10 @@
select id
from ca_bm_supplier_info where IS_ACTIVE = '1' and CONTRACT_OR_PRO_NAME = #{htmc}
</select>
<select id="getBankAccount" resultType="com.bonus.boot.manager.ca.bm.entity.PayAccountInfoBean">
select id,name
from ca_bm_pay_account_info where IS_ACTIVE = '1'
</select>
</mapper>

View File

@ -36,10 +36,11 @@
sl.operation_function,
sl.operation_record,
sl.operation_status,
sl.createTime
sl.createTime,
su.username
FROM
sys_logs sl
LEFT JOIN sys_user su ON sl.userId = su.id
<where>
<if test="user.username != null and user.username != ''">
and (

View File

@ -71,10 +71,10 @@
</select>
<insert id="insertWagesDetails">
insert into vw_wages_details (ZH, HM, JE, SJDKJE, ZT, ZS, CKH, TS, KHH, KHD, JBR, QWR, SFKZHM, SFKZH, YT, YT_SZ, YWCKH, LX, QDBZ,VW_ID,MONTH)
insert into vw_wages_details (ZH, HM, JE, SJDKJE, ZT, ZS, CKH, TS, KHH, KHD, JBR, QWR, SFKZHM, SFKZH, YT, YT_SZ, YWCKH, LX, QDBZ,VW_ID,MONTH,additionalData)
VALUES
<foreach collection="list" item="bean" separator=",">
(#{bean.zh},#{bean.hm},#{bean.je},#{bean.sjdkje},#{bean.zt},#{bean.zs},#{bean.ckh},#{bean.ts},#{bean.khh},#{bean.khd},#{bean.jbr},#{bean.qwr},#{bean.sfkzhm},#{bean.sfkzh},#{bean.yt},#{bean.ytSz},#{bean.ywckh},#{bean.lx},#{bean.qdbz},#{bean.vwId},#{bean.month})
(#{bean.zh},#{bean.hm},#{bean.je},#{bean.sjdkje},#{bean.zt},#{bean.zs},#{bean.ckh},#{bean.ts},#{bean.khh},#{bean.khd},#{bean.jbr},#{bean.qwr},#{bean.sfkzhm},#{bean.sfkzh},#{bean.yt},#{bean.ytSz},#{bean.ywckh},#{bean.lx},#{bean.qdbz},#{bean.vwId},#{bean.month},#{bean.additionalData})
</foreach>
</insert>
@ -104,7 +104,8 @@
</select>
<select id="getWagesDetails" resultType="com.bonus.boot.manager.wages.entity.WagesDetailsBean">
select vwd.id,vwd.zh, vwd.hm, vwd.je, vwd.sjdkje, vwd.zt, vwd.zs, vwd.ckh, vwd.ts, vwd.khh, vwd.khd, vwd.jbr, vwd.qwr, vwd.sfkzhm, vwd.sfkzh, vwd.yt, vwd.yt_sz, vwd.ywckh, vwd.lx, vwd.qdbz, vvd.ZQ, vvd.PZBH, vvd.zy as summary, vvd.zgldx as sub, vvd.fzgldx1 as project, vvd.fzgldx2 as company
select vwd.id,vwd.zh, vwd.hm, vwd.je, vwd.sjdkje, vwd.zt, vwd.zs, vwd.ckh, vwd.ts, vwd.khh, vwd.khd, vwd.jbr, vwd.qwr, vwd.sfkzhm, vwd.sfkzh, vwd.yt, vwd.yt_sz, vwd.ywckh, vwd.lx, vwd.qdbz, vvd.ZQ, vvd.PZBH, vvd.zy as summary, vvd.zgldx as sub, vvd.fzgldx1 as project, vvd.fzgldx2 as company,
vwd.additionalData
from vw_wages_details vwd
left join vw_voucher_details vvd on vvd.PZBH_SZ = vwd.YT_SZ
where vwd.VW_ID = #{id}
@ -125,7 +126,7 @@
</select>
<select id="checkFile" resultType="com.bonus.boot.manager.wages.entity.WagesBean" parameterType="com.bonus.boot.manager.wages.entity.WagesBean">
select ID from vw_voucher_wages where FILE_NAME = #{fileName}
select ID from vw_voucher_wages where FILE_NAME = #{fileName} AND IS_ACTIVE = '1'
</select>
<select id="checkCCBWages" resultType="com.bonus.boot.manager.wages.entity.CCBWagesDetailsBean">
select id from vw_wages_ccb_details where account_name = #{accountName} and account = #{account} and month =

View File

@ -11,7 +11,7 @@
vwd.sfkzhm, vwd.sfkzh, vwd.yt, vwd.ywckh, vwd.lx, vwd.qdbz,vwd.YT_SZ,
vvw1.title, vvw1.file_name, vvw1.file_url, vvw2.file_name as voucherFileName, vvw2.file_url as
voucherFileUrl,
vvd.zq, vvd.zy, vvd.zgldx, vvd.fzgldx1, vvd.fzgldx2
vvd.zq, vvd.zy, vvd.zgldx, vvd.fzgldx1, vvd.fzgldx2, vwd.additionalData
FROM vw_wages_details vwd
LEFT JOIN vw_voucher_wages vvw1 ON vvw1.ID = vwd.VW_ID
LEFT JOIN vw_voucher_details vvd ON vvd.PZBH_SZ = vwd.YT_SZ
@ -89,7 +89,7 @@
<select id="getWagesDetails" resultType="com.bonus.boot.manager.wages.entity.WagesDetailsBean">
select vwd.id,vwd.zh, vwd.hm, vwd.je, vwd.sjdkje, vwd.zt, vwd.zs, vwd.ckh, vwd.ts, vwd.khh, vwd.khd, vwd.jbr,
vwd.qwr, vwd.sfkzhm, vwd.sfkzh, vwd.yt, vwd.yt_sz, vwd.ywckh, vwd.lx, vwd.qdbz, vvd.ZQ, vvd.PZBH, vvd.zy as
summary, vvd.zgldx as sub, vvd.fzgldx1 as project, vvd.fzgldx2 as company
summary, vvd.zgldx as sub, vvd.fzgldx1 as project, vvd.fzgldx2 as company, vwd.additionalData
from vw_wages_details vwd
left join vw_voucher_details vvd on vvd.PZBH_SZ = vwd.YT_SZ
where 1=1

View File

@ -52,12 +52,27 @@
<option value="">请选择</option>
</select>
</div>
<div class="layui-input-inline"style="float: left;width: 49.5%;margin-top: 2%;margin-left: 18%">
<label class="layui-form-label" style="width: 35%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 付款账号:</label>
<select name="accountId" id="accountId" lay-verify="required|accountId" lay-search="">
<option value="">请选择</option>
</select>
</div>
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
<label class="layui-form-label" style="width: 30%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 金额:</label>
<div class="layui-input-block">
<input style="width: 79%" type="text" name="je" id="je" maxlength="50" lay-verify="required|je" class="layui-input" >
<input style="width: 79%" type="text" name="je" id="je" maxlength="10" lay-verify="required|je" lay-search="" class="layui-input" >
</div>
</div>
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
<label class="layui-form-label" style="width: 30%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 人次:</label>
<div class="layui-input-block">
<input style="width: 79%" type="text" name="personNum" id="personNum" maxlength="6" lay-verify="required|personNum" class="layui-input">
</div>
</div>
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
<label class="layui-form-label" style="width: 30%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 发票号码:</label>
<div class="layui-input-block">
@ -67,7 +82,7 @@
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
<label class="layui-form-label" style="width: 30%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 开票金额:</label>
<div class="layui-input-block">
<input style="width: 79%" type="text" name="kpje" id="kpje" maxlength="50" lay-verify="required|kpje" class="layui-input">
<input style="width: 79%" type="text" name="kpje" id="kpje" maxlength="10" lay-verify="required|kpje" class="layui-input">
</div>
</div>
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
@ -137,6 +152,7 @@
layui.form.render('select')
}
})
getBankAccount("");
}
@ -189,6 +205,29 @@
})
}
function getBankAccount(id) {
$("#accountId").empty();
$.ajax({
url: ctxPath + '/payable/getBankAccount',
method: 'get',
success: function (data) {
var str = '';
if (data.length > 0) {
str += '<option value="">请选择或搜索关键字</option>';
for (var i = 0; i < data.length; i++) {
if (id == data[i].id) {
str += '<option selected value=\'' + data[i].id + '\'>' + data[i].name + '</option>';
} else {
str += '<option value=\'' + data[i].id + '\'>' + data[i].name + '</option>';
}
}
}
$("#accountId").append(str);
layui.form.render('select')
}
})
}
function spbh(spid) {
$("#spbh").empty();
$.ajax({
@ -249,7 +288,9 @@
spbh: [/^(?!-1).*$/, '请选择商品名称'],
zdr: [/^(?!-1).*$/, '请选择制单人'],
je: [/(^$)|^[0-9]+(\.[0-9]{1,2})?$/,'请输入正确金额,小数点后二位'],
kpje: [/(^$)|^[0-9]+(\.[0-9]{1,2})?$/,'请输入正确开票金额,小数点后二位']
kpje: [/(^$)|^[0-9]+(\.[0-9]{1,2})?$/,'请输入正确开票金额,小数点后二位'],
personNum: [/^[1-9]\d{0,5}$/,"请输入1-999999之间的正整数"],
accountId: [/^(?!-1).*$/, '请选择银行账号']
})
@ -294,6 +335,8 @@
gysbh(data.gysmc,data.htmc);
//$("#gysmc").val(data.gysmc);
spbh(data.spid);
getBankAccount(data.accountId);
$("#personNum").val(data.personNum);
//$("#spbh").val(data.spbh);
$("#je").val(data.je);
$("#fphm").val(data.fphm);

View File

@ -19,7 +19,7 @@
<form class="layui-form" action="" method="post" onsubmit="return false">
<input type="hidden" id="id" name="id">
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
<label class="layui-form-label" style="width: 30%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 付款账户名称:</label>
<label class="layui-form-label" style="width: 30%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 账户名称:</label>
<div class="layui-input-block">
<input style="width: 85%" type="text" name="name" id="name" maxlength="50" lay-verify="required" class="layui-input">
</div>
@ -32,6 +32,27 @@
</div>
</div>
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
<label class="layui-form-label" style="width: 30%">开户行:</label>
<div class="layui-input-block">
<input style="width: 85%" type="text" name="openingBank" id="openingBank" maxlength="50" class="layui-input">
</div>
</div>
<div class="layui-input-inline" style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
<label class="layui-form-label" style="width: 30%">开户行地址:</label>
<div class="layui-input-block">
<input style="width: 85%" type="text" name="openingBankAddress" id="openingBankAddress" maxlength="50" class="layui-input">
</div>
</div>
<div class="layui-input-inline" style="float: left;width: 50%;margin-top: 2%;margin-left: 20%">
<label class="layui-form-label" style="width: 30%">开户日期:</label>
<div class="layui-input-inline" style="width: 59%">
<input type="text" class="layui-input" id="openingAccountDate" name="openingAccountDate" placeholder="yyyy-MM-dd" readonly>
</div>
</div>
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%">
<label class="layui-form-label" style="width: 30%">备注:</label>
<div class="layui-input-block">
@ -59,6 +80,11 @@
layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function(){
var layer = layui.layer;
form = layui.form;
var laydate = layui.laydate;
// 渲染
laydate.render({
elem: '#openingAccountDate'
});
initData();
form.render();
});
@ -74,6 +100,9 @@
$("#name").val(data.name);
$("#accountNumber").val(data.accountNumber);
$("#remarks").val(data.remarks);
$("#openingBank").val(data.openingBank);
$("#openingBankAddress").val(data.openingBankAddress);
$("#openingAccountDate").val(data.openingAccountDate);
}
});
}
@ -90,10 +119,12 @@
}else{
formdata.id = id;
}
formdata.name = $("#name").val();
formdata.accountNumber = $("#accountNumber").val();
formdata.remarks = $("#remarks").val();
formdata.openingBank = $("#openingBank").val();
formdata.openingBankAddress = $("#openingBankAddress").val();
formdata.openingAccountDate = $("#openingAccountDate").val();
$.ajax({
type : 'post',
url : ctxPath + '/payAccountInfo',

View File

@ -22,6 +22,11 @@
.wrap {
word-wrap: break-word;
}
.layui-input, .layui-textarea {
display: block;
width: 100%;
padding-left: 10px;
}
</style>
</head>
<body>
@ -36,27 +41,33 @@
<div class="form-group">
<div class="layui-inline">
<div class="layui-input-inline">
<input id="htmc" type="text" class="layui-input" style="width: 200px" placeholder="请输入合同名称">
<input id="htmc" type="text" class="layui-input" style="width: 140px " placeholder="请输入合同名称">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input id="gysmc" type="text" class="layui-input" style="width: 200px" placeholder="请输入供应商名称">
<input id="gysmc" type="text" class="layui-input" style="width: 160px " placeholder="请输入供应商名称">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input id="spbh" type="text" class="layui-input" style="width: 200px" placeholder="请输入商品编号">
<input id="spbh" type="text" class="layui-input" style="width: 150px " placeholder="请输入商品编号">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input id="pzh" type="text" class="layui-input" style="width: 200px" placeholder="请输入单号(凭证号)">
<input id="pzh" type="text" class="layui-input" style="width: 180px " placeholder="请输入单号(凭证号)">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input id="zdr" type="text" class="layui-input" style="width: 200px" placeholder="请输入制单人">
<input id="zdr" type="text" class="layui-input" style="width: 150px" placeholder="请输入制单人">
</div>
</div>
<div class="layui-inline" >
<div class="layui-input-inline" style="width: 200px">
<select name="accountId" id="accountId" lay-search="">
</select>
</div>
</div>
@ -140,6 +151,8 @@
format: 'yyyy-MM-dd'
});
getBankAccount("");
table.render({
elem: '#demo'
, url: ctxPath + '/payable/getList' //数据接口
@ -165,7 +178,9 @@
, {field: 'gysmc', width: 200, align: 'center',title:'往来单位',templet: '#gysmcView'}
, {field: 'spbh', width: 200, align: 'center', title: '商品编号'}
, {field: 'spmc', width: 200, align: 'center', title: '商品名称'}
, {field: 'accountName', width: 200, align: 'center', title: '付款账号'}
, {field: 'je', width: 200, align: 'center', title: '金额'}
, {field: 'personNum', width: 200, align: 'center', title: '人次'}
, {field: 'fphm', width: 200, align: 'center', title: '发票号码'}
, {field: 'kpje', width: 200, align: 'center', title: '开票金额'}
, {field: 'zdr', width: 200, align: 'center', title: '制单人'}
@ -215,6 +230,29 @@
openForms("","新增");
}
function getBankAccount(id) {
$("#accountId").empty();
$.ajax({
url: ctxPath + '/payable/getBankAccount',
method: 'get',
success: function (data) {
var str = '';
if (data.length > 0) {
str += '<option value="">付款账号</option>';
for (var i = 0; i < data.length; i++) {
if (id == data[i].id) {
str += '<option selected value=\'' + data[i].id + '\'>' + data[i].name + '</option>';
} else {
str += '<option value=\'' + data[i].id + '\'>' + data[i].name + '</option>';
}
}
}
$("#accountId").append(str);
layui.form.render('select')
}
})
}
/**
* 新增功能
*/
@ -307,6 +345,7 @@
spbh :$('#spbh').val(),
pzh :$('#pzh').val(),
zdr :$('#zdr').val(),
accountId :$('#accountId').val(),
startTime :$('#startTime').val(),
endTime :$('#endTime').val()
} //设定异步数据接口的额外参数
@ -317,7 +356,7 @@
$("#exportBt").click(function () {
var token = localStorage.getItem("token");
var loadingMsg = layer.msg('下载中,请稍候...', {icon: 16, scrollbar: false, time: 0});
var url = ctxPath + "/payable/exp?htmc=" + $("#htmc").val().trim()+"&gysmc=" + $("#gysmc").val().trim()+ "&spbh=" + $("#spbh").val().trim()+"&pzh=" + $("#pzh").val().trim()+"&zdr=" + $("#zdr").val().trim()+"&startTime=" + $("#startTime").val().trim()+"&endTime=" + $("#endTime").val().trim()+"&token=" + token;
var url = ctxPath + "/payable/exp?htmc=" + $("#htmc").val().trim()+"&gysmc=" + $("#gysmc").val().trim()+ "&spbh=" + $("#spbh").val().trim()+"&pzh=" + $("#pzh").val().trim()+"&zdr=" + $("#zdr").val().trim()+"&accountId=" + $("#accountId").val().trim()+"&startTime=" + $("#startTime").val().trim()+"&endTime=" + $("#endTime").val().trim()+"&token=" + token;
var xhr = new XMLHttpRequest();
xhr.open("get", url, true);
xhr.responseType = "blob"; // 转换流

View File

@ -39,6 +39,11 @@
placeholder="请输入账户名称">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input id="openingAccountDate" name="openingAccountDate" type="text" class="layui-input" style="border: 1px solid #D2D2D2; width: 100%" readonly placeholder="开户日期">
</div>
</div>
<button id="searchBt" class="layui-btn" permission="sys:pay:query"
style="margin-top: -0.3%; margin-left: 15px;">
搜索
@ -97,6 +102,13 @@
form.render();
form.verify({});
var laydate = layui.laydate;
// 渲染
laydate.render({
elem: '#openingAccountDate'
,type: 'month'
});
table.render({
elem: '#demo'
, url: ctxPath + '/payAccountInfo/getList' //数据接口
@ -104,17 +116,21 @@
, toolbar: true //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
, defaultToolbar: []
, where: {
name: $('#name').val()
name: $('#name').val(),
openingAccountDate: $('#openingAccountDate').val()
} //post请求必须加where post请求需要的参数
, cellMinWidth: 80
, cols: [[ //表头
{field: 'number', width: 100, title: '序号', align: 'center', type: 'numbers'}
, {field: 'name', align: 'center', title: '付款账户名称'}
, {field: 'name', align: 'center', title: '账户名称'}
, {
field: 'accountNumber', align: 'center', title: '账户', templet: function (d) {
return maskAccountNumber(d.accountNumber);
}
}
, {field: 'openingBank', align: 'center', title: '开户行'}
, {field: 'openingBankAddress', align: 'center', title: '开户行地址'}
, {field: 'openingAccountDate', align: 'center', title: '开户时间'}
, {field: 'remarks', align: 'center', title: '备注'}
, {field: 'czyName', align: 'center', title: '操作人'}
, {field: 'czsj', align: 'center', title: '操作时间'}
@ -190,7 +206,8 @@
, method: 'post' //方式默认是get
, page: true
, where: {
name: $('#name').val()
name: $('#name').val(),
openingAccountDate: $('#openingAccountDate').val()
} //设定异步数据接口的额外参数
});
});
@ -198,7 +215,7 @@
$("#exportBt").click(function () {
var token = localStorage.getItem("token");
var loadingMsg = layer.msg('下载中,请稍候...', {icon: 16, scrollbar: false, time: 0});
var url = ctxPath + "/payAccountInfo/exp?name=" + $("#name").val().trim() + "&token=" + token;
var url = ctxPath + "/payAccountInfo/exp?name=" + $("#name").val().trim() + "&openingAccountDate=" + $("#openingAccountDate").val().trim() + "&token=" + token;
var xhr = new XMLHttpRequest();
xhr.open("get", url, true);
xhr.responseType = "blob"; // 转换流

View File

@ -100,6 +100,7 @@
uploadInst.config.elem.next()[0].value = '';
obj.preview(function(index, file, result){
$('#fileName').html(file.name);
i++;
});

View File

@ -48,6 +48,7 @@
<div class="layui-inline" style="float: right;">
<button type="button" class="layui-btn" onclick="downloadVoucher()">下载凭证模板</button>
<button type="button" class="layui-btn" onclick="downloadWages()">下载工资册模板</button>
<button type="button" class="layui-btn" onclick="downloadNewWages()">下载工资册模板(新)</button>
</div>
</div>
</form>
@ -190,6 +191,13 @@
function downloadWages() {
window.open(ctxPath + "/download/download?filename=招商银行工资导入模板.xlsx")
}
/**
* 下载工资册模板(新)
* */
function downloadNewWages() {
window.open(ctxPath + "/download/download?filename=zh_model.xlsx")
}
</script>
</body>
</html>

View File

@ -48,6 +48,7 @@
<div class="layui-inline" style="float: right;">
<button type="button" class="layui-btn" onclick="downloadVoucher()">下载凭证模板</button>
<button type="button" class="layui-btn" onclick="downloadWages()">下载工资册模板</button>
<button type="button" class="layui-btn" onclick="downloadNewWages()" style="display: none">下载工资册模板(贵阳)</button>
</div>
</div>
</form>
@ -190,6 +191,14 @@
function downloadWages() {
window.open(ctxPath + "/download/download?filename=建设银行工资导入模板.xlsx")
}
/**
* 下载工资册模板(贵阳)
* */
function downloadNewWages() {
window.open(ctxPath + "/download/download?filename=jh_gy_gzc.xlsx")
}
</script>
</body>
</html>

View File

@ -164,6 +164,20 @@
, {field: 'ywckh', width: 200, align: 'center', title: '业务参考号'}
, {field: 'lx', width: 200, align: 'center', title: '类型'}
, {field: 'qdbz', width: 200, align: 'center', title: '渠道标志'}
, {field: 'additionalData', width: 200, align: 'center', title: '额外数据',templet: function (d) {
const additionalData = d.additionalData;
if (additionalData != null && additionalData !== '' && additionalData !== 'null') {
var additionalDataArr = additionalData.split(';');
var additionalDataHtml = '';
for (var i = 0; i < additionalDataArr.length; i++) {
additionalDataHtml += additionalDataArr[i] + '<br>';
}
return additionalDataHtml;
} else {
return '';
}
}}
, {width: 200, align: 'center',title:'凭证附件', templet: '#voucher'}
, {width: 200, align: 'center',title:'工资附件', templet: '#wages'}
]]

View File

@ -81,13 +81,16 @@
{field:'ano', width:80, title: '序号' ,templet:function(res){
return res.LAY_INDEX;
}}
,{field: 'userid', width: 190, title: '用户名'}
,{field: 'username', width: 190, title: '用户名'}
,{field: 'isApp', title: '操作子系统'}
,{field: 'module', width:190, title: '操作模块'}
,{field: 'operationFunction', title: '操作功能'}
,{field: 'operationRecord', title: '操作记录'}
// ,{field: 'operationFunction', title: '操作功能'}
// ,{field: 'operationRecord', title: '操作记录'}
,{field: 'createtime', title: '操作时间'}
,{field: 'operationStatus', title: '操作状态'}
,{field: 'operationStatus', title: '操作状态',
templet: function (d) {
return '成功';
}}
]],
id : 'menuTable'
});