重构华夏erp的整体ui风格
This commit is contained in:
@@ -239,6 +239,8 @@ public class DepotItemController {
|
||||
item.put("Unit", diEx.getMunit());
|
||||
item.put("OperNumber", diEx.getOpernumber());
|
||||
item.put("BasicNumber", diEx.getBasicnumber());
|
||||
//统计该商品已分批出库的总数量-用于订单
|
||||
item.put("finishNumber", depotItemService.getFinishNumber(diEx.getMaterialid(),diEx.getHeaderid()));
|
||||
item.put("UnitPrice", diEx.getUnitprice());
|
||||
item.put("TaxUnitPrice", diEx.getTaxunitprice());
|
||||
item.put("AllPrice", diEx.getAllprice());
|
||||
|
||||
@@ -37,8 +37,8 @@ public class FunctionsController {
|
||||
|
||||
@PostMapping(value = "/findMenu")
|
||||
public JSONArray findMenu(@RequestParam(value="pNumber") String pNumber,
|
||||
@RequestParam(value="hasFunctions") String hasFunctions,
|
||||
HttpServletRequest request)throws Exception {
|
||||
@RequestParam(value="hasFunctions") String hasFunctions,
|
||||
HttpServletRequest request)throws Exception {
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
try {
|
||||
@@ -52,6 +52,7 @@ public class FunctionsController {
|
||||
JSONArray dataArray1 = new JSONArray();
|
||||
if (dataList1.size() != 0) {
|
||||
item.put("text", functions.getName()); //是目录就没链接
|
||||
item.put("icon", functions.getIcon());
|
||||
for (Functions functions1 : dataList1) {
|
||||
item.put("state", "open"); //如果不为空,节点展开
|
||||
JSONObject item1 = new JSONObject();
|
||||
@@ -61,6 +62,7 @@ public class FunctionsController {
|
||||
JSONArray dataArray2 = new JSONArray();
|
||||
if (dataList2.size() != 0) {
|
||||
item1.put("text", functions1.getName());//是目录就没链接
|
||||
item1.put("icon", functions1.getIcon());
|
||||
for (Functions functions2 : dataList2) {
|
||||
item1.put("state", "closed"); //如果不为空,节点不展开
|
||||
JSONObject item2 = new JSONObject();
|
||||
@@ -70,40 +72,46 @@ public class FunctionsController {
|
||||
JSONArray dataArray3 = new JSONArray();
|
||||
if (dataList3.size() != 0) {
|
||||
item2.put("text", functions2.getName());//是目录就没链接
|
||||
item2.put("icon", functions2.getIcon());
|
||||
for (Functions functions3 : dataList3) {
|
||||
item2.put("state", "closed"); //如果不为空,节点不展开
|
||||
JSONObject item3 = new JSONObject();
|
||||
item3.put("id", functions3.getId());
|
||||
item3.put("text", functions3.getName());
|
||||
item3.put("icon", functions3.getIcon());
|
||||
//
|
||||
dataArray3.add(item3);
|
||||
item2.put("children", dataArray3);
|
||||
}
|
||||
} else {
|
||||
//不是目录,有链接
|
||||
item2.put("text", "<a onclick=\"NewTab('" + functions2.getName() + "','" + functions2.getUrl() + "','" + functions2.getId() + "')\">" + functions2.getName() + "</a>");
|
||||
item2.put("text", functions2.getName());
|
||||
item2.put("icon", functions2.getIcon());
|
||||
item2.put("url", functions2.getUrl());
|
||||
dataArray2.add(item2);
|
||||
item1.put("children", dataArray2);
|
||||
}
|
||||
} else {
|
||||
//不是目录,有链接
|
||||
//item2.put("text", "<a onclick=\"NewTab('" + functions2.getName() + "','" + functions2.getUrl() + "','" + functions2.getId() + "')\">" + functions2.getName() + "</a>");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//不是目录,有链接
|
||||
item1.put("text", "<a onclick=\"NewTab('" + functions1.getName() + "','" + functions1.getUrl() + "','" + functions1.getId() + "')\">" + functions1.getName() + "</a>");
|
||||
item1.put("text", functions1.getName());
|
||||
item1.put("icon", functions1.getIcon());
|
||||
item1.put("url", functions1.getUrl());
|
||||
dataArray1.add(item1);
|
||||
item.put("children", dataArray1);
|
||||
}
|
||||
} else {
|
||||
//不是目录,有链接
|
||||
//item1.put("text", "<a onclick=\"NewTab('" + functions1.getName() + "','" + functions1.getUrl() + "','" + functions1.getId() + "')\">" + functions1.getName() + "</a>");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//不是目录,有链接
|
||||
item.put("text", "<a onclick=\"NewTab('" + functions.getName() + "','" + functions.getUrl() + "','" + functions.getId() + "')\">" + functions.getName() + "</a>");
|
||||
item.put("text", functions.getName());
|
||||
item.put("icon", functions.getIcon());
|
||||
item.put("url", functions.getUrl());
|
||||
}
|
||||
dataArray.add(item);
|
||||
}
|
||||
|
||||
57
src/main/java/com/jsh/erp/controller/MsgController.java
Normal file
57
src/main/java/com/jsh/erp/controller/MsgController.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.jsh.erp.controller;
|
||||
|
||||
import com.jsh.erp.datasource.entities.Msg;
|
||||
import com.jsh.erp.service.msg.MsgService;
|
||||
import com.jsh.erp.utils.BaseResponseInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ji sheng hua 华夏ERP
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/msg")
|
||||
public class MsgController {
|
||||
private Logger logger = LoggerFactory.getLogger(MsgController.class);
|
||||
|
||||
@Resource
|
||||
private MsgService msgService;
|
||||
|
||||
@GetMapping("/getMsgByStatus")
|
||||
public BaseResponseInfo getMsgByStatus(@RequestParam("status") String status,
|
||||
HttpServletRequest request)throws Exception {
|
||||
BaseResponseInfo res = new BaseResponseInfo();
|
||||
try {
|
||||
List<Msg> list = msgService.getMsgByStatus(status);
|
||||
res.code = 200;
|
||||
res.data = list;
|
||||
} catch(Exception e){
|
||||
e.printStackTrace();
|
||||
res.code = 500;
|
||||
res.data = "获取数据失败";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@PostMapping("/batchUpdateStatus")
|
||||
public BaseResponseInfo batchUpdateStatus(@RequestParam("ids") String ids,
|
||||
@RequestParam("status") String status,
|
||||
HttpServletRequest request)throws Exception {
|
||||
BaseResponseInfo res = new BaseResponseInfo();
|
||||
try {
|
||||
msgService.batchUpdateStatus(ids, status);
|
||||
res.code = 200;
|
||||
res.data = "更新成功";
|
||||
} catch(Exception e){
|
||||
e.printStackTrace();
|
||||
res.code = 500;
|
||||
res.data = "获取数据失败";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user