duhe
2025-09-02 cecb8de03f83f8e5b3cd32d3ac7eb09196ed5cf4
WebTM/views/ÏúÊÛ¹ÜÀí/ÐÅÓöî¶ÈÉêÇëµ¥/Xs_CusRatingChangeBill.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;*/ /*调整按钮左右空隙大小*/
@@ -116,21 +117,21 @@
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">销售部门</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">销售员</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HEmpName" id="HEmpName" " class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">销售部门</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
@@ -326,6 +327,14 @@
                , table = layui.table
                , form = layui.form
                , element = layui.element;
         //#region ã€åŠ¨æ€èŽ·å–æ¨¡å—åç§°ã€‘
            var HModuleType = "1413";
            //通过单据类型,从数据库动态获取单据模块命名,引用js文件 PageTitle.js
            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
            $("h1").html('<b>' + HPageTitle + '</b>');
            //#endregion
            //模块名
            var HModName = "Xs_CusRatingChangeBill";
@@ -599,7 +608,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '销售部门列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../Baseset/基础资料/Gy_DepartmentList.html', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes']
                    //, btn: ['确定', '取消']
                    //, btn1: function (index, layero) {//按钮【按钮一】的回调
                    //    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -624,7 +633,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '销售员列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../Baseset/基础资料/Gy_EmployeeList.html?Type=HEmp', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HEmp', 'yes']
                    //, btn: ['确定', '取消']
                    //, btn1: function (index, layero) {//按钮【按钮一】的回调
                    //    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -643,13 +652,14 @@
            //#region ä¸šåŠ¡å®¢æˆ·é€‰æ‹©é¡µé¢
            function get_checkCus() {
                var HEmpID = $("#HEmpID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '业务客户列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../Baseset/基础资料/Gy_CustomerList.html', 'yes']
                    , content: ['../../Baseset/基础资料/Gy_CustomerList.html?Type=1&openType=3&HEmp=' + HEmpID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -677,7 +687,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '销售主管列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../Baseset/基础资料/Gy_EmployeeList.html?Type=HManager', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HManager', 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -685,7 +695,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HManagerName").val(checkStatus.data[0].HName);
                        $("#HManagerName").val(checkStatus.data[0].职员名称);
                        $("#HManagerID").val(checkStatus.data[0].HItemID);
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -898,14 +908,16 @@
        function GetHDeptNameValue(obj)  //返回销售部门
        {
            $("#HDeptName").val(obj[0].HName);
            $("#HDeptName").val(obj[0].部门名称);
            $("#HDeptID").val(obj[0].HItemID);
        }
        function GetHEmpValue(obj)  //返回销售员
        {
            $("#HEmpName").val(obj[0].HName);
            $("#HEmpName").val(obj[0].职员名称);
            $("#HEmpID").val(obj[0].HItemID);
            getEmpInfoByHEmpID(obj[0].HItemID);
        }
        function GetHSupValue(obj)  //返回业务客户
@@ -920,7 +932,7 @@
        function GetHManagerValue(obj)  //返回销售主管
        {
            $("#HManagerName").val(obj[0].HName);
            $("#HManagerName").val(obj[0].职员名称);
            $("#HManagerID").val(obj[0].HItemID);
        }
@@ -959,6 +971,7 @@
                type: "GET",
                data: {
                    "HCusID": HCusID
                    , "CurUserName": sessionStorage["HUserName"]
                },
                success: function (result) {
                    if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -966,8 +979,40 @@
                        $("#HCusBalance").val(data.HCusBalance == null ? 0 : data.HCusBalance);
                        $("#HCreditRating_Now").val(data.HCreditRating_Now == null ? 0 : data.HCreditRating_Now);
                        $("#HAvailableBalance").val(data.HAvailableBalance == null ? 0 : data.HAvailableBalance);
                    } else {
                        layer.alert(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        $("#HCusBalance").val("");
                        $("#HCreditRating_Now").val("");
                        $("#HAvailableBalance").val("");
                        //layer.alert(result.Message, { icon: 5});
                    }
                }, error: function () {
                    layer.alert("发生错误!", { icon: 5 });
                    $("#HCusBalance").val("");
                    $("#HCreditRating_Now").val("");
                    $("#HAvailableBalance").val("");
                }
            });
        }
        //#endregion
        //#region æ ¹æ®èŒå‘˜èŽ·å–éƒ¨é—¨
        function getEmpInfoByHEmpID(HEmpID) {
            $.ajax({
                url: GetWEBURL() + "/Xs_SeOrderBill/getEmpInfoByHEmpID",
                async: false,
                type: "GET",
                data: {
                    "HEmpID": HEmpID
                },
                success: function (result) {
                    if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                        var data = result.data[0];
                        $("#HDeptID").val(data.HDeptID);
                        $("#HDeptName").val(data.HDeptName);
                    } else {
                        layer.alert(result.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.alert("发生错误!", { icon: 5 });
@@ -975,7 +1020,6 @@
            });
        }
        //#endregion
    </script>
</body>
</html>