feat(order): 修改订单管理功能- 更新应用配置,设置文件上传路径为 D:\ruoyi\uploadPath
- 禁用验证码功能 - 修改订单编辑页面,增加部门树选择功能 - 更新订单信息查询 SQL,调整关联查询字段 - 修改订单列表导入模板 - 重构订单信息保存逻辑,简化操作流程master
parent
f81830743d
commit
c08f357069
|
@ -9,7 +9,7 @@ ruoyi:
|
|||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: ruoyi/uploadPath
|
||||
profile: D:\ruoyi\uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
|
||||
|
@ -98,7 +98,7 @@ shiro:
|
|||
# 首页地址
|
||||
indexUrl: /index
|
||||
# 验证码开关
|
||||
captchaEnabled: true
|
||||
captchaEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
captchaType: math
|
||||
cookie:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('发货清单列表')" />
|
||||
</head>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-edit" th:object="${orderInfo}">
|
||||
<input name="orderDept" type="hidden" th:field="*{orderDept}" id="treeId"/>
|
||||
<h4 class="form-header h4">合同档案信息</h4>
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="col-xs-6">
|
||||
|
@ -85,17 +86,25 @@
|
|||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">代表处编码:</label>
|
||||
<label class="col-sm-4 control-label is-required">代表处:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderDept" th:field="*{orderDept}" class="form-control" type="text" required>
|
||||
<!-- <input name="orderDept" th:field="*{orderDept}" class="form-control" type="text" required>-->
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="orderDeptName" onclick="selectDeptTree()" id="treeName" th:field="*{orderDeptName}" required>
|
||||
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">代理商编码:</label>
|
||||
<label class="col-sm-4 control-label is-required">代理商:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="partenerDept" th:field="*{partenerDept}" class="form-control" type="text" required>
|
||||
<input name="partenerDept" type="hidden" th:field="*{partenerDept}" id="treeId1" class="form-control" required>
|
||||
<input class="form-control" type="text" name="orderDeptName" onclick="selectDeptTreePartener()" id="treeName1" th:field="*{partenerDeptName}" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -143,7 +152,42 @@
|
|||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
function selectDeptTree() {
|
||||
var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
|
||||
console.log(deptId)
|
||||
var url = ctx + "system/user/selectDeptTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
function doSubmit(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
function selectDeptTreePartener() {
|
||||
var deptId = $.common.isEmpty($("#treeId1").val()) ? "100" : $("#treeId1").val();
|
||||
console.log(deptId)
|
||||
var url = ctx + "system/user/selectDeptTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmitPartener
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
function doSubmitPartener(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId1").val(body.find('#treeId').val());
|
||||
$("#treeName1").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
$("input[name='orderDate']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
|
|
@ -76,26 +76,28 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
@Override
|
||||
public int updateOrderInfo(OrderInfo orderInfo)
|
||||
{
|
||||
List<OrderList> orderListList = orderInfo.getOrderListList();
|
||||
Map<String, List<OrderList>> operateMap =
|
||||
orderListList.stream().collect(Collectors.groupingBy(OrderList::getOperateFlag));
|
||||
//新增
|
||||
List<OrderList> addList = operateMap.get("0");
|
||||
if (addList!=null && !addList.isEmpty()){
|
||||
orderInfoMapper.batchOrderList(addList);
|
||||
}
|
||||
//更新
|
||||
List<OrderList> updateList = operateMap.get("1");
|
||||
if (updateList!=null && !updateList.isEmpty()){
|
||||
|
||||
orderInfoMapper.updateListBatch(updateList);
|
||||
}
|
||||
//删除
|
||||
List<OrderList> deleteList = operateMap.get("2");
|
||||
if (deleteList!=null && !deleteList.isEmpty()){
|
||||
|
||||
orderInfoMapper.logicRemoveListById(deleteList);
|
||||
}
|
||||
// List<OrderList> orderListList = orderInfo.getOrderListList();
|
||||
// Map<String, List<OrderList>> operateMap =
|
||||
// orderListList.stream().collect(Collectors.groupingBy(OrderList::getOperateFlag));
|
||||
// //新增
|
||||
// List<OrderList> addList = operateMap.get("0");
|
||||
// if (addList!=null && !addList.isEmpty()){
|
||||
// orderInfoMapper.batchOrderList(addList);
|
||||
// }
|
||||
// //更新
|
||||
// List<OrderList> updateList = operateMap.get("1");
|
||||
// if (updateList!=null && !updateList.isEmpty()){
|
||||
//
|
||||
// orderInfoMapper.updateListBatch(updateList);
|
||||
// }
|
||||
// //删除
|
||||
// List<OrderList> deleteList = operateMap.get("2");
|
||||
// if (deleteList!=null && !deleteList.isEmpty()){
|
||||
//
|
||||
// orderInfoMapper.logicRemoveListById(deleteList);
|
||||
// }
|
||||
orderInfoMapper.deleteOrderListByOrderId(orderInfo.getId());
|
||||
insertOrderList(orderInfo);
|
||||
return orderInfoMapper.updateOrderInfo(orderInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -96,11 +96,11 @@
|
|||
t1.created_at,
|
||||
t1. updated_at,
|
||||
t1.deleted_at,
|
||||
t2.dept_name,
|
||||
t3.dept_name
|
||||
t2.dept_name as order_dept_name,
|
||||
t3.dept_name as partener_dept_name
|
||||
from order_info t1
|
||||
left join sys_dept t2 on t1.order_dept = t2.dept_id
|
||||
left join sys_dept t3 on t1.partener_dept = t2.dept_id
|
||||
left join sys_dept t3 on t1.partener_dept = t3.dept_id
|
||||
where t1.id = #{id}
|
||||
</select>
|
||||
|
||||
|
@ -245,11 +245,10 @@
|
|||
</delete>
|
||||
|
||||
<insert id="batchOrderList">
|
||||
insert into order_list( id, order_id, product_code, quantity, price, amount, remark, created_at, updated_at,
|
||||
deleted_at) values
|
||||
insert into order_list( id, order_id, product_code, quantity, price, amount, remark, created_at, updated_at) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.orderId}, #{item.productCode}, #{item.quantity}, #{item.price}, #{item.amount},
|
||||
#{item.remark}, #{item.createdAt}, #{item.updatedAt}, #{item.deletedAt})
|
||||
#{item.remark}, now(),now())
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
|
Loading…
Reference in New Issue