WebTM/views/Éú²ú¹ÜÀí/Òì³£·´À¡µ¥/Sc_Add_MESExecptFeedBackBillList.html
@@ -410,6 +410,8 @@
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            window.HDeptType = 0;
            //#endregion
            //初始化表单插件
@@ -600,7 +602,7 @@
                    data: { "HBillType": '4502' },
                    success: function (d) {
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HInterID").val(0);
                        $("#HInterID").val(d.data[0].HInterID);
                    }
                });
            }
@@ -646,7 +648,7 @@
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            $("#HInterID").val(data.HInterID);//获取提交成功返回的单据主ID
                            //$("#HInterID").val(data.HInterID);//获取提交成功返回的单据主ID
                            layer.confirm(data.Message, {
                                btn: ['确认']
                            }, function (index) {
@@ -731,7 +733,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/UserInformation.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HEmp', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -741,7 +743,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HSendMan").val(checkStatus.data[0].HName);
                        $("#HSendMan").val(checkStatus.data[0].职员名称);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -759,6 +761,8 @@
            //发送部门
            form.on('submit(HDeptList)', function () {
                HDeptType = 1;
                //页面层-自定义
                layer.open({
                    type: 2,
@@ -768,7 +772,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/DeptInformation.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -778,7 +782,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HDeptName").val(checkStatus.data[0].HName);
                        $("#HDeptName").val(checkStatus.data[0].部门名称);
                        $("#HDeptID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -798,6 +802,8 @@
            
            //接收部门
            form.on('submit(HRecDeptList)', function () {
                HDeptType = 2;
                //页面层-自定义
                layer.open({
                    type: 2,
@@ -807,7 +813,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/DeptInformation.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -817,7 +823,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HRecDeptName").val(checkStatus.data[0].HName);
                        $("#HRecDeptName").val(checkStatus.data[0].部门名称);
                        $("#HRecDeptID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -1038,6 +1044,21 @@
            return [year, month, day].join('-');
        }
        function GetHEmpValue(obj) {  //发送人
            $("#HSendMan").val(obj[0].职员名称);
        }
        function GetHDeptNameValue(obj) {  //部门
            if (HDeptType == 1) {
                $("#HDeptName").val(obj[0].部门名称);
                $("#HDeptID").val(obj[0].HItemID);
            } else if (HDeptType == 2) {
                $("#HRecDeptName").val(obj[0].部门名称);
                $("#HRecDeptID").val(obj[0].HItemID);
            }
        }
    </script>
</body>
</html>