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. 369
      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) { private int buildAftersalesOutOrder(WarehouseOutOrder warehouseOutOrder) {
String outOrderCode = warehouseOutOrder.getOutOrderCode();
WarehouseOutOrder newWarehouseOutOrder = warehouseOutOrderMapper.selectWarehouseOutOrderByCode(outOrderCode);
AftersalesOutOrder aftersalesOutOrder = new AftersalesOutOrder(); AftersalesOutOrder aftersalesOutOrder = new AftersalesOutOrder();
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
warehouseOutOrder.setCreateBy(loginName); newWarehouseOutOrder.setCreateBy(loginName);
warehouseOutOrder.setCreateTime(new Date()); newWarehouseOutOrder.setCreateTime(new Date());
//更改出库状态为 第一次维护设备信息 //更改出库状态为 第一次维护设备信息
warehouseOutOrder.setWarehouseOutStatus("1"); newWarehouseOutOrder.setWarehouseOutStatus("1");
BeanUtils.copyProperties(warehouseOutOrder,aftersalesOutOrder); BeanUtils.copyProperties(newWarehouseOutOrder,aftersalesOutOrder);
return aftersalesOutOrderMapper.insertAftersalesOutOrder(aftersalesOutOrder); return aftersalesOutOrderMapper.insertAftersalesOutOrder(aftersalesOutOrder);
} }

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

@ -4,92 +4,81 @@
<th:block th:include="include :: header('售后维护设备出库列表')" /> <th:block th:include="include :: header('售后维护设备出库列表')" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="formId"> <form id="formId">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>出库单号:</label> <label>出库单号:</label>
<input type="text" name="outOrderCode"/> <input type="text" name="outOrderCode"/>
</li> </li>
<li> <li>
<label>出库状态:</label> <label>出库状态:</label>
<select name="warehouseOutStatus" th:with="type=${@dict.getType('warehouse_out_status')}"> <select name="warehouseOutStatus" th:with="type=${@dict.getType('warehouse_out_status')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li> <li>
<label>关联订单号:</label> <label>关联订单号:</label>
<input type="text" name="relatedOrderCode"/> <input type="text" name="relatedOrderCode"/>
</li> </li>
<li> <li>
<label>出库订单类型:</label> <label>申请人员:</label>
<select name="warehouseOrderType" th:with="type=${@dict.getType('warehouse_order_type')}"> <input type="text" name="applyName"/>
<option value="">所有</option> </li>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <li>
</select> <label>仓库员:</label>
</li> <input type="text" name="warehouseName"/>
<li> </li>
<label>出库类型:</label> <li>
<select name="warehouseOutType" th:with="type=${@dict.getType('warehouse_out_type')}"> <label>订单类型:</label>
<option value="">所有</option> <select name="warehouseOrderType" th:with="type=${@dict.getType('warehouse_order_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option value="">所有</option>
</select> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</li> </select>
<li> </li>
<label>仓库人员:</label> <li class="select-time">
<input type="text" name="warehouseName"/> <label>录入时间:</label>
</li> <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<li> <span>-</span>
<label>申请人:</label> <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
<input type="text" name="applyName"/> </li>
</li> <li>
<li class="select-time"> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<label>录入时间:</label> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> </li>
<span>-</span> </ul>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> </div>
</li> </form>
<li> </div>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <div class="col-sm-12 select-table table-striped">
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <table id="bootstrap-table"></table>
</li>
</ul>
</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> </div>
</div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:edit')}]]; var editFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:remove')}]]; var removeFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:remove')}]];
var cancelFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:cancel')}]]; var cancelFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:restore')}]]; 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 warehouseOutStatusDatas = [[${@dict.getType('warehouse_out_status')}]];
var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]]; var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]];
var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]]; var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]];
var prefix = ctx + "aftersales/aftersalesOutOrder"; var prefix = ctx + "aftersales/aftersalesOutOrder";
$(function() { $(function() {
@ -97,127 +86,127 @@
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "售后维护设备出库", modalName: "售后维护设备出库",
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{ {
title: '售后维护设备出库单Id', title: '出库单Id',
field: 'outOrderId', field: 'outOrderId',
visible: false visible: false
}, },
{ {
title: '出库单号', title: '出库单号',
field: 'outOrderCode', field: 'outOrderCode',
}, },
{ {
title: '出库状态', title: '出库状态',
field: 'warehouseOutStatus', field: 'warehouseOutStatus',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOutStatusDatas, value); return $.table.selectDictLabel(warehouseOutStatusDatas, value);
} }
}, },
{ {
title: '关联订单号', title: '关联订单号',
field: 'relatedOrderCode', field: 'relatedOrderCode',
}, formatter: function(value, row, index) {
{ return $.table.tooltip(value, 5, "open");
title: '出库订单类型', }
field: 'warehouseOrderType', },
formatter: function(value, row, index) { {
return $.table.selectDictLabel(warehouseOrderTypeDatas, value); title: '订单类型',
} field: 'warehouseOrderType',
}, formatter: function(value, row, index) {
{ return $.table.selectDictLabel(warehouseOrderTypeDatas, value);
title: '出库类型', }
field: 'warehouseOutType', },
formatter: function(value, row, index) { {
return $.table.selectDictLabel(warehouseOutTypeDatas, value); title: '业务人',
} field: 'businessName',
}, },
{ {
title: '业务人员', title: '物料合计',
field: 'businessName', field: 'materialSum',
}, },
{ {
title: '售后人员', title: '数量合计',
field: 'aftersalesName', field: 'enterpriseSum',
}, },
{ {
title: '仓库人员', title: '计划交付时间',
field: 'warehouseName', field: 'planDeliveryTime',
}, },
{ {
title: '物料数合计', title: '交付条件',
field: 'materialSum', field: 'deliveryCondition',
}, formatter: function(value, row, index) {
{ return $.table.tooltip(value, 5, "open");
title: '数量合计', }
field: 'enterpriseSum', },
}, {
{ title: '联系人',
title: '出库时间', field: 'deliveryName',
field: 'outOrderTime', },
}, {
{ title: '联系电话',
title: '计划交付时间', field: 'deliveryNumber',
field: 'planDeliveryTime', },
}, {
{ title: '收货地址',
title: '交付条件', field: 'deliveryAddress',
field: 'deliveryCondition', formatter: function(value, row, index) {
}, return $.table.tooltip(value, 5, "open");
{ }
title: '申请人', },
field: 'applyName', {
}, title: '录入时间',
{ field: 'createTime',
title: '收货地址', },
field: 'deliveryAddress', {
}, title: '出库时间',
{ field: 'outOrderTime',
title: '收货联系人', },
field: 'deliveryName', {
}, title: '仓库员',
{ field: 'warehouseName',
title: '收货电话', },
field: 'deliveryNumber', {
}, title: '售后员',
{ field: 'aftersalesName',
title: '录入人', },
field: 'createBy', {
}, title: '更新人',
{ field: 'updateBy',
title: '录入时间', },
field: 'createTime', {
}, title: '上次更新时间',
{ field: 'updateTime',
title: '更新人', },
field: 'updateBy', {
}, title: '操作',
{ align: 'center',
title: '上次更新时间', formatter: function(value, row, index) {
field: 'updateTime', 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=" ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
title: '操作', if (row.warehouseOutStatus== "1"){
align: 'center', actions.push('<a class="' + maintenanceEquipmentOneFlag + '" href="javascript:void(0)" onclick="maintenanceEquipmentOne(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>维护设备1</a> ');
formatter: function(value, row, index) { }
var actions = []; if (row.warehouseOutStatus== "3"){
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="' + maintenanceEquipmentTwoFlag + '" href="javascript:void(0)" onclick="maintenanceEquipmentTwo(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>维护设备2</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'){ if (row.warehouseOutStatus=="7"){
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> '); actions.push('<a class="' + confirmReceivingGoodsFlag + '" href="javascript:void(0)" onclick="confirmReceivingGoods(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></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> '); // 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);
} }
return actions.join(''); }]
}
}]
}; };
$.table.init(options); $.table.init(options);
}); });

Loading…
Cancel
Save