1
wtt
2025-12-29 3425237a2b54ca28fc3e3c5f7c35a7fbef4e15fa
WebTM/views/ÏîÄ¿¹ÜÀí/¹¤³ÌÏîÄ¿/PM_ProjectMoneyBillMain.html
@@ -108,7 +108,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">
@@ -121,7 +121,7 @@
                                    <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">
@@ -160,7 +160,7 @@
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline" >
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px; ">组织<label style="color:red"> * </label></label>
                                            <div class="layui-input-block" style="margin-left: 120px; width: 501px;">
                                                <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
@@ -199,19 +199,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>
@@ -239,26 +239,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>
@@ -314,6 +314,8 @@
            var HModName = "PM_ProjectMoneyBillMain";
            //#region
            //全局变量
            window.optiondata = [];
            //记录组织的值
            var HOrgIDBar = 0;
            //获取参数
@@ -407,7 +409,7 @@
            //#region é€‰æ‹©å®¢æˆ·æŒ‰é’®
            form.on('submit(btnSearchHCusID)', function () {
                get_checkSearchHSendEmp();
                get_checkSearchHCus();
            });
            //#endregion
@@ -452,7 +454,7 @@
                //新增行表格数据
                 
                var NewRow = {
                    "HProMoneyID": "", "HProMoneyName": "", "HQty": "0", "HPrice": "0", "HMoney": "0",
                    "HProMoneyID": "0", "HProMoneyName": "", "HQty": "0", "HPrice": "0", "HMoney": "0",
                    "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
                };
                switch (obj.event) {
@@ -717,7 +719,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]  //获取弹框页面
@@ -734,6 +736,7 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
@@ -747,7 +750,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]  //获取弹框页面
@@ -764,10 +767,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_checkSearchHManager() {
                var HOrgID = $("#HOrgID").val();
@@ -777,7 +808,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]  //获取弹框页面
@@ -794,6 +825,7 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
@@ -807,7 +839,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]  //获取弹框页面
@@ -824,6 +856,7 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
@@ -859,6 +892,16 @@
                                        , "HProMoneyName": checkStatus.data[0].项目费用名称
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (optiondata.length == undefined) {
                                        obj.update({
                                            "HProMoneyID": optiondata.HItemID
                                            , "HProMoneyName": optiondata.项目费用名称
                                        })
                                        optiondata = [];
                                    }
                                }
                            })
                        }
@@ -1014,7 +1057,7 @@
                    layer.msg("单据号不能为空!");
                    return false;
                }
                if ($("#HProID").val() == "0") {
                if ($("#HProjecID").val() == "0") {
                    layer.msg("项目代码没有选择!");
                    return false;
                }
@@ -1022,7 +1065,26 @@
                    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;
                }
                return true;
            }
            //#endregion
@@ -1156,7 +1218,48 @@
        });
        //工程项目
        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 GetProjectMoneyValue(obj) {
            optiondata = obj;
        }
    </script>
</body>