sunjianghua2018 2018-04-07 12:28 采纳率: 100%
浏览 2752
已结题

求教大神,ajax找不到url里的方法

public void modifyPerformance() {
    Integer id = Integer.parseInt(request.getParameter("id"));
    String checkItem = request.getParameter("checkItem");
    Double coefficient = Double.parseDouble(request.getParameter("coefficient"));
    String addMoneyType = request.getParameter("addMoneyType");
    Double perAddMoneyValue = Double.parseDouble(request.getParameter("perAddMoneyValue"));
    Double addMoney = Double.parseDouble(request.getParameter("addMoney"));
    String reduceMoneyType = request.getParameter("reduceMoneyType");
    Double perReduceMoneyValue = Double.parseDouble(request.getParameter("perReduceMoneyValue"));
    Double reduceMoney = Double.parseDouble(request.getParameter("reduceMoney"));
    performanceService.modifyPerformance(id, checkItem, coefficient, perAddMoneyValue, addMoney,
            perReduceMoneyValue, reduceMoney, addMoneyType, reduceMoneyType);

}

yes: function(index){
            layer.close(index);
            var idVice = $("#id").val();
            var checkItemVice = $("#checkItem").val();
            var coefficientVice = $("#coefficient").val();
            var addMoneyTypeVice = $("#addMoneyType").val();
            var perAddMoneyValueVice = $("#perAddMoneyValue").val();
            var addMoneyVice = $("#addMoney").val();
            var reduceMoneyTypeVice = $("#reduceMoneyType").val();
            var perReduceMoneyValueVice = $("#perReduceMoneyValue").val();
            var reduceMoneyVice = $("#reduceMoney").val();
            alert(idVice);
            alert(checkItemVice);
            alert(coefficientVice);
            alert(addMoneyTypeVice);
            alert(perAddMoneyValueVice);
            alert(addMoneyVice);
            alert(reduceMoneyTypeVice);
            alert(perReduceMoneyValueVice);
            alert(reduceMoneyVice);
            $.ajax({
                type:'post',
                data:{id: idVice,
                    checkItem: checkItemVice,
                    coefficient: coefficientVice,
                    addMoneyType: addMoneyTypeVice,
                    perAddMoneyValue: perAddMoneyValueVice,
                    addMoney: addMoneyVice,
                    reduceMoneyType: reduceMoneyTypeVice,
                    perReduceMoneyValue: perReduceMoneyValueVice,
                    reduceMoney: reduceMoneyVice},
                dataType:'json',
                url:'/administration/performance/modifyPerformance',
                success:function() {

                }
            });
        }


        <package name="performanceAction" extends="json-default" namespace="/administration/performance">
    <action name="save_*" class="performanceAction" method="{1}">
        <interceptor-ref name="token" />
        <interceptor-ref name="defaultStack"/>
        <result name="invalid.token">/pages/submitRepeatError.jsp</result>         
        <result name="error">/pages/administration/error.jsp</result>
        <result name="render_findPerformanceApplys" type="redirect">/administration/performance/findPerformanceApplys</result>
    </action>
    <action name="*" class="performanceAction" method="{1}">
        <result name="showPerformanceDiagram">/pages/performance/common/showPerformanceDiagram.jsp</result>
        <result name="newPerformance">/pages/performance/common/newPerformance.jsp</result>
        <result name="performanceApplys">/pages/performance/common/performanceApplys.jsp</result>
        <result name="showPerformanceDetail">/pages/performance/common/showPerformanceDetail.jsp</result>
        <result name="pmAudit">/pages/performance/common/pmAudit.jsp</result>
        <result name="toTaskList" type="redirect">
            <param name="type">${type}</param>
            <param name="location">/personal/findTaskList</param>
        </result>
        <result name="modifyPositionPerformance">/pages/performance/common/modifyPositionPerformance.jsp</result>
        <result name="processHistory">/pages/performance/common/processHistory.jsp</result>
        <result name="staffPerformances">/pages/performance/common/staffPerformances.jsp</result>
        <result name="showModifyProcess">/pages/performance/common/showModifyProcess.jsp</result>
        <result name="findPersPerf">/pages/performance/common/findPersPerf.jsp</result>

</package>
  • 写回答

3条回答 默认 最新

  • 「已注销」 2018-04-07 15:24
    关注

    找不到方法只能是你的url没有写正确,好好检查一下。

    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置