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. 152
      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 java.io.IOException;
import java.math.BigDecimal;
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")
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");
Inventory inventoryById = materialService.findInventoryById(id);
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;
} else {
throw new MyException("缺少必要参数");
@ -2789,7 +2794,7 @@ public class PageController {
mv.addObject("materialList", materialList);
mv.setViewName("pages/application/application-out_scanQrCode");
if (Integer.compare(userByPort.getMaindeparment(), 361) == 0) {
mv.setViewName("pages/applicationForStorageCenter/application-out");
mv.setViewName("pages/applicationForStorageCenter/application-out_scanQrCode");
}
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 depositoryName;
/**
* 库位编码
*/

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

@ -34,6 +34,7 @@
<id column="id" property="id" jdbcType="INTEGER"/>
<result column="mid" property="mid" 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="quantity" property="quantity" jdbcType="VARCHAR"/>
<result column="price" property="price" jdbcType="INTEGER"/>
@ -49,6 +50,7 @@
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/>
<result column="brand" property="brand" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tname" property="typeName" jdbcType="VARCHAR"/>
<result column="numberOfTemporary" property="numberOfTemporary" jdbcType="INTEGER"/>
</resultMap>

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

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

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

@ -469,14 +469,14 @@ public class MaterialServiceImpl implements MaterialService {
*/
@Override
public Inventory findInventoryById(int id) {
Inventory material = materialMapper.findInventoryById(id);
if (material.getPrice() != null) {
material.setPrice(material.getPrice() / 100);
Inventory inventoryById = materialMapper.findInventoryById(id);
if (inventoryById.getPrice() != null) {
inventoryById.setPrice(inventoryById.getPrice() / 100);
} else {
material.setPrice(0.0);
inventoryById.setPrice(0.0);
}
material.setAmounts(material.getPrice() * material.getQuantity());
return material;
inventoryById.setAmounts(inventoryById.getPrice() * inventoryById.getQuantity());
return inventoryById;
}
/**
@ -846,8 +846,6 @@ public class MaterialServiceImpl implements MaterialService {
unit = splitInfo.getNewUnit();
}
// }
}
// 设置新总额
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>
<div class="layui-input-block">
<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()}"
th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option>

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

@ -177,7 +177,7 @@
<div class="layui-form-item">
<label class="layui-form-label">项目:</label>
<div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project"
<input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/>
</div>
</div>
@ -316,7 +316,7 @@
<div class="layui-form-item">
<label class="layui-form-label">项目:</label>
<div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project"
<input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/>
</div>
</div>

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

@ -44,7 +44,55 @@
<div>
<form class="layui-form layui-form-pane"
style="margin: 0 auto;max-width: 460px;padding-top: 40px;">
<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">
<label class="layui-form-label" style="height: 40px;">物料名称:</label>
<div class="layui-input-block">
@ -82,7 +130,7 @@
<label class="layui-form-label">计量单位:</label>
<div class="layui-input-block">
<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()}"
th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option>
@ -90,35 +138,9 @@
</div>
</div>
<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">
<input type="text" placeholder="请选择施工单位" class="layui-input"
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=""
<input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/>
</div>
</div>

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

@ -38,21 +38,22 @@
<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">
<label class="layui-form-label">物料名称</label>
<label class="layui-form-label">存货编码</label>
<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">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">存货编码</label>
<label class="layui-form-label">物料名称</label>
<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">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">规格型号</label>
<div class="layui-input-inline">
@ -72,10 +73,8 @@
<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()}"
th:value="${record.getTypeName()}"
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">
@ -89,40 +88,70 @@
<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"
<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">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">单价</label>
<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">
</div>
</div>
<div class="layui-form-item">
<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>
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationIn()">入库申请</button>
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationOut()">出库申请</button>
</div>
</div>
</form>
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script>
function changeQrCodeState() {
}
function createQrCode() {
function applicationIn(){
}
function checkBarCode() {
function applicationOut(){
}
function print_code() {
}
// 用于标志是否为第一次提交
let flagForForm = false;
@ -131,46 +160,57 @@
layui.use(['form', 'laydate'], function () {
var form = layui.form, laydate = layui.laydate, $ = layui.$;
//提交
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'
})
}
}
});
}
form.on('select()', function (data) {
var id = data.elem.id; //得到select原始DOM对象id
var req = {};
req.id = $("#id").val();
req.unit = data.value;
$.ajax({
url: "/material/findSplitInventoryByUnit",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
$("#quantity").val(d.data)
}
});
})
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>
</body>

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

@ -85,6 +85,10 @@
</button>
</script>
<script id="materialCode" type="text/html">
<a id="{{d.id}}" onclick="showDetail(this)">{{d.code}}</a>
</script>
<div id="showImportData"
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;">
@ -113,6 +117,10 @@
}
function showDetail(){
}
let socket = null;
let newIndexShade;
@ -175,10 +183,10 @@
cols: [
[
{type: "checkbox", width: 50},
{title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 200, title: '物料名称'},
{field: 'brand', width: 200, title: '品牌'},
{field: 'version', width: 200, title: '规格型号'},
{field: 'code', width: 200, title: '存货编码'},
{field: 'typeName', width: 200, title: '物料类型'},
{title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'},
@ -631,7 +639,6 @@
closeShowDataMessage = function () {
console.log(1)
$("#layui-layer-shade-x"+newIndexShade).remove();
$("#showImportData").hide();
$("#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>

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

@ -215,7 +215,7 @@
cols: [
[
{type: "checkbox", width: 50},
{field: 'code', width: 150, title: '存货编码', sort: true},
{title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 120, title: '物料名称', sort: false},
{field: 'typeName', width: 150, title: '物料种类'},
{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"/>
<result column="mid" property="mid" 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="quantity" property="quantity" jdbcType="VARCHAR"/>
<result column="price" property="price" jdbcType="INTEGER"/>
@ -49,6 +50,7 @@
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/>
<result column="brand" property="brand" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tname" property="typeName" jdbcType="VARCHAR"/>
<result column="numberOfTemporary" property="numberOfTemporary" jdbcType="INTEGER"/>
</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>
<div class="layui-input-block">
<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()}"
th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option>

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

@ -177,7 +177,7 @@
<div class="layui-form-item">
<label class="layui-form-label">项目:</label>
<div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project"
<input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/>
</div>
</div>
@ -316,7 +316,7 @@
<div class="layui-form-item">
<label class="layui-form-label">项目:</label>
<div class="layui-input-block">
<input name="project" placeholder="请填写相关项目" value="" id="project"
<input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/>
</div>
</div>

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

@ -44,7 +44,55 @@
<div>
<form class="layui-form layui-form-pane"
style="margin: 0 auto;max-width: 460px;padding-top: 40px;">
<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">
<label class="layui-form-label" style="height: 40px;">物料名称:</label>
<div class="layui-input-block">
@ -82,7 +130,7 @@
<label class="layui-form-label">计量单位:</label>
<div class="layui-input-block">
<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()}"
th:value="${splitInfo?.getNewUnit()}"
th:text="${splitInfo?.getNewUnit()}"></option>
@ -90,35 +138,9 @@
</div>
</div>
<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">
<input type="text" placeholder="请选择施工单位" class="layui-input"
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=""
<input name="project" placeholder="请填写相关项目" value=""
class="layui-input"/>
</div>
</div>

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

@ -85,6 +85,10 @@
</button>
</script>
<script id="materialCode" type="text/html">
<a id="{{d.id}}" onclick="showDetail(this)">{{d.code}}</a>
</script>
<div id="showImportData"
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;">
@ -113,6 +117,10 @@
}
function showDetail(){
}
let socket = null;
let newIndexShade;
@ -175,10 +183,10 @@
cols: [
[
{type: "checkbox", width: 50},
{title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 200, title: '物料名称'},
{field: 'brand', width: 200, title: '品牌'},
{field: 'version', width: 200, title: '规格型号'},
{field: 'code', width: 200, title: '存货编码'},
{field: 'typeName', width: 200, title: '物料类型'},
{title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'},
@ -631,7 +639,6 @@
closeShowDataMessage = function () {
console.log(1)
$("#layui-layer-shade-x"+newIndexShade).remove();
$("#showImportData").hide();
$("#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>

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

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

Loading…
Cancel
Save