Browse Source
售后维护设备出库 新增添加设备页面 新增详情页面 新增详情物料VO类 新增添加出货设备VO类 出货设备表格新增关联销售订单编号 新增根据销售订单号查询物料信息 新增根据销售订单号查询出货设备信息dev
liuxiaoxu
7 months ago
13 changed files with 764 additions and 100 deletions
@ -0,0 +1,35 @@ |
|||
package com.ruoyi.aftersales.domain.vo; |
|||
|
|||
import com.ruoyi.common.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class SelectMaterialsVO { |
|||
|
|||
/*销售订单号*/ |
|||
private String quoteId; |
|||
/*料号*/ |
|||
private String materialCode; |
|||
|
|||
/** 物料的名称 */ |
|||
private String materialName; |
|||
|
|||
/** 物料的类型 */ |
|||
private String materialType; |
|||
|
|||
/** 物料的加工方式 */ |
|||
private String processMethod; |
|||
|
|||
/** 物料的品牌 */ |
|||
private String brand; |
|||
|
|||
/** 物料单位*/ |
|||
private String unit; |
|||
|
|||
/** 物料的图片 */ |
|||
private String photoUrl; |
|||
|
|||
/** 物料的描述 */ |
|||
private String describe; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.ruoyi.aftersales.domain.vo; |
|||
|
|||
import lombok.Data; |
|||
/** |
|||
* 添加出货设备时新增出货设备列表 |
|||
*/ |
|||
@Data |
|||
public class SelectShippingDeviceVO { |
|||
|
|||
|
|||
private String quoteId; |
|||
|
|||
private String shippingDeviceId; |
|||
|
|||
private String deviceModelCode; |
|||
|
|||
private String deviceRunningNumber; |
|||
|
|||
private String makePhotoUrl; |
|||
|
|||
} |
|||
|
@ -0,0 +1,186 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('添加出货设备')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-warehouseOutOrder-edit" th:object="${selectMaterialsVO}"> |
|||
<!-- <input name="quoteId" th:field="*{quoteId}" type="hidden">--> |
|||
<!-- <input name="materialCode" th:field="*{materialCode}" type="hidden">--> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<h3 class="mb-4">物料信息</h3> |
|||
<table id="table-material"></table> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<h3 class="mb-4">出货设备</h3> |
|||
<table id="table-shippingDevices"></table> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
// var addFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:addShippingDevice')}]]; |
|||
// var addFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:addShippingDevice')}]]; |
|||
|
|||
var prefix = ctx + "aftersales/warehouseOutOrder"; |
|||
var selectMaterialsVO = [[${selectMaterialsVO}]]; |
|||
|
|||
$("#form-warehouseOutOrder-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-warehouseOutOrder-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='outOrderTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='planDeliveryTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
/*物料信息列表*/ |
|||
$(function() { |
|||
// 物料信息 |
|||
$('#table-material').bootstrapTable('destroy'); |
|||
var materialOptions = { |
|||
id:"table-material", |
|||
url: prefix + "/addShippingDevicesMaterial", |
|||
modalName: "物料信息", |
|||
showColumns: false, |
|||
pagination: false, |
|||
showToggle: false, |
|||
showRefresh:false, |
|||
showSearch:false, |
|||
queryParams:queryParams, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ title:'销售订单号', |
|||
field:'quoteId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '料号', |
|||
field: 'materialCode', |
|||
}, |
|||
{ |
|||
title: '图片', |
|||
field: 'photoUrl', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
title: '物料类型', |
|||
field: 'materialType', |
|||
}, |
|||
{ |
|||
title: '单位', |
|||
field: 'materialUnit', |
|||
}, |
|||
{ |
|||
title: '品牌', |
|||
field: 'brand', |
|||
}, |
|||
{ |
|||
title: '描述', |
|||
field: 'describe', |
|||
}, |
|||
] |
|||
}; |
|||
$.table.init(materialOptions); |
|||
|
|||
}) |
|||
function queryParams(params) { |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
quoteId: selectMaterialsVO.quoteId, |
|||
materialCode: selectMaterialsVO.materialCode, |
|||
}; |
|||
return curParams; |
|||
} |
|||
|
|||
/* 出货设备列表 */ |
|||
$(function() { |
|||
// 物料信息 |
|||
$('#table-shippingDevices').bootstrapTable('destroy'); |
|||
var shippingDevicesOptions = { |
|||
id: "table-shippingDevices", |
|||
url: prefix + "/addShippingDevicesOptions", |
|||
modalName: "物料信息", |
|||
showColumns: false, |
|||
pagination: false, |
|||
showToggle: false, |
|||
showRefresh: false, |
|||
showSearch: false, |
|||
queryParams:shippingDevicesQueryParams, |
|||
columns: [ |
|||
{ |
|||
checkbox: true // 保留原有全选checkbox |
|||
}, |
|||
{ |
|||
title: '销售订单号', |
|||
field: 'quoteId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '出货设备ID', |
|||
field: 'shippingDeviceId', |
|||
}, |
|||
{ |
|||
title: '设备型号', |
|||
field: 'deviceModelCode', |
|||
}, |
|||
{ |
|||
title: '流水号', |
|||
field: 'deviceRunningNumber', |
|||
}, |
|||
{ |
|||
title: '生产图片', |
|||
field: 'makePhotoUrl', |
|||
}, |
|||
{ |
|||
title: '确认添加', // 修改标题为操作 |
|||
align: 'center', |
|||
// formatter: function(value, row, index) { |
|||
// // 自定义操作列内容,包含一个确认添加按钮和一个独立的checkbox |
|||
// var checkboxHtml = '<input type="checkbox" value="' + row.shippingDeviceId + '" class="custom-checkbox">'; |
|||
// var addButtonHtml = '<a class="btn btn-success btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="addShippingDevices(\'' + row.materialCode + '\')"><i class="fa fa-add"></i>添加出货设备</a>'; |
|||
// return checkboxHtml + ' ' + addButtonHtml; |
|||
// }, |
|||
// events: { // 添加事件处理器 |
|||
// 'click .custom-checkbox': function(e, value, row, index) { |
|||
// // 这里可以添加点击checkbox时的处理逻辑 |
|||
// var checkbox = e.target; |
|||
// console.log("Checkbox for device ID: " + row.shippingDeviceId + " was clicked. Checked: " + checkbox.checked); |
|||
// } |
|||
// } |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(shippingDevicesOptions); |
|||
}); |
|||
|
|||
function shippingDevicesQueryParams(params) { |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
quoteId: selectMaterialsVO.quoteId, |
|||
}; |
|||
return curParams; |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,198 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改出库单')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-warehouseOutOrder-edit" th:object="${warehouseOutOrder}"> |
|||
<input name="outOrderId" th:field="*{outOrderId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出库单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outOrderCode" th:field="*{outOrderCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出库对象:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outOrderName" th:field="*{outOrderName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">销售单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyName" th:field="*{applyName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出库状态:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="warehouseOutStatus" class="form-control m-b" th:with="type=${@dict.getType('warehouse_out_status')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOutStatus}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="customerId" th:field="*{customerId}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="customerName" th:field="*{customerName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">收货联系人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="deliveryName" th:field="*{deliveryName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">收货电话:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="deliveryNumber" th:field="*{deliveryNumber}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">收货地址:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<h3 class="mb-4">物料信息</h3> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var addFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:addShippingDevices')}]]; |
|||
|
|||
var prefix = ctx + "aftersales/warehouseOutOrder"; |
|||
var warehouseOutOrder = [[${warehouseOutOrder}]]; |
|||
|
|||
$("#form-warehouseOutOrder-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-warehouseOutOrder-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='outOrderTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='planDeliveryTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/optionMaterials", |
|||
modalName: "物料信息", |
|||
showColumns: false, |
|||
pagination: false, |
|||
showToggle: false, |
|||
showRefresh:false, |
|||
showSearch:false, |
|||
queryParams:queryParams, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ title:'销售订单号', |
|||
field:'quoteId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '料号', |
|||
field: 'materialCode', |
|||
}, |
|||
{ |
|||
title: '图片', |
|||
field: 'photoUrl', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
title: '物料类型', |
|||
field: 'materialType', |
|||
}, |
|||
{ |
|||
title: '单位', |
|||
field: 'materialUnit', |
|||
}, |
|||
{ |
|||
title: '品牌', |
|||
field: 'brand', |
|||
}, |
|||
{ |
|||
title: '描述', |
|||
field: 'describe', |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="addShippingDevices(\'' + row.quoteId + '\',\'' + row.materialCode + '\')"><i class="fa fa-add"></i>添加出货设备</a>'); |
|||
return actions.join(''); |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
|
|||
}) |
|||
function queryParams(params) { |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
salesOrderCode: warehouseOutOrder.salesOrderCode |
|||
}; |
|||
return curParams; |
|||
} |
|||
|
|||
/*添加出货设备*/ |
|||
function addShippingDevices(quoteId, materialCode) { |
|||
// 确保URL编码,特别是如果materialCode中可能含有特殊字符 |
|||
var url = ctx + 'aftersales/warehouseOutOrder/addShippingDevices/' + encodeURIComponent(quoteId) + '/' + encodeURIComponent(materialCode); |
|||
$.modal.open("添加出货设备", url); |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue