ajax 泛微

<%@page import="weaver.soa.workflow.request.RequestInfo"%>
<%@page import="weaver.soa.workflow.request.RequestService"%>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.ncr.action.WorkflowSplitAction" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="weaver.conn.RecordSet"%>
<%
    User user = HrmUserVarify.getUser (request , response) ;
     String requestid = Util.null2String(request.getParameter("requestid"));
     int uid = user.getUID();
   
    
    RecordSet rs= new RecordSet();
    String sql = "update formtable_main_77 set duor = 5988 WHERE requestId = '"+requestid+"'";    

    rs.writeLog(sql);
    rs.executeSql(sql);
    out.print(uid);
    
    
%>

 

    
        function queryXCQKZY(req) {//获取当前操作人
            var uid;
            jQuery.ajax({
                url: "/ncr/getUserid.jsp",
                async: false,
                type: "post",
                data: {
                    "requestid": req
                },
                success: function(data) {
                    uid = data.replace(/^\s*/g, "");
                }
            });
            return uid;
        }

 示例

    function getDQCZR(req) { //获取当前操作人
        var lasname ;
        jQuery.ajax({
            url: "/ncr/getUserid.jsp",
            async: false,
            type: "post",
            data: {
                "requestid": req
            },
            success: function(data) {
                eval('var dataObj = ' + data);
                var uid = dataObj.uid;
                lasname = dataObj.lastname;
            }
        });
        return lasname;
    }
</scrip
<%@page import="weaver.soa.workflow.request.RequestInfo"%>
<%@page import="weaver.soa.workflow.request.RequestService"%>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.ncr.action.WorkflowSplitAction" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="weaver.conn.RecordSet"%>
<%@page import="net.sf.json.JSONObject"%>
<%
    User user = HrmUserVarify.getUser (request , response) ;
     String requestid = Util.null2String(request.getParameter("requestid"));
     int uid = user.getUID();
   
    
    RecordSet rs= new RecordSet();
    String sql = "update formtable_main_77 set duor = '5988' WHERE requestId = '"+requestid+"'";    
    rs.writeLog(sql);
    rs.executeSql(sql);
    RecordSet rs2= new RecordSet();
    rs2.executeSql("select lastname from hrmresource where id= '" +uid+ "'" );
    rs2.next();
    String lastname = rs2.getString(1);
    rs.writeLog("iii="+lastname);
    JSONObject json = new JSONObject();
    json.put("uid",uid);
    json.put("lastname",lastname);
    rs.writeLog("uid="+uid);
    out.print(json.toString());
    
    
%>


 
                     

 

posted @ 2023-03-15 16:18  血月葬花魂  阅读(73)  评论(0编辑  收藏  举报