|
@ -3,6 +3,7 @@ |
|
|
<head> |
|
|
<head> |
|
|
<th:block th:include="include :: header('修改仓库库存盘点')" /> |
|
|
<th:block th:include="include :: header('修改仓库库存盘点')" /> |
|
|
<th:block th:include="include :: datetimepicker-css" /> |
|
|
<th:block th:include="include :: datetimepicker-css" /> |
|
|
|
|
|
<th:block th:include="include :: select2-css" /> |
|
|
</head> |
|
|
</head> |
|
|
<body class="white-bg"> |
|
|
<body class="white-bg"> |
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
@ -21,15 +22,17 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<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"> |
|
|
<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> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<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"> |
|
|
<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> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
@ -70,21 +73,17 @@ |
|
|
<th:block th:include="include :: datetimepicker-js" /> |
|
|
<th:block th:include="include :: datetimepicker-js" /> |
|
|
<!--用于可以修改列表字段的插件--> |
|
|
<!--用于可以修改列表字段的插件--> |
|
|
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|
|
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|
|
|
|
|
<th:block th:include="include :: select2-js" /> |
|
|
<script th:inline="javascript"> |
|
|
<script th:inline="javascript"> |
|
|
|
|
|
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; |
|
|
var prefix = ctx + "warehouse/inventoryCheck"; |
|
|
var prefix = ctx + "warehouse/inventoryCheck"; |
|
|
|
|
|
|
|
|
var warehouseInventoryCheck = [[${warehouseInventoryCheck}]]; |
|
|
var warehouseInventoryCheck = [[${warehouseInventoryCheck}]]; |
|
|
|
|
|
$("#form-inventoryCheck-edit").validate({focusCleanup: true}); |
|
|
$("#form-inventoryCheck-edit").validate({ |
|
|
|
|
|
focusCleanup: true |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$("input[name='inventoryCheckDate']").datetimepicker({ |
|
|
$("input[name='inventoryCheckDate']").datetimepicker({ |
|
|
format: "yyyy-mm-dd", |
|
|
format: "yyyy-mm-dd", |
|
|
minView: "month", |
|
|
minView: "month", |
|
|
autoclose: true |
|
|
autoclose: true |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// 新增提交 |
|
|
// 新增提交 |
|
|
function submitHandler() { |
|
|
function submitHandler() { |
|
|
// 获取表单数据 |
|
|
// 获取表单数据 |
|
@ -129,9 +128,6 @@ |
|
|
$.operate.saveJson(prefix + "/edit", jsonData); |
|
|
$.operate.saveJson(prefix + "/edit", jsonData); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加物料信息 |
|
|
//添加物料信息 |
|
|
function insertRow() { |
|
|
function insertRow() { |
|
|
var url = ctx + 'warehouse/inventoryCheck/materialSelect'; |
|
|
var url = ctx + 'warehouse/inventoryCheck/materialSelect'; |
|
@ -155,58 +151,19 @@ |
|
|
showRefresh:false, |
|
|
showRefresh:false, |
|
|
showSearch:false, |
|
|
showSearch:false, |
|
|
singleSelect:true, |
|
|
singleSelect:true, |
|
|
columns: [{ |
|
|
columns: [ |
|
|
checkbox: false |
|
|
{checkbox: false}, |
|
|
}, |
|
|
{title: '库存盘点详情ID', field: 'inventoryCheckDetailId', visible: false}, |
|
|
{ |
|
|
{title: '料号', field: 'materialNo',}, |
|
|
title: '库存盘点详情ID', |
|
|
{title: '物料名称', field: 'materialName',}, |
|
|
field: 'inventoryCheckDetailId', |
|
|
{title: '物料单位', field: 'materialUnit',}, |
|
|
visible: false |
|
|
{title: '物料描述', field: 'materialDescribe',}, |
|
|
}, |
|
|
{title: '盘点数量', field: 'inventoryCheckNum', editable:true}, |
|
|
{ |
|
|
{title: '当时库存账上数量', field: 'inventoryAccountNum', editable:true}, |
|
|
title: '料号', |
|
|
{title: '存放地址', field: 'warehouseStoreAddress', editable:true}, |
|
|
field: 'materialNo', |
|
|
{title: '批号', field: 'batchNumber', editable:true}, |
|
|
}, |
|
|
{title: '说明', field: 'remark', editable:true}, |
|
|
{ |
|
|
{title: '操作', align: 'center', |
|
|
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) { |
|
|
formatter: function(value, row, index) { |
|
|
var actions = []; |
|
|
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> '); |
|
|
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); |
|
|
$.table.init(options); |
|
|
|
|
|
loadWarehouseCodes(); |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
function queryParams(params) { |
|
|
function queryParams(params) { |
|
@ -226,8 +184,6 @@ |
|
|
console.log(curParams); |
|
|
console.log(curParams); |
|
|
return curParams; |
|
|
return curParams; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function doSubmit(index, layero,uniqueId){ |
|
|
function doSubmit(index, layero,uniqueId){ |
|
|
console.log(uniqueId); |
|
|
console.log(uniqueId); |
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|
@ -249,7 +205,6 @@ |
|
|
}) |
|
|
}) |
|
|
layer.close(index); |
|
|
layer.close(index); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 逻辑删除前端的一行数据 |
|
|
// 逻辑删除前端的一行数据 |
|
|
function removeRow(materialNo){ |
|
|
function removeRow(materialNo){ |
|
|
$("#bootstrap-table").bootstrapTable('remove', { |
|
|
$("#bootstrap-table").bootstrapTable('remove', { |
|
@ -257,7 +212,52 @@ |
|
|
values: materialNo |
|
|
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> |
|
|
</script> |
|
|
</body> |
|
|
</body> |
|
|