工程预付款统计-字典管理、工程管理

This commit is contained in:
lSun 2025-11-17 13:20:50 +08:00
parent 9eceb4f5fa
commit 18992cdc49
11 changed files with 130 additions and 3 deletions

View File

@ -233,6 +233,13 @@ public class PrepaymentController {
return service.getType();
}
@LogAnnotation
@GetMapping("/getUnit")
@ApiOperation(value = "往来单位下拉选")
public List<PrepaymentBean> getUnit() {
return service.getUnit();
}
@LogAnnotation
@GetMapping("/getProId")
@ApiOperation(value = "工程下拉选")

View File

@ -80,4 +80,6 @@ public interface PrepaymentDao {
List<PrepaymentBean> getType();
List<PrepaymentBean> getProId();
List<PrepaymentBean> getUnit();
}

View File

@ -125,4 +125,6 @@ public interface PrepaymentService {
List<PrepaymentBean> getType();
List<PrepaymentBean> getProId();
List<PrepaymentBean> getUnit();
}

View File

@ -500,4 +500,9 @@ public class PrepaymentServiceImpl implements PrepaymentService {
public List<PrepaymentBean> getProId() {
return dao.getProId();
}
@Override
public List<PrepaymentBean> getUnit() {
return dao.getUnit();
}
}

View File

@ -301,7 +301,7 @@
SELECT count(1)
FROM bm_project_prepayment
WHERE IS_ACTIVE = 1
AND (type = #{id} or business_unit = #{id})
AND (type = #{id} or business_unit = #{id} or contact_unit = #{id})
</select>
<select id="getBusinessUnit" resultType="com.bonus.boot.manager.ca.bm.entity.PrepaymentBean">
@ -339,4 +339,10 @@
FROM bm_project
WHERE IS_ACTIVE = 1
</select>
<select id="getUnit" resultType="com.bonus.boot.manager.ca.bm.entity.PrepaymentBean">
SELECT id, `name`
FROM bm_project_prepayment_dict
WHERE IS_ACTIVE = 1
AND type = '3'
</select>
</mapper>

View File

@ -11,6 +11,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function(){
});
getBusinessUnit("");
getType("");
getUnit("")
getProId( "")
initData();
form.render();
@ -160,6 +161,31 @@ function getType(id){
})
}
//往来单位
function getUnit(id){
$("#contactUnit").empty();
$.ajax({
url: ctxPath + '/prepayment/getUnit',
method: 'get',
async: false,
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>';
}
}
}
$("#contactUnit").append(str);
layui.form.render('select')
}
})
}
//查询工程下拉选
function getProId(id){
$("#projectId").empty();

View File

@ -266,3 +266,59 @@ function getProId(id){
}
})
}
/**
* 字典功能
*/
function addDict() {
var index = layer.open({
title: ["字典管理", 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
type: 2,
content: "./proDictList.html",
area: ["90%", "90%"],
maxmin: false,
btn: ['刷新关闭', '关闭'],
// 第一个按钮(关闭)的回调
yes: function(index, layero) {
layer.close(index); // 先关闭
window.location.reload(); // 刷新父页面(当前页面)
return false; // 阻止默认关闭行为(其实已手动关闭,这里 return false 更保险)
},
// 第二个按钮(关闭-刷新)的回调
btn2: function(index, layero) {
layer.close(index); // 直接关闭
},
});
}
/**
*工程功能
*/
function addPro() {
var index = layer.open({
title: ["工程管理", 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
type: 2,
content: "./proManage.html",
area: ["90%", "90%"],
maxmin: false,
btn: ['刷新关闭', '关闭'],
// 第一个按钮(关闭)的回调
yes: function(index, layero) {
layer.close(index); // 先关闭
window.location.reload(); // 刷新父页面(当前页面)
return false; // 阻止默认关闭行为(其实已手动关闭,这里 return false 更保险)
},
// 第二个按钮(关闭-刷新)的回调
btn2: function(index, layero) {
layer.close(index); // 直接关闭
},
});
}
function refresh(){
layer.confirm('确定要刷新吗?', {
btn : [ '确定', '取消' ]
}, function() {
window.location.reload();
});
}

View File

@ -60,7 +60,11 @@
<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: 89%" type="text" name="contactUnit" id="contactUnit" maxlength="50" lay-verify="required" class="layui-input">
<select name="contactUnit" id="contactUnit" lay-verify="required" lay-search="">
<option value="">请选择</option>
</select>
<!-- <input style="width: 89%" type="text" name="contactUnit" id="contactUnit" maxlength="50" lay-verify="required" class="layui-input">-->
</div>
</div>
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >

View File

@ -10,7 +10,7 @@
/* CSS样式 */
#my-button {
position: absolute;
top: 15px;
top: 300px;
right: 450px;
}
@ -31,6 +31,7 @@
<option value="">请选择</option>
<option value="1">责任单位</option>
<option value="2">预付款类型</option>
<option value="3">往来单位</option>
</select>
</div>
</div>

View File

@ -48,6 +48,7 @@
<option value="">请选择</option>
<option value="1">责任单位</option>
<option value="2">预付款类型</option>
<option value="3">往来单位</option>
</select>
</div>
<button id="searchBt" class="layui-btn" style="margin-top: -0.3%; margin-left: 15px;">
@ -191,6 +192,8 @@
return "责任单位";
}else if(type == 2){
return "预付款类型";
}else if(type == 3){
return "往来单位";
}
},
},

View File

@ -81,6 +81,21 @@
<div style="margin-right: 15px;">
<div class="widget-body">
<div>余额合计数:<span id="totalActiveBalance"></span></div>
<div style="margin: 10px 0 10px 0">
<button id="addDict" class="layui-btn" onclick="addDict()" style="margin-top: -0.3%;background-color: #f59a23 !important;">
下拉选-字典管理
</button>
<button id="addPro" class="layui-btn" onclick="addPro()" style="margin-top: -0.3%;background-color: #f59a23 !important;">
下拉选-工程管理
</button>
<button id="refresh" class="layui-btn" onclick="refresh()" style="margin-top: -0.3%;background-color: #f59a23 !important;">
刷新页面
</button>
</div>
<table id="demo" lay-filter="test" class="layui-table" lay-size="lg">
</table>
</div>