1
wtt
2025-12-29 3425237a2b54ca28fc3e3c5f7c35a7fbef4e15fa
WebTM/views/ÏîÄ¿¹ÜÀí/¹¤³ÌÏîÄ¿/PM_ProjectBeginBillMain.html
@@ -14,6 +14,7 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/PageTitle.js"></script>
    <style>
        .main-btn { /*头部主按钮*/
            padding: 0 2px; /*调整按钮左右空隙大小*/
@@ -57,6 +58,7 @@
                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">退出</button>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill">
                        <h1 style="text-align: center; padding: 10px 0;"><b>项目启动单</b></h1>
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <li lay-id="1" style="padding:1px;" class="layui-this">基本信息</li>
                            <li lay-id="2" style="padding:1px;">其他信息</li>
@@ -108,7 +110,7 @@
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">客户</label>
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">客户<label style="color:red"> * </label></label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HCusName" name="HCusName" id="HCusName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HCusID" id="HCusID" lay-verify="HCusID" value="0">
@@ -132,7 +134,7 @@
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">合同总金额</label>
                                            <label class="layui-form-label" style="width: 85px;">合同总金额<label style="color:red"> * </label></label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" lay-verify="HSumMoney" name="HSumMoney" id="HSumMoney">
                                            </div>
@@ -147,13 +149,13 @@
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">结算金额</label>
                                            <label class="layui-form-label" style="width: 85px;">结算金额<label style="color:red"> * </label></label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" lay-verify="HMoney" name="HMoney" id="HMoney" value="0">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">合同预估人天</label>
                                            <label class="layui-form-label" style="width: 85px;">合同预估人天<label style="color:red"> * </label></label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" lay-verify="HConWorkDays" name="HConWorkDays" id="HConWorkDays" value="0" style="width:190px;">
                                            </div>
@@ -161,7 +163,7 @@
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">交付方</label>
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">交付方<label style="color:red"> * </label></label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HPMTeamName" name="HPMTeamName" id="HPMTeamName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HPMTeamID" id="HPMTeamID" lay-verify="HPMTeamID" value="0">
@@ -218,6 +220,7 @@
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--其他信息-->
                            <div class="layui-tab-item">
                                <div class="layui-form-item">
@@ -246,19 +249,19 @@
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">制单日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMakerDate" id="HMakerDate" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">修改日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HUpdaterDate" id="HUpdaterDate" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">审核日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HCheckerDate" id="HCheckerDate" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                    </div>
@@ -286,26 +289,26 @@
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">关闭日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HCloseManDate" id="HCloseManDate" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">作废日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HDeleteManDate" id="HDeleteManDate" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">退回日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBackerDate" id="HBackerDate" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" name="HBackDate" id="HBackDate" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">退回原因</label>
                                            <div class="layui-input-block" style="margin-left: 120px; width:500px;">
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBackRemark" id="HBackRemark" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
@@ -354,6 +357,14 @@
            //#endregion
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //#region ã€åŠ¨æ€èŽ·å–æ¨¡å—åç§°ã€‘
            var HModuleType = "4760";
            //通过单据类型,从数据库动态获取单据模块命名,引用js文件 PageTitle.js
            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
            $("h1").html('<b>' + HPageTitle + '</b>');
            //#endregion
            //#region åˆ¤æ–­æ˜¯å¦ç™»å½• æœªç™»å½•则跳到登录页
            if (sessionStorage.login != "login") {
                layer.confirm("登录失效,请重新登录!", {
@@ -436,7 +447,7 @@
            //#region é€‰æ‹©å®¢æˆ·æŒ‰é’®
            form.on('submit(btnSearchHCusID)', function () {
                get_checkSearchHSendEmp();
                get_checkSearchHCus();
            });
            //#endregion
@@ -604,6 +615,7 @@
                        layer.close(index);//关闭弹窗
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
@@ -617,7 +629,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '员工表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=2&HOrgID=' + HOrgID, 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=HPM&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -634,6 +646,7 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
@@ -647,7 +660,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '员工表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=2&HOrgID=' + HOrgID, 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=HWorker&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -664,6 +677,7 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
@@ -677,7 +691,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '员工表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=2&HOrgID=' + HOrgID, 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=HManager&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -694,10 +708,38 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
            //#region å®¢æˆ·é€‰æ‹©é¡µé¢
            function get_checkSearchHCus() {
                var HOrgID = $("#HOrgID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '客户表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/销售基础资料/Gy_Customer.html?openType=2&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        //获取数据
                        $("#HCusID").val(checkStatus.data[0].HItemID);//客户id
                        $("#HCusName").val(checkStatus.data[0].客户名称);//客户名称
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
            //#region äº¤ä»˜æ–¹é€‰æ‹©é¡µé¢
            function get_checkSearchHPMTeam() {
                var HOrgID = $("#HOrgID").val();
@@ -707,7 +749,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '供应商表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/采购基础资料/Gy_Supplier.html?openType=2&HOrgID=' + HOrgID, 'yes']
                    , content: ['../../基础资料/采购基础资料/Gy_Supplier.html?openType=HSup&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -724,6 +766,7 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
@@ -866,7 +909,7 @@
                    layer.msg("单据号不能为空!");
                    return false;
                }
                if ($("#HProID").val() == "0") {
                if ($("#HProjecID").val() == "0") {
                    layer.msg("项目代码没有选择!");
                    return false;
                }
@@ -874,7 +917,38 @@
                    layer.msg("日期不能为空!");
                    return false;
                }
                if ($("#HManagerID").val() == "0") {
                    layer.msg("管理员不能为空!");
                    return false;
                }
                if ($("#HWorkEmpID").val() == "0") {
                    layer.msg("实施担当不能为空!");
                    return false;
                }
                if ($("#HPMEmpID").val() == "0") {
                    layer.msg("项目经理不能为空!");
                    return false;
                }
                if ($("#HPMTeamID").val() == "0") {
                    layer.msg("交付方不能为空!");
                    return false;
                }
                if ($("#HCusID").val() == "0") {
                    layer.msg("客户不能为空!");
                    return false;
                }
                if ($("#HSumMoney").val() == "") {
                    layer.msg("合同总金额不能为空!");
                    return false;
                }
                if ($("#HMoney").val() == "") {
                    layer.msg("结算金额不能为空!");
                    return false;
                }
                if ($("#HConWorkDays").val() == "") {
                    layer.msg("合同预估人天不能为空!");
                    return false;
                }
                return true;
            }
            //#endregion
@@ -1007,8 +1081,49 @@
        });
        //工程项目
        function GetProjectBillValue(obj) {
            if (obj[0].关闭人 == null || obj[0].关闭人 == "") {
                $("#HProjectID").val(obj[0].HInterID);
                $("#HProNumber").val(obj[0].项目代码);//工程项目代码
                $("#HProName").val(obj[0].项目名称);//工程项目名称
                $("#HCusID").val(obj[0].HCusID);//客户id
                $("#HCusName").val(obj[0].客户);//客户名称
                $("#HMainSourceInterID").val(obj[0].HInterID);
                $("#HMainSourceEntryID").val(obj[0].HEntryID);
                $("#HMainSourceBillNo").val(obj[0].单据号);
                $("#HMainSourceBillType").val(obj[0].单据类型);
            } else {
                layer.msg("该项目已关闭,不可选择!");
            }
        }
        //管理员
        function GetHManagerValue(obj) {
            $("#HManagerID").val(obj[0].HItemID);//管理员id
            $("#HManagerName").val(obj[0].职员名称);//管理员名称
        }
        //项目经理
        function GetHPMValue(obj) {
            $("#HPMEmpID").val(obj[0].HItemID);//客户id
            $("#HPMEmpName").val(obj[0].职员名称);//客户名称
        }
        //实施担当
        function GetHWorkerValue(obj) {
            $("#HWorkEmpID").val(obj[0].HItemID);//员工id
            $("#HWorkEmpName").val(obj[0].职员名称);//员工名称
        }
        //交付方
        function GetHSupNameValue(obj) {
            $("#HPMTeamID").val(obj[0].HItemID);//交付方id
            $("#HPMTeamName").val(obj[0].供应商名称);//供应商名称
        }
        //客户
        function GetHCusNameValue(obj) {
            $("#HCusID").val(obj[0].HItemID);//交付方id
            $("#HCusName").val(obj[0].客户名称);//供应商名称
        }
    </script>
</body>