|
@@ -45,16 +45,18 @@ layui.config({
|
|
|
{field:'xmsl',width:190,title:"结算书数量"},
|
|
|
{field:'cjsq',width:170,title: '创建时期'},
|
|
|
{field:'djr',width:160,title:'登记人'},
|
|
|
- {field:'op',title:"操作",minWidth:400,templet:function(d){
|
|
|
+ {field:'op',align:'center',title:"操作",minWidth:500,templet:function(d){
|
|
|
////对操作进行初始化
|
|
|
var xml = "";
|
|
|
if(d.status==1){ //工程按钮
|
|
|
- xml += "<div><a style='margin-top: 3px;' class='layui-btn layui-btn-primary layui-btn-xs' onclick=\"look( '${ctx}/project/form?id=" + d.id + "&tabId=1')\">查看</a>"
|
|
|
+ xml +="<div><a style='margin-top: 3px;' class='layui-btn layui-btn-primary layui-btn-xs' onclick=\"look( '${ctx}/project/form?id=" + d.id + "&tabId=1')\">查看</a>"
|
|
|
+"<a style='margin-top: 3px;' class='layui-btn layui-btn-xs' onclick=\"update( '${ctx}/project/form?id=" + d.id + "&tabId=2')\">修改</a>"
|
|
|
+"<a style='margin-top: 3px;' class='layui-btn layui-btn-normal layui-btn-xs' lay-event='add'>添加结算书</a>"
|
|
|
- +"<a style='margin-top: 3px;' class='layui-btn layui-btn-warm layui-btn-xs' lay-event=''href=\"${ctx}/project/export?id=" + d.id+"\">导出</a>"
|
|
|
+ +"<a style='margin-top: 3px;' class='layui-btn layui-btn-xs layui-btn-danger' onclick=\"deleteProject('"+d.id+"')\">删除</a>"
|
|
|
+ // +"<br>"
|
|
|
+"<a style='margin-top: 3px;' class='layui-btn layui-btn-warm layui-btn-xs' lay-event=''href=\"${ctx}/project/export?id=" + d.id+"\">单体工程导出</a>"
|
|
|
- +"<a style='margin-top: 3px;' class='layui-btn layui-btn-xs layui-btn-danger' onclick=\"deleteProject('"+d.id+"')\">删除</a><div>";
|
|
|
+ +"<a style='margin-top: 3px;' class='layui-btn layui-btn-warm layui-btn-xs' lay-event=''href=\"${ctx}/project/export?id=" + d.id+"\">导出</a><div>";
|
|
|
+
|
|
|
}
|
|
|
if(d.status==2){ //项目表头操作
|
|
|
xml +="<span class='myspan'>操作</span>";
|
|
@@ -105,9 +107,9 @@ layui.config({
|
|
|
</c:forEach>
|
|
|
</c:forEach>
|
|
|
],
|
|
|
-
|
|
|
done: function () {
|
|
|
$(".myspan").closest("tr").css('background-color','#f2f2f2');
|
|
|
+ // $("#br_div").closest("tr").css('height','break-word');
|
|
|
layer.closeAll('loading');
|
|
|
}
|
|
|
});
|
|
@@ -158,22 +160,24 @@ function refresh(){ //刷新
|
|
|
$("#fromSumbit").submit();
|
|
|
}
|
|
|
function addProject(){ //添加工程
|
|
|
- layer.prompt({title: '请输入工程名称', formType: 3,offset:['35%','37%']}, function(text, index){
|
|
|
- layer.close(index);
|
|
|
- $.ajax({
|
|
|
- type: "post",
|
|
|
- url: "${ctx}/project/save",
|
|
|
- data:{projectName:text},
|
|
|
- dataType: "json",
|
|
|
- success: function(data){
|
|
|
- if(data.success){
|
|
|
- layer.msg(data.msg, {icon: 6});
|
|
|
- window.location.reload();
|
|
|
- }else{
|
|
|
- layer.msg(data.msg, {icon: 5});
|
|
|
- }
|
|
|
+ layui.use(['table','layer'],function(){
|
|
|
+ layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: '添加工程',
|
|
|
+ offset:['7%','20%'],
|
|
|
+ area: ['60%', '90%'],
|
|
|
+ shade: 0.8,
|
|
|
+ shadeClose: true,
|
|
|
+ content: '${ctxp}/webpage/modules/sg/project/addprojectForm.jsp'
|
|
|
+ , btn: ['确定','关闭']
|
|
|
+ ,yes: function(index, layero){
|
|
|
+ var bodyparent = layer.getChildFrame('body', index); //当前页面 获取子类(弹出层body)的属性
|
|
|
+ bodyparent.find('#btnSub').click(); //获取子类页面的按钮,点击事件。
|
|
|
}
|
|
|
- });
|
|
|
+ ,btn2: function(index, layero){
|
|
|
+ layer.close(index);
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
function look(url) { //工程 查看
|