Browse Source

[feat] 售后管理

按照新版prd,新增售后维护设备出库前端列表,并且修改列表页面表头的按钮,按钮采用统一样式;修改操作栏按钮样式样式统一,操作栏引用$.table.dropdownToggle方法;去掉多余的列表展示字段;交付条件、收货地址、关联订单号字段加上tooltip方法,超过5个字符隐藏部分内容
修改生成售后出库单后端方法,存入售后维护设备出库的值来自后端查找的值
dev
liuxiaoxu 3 weeks ago
parent
commit
318753b8c9
  1. 11
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java
  2. 139
      ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/aftersalesOutOrder.html

11
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java

@ -309,14 +309,17 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
//生成售后出库单
private int buildAftersalesOutOrder(WarehouseOutOrder warehouseOutOrder) {
String outOrderCode = warehouseOutOrder.getOutOrderCode();
WarehouseOutOrder newWarehouseOutOrder = warehouseOutOrderMapper.selectWarehouseOutOrderByCode(outOrderCode);
AftersalesOutOrder aftersalesOutOrder = new AftersalesOutOrder();
String loginName = ShiroUtils.getLoginName();
warehouseOutOrder.setCreateBy(loginName);
warehouseOutOrder.setCreateTime(new Date());
newWarehouseOutOrder.setCreateBy(loginName);
newWarehouseOutOrder.setCreateTime(new Date());
//更改出库状态为 第一次维护设备信息
warehouseOutOrder.setWarehouseOutStatus("1");
BeanUtils.copyProperties(warehouseOutOrder,aftersalesOutOrder);
newWarehouseOutOrder.setWarehouseOutStatus("1");
BeanUtils.copyProperties(newWarehouseOutOrder,aftersalesOutOrder);
return aftersalesOutOrderMapper.insertAftersalesOutOrder(aftersalesOutOrder);
}

139
ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/aftersalesOutOrder.html

@ -4,7 +4,7 @@
<th:block th:include="include :: header('售后维护设备出库列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
@ -26,26 +26,19 @@
<input type="text" name="relatedOrderCode"/>
</li>
<li>
<label>出库订单类型:</label>
<select name="warehouseOrderType" th:with="type=${@dict.getType('warehouse_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="warehouseOutType" th:with="type=${@dict.getType('warehouse_out_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
<label>申请人员:</label>
<input type="text" name="applyName"/>
</li>
<li>
<label>仓库员:</label>
<label>仓库员:</label>
<input type="text" name="warehouseName"/>
</li>
<li>
<label>申请人:</label>
<input type="text" name="applyName"/>
<label>订单类型:</label>
<select name="warehouseOrderType" th:with="type=${@dict.getType('warehouse_order_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>
@ -61,35 +54,31 @@
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="aftersales:aftersalesOutOrder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="aftersales:aftersalesOutOrder:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="aftersales:aftersalesOutOrder:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="aftersales:aftersalesOutOrder: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>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:remove')}]];
var cancelFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:restore')}]];
var maintenanceEquipmentOneFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:maintenanceEquipmentOne')}]];
var maintenanceEquipmentTwoFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:maintenanceEquipmentTwo')}]];
var confirmReceivingGoodsFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:confirmReceivingGoods')}]];
var confirmCheckGoodsFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:confirmCheckGoods')}]];
var warehouseOutStatusDatas = [[${@dict.getType('warehouse_out_status')}]];
var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]];
var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]];
var prefix = ctx + "aftersales/aftersalesOutOrder";
$(function() {
@ -97,16 +86,13 @@
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: "售后维护设备出库",
columns: [{
checkbox: true
},
{
title: '售后维护设备出库单Id',
title: '出库单Id',
field: 'outOrderId',
visible: false
},
@ -124,45 +110,29 @@
{
title: '关联订单号',
field: 'relatedOrderCode',
},
{
title: '出库订单类型',
field: 'warehouseOrderType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOrderTypeDatas, value);
return $.table.tooltip(value, 5, "open");
}
},
{
title: '出库类型',
field: 'warehouseOutType',
title: '订单类型',
field: 'warehouseOrderType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOutTypeDatas, value);
return $.table.selectDictLabel(warehouseOrderTypeDatas, value);
}
},
{
title: '业务人',
title: '业务人',
field: 'businessName',
},
{
title: '售后人员',
field: 'aftersalesName',
},
{
title: '仓库人员',
field: 'warehouseName',
},
{
title: '物料数合计',
title: '物料合计',
field: 'materialSum',
},
{
title: '数量合计',
field: 'enterpriseSum',
},
{
title: '出库时间',
field: 'outOrderTime',
},
{
title: '计划交付时间',
field: 'planDeliveryTime',
@ -170,30 +140,40 @@
{
title: '交付条件',
field: 'deliveryCondition',
formatter: function(value, row, index) {
return $.table.tooltip(value, 5, "open");
}
},
{
title: '申请人',
field: 'applyName',
title: '联系人',
field: 'deliveryName',
},
{
title: '联系电话',
field: 'deliveryNumber',
},
{
title: '收货地址',
field: 'deliveryAddress',
formatter: function(value, row, index) {
return $.table.tooltip(value, 5, "open");
}
},
{
title: '收货联系人',
field: 'deliveryName',
title: '录入时间',
field: 'createTime',
},
{
title: '收货电话',
field: 'deliveryNumber',
title: '出库时间',
field: 'outOrderTime',
},
{
title: '录入人',
field: 'createBy',
title: '仓库员',
field: 'warehouseName',
},
{
title: '录入时间',
field: 'createTime',
title: '售后员',
field: 'aftersalesName',
},
{
title: '更新人',
@ -208,14 +188,23 @@
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.outOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.outOrderId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
//actions.push('<a class=" ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
if (row.warehouseOutStatus== "1"){
actions.push('<a class="' + maintenanceEquipmentOneFlag + '" href="javascript:void(0)" onclick="maintenanceEquipmentOne(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>维护设备1</a> ');
}
return actions.join('');
if (row.warehouseOutStatus== "3"){
actions.push('<a class="' + maintenanceEquipmentTwoFlag + '" href="javascript:void(0)" onclick="maintenanceEquipmentTwo(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>维护设备2</a> ');
}
if (row.warehouseOutStatus=="7"){
actions.push('<a class="' + confirmReceivingGoodsFlag + '" href="javascript:void(0)" onclick="confirmReceivingGoods(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>确认收货</a> ');
}
// if (row.warehouseOutStatus=="10"){
// actions.push('<a class="btn btn-success btn-xs ' + confirmCheckGoodsFlag + '" href="javascript:void(0)" onclick="confirmCheckGoods(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>确认验收</a> ');
// }
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}]
};

Loading…
Cancel
Save