费用单据调试

master
xiechao 2024-05-13 20:18:12 +08:00
parent bc45de375d
commit 38981db060
10 changed files with 78 additions and 41 deletions

View File

@ -217,6 +217,7 @@ public class ApiController extends BaseController {
@PostMapping(value = "/jxfpts") @PostMapping(value = "/jxfpts")
public Object jxfpts(@RequestBody Map map , HttpSession session){ public Object jxfpts(@RequestBody Map map , HttpSession session){
System.out.println("===进项发票推送数据:"+JSON.toJSONString(map));
Map mapModel = new HashMap(); Map mapModel = new HashMap();
try { try {
iBoCgfpService.saveZZSGL_XX_JXFP(map); iBoCgfpService.saveZZSGL_XX_JXFP(map);

View File

@ -40,8 +40,17 @@ public class FybxController extends BaseController {
final IBoKpsqService iBoKpsqService; final IBoKpsqService iBoKpsqService;
// final String F7_URL = "http://maxkiddie.w1.luyouxia.net"; // final String F7_URL = "http://maxkiddie.w1.luyouxia.net";
// final String F7_URL = "https://f7-demo.jchl.com";
final String F7_URL = "http://8.130.133.196:9003"; // 测试环境
// final String F7_URL = "http://8.130.133.196:9003";
// final String APP_KEY = "90d0fbd91d437658d2bdbf66f3ca4f61";
// final String APP_SECRET = "97835d6a607e1b83cf08f11a90dcb16820e5e8a3";
// demo环境
final String F7_URL = "https://f7-demo.jchl.com";
final String APP_KEY = "ede5cdc0ae7b70c0814906b2d82f0955";
final String APP_SECRET = "2b993487212d372c6281f4c50508add996a5265b";
@RequestMapping(value = "index", method = RequestMethod.GET) @RequestMapping(value = "index", method = RequestMethod.GET)
public String index() { public String index() {
@ -111,7 +120,7 @@ public class FybxController extends BaseController {
mapModel.put("data", successCount); mapModel.put("data", successCount);
code = 1; code = 1;
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage()); log.error("新增费用报销信息失败:"+e.getMessage(),e);
code = -1; code = -1;
msg = "新增费用报销信息失败!" + e.getMessage(); msg = "新增费用报销信息失败!" + e.getMessage();
} }
@ -191,7 +200,8 @@ public class FybxController extends BaseController {
.execute().body(); .execute().body();
cn.hutool.json.JSONObject resObj = JSONUtil.parseObj(res); cn.hutool.json.JSONObject resObj = JSONUtil.parseObj(res);
if(!"200".equals(resObj.getStr("code"))){ if(!"200".equals(resObj.getStr("code"))){
throw new RuntimeException(res); // throw new RuntimeException(res);
return getResult(mapModel, -1, resObj.getStr("message"), callback);
} }
log.info("返回结果:{}", JSONUtil.toJsonPrettyStr(resObj)); log.info("返回结果:{}", JSONUtil.toJsonPrettyStr(resObj));
@ -266,8 +276,8 @@ public class FybxController extends BaseController {
private String getToken(){ private String getToken(){
//获取token //获取token
cn.hutool.json.JSONObject tokenJsonObReq = new cn.hutool.json.JSONObject(); cn.hutool.json.JSONObject tokenJsonObReq = new cn.hutool.json.JSONObject();
tokenJsonObReq.put("app_key","90d0fbd91d437658d2bdbf66f3ca4f61"); tokenJsonObReq.put("app_key",APP_KEY);
tokenJsonObReq.put("app_secret","97835d6a607e1b83cf08f11a90dcb16820e5e8a3"); tokenJsonObReq.put("app_secret",APP_SECRET);
String post = HttpRequest.post(F7_URL + "/taxshare/api/comApi/getToken") String post = HttpRequest.post(F7_URL + "/taxshare/api/comApi/getToken")
.header("Content-Type", "application/json") .header("Content-Type", "application/json")
.body(tokenJsonObReq).execute().body(); .body(tokenJsonObReq).execute().body();

View File

@ -77,6 +77,8 @@ public class BoCgfpServiceImpl implements IBoCgfpService {
fpxxMap.put("SE",fpxx.get("hjse")); fpxxMap.put("SE",fpxx.get("hjse"));
fpxxMap.put("JSHJ",fpxx.get("jshj")); fpxxMap.put("JSHJ",fpxx.get("jshj"));
fpxxMap.put("FYLX",fpxx.get("fylx")); fpxxMap.put("FYLX",fpxx.get("fylx"));
fpxxMap.put("XFMC",fpxx.get("xfmc"));
fpxxMap.put("XFSH",fpxx.get("xfsh"));
Map map = fphqMapper.select_JX_FPXX_BY_DMHM(fpxxMap); Map map = fphqMapper.select_JX_FPXX_BY_DMHM(fpxxMap);

View File

@ -149,7 +149,9 @@
</select> </select>
<select id="selectZZSGL_JX_FPXX" resultType="map" parameterType="map"> <select id="selectZZSGL_JX_FPXX" resultType="map" parameterType="map">
select * from ZZSGL_JX_FPXX T select * from ZZSGL_JX_FPXX T
<where> LEFT JOIN zzsgl_jx_fydj_mx_fp F on T.FPID = F.FPID
where
F.FPID is null
<if test="FPDM!=null and FPDM!=''"> <if test="FPDM!=null and FPDM!=''">
AND T.FPDM = #{FPDM} AND T.FPDM = #{FPDM}
</if> </if>
@ -168,6 +170,5 @@
<if test="FPLX!=null and FPLX!=''"> <if test="FPLX!=null and FPLX!=''">
AND T.FPLX = #{FPLX} AND T.FPLX = #{FPLX}
</if> </if>
</where>
</select> </select>
</mapper> </mapper>

View File

@ -86,8 +86,8 @@ var fybx_list = (function () {
return FybxUtil.getBxzt_label(d.BXZT); return FybxUtil.getBxzt_label(d.BXZT);
} }
}, },
{field: 'KHSH', title: '客户税号', width: 160, align: 'left'}, {field: 'KHSH', title: '企业税号', width: 160, align: 'left'},
{field: 'KHMC', title: '客户名称', width: 160, align: 'left'}, {field: 'KHMC', title: '企业名称', width: 160, align: 'left'},
{ {
title: '操作', fixed: 'right', width: 220, align: 'center', title: '操作', fixed: 'right', width: 220, align: 'center',
templet: function (data) { templet: function (data) {
@ -238,6 +238,9 @@ var fybx_list = (function () {
}, },
btn2: function (index, layero) { btn2: function (index, layero) {
parent.layer.closeAll(); parent.layer.closeAll();
},
end: function (){
curSeg.onQuery();
} }
}); });
@ -304,6 +307,9 @@ var fybx_list = (function () {
}, },
btn2: function (index, layero) { btn2: function (index, layero) {
},
end: function (){
curSeg.onQuery();
} }
}); });
} }
@ -327,15 +333,9 @@ var fybx_list = (function () {
console.log(res); console.log(res);
curSeg.onQuery(); curSeg.onQuery();
if (res.code == '0') { if (res.code == '0') {
layer.msg(res.msg, { sctTools.successMsg("发起报销成功");
icon: 6,
time: 3000
});
} else { } else {
layer.msg(res.msg, { sctTools.errorMsg(res.msg);
icon: 2,
time: 3000
});
} }
} }
}) })
@ -371,15 +371,9 @@ var fybx_list = (function () {
console.log(res); console.log(res);
curSeg.onQuery(); curSeg.onQuery();
if (res.code == '0') { if (res.code == '0') {
layer.msg(res.msg, { sctTools.successMsg("操作成功");
icon: 6,
time: 3000
});
} else { } else {
layer.msg(res.msg, { sctTools.errorMsg(res.msg);
icon: 2,
time: 3000
});
} }
} }
}) })

View File

@ -44,6 +44,7 @@ var kpsq_add =(function(){
onload : function(){ onload : function(){
curSeg = kpsq_add; curSeg = kpsq_add;
initLayout(); initLayout();
curSeg.initDjxx();
curSeg.onSavePre(); curSeg.onSavePre();
}, },
//在表格中插入或删除一行数据时的回调函数 //在表格中插入或删除一行数据时的回调函数
@ -72,6 +73,16 @@ var kpsq_add =(function(){
}); });
}); });
}, },
initDjxx(){
$('#BXR').val('张磊')
$('#PHONE').val('18768898285')
$('#KHMC').val('西安恰康医药连锁有限责任公司雁环路店')
$('#KHSH').val('91610102668656499H')
$('#DJLX').val('1')
$('#BXSY').val('项目出差')
$('#SSBM').val('交付实施部')
$('#ZW').val('项目经理')
},
// 保存数据 // 保存数据
onSave : function(data){ onSave : function(data){
@ -223,6 +234,9 @@ var kpsq_add =(function(){
rowData.HJJE = hjje; rowData.HJJE = hjje;
rowData.HJSE = hjse; rowData.HJSE = hjse;
$("#DJJE").val(hjje);
$("#DJSE").val(hjse);
var currentRow = $('#' + tableId).find('tr[data-current=true]'); var currentRow = $('#' + tableId).find('tr[data-current=true]');
if (!!currentRow.length) { if (!!currentRow.length) {
Object.keys(rowData).forEach(name => { Object.keys(rowData).forEach(name => {
@ -235,5 +249,12 @@ var kpsq_add =(function(){
tablePublic.onInsertData([rowData], tableId); tablePublic.onInsertData([rowData], tableId);
} }
}, },
/**
* 添加一条费用明细
*/
onAddFymxRow: function (obj){
tablePublic.onInsert(this, tableId);
layui.form.render('select'); // 重新渲染 select 组件
}
}; };
})(); })();

View File

@ -273,6 +273,9 @@ var kpsq_edit = (function () {
rowData.HJJE = hjje; rowData.HJJE = hjje;
rowData.HJSE = hjse; rowData.HJSE = hjse;
$("#DJJE").val(hjje);
$("#DJSE").val(hjse);
var currentRow = $('#' + tableId).find('tr[data-current=true]'); var currentRow = $('#' + tableId).find('tr[data-current=true]');
if (!!currentRow.length) { if (!!currentRow.length) {
Object.keys(rowData).forEach(name => { Object.keys(rowData).forEach(name => {
@ -289,7 +292,7 @@ var kpsq_edit = (function () {
* 添加一条费用明细 * 添加一条费用明细
*/ */
onAddFymxRow: function (obj){ onAddFymxRow: function (obj){
curSeg.onInsert(obj, tableId); tablePublic.onInsert(this, tableId);
layui.form.render('select'); // 重新渲染 select 组件 layui.form.render('select'); // 重新渲染 select 组件
} }
}; };

View File

@ -26,11 +26,14 @@ var zbhtxx_spbmSelector =(function(){
cols: [[ cols: [[
{type: 'checkbox'}, {type: 'checkbox'},
{field: 'FPID', title:"发票ID", hide:true}, {field: 'FPID', title:"发票ID", hide:true},
{field: 'FPDM', title: '发票代码', width: 200, align:'center'}, {field: 'FPDM', title: '发票代码', width: 150, align:'center'},
{field: 'FPHM', title: '发票号码', width: 200, align:'center'}, {field: 'FPHM', title: '发票号码', width: 150, align:'center'},
{field: 'KPRQ', title: '开票日期', width: 200, align:'center'}, {field: 'KPRQ', title: '开票日期', width: 200, align:'center'},
{field: 'XFMC', title: '销方名称', width: 120, align:'center'}, {field: 'XFMC', title: '销方名称', width: 120, align:'center'},
{field: 'XFSH', title: '销方税号', width: 110, align:'center'} {field: 'XFSH', title: '销方税号', width: 110, align:'center'},
{field: 'JEBHS', title: '不含税金额', width: 90, align:'center'},
{field: 'SE', title: '税额', width: 90, align:'center'},
{field: 'JSHJ', title: '含税金额', width: 90, align:'center'},
]], ]],
parseData: function (res) { parseData: function (res) {
var code = res.code; var code = res.code;
@ -117,11 +120,14 @@ var zbhtxx_spbmSelector =(function(){
cols: [[ cols: [[
{type: 'checkbox'}, {type: 'checkbox'},
{field: 'FPID', title:"发票ID", hide:true}, {field: 'FPID', title:"发票ID", hide:true},
{field: 'FPDM', title: '发票代码', width: 200, align:'center'}, {field: 'FPDM', title: '发票代码', width: 150, align:'center'},
{field: 'FPHM', title: '发票号码', width: 200, align:'center'}, {field: 'FPHM', title: '发票号码', width: 150, align:'center'},
{field: 'KPRQ', title: '开票日期', width: 200, align:'center'}, {field: 'KPRQ', title: '开票日期', width: 200, align:'center'},
{field: 'XFMC', title: '销方名称', width: 120, align:'center'}, {field: 'XFMC', title: '销方名称', width: 120, align:'center'},
{field: 'XFSH', title: '销方税号', width: 110, align:'center'} {field: 'XFSH', title: '销方税号', width: 110, align:'center'},
{field: 'JEBHS', title: '不含税金额', width: 90, align:'center'},
{field: 'SE', title: '税额', width: 90, align:'center'},
{field: 'JSHJ', title: '含税金额', width: 90, align:'center'},
]], ]],
parseData: function (res) { parseData: function (res) {
var code = res.code; var code = res.code;

View File

@ -52,6 +52,7 @@
name="DJBH" name="DJBH"
placeholder="单据编号" placeholder="单据编号"
autocomplete="off" autocomplete="off"
lay-verify="required"
value="" value=""
/> />
</div> </div>
@ -147,7 +148,7 @@
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">客户税号:</label> <label class="layui-form-label">企业税号:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" class="layui-input" <input type="text" class="layui-input"
id="KHSH" id="KHSH"
@ -160,7 +161,7 @@
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">客户名称:</label> <label class="layui-form-label">企业名称:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" class="layui-input" <input type="text" class="layui-input"
id="KHMC" id="KHMC"
@ -180,7 +181,6 @@
name="SSBM" name="SSBM"
placeholder="所属部门" placeholder="所属部门"
autocomplete="off" autocomplete="off"
lay-verify="required"
value="" value=""
/> />
</div> </div>
@ -193,7 +193,6 @@
name="ZW" name="ZW"
placeholder="职位" placeholder="职位"
autocomplete="off" autocomplete="off"
lay-verify="required"
value="" value=""
/> />
</div> </div>
@ -262,7 +261,7 @@
<td> <td>
<div class="m_table_btn"> <div class="m_table_btn">
<span class="s_fc_blue" onclick="kpsq_add.openFpxx();">关联发票</span> <span class="s_fc_blue" onclick="kpsq_add.openFpxx();">关联发票</span>
<span class="s_fc_blue" onclick="kpsq_add.onAddFymxRow(this);">增加</span> <!-- <span class="s_fc_blue" onclick="kpsq_add.onAddFymxRow();">增加</span>-->
<span class="s_fc_red" onclick="kpsq_add.onDeleteKpmx(this);">删除</span> <span class="s_fc_red" onclick="kpsq_add.onDeleteKpmx(this);">删除</span>
</div> </div>
</td> </td>

View File

@ -260,7 +260,7 @@
<td> <td>
<div class="m_table_btn"> <div class="m_table_btn">
<span class="s_fc_blue" onclick="kpsq_edit.openFpxx(this);">关联发票</span> <span class="s_fc_blue" onclick="kpsq_edit.openFpxx(this);">关联发票</span>
<span class="s_fc_blue" onclick="kpsq_edit.onAddFymxRow(this);">增加</span> <!-- <span class="s_fc_blue" onclick="kpsq_edit.onAddFymxRow();">增加</span>-->
<span class="s_fc_red" onclick="kpsq_edit.onDeleteKpmx(this);">删除</span> <span class="s_fc_red" onclick="kpsq_edit.onDeleteKpmx(this);">删除</span>
</div> </div>
</td> </td>