username@email.com
2023-02-28 67a0042c5f29e4bb0e0b82f6190f2bc51480b45c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//获取href里面的参数
function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
    var r = window.location.search.substr(1).match(reg); //匹配目标参数
    if (r != null) return unescape(r[2]); return null; //返回参数值
}
 
var list = [{ type: "1", Name: "地质勘察报告",isgd:"0",iscd:"2" }, { type: "2", Name: "项目开工通知书、开工申请报告" ,isgd:"0",iscd:"1"}, { type: "2", Name: "施工组织设计及审批文件" ,isgd:"0",iscd:"1"}, { type: "2", Name: "技术(专项)方案报审单及附件",isgd:"0",iscd:"1" }, { type: "2", Name: "工程技术交底(建设单位交底、内部交底、安全技术交底)",isgd:"0",iscd:"1" }, { type: "2", Name: "施工图纸会审纪要",isgd:"0",iscd:"1" }, { type: "2", Name: "各项专题会议纪要(工地例会、专题会议等)",isgd:"0",iscd:"1" }, { type: "2", Name: "分部、分项工程开工申请报告单",isgd:"1",iscd:"1" }, { type: "2", Name: "有关工程技术设计、设计变更往来文件及附件(包括施工监理、设计、业主方面的往来联系)",isgd:"0",iscd:"1" }, { type: "2", Name: "与业主、监理单位有关工程建设来往文件(业主联系单等)",isgd:"0",iscd:"2" }, { type: "2", Name: "监理通知单及回复单(或工程师监理(整改)通知单及附件)(问题整改、反馈内容)",isgd:"0",iscd:"2" }, { type: "2", Name: "公司内部整改通知单及整改反馈意见",isgd:"0",iscd:"2" }, { type: "2", Name: "有关省市质监部门质量检查的通知、通报、整改反馈等",isgd:"0",iscd:"2" }, { type: "2", Name: "内部工程质量管理资料、文件批复与请示等",isgd:"0",iscd:"2" }, { type: "2", Name: "工程施工月报表(进度月报、周报、日报)",isgd:"0",iscd:"2" }, { type: "3", Name: "现场签证单",isgd:"0",iscd:"3" }, { type: "3", Name: "桩机(子)分部工程验收记录",isgd:"0",iscd:"3" }, { type: "3", Name: "分部工程验收记录",isgd:"0",iscd:"3" }, { type: "3", Name: "混泥土灌注桩分项/检验批质量验收记录表",isgd:"0",iscd:"3" }, { type: "3", Name: "混泥土灌注桩工程检验批质量验收记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "钢筋加工检验批质量验收记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "钢筋安装检验批质量验收记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "模板安装检验批质量验收记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "模板拆除检验批质量验收记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "打桩记录(钻孔桩、管桩、高压旋喷桩、水泥搅拌桩、锚杆等桩型)",isgd:"0",iscd:"1" }, { type: "3", Name: "隐蔽工程验收记录",isgd:"0",iscd:"1" }, { type: "3", Name: "技术复核记录",isgd:"0",iscd:"1" }, { type: "3", Name: "钻孔施工记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "钻孔灌注桩清孔记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "钻孔灌注桩树下混凝土灌注记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "灌注桩基施工记录",isgd:"0",iscd:"1" }, { type: "3", Name: "现浇结构外观及尺寸允许偏差检验批质量验收记录",isgd:"0",iscd:"1" }, { type: "3", Name: "桩位偏差记录表",isgd:"0",iscd:"1" }, { type: "3", Name: "混凝土原材料及配合比设计检验批质量验收记录",isgd:"0",iscd:"1" }, { type: "3", Name: "混凝土施工检验批质量验收记录",isgd:"0",iscd:"1" }, { type: "3", Name: "钢筋焊接试验报告",isgd:"0",iscd:"1" }, { type: "3", Name: "砼试块抗压强度试验报告",isgd:"0",iscd:"1" }, { type: "3", Name: "商品砼出厂合格证\供应商质量证明文件",isgd:"0",iscd:"1" }, { type: "3", Name: "基桩低应变检测报告",isgd:"0",iscd:"1" }, { type: "3", Name: "基桩高应变检测报告",isgd:"0",iscd:"1" }, { type: "3", Name: "静载检测报告",isgd:"0",iscd:"1" }, { type: "3", Name: "施工日志(以册为单位,按施工部位或日期组卷)",isgd:"0",iscd:"2" }, { type: "3", Name: "工程实体照片档案",isgd:"0",iscd:"1" } ];
 
var GetLoad = function () {
 
    if (window.sysid === '') {
        var projectid = parseInt(getUrlParam('projectid'));
        $.ajax({
            url: "/PLC_company_filed/GetDefault?projectid=" + projectid,
            async: false,
            cache: false,
            dataType: "json",
            success: function(resp) {
                $("#plc_company_filed_project_code").val(resp.Num);
                $("#plc_company_filed_project_name").val(resp.projectname);
                $("#plc_company_filed_project_id").val(resp.projectid);
                //$("#plc_company_filed_title").val(resp.companyfilename);
            }
        });
 
        $("#girdtable").find(".body").remove();
        $.each(list,function(i, r) {
                $('.subtradd_js').click();
 
                $('select[name="plc_company_filed_dtl.type"]').eq(i).attr('disabled', 'disabled');
                $('select[name="plc_company_filed_dtl.type"]').eq(i).chosen();
                $('input[name="plc_company_filed_dtl.name"]').eq(i).attr('disabled', 'disabled');
                $('select[name="plc_company_filed_dtl.type"]').eq(i).val(r.type);
                $('input[name="plc_company_filed_dtl.name"]').eq(i).val(r.Name);
                $('select[name="plc_company_filed_dtl.filing_range"]').eq(i).val(r.isgd);
                $('select[name="plc_company_filed_dtl.duration"]').eq(i).val(r.iscd);
                $('select[name="plc_company_filed_dtl.filing_range"]').eq(i).trigger("chosen:updated");
                $('select[name="plc_company_filed_dtl.duration"]').eq(i).trigger("chosen:updated");
                $('input[name="plc_company_filed_dtl.name"]').eq(i).attr("title", r.Name);
                $('select[name="plc_company_filed_dtl.type"]').eq(i).trigger("chosen:updated");
        });
    } else {
        $.each(list, function (i, r) {
            $('input[name="plc_company_filed_dtl.name"][value="' + r.Name +'"]').attr('disabled', 'disabled');
            $('input[name="plc_company_filed_dtl.name"][value="' + r.Name + '"]').parent().parent().find('select[name="plc_company_filed_dtl.type"]').attr('disabled', 'disabled');
            $('input[name="plc_company_filed_dtl.name"][value="' + r.Name + '"]').parent().parent().find('select[name="plc_company_filed_dtl.type"]').trigger("chosen:updated");
 
        });
 
 
        $.each($('input[name="plc_company_filed_dtl.name"],input[name="plc_company_filed_dtl.remark"]'),function(i, r) {
                var val = $(this).val();
                $(this).attr("title", val);
        });
    }
    
}
 
var initData = function () {
    var projectid = parseInt(getUrlParam('projectid'));
    inputs = '<input type="hidden" id="plc_company_filed_project_id" name="plc_company_filed_project_id" field="project_id" value="' + (sysid == '' ? 0 : initItems.project_id)+'">';
    $('#plc_company_filed_project_name').after(inputs);
    GetLoad();
    var title = $("#txtTitle").html();
    var pjname = $("#plc_company_filed_project_name").val();
    $("#txtTitle").html(pjname + "【" + title + "】");
    $("#girdtable").find("tbody").find(".head").find("td").eq(0).css({ "width": "20px", "text-align": "center" });
    $("#girdtable").find("tbody").find(".head").find("td").eq(1).css({ "width": "580px", "text-align": "center" });
    $("#girdtable").find("tbody").find(".head").find("td").eq(2).css({ "width": "20px", "text-align": "center" });
    $("#girdtable").find("tbody").find(".head").find("td").eq(3).css({ "width": "20px", "text-align": "center" });
    $("#girdtable").find("tbody").find(".head").find("td").eq(4).css("text-align", "center");
    //$.each($("#girdtable").find('tbody').find(".body"), function (i, r) {
    //    console.log(11);
    //    $(r).find("input[name='plc_company_filed_dtl.name']").on("change", function (i, row) {
    //        console.log(22);
    //        var filename = $(row).val();
    //        $(row).attr("title", filename);
    //    });
    // });
    //$.each($("#girdtable").find('tbody').find(".body"), function (i, r) {
    //    console.log($("#girdtable").find('tbody').find(".body").length);
    //    console.log($(r).find("td").find("input[name='plc_company_filed_dtl.remark']").html());
    //    $(r).find("td").find("input[name='plc_company_filed_dtl.remark']").bind("change", function (i, row) {
    //        console.log(33);
    //        var filename = $(row).html();
    //        console.log(filename);
    //        $(row).attr("title", filename);
    //    });
    //});   
}
 
 
var createMethod = function () {
    var nindex = $("#girdtable").find('tbody').find(".body").length - 1;
    $('input[name="plc_company_filed_dtl.name"]').eq(nindex).bind('change',
        function () {
            var val = $(this).val();
            $(this).attr('title',val);
        });
    $('input[name="plc_company_filed_dtl.remark"]').eq(nindex).bind('change',
        function () {
            var val = $(this).val();
            $(this).attr('title', val);
        });
    initChosen();
}