parent
6581e358ba
commit
209b0a3b50
|
|
@ -56,6 +56,8 @@ public class DownloadController {
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -40,4 +40,9 @@ public class PayAccountInfoBean {
|
|||
* 开户行地址
|
||||
*/
|
||||
String openingBankAddress;
|
||||
|
||||
/**
|
||||
* 开户日期
|
||||
*/
|
||||
String openingAccountDate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,12 +106,14 @@ public class PayAccountInfoServiceImpl implements PayAccountInfoService {
|
|||
writer.setColumnWidth(3, 35);
|
||||
writer.writeCellValue(4,1,"开户行地址");
|
||||
writer.setColumnWidth(4, 35);
|
||||
writer.writeCellValue(5,1,"备注");
|
||||
writer.writeCellValue(5,1,"开户时间");
|
||||
writer.setColumnWidth(4, 35);
|
||||
writer.writeCellValue(6,1,"备注");
|
||||
writer.setColumnWidth(5, 35);
|
||||
writer.writeCellValue(6,1,"操作人");
|
||||
writer.writeCellValue(7,1,"操作人");
|
||||
writer.setColumnWidth(6, 10);
|
||||
writer.writeCellValue(7,1,"操作时间");
|
||||
writer.setColumnWidth(7, 25);
|
||||
writer.writeCellValue(8,1,"操作时间");
|
||||
writer.setColumnWidth(7, 45);
|
||||
|
||||
// 设置表头高度、单元格宽度
|
||||
writer.setRowHeight(0, 35);
|
||||
|
|
@ -121,9 +123,10 @@ public class PayAccountInfoServiceImpl implements PayAccountInfoService {
|
|||
writer.writeCellValue(2, 2 + i, list.get(i).getAccountNumber()==null?"":list.get(i).getAccountNumber());
|
||||
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).getRemarks()==null?"":list.get(i).getRemarks());
|
||||
writer.writeCellValue(6, 2 + i, list.get(i).getCzyName()==null?"":list.get(i).getCzyName());
|
||||
writer.writeCellValue(7, 2 + i, list.get(i).getCzsj()==null?"":list.get(i).getCzsj());
|
||||
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");
|
||||
|
|
|
|||
|
|
@ -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')")
|
||||
|
|
|
|||
|
|
@ -83,4 +83,6 @@ public interface PayableDao {
|
|||
|
||||
|
||||
List<Integer> getHTIDByMC(String htmc);
|
||||
|
||||
List<PayAccountInfoBean> getBankAccount();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,5 +52,8 @@ public class PayableBean {
|
|||
String gyssl;//供应商数量
|
||||
String ht;//对应的合同id
|
||||
String department;//组织机构
|
||||
Integer accountId;//应付款账号
|
||||
String accountName;//应付款账号
|
||||
Integer personNum;//人次
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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<>();
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
server.port=20003
|
||||
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=2004
|
||||
spring.redis.password=Plzbns@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.
|
|
@ -4,14 +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,opening_bank,opening_bank_address)
|
||||
values (#{name},#{remarks},#{czy},now(),'1', #{accountNumber},#{openingBank},#{openingBankAddress})
|
||||
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},
|
||||
opening_bank = #{openingBank},opening_bank_address = #{openingBankAddress}
|
||||
opening_bank = #{openingBank},opening_bank_address = #{openingBankAddress},opening_account_date = #{openingAccountDate}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
|
@ -36,6 +36,7 @@
|
|||
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
|
||||
|
|
@ -45,6 +46,9 @@
|
|||
<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">
|
||||
|
|
@ -53,7 +57,8 @@
|
|||
remark as remarks,
|
||||
account_number as accountNumber,
|
||||
opening_bank as openingBank,
|
||||
opening_bank_address as openingBankAddress
|
||||
opening_bank_address as openingBankAddress,
|
||||
opening_account_date as openingAccountDate
|
||||
from ca_bm_pay_account_info
|
||||
where is_active = '1'
|
||||
and id = #{id}
|
||||
|
|
@ -71,6 +76,7 @@
|
|||
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
|
||||
|
|
@ -80,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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
@ -291,11 +302,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 +332,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 +753,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>
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
|
||||
<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">
|
||||
|
|
@ -73,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();
|
||||
});
|
||||
|
|
@ -90,6 +102,7 @@
|
|||
$("#remarks").val(data.remarks);
|
||||
$("#openingBank").val(data.openingBank);
|
||||
$("#openingBankAddress").val(data.openingBankAddress);
|
||||
$("#openingAccountDate").val(data.openingAccountDate);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -106,12 +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',
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@
|
|||
.wrap {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.layui-input, .layui-textarea{
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
</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 !important" 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 !important" 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 !important" 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 !important" 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 !important" placeholder="请输入制单人">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" >
|
||||
<div class="layui-input-inline" >
|
||||
<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"; // 转换流
|
||||
|
|
|
|||
|
|
@ -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;">
|
||||
搜索
|
||||
|
|
@ -48,7 +53,7 @@
|
|||
添加
|
||||
</button>
|
||||
<button id="exportBt" class="layui-btn">
|
||||
模板下载
|
||||
下载
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -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,7 +116,8 @@
|
|||
, toolbar: true //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
|
||||
, defaultToolbar: []
|
||||
, where: {
|
||||
name: $('#name').val()
|
||||
name: $('#name').val(),
|
||||
openingAccountDate: $('#openingAccountDate').val()
|
||||
} //post请求必须加where ,post请求需要的参数
|
||||
, cellMinWidth: 80
|
||||
, cols: [[ //表头
|
||||
|
|
@ -117,6 +130,7 @@
|
|||
}
|
||||
, {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: '操作时间'}
|
||||
|
|
@ -192,7 +206,8 @@
|
|||
, method: 'post' //方式默认是get
|
||||
, page: true
|
||||
, where: {
|
||||
name: $('#name').val()
|
||||
name: $('#name').val(),
|
||||
openingAccountDate: $('#openingAccountDate').val()
|
||||
} //设定异步数据接口的额外参数
|
||||
});
|
||||
});
|
||||
|
|
@ -200,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"; // 转换流
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
Loading…
Reference in New Issue