Browse Source

修改:仓库库存查询,修改库存信息中仓库名字段修改为仓库名下拉列表。下列列表选择完成后需要把对弈仓库名中的仓库ID

修改:仓库库存盘点,修改库存信息中仓库名字段修改为仓库名下拉列表。修改库存信息中仓库名字段修改为仓库名下拉列表。下列列表选择完成后需要把对弈仓库名中的仓库ID。新增页面添加仓库盘点人默认为当前登录账号的登录名。
dev
zhangsiqi 3 months ago
parent
commit
1d4ce029e2
  1. 139
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html
  2. 113
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/detail.html
  3. 142
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/edit.html
  4. 2
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/add.html
  5. 8
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html
  6. 21
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html
  7. 118
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html

139
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html

@ -10,21 +10,24 @@
<div class="form-group">
<label class="col-sm-3 control-label">库存盘点人名:</label>
<div class="col-sm-8">
<input name="inventoryCheckName" class="form-control" type="text">
<input name="inventoryCheckName" class="form-control" type="text" readonly />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库</label>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称</label>
<div class="col-sm-8">
<input name="warehouseCode" class="form-control" type="text">
<select id="stockName" name="warehouseName" class="form-control">
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称</label>
<label class="col-sm-3 control-label">仓库</label>
<div class="col-sm-8">
<input name="warehouseName" class="form-control" type="text">
<input id="stockNO" name="warehouseCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">库存盘点日期:</label>
<div class="col-sm-8">
@ -64,10 +67,9 @@
<!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "warehouse/inventoryCheck"
$("#form-inventoryCheck-add").validate({
focusCleanup: true
});
$("#form-inventoryCheck-add").validate({focusCleanup: true});
$("input[name='inventoryCheckDate']").datetimepicker({
format: "yyyy-mm-dd",
@ -143,58 +145,19 @@
showRefresh:false,
showSearch:false,
singleSelect:true,
columns: [{
checkbox: false
},
{
title: '库存盘点详情ID',
field: 'inventoryCheckDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '盘点数量',
field: 'inventoryCheckNum',
editable:true
},
{
title: '当时库存账上数量',
field: 'inventoryAccountNum',
editable:true
},
{
title: '存放地址',
field: 'warehouseStoreAddress',
editable:true
},
{
title: '批号',
field: 'batchNumber',
editable:true
},
{
title: '说明',
field: 'remark',
editable:true
},
{
title: '操作',
align: 'center',
columns: [
{checkbox: false},
{title: '库存盘点详情ID', field: 'inventoryCheckDetailId', visible: false},
{title: '料号', field: 'materialNo',},
{title: '物料名称', field: 'materialName',},
{title: '物料单位', field: 'materialUnit',},
{title: '物料描述', field: 'materialDescribe',},
{title: '盘点数量', field: 'inventoryCheckNum', editable:true},
{title: '当时库存账上数量', field: 'inventoryAccountNum', editable:true},
{title: '存放地址', field: 'warehouseStoreAddress', editable:true},
{title: '批号', field: 'batchNumber', editable:true},
{title: '说明', field: 'remark', editable:true},
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> ');
@ -204,9 +167,10 @@
]
};
$.table.init(options);
loadWarehouseCodes();
$("input[name='inventoryCheckName']").value(loginName);
})
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
@ -231,13 +195,54 @@
// 逻辑删除前端的一行数据
function removeRow(materialNo){
$("#bootstrap-table").bootstrapTable('remove', {
field: 'materialNo',
values: materialNo
})
$("#bootstrap-table").bootstrapTable('remove', {field: 'materialNo', values: materialNo})
}
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockName").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择一个料号",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
data: function(params) {
return {
q: params.term, // 搜索关键词
page: params.page || 1 ,// 当前页码
// 其他参数
pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {
id: data[i].stockName,
text: data[i].stockName,
title: data[i].stockNO
};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {
more: moreDataAvaliable // 是否还有更多数据
}
};
}
}
});
}
$('#stockName').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.title);
});
</script>
</body>
</html>

113
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/detail.html

@ -21,15 +21,17 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库</label>
<label class="col-sm-3 control-label">仓库名称</label>
<div class="col-sm-8">
<input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" disabled>
<select id="stockName" name="warehouseName" class="form-control" th:field="*{warehouseName}" disabled />
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称</label>
<label class="col-sm-3 control-label">仓库</label>
<div class="col-sm-8">
<input name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text" disabled>
<input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" disabled/>
</div>
</div>
<div class="form-group">
@ -147,53 +149,22 @@
showRefresh:false,
showSearch:false,
singleSelect:true,
columns: [{
checkbox: false
},
{
title: '库存盘点详情ID',
field: 'inventoryCheckDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '盘点数量',
field: 'inventoryCheckNum',
},
{
title: '当时库存账上数量',
field: 'inventoryAccountNum',
},
{
title: '存放地址',
field: 'warehouseStoreAddress',
},
{
title: '批号',
field: 'batchNumber',
},
{
title: '说明',
field: 'remark',
},
columns: [
{checkbox: false},
{title: '库存盘点详情ID', field: 'inventoryCheckDetailId', visible: false},
{title: '料号', field: 'materialNo',},
{title: '物料名称', field: 'materialName',},
{title: '物料单位', field: 'materialUnit',},
{title: '物料描述', field: 'materialDescribe',},
{title: '盘点数量', field: 'inventoryCheckNum',},
{title: '当时库存账上数量', field: 'inventoryAccountNum',},
{title: '存放地址', field: 'warehouseStoreAddress',},
{title: '批号', field: 'batchNumber',},
{title: '说明', field: 'remark',},
]
};
$.table.init(options);
loadWarehouseCodes();
})
function queryParams(params) {
@ -235,7 +206,51 @@
values: materialNo
})
}
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockName").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择一个料号",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
data: function(params) {
return {
q: params.term, // 搜索关键词
page: params.page || 1 ,// 当前页码
// 其他参数
pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {
id: data[i].stockName,
text: data[i].stockName,
title: data[i].stockNO
};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {
more: moreDataAvaliable // 是否还有更多数据
}
};
}
}
});
}
$('#stockName').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.title);
});
</script>
</body>

142
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/edit.html

@ -3,6 +3,7 @@
<head>
<th:block th:include="include :: header('修改仓库库存盘点')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -20,16 +21,18 @@
<input name="inventoryCheckName" th:field="*{inventoryCheckName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库</label>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称</label>
<div class="col-sm-8">
<input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text">
<select id="stockName" name="warehouseName" class="form-control" th:field="*{warehouseName}" />
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称</label>
<label class="col-sm-3 control-label">仓库</label>
<div class="col-sm-8">
<input name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text">
<input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" />
</div>
</div>
<div class="form-group">
@ -70,21 +73,17 @@
<th:block th:include="include :: datetimepicker-js" />
<!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "warehouse/inventoryCheck";
var warehouseInventoryCheck = [[${warehouseInventoryCheck}]];
$("#form-inventoryCheck-edit").validate({
focusCleanup: true
});
$("#form-inventoryCheck-edit").validate({focusCleanup: true});
$("input[name='inventoryCheckDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
// 新增提交
function submitHandler() {
// 获取表单数据
@ -129,9 +128,6 @@
$.operate.saveJson(prefix + "/edit", jsonData);
}
//添加物料信息
function insertRow() {
var url = ctx + 'warehouse/inventoryCheck/materialSelect';
@ -155,58 +151,19 @@
showRefresh:false,
showSearch:false,
singleSelect:true,
columns: [{
checkbox: false
},
{
title: '库存盘点详情ID',
field: 'inventoryCheckDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '盘点数量',
field: 'inventoryCheckNum',
editable:true
},
{
title: '当时库存账上数量',
field: 'inventoryAccountNum',
editable:true
},
{
title: '存放地址',
field: 'warehouseStoreAddress',
editable:true
},
{
title: '批号',
field: 'batchNumber',
editable:true
},
{
title: '说明',
field: 'remark',
editable:true
},
{
title: '操作',
align: 'center',
columns: [
{checkbox: false},
{title: '库存盘点详情ID', field: 'inventoryCheckDetailId', visible: false},
{title: '料号', field: 'materialNo',},
{title: '物料名称', field: 'materialName',},
{title: '物料单位', field: 'materialUnit',},
{title: '物料描述', field: 'materialDescribe',},
{title: '盘点数量', field: 'inventoryCheckNum', editable:true},
{title: '当时库存账上数量', field: 'inventoryAccountNum', editable:true},
{title: '存放地址', field: 'warehouseStoreAddress', editable:true},
{title: '批号', field: 'batchNumber', editable:true},
{title: '说明', field: 'remark', editable:true},
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> ');
@ -216,6 +173,7 @@
]
};
$.table.init(options);
loadWarehouseCodes();
})
function queryParams(params) {
@ -226,8 +184,6 @@
console.log(curParams);
return curParams;
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
@ -249,7 +205,6 @@
})
layer.close(index);
}
// 逻辑删除前端的一行数据
function removeRow(materialNo){
$("#bootstrap-table").bootstrapTable('remove', {
@ -257,7 +212,52 @@
values: materialNo
})
}
// 加载仓库Id列表函数
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockName").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择一个料号",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
data: function(params) {
return {
q: params.term, // 搜索关键词
page: params.page || 1 ,// 当前页码
// 其他参数
pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {
id: data[i].stockName,
text: data[i].stockName,
title: data[i].stockNO
};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {
more: moreDataAvaliable // 是否还有更多数据
}
};
}
}
});
}
$('#stockName').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.title);
});
</script>
</body>

2
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/add.html

@ -124,12 +124,12 @@
$("#form-inventoryInquiry-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-inventoryInquiry-add').serialize());
}
}
</script>
</body>
</html>

8
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html

@ -33,7 +33,13 @@
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<input name="materialType" th:field="*{materialType}" class="form-control" type="text" disabled>
<select id="selectMaterialType" name="materialType"
class="form-control m-b select2-multiple"
th:with="childList=${@category.getChildByCode('materialType')}" required disabled>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}" th:field="*{materialType}"></option>
</optgroup>
</select>
</div>
</div>
</form>

21
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html

@ -69,6 +69,13 @@
updateUrl: prefix + "/edit/{id}",
exportUrl: prefix + "/export",
modalName: "仓库库存查询",
height: $(window).height() - 200,
modalWidth: 1200,
fixedColumns:true,
fixedNumber: 1,
fixedRightNumber: 1,
search: false,
showExport: true,
columns: [
{checkbox: true},
{title: '库存查询id', field: 'inventoryInquiryId', visible: false},
@ -114,13 +121,13 @@
{title: '录入人', field: 'createBy',},
{title: '更新人', field: 'updateBy',},
{title: '上次更新时间', field: 'updateTime',},
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inventoryInquiryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
return actions.join('');
}
}
// {title: '操作', align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inventoryInquiryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// return actions.join('');
// }
// }
]
};
$.table.init(options);

118
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html

@ -3,6 +3,7 @@
<head>
<th:block th:include="include :: header('新增仓库库存报损')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -15,10 +16,19 @@
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">关联生产单号</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">申请部门</label>
<div class="col-sm-8">
<input name="makeNo" class="form-control" type="text">
<input name="applyDept" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="applyTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
@ -30,55 +40,46 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请部门:</label>
<div class="col-sm-8">
<input name="applyDept" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="form-group" id="makeNoInput">
<label class="col-sm-3 control-label is-required">关联生产单号:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="applyTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
<input name="makeNo" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input name="materialNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">物料数合计:</label>
<div class="col-sm-8">
<input name="materialTotal" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">数量合计:</label>
<div class="col-sm-8">
<input name="numTotal" class="form-control" type="text">
</div>
</div>
<div class="form-group">
</div> -->
<div class="form-group is-required">
<label class="col-sm-3 control-label">仓库ID:</label>
<div class="col-sm-8">
<input name="warehouseCode" class="form-control" type="text">
<select id="stockNoSelct" name="warehouseCode" class="form-control" required></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<label class="col-sm-3 control-label is-required">仓库名称:</label>
<div class="col-sm-8">
<input name="warehouseName" class="form-control" type="text">
<input name="warehouseName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@ -97,23 +98,84 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var prefix = ctx + "warehouse/inventoryReportDamage"
$("#form-inventoryReportDamage-add").validate({
focusCleanup: true
});
$("#form-inventoryReportDamage-add").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-inventoryReportDamage-add').serialize());
}
}
$(function () {
loadWarehouseCodes();
changeWhetherMakeNo();
});
//单选改变是否关联生产单号显示关联生产单号输入框
$("input[name='whetherMakeNo']").change(function () {
changeWhetherMakeNo();
});
//根据是否关联生产单号显示关联生产单号输入框
function changeWhetherMakeNo() {
$("#makeNoInput").display = function () {
var whetherMakeNo = $("input[name='whetherMakeNo']:checked").val();
if (whetherMakeNo == 1) {
$("#makeNoInput").show();
} else {
$("#makeNoInput").hide();
}
};
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockNoSelct").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
delay:250,
timeout: 10000, // 设置超时时间为10秒
cache:true,
data: function(params) {
return {
q: params.term, // 搜索关键词
// 当前页码
page: params.page || 1 , pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {id: data[i].stockName, text: data[i].stockName,};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {more: moreDataAvaliable,},
};
},
escapeMarkup: function (markup) { return markup; },
minimumInputLength: 1
}
});
}
$('#stockNoSelct').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.stockNO);
$("input[name='warehouseStoreAddress']").val(data.stockAddress);
});
</script>
</body>
</html>
Loading…
Cancel
Save