sunjianghua2018 2018-04-07 12:28 采纳率: 60%
浏览 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++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿