Browse Source

[fix]

委外加工 委外订单
修改添加委外订单页面显示样式;
新增结案页面数据显示结构;
修改委外订单列表页面搜索栏字段定义,新增结案按钮跳转方法;
修改委外订单mapper列表查询方法;
新增委外订单结案页面跳转controller接口;
dev
王晓迪 2 months ago
parent
commit
b6e63a0714
  1. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/OutsourceOrderController.java
  2. 20
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/OutsourceOrder.java
  3. 15
      ruoyi-admin/src/main/resources/mapper/system/OutsourceOrderMapper.xml
  4. 24
      ruoyi-admin/src/main/resources/templates/system/outsource_order/closed.html
  5. 59
      ruoyi-admin/src/main/resources/templates/system/outsource_order/outsource_order.html
  6. 11
      ruoyi-admin/src/main/resources/templates/system/outsource_plan/addOutsourceOrder.html

11
ruoyi-admin/src/main/java/com/ruoyi/system/controller/OutsourceOrderController.java

@ -315,4 +315,15 @@ public class OutsourceOrderController extends BaseController
outsourceOrderService.restoreOutsourceOrderById(id);
return AjaxResult.success();
}
/**
* 结案
*/
@GetMapping("/closed/{outsourceOrderNo}")
public String closed(@PathVariable("outsourceOrderNo") String outsourceOrderNo, ModelMap mmap)
{
List<OutsourceOrderVO> outsourceOrderVO = outsourceOrderService.selectOutsourceOrderByOutsourceOrderNo(outsourceOrderNo);
mmap.put("outsourceOrder", outsourceOrderVO.get(0));
return prefix + "/closed";
}
}

20
ruoyi-admin/src/main/java/com/ruoyi/system/domain/OutsourceOrder.java

@ -111,6 +111,10 @@ public class OutsourceOrder extends BaseEntity
@Excel(name = "详细地址")
private String receiveAddress;
private String supplierCode;
private String supplierName;
/** 流程实例ID */
private String instanceId;
@ -474,6 +478,22 @@ public class OutsourceOrder extends BaseEntity
this.cancelRemark = cancelRemark;
}
public String getSupplierCode() {
return supplierCode;
}
public void setSupplierCode(String supplierCode) {
this.supplierCode = supplierCode;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

15
ruoyi-admin/src/main/resources/mapper/system/OutsourceOrderMapper.xml

@ -10,6 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="outsourcePlanCode" column="outsource_plan_code" />
<result property="outsourceStaff" column="outsource_staff" />
<result property="supplierAmount" column="supplier_amount" />
<result property="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_name" />
<result property="materialAmount" column="material_amount" />
<result property="outsourceMaterialAmount" column="outsource_material_amount" />
<result property="outsourceProcessType" column="outsource_process_type" />
@ -90,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select outsource_order_id, outsource_order_no, outsource_plan_code, outsource_staff, supplier_amount,
material_amount, outsource_material_amount, outsource_process_type, outsource_process_amount, outsource_total_price,
outsource_no_price, create_by, create_time, update_by, update_time, use_status, receive_status, warehouse_status, closed_status,
remit_status, audit_status, actual_material_amount, actual_process_amount, stock_no, stock_name, receive_person, receive_telephone,
remit_status, audit_status, actual_material_amount, actual_process_amount, stock_no, stock_name, receive_person, receive_telephone,supplier_code, supplier_name,
receive_address,instance_id, instance_type, submit_instance_id, apply_title, apply_time, apply_user, cancel_instance_id, restore_instance_id, cancel_remark
from outsource_order
</sql>
@ -98,10 +100,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectOutsourceOrderList" parameterType="OutsourceOrderVO" resultMap="OutsourceOrderResult">
<include refid="selectOutsourceOrderVo"/>
<where>
<if test="outsourceOrderNo != null and outsourceOrderNo != ''"> and outsource_order_no = #{outsourceOrderNo}</if>
<if test="outsourceOrderNo != null and outsourceOrderNo != ''"> and outsource_order_no like concat('%', #{outsourceOrderNo}, '%')</if>
<if test="outsourceStaff != null and outsourceStaff != ''"> and outsource_staff = #{outsourceStaff}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="supplierCode != null and supplierCode != ''">
and outsource_order_no in ( select outsource_order_no from outsource_order_detail where supplier_code = #{supplierCode})
</if>
<if test="supplierName != null and supplierName != ''">
and outsource_order_no in ( select outsource_order_no from outsource_order_detail where supplier_name = #{supplierName})
</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
<if test="receiveStatus != null and receiveStatus != ''"> and receive_status = #{receiveStatus}</if>
<if test="warehouseStatus != null and warehouseStatus != ''"> and warehouse_status = #{warehouseStatus}</if>

24
ruoyi-admin/src/main/resources/templates/system/outsource_order/closed.html

@ -7,17 +7,19 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-outsource_order_closed" th:object="${outsourceOrder}">
<input name="outsourceOrderId" th:field="*{outsourceOrderId}" type="hidden">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外单号:</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${outsourceOrder.outsourceOrderCode}"></div>
<div class="col-sm-6">
<input class="form-control" name="outsourceOrderCode" th:field="*{outsourceOrderNo}">
</div>
</div>
</div>
<h5>已选择供应商:</h5>
<div class="form-group">
<div class="col-sm-12 table-striped">
</div>
<div class="col-sm-8" style="padding-left: 80px;">
<h5>已选择供应商:</h5>
</div>
<div class="col-xs-8 table-striped" style="padding-left: 80px;">
<table id="bootstrap-table"></table>
</div>
@ -26,14 +28,20 @@
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/outsource_order";
$("#form-outsource_process-edit").validate({
$("#outsource_order_closed").validate({
focusCleanup: true,
});
var outsourceOrder = [[${outsourceOrder}]];
$(function() {
// console.log(outsourceOrder);
var options = {
data: [[${outsourceOrder.outsourceOrderDetailList}]],
pagination: false,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
columns: [
{
field: 'supplierCode',

59
ruoyi-admin/src/main/resources/templates/system/outsource_order/outsource_order.html

@ -19,16 +19,46 @@
<input type="text" name="outsourceStaff"/>
</li>
<li>
<label>录入人</label>
<input type="text" name="createBy"/>
<label>供应商代码</label>
<input name="supplierCode" type="text"/>
</li>
<li>
<label>录入时间</label>
<input type="text" class="time-input" placeholder="请选择录入时间" name="createTime"/>
<label>供应商名称</label>
<input type="text" name="supplierName"/>
</li>
<li>
<label>实际委外物料合计:</label>
<input type="text" name="actualMaterialAmount"/>
<label>审核状态:</label>
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>使用状态:</label>
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>收货状态:</label>
<select name="eceiptStatus" th:with="type=${@dict.getType('quality_delivery_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="paymentStatus" th:with="type=${@dict.getType('sys_pay_close')}">
<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>&nbsp;搜索</a>
@ -46,7 +76,7 @@
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:outsource_order:export">-->
<!-- <i class="fa fa-download"></i> 导出合同-->
<!-- </a>-->
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:outsource_order:add">
<a class="btn btn-success" onclick="closedOrder()" shiro:hasPermission="system:outsource_order:add">
<i class="fa fa-plus"></i> 结案
</a>
</div>
@ -68,7 +98,7 @@
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var receiveStatusDatas = [[${@dict.getType('quality_delivery_status')}]];
var remitStatusDatas = [[${@dict.getType('sys_close_status')}]];
var closedStatusDatas = [[${@dict.getType('sys_close_status')}]];
var closedStatusDatas = [[${@dict.getType('sys_pay_close')}]];
var prefix = ctx + "system/outsource_order";
@ -82,9 +112,6 @@
$.modal.open("新增委外入库单", prefix + "/addStorage/" + outsourceOrderNo)
}
$(function() {
function addRequisition(outsourceOrderNo) {
$.modal.open("新增委外领料单", prefix + "/addRequisition/" + outsourceOrderNo);
}
var options = {
url: prefix + "/list",
@ -367,6 +394,16 @@
$.modal.open("作废", url);
})
}
function closedOrder(){
let data = $("#bootstrap-table").bootstrapTable("getSelections");
if(data.length === 1){
var url = prefix + "/closed/" + data[0].outsourceOrderNo;
$.modal.open("结案", url);
}else {
$.modal.alertError("请选择一条订单数据")
return;
}
}
</script>
</body>
</html>

11
ruoyi-admin/src/main/resources/templates/system/outsource_plan/addOutsourceOrder.html

@ -236,7 +236,7 @@
var $MaterialNumDiv =
$('<div class="col-xs-10" style="height: 60px">' +
'<div class="form-group">' +
'<div class="col-sm-3" style="padding: 0px; padding-top: 15px; padding-left: 15px">' +
'<div class="col-sm-3" style="padding: 0px; padding-top: 15px; padding-left: 5px">' +
'<h3>' +
'<label for="outMaterialNum" style="color: blue;" class="control-label is-required">实际委外数:</label>' +
'</h3>' +
@ -283,7 +283,7 @@
'</div>' +
'<div class="col-xs-8" id="chargeUnit-'+processSelectId+'">' +
'<div class="col-sm-2" style="padding: 0px">' +
'<label class="control-label is-required" style="color: blue;padding-left: 15px">计价单位:</label>' +
'<label class="control-label is-required" style="color: blue;padding-left: 5px">计价单位:</label>' +
'</div>' +
'<div class="col-sm-3" style="padding-left: 0px">' +
'<select required name="chargeUnit" data-id="chargeUnit" id="'+ processSelectId +'" class="form-control" onchange="unitChange(\'' + processSelectId + '\', \'' + processTableId + '\')">' +
@ -446,7 +446,7 @@
var $deliveryTimeContent = $(
''+
'<div class="col-xs-8 deliveryTime-'+processTableId+'" style="margin-left: 15px;padding-left: 0px;">' +
'<label class="col-sm-2" style="margin-top: 5px;">计划交付时间: </label>' +
'<label class="col-sm-3" style="margin-top: 5px;">计划交付时间: </label>' +
'<div class ="col-sm-4">' +
'<div class="input-group date"> ' +
'<input type="text" name="deliveryTime" class="form-control supplierDeliveryTime" id="deliveryTime_' + processTableId + '">' +
@ -492,16 +492,13 @@
$( '<div class="col-xs-12" name="supplier-' + processTableId + '_' + supplierIndex + '" style="height: 40px;">' +
'<div class="card-header suppplier_card" id = "supplier-' + processTableId + '_' + supplierIndex + '" style="height: 40px; margin-top: 10px;">' +
'<div class="row">' +
'<div class="card-text" style="padding-left: 30px;">' +
'<div class="card-text" style="padding-left: 50px;">' +
'<input type="radio" id="supplier-' + processTableId + '_' + supplierIndex + '" name="supplier-' + processTableId + '" required>' +
'<span class="supplierCode">' + supplier.supplierCode + '</span>' + '-' +
'<span class="supplierName">' + supplier.supplierName + '</span>' +
'-最新不含税委外价: ' + '<span id="materialNormb-' + processTableId + '" class="materialNormb">' + supplier.materialNormb + '</span>' +
' RMB 最新含税委外价: ' + '<span id="materialRmb-' + processTableId + '" class="materialRmb">' + supplier.materialRmb + '</span> RMB ' +
'<span class="chargeUnit" hidden="hidden" >' + chargeUnit + '</span>' +
// '<span class="supplierCorrelationCode" hidden="hidden" >' + material.correlationCodes + '</span>' +
// '<span class="supplierPurchaseQuoteCode" hidden="hidden" >' + supplier.purchaseQuoteCode + '</span>' +
'</div>' +
'</div>' +
'</div>' +

Loading…
Cancel
Save