Browse Source
采购入库前端页面新增purchaseOrderId作为隐藏字段;新增submitHandler方法:实现被选择的物料才可以入库,如果入库物料中同时包含仓库入库和采购入库,提示需要分开入库;采购入库单子表新增 purchaseOrderChildId、materialPhotourl、warehouseDept、设置通知到货数如果暂收数等于实际采购数或者实际采购数等于通知已到货数显示不可编辑,否则可编辑;并且通知到货数不能为空、只能为数、不能为小数、不能小于0 采购订单实体类 warehouseStorageStatus和仓库保持一致;新增notifyHasArrivedSum,mapper.xml所有方法加上notifyHasArrivedSum字段 采购订单Controller新增 新增采购入库通知单后端接口 采购订单impl层新增: 创建采购入库单方法、新增 生成采购入库单子表方法、新增 生成采购入库单主表方法、新增 生成仓库入库单方法、新增 生成仓库入库单子表方法、新增 更新采购订单子表方法;如果通知已到货数等于实际采购总数,则设置采购订单为全部入库,否则为部分入库,只有不为全部入库之前可以一直发起入库 采购入库单子表新增 批量新增采购入库单子表方法 仓库入库单实体类所有状态类型加上字典属性 仓库入库单详情加上物料型号字段,mapper.xml所有方法加上物料型号字段 仓库入库单详情新增 批量插入仓库入库详情数据方法 按照prd调整,新增仓库入库单前端列表页面dev
liuxiaoxu
4 days ago
14 changed files with 937 additions and 217 deletions
@ -1,196 +1,276 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('采购入库通知单列表')" /> |
|||
<th:block th:include="include :: header('采购入库单列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>入库单号:</label> |
|||
<input type="text" name="warehouseStorageCode"/> |
|||
</li> |
|||
<li> |
|||
<label>入库状态:</label> |
|||
<select name="warehouseStorageStatus" th:with="type=${@dict.getType('warehouse_storage_status')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>品质状态:</label> |
|||
<select name="warehouseQualityStatus" th:with="type=${@dict.getType('warehouse_quality_status')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>关联订单号:</label> |
|||
<input type="text" name="relatedOrderCode"/> |
|||
</li> |
|||
|
|||
<li> |
|||
<label>仓库员:</label> |
|||
<input type="text" name="warehouseEmployee"/> |
|||
</li> |
|||
<li> |
|||
<label>入库部门:</label> |
|||
<select name="warehouseDeptType" th:with="type=${@dict.getType('warehouse_dept_type')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li class="select-time"> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>入库单号:</label> |
|||
<input type="text" name="warehouseStorageCode"/> |
|||
</li> |
|||
<li> |
|||
<label>关联订单号:</label> |
|||
<input type="text" name="relatedOrderCode"/> |
|||
</li> |
|||
<li> |
|||
<label>入库状态:</label> |
|||
<select name="warehouseStorageStatus" th:with="type=${@dict.getType('warehouse_storage_status')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>品质状态:</label> |
|||
<select name="warehouseQualityStatus" th:with="type=${@dict.getType('warehouse_quality_status')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>入库类型:</label> |
|||
<select name="warehouseStorageType" th:with="type=${@dict.getType('warehouse_storage_type')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>订单类型:</label> |
|||
<select name="warehouseOrderType" th:with="type=${@dict.getType('storage_order_type')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>入库部门类型:</label> |
|||
<select name="warehouseDeptType" th:with="type=${@dict.getType('warehouse_dept_type')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>供应商ID:</label> |
|||
<input type="text" name="supplierCode"/> |
|||
</li> |
|||
<li> |
|||
<label>供应商名称:</label> |
|||
<input type="text" name="supplierName"/> |
|||
</li> |
|||
<li class="select-time"> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseStorage:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseStorage:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:purchaseStorage:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:purchaseStorage:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseStorage:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('purchase:purchaseStorage:edit')}]]; |
|||
var detailFlag = [[${@permission.hasPermi('purchase:purchaseStorage:detail')}]]; |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('purchase:purchaseStorage:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('purchase:purchaseStorage:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('purchase:purchaseStorage:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('purchase:purchaseStorage:restore')}]]; |
|||
var warehouseStorageStatusDatas = [[${@dict.getType('warehouse_storage_status')}]]; |
|||
var warehouseQualityStatusDatas = [[${@dict.getType('warehouse_quality_status')}]]; |
|||
var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]]; |
|||
var warehouseOrderTypeDatas = [[${@dict.getType('storage_order_type')}]]; |
|||
var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; |
|||
var prefix = ctx + "purchase/purchaseStorage"; |
|||
|
|||
|
|||
// var storageStatusDatas = [[${@dict.getType('eceiptStatus')}]]; |
|||
// var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]]; |
|||
// var purchaseStorageTypeDatas = [[${@dict.getType('purchase_storage_type')}]]; |
|||
// var purchaseOrderTypeDatas = [[${@dict.getType('sys_order_type')}]]; |
|||
// var purchaseDeptTypeDatas = [[${@dict.getType('warehouseDept')}]]; |
|||
var warehouseStorageStatusDatas = [[${@dict.getType('warehouse_storage_status')}]]; |
|||
var warehouseQualityStatusDatas = [[${@dict.getType('warehouse_quality_status')}]]; |
|||
var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]]; |
|||
var warehouseOrderTypeDatas = [[${@dict.getType('storage_order_type')}]]; |
|||
var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; |
|||
var prefix = ctx + "purchase/purchaseStorage"; |
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "采购入库通知单", |
|||
fixedColumns: true, // 启用冻结列 |
|||
fixedRightNumber: 1, // 冻结右列个数 |
|||
columns: [ |
|||
{checkbox: true}, |
|||
{title: '入库单id',field: 'warehouseStorageId',visible: false}, |
|||
{title: '入库单号',field: 'warehouseStorageCode',}, |
|||
{title: '关联订单号',field: 'relatedOrderCode',}, |
|||
{ |
|||
title: '入库状态', |
|||
field: 'warehouseStorageStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseStorageStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '品质状态', |
|||
field: 'warehouseQualityStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseQualityStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '入库类型', |
|||
field: 'warehouseStorageType', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseStorageTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '订单类型', |
|||
field: 'warehouseOrderType', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseOrderTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '入库部门', |
|||
field: 'warehouseDeptType', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseDeptTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '通知已到货数', |
|||
field: 'notifyHasArrivedNum', |
|||
}, |
|||
{ |
|||
title: '通知到货数', |
|||
field: 'notifyArriveNum', |
|||
}, |
|||
|
|||
{title: '实际已到货数量',field: 'actualArrivedNum',}, |
|||
{title: '暂收合格数量',field: 'temporaryQualifiedNum',}, |
|||
{title: '暂收不合格数量',field: 'temporaryUnqualifiedNum',}, |
|||
{title: '品质合格数量',field: 'qualityQualifiedNum',}, |
|||
{title: '入库数量',field: 'storageNum',}, |
|||
{title: '到货时间',field: 'arrivedTime',}, |
|||
{title: '暂收时间',field: 'temporaryTime',}, |
|||
{title: '交检时间',field: 'deliveryInspectionTime',}, |
|||
{title: '品质时间',field: 'qualityTime',}, |
|||
{title: '入库时间',field: 'storageTime',}, |
|||
{ |
|||
title: '仓库员', |
|||
field: 'warehouseEmployee', |
|||
}, |
|||
{ |
|||
title: '仓库ID', |
|||
field: 'warehouseCode', |
|||
}, |
|||
{ |
|||
title: '仓库名称', |
|||
field: 'warehouseName', |
|||
}, |
|||
{title: '录入时间',field: 'createTime',}, |
|||
{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 ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.warehouseStorageId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|||
return actions.join(''); |
|||
} |
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "采购入库单", |
|||
fixedColumns: true, // 启用冻结列 |
|||
fixedRightNumber: 1, // 冻结右列个数 |
|||
sortable: true, // 是否启用排序 |
|||
sortStable: true, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '采购入库单id', |
|||
field: 'purchaseStorageId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '入库单号', |
|||
field: 'warehouseStorageCode', |
|||
}, |
|||
{ |
|||
title: '关联订单号', |
|||
field: 'relatedOrderCode', |
|||
}, |
|||
{ |
|||
title: '入库状态', |
|||
field: 'warehouseStorageStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseStorageStatusDatas, value); |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
/*详情*/ |
|||
function detail(warehouseStorageId){ |
|||
var url = ctx + 'purchase/purchaseStorage/detail/' + warehouseStorageId; |
|||
$.modal.open("详情",url); |
|||
}, |
|||
{ |
|||
title: '品质状态', |
|||
field: 'warehouseQualityStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseQualityStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '入库类型', |
|||
field: 'warehouseStorageType', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseStorageTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '订单类型', |
|||
field: 'warehouseOrderType', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseOrderTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '入库部门类型', |
|||
field: 'warehouseDeptType', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehouseDeptTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '供应商ID', |
|||
field: 'supplierCode', |
|||
}, |
|||
{ |
|||
title: '供应商名称', |
|||
field: 'supplierName', |
|||
}, |
|||
{ |
|||
title: '通知已到货数量', |
|||
field: 'notifyArrivedSum', |
|||
}, |
|||
{ |
|||
title: '实际已到货数量', |
|||
field: 'actualArrivedSum', |
|||
}, |
|||
{ |
|||
title: '暂收合格数量', |
|||
field: 'temporaryQualifiedSum', |
|||
}, |
|||
{ |
|||
title: '暂收不合格数量', |
|||
field: 'temporaryUnqualifiedSum', |
|||
}, |
|||
{ |
|||
title: '品质合格数量', |
|||
field: 'qualityQualifiedSum', |
|||
}, |
|||
{ |
|||
title: '退换货数', |
|||
field: 'refundsExchangesSum', |
|||
}, |
|||
{ |
|||
title: '入库数量', |
|||
field: 'storageSum', |
|||
}, |
|||
{ |
|||
title: '到货时间', |
|||
field: 'arrivedTime', |
|||
}, |
|||
{ |
|||
title: '暂收时间', |
|||
field: 'temporaryTime', |
|||
}, |
|||
{ |
|||
title: '交付质检时间', |
|||
field: 'deliveryInspectionTime', |
|||
}, |
|||
{ |
|||
title: '品质时间', |
|||
field: 'qualityTime', |
|||
}, |
|||
{ |
|||
title: '入库时间', |
|||
field: 'storageTime', |
|||
}, |
|||
{ |
|||
title: '仓库员工', |
|||
field: 'warehouseEmployee', |
|||
}, |
|||
{ |
|||
title: '仓库ID', |
|||
field: 'warehouseCode', |
|||
}, |
|||
{ |
|||
title: '仓库名称', |
|||
field: 'warehouseName', |
|||
}, |
|||
{ |
|||
title: '录入时间', |
|||
field: 'createTime', |
|||
sortable: true |
|||
}, |
|||
{ |
|||
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.purchaseStorageId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
var actionLinks = actions.join(''); |
|||
return $.table.dropdownToggle(actionLinks); |
|||
} |
|||
}] |
|||
}; |
|||
|
|||
</script> |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue