Browse Source

[fix] 售后管理

修改售后第一次维护设备添加设备履历前端页面
修改展示设备履历的前端接口查询接口改成新增销售订单号、生产单号数据
修改展示设备履历的后端接口由关联物料号改成关联物料号、销售订单号、生产单号
dev
liuxiaoxu 4 months ago
parent
commit
460f32703f
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java
  2. 7
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java
  3. 29
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java
  4. 8
      ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html
  5. 8
      ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html

13
ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java

@ -274,10 +274,15 @@ public class AftersalesWarehouseOutController extends BaseController
/**
* 售后第一次维护设备 添加出货设备信息
*/
@GetMapping("/addShippingDevicesOne/{outOrderDetailId}")
public String addShippingDevicesOne(@PathVariable("outOrderDetailId") Long outOrderDetailId, ModelMap mmap)
@GetMapping("/addShippingDevicesOne")
public String addShippingDevicesOne(@RequestParam("outOrderDetailId") Long outOrderDetailId,
@RequestParam("salesOrderCode") String salesOrderCode,
@RequestParam("makeNo") String makeNo,
ModelMap mmap)
{
WarehouseOutOrderDetail warehouseOutOrderDetail = outOrderDetailService.selectWarehouseOutOrderDetailById(outOrderDetailId);
mmap.put("salesOrderCode",salesOrderCode);
mmap.put("makeNo",makeNo);
mmap.put("warehouseOutOrderDetail", warehouseOutOrderDetail);
return prefix + "/addShippingDevicesOne";
}
@ -298,13 +303,13 @@ public class AftersalesWarehouseOutController extends BaseController
/**
* 展示售后第一次维护设备添加出货设备料号相关出货设备信息
*/
@PostMapping("/getEquipMaterialDetailByMaterialNo")
@PostMapping("/getAllMaterialShippingDevices")
@ResponseBody
public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrderDetail warehouseOutOrderDetail)
{
startPage();
List<SelectShippingDeviceVO> list = warehouseOutOrderService.selectAftersalesShippingDeviceListByMaterialNo(warehouseOutOrderDetail);
List<SelectShippingDeviceVO> list = warehouseOutOrderService.selectAftersalesShippingDeviceList(warehouseOutOrderDetail);
return getDataTable(list);
}

7
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java

@ -116,7 +116,7 @@ public interface IAftersalesWarehouseOutService
List<WarehouseOutOrderDetail> selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder);
/**
* 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息
* 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 (旧版)
* */
List<SelectShippingDeviceVO> selectAftersalesShippingDeviceListByMaterialNo(WarehouseOutOrderDetail warehouseOutOrderDetail);
@ -150,4 +150,9 @@ public interface IAftersalesWarehouseOutService
* 确认验收
*/
int confirmCheckGoodsById(Long outOrderId);
/**
* 展示售后第一次维护设备添加出货设备料号相关出货设备信息 关联物料号生产单号销售单号
* */
List<SelectShippingDeviceVO> selectAftersalesShippingDeviceList(WarehouseOutOrderDetail warehouseOutOrderDetail);
}

29
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java

@ -473,6 +473,35 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu
}
/**
* 展示售后第一次维护设备添加出货设备料号相关出货设备信息 关联物料号生产单号销售单号
* */
@Override
public List<SelectShippingDeviceVO> selectAftersalesShippingDeviceList(WarehouseOutOrderDetail warehouseOutOrderDetail) {
List<SelectShippingDeviceVO> selectShippingDeviceVOs = new ArrayList<>();
AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice();
afterSalesShippingDevice.setMaterialNo(warehouseOutOrderDetail.getMaterialNo());
afterSalesShippingDevice.setMakeNo(warehouseOutOrderDetail.getMakeNo());
afterSalesShippingDevice.setSalesOrderCode(warehouseOutOrderDetail.getSalesOrderCode());
List<AfterSalesShippingDevice> afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice);
if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) {
// 记录日志
log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",warehouseOutOrderDetail.getMaterialNo());
}
for (AfterSalesShippingDevice tempAfterSalesShippingDevice : afterSalesShippingDevices) {
SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO();
shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId());
shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode());
shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber());
shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl());
shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode());
selectShippingDeviceVOs.add(shippingDeviceVO);
}
return selectShippingDeviceVOs;
}
/*
* 售后第一次维护设备信息根据设备ID删除出货设备信息
* */

8
ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html

@ -106,6 +106,8 @@
var prefix = ctx + "aftersales/warehouseOutOrder";
var warehouseOutOrderDetail = [[${warehouseOutOrderDetail}]];
var salesOrderCode = [[${salesOrderCode}]];
var makeNo = [[${makeNo}]];
$("#form-addShippingDevicesOne-edit").validate({
focusCleanup: true
@ -231,7 +233,7 @@
var options = {
id: "table-shippingDevices",
url: prefix + "/getEquipMaterialDetailByMaterialNo",
url: prefix + "/getAllMaterialShippingDevices",
pagination: false,
showSearch: false,
showRefresh: false,
@ -288,7 +290,9 @@
function queryParams(params) {
var curParams = {
// 传递参数查询参数
materialNo: warehouseOutOrderDetail.materialNo
materialNo: warehouseOutOrderDetail.materialNo,
salesOrderCode:salesOrderCode,
makeNo:makeNo
};
return curParams;
}

8
ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html

@ -339,7 +339,13 @@
// }
function addShippingDevicesOne(outOrderDetailId) {
var url = prefix + '/addShippingDevicesOne/' + outOrderDetailId
var salesOrderCode = [[${warehouseOutOrder.salesOrderCode}]];
var makeNo = [[${warehouseOutOrder.makeNo}]];
var queryParams = new URLSearchParams();
queryParams.append('outOrderDetailId', outOrderDetailId);
queryParams.append('salesOrderCode', encodeURIComponent(salesOrderCode));
queryParams.append('makeNo',encodeURIComponent(makeNo));
var url = prefix + '/addShippingDevicesOne?' + queryParams.toString();
$.modal.open("添加出货设备", url);
}

Loading…
Cancel
Save