機能singlePriceSubmit(){ VARの JSON = {}; JSON [ "領域"] = areaStr1。 JSON [ "goodCateIdStr"] = goodCateIdStr。 VaRの ARR = []; $( "#singlePriceIdテーブルのTBODY TR")各(関数(){ VARの細胞= この.cells; VARの json1 = {}; json1 [ "goodsId"]は細胞[0] .childNodesを= [0 ] .ID; json1 【 "価格"] = $(細胞[1] .childNodes [0トリム。] .VALUE); json1 [( "maxPayIntegrateRate"] = $トリム細胞[2]。]。値); json1 [ "receivableIntegrateRate"] = $トリム(細胞[3] .childNodes [0 ] .VALUE)。 arr.push(json1)。 }); もし(!CHECKDATA(ARR)){ リターン。 } JSON [ "ARR"] = ARR。 CommonUtil.showOverlay(); VARアヤックス= 新しい $斧(Feng.ctxPath + "/ goodPrice / singlesetprice"、機能(データ){ CommonUtil.hideOverlay(); Feng.info( "操作成功!" ); $( "#singlePriceId")モーダル(。 "非表示" ); } 関数(データ){ CommonUtil.hideOverlay(); Feng.error( "失败操作!" + data.responseJSON.message + "!" ); }); ajax.set( "JSON" 、JSON.stringify(JSON)); ajax.start(); }
ジャワ
(値= "/ singlesetprice" @RequestMapping ) @ResponseBody パブリックオブジェクトsingleSetPrice(@RequestParam(値= "JSON" =必須真)は、文字列JSON){ この.iGoodsPriceService.singleSetPrice(JSON)を、 返すSUCCESS_TIPを。 }