Browse Source

添加库存查询可以查看详情功能

lwx_dev
erdanergou 3 years ago
parent
commit
202e311aaa
  1. 33
      src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java
  2. 9
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  3. 5
      src/main/java/com/dreamchaser/depository_manage/entity/Inventory.java
  4. 2
      src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
  5. 1
      src/main/java/com/dreamchaser/depository_manage/pojo/InventoryP.java
  6. 14
      src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java
  7. 5796
      src/main/resources/static/lib/layui-v2.6.3/css/layui.css
  8. 2
      src/main/resources/templates/pages/application/application-out_back.html
  9. 4
      src/main/resources/templates/pages/applicationForStorageCenter/application-out.html
  10. 80
      src/main/resources/templates/pages/applicationForStorageCenter/application-out_back.html
  11. 142
      src/main/resources/templates/pages/depository/Inventory-view.html
  12. 36
      src/main/resources/templates/pages/depository/table-stock.html
  13. 2
      src/main/resources/templates/pages/material/material-out.html
  14. 2
      target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
  15. 5796
      target/classes/static/lib/layui-v2.6.3/css/layui.css
  16. 2
      target/classes/templates/pages/application/application-out_back.html
  17. 4
      target/classes/templates/pages/applicationForStorageCenter/application-out.html
  18. 80
      target/classes/templates/pages/applicationForStorageCenter/application-out_back.html
  19. 36
      target/classes/templates/pages/depository/table-stock.html
  20. 2
      target/classes/templates/pages/material/material-out.html

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

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
/** /**
@ -1970,6 +1971,38 @@ public class MaterialController {
} }
@PostMapping("/findSplitInventoryByUnit")
public RestResponse findSplitInventoryByUnit(@RequestBody Map<String,Object> map){
if(map.containsKey("id")){
// 获取当前的计量单位
String unit = (String) map.get("unit");
// 获取当前库存id
Integer id = ObjectFormatUtil.toInteger(map.get("id"));
// 获取库存记录
Inventory inventory = materialService.findInventoryById(id);
if("-1".equals(unit)){
return new RestResponse((double)(inventory.getQuantity() / 100));
}else{
Map<String,Object> paramForSplitInfoStringObjectMap = new HashMap<>();
paramForSplitInfoStringObjectMap.put("mid",inventory.getMid());
paramForSplitInfoStringObjectMap.put("newUnit",unit);
SplitInfo splitInfoByMidAndUnit = splitUnitService.findSplitInfoByMidAndUnit(paramForSplitInfoStringObjectMap);
List<PlaceP> placeByMidAndDid = placeService.findPlaceByMidAndDid(inventory.getId(), inventory.getDepositoryId());
double allInventory = 0.0;
for (PlaceP placeP:placeByMidAndDid
) {
MaterialAndPlace placeAndMaterialByMidAndPid = placeService.findPlaceAndMaterialByMidAndPid(placeP.getId(), inventory.getId());
allInventory += splitUnitService.findAllInventoryForSplitInfo(-1, placeAndMaterialByMidAndPid, splitInfoByMidAndUnit.getId(), 0, true);
}
return new RestResponse(allInventory);
}
}else{
throw new MyException("缺少必要参数");
}
}
@GetMapping("/findMaterialByConditionForStockTaking") @GetMapping("/findMaterialByConditionForStockTaking")
public RestResponse findMaterialByConditionForStockTaking(@RequestParam Map<String, Object> map, HttpServletRequest request) { public RestResponse findMaterialByConditionForStockTaking(@RequestParam Map<String, Object> map, HttpServletRequest request) {

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

@ -1012,7 +1012,12 @@ public class PageController {
mv.setViewName("pages/depository/Inventory-view"); mv.setViewName("pages/depository/Inventory-view");
Inventory inventoryById = materialService.findInventoryById(id); Inventory inventoryById = materialService.findInventoryById(id);
if (inventoryById != null) { if (inventoryById != null) {
mv.addObject("record",inventoryById); InventoryP inventory = new InventoryP(inventoryById);
List<PlaceP> placeByMidAndDid = placeService.findPlaceByMidAndDid(inventoryById.getId(), inventory.getDepositoryId());
inventory.setPlacePList(placeByMidAndDid);
List<SplitInfo> splitInfoByMid = splitUnitService.findSplitInfoByMid(inventoryById.getMid());
inventory.setSplitInfoList(splitInfoByMid);
mv.addObject("record",inventory);
return mv; return mv;
} else { } else {
throw new MyException("缺少必要参数"); throw new MyException("缺少必要参数");
@ -2789,7 +2794,7 @@ public class PageController {
mv.addObject("materialList", materialList); mv.addObject("materialList", materialList);
mv.setViewName("pages/application/application-out_scanQrCode"); mv.setViewName("pages/application/application-out_scanQrCode");
if (Integer.compare(userByPort.getMaindeparment(), 361) == 0) { if (Integer.compare(userByPort.getMaindeparment(), 361) == 0) {
mv.setViewName("pages/applicationForStorageCenter/application-out"); mv.setViewName("pages/applicationForStorageCenter/application-out_scanQrCode");
} }
return mv; return mv;
} }

5
src/main/java/com/dreamchaser/depository_manage/entity/Inventory.java

@ -99,6 +99,11 @@ public class Inventory {
*/ */
private String depositoryCode; private String depositoryCode;
/**
* 仓库名称
*/
private String depositoryName;
/** /**
* 库位编码 * 库位编码
*/ */

2
src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml

@ -34,6 +34,7 @@
<id column="id" property="id" jdbcType="INTEGER"/> <id column="id" property="id" jdbcType="INTEGER"/>
<result column="mid" property="mid" jdbcType="INTEGER"/> <result column="mid" property="mid" jdbcType="INTEGER"/>
<result column="depositoryId" property="depositoryId" jdbcType="INTEGER"/> <result column="depositoryId" property="depositoryId" jdbcType="INTEGER"/>
<result column="dname" property="depositoryName" jdbcType="INTEGER"/>
<result column="mname" property="mname" jdbcType="VARCHAR"/> <result column="mname" property="mname" jdbcType="VARCHAR"/>
<result column="quantity" property="quantity" jdbcType="VARCHAR"/> <result column="quantity" property="quantity" jdbcType="VARCHAR"/>
<result column="price" property="price" jdbcType="INTEGER"/> <result column="price" property="price" jdbcType="INTEGER"/>
@ -49,6 +50,7 @@
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/> <result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/>
<result column="brand" property="brand" jdbcType="VARCHAR"/> <result column="brand" property="brand" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/> <result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tname" property="typeName" jdbcType="VARCHAR"/>
<result column="numberOfTemporary" property="numberOfTemporary" jdbcType="INTEGER"/> <result column="numberOfTemporary" property="numberOfTemporary" jdbcType="INTEGER"/>
</resultMap> </resultMap>

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

@ -242,6 +242,7 @@ public class InventoryP {
this.numberOfTemporary = inventory.getNumberOfTemporary(); // 临时数量(出库数量) this.numberOfTemporary = inventory.getNumberOfTemporary(); // 临时数量(出库数量)
this.baseUnit = inventory.getUnit(); // 基础单位 this.baseUnit = inventory.getUnit(); // 基础单位
this.placeKingdeeCode = inventory.getPlaceKingdeeCode(); // 库位编码(金蝶) this.placeKingdeeCode = inventory.getPlaceKingdeeCode(); // 库位编码(金蝶)
this.depositoryName = inventory.getDepositoryName(); // 仓库名称
} }
public InventoryP() { public InventoryP() {

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

@ -469,14 +469,14 @@ public class MaterialServiceImpl implements MaterialService {
*/ */
@Override @Override
public Inventory findInventoryById(int id) { public Inventory findInventoryById(int id) {
Inventory material = materialMapper.findInventoryById(id); Inventory inventoryById = materialMapper.findInventoryById(id);
if (material.getPrice() != null) { if (inventoryById.getPrice() != null) {
material.setPrice(material.getPrice() / 100); inventoryById.setPrice(inventoryById.getPrice() / 100);
} else { } else {
material.setPrice(0.0); inventoryById.setPrice(0.0);
} }
material.setAmounts(material.getPrice() * material.getQuantity()); inventoryById.setAmounts(inventoryById.getPrice() * inventoryById.getQuantity());
return material; return inventoryById;
} }
/** /**
@ -846,8 +846,6 @@ public class MaterialServiceImpl implements MaterialService {
unit = splitInfo.getNewUnit(); unit = splitInfo.getNewUnit();
} }
// }
} }
// 设置新总额 // 设置新总额
m.setAmounts(m.getAmounts() + amounts); m.setAmounts(m.getAmounts() + amounts);

5796
src/main/resources/static/lib/layui-v2.6.3/css/layui.css

File diff suppressed because one or more lines are too long

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

@ -82,7 +82,7 @@
<label class="layui-form-label">计量单位:</label> <label class="layui-form-label">计量单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<select id="unit" name="unit"> <select id="unit" name="unit">
<option value="-1" th:text="${materialById.getUnit()}"></option> <option value="-1" th:text="${materialById.getBaseUnit()}"></option>
<option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}" <option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}"
th:value="${splitInfo?.getNewUnit()}" th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option> th:text="${splitInfo?.getNewUnit()}"></option>

4
src/main/resources/templates/pages/applicationForStorageCenter/application-out.html

@ -177,7 +177,7 @@
<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-block"> <div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project" <input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/> class="layui-input"/>
</div> </div>
</div> </div>
@ -316,7 +316,7 @@
<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-block"> <div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project" <input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/> class="layui-input"/>
</div> </div>
</div> </div>

80
src/main/resources/templates/pages/applicationForStorageCenter/application-out_back.html

@ -44,7 +44,55 @@
<div> <div>
<form class="layui-form layui-form-pane" <form class="layui-form layui-form-pane"
style="margin: 0 auto;max-width: 460px;padding-top: 40px;"> style="margin: 0 auto;max-width: 460px;padding-top: 40px;">
<div class="layui-card-body" id="cardItem"> <div class="layui-card-body" id="cardItem">
<div class="layui-form-item">
<label class="layui-form-label">部门:</label>
<div class="layui-input-block">
<input type="text" placeholder="请选择部门" class="layui-input"
readonly
id="openCompanyAdminorg"
onclick="selectPost(this)"
/>
<input type="text" name="adminorgId" class="layui-input"
id="adminorgId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">施工单位:</label>
<div class="layui-input-block">
<input type="text" placeholder="请选择施工单位" class="layui-input"
readonly
id="openConstructionUnit"
onclick="selectConstructionUnit(this)"
/>
<input type="text" name="constructionUnitId" class="layui-input"
id="constructionUnitId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">摘要:</label>
<div class="layui-input-block">
<input name="abstract" placeholder="请填写摘要" value=""
class="layui-input"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">出库类别:</label>
<div class="layui-input-block">
<input name="outType" placeholder="请填写相关原因及申请原因" value=""
class="layui-input"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注说明:</label>
<div class="layui-input-block">
<input name="applyRemark" placeholder="请填写相关原因及申请原因" value=""
class="layui-input"/>
</div>
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label" style="height: 40px;">物料名称:</label> <label class="layui-form-label" style="height: 40px;">物料名称:</label>
<div class="layui-input-block"> <div class="layui-input-block">
@ -82,7 +130,7 @@
<label class="layui-form-label">计量单位:</label> <label class="layui-form-label">计量单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<select id="unit" name="unit"> <select id="unit" name="unit">
<option value="-1" th:text="${materialById.getUnit()}"></option> <option value="-1" th:text="${materialById.getBaseUnit()}"></option>
<option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}" <option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}"
th:value="${splitInfo?.getNewUnit()}" th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option> th:text="${splitInfo?.getNewUnit()}"></option>
@ -90,35 +138,9 @@
</div> </div>
</div> </div>
<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-block">
<input type="text" placeholder="请选择部门" class="layui-input"
readonly
id="openCompanyAdminorg"
onclick="selectPost(this)"
lay-verify="required"/>
<input type="text" name="adminorg" class="layui-input"
id="adminorgId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">施工单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" placeholder="请选择施工单位" class="layui-input" <input name="project" placeholder="请填写相关项目" value=""
readonly
id="openConstructionUnit"
onclick="selectConstructionUnit(this)"
lay-verify="required"/>
<input type="text" name="constructionUnitId" class="layui-input"
id="constructionUnitId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注说明:</label>
<div class="layui-input-block">
<input name="applyRemark" placeholder="请填写相关原因及申请原因" value=""
class="layui-input"/> class="layui-input"/>
</div> </div>
</div> </div>

142
src/main/resources/templates/pages/depository/Inventory-view.html

@ -38,21 +38,22 @@
<form class="layui-form layui-form-pane" action=""> <form class="layui-form layui-form-pane" action="">
<input type="text" id="id" th:value="${record.getId()}" name="id"> <input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none">
<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">
<input type="text" th:value="${record.getMname()}" name="mname" <input type="text" th:value="${record.getCode()}" name="code" id="code"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
<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">
<input type="text" th:value="${record.getCode()}" name="code" <input type="text" th:value="${record.getMname()}" name="mname"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
<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">
@ -72,10 +73,8 @@
<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" placeholder="请选择物料类型" class="layui-input" id="openSonByMateralType" readonly <input type="text" placeholder="请选择物料类型" class="layui-input" id="openSonByMateralType" readonly
th:value="${record.getMaterialType().getTname()}" th:value="${record.getTypeName()}"
lay-verify="required"/> 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> </div>
<div class="layui-form-item"> <div class="layui-form-item">
@ -89,40 +88,70 @@
<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">
<input type="text" th:value="${record.getUnit()}" name="unit" required autocomplete="off" <select id="unit">
<option value="-1" th:text="${record.getUnit()}"></option>
<option th:each="splitInfo,iterStar:${record.getSplitInfoList()}"
th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所处仓库</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getDepositoryName()}" name="depositoryName" required autocomplete="off"
class="layui-input">
<input type="text" id="depositoryId" th:value="${record.getDepositoryId()}" style="display: none">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所处库位</label>
<div class="layui-input-inline">
<button th:each="placeP,iterStar:${record.getPlacePList()}"
th:attr="id=${record.getMid()}" class="layui-btn layui-btn-customize"
onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}"
th:text="${placeP.getKingdeecode()}">
</button>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数量</label>
<div class="layui-input-inline">
<input type="text" th:value="${record.getQuantity()}" name="quantity" required autocomplete="off" id="quantity"
class="layui-input"> class="layui-input">
</div> </div>
</div> </div>
<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">
<input type="text" th:value="${record.getPrice()}" name="price" required autocomplete="off" <input type="text" th:value="${record.getPrice()}" name="price" required autocomplete="off" id="price"
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.getAmounts()}" name="amounts" required autocomplete="off" id="amounts"
class="layui-input"> class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-block"> <div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button> <button class="layui-btn layui-btn-customize" type="button" onclick="applicationIn()">入库申请</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button> <button class="layui-btn layui-btn-customize" type="button" onclick="applicationOut()">出库申请</button>
</div> </div>
</div> </div>
</form> </form>
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> <script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script> <script>
function changeQrCodeState() { function applicationIn(){
}
function createQrCode() {
} }
function checkBarCode() { function applicationOut(){
} }
function print_code() {
}
// 用于标志是否为第一次提交 // 用于标志是否为第一次提交
let flagForForm = false; let flagForForm = false;
@ -131,46 +160,57 @@
layui.use(['form', 'laydate'], function () { layui.use(['form', 'laydate'], function () {
var form = layui.form, laydate = layui.laydate, $ = layui.$; var form = layui.form, laydate = layui.laydate, $ = layui.$;
//提交 //提交
form.on('submit(formDemo)', function (data) {
if (!flagForForm) { form.on('select()', function (data) {
flagForForm = true; var id = data.elem.id; //得到select原始DOM对象id
data = data.field; var req = {};
if (flag) { req.id = $("#id").val();
data.barCodeList = barCode; req.unit = data.value;
}
$.ajax({ $.ajax({
url: "/material/material_edit", url: "/material/findSplitInventoryByUnit",
type: 'post', type: "post",
dataType: 'json', dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
data: JSON.stringify(data), success: function (d) {
beforeSend: function () { $("#quantity").val(d.data)
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; applicationOut = function() {
var index = layer.open({
title: '出库申请',
type: 2,
shade: 0.2,
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/application_out_back?code=' + $("#code").val() + "&depositoryId=" + $("#depositoryId").val()
}); });
$(window).on("resize", function () {
layer.full(index);
});
return false;
}
applicationIn = function () {
var index = layer.open({
title: '入库申请',
type: 2,
shade: 0.2,
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/application_in_back?mid=' + $("#id").val() + "&depositoryId=" +$("#depositoryId").val()
});
$(window).on("resize", function () {
layer.full(index);
}); });
return false;
}
}) ;
</script> </script>
</body> </body>

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

@ -85,6 +85,10 @@
</button> </button>
</script> </script>
<script id="materialCode" type="text/html">
<a id="{{d.id}}" onclick="showDetail(this)">{{d.code}}</a>
</script>
<div id="showImportData" <div id="showImportData"
style="height: 500px;width: 500px;position: absolute;overflow: auto;top: 10%;left: 25%;background: #ffffff;z-index: 1231234;display: none"> style="height: 500px;width: 500px;position: absolute;overflow: auto;top: 10%;left: 25%;background: #ffffff;z-index: 1231234;display: none">
<div onclick="closeShowDataMessage()" style="position: absolute; right: 0; top: 2%; cursor: pointer;"> <div onclick="closeShowDataMessage()" style="position: absolute; right: 0; top: 2%; cursor: pointer;">
@ -113,6 +117,10 @@
} }
function showDetail(){
}
let socket = null; let socket = null;
let newIndexShade; let newIndexShade;
@ -175,10 +183,10 @@
cols: [ cols: [
[ [
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{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: '品牌'},
{field: 'version', width: 200, title: '规格型号'}, {field: 'version', width: 200, title: '规格型号'},
{field: 'code', width: 200, title: '存货编码'},
{field: 'typeName', width: 200, title: '物料类型'}, {field: 'typeName', width: 200, title: '物料类型'},
{title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'}, {field: 'quantity', width: 200, title: '数量'},
@ -631,7 +639,6 @@
closeShowDataMessage = function () { closeShowDataMessage = function () {
console.log(1)
$("#layui-layer-shade-x"+newIndexShade).remove(); $("#layui-layer-shade-x"+newIndexShade).remove();
$("#showImportData").hide(); $("#showImportData").hide();
$("#showDataContent").empty(); $("#showDataContent").empty();
@ -640,6 +647,31 @@
} }
}; };
showDetail = function (obj) {
var index = layer.open({
title: '库存信息详情',
type: 2,
shade: 0.2,
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/InventoryView?id=' + obj.id,
end: function () {
//执行搜索重载
table.reload('currentTableId', {
url: '/material/findInventory',
page: {
curr: 1
}
}, 'data');
}
});
$(window).on("resize", function () {
layer.full(index);
});
return false;
}
}); });
</script> </script>

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

@ -215,7 +215,7 @@
cols: [ cols: [
[ [
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{field: 'code', width: 150, title: '存货编码', sort: true}, {title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 120, title: '物料名称', sort: false}, {field: 'mname', width: 120, title: '物料名称', sort: false},
{field: 'typeName', width: 150, title: '物料种类'}, {field: 'typeName', width: 150, title: '物料种类'},
{field: 'version', width: 200, title: '规格型号', sort: false}, {field: 'version', width: 200, title: '规格型号', sort: false},

2
target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml

@ -34,6 +34,7 @@
<id column="id" property="id" jdbcType="INTEGER"/> <id column="id" property="id" jdbcType="INTEGER"/>
<result column="mid" property="mid" jdbcType="INTEGER"/> <result column="mid" property="mid" jdbcType="INTEGER"/>
<result column="depositoryId" property="depositoryId" jdbcType="INTEGER"/> <result column="depositoryId" property="depositoryId" jdbcType="INTEGER"/>
<result column="dname" property="depositoryName" jdbcType="INTEGER"/>
<result column="mname" property="mname" jdbcType="VARCHAR"/> <result column="mname" property="mname" jdbcType="VARCHAR"/>
<result column="quantity" property="quantity" jdbcType="VARCHAR"/> <result column="quantity" property="quantity" jdbcType="VARCHAR"/>
<result column="price" property="price" jdbcType="INTEGER"/> <result column="price" property="price" jdbcType="INTEGER"/>
@ -49,6 +50,7 @@
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/> <result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/>
<result column="brand" property="brand" jdbcType="VARCHAR"/> <result column="brand" property="brand" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/> <result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tname" property="typeName" jdbcType="VARCHAR"/>
<result column="numberOfTemporary" property="numberOfTemporary" jdbcType="INTEGER"/> <result column="numberOfTemporary" property="numberOfTemporary" jdbcType="INTEGER"/>
</resultMap> </resultMap>

5796
target/classes/static/lib/layui-v2.6.3/css/layui.css

File diff suppressed because one or more lines are too long

2
target/classes/templates/pages/application/application-out_back.html

@ -82,7 +82,7 @@
<label class="layui-form-label">计量单位:</label> <label class="layui-form-label">计量单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<select id="unit" name="unit"> <select id="unit" name="unit">
<option value="-1" th:text="${materialById.getUnit()}"></option> <option value="-1" th:text="${materialById.getBaseUnit()}"></option>
<option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}" <option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}"
th:value="${splitInfo?.getNewUnit()}" th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option> th:text="${splitInfo?.getNewUnit()}"></option>

4
target/classes/templates/pages/applicationForStorageCenter/application-out.html

@ -177,7 +177,7 @@
<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-block"> <div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project" <input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/> class="layui-input"/>
</div> </div>
</div> </div>
@ -316,7 +316,7 @@
<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-block"> <div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project" <input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/> class="layui-input"/>
</div> </div>
</div> </div>

80
target/classes/templates/pages/applicationForStorageCenter/application-out_back.html

@ -44,7 +44,55 @@
<div> <div>
<form class="layui-form layui-form-pane" <form class="layui-form layui-form-pane"
style="margin: 0 auto;max-width: 460px;padding-top: 40px;"> style="margin: 0 auto;max-width: 460px;padding-top: 40px;">
<div class="layui-card-body" id="cardItem"> <div class="layui-card-body" id="cardItem">
<div class="layui-form-item">
<label class="layui-form-label">部门:</label>
<div class="layui-input-block">
<input type="text" placeholder="请选择部门" class="layui-input"
readonly
id="openCompanyAdminorg"
onclick="selectPost(this)"
/>
<input type="text" name="adminorgId" class="layui-input"
id="adminorgId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">施工单位:</label>
<div class="layui-input-block">
<input type="text" placeholder="请选择施工单位" class="layui-input"
readonly
id="openConstructionUnit"
onclick="selectConstructionUnit(this)"
/>
<input type="text" name="constructionUnitId" class="layui-input"
id="constructionUnitId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">摘要:</label>
<div class="layui-input-block">
<input name="abstract" placeholder="请填写摘要" value=""
class="layui-input"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">出库类别:</label>
<div class="layui-input-block">
<input name="outType" placeholder="请填写相关原因及申请原因" value=""
class="layui-input"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注说明:</label>
<div class="layui-input-block">
<input name="applyRemark" placeholder="请填写相关原因及申请原因" value=""
class="layui-input"/>
</div>
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label" style="height: 40px;">物料名称:</label> <label class="layui-form-label" style="height: 40px;">物料名称:</label>
<div class="layui-input-block"> <div class="layui-input-block">
@ -82,7 +130,7 @@
<label class="layui-form-label">计量单位:</label> <label class="layui-form-label">计量单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<select id="unit" name="unit"> <select id="unit" name="unit">
<option value="-1" th:text="${materialById.getUnit()}"></option> <option value="-1" th:text="${materialById.getBaseUnit()}"></option>
<option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}" <option th:each="splitInfo,iterStar:${materialById.getSplitInfoList()}"
th:value="${splitInfo?.getNewUnit()}" th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option> th:text="${splitInfo?.getNewUnit()}"></option>
@ -90,35 +138,9 @@
</div> </div>
</div> </div>
<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-block">
<input type="text" placeholder="请选择部门" class="layui-input"
readonly
id="openCompanyAdminorg"
onclick="selectPost(this)"
lay-verify="required"/>
<input type="text" name="adminorg" class="layui-input"
id="adminorgId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">施工单位:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" placeholder="请选择施工单位" class="layui-input" <input name="project" placeholder="请填写相关项目" value=""
readonly
id="openConstructionUnit"
onclick="selectConstructionUnit(this)"
lay-verify="required"/>
<input type="text" name="constructionUnitId" class="layui-input"
id="constructionUnitId"
style="display: none"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注说明:</label>
<div class="layui-input-block">
<input name="applyRemark" placeholder="请填写相关原因及申请原因" value=""
class="layui-input"/> class="layui-input"/>
</div> </div>
</div> </div>

36
target/classes/templates/pages/depository/table-stock.html

@ -85,6 +85,10 @@
</button> </button>
</script> </script>
<script id="materialCode" type="text/html">
<a id="{{d.id}}" onclick="showDetail(this)">{{d.code}}</a>
</script>
<div id="showImportData" <div id="showImportData"
style="height: 500px;width: 500px;position: absolute;overflow: auto;top: 10%;left: 25%;background: #ffffff;z-index: 1231234;display: none"> style="height: 500px;width: 500px;position: absolute;overflow: auto;top: 10%;left: 25%;background: #ffffff;z-index: 1231234;display: none">
<div onclick="closeShowDataMessage()" style="position: absolute; right: 0; top: 2%; cursor: pointer;"> <div onclick="closeShowDataMessage()" style="position: absolute; right: 0; top: 2%; cursor: pointer;">
@ -113,6 +117,10 @@
} }
function showDetail(){
}
let socket = null; let socket = null;
let newIndexShade; let newIndexShade;
@ -175,10 +183,10 @@
cols: [ cols: [
[ [
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{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: '品牌'},
{field: 'version', width: 200, title: '规格型号'}, {field: 'version', width: 200, title: '规格型号'},
{field: 'code', width: 200, title: '存货编码'},
{field: 'typeName', width: 200, title: '物料类型'}, {field: 'typeName', width: 200, title: '物料类型'},
{title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'}, {field: 'quantity', width: 200, title: '数量'},
@ -631,7 +639,6 @@
closeShowDataMessage = function () { closeShowDataMessage = function () {
console.log(1)
$("#layui-layer-shade-x"+newIndexShade).remove(); $("#layui-layer-shade-x"+newIndexShade).remove();
$("#showImportData").hide(); $("#showImportData").hide();
$("#showDataContent").empty(); $("#showDataContent").empty();
@ -640,6 +647,31 @@
} }
}; };
showDetail = function (obj) {
var index = layer.open({
title: '库存信息详情',
type: 2,
shade: 0.2,
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/InventoryView?id=' + obj.id,
end: function () {
//执行搜索重载
table.reload('currentTableId', {
url: '/material/findInventory',
page: {
curr: 1
}
}, 'data');
}
});
$(window).on("resize", function () {
layer.full(index);
});
return false;
}
}); });
</script> </script>

2
target/classes/templates/pages/material/material-out.html

@ -215,7 +215,7 @@
cols: [ cols: [
[ [
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{field: 'code', width: 150, title: '存货编码', sort: true}, {title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 120, title: '物料名称', sort: false}, {field: 'mname', width: 120, title: '物料名称', sort: false},
{field: 'typeName', width: 150, title: '物料种类'}, {field: 'typeName', width: 150, title: '物料种类'},
{field: 'version', width: 200, title: '规格型号', sort: false}, {field: 'version', width: 200, title: '规格型号', sort: false},

Loading…
Cancel
Save