Browse Source

添加库存详情查看新页面框架

lwx_dev
erdanergou 2 years ago
parent
commit
ecb6eef04e
  1. 54
      src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java
  2. 136
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  3. 13
      src/main/java/com/dreamchaser/depository_manage/pojo/InventoryP.java
  4. 5
      src/main/java/com/dreamchaser/depository_manage/pojo/MaterialAndPlaceForViewP.java
  5. 3
      src/main/java/com/dreamchaser/depository_manage/service/PlaceService.java
  6. 22
      src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java
  7. 6
      src/main/java/com/dreamchaser/depository_manage/utils/ObjectFormatUtil.java
  8. 14
      src/main/resources/static/css/public.css
  9. 2
      src/main/resources/static/js/stockTaking/stockTakingForLocationTable.js
  10. 2
      src/main/resources/static/js/stockTaking/stockTakingForMaterial.js
  11. 6
      src/main/resources/templates/index.html
  12. 10
      src/main/resources/templates/pages/BusinessType/businesstype_out.html
  13. 2
      src/main/resources/templates/pages/application/application-out_min.html
  14. 4
      src/main/resources/templates/pages/application/application_multi.html
  15. 4
      src/main/resources/templates/pages/authorization/depositoryOpen.html
  16. 2
      src/main/resources/templates/pages/company/company-out.html
  17. 4
      src/main/resources/templates/pages/company/company-out_back.html
  18. 2
      src/main/resources/templates/pages/company/companyByParentId.html
  19. 10
      src/main/resources/templates/pages/constructionunit/constructionunit_out.html
  20. 332
      src/main/resources/templates/pages/depository/Inventory-view_back.html
  21. 21
      src/main/resources/templates/pages/depository/Inventory-view_mobile.html
  22. 4
      src/main/resources/templates/pages/depository/table-in.html
  23. 5
      src/main/resources/templates/pages/depository/table-out.html
  24. 85
      src/main/resources/templates/pages/depository/table-stock.html
  25. 6
      src/main/resources/templates/pages/group/application_multi.html
  26. 6
      src/main/resources/templates/pages/group/group-add.html
  27. 22
      src/main/resources/templates/pages/group/group-out.html
  28. 8
      src/main/resources/templates/pages/group/group_edit.html
  29. 16
      src/main/resources/templates/pages/material/material-out.html
  30. 2
      src/main/resources/templates/pages/material/material-out_mobile.html
  31. 5
      src/main/resources/templates/pages/material/material-view.html
  32. 237
      src/main/resources/templates/pages/material/material-viewForInventoryEdit.html
  33. 6
      src/main/resources/templates/pages/materialBarCode/materialBarCode_out.html
  34. 12
      src/main/resources/templates/pages/materialtype/materialTypeByParentId.html
  35. 22
      src/main/resources/templates/pages/materialtype/materialType_view.html
  36. 12
      src/main/resources/templates/pages/notice/notice-out.html
  37. 8
      src/main/resources/templates/pages/notice/notice-out_user.html
  38. 2
      src/main/resources/templates/pages/post/post-out.html
  39. 2
      src/main/resources/templates/pages/post/postRole.html
  40. 16
      src/main/resources/templates/pages/split/split-out.html
  41. 2
      src/main/resources/templates/pages/stockTaking/stockTakingForTable.html
  42. 2
      src/main/resources/templates/pages/user/table-user.html
  43. 2
      src/main/resources/templates/pages/user/userRole.html
  44. 2
      src/main/resources/templates/pages/user/userRoleForIn.html
  45. 26
      src/main/resources/templates/pages/warehouse/depository-out.html
  46. 8
      src/main/resources/templates/pages/warehouse/warehouseByParentId.html
  47. 14
      target/classes/static/css/public.css
  48. 6
      target/classes/templates/index.html
  49. 21
      target/classes/templates/pages/depository/Inventory-view_mobile.html
  50. 5
      target/classes/templates/pages/material/material-view.html

54
src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java

@ -1782,6 +1782,8 @@ public class MaterialController {
Integer placeId = ObjectFormatUtil.toInteger(map.get("placeId")); Integer placeId = ObjectFormatUtil.toInteger(map.get("placeId"));
// 获取当前库存所在库位的对应信息 // 获取当前库存所在库位的对应信息
MaterialAndPlace placeAndMaterialByMidAndPid = placeService.findPlaceAndMaterialByMidAndPid(placeId, id); MaterialAndPlace placeAndMaterialByMidAndPid = placeService.findPlaceAndMaterialByMidAndPid(placeId, id);
if ("-1".equals(unit)) { if ("-1".equals(unit)) {
// 如果盘点的是默认单位 // 如果盘点的是默认单位
quantity = placeAndMaterialByMidAndPid.getQuantity() / 100.0; quantity = placeAndMaterialByMidAndPid.getQuantity() / 100.0;
@ -1807,11 +1809,15 @@ public class MaterialController {
} }
/**
* 获取当前物料在当前单位下的库存数量
*
* @param map 查询条件
* @return
*/
@PostMapping("/findSplitInventoryByUnit") @PostMapping("/findSplitInventoryByUnit")
public RestResponse findSplitInventoryByUnit(@RequestBody Map<String, Object> map) { public RestResponse findSplitInventoryByUnit(@RequestBody Map<String, Object> map) {
if (map.containsKey("id")) { if (map.containsKey("id")) {
// 获取当前的计量单位 // 获取当前的计量单位
String unit = (String) map.get("unit"); String unit = (String) map.get("unit");
// 获取当前库存id // 获取当前库存id
@ -1908,37 +1914,16 @@ public class MaterialController {
public RestResponse getQuantityForLocationAndUnit(@RequestBody Map<String, String> map) { public RestResponse getQuantityForLocationAndUnit(@RequestBody Map<String, String> map) {
// 当前计量单位 // 当前计量单位
String unit = map.get("unit"); String unit = map.get("unit");
// 当前的仓库id
String depositoryId = map.get("depositoryId");
// 当前库位编码 // 当前库位编码
String placeCode = map.get("placeCode"); String id = map.get("id");
// 当前物料id MaterialAndPlace placeAndMaterialByMidAndPid = placeService.findPlaceAndMaterialById(ObjectFormatUtil.toInteger(id));
Integer mid = ObjectFormatUtil.toInteger(map.get("mid"));
MaterialAndPlace placeAndMaterialByMidAndPid = null;
double quantity = 0.0; double quantity = 0.0;
int placeId = 0; double amount = 0.0;
if ("0000".equals(placeCode)) { Inventory inventoryById = materialService.findInventoryById(placeAndMaterialByMidAndPid.getMid());
// 如果要改变默认库位 if (inventoryById.getUnit().equals(unit) || "-1".equals(unit)) {
// 如果获取的是基础单位
// 获取当前物料的对应关系
placeAndMaterialByMidAndPid = placeService.findPlaceAndMaterialByMidAndPid(0, mid);
} else {
// 获取当前库位id
Map<String, Object> paramForPlace = new HashMap<>();
paramForPlace.put("code", placeCode);
paramForPlace.put("depositoryId", depositoryId);
List<Place> placeByCondition = placeService.findPlaceByCondition(paramForPlace);
//获取对应库位
Place place = placeByCondition.get(0);
// 获取当前物料的对应关系
placeId = place.getId();
placeAndMaterialByMidAndPid = placeService.findPlaceAndMaterialByMidAndPid(placeId, mid);
}
Inventory inventoryById = materialService.findInventoryById(mid);
if (inventoryById.getUnit().equals(unit)) {
// 如果转移的基础单位
quantity = (placeAndMaterialByMidAndPid.getQuantity() / 100.0); quantity = (placeAndMaterialByMidAndPid.getQuantity() / 100.0);
amount = ObjectFormatUtil.multiply(quantity, inventoryById.getPrice());
} else { } else {
// 获取当前的拆单记录 // 获取当前的拆单记录
Map<String, Object> paramForSplitInfo = new HashMap<>(); Map<String, Object> paramForSplitInfo = new HashMap<>();
@ -1947,16 +1932,19 @@ public class MaterialController {
paramForSplitInfo.put("newUnit", unit); paramForSplitInfo.put("newUnit", unit);
SplitInfo splitInfo = splitUnitService.findSplitInfoByMidAndUnit(paramForSplitInfo); SplitInfo splitInfo = splitUnitService.findSplitInfoByMidAndUnit(paramForSplitInfo);
SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialByMidAndPid.getId(), splitInfo.getId()); SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialByMidAndPid.getId(), splitInfo.getId());
int Scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1);
double price = ObjectFormatUtil.divide(inventoryById.getPrice(), Scale, 2);
if (splitInventory != null) { if (splitInventory != null) {
quantity = splitInventory.getSaveQuantity() / 100.0; quantity = splitUnitService.findAllInventoryForSplitInfo(-1, placeAndMaterialByMidAndPid, splitInfo.getId(), 0, true);
} else { } else {
int Scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1);
quantity = (inventoryById.getQuantity() * Scale / 100.0); quantity = (inventoryById.getQuantity() * Scale / 100.0);
} }
amount = ObjectFormatUtil.multiply(quantity, price);
} }
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
result.put("quantity", quantity); result.put("quantity", quantity);
result.put("placeId", placeId); result.put("amount", amount);
return new RestResponse(result); return new RestResponse(result);
} }

136
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -496,7 +496,7 @@ public class PageController {
return mv; return mv;
} }
// 库位树形菜单 /* // 库位树形菜单
@GetMapping("/selectPlaceByDepository") @GetMapping("/selectPlaceByDepository")
public ModelAndView selectPlaceByDepository(Integer depositoryId, Integer mid, String placeCode, String unit) { public ModelAndView selectPlaceByDepository(Integer depositoryId, Integer mid, String placeCode, String unit) {
ModelAndView mv = new ModelAndView(); ModelAndView mv = new ModelAndView();
@ -543,8 +543,47 @@ public class PageController {
mv.addObject("unit", unit); mv.addObject("unit", unit);
mv.setViewName("pages/material/selectPlaceByDepository"); mv.setViewName("pages/material/selectPlaceByDepository");
return mv; return mv;
} }*/
// 同一仓库下的库位树形菜单
@GetMapping("/selectPlaceByDepository")
public ModelAndView selectPlaceByDepository(Integer id, String unit) {
if (id != null) {
ModelAndView mv = new ModelAndView();
MaterialAndPlace placeAndMaterialById = placeService.findPlaceAndMaterialById(id);
Integer mid = placeAndMaterialById.getMid();
Inventory inventoryById = materialService.findInventoryById(mid);
if (inventoryById.getUnit().equals(unit)) {
// 如果转移的基础单位
mv.addObject("quantity", (placeAndMaterialById.getQuantity() / 100));
} else {
// 获取当前的拆单记录
Map<String, Object> paramForSplitInfo = new HashMap<>();
paramForSplitInfo.put("mid", inventoryById.getMid());
paramForSplitInfo.put("newUnit", unit);
SplitInfo splitInfo = splitUnitService.findSplitInfoByMidAndUnit(paramForSplitInfo);
SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialById.getId(), splitInfo.getId());
if (splitInventory != null) {
double quantity = splitUnitService.findAllInventoryForSplitInfo(-1, placeAndMaterialById, splitInfo.getId(), 0, true);
mv.addObject("quantity", quantity);
} else {
int Scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1);
mv.addObject("quantity", (inventoryById.getQuantity() * Scale / 100));
}
}
mv.addObject("depositoryId", placeAndMaterialById.getDid());
mv.addObject("mid", mid);
mv.addObject("unit", unit);
mv.addObject("placeId", placeAndMaterialById.getPid());
mv.setViewName("pages/material/selectPlaceByDepository");
return mv;
} else {
throw new MyException("缺少必要参数");
}
}
/** /**
* 专用于卡片仓库树形菜单页面 * 专用于卡片仓库树形菜单页面
@ -688,6 +727,34 @@ public class PageController {
return mv; return mv;
} }
@GetMapping("materialEditForInventory")
public ModelAndView materialEditForInvetory(Integer id, HttpServletRequest request) {
ModelAndView mv = new ModelAndView();
mv.setViewName("pages/material/material-viewForInventoryEdit");
String token = request.getHeader("user-token");
if (token == null) {
token = (String) request.getSession().getAttribute("userToken");
}
UserByPort userToken = AuthenticationTokenPool.getUserToken(token);
if (id != null) {
Material material = materialService.findMaterialById(id);
Map<String, Object> map = new HashMap<>();
map.put("mcode", material.getCode());
map.put("codeFlag", 1);
// 获取物料与条形码的对应关系
Integer maindeparment = userToken.getMaindeparment();
if (PublicConfig.roleAdminorgList.contains(maindeparment)) {
mv.addObject("display", "block");
} else {
mv.addObject("display", "none");
}
mv.addObject("record", materialService.findMaterialAndTypeById(id));
} else {
throw new MyException("缺少必要参数!");
}
return mv;
}
/** /**
* 物料类型创建页面 * 物料类型创建页面
* *
@ -1116,6 +1183,59 @@ public class PageController {
ModelAndView mv = new ModelAndView(); ModelAndView mv = new ModelAndView();
mv.setViewName("pages/depository/Inventory-view_back"); mv.setViewName("pages/depository/Inventory-view_back");
Inventory inventoryById = materialService.findInventoryById(id); Inventory inventoryById = materialService.findInventoryById(id);
if (inventoryById != null) {
InventoryP inventory = new InventoryP(inventoryById);
List<MaterialAndPlaceForViewP> placeAndMaterialByDidAndMid = placeService.findPlaceAndMaterialByDidAndMid(inventory.getDepositoryId(), inventoryById.getMid());
for (MaterialAndPlaceForViewP materialAndPlaceForViewP : placeAndMaterialByDidAndMid) {
double quantity = materialAndPlaceForViewP.getInventory() / 100.0;
materialAndPlaceForViewP.setInventory(quantity);
materialAndPlaceForViewP.setAmount(ObjectFormatUtil.multiply(inventory.getPrice(),quantity));
}
inventory.setMaterialAndPlaceList(placeAndMaterialByDidAndMid);
List<SplitInfo> splitInfoByMid = splitUnitService.findSplitInfoByMid(inventoryById.getMid());
inventory.setSplitInfoList(splitInfoByMid);
mv.addObject("record", inventory);
String userAgent = request.getHeader("user-agent");
String token = request.getHeader("user-token");
if (token == null) {
token = (String) request.getSession().getAttribute("userToken");
}
UserByPort userToken = AuthenticationTokenPool.getUserToken(token);
Integer maindeparment = userToken.getMaindeparment();
if (PublicConfig.roleAdminorgList.contains(maindeparment)) {
mv.addObject("display", "block");
} else {
mv.addObject("display", "none");
}
// 判断当前使用的设备为移动端还是pc端
boolean b = DeviceUtil.checkAgentIsMobile(userAgent);
if (b) {
mv.setViewName("pages/depository/Inventory-view_mobile");
}
return mv;
} else {
throw new MyException("缺少必要参数");
}
} else {
throw new MyException("缺少必要参数");
}
}
/**
* 跳转到库存详情页面
*
* @param id 待查看库存
* @param request
* @return
*/
@GetMapping("/InventoryViewBack")
public ModelAndView InventoryViewBack(Integer id, HttpServletRequest request) {
if (id != null) {
ModelAndView mv = new ModelAndView();
mv.setViewName("pages/depository/Inventory-view");
Inventory inventoryById = materialService.findInventoryById(id);
if (inventoryById != null) { if (inventoryById != null) {
InventoryP inventory = new InventoryP(inventoryById); InventoryP inventory = new InventoryP(inventoryById);
List<PlaceP> placeByMidAndDid = placeService.findPlaceByMidAndDid(inventoryById.getId(), inventory.getDepositoryId()); List<PlaceP> placeByMidAndDid = placeService.findPlaceByMidAndDid(inventoryById.getId(), inventory.getDepositoryId());
@ -2515,15 +2635,15 @@ public class PageController {
split = new String[0]; split = new String[0];
} }
StringBuilder departmentHeadName = new StringBuilder(); StringBuilder departmentHeadName = new StringBuilder();
Map<String,String> departmentHeadUserIcon = new HashMap<>(); Map<String, String> departmentHeadUserIcon = new HashMap<>();
String useAdminorgName = ""; String useAdminorgName = "";
for (String value : split) { for (String value : split) {
if ("".equals(value)) { if ("".equals(value)) {
continue; continue;
} }
UserByPort departmenthead = PublicConfig.FindUserById(ObjectFormatUtil.toInteger(value), userKey, token); UserByPort departmenthead = PublicConfig.FindUserById(ObjectFormatUtil.toInteger(value), userKey, token);
String name = departmenthead.getMaindeparmentname()+"-"+departmenthead.getName(); String name = departmenthead.getMaindeparmentname() + "-" + departmenthead.getName();
departmentHeadUserIcon.put(name,departmenthead.getIconphoto()); departmentHeadUserIcon.put(name, departmenthead.getIconphoto());
departmentHeadName.append(name).append(","); departmentHeadName.append(name).append(",");
useAdminorgName = departmenthead.getMaindeparmentname(); useAdminorgName = departmenthead.getMaindeparmentname();
} }
@ -3666,7 +3786,7 @@ public class PageController {
// 用于展示库存数据 // 用于展示库存数据
@GetMapping("/toShowInventory") @GetMapping("/toShowInventory")
public ModelAndView toShowInventory(@RequestParam Map<String, String> param,HttpServletRequest request) { public ModelAndView toShowInventory(@RequestParam Map<String, String> param, HttpServletRequest request) {
ModelAndView mv = new ModelAndView(); ModelAndView mv = new ModelAndView();
String token = request.getHeader("user-token"); String token = request.getHeader("user-token");
String userKey = request.getHeader("user-key"); String userKey = request.getHeader("user-key");
@ -3677,8 +3797,8 @@ public class PageController {
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); UserByPort userToken = AuthenticationTokenPool.getUserToken(token);
if (param.containsKey("id")) { if (param.containsKey("id")) {
Integer maindeparment = userToken.getMaindeparment(); Integer maindeparment = userToken.getMaindeparment();
if(PublicConfig.roleAdminorgList.contains(maindeparment)){ if (PublicConfig.roleAdminorgList.contains(maindeparment)) {
mv.addObject("display","inline-block"); mv.addObject("display", "inline-block");
} }
String type = param.get("type"); String type = param.get("type");
mv.addObject("id", param.get("id")); mv.addObject("id", param.get("id"));

13
src/main/java/com/dreamchaser/depository_manage/pojo/InventoryP.java

@ -225,6 +225,9 @@ public class InventoryP {
private List<Depository> depositoryList; private List<Depository> depositoryList;
private List<MaterialAndPlaceForViewP> materialAndPlaceList;
public InventoryP(Integer id, Integer depositoryId, String mname, Integer quantity, Double price, String typeName) { public InventoryP(Integer id, Integer depositoryId, String mname, Integer quantity, Double price, String typeName) {
this.id = id; this.id = id;
this.mname = mname; this.mname = mname;
@ -242,15 +245,15 @@ public class InventoryP {
this.price = inventory.getPrice(); // 单价 this.price = inventory.getPrice(); // 单价
this.state = inventory.getState(); // 物料状态 this.state = inventory.getState(); // 物料状态
this.amounts = inventory.getAmounts() / 100; // 总额 this.amounts = inventory.getAmounts() / 100; // 总额
this.unit = inventory.getUnit(); // 计量单位 this.unit = inventory.getUnit() == null ? "" : inventory.getUnit(); // 计量单位
this.texture = inventory.getTexture(); // 材质 this.texture = inventory.getTexture() == null ? "" : inventory.getTexture(); // 材质
this.code = inventory.getCode(); // 存货编码 this.code = inventory.getCode(); // 存货编码
this.version = inventory.getVersion(); // 规格型号 this.version = inventory.getVersion() == null ? "" : inventory.getVersion(); // 规格型号
this.depositoryCode = inventory.getDepositoryCode(); // 仓库编码 this.depositoryCode = inventory.getDepositoryCode(); // 仓库编码
this.depositoryId = inventory.getDepositoryId(); // 仓库id this.depositoryId = inventory.getDepositoryId(); // 仓库id
this.placeCode = inventory.getPlaceCode(); // 库位编码 this.placeCode = inventory.getPlaceCode(); // 库位编码
this.productionPlace = inventory.getProductionPlace(); // 产地 this.productionPlace = inventory.getProductionPlace(); // 产地
this.brand = inventory.getBrand(); // 品牌 this.brand = inventory.getBrand() == null ? "" : inventory.getBrand(); // 品牌
this.remark = inventory.getRemark(); // 备注 this.remark = inventory.getRemark(); // 备注
this.shelfLifeForCalc = inventory.getShelfLife(); //保质期,用于计算 this.shelfLifeForCalc = inventory.getShelfLife(); //保质期,用于计算
this.numberOfTemporary = inventory.getNumberOfTemporary(); // 临时数量(出库数量) this.numberOfTemporary = inventory.getNumberOfTemporary(); // 临时数量(出库数量)
@ -258,6 +261,8 @@ public class InventoryP {
this.placeKingdeeCode = inventory.getPlaceKingdeeCode(); // 库位编码(金蝶) this.placeKingdeeCode = inventory.getPlaceKingdeeCode(); // 库位编码(金蝶)
this.depositoryName = inventory.getDepositoryName(); // 仓库名称 this.depositoryName = inventory.getDepositoryName(); // 仓库名称
this.iremark = inventory.getIremark() == null ? "" : inventory.getIremark(); // 库存导入时填写的备注 this.iremark = inventory.getIremark() == null ? "" : inventory.getIremark(); // 库存导入时填写的备注
this.typeName = inventory.getTypeName(); // 物料类型名称
this.typeId = inventory.getMaterialTypeId(); // 物料类型id
} }
public InventoryP() { public InventoryP() {

5
src/main/java/com/dreamchaser/depository_manage/pojo/MaterialAndPlaceForViewP.java

@ -90,6 +90,11 @@ public class MaterialAndPlaceForViewP {
*/ */
private String mname; private String mname;
/**
* 对应总额
*/
private Double amount;
/** /**
* 盘点数量 * 盘点数量

3
src/main/java/com/dreamchaser/depository_manage/service/PlaceService.java

@ -118,6 +118,9 @@ public interface PlaceService {
*/ */
List<PlaceP> findPlaceByMidAndDid(Integer mid, Integer depositoryId); List<PlaceP> findPlaceByMidAndDid(Integer mid, Integer depositoryId);
/** /**
* 根据库位获取当前库位所存储的物料 * 根据库位获取当前库位所存储的物料
*/ */

22
src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java

@ -186,6 +186,26 @@ public class MaterialServiceImpl implements MaterialService {
map.put("producedDate", producedDate); map.put("producedDate", producedDate);
} }
map.put("updateTime", System.currentTimeMillis()); map.put("updateTime", System.currentTimeMillis());
if (map.containsKey("unit")) {
// 如果存在计量单位字段
String unit = (String) map.get("unit");
if (!"".equals(unit)) {
Integer id = ObjectFormatUtil.toInteger(map.get("id"));
Material materialById = materialMapper.findMaterialById(id);
if (!unit.equals(materialById.getUnit())) {
// 如果更改了计量单位
Map<String, Object> paramForSplitInfo = new HashMap<>();
paramForSplitInfo.put("oldUnit", materialById.getUnit());
paramForSplitInfo.put("mid", materialById.getId());
// 获取当前物料存在的拆单
SplitInfo splitInfo = splitUnitMapper.findSplitInfoByMidAndUnit(paramForSplitInfo);
if (splitInfo != null) {
splitInfo.setOldUnit(unit);
splitUnitMapper.updateSplitInfo(splitInfo);
}
}
}
}
return materialMapper.updateMaterial(map); return materialMapper.updateMaterial(map);
} }
@ -1610,7 +1630,7 @@ public class MaterialServiceImpl implements MaterialService {
// 新增对应关系 // 新增对应关系
Map<String, Object> insertAfter = new HashMap<>(); Map<String, Object> insertAfter = new HashMap<>();
insertAfter.put("mid", id); insertAfter.put("mid", id);
insertAfter.put("quantity", (int)(quantity * 100)); insertAfter.put("quantity", (int) (quantity * 100));
insertAfter.put("pid", toPlaceId); insertAfter.put("pid", toPlaceId);
// 添加对应关系 // 添加对应关系
placeService.addMaterialOnPlace(insertAfter); placeService.addMaterialOnPlace(insertAfter);

6
src/main/java/com/dreamchaser/depository_manage/utils/ObjectFormatUtil.java

@ -62,5 +62,11 @@ public class ObjectFormatUtil {
BigDecimal bd2 = new BigDecimal(Double.toString(d2)); BigDecimal bd2 = new BigDecimal(Double.toString(d2));
return bd1.multiply(bd2).doubleValue(); return bd1.multiply(bd2).doubleValue();
} }
// double 类型相除,保留位数
public static double divide(double a, double b, int scale){
BigDecimal bd1 = new BigDecimal(Double.toString(a));
BigDecimal bd2 = new BigDecimal(Double.toString(b));
return bd1.divide(bd2, scale, BigDecimal.ROUND_HALF_UP).doubleValue();
}
} }

14
src/main/resources/static/css/public.css

@ -309,5 +309,17 @@ body {
display: inline-block; display: inline-block;
} }
.mySelect{
width: 80%;
text-align: center;
height: 30px;
border-color: #d2d2d2;
border-radius: 5px;
padding: 0 5px;
}
.myOption{
background-color: #f8f8f8;
color: #16b777;
font-weight: 700;
}

2
src/main/resources/static/js/stockTaking/stockTakingForLocationTable.js

@ -339,7 +339,7 @@ layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () {
let req = {}; let req = {};
req.depositoryId = depositoryId; req.depositoryId = depositoryId;
req.placeId = placeId; req.placeId = placeId;
table.reload('currentTableForLocation', { table.reloadData('currentTableForLocation', {
url: '/material/findInventoryForStockTaking', url: '/material/findInventoryForStockTaking',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/static/js/stockTaking/stockTakingForMaterial.js

@ -126,7 +126,7 @@ layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () {
updateTableShowForMaterial = function () { updateTableShowForMaterial = function () {
let req = {}; let req = {};
req.mid = $("#mid").val(); req.mid = $("#mid").val();
table.reload('currentTableForMaterial', { table.reloadData('currentTableForMaterial', {
url: '/material/findMaterialByConditionForStockTaking', url: '/material/findMaterialByConditionForStockTaking',
page: { page: {
curr: 1 curr: 1

6
src/main/resources/templates/index.html

@ -30,8 +30,8 @@
<script src="../static/js/vue/vue-router.js"></script> <script src="../static/js/vue/vue-router.js"></script>
<script src="../static/lib/http-vue-loader/src/httpVueLoader.js"></script> <script src="../static/lib/http-vue-loader/src/httpVueLoader.js"></script>
<style id="layuimini-bg-color"> <style id="layuimini-bg-color">
.layui-nav .layui-nav-more{ .mylayuiminiClass .layui-nav-more {
top:0; top: 0;
} }
</style> </style>
</head> </head>
@ -74,7 +74,7 @@
<li class="layui-nav-item mobile layui-hide-xs" lay-unselect> <li class="layui-nav-item mobile layui-hide-xs" lay-unselect>
<a href="javascript:" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a> <a href="javascript:" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a>
</li> </li>
<li class="layui-nav-item layuimini-setting"> <li class="layui-nav-item layuimini-setting mylayuiminiClass">
<a href="javascript:" th:text="${user.getName()}"></a> <a href="javascript:" th:text="${user.getName()}"></a>
<div id="uid" th:text="${user.getId()}" style="display: none"></div> <div id="uid" th:text="${user.getId()}" style="display: none"></div>
<dl class="layui-nav-child"> <dl class="layui-nav-child">

10
src/main/resources/templates/pages/BusinessType/businesstype_out.html

@ -141,7 +141,7 @@
req.state = data.state; req.state = data.state;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -198,7 +198,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -231,7 +231,7 @@
content: '/businessTypeEdit?id=' + data.id, content: '/businessTypeEdit?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -288,7 +288,7 @@
content: '/businessTypeEdit?id=' + obj.id, content: '/businessTypeEdit?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -326,7 +326,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/application/application-out_min.html

@ -111,7 +111,7 @@
fixed: false, fixed: false,
content: '/scanQrCodeByOut?id=' + data.id, content: '/scanQrCodeByOut?id=' + data.id,
end: function () { end: function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/ApplicationOutMinByDid', url: '/depositoryRecord/ApplicationOutMinByDid',
page: { page: {
curr: 1 curr: 1

4
src/main/resources/templates/pages/application/application_multi.html

@ -248,7 +248,7 @@
icon: 0, icon: 0,
time: 1000 time: 1000
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicant_multi_create', url: '/depositoryRecord/applicant_multi_create',
page: { page: {
curr: 1 curr: 1
@ -263,7 +263,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicant_multi_create', url: '/depositoryRecord/applicant_multi_create',
page: { page: {
curr: 1 curr: 1

4
src/main/resources/templates/pages/authorization/depositoryOpen.html

@ -102,7 +102,7 @@
}); });
} else { } else {
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1
@ -195,7 +195,7 @@
req.number = data.number; req.number = data.number;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/company/company-out.html

@ -139,7 +139,7 @@
} }
req.superior = parentId; req.superior = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/companyByCondition', url: '/company/companyByCondition',
page: { page: {
curr: 1 curr: 1

4
src/main/resources/templates/pages/company/company-out_back.html

@ -119,7 +119,7 @@
}); });
} }
else { else {
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1
@ -267,7 +267,7 @@
req.number = data.number; req.number = data.number;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/company/companyByParentId.html

@ -141,7 +141,7 @@
} }
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/companyByCondition', url: '/company/companyByCondition',
page: { page: {
curr: 1 curr: 1

10
src/main/resources/templates/pages/constructionunit/constructionunit_out.html

@ -141,7 +141,7 @@
req.state = data.state; req.state = data.state;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -198,7 +198,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -231,7 +231,7 @@
content: '/constructionUnitEdit?id=' + data.id, content: '/constructionUnitEdit?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -288,7 +288,7 @@
content: '/constructionUnitEdit?id=' + obj.id, content: '/constructionUnitEdit?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -326,7 +326,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1

332
src/main/resources/templates/pages/depository/Inventory-view_back.html

@ -10,153 +10,118 @@
<link rel="stylesheet" href="/static/css/public.css" media="all"> <link rel="stylesheet" href="/static/css/public.css" media="all">
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all"> <link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all">
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all"> <link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
<link rel="stylesheet" href="/static/lib/bootstrap-3.4.1-dist/css/bootstrap.min.css">
<style> <style>
.inputdiv { .editButton {
display: flex; position: absolute;
background-color: #fff; top: 5px;
height: 38px; right: 15px;
line-height: 38px;
border: 1px solid rgb(238, 238, 238);
}
.layui-form-label {
padding: 9px 0px;
text-align: left;
}
.layui-input-block {
margin-left: 80px;
} }
.inputdiv .layui-unselect {
border-style: none;
}
</style> </style>
</head> </head>
<body> <body>
<input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none">
<form class="layui-form layui-form-pane" action=""> <div class="layui-row layui-col-space1">
<div class="layui-col-xs12 layui-col-md9">
<div class="grid-demo grid-demo-bg1">
<input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none"> <div class="panel panel-info">
<div class="layui-form-item"> <div class="panel-heading">物料基本信息
<label class="layui-form-label">存货编码</label> <button type="button" th:attr="mid=${record.getMid()}" lay-on="editMaterialInfo"
<div class="layui-input-inline"> th:style="'display:'+${display}"
<input type="text" th:value="${record.getCode()}" name="code" id="code" readonly class="editButton layui-btn layui-btn-sm layui-btn-primary">
autocomplete="off" class="layui-input"> <i class="layui-icon layui-icon-edit"></i>
</div> </button>
</div> </div>
<div class="layui-form-item"> <div class="panel-body">
<label class="layui-form-label">物料名称</label> <table class="table">
<div class="layui-input-inline"> <tbody>
<input type="text" th:value="${record.getMname()}" name="mname" readonly <tr>
autocomplete="off" class="layui-input"> <td th:text="'物料编码:'+${record.getCode()}">物料编码:</td>
<td th:text="'物料名称:'+${record.getMname()}">物料名称:</td>
<td th:text="'规格型号:'+${record.getVersion()}">规格型号:</td>
<td th:text="'物料材质:'+${record.getTexture()}">物料材质:</td>
</tr>
<tr>
<td th:text="'物料品牌:'+${record.getBrand()}">物料品牌:</td>
<td th:text="'物料类型:'+${record.getTypeName()}">物料类型:</td>
<td>
计量单位:
<span th:text="${record.getUnit()}"></span>
<span th:each="splitInfo,iterStar:${record.getSplitInfoList()}"
th:text="${splitInfo.getNewUnit()}"></span>
</td>
<td th:text="'物料单价:'+${record.getPrice()}" th:style="'display:'+${display}">物料单价:</td>
</tr>
<tr>
<td th:text="'物料备注:'+${record.getIremark()}">物料备注:</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
<div class="layui-col-xs6 layui-col-md3">
<div class="grid-demo">
<div class="panel panel-success">
<div class="panel-heading">库存基本信息</div>
<div class="panel-body">
<div class="layui-form-item"> <table class="table">
<label class="layui-form-label">规格型号</label> <caption th:text="${record.getDepositoryName()}">所属仓库:</caption>
<div class="layui-input-inline"> <caption th:text="'备注:'+${record.getIremark()}">备注:</caption>
<input type="text" th:value="${record.getVersion()}" name="version" autocomplete="off" readonly
class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">品牌:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" th:value="${record.getBrand()}" readonly
name="brand"/>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料类型</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="openSonByMateralType" readonly
th:value="${record.getTypeName()}"
lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">材质</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getTexture()}" name="texture" autocomplete="off" readonly
class="layui-input">
</div> <thead>
</div> <tr>
<div class="layui-form-item"> <td>所处库位</td>
<label class="layui-form-label">计量单位</label> <td>计量单位</td>
<div class="layui-input-inline"> <td>对应数量</td>
<select id="unit"> <td th:style="'display:'+${display}">金额</td>
<option value="-1" th:text="${record.getUnit()}"></option> </tr>
<option th:each="splitInfo,iterStar:${record.getSplitInfoList()}" </thead>
th:value="${splitInfo?.getNewUnit()}" <tbody>
th:text="${splitInfo?.getNewUnit()}"></option> <tr type="button"
</select> th:each="materialAndPlace,iterStar:${record.getMaterialAndPlaceList()}">
</div> <td>
</div> <button onclick="changePlaceCode(this)"
<div class="layui-form-item"> th:text="${materialAndPlace.getKingdeecode()}"
<label class="layui-form-label">所处仓库</label> th:attr="id=${materialAndPlace.getId()}"
<div class="layui-input-inline"> class="layui-btn layui-btn-primary layui-btn-sm"></button>
<input type="text" th:value="${record.getDepositoryName()}" name="depositoryName" required </td>
autocomplete="off" readonly <td>
class="layui-input"> <select class="mySelect" onchange="changeUnitForQuantity(this)" th:attr="id='materialUnit'+${materialAndPlace.getId()}" >
<input type="text" id="depositoryId" th:value="${record.getDepositoryId()}" style="display: none"> <option th:text="${record.getUnit()}" value="-1"
</div> class="myOption"></option>
</div> <option class="myOption" th:each="splitInfo,iterStar:${record.getSplitInfoList()}"
<div class="layui-form-item"> th:value="${splitInfo.getNewUnit()}"
<label class="layui-form-label">所处库位</label> th:text="${splitInfo.getNewUnit()}"></option>
<div class="layui-input-inline"> </select>
<button th:each="placeP,iterStar:${record.getPlacePList()}"
th:attr="id=${record.getMid()}" class="layui-btn layui-btn-customize" </td>
onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}" <td>
th:text="${placeP.getKingdeecode()}"> <span th:attr="id='quantity'+${materialAndPlace.getId()}" th:text="${materialAndPlace.getInventory()}"></span>
</button> </td>
</div> <td th:style="'display:'+${display}">
</div> <span th:attr="id='amounts'+${materialAndPlace.getId()}" th:text="${materialAndPlace.getAmount()}"></span>
<div class="layui-form-item"> </td>
<label class="layui-form-label">数量</label> </tr>
<div class="layui-input-inline"> </tbody>
<input type="text" th:value="${record.getQuantity()}" name="quantity" required autocomplete="off" <tbody>
id="quantity" readonly
class="layui-input">
</div>
</div>
<div class="layui-form-item" th:style="'display:'+${display}">
<label class="layui-form-label">单价</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getPrice()}" name="price" required autocomplete="off" id="price"
readonly
class="layui-input">
</div>
</div>
<div class="layui-form-item" th:style="'display:'+${display}">
<label class="layui-form-label">总额</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getAmounts()}" name="amounts" required autocomplete="off" id="amounts"
readonly
class="layui-input">
</div>
</div>
<div class="layui-form-item" >
<label class="layui-form-label">备注</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getIremark()}" name="iremark" required autocomplete="off" id="iremark"
onchange="updateInventoryRemark()"
class="layui-input">
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationIn()">入库申请</button>
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationOut()">出库申请</button> </tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
</form> <div class="layui-col-xs6 layui-col-md12">
<div class="grid-demo grid-demo-bg2">xs:6/12 | md:12/12</div>
</div>
</div>
<script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script> <script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> <script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
@ -169,20 +134,26 @@
} }
function updateInventoryRemark(){ function updateInventoryRemark() {
} }
function changePlaceCode() {
}
function changeUnitForQuantity() {
}
var barCode = []; var barCode = [];
var flag = false; var flag = false;
layui.use(['form', 'laydate', 'miniTab'], function () { layui.use(['form', 'laydate', 'miniTab', 'util'], function () {
var form = layui.form, var form = layui.form,
laydate = layui.laydate, laydate = layui.laydate,
$ = layui.$, $ = layui.$,
util = layui.util,
miniTab = layui.miniTab; miniTab = layui.miniTab;
let iremark = $("#iremark").val(); let iremark = $("#iremark").val();
miniTab.listen(); miniTab.listen();
@ -204,6 +175,27 @@
}); });
}); });
util.on('lay-on', {
'editMaterialInfo': function (obj) {
let mid = $(obj).attr("mid");
layer.open({
type: 2,
offset: 'r',
anim: 'slideLeft', // 从右往左
area: ['40%', '100%'],
shade: 0.1,
title: "物料详情",
shadeClose: true,
id: 'ID-demo-layer-direction-r',
content: '/materialEditForInventory?id=' + mid,
end: function () {
location.reload();
}
});
}
});
applicationOut = function () { applicationOut = function () {
var index = layer.open({ var index = layer.open({
title: '出库申请', title: '出库申请',
@ -234,15 +226,14 @@
layer.full(index); layer.full(index);
}); });
return false; return false;
} };
updateInventoryRemark = function() { updateInventoryRemark = function () {
let id = $("#id").val(); let id = $("#id").val();
let newIremark = $("#iremark").val(); let newIremark = $("#iremark").val();
let index = layer.confirm('确认更改备注?', { let index = layer.confirm('确认更改备注?', {
btn: ['确定','取消'] //按钮 btn: ['确定', '取消'] //按钮
}, function(){ }, function () {
let req = {}; let req = {};
req.id = id; req.id = id;
req.remark = newIremark; req.remark = newIremark;
@ -254,7 +245,7 @@
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
success: function (data) { success: function (data) {
if (data.status >= 300) { if (data.status >= 300) {
layer.msg(data.statusInfo.message,{ layer.msg(data.statusInfo.message, {
icon: 5,//失败的表情 icon: 5,//失败的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
@ -270,11 +261,70 @@
} }
} }
}); });
}, function(){ }, function () {
$("#iremark").val(iremark); $("#iremark").val(iremark);
}); });
};
// 用于更改同一仓库下的库位
changePlaceCode = function (obj) {
var id = $(obj).attr("id");
// 当前点击行中的计量单位按钮
let materialUnitObj = $("#materialUnit"+id+" option:selected");
let unit = materialUnitObj.val();
if (unit === -1 || unit === "-1") {
unit = materialUnitObj.text();
}
unit = unit.trim();
layer.open({
title: '选择库位',
type: 2,
shade: 0.2,
maxmin: true,
shadeClose: true,
area: ['70%', '70%'],
content: '/selectPlaceByDepository?id=' + id + '&unit=' + unit,
success: function (layero, index) {
var children = layero.children();
var content = $(children[1]);
var iframeChildren = $(content.children());
content.css('height', '100%');
iframeChildren.css('height', '100%');
},
end:function() {
location.reload();
}
});
};
/**
* 用于修改展示的库存数量
* @param obj
*/
changeUnitForQuantity = function(obj) {
let materialUnitObj = $(obj);
let req = {};
req.unit = materialUnitObj.val();
let id = materialUnitObj.attr("id").split("materialUnit")[1].trim();
req.id=id;
$.ajax({
url: "/material/getQuantityForLocationAndUnit",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (res) {
let data = res.data;
$("#quantity"+id).text(data.quantity);
$("#amounts"+id).text(data.amount);
}
});
} }
}); });
</script> </script>

21
src/main/resources/templates/pages/depository/Inventory-view_mobile.html

@ -110,11 +110,16 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">所处库位</label> <label class="layui-form-label">所处库位</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<button th:each="placeP,iterStar:${record.getPlacePList()}" type="button" <!-- <button th:each="placeP,iterStar:${record.getPlacePList()}" type="button"-->
th:attr="code=${placeP.getCode()}" <!-- th:attr="code=${placeP.getCode()}"-->
class="layui-btn layui-btn-customize" <!-- class="layui-btn layui-btn-customize"-->
onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}" <!-- onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}"-->
th:text="${placeP.getKingdeecode()}"> <!-- th:text="${placeP.getKingdeecode()}">-->
<button
th:each="materialAndPlace,iterStar:${record.getMaterialAndPlaceList()}"
th:text="${materialAndPlace.getKingdeecode()}"
th:attr="id=${materialAndPlace.getId()}"
class="layui-btn layui-btn-primary layui-btn-sm"></button>
</button> </button>
</div> </div>
</div> </div>
@ -233,9 +238,7 @@
// 用于更改同一仓库下的库位 // 用于更改同一仓库下的库位
changePlaceCode = function (obj) { changePlaceCode = function (obj) {
var depositoryId = $("#depositoryId").val(); var id = $("#id").val();
var placeCode = $(obj).attr("code");
var mid = $("#id").val();
// 当前点击行中的计量单位按钮 // 当前点击行中的计量单位按钮
let unit = $("#unit").val(); let unit = $("#unit").val();
if (unit === -1 || unit === "-1") { if (unit === -1 || unit === "-1") {
@ -248,7 +251,7 @@
maxmin: true, maxmin: true,
shadeClose: true, shadeClose: true,
area: ['70%', '70%'], area: ['70%', '70%'],
content: '/selectPlaceByDepository?depositoryId=' + depositoryId + '&mid=' + mid + '&placeCode=' + placeCode + '&unit=' + unit, content: '/selectPlaceByDepository?id=' + id + '&unit=' + unit,
success: function (layero, index) { success: function (layero, index) {
var children = layero.children(); var children = layero.children();
var content = $(children[1]); var content = $(children[1]);

4
src/main/resources/templates/pages/depository/table-in.html

@ -220,7 +220,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationInView', url: '/depositoryRecord/applicationInView',
page: { page: {
curr: 1 curr: 1
@ -277,7 +277,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationInView', url: '/depositoryRecord/applicationInView',
page: { page: {
curr: 1 curr: 1

5
src/main/resources/templates/pages/depository/table-out.html

@ -285,6 +285,7 @@
flagForReload = false; flagForReload = false;
let col = {field: 'price', title: '金额', minWidth: 150, sort: true}; let col = {field: 'price', title: '金额', minWidth: 150, sort: true};
cols.splice(6, 0, col); cols.splice(6, 0, col);
// table.reloadData('currentTableId', {cols: [cols]});
table.reload('currentTableId', {cols: [cols]}); table.reload('currentTableId', {cols: [cols]});
} }
@ -322,7 +323,7 @@
req.version = data.version.trim(); req.version = data.version.trim();
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationOutView', url: '/depositoryRecord/applicationOutView',
page: { page: {
curr: 1 curr: 1
@ -395,7 +396,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationOutView', url: '/depositoryRecord/applicationOutView',
page: { page: {
curr: 1 curr: 1

85
src/main/resources/templates/pages/depository/table-stock.html

@ -86,8 +86,10 @@
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table> <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
<script id="currentTableBar" type="text/html"> <script id="currentTableBar" type="text/html">
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-subclass" mid="{{d.id}}" depository="{{d.depositoryId}}" lay-on="applicationIn">入库申请</a> <a class="layui-btn layui-btn-normal layui-btn-xs data-count-subclass" mid="{{d.id}}"
<a class="layui-btn layui-btn-xs data-count-edit" code="{{d.code}}" depository="{{d.depositoryId}}" lay-on="applicationOut" >出库申请</a> depository="{{d.depositoryId}}" lay-on="applicationIn">入库申请</a>
<a class="layui-btn layui-btn-xs data-count-edit" code="{{d.code}}" depository="{{d.depositoryId}}"
lay-on="applicationOut">出库申请</a>
</script> </script>
<!-- 用于计量单位的展示--> <!-- 用于计量单位的展示-->
@ -97,8 +99,8 @@
</button> </button>
</script> </script>
<script id="changePlace" type="text/html" > <script id="changePlace" type="text/html">
<span style="display: none">{{d.placeKingdeeCode}}</span> <span >{{d.placeKingdeeCode}}</span>
</script> </script>
@ -147,7 +149,7 @@
let reqForPublic = {}; let reqForPublic = {};
layui.use(['form', 'table', 'upload','util'], function () { layui.use(['form', 'table', 'upload', 'util'], function () {
var $ = layui.jquery, var $ = layui.jquery,
form = layui.form, form = layui.form,
upload = layui.upload, upload = layui.upload,
@ -206,20 +208,19 @@
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{field: "code", title: '存货编码', width: 150, templet: '#materialCode'}, {field: "code", title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 200, title: '物料名称'}, {field: 'mname', width: 200, title: '物料名称'},
{field: 'brand', width: 200, title: '品牌'}, {field: 'brand', width: 200, title: '品牌',hide:true},
{field: 'version', width: 200, title: '规格型号'}, {field: 'version', width: 200, title: '规格型号'},
{field: 'typeName', width: 200, title: '物料类型'}, {field: 'typeName', width: 200, title: '物料类型',hide:true},
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'}, {field: 'quantity', width: 200, title: '数量'},
{field: 'depositoryName', width: 200, title: '仓库名称'}, {field: 'depositoryName', width: 200, title: '仓库名称'},
{field: 'depositoryCode', width: 200, title: '仓库编码'}, {field: 'depositoryCode', width: 200, title: '仓库编码'},
// {title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, {title: '所处库位', width: 200, templet: '#changePlace', align: "center"},
{field: "placeKingdeeCode", title: '所处库位', width: 200, templet: '#changePlace', align: "center"},
{field: 'warningCount', width: 200, title: '待过期数量', sort: true}, {field: 'warningCount', width: 200, title: '待过期数量', sort: true},
{field: 'price', title: '单价', width: 200, sort: true}, {field: 'price', title: '单价', width: 200, sort: true},
{field: 'amounts', title: '总金额', width: 200, sort: true}, {field: 'amounts', title: '总金额', width: 200, sort: true},
{field: 'texture', width: 200, title: '材质',}, {field: 'texture', width: 200, title: '材质',hide:true},
{field: 'iremark', width: 200, title: '备注',}, {field: 'iremark', width: 200, title: '备注',hide:true},
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} {title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"}
]; ];
@ -254,17 +255,16 @@
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{title: '存货编码', width: 150, templet: '#materialCode'}, {title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 200, title: '物料名称'}, {field: 'mname', width: 200, title: '物料名称'},
{field: 'brand', width: 200, title: '品牌'}, {field: 'brand', width: 200, title: '品牌', hide: true},
{field: 'version', width: 200, title: '规格型号'}, {field: 'version', width: 200, title: '规格型号'},
{field: 'typeName', width: 200, title: '物料类型'}, {field: 'typeName', width: 200, title: '物料类型', hide: true},
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'}, {field: 'quantity', width: 200, title: '数量'},
{field: 'depositoryName', width: 200, title: '仓库名称'}, {field: 'depositoryName', width: 200, title: '仓库名称'},
{field: 'depositoryCode', width: 200, title: '仓库编码'}, {field: 'depositoryCode', width: 200, title: '仓库编码', hide: true},
{title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, {title: '所处库位', width: 200, templet: '#changePlace', align: "center"},
{field: "placeKingdeeCode", title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, {field: 'warningCount', width: 200, title: '待过期数量', sort: true, hide: true},
{field: 'warningCount', width: 200, title: '待过期数量', sort: true}, {field: 'texture', width: 200, title: '材质', hide: true},
{field: 'texture', width: 200, title: '材质',},
{field: 'iremark', width: 200, title: '备注',}, {field: 'iremark', width: 200, title: '备注',},
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} {title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"}
] ]
@ -283,10 +283,6 @@
} }
$.each(res['data'], function (i, j) { $.each(res['data'], function (i, j) {
let jElement = j['warningCount']; let jElement = j['warningCount'];
let placeCode = j['placeCode'].split(" ");
let placeKingdeeCode = j['placeKingdeeCode'].split(" ");
let depositoryId = j['depositoryId'];
let mid = j['id'];
if (jElement !== null && jElement !== undefined) { if (jElement !== null && jElement !== undefined) {
let flag = (Number(jElement) !== 0); let flag = (Number(jElement) !== 0);
if (flag) { if (flag) {
@ -294,17 +290,6 @@
} }
} }
// 所处库位
var placeCodeItem = $("[lay-id='currentTableId'] tr:eq(" + (i + 1) + ")").children()[10];
//计量单位
// 用于库位的添加
var aItem = placeCodeItem.childNodes[0];
// 用于计量单位的添加
for (let k = 0; k < placeKingdeeCode.length; k++) {
if (placeKingdeeCode[k] !== "") {
$(aItem).append('<button code=' + placeCode[k] + ' id=' + mid + ' class="layui-btn layui-btn-primary layui-btn-xs" onclick="changePlaceCode(this)" value=' + depositoryId + '>' + placeKingdeeCode[k] + '</button>')
}
}
}); });
} }
@ -364,7 +349,7 @@
} }
reqForPublic = req; reqForPublic = req;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
@ -404,12 +389,12 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
}, },
where:reqForPublic where: reqForPublic
}, 'data'); }, 'data');
}); });
} else { } else {
@ -418,12 +403,12 @@
time: 200, time: 200,
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
}, },
where:reqForPublic where: reqForPublic
}, 'data'); }, 'data');
}) })
} }
@ -454,7 +439,7 @@
table.on('tool(currentTableFilter)', function (obj) { table.on('tool(currentTableFilter)', function (obj) {
let data = obj.data; let data = obj.data;
if (obj.event === 'changeUnit') { if (obj.event === 'changeUnit') {
let showQuantity = data.showQuantity; let showQuantity = data.showQuantity;
let btn = $("#btn_" + data.id); let btn = $("#btn_" + data.id);
let clickNum = Number(btn.attr("click_num")); let clickNum = Number(btn.attr("click_num"));
@ -494,7 +479,7 @@
// 事件 // 事件
util.on('lay-on', { util.on('lay-on', {
'applicationIn': function(obj){ 'applicationIn': function (obj) {
let mid = $(obj).attr('mid'); let mid = $(obj).attr('mid');
let depositoryId = $(obj).attr('depository'); let depositoryId = $(obj).attr('depository');
layer.open({ layer.open({
@ -503,13 +488,13 @@
anim: 'slideLeft', // 从右往左 anim: 'slideLeft', // 从右往左
area: ['40%', '100%'], area: ['40%', '100%'],
shade: 0.1, shade: 0.1,
title:"入库申请", title: "入库申请",
shadeClose: true, shadeClose: true,
id: 'ID-demo-layer-direction-r', id: 'ID-demo-layer-direction-r',
content: '/application_in_back?mid=' +mid + "&depositoryId=" + depositoryId content: '/application_in_back?mid=' + mid + "&depositoryId=" + depositoryId
}); });
}, },
'applicationOut': function(obj){ 'applicationOut': function (obj) {
let code = $(obj).attr('code'); let code = $(obj).attr('code');
let depositoryId = $(obj).attr('depository'); let depositoryId = $(obj).attr('depository');
layer.open({ layer.open({
@ -518,10 +503,10 @@
anim: 'slideLeft', // 从右往左 anim: 'slideLeft', // 从右往左
area: ['40%', '100%'], area: ['40%', '100%'],
shade: 0.1, shade: 0.1,
title:"出库申请", title: "出库申请",
shadeClose: true, shadeClose: true,
id: 'ID-demo-layer-direction-r', id: 'ID-demo-layer-direction-r',
content: '/application_out_back?code=' + code+ "&depositoryId=" + depositoryId content: '/application_out_back?code=' + code + "&depositoryId=" + depositoryId
}); });
}, },
@ -553,12 +538,12 @@
}, },
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
} }
, where:reqForPublic , where: reqForPublic
}, 'data'); }, 'data');
} }
}); });
@ -690,12 +675,12 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
}, },
where:reqForPublic where: reqForPublic
}, 'data'); }, 'data');
}) })
}, },
@ -766,12 +751,12 @@
content: '/InventoryView?id=' + obj.id, content: '/InventoryView?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
}, },
where:reqForPublic where: reqForPublic
}, 'data'); }, 'data');
} }
}); });

6
src/main/resources/templates/pages/group/application_multi.html

@ -155,7 +155,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/applicant_multi_create', url: '/group/applicant_multi_create',
page: { page: {
curr: 1 curr: 1
@ -200,7 +200,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/applicant_multi_create', url: '/group/applicant_multi_create',
page: { page: {
curr: 1 curr: 1
@ -243,7 +243,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/applicant_multi_create', url: '/group/applicant_multi_create',
page: { page: {
curr: 1 curr: 1

6
src/main/resources/templates/pages/group/group-add.html

@ -196,7 +196,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -226,7 +226,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -265,7 +265,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1

22
src/main/resources/templates/pages/group/group-out.html

@ -196,7 +196,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -229,7 +229,7 @@
} else { } else {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -259,7 +259,7 @@
area: ['100%', '100%'], area: ['100%', '100%'],
content: '/group_edit?id='+data.id, content: '/group_edit?id='+data.id,
end:function () { end:function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -292,7 +292,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -325,7 +325,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -387,7 +387,7 @@
fixed: false, fixed: false,
content: '/materialForGroup?mid='+mid+'&gid='+gid, content: '/materialForGroup?mid='+mid+'&gid='+gid,
end:function () { end:function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -421,7 +421,7 @@
if (data.status >= 300) { if (data.status >= 300) {
layer.msg(data.statusInfo.message);//失败的表情 layer.msg(data.statusInfo.message);//失败的表情
} else { } else {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -451,7 +451,7 @@
fixed: false, fixed: false,
content: '/group_add', content: '/group_add',
end:function () { end:function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -488,7 +488,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -527,7 +527,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -540,7 +540,7 @@
time: 200, time: 200,
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1

8
src/main/resources/templates/pages/group/group_edit.html

@ -179,7 +179,7 @@
fixed: false, fixed: false,
content: '/materialForGroup?mid=' + data.mid + '&gid=' + id, content: '/materialForGroup?mid=' + data.mid + '&gid=' + id,
end: function () { end: function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1
@ -211,7 +211,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1
@ -244,7 +244,7 @@
fixed: false, fixed: false,
content: '/group_add?gid=' + id, content: '/group_add?gid=' + id,
end: function () { end: function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1
@ -282,7 +282,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1

16
src/main/resources/templates/pages/material/material-out.html

@ -249,7 +249,7 @@
flagForRelod = false; flagForRelod = false;
let col = {field: 'price', width: 150, title: '物料单价'}; let col = {field: 'price', width: 150, title: '物料单价'};
cols.splice(6, 0, col); cols.splice(6, 0, col);
table.reload('currentTableId', {cols: [cols]}); table.reloadData('currentTableId', {cols: [cols]});
} }
} }
@ -386,7 +386,7 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -444,7 +444,7 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -508,7 +508,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -565,7 +565,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -647,7 +647,7 @@
content: '/material_view?id=' + data.id, content: '/material_view?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -718,7 +718,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -778,7 +778,7 @@
content: '/material_view?id=' + obj.id, content: '/material_view?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/material/material-out_mobile.html

@ -260,7 +260,7 @@
content: '/material_view?id=' + obj, content: '/material_view?id=' + obj,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1

5
src/main/resources/templates/pages/material/material-view.html

@ -60,7 +60,7 @@
<label class="layui-form-label">存货编码</label> <label class="layui-form-label">存货编码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" th:value="${record.getCode()}" name="code" required lay-verify="required" id="code" <input type="text" th:value="${record.getCode()}" name="code" required lay-verify="required" id="code"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input" readonly>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
@ -318,9 +318,6 @@
}) })
} }
$('body').on('click', '[data-refresh]', function () {
location.reload();
})
}); });
</script> </script>

237
src/main/resources/templates/pages/material/material-viewForInventoryEdit.html

@ -0,0 +1,237 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>分步表单</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/static/lib/layui-v2.8.6/css/layui.css" media="all">
<link rel="stylesheet" href="/static/css/public.css" media="all">
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all">
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
<style>
.inputdiv {
display: flex;
background-color: #fff;
height: 38px;
line-height: 38px;
border: 1px solid rgb(238, 238, 238);
}
.layui-form-label {
padding: 9px 0px;
text-align: left;
}
.layui-input-block {
margin-left: 80px;
}
.inputdiv .layui-unselect {
border-style: none;
}
</style>
</head>
<body>
<form class="layui-form layui-form-pane" action="">
<input type="text" id="barCodeList" style="display:none;">
<div class="layui-form-item" style="display: none">
<label class="layui-form-label">物料编号</label>
<div class="layui-input-block">
<input id="mid" type="text" th:value="${record.getId()}" name="id" required lay-verify="required"
autocomplete="off"
class="layui-input" readonly="readonly">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料名称</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getMname()}" name="mname" required lay-verify="required" id="mname"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">存货编码</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getCode()}" name="code" required lay-verify="required" id="code"
autocomplete="off" class="layui-input" readonly>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">规格型号</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getVersion()}" name="version" autocomplete="off" id="version"
class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">品牌:</label>
<div class="layui-input-inline">
<input type="text" placeholder="请填写物料品牌" class="layui-input" th:value="${record.getBrand()}" id="brand"
name="brand"/>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料类型</label>
<div class="layui-input-inline">
<input type="text" placeholder="请选择物料类型" class="layui-input" id="openSonByMateralType" readonly
th:value="${record.getMaterialType().getTname()}"
lay-verify="required"/>
<input type="text" id="materialTypeId" th:value="${record.getMaterialTypeId()}" placeholder="请选择物料类型"
name="materialTypeId" class="layui-input" style="display: none" lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">材质</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getTexture()}" name="texture" autocomplete="off" id="texture"
class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">计量单位</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getUnit()}" name="unit" required autocomplete="off" id="unit"
class="layui-input">
</div>
</div>
<div class="layui-form-item" id="priceItem" th:style="'display:'+${display}">
<label class="layui-form-label">单价</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getPrice()}" name="price" required autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" style="height: 40px;">保质期:</label>
<div class="layui-input-inline">
<div class="inputdiv">
<input type="number" name="shelfLife" id="shelfLife" placeholder="请填写保质日期" autocomplete="off"
th:value="${record.getShelfLife()}"
class="layui-input" style="border-style: none">
<select id="dateType" name="dateType">
<option value="year" th:selected="${record.getShowShelfLife() == 'year'}"></option>
<option value="month" th:selected="${record.getShowShelfLife() == 'month'}"></option>
<option value="day" th:selected="${record.getShowShelfLife() == 'day'}"></option>
</select>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注:</label>
<div class="layui-input-inline">
<input type="text" placeholder="请填写备注" class="layui-input" th:value="${record.getRemark()}" id="remark"
name="remark"/>
</div>
</div>
<div class="layui-form-item" style="display: none">
<label class="layui-form-label">状态</label>
<div class="layui-input-block">
<input type="checkbox" name="state" lay-skin="switch" lay-text="启用|禁用"
th:checked="${record.getState() == 1}">
</div>
</div>
<div class="layui-form-item" id="btn_sb">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
<script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script>
<script>
function changeQrCodeState() {
}
function createQrCode() {
}
function checkBarCode() {
}
function print_code() {
}
// 用于标志是否为第一次提交
let flagForForm = false;
var barCode = [];
var flag = false;
layui.use(['form', 'laydate'], function () {
var form = layui.form, laydate = layui.laydate, $ = layui.$;
$('#openSonByMateralType').on('click', function () {
layer.open({
type: 2,
title: '弹窗内容',
skin: 'layui-layer-rim',
maxmin: true,
shadeClose: true, //点击遮罩关闭层
area: ['70%', '70%'],
move: '.layui-layer-title',
fixed: false,
content: '/selectType',
success: function (layero, index) {
var children = layero.children();
var content = $(children[1]);
var iframeChildren = $(content.children());
content.css('height', '100%');
iframeChildren.css('height', '100%');
}
});
});
//提交
form.on('submit(formDemo)', function (data) {
if (!flagForForm) {
flagForForm = true;
data = data.field;
if (flag) {
data.barCodeList = barCode;
}
$.ajax({
url: "/material/material_edit",
type: 'post',
dataType: 'json',
contentType: "application/json;charset=utf-8",
data: JSON.stringify(data),
beforeSend: function () {
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
},
success: function (data) {
layer.close(this.layerIndex);
if (data.status >= 300) {
layer.msg(data.statusInfo.message);//失败的表情
return;
} else {
layer.msg("修改成功", {
icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () {
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);//关闭当前页
window.location = '/material_out'
})
}
}
});
}
return false;
});
});
</script>
</body>
</html>

6
src/main/resources/templates/pages/materialBarCode/materialBarCode_out.html

@ -123,7 +123,7 @@
dataType: "json", dataType: "json",
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
success: function (d) { success: function (d) {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findMaterialBarCode', url: '/material/findMaterialBarCode',
page: { page: {
curr: 1 curr: 1
@ -187,7 +187,7 @@
strings = strings.filter(item => item && item.trim()); strings = strings.filter(item => item && item.trim());
barCode = strings; barCode = strings;
notice(strings); notice(strings);
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findMaterialBarCode', url: '/material/findMaterialBarCode',
page: { page: {
curr: 1 curr: 1
@ -229,7 +229,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findMaterialBarCode', url: '/material/findMaterialBarCode',
page: { page: {
curr: 1 curr: 1

12
src/main/resources/templates/pages/materialtype/materialTypeByParentId.html

@ -138,7 +138,7 @@
} }
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -195,7 +195,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -306,7 +306,7 @@
icon: 6,//成功的表情 icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -318,7 +318,7 @@
} }
}) })
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -347,7 +347,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -383,7 +383,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1

22
src/main/resources/templates/pages/materialtype/materialType_view.html

@ -182,7 +182,7 @@
} }
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -240,7 +240,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -375,7 +375,7 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -456,7 +456,7 @@
content: '/materialType_detail?id=' + data.oldId, content: '/materialType_detail?id=' + data.oldId,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -486,7 +486,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -553,7 +553,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -590,7 +590,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -647,7 +647,7 @@
icon: 6,//成功的表情 icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -659,7 +659,7 @@
} }
}) })
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -688,7 +688,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -725,7 +725,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1

12
src/main/resources/templates/pages/notice/notice-out.html

@ -164,7 +164,7 @@
req.endDate = data.endDate; req.endDate = data.endDate;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -221,7 +221,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -259,7 +259,7 @@
content: '/noticeView?id=' + data.id, content: '/noticeView?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -338,7 +338,7 @@
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -377,7 +377,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -411,7 +411,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1

8
src/main/resources/templates/pages/notice/notice-out_user.html

@ -160,7 +160,7 @@
req.endDate = data.endDate; req.endDate = data.endDate;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -191,7 +191,7 @@
content: '/noticeView?id=' + data.id, content: '/noticeView?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -265,7 +265,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -299,7 +299,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/post/post-out.html

@ -148,7 +148,7 @@
req.organization = organization; req.organization = organization;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allPostByOrganization', url: '/company/allPostByOrganization',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/post/postRole.html

@ -187,7 +187,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('demo', { table.reloadData('demo', {
url: '/company/findPostRole?postId=' + postId+'&classes='+classes, url: '/company/findPostRole?postId=' + postId+'&classes='+classes,
page: { page: {
curr: 1 curr: 1

16
src/main/resources/templates/pages/split/split-out.html

@ -177,7 +177,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -232,7 +232,7 @@
icon:5, icon:5,
time:1000 time:1000
},function () { },function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -251,7 +251,7 @@
icon:0, icon:0,
time:1000 time:1000
},function () { },function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -266,7 +266,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -305,7 +305,7 @@
content: '/split_edit?id=' + data.id, content: '/split_edit?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -385,7 +385,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -492,7 +492,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -524,7 +524,7 @@
content: '/split_edit?id=' + obj.id, content: '/split_edit?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/stockTaking/stockTakingForTable.html

@ -282,7 +282,7 @@
let req = {}; let req = {};
req.depositoryId = depositoryId; req.depositoryId = depositoryId;
req.placeId = placeId; req.placeId = placeId;
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventoryForStockTaking', url: '/material/findInventoryForStockTaking',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/user/table-user.html

@ -188,7 +188,7 @@
req.number = data.number; req.number = data.number;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/user/userRole.html

@ -186,7 +186,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('demo', { table.reloadData('demo', {
url: '/findUserRole?userId=' + userId+'&classes=1', url: '/findUserRole?userId=' + userId+'&classes=1',
page: { page: {
curr: 1 curr: 1

2
src/main/resources/templates/pages/user/userRoleForIn.html

@ -182,7 +182,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('demo', { table.reloadData('demo', {
url: '/findUserInRole?userId=' + userId+'&classes=1', url: '/findUserInRole?userId=' + userId+'&classes=1',
page: { page: {
curr: 1 curr: 1

26
src/main/resources/templates/pages/warehouse/depository-out.html

@ -173,7 +173,7 @@
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -222,7 +222,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -252,7 +252,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -312,7 +312,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -362,7 +362,7 @@
req = {}; req = {};
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -393,7 +393,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -430,7 +430,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -503,7 +503,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -517,7 +517,7 @@
}, },
function () { function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -551,7 +551,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -565,7 +565,7 @@
}, },
function () { function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -600,7 +600,7 @@
}, function () { }, function () {
// window.location='/findWareHouseByParentId?parentId=0'+parentId // window.location='/findWareHouseByParentId?parentId=0'+parentId
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -631,7 +631,7 @@
let req = {}; let req = {};
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1

8
src/main/resources/templates/pages/warehouse/warehouseByParentId.html

@ -181,7 +181,7 @@
} }
req.did = parentId; req.did = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1
@ -237,7 +237,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1
@ -288,7 +288,7 @@
req = {}; req = {};
req.did = parentId; req.did = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1
@ -402,7 +402,7 @@
let req = {}; let req = {};
req.did = parentId; req.did = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1

14
target/classes/static/css/public.css

@ -309,5 +309,17 @@ body {
display: inline-block; display: inline-block;
} }
.mySelect{
width: 80%;
text-align: center;
height: 30px;
border-color: #d2d2d2;
border-radius: 5px;
padding: 0 5px;
}
.myOption{
background-color: #f8f8f8;
color: #16b777;
font-weight: 700;
}

6
target/classes/templates/index.html

@ -30,8 +30,8 @@
<script src="../static/js/vue/vue-router.js"></script> <script src="../static/js/vue/vue-router.js"></script>
<script src="../static/lib/http-vue-loader/src/httpVueLoader.js"></script> <script src="../static/lib/http-vue-loader/src/httpVueLoader.js"></script>
<style id="layuimini-bg-color"> <style id="layuimini-bg-color">
.layui-nav .layui-nav-more{ .mylayuiminiClass .layui-nav-more {
top:0; top: 0;
} }
</style> </style>
</head> </head>
@ -74,7 +74,7 @@
<li class="layui-nav-item mobile layui-hide-xs" lay-unselect> <li class="layui-nav-item mobile layui-hide-xs" lay-unselect>
<a href="javascript:" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a> <a href="javascript:" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a>
</li> </li>
<li class="layui-nav-item layuimini-setting"> <li class="layui-nav-item layuimini-setting mylayuiminiClass">
<a href="javascript:" th:text="${user.getName()}"></a> <a href="javascript:" th:text="${user.getName()}"></a>
<div id="uid" th:text="${user.getId()}" style="display: none"></div> <div id="uid" th:text="${user.getId()}" style="display: none"></div>
<dl class="layui-nav-child"> <dl class="layui-nav-child">

21
target/classes/templates/pages/depository/Inventory-view_mobile.html

@ -110,11 +110,16 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">所处库位</label> <label class="layui-form-label">所处库位</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<button th:each="placeP,iterStar:${record.getPlacePList()}" type="button" <!-- <button th:each="placeP,iterStar:${record.getPlacePList()}" type="button"-->
th:attr="code=${placeP.getCode()}" <!-- th:attr="code=${placeP.getCode()}"-->
class="layui-btn layui-btn-customize" <!-- class="layui-btn layui-btn-customize"-->
onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}" <!-- onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}"-->
th:text="${placeP.getKingdeecode()}"> <!-- th:text="${placeP.getKingdeecode()}">-->
<button
th:each="materialAndPlace,iterStar:${record.getMaterialAndPlaceList()}"
th:text="${materialAndPlace.getKingdeecode()}"
th:attr="id=${materialAndPlace.getId()}"
class="layui-btn layui-btn-primary layui-btn-sm"></button>
</button> </button>
</div> </div>
</div> </div>
@ -233,9 +238,7 @@
// 用于更改同一仓库下的库位 // 用于更改同一仓库下的库位
changePlaceCode = function (obj) { changePlaceCode = function (obj) {
var depositoryId = $("#depositoryId").val(); var id = $("#id").val();
var placeCode = $(obj).attr("code");
var mid = $("#id").val();
// 当前点击行中的计量单位按钮 // 当前点击行中的计量单位按钮
let unit = $("#unit").val(); let unit = $("#unit").val();
if (unit === -1 || unit === "-1") { if (unit === -1 || unit === "-1") {
@ -248,7 +251,7 @@
maxmin: true, maxmin: true,
shadeClose: true, shadeClose: true,
area: ['70%', '70%'], area: ['70%', '70%'],
content: '/selectPlaceByDepository?depositoryId=' + depositoryId + '&mid=' + mid + '&placeCode=' + placeCode + '&unit=' + unit, content: '/selectPlaceByDepository?id=' + id + '&unit=' + unit,
success: function (layero, index) { success: function (layero, index) {
var children = layero.children(); var children = layero.children();
var content = $(children[1]); var content = $(children[1]);

5
target/classes/templates/pages/material/material-view.html

@ -60,7 +60,7 @@
<label class="layui-form-label">存货编码</label> <label class="layui-form-label">存货编码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" th:value="${record.getCode()}" name="code" required lay-verify="required" id="code" <input type="text" th:value="${record.getCode()}" name="code" required lay-verify="required" id="code"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input" readonly>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
@ -318,9 +318,6 @@
}) })
} }
$('body').on('click', '[data-refresh]', function () {
location.reload();
})
}); });
</script> </script>

Loading…
Cancel
Save